The invention relates to a seamlessly connected kernel data packet acquisition technology. The technology comprises the following operation steps: firstly, driving is performed on a kernel registration network intermediate layer; secondly, data packets are cached in network intermediate layer driving in a blocked way, blocked data is stored in a queue, and each data cache is set to be 2M; thirdly, when a data traffic peak value exceeds a data packet disc writing speed, a data storage queue can automatically apply memory from a system, so as to meet the storage requirements, when the data traffic peak value is recovered, data cache blocks used for a long time can be released, and the data storage queue can be automatically adjusted according to data traffic; fourthly, when a thread is started in a kernel to read blocked data in a cache queue, and when the quantity exceeds the designated data packet quantity, the blocked data cache is written in disc files in order; fifthly, the blocked data is written in a disc according to a PCAP file format.