CN114500682B - Data packet processing method and device and side equipment - Google Patents

Data packet processing method and device and side equipment Download PDF

Info

Publication number
CN114500682B
CN114500682B CN202111619580.9A CN202111619580A CN114500682B CN 114500682 B CN114500682 B CN 114500682B CN 202111619580 A CN202111619580 A CN 202111619580A CN 114500682 B CN114500682 B CN 114500682B
Authority
CN
China
Prior art keywords
data packet
kernel space
packet
transmission
tcp
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111619580.9A
Other languages
Chinese (zh)
Other versions
CN114500682A (en
Inventor
詹春员
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202111619580.9A priority Critical patent/CN114500682B/en
Publication of CN114500682A publication Critical patent/CN114500682A/en
Application granted granted Critical
Publication of CN114500682B publication Critical patent/CN114500682B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/163In-band adaptation of TCP data exchange; In-band control procedures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/087Jitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0888Throughput
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/22Traffic shaping
    • H04L47/225Determination of shaping rate, e.g. using a moving window
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Environmental & Geological Engineering (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application discloses a data packet processing method, a data packet processing device and side equipment. The method comprises the following steps: monitoring TCP data packets of a transmission layer in a kernel space in the side equipment based on a target queue, wherein the target queue is established after a data stream of the side equipment is redirected to a user space of the side equipment; transmitting a TCP data packet to a network layer of the kernel space, and extracting transmission characteristics corresponding to the TCP data packet; predicting a target packet loss rate of the data packet in the transmission process based on the transmission characteristics; and retransmitting the TCP data packet to the network layer in the kernel space when the packet loss rate meets a preset threshold and acknowledgement information transmitted by the network layer in the kernel space is not received. According to the method and the device for redirecting the data stream to the user space, accidental packet loss and network delay jitter of the side device in the complex network environment can be filtered, meanwhile, the packet loss rate prediction mechanism is combined, retransmission can be carried out in advance under the condition that a retransmission request is not received and the time-out is not confirmed, and network efficiency is improved.

Description

Data packet processing method and device and side equipment
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a data packet, and a side device.
Background
With the gradual enrichment of edge computing applications, the demand for stable and efficient network transmission in a terminal cloud scene is increasing. However, the complex and changeable network environment at the edge end often causes active congestion control of the network bottom TCP protocol due to sporadic network jitter and packet loss, so that the network speed transmission speed is rapidly reduced, and the instantaneity and stability of video applications and the like are greatly affected.
A user space configuration TCP network acceleration method is implemented. Unlike traditional TCP acceleration methods, modifications to the system kernel are often required, such as BBR algorithms and the like, to replace the kernel congestion control algorithm. Although the kernel level processing efficiency is high, most of the devices are complicated in installation and configuration, and cannot be started or stopped at will, or an operating system needs to be restarted.
Meanwhile, in the traditional congestion control algorithm, network conditions are perceived through network packet loss and delay jitter, but sporadic packet loss and delay jitter of wireless network environments or ultra-long-distance wired transmission at the edge cannot indicate network congestion, and the network transmission speed is greatly reduced by the aggressive reduction of a transmission window.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a method, an apparatus, and a side device for processing a data packet.
According to an aspect of the embodiments of the present application, there is provided a method for processing a data packet, applied to a side device, including:
monitoring TCP data packets of a transmission layer in a kernel space in a side device based on a target queue, wherein the target queue is established after a data stream of the side device is redirected to a user space of the side device;
sending the TCP data packet to a network layer of a kernel space, and extracting transmission characteristics corresponding to the TCP data packet;
predicting a target packet loss rate of the data packet in the transmission process based on the transmission characteristics;
and retransmitting the TCP data packet to the network layer in the kernel space under the condition that the packet loss rate meets a preset threshold and acknowledgement information transmitted by the network layer in the kernel space is not received.
Further, before listening for the input/output data packet of the kernel space in the edge device based on the preset queue, the method further includes:
detecting a first redirection operation acting on the edge device, wherein the first redirection operation is used for redirecting the data stream of the edge device to a user space;
acquiring a queue creation request based on the first redirection operation, wherein the queue creation request carries two queue configuration information;
and creating a target queue based on the two queue configuration information, wherein the target queue comprises a first queue and a second queue, the first queue is used for acquiring the input data packet of the kernel space, and the second queue is used for acquiring the output data packet of the kernel space.
Further, before sending the TCP packet to the network layer of the kernel space, the method further includes:
and under the condition that the communication connection between the side end device and the network layer of the kernel space is established based on the TCP three-way handshake, storing the TCP data packet into a buffer area and sending acknowledgement information to the transmission layer of the kernel space.
Further, the sending the TCP packet to the network layer in the kernel space, and extracting the transmission characteristic corresponding to the TCP packet, includes:
sending the TCP data packet to a network layer of the kernel space;
extracting transmission characteristics corresponding to the TCP data packet under the condition that the TCP data packet is determined to be in a transmission state, wherein the transmission characteristics comprise: network throughput, network latency, and transmission rate.
Further, the predicting the target packet loss rate of the data packet in the transmission process based on the transmission characteristics includes:
acquiring a pre-trained packet loss rate prediction model and a historical packet loss rate;
and transmitting the transmission characteristics and the historical packet loss rate to the packet loss rate prediction model so that the packet loss rate prediction model calculates the target packet loss rate based on the transmission characteristics and the historical packet loss rate.
Further, the method further comprises:
acquiring a transmission result corresponding to the TCP data packet;
detecting a second redirection operation acting on the edge device under the condition that the sending result is used for indicating that the TCP data packet is successfully sent to the network layer of the kernel space, wherein the second redirection operation is used for redirecting the data flow of the edge device to the kernel space;
and redirecting the data stream of the side-end device to the kernel space of the side-end device according to the second redirecting operation.
According to another aspect of the embodiments of the present application, there is also provided a processing device for a data packet, including:
a monitoring module, configured to monitor a TCP packet of a transport layer in a kernel space of an edge device based on a target queue, where the target queue is established after a data stream of the edge device is redirected to a user space of the edge device;
the sending module is used for sending the TCP data packet to a network layer in kernel space and extracting the transmission characteristics corresponding to the TCP data packet;
the prediction module is used for predicting the target packet loss rate of the data packet in the transmission process based on the transmission characteristics;
and the processing module is used for retransmitting the TCP data packet to the network layer in the kernel space under the condition that the packet loss rate meets a preset threshold value and the confirmation information transmitted by the network layer in the kernel space is not received.
According to another aspect of the embodiments of the present application, there is also provided an edge device, including: the system comprises a user space and a kernel space, wherein an acceleration unit is deployed in the user space;
the kernel space is used for receiving or generating TCP data packets;
the user space is used for monitoring TCP data packets of a transmission layer in a kernel space in the side equipment based on a target queue, wherein the target queue is established after a data stream of the side equipment is redirected to the user space of the side equipment; transmitting the TCP data packet to a network layer of a kernel space based on the acceleration unit, and extracting transmission characteristics corresponding to the TCP data packet; predicting a target packet loss rate of the data packet in the transmission process based on the transmission characteristics; and retransmitting the TCP data packet to the network layer in the kernel space under the condition that the packet loss rate meets a preset threshold and acknowledgement information transmitted by the network layer in the kernel space is not received.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that performs the steps described above when running.
According to another aspect of the embodiments of the present application, there is provided an electronic device including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; and a processor for executing the steps of the method by running a program stored on the memory.
Embodiments of the present application also provide a computer program product comprising instructions which, when run on a computer, cause the computer to perform the steps of the above method.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages: in the embodiment of the application, by redirecting the data flow of the side equipment to the user space and sending the TCP data packet by using the user space, the sporadic packet loss and network delay jitter of the side equipment in a complex network environment can be filtered, and meanwhile, the retransmission in advance under the condition of not receiving a retransmission request and not confirming overtime can be realized by combining a packet loss rate prediction mechanism, so that the network efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a flowchart of a method for processing a data packet according to an embodiment of the present application;
fig. 2 is a flowchart of a method for processing a data packet according to another embodiment of the present application;
fig. 3 is a block diagram of a processing device for a data packet according to an embodiment of the present application;
fig. 4 is a schematic diagram of an edge device according to an embodiment of the present application;
fig. 5 is a schematic diagram of a processing procedure of a data packet according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments, the exemplary embodiments of the present application and the descriptions thereof are used to explain the present application and do not constitute undue limitations of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another similar entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the application provides a data packet processing method and device and side equipment. The method provided by the embodiment of the invention can be applied to any needed electronic equipment, for example, the electronic equipment can be a server, a terminal and the like, is not particularly limited, and is convenient to describe and is called as the electronic equipment for short hereinafter.
According to an aspect of the embodiments of the present application, a method embodiment of a method for processing a data packet is provided. Fig. 1 is a flowchart of a method for processing a data packet according to an embodiment of the present application, as shown in fig. 1, where the method includes:
in step S11, the TCP packet of the transport layer in the kernel space of the edge device is monitored based on the target queue, wherein the target queue is established after the data stream of the edge device is redirected to the user space of the edge device.
In this embodiment of the present application, before listening for an input/output data packet of a kernel space in a peer device based on a preset queue, the method further includes the following steps A1-A3:
step A1, detecting a first redirection operation acting on the edge device, wherein the first redirection operation is used for redirecting the data stream of the edge device to the user space.
And step A2, acquiring a queue creation request based on a first redirection operation, wherein the queue creation request carries two queue configuration information.
The method provided by the embodiment of the application is applied to the side equipment, the user can initiate the first redirection operation based on the side equipment, at this time, the side equipment can authenticate the user information, and the user information can be: user identity information or password preset by the user, and the like. And if the user information authentication is passed, acquiring a queue creation request uploaded by the user based on a first redirection operation, wherein the user carries the created queue configuration information in the queue creation request when uploading the queue creation request.
And A3, creating a target queue based on the two queue configuration information, wherein the target queue comprises a first queue and a second queue, the first queue is used for acquiring the input data packet of the kernel space, and the second queue is used for acquiring the output data packet of the kernel space.
In this embodiment of the present application, a user may send a creation request to an edge device, where the creation request carries two queue configuration information, where the queue configuration information may be iptables rules, and a target queue is created based on the two iptables rules, where the two iptables rules are as follows:
iptables-t mangle-A INPUT-j NFQUEUE--queue-num 0;
iptables-t mangle-I OUPUT-j NFQUEUE--queue-num 1;
the target queue includes a first queue (queue-num 0) for acquiring an input packet of the kernel space and a second queue (queue-num 1) for acquiring an output packet of the kernel space.
In this embodiment of the present application, after the target queue is created, an acceleration unit in the user space may be utilized to monitor, based on the target queue, a TCP (Transmission Control Protocol ) packet in the kernel space, where the TCP packet includes: an input data packet and an output data packet. The acceleration unit is equivalent to a new 3.5 layer in the fourth layer transmission layer and the third layer network layer, and the fourth layer transmission layer has no perception on packet loss and delay jitter of the network and can not carry out congestion control any more by setting the acceleration unit, so that the acceleration unit has a better acceleration effect even in a severe network environment. This also requires an acceleration unit to implement both congestion control and retransmission mechanisms.
Step S12, a TCP data packet is sent to a network layer of the kernel space, and transmission characteristics corresponding to the TCP data packet are extracted.
In an embodiment of the present application, before sending the TCP packet to the network layer of the kernel space, the method further includes: and under the condition that the communication connection between the side end device and the network layer of the kernel space is established based on the TCP three-way handshake, storing the TCP data packet into a buffer area, and sending acknowledgement information to the transmission layer of the kernel space.
In this embodiment of the present application, the acceleration unit in the user space may further establish a communication connection with the network layer in the kernel space based on the TCP three-way handshake protocol, and after establishing a communication connection with the network layer in the kernel space, the acceleration unit starts to take over the packet transmission operation originally performed by the kernel space. So-called "three-way handshake": in order to track and negotiate the data volume of each transmission, the synchronization of the transmission and the reception of the data segments is ensured, the data transmission is confirmed according to the received data volume, the connection is canceled after the reception is finished, and the virtual connection is established.
It should be noted that, in the embodiment of the present application, the deployment of the acceleration unit in the user space summary does not involve modification to the kernel space, and the overall installation configuration of the acceleration unit is started and stopped simply without restarting the system, without affecting the existing network connection, and without sensing configuration to the user space application.
In this embodiment of the present application, after the acceleration unit in the user space monitors the TCP packet in the kernel space, the acceleration unit stores the TCP packet in the buffer area, and sends acknowledgement information to the transport layer in the kernel space, where the acknowledgement information is used to inform the kernel space acceleration unit that the TCP packet has been received.
The purpose of the buffer zone adopted in the embodiment of the application is to isolate the perception of the transmission layer to the network environment, namely, the perception of congestion control of an upper TCP protocol is in a network without packet loss and delay jitter, and a sending window is quickly improved and maintained. The accelerating unit adjusts the sending window of the accelerating unit by adopting a more intelligent strategy, and sporadic packet loss and delay jitter are shielded by the accelerating unit to reduce the window operation, so that the maximum network transmission bandwidth can be almost always kept when a large amount of data is transmitted.
In the embodiment of the present application, step S12, sending a TCP packet to a network layer of a kernel space, and extracting a transmission characteristic corresponding to the TCP packet, includes the following steps B1-B2:
and B1, transmitting the TCP data packet to a network layer of the kernel space.
And B2, extracting transmission characteristics corresponding to the TCP data packet under the condition that the TCP data packet is determined to be in a transmission state, wherein the transmission characteristics comprise: network throughput, network latency, and transmission rate.
In the embodiment of the present application, an acceleration module deployed in a user space of a side device is used to send a TCP packet to a network layer in kernel space, and step S13 of monitoring the TCP packet predicts a target packet loss rate of the packet in a transmission process based on transmission characteristics.
In the embodiment of the present application, step S13 predicts a target packet loss rate of a data packet in a transmission process based on a transmission characteristic, and includes the following steps C1-C2:
and step C1, acquiring a pre-trained packet loss rate prediction model and a historical packet loss rate.
In the embodiment of the application, the acceleration unit samples and records historical packet loss and delay jitter of the TCP connection, models dynamic changes in sequence data, trains a preset neural network model by learning potential characteristics of the delay jitter and the packet loss in the sequence data, and obtains a packet loss rate prediction model. The preset neural network model is a gating cycle model (gated recurrent unit, GRU), and the gating cycle model is a neural network which is improved and optimized on the basis of LSTM, has a faster convergence rate and is suitable for processing time series data.
And step C2, transmitting the transmission characteristics and the historical packet loss rate to a packet loss rate prediction model so that the packet loss rate prediction model calculates a target packet loss rate based on the transmission characteristics and the historical packet loss rate.
In the embodiment of the application, the packet loss rate prediction model is composed of an input layer, a hidden layer and an output layer, the transmission characteristics and the historical packet loss rate are input to the input layer in the packet loss rate prediction model, the output layer inputs the transmission characteristics and the historical packet loss rate to the hidden layer, and the hidden layer calculates the target packet loss rate according to the first weights corresponding to the characteristics in the transmission characteristics and the second weights corresponding to the historical packet loss rate.
Step S14, when the packet loss rate meets the preset threshold value and the confirmation information sent by the network layer in the kernel space is not received, the TCP data packet is resent to the network layer in the kernel space.
In the embodiment of the application, by redirecting the data flow of the side equipment to the user space and sending the TCP data packet by using the user space, the sporadic packet loss and network delay jitter of the side equipment in a complex network environment can be filtered, and meanwhile, the retransmission in advance under the condition of not receiving a retransmission request and not confirming overtime can be realized by combining a packet loss rate prediction mechanism, so that the network efficiency is improved.
Fig. 2 is a flowchart of a method for processing a data packet according to another embodiment of the present application, where, as shown in fig. 2, the method further includes the following steps:
step S21, a sending result corresponding to the TCP data packet is obtained.
In step S22, in the case that the transmission result is used to indicate that the TCP packet is successfully transmitted to the network layer of the kernel space, a second redirecting operation acting on the edge device is detected, where the second redirecting operation is used to redirect the data stream of the edge device to the kernel space.
Step S23, redirecting the data stream of the edge device to the kernel space of the edge device according to the second redirecting operation.
In the embodiment of the application, when the acceleration module in the user space executes transmission of the TCP data packet, a transmission result of the TCP data packet is obtained, if the transmission of the TCP data packet is successful, a second redirection operation acting on the edge device is detected, and the data stream of the edge device is redirected to the kernel space of the edge device according to the second redirection operation.
Fig. 3 is a block diagram of a data packet processing apparatus according to an embodiment of the present application, where the apparatus may be implemented as part or all of an electronic device by using software, hardware, or a combination of both. As shown in fig. 3, the apparatus includes:
a monitoring module 31, configured to monitor a TCP packet of a transport layer in a kernel space of the edge device based on a target queue, where the target queue is established after a data stream of the edge device is redirected to a user space of the edge device;
a sending module 32, configured to send a TCP packet to a network layer in kernel space, and extract a transmission characteristic corresponding to the TCP packet;
a prediction module 33, configured to predict a target packet loss rate of the data packet during transmission based on the transmission characteristic;
and the processing module 34 is configured to resend the TCP packet to the network layer in the kernel space if the packet loss rate meets a preset threshold and no acknowledgement information sent by the network layer in the kernel space is received.
In an embodiment of the present application, a processing device for a data packet includes: the system comprises a creation module, a first redirection module and a second module, wherein the creation module is used for detecting a first redirection operation acting on the side equipment, and the first redirection operation is used for redirecting the data flow of the side equipment to a user space; acquiring a queue creation request based on a first redirection operation, wherein the queue creation request carries two queue configuration information; and creating a target queue based on the two queue configuration information, wherein the target queue comprises a first queue and a second queue, the first queue is used for acquiring input data packets in the kernel space, and the second queue is used for acquiring output data packets in the kernel space.
In an embodiment of the present application, the processing device for a data packet further includes: and the storage module is used for storing the TCP data packet into the buffer area and sending the confirmation information to the transmission layer of the kernel space under the condition that the communication connection between the side equipment and the network layer of the kernel space is established based on the TCP three-way handshake.
In the embodiment of the present application, the sending module 32 is configured to send a TCP packet to a network layer in kernel space; under the condition that the TCP data packet is in a transmission state, extracting transmission characteristics corresponding to the TCP data packet, wherein the transmission characteristics comprise: network throughput, network latency, and transmission rate.
In the embodiment of the present application, the prediction module 33 is configured to obtain a pre-trained packet loss rate prediction model and a historical packet loss rate; and transmitting the transmission characteristics and the historical packet loss rate to a packet loss rate prediction model so that the packet loss rate prediction model calculates a target packet loss rate based on the transmission characteristics and the historical packet loss rate.
In this embodiment of the present application, the processing device of a data packet further includes a change module, configured to obtain a transmission result corresponding to the TCP data packet; detecting a second redirection operation acting on the edge device under the condition that the transmission result is used for indicating that the TCP data packet is successfully transmitted to the network layer of the kernel space, wherein the second redirection operation is used for redirecting the data flow of the edge device to the kernel space; and redirecting the data stream of the edge device to the kernel space of the edge device according to the second redirecting operation.
In the embodiment of the application, by redirecting the data flow of the side equipment to the user space and sending the TCP data packet by using the user space, the sporadic packet loss and network delay jitter of the side equipment in a complex network environment can be filtered, and meanwhile, the retransmission in advance under the condition of not receiving a retransmission request and not confirming overtime can be realized by combining a packet loss rate prediction mechanism, so that the network efficiency is improved.
Fig. 4 is a schematic diagram of an edge device provided in an embodiment of the present application, where the device may be implemented as part or all of an electronic device by software, hardware, or a combination of both. As shown in fig. 4, the edge device includes: a user space 41 and a kernel space 42, the user space 41 being deployed with an acceleration unit 43. It should be noted that, in the embodiment of the present application, the deployment of the acceleration unit in the user space summary does not involve modification to the kernel space, and the overall installation configuration of the acceleration unit is started and stopped simply without restarting the system, without affecting the existing network connection, and without sensing configuration to the user space application.
A user space 41 for listening to TCP packets of a transport layer in a kernel space in the edge device based on a target queue, wherein the target queue is established after a data stream of the edge device is redirected to the user space of the edge device; transmitting a TCP data packet to a network layer of the kernel space, and extracting transmission characteristics corresponding to the TCP data packet; predicting a target packet loss rate of the data packet in the transmission process based on the transmission characteristics; and retransmitting the TCP data packet to the network layer in the kernel space under the condition that the packet loss rate meets a preset threshold and acknowledgement information transmitted by the network layer in the kernel space is not received.
Kernel space 42 for receiving or generating TCP packets, which may include: and inputting the data packet and outputting the data packet. Referring to fig. 5, a transport layer in the kernel space is used to generate an output packet, and a network layer in the kernel space is used to receive an input packet.
In the embodiment of the application, by redirecting the data flow of the edge device to the acceleration unit of the user space, the sporadic packet loss and network delay jitter of the edge device in the complex network environment can be filtered by utilizing the acceleration unit of the user space to send the TCP data packet, and meanwhile, the retransmission in advance under the condition of not receiving a retransmission request and not confirming timeout can be realized by combining a packet loss rate prediction mechanism, so that the network efficiency is improved.
As one example, after the acceleration unit is deployed to the edge device, the AI algorithm update package download to edge deployment time is substantially reduced. The time consumption of the picture return interface is effectively reduced, and the online rate of the video cloud side equipment is effectively improved. The time interval from capturing the alarm by the camera to displaying the alarm at the front end of the video cloud is shortened by about 10% on average.
The embodiment of the application further provides an electronic device, as shown in fig. 6, the electronic device may include: the device comprises a processor 1501, a communication interface 1502, a memory 1503 and a communication bus 1504, wherein the processor 1501, the communication interface 1502 and the memory 1503 are in communication with each other through the communication bus 1504.
A memory 1503 for storing a computer program;
the processor 1501, when executing the computer program stored in the memory 1503, implements the steps of the above embodiments.
The communication bus mentioned by the above terminal may be a peripheral component interconnect standard (Peripheral Component Interconnect, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the terminal and other devices.
The memory may include random access memory (Random Access Memory, RAM) or non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, CPU for short), a network processor (Network Processor, NP for short), etc.; but also digital signal processors (Digital Signal Processing, DSP for short), application specific integrated circuits (Application Specific Integrated Circuit, ASIC for short), field-programmable gate arrays (Field-Programmable Gate Array, FPGA for short) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided herein, a computer readable storage medium is provided, where instructions are stored, which when executed on a computer, cause the computer to perform the method for processing a data packet according to any of the above embodiments.
In yet another embodiment provided herein, there is also provided a computer program product containing instructions that, when run on a computer, cause the computer to perform the method of processing a data packet according to any of the above embodiments.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk), etc.
The foregoing description is only of the preferred embodiments of the present application and is not intended to limit the scope of the present application. Any modifications, equivalent substitutions, improvements, etc. that are within the spirit and principles of the present application are intended to be included within the scope of the present application.
The foregoing is merely a specific embodiment of the application to enable one skilled in the art to understand or practice the application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for processing a data packet, applied to a user space in a side device, comprising:
monitoring TCP data packets of a transmission layer in a kernel space in a side device based on a target queue, wherein the target queue is established after a data stream of the side device is redirected to a user space of the side device;
and sending the TCP data packet to a network layer of a kernel space, and extracting transmission characteristics corresponding to the TCP data packet, wherein the transmission characteristics comprise: network throughput, network latency, and transmission rate;
predicting a target packet loss rate of the data packet in the transmission process based on the transmission characteristics;
and retransmitting the TCP data packet to the network layer in the kernel space under the condition that the packet loss rate meets a preset threshold and acknowledgement information transmitted by the network layer in the kernel space is not received.
2. The method of claim 1, wherein prior to listening for input and output packets in kernel space in the edge device based on the preset queue, the method further comprises:
detecting a first redirection operation acting on the edge device, wherein the first redirection operation is used for redirecting the data stream of the edge device to a user space;
acquiring a queue creation request based on the first redirection operation, wherein the queue creation request carries two queue configuration information;
and creating a target queue based on the two queue configuration information, wherein the target queue comprises a first queue and a second queue, the first queue is used for acquiring the input data packet of the kernel space, and the second queue is used for acquiring the output data packet of the kernel space.
3. The method of claim 1, wherein prior to sending the TCP packet to the network layer of the kernel space, the method further comprises:
and under the condition that the communication connection between the side end device and the network layer of the kernel space is established based on the TCP three-way handshake, storing the TCP data packet into a buffer area and sending acknowledgement information to the transmission layer of the kernel space.
4. The method according to claim 1, wherein the sending the TCP packet to the network layer of the kernel space and extracting the transmission characteristic corresponding to the TCP packet comprise:
sending the TCP data packet to a network layer of the kernel space;
and under the condition that the TCP data packet is in a transmission state, extracting the transmission characteristics corresponding to the TCP data packet.
5. The method of claim 4, wherein predicting a target packet loss rate of the data packet during transmission based on the transmission characteristics comprises:
acquiring a pre-trained packet loss rate prediction model and a historical packet loss rate;
and transmitting the transmission characteristics and the historical packet loss rate to the packet loss rate prediction model so that the packet loss rate prediction model calculates the target packet loss rate based on the transmission characteristics and the historical packet loss rate.
6. The method according to claim 1, wherein the method further comprises:
acquiring a transmission result corresponding to the TCP data packet;
detecting a second redirection operation acting on the edge device under the condition that the sending result is used for indicating that the TCP data packet is successfully sent to the network layer of the kernel space, wherein the second redirection operation is used for redirecting the data flow of the edge device to the kernel space;
and redirecting the data stream of the side-end device to the kernel space of the side-end device according to the second redirecting operation.
7. A data packet processing apparatus, comprising:
a monitoring module, configured to monitor a TCP packet of a transport layer in a kernel space of an edge device based on a target queue, where the target queue is established after a data stream of the edge device is redirected to a user space of the edge device;
the sending module is used for sending the TCP data packet to a network layer in kernel space and extracting a transmission characteristic corresponding to the TCP data packet, wherein the transmission characteristic comprises: network throughput, network latency, and transmission rate;
the prediction module is used for predicting the target packet loss rate of the data packet in the transmission process based on the transmission characteristics;
and the processing module is used for retransmitting the TCP data packet to the network layer in the kernel space under the condition that the packet loss rate meets a preset threshold value and the confirmation information transmitted by the network layer in the kernel space is not received.
8. An edge device, comprising: the system comprises a user space and a kernel space, wherein an acceleration unit is deployed in the user space;
the kernel space is used for receiving or generating TCP data packets;
the user space is used for monitoring TCP data packets of a transmission layer in a kernel space in the side equipment based on a target queue, wherein the target queue is established after a data stream of the side equipment is redirected to the user space of the side equipment; transmitting the TCP data packet to a network layer of a kernel space based on the acceleration unit, and extracting transmission characteristics corresponding to the TCP data packet, wherein the transmission characteristics comprise: network throughput, network latency, and transmission rate; predicting a target packet loss rate of the data packet in the transmission process based on the transmission characteristics; and retransmitting the TCP data packet to the network layer in the kernel space under the condition that the packet loss rate meets a preset threshold and acknowledgement information transmitted by the network layer in the kernel space is not received.
9. A storage medium comprising a stored program, wherein the program when run performs the method steps of any of the preceding claims 1 to 6.
10. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for executing the method steps of any of claims 1-6 by running a program stored on a memory.
CN202111619580.9A 2021-12-27 2021-12-27 Data packet processing method and device and side equipment Active CN114500682B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111619580.9A CN114500682B (en) 2021-12-27 2021-12-27 Data packet processing method and device and side equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111619580.9A CN114500682B (en) 2021-12-27 2021-12-27 Data packet processing method and device and side equipment

Publications (2)

Publication Number Publication Date
CN114500682A CN114500682A (en) 2022-05-13
CN114500682B true CN114500682B (en) 2023-08-08

Family

ID=81495299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111619580.9A Active CN114500682B (en) 2021-12-27 2021-12-27 Data packet processing method and device and side equipment

Country Status (1)

Country Link
CN (1) CN114500682B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618258A (en) * 2015-02-05 2015-05-13 成都金本华科技股份有限公司 Control method of data transmission rate
CN111447046A (en) * 2020-03-26 2020-07-24 广州市百果园信息技术有限公司 Service data transmission method, device, equipment and storage medium
CN112913199A (en) * 2018-11-15 2021-06-04 深圳市欢太科技有限公司 Data transmission method and related product

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8437284B2 (en) * 2003-07-29 2013-05-07 Citrix Systems, Inc. Systems and methods for additional retransmissions of dropped packets
US8638795B2 (en) * 2010-08-12 2014-01-28 Citrix Systems, Inc. Systems and methods for quality of service of encrypted network traffic
EP3022643B1 (en) * 2013-07-16 2019-03-20 Intel Corporation Techniques for dynamically redirecting device driver operations to user space

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104618258A (en) * 2015-02-05 2015-05-13 成都金本华科技股份有限公司 Control method of data transmission rate
CN112913199A (en) * 2018-11-15 2021-06-04 深圳市欢太科技有限公司 Data transmission method and related product
CN111447046A (en) * 2020-03-26 2020-07-24 广州市百果园信息技术有限公司 Service data transmission method, device, equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"面向卫星数据地面传输环境的TCP容错技术研究与实现";罗新祥;《中国优秀硕士学位论文全文数据库信息科技辑》;全文 *

Also Published As

Publication number Publication date
CN114500682A (en) 2022-05-13

Similar Documents

Publication Publication Date Title
CN106304203B (en) Data transmission method and device
US10594606B2 (en) Wired data-connection aggregation
JP6526825B2 (en) Method and apparatus for transmitting transmission control protocol TCP data packets, and system
US10193911B2 (en) Techniques for automatically mitigating denial of service attacks via attack pattern matching
EP2425592B1 (en) Adaptive rate control based on overload signals
US8699343B2 (en) Adaptive rate control based on overload signals
US10833995B2 (en) Method and apparatus for datacenter congestion control based on software defined network
CN109412946B (en) Method, device, server and readable storage medium for determining back source path
US10645145B2 (en) Method and apparatus for accelerating data transmission in a network communication system
CN106612284B (en) Streaming data transmission method and device
WO2018112327A1 (en) Methods of concurrency control for block transfer in coap publish-subscribe architecture
CN104717041A (en) Method and device for transmitting data
CN113114778A (en) Data transmission method and device, electronic equipment and storage medium
US10574706B2 (en) Method and system for upload optimization
CN114500682B (en) Data packet processing method and device and side equipment
US10015288B2 (en) Communication apparatus and control method of communication apparatus
JP2023109707A (en) Video analysis system and data delivery method
JP6200870B2 (en) Data transfer control device, method and program
CN113722097A (en) Surge protection method and device, electronic equipment and storage medium
CN110391991B (en) Flow control method and related device
CN109274704B (en) TCP acceleration method and device, acceleration effect judgment controller and gateway
JP6731449B2 (en) Control device and program
KR101841080B1 (en) Method and system for data packet bypass transmission
CN118301093A (en) Data transmission control method and device, electronic equipment and storage medium
CN104580003B (en) Paralleling model P2P scrambling method, apparatus and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant