Method and device for achieving zero copy of network card

The invention provides a method and device for achieving zero copy of a network card, and the method and device are applied to the field of cloud computing. The method includes the following steps that when performing DMA operation, the network card directly transmits data to a User Buff of a user mode of an application program in a container, and a data annular pointer is changed through a hardware interrupt processing program; a user mode packet capture application program obtains a message pointer according to a preset strategy. Through the method that DMA is directly mapped to the lightweight and virtualized memory space of the application program, the effect of zero copy of the network card in the lightweight and virtualized container is achieved, the handling capacity of a network behavior analysis system is improved, and time delay of a network is reduced.