Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Data packet receiving method and device, terminal and storage medium

A receiving method and data packet technology, applied in the Internet field, can solve the problem of low efficiency of data packet reception

Active Publication Date: 2021-07-06
PENG CHENG LAB
View PDF7 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] In view of the above-mentioned defects of the prior art, the present invention provides a data packet receiving method, device, terminal and storage medium, aiming to solve the problem of low data packet receiving efficiency for low-rate traffic in the data packet receiving method in the prior art

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data packet receiving method and device, terminal and storage medium
  • Data packet receiving method and device, terminal and storage medium
  • Data packet receiving method and device, terminal and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0048] Such as figure 1 Shown, in an embodiment of described data packet receiving method, comprise steps:

[0049] S100. Determine the target reading time according to the current polling time, and read the data packet from the buffer according to the target reading time;

[0050] S200. Acquire read information during the process of reading data packets from the buffer, and update the polling time according to the read information;

[0051] Wherein, the reading information includes waiting times and reading times, the reading times are updated when trying to read data packets, and the waiting times are updated when no data packets are read.

[0052] Specifically, the terminal receives the data packet through the network card, and the network card stores the data packet in the buffer after receiving the data packet from the network. process. Such as figure 2 As shown, in the prior art, each time the network card receives a data packet, the DMA engine of the network card fir...

Embodiment 2

[0087] Based on the above embodiments, the present invention also provides a corresponding data packet receiving device, such as Figure 5 As shown, the data packet receiving device includes:

[0088] A packet receiving module, the packet receiving module is used to determine the target reading time according to the current polling time, and read the data packet from the buffer according to the target reading time, specifically as described in Embodiment 1;

[0089] An update module, the update module is used to acquire read information in the process of reading data packets from the buffer, and update the polling time according to the read information, wherein the read information It includes waiting times and reading times. The reading times are updated when trying to read data packets, and the waiting times are updated when no data packets are read. The details are as described in the first embodiment.

Embodiment 3

[0091] Based on the above embodiments, the present invention also provides a corresponding terminal, such as Figure 6 As shown, the terminal includes a processor 10 and a memory 20 . Figure 6 Only some components of the terminal are shown, but it should be understood that implementation of all illustrated components is not required, and more or fewer components may be implemented instead.

[0092] The storage 20 may be an internal storage unit of the terminal in some embodiments, such as a hard disk or memory of the terminal. In other embodiments, the memory 20 may also be an external storage device of the terminal, such as a plug-in hard disk equipped on the terminal, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD ) card, flash memory card (Flash Card), etc. Further, the memory 20 may also include both an internal storage unit of the terminal and an external storage device. The memory 20 is used to store application software and various ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a data packet receiving method and device, a terminal and a storage medium, and the method comprises the steps: determining a target reading duration according to the current polling time, and reading a data packet from a buffer region according to the target reading duration; and reading information in the process of reading the data packet from the buffer area is obtained, and the polling time is updated according to the reading information; wherein the reading information comprises the number of waiting times and the number of reading times, the number of reading times is updated when the data packet is tried to be read, and the number of waiting times is updated when the data packet is not read. According to the invention, the duration of reading the data packet from the buffer area can be dynamically adjusted according to the rate of the data packet in the network flow and the actual reading capability of the system, so that the situation that receiving interruption is triggered for multiple times to enter a polling state when the data packet of the low-rate network flow is received is prevented, and the receiving efficiency of the data packet is improved.

Description

technical field [0001] The present invention relates to the technical field of the Internet, in particular to a data packet receiving method, device, terminal and storage medium. Background technique [0002] The existing Linux operating system adopts the NAPI mechanism when receiving data packets. This mechanism combines the terminal mode with the polling mechanism. When the data packet arrives, the data packet is first stored in the buffer through the network card, and then the network card is activated to receive the interrupt. Enter the packet receiving interrupt processing routine. In the packet receiving interrupt processing routine, first turn off the packet receiving interrupt of the network card, and then wait for the corresponding polling function of the network card to be scheduled. When the corresponding polling function of the network card is scheduled, read each time M data packets, if there are redundant data packets in the buffer after reading M data packets,...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): H04L12/863
CPCH04L47/6225
Inventor 朱家骅汪漪徐荣军许兆斌
Owner PENG CHENG LAB
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products