CN111447046B - Service data transmission method, device, equipment and storage medium - Google Patents

Service data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN111447046B
CN111447046B CN202010223740.7A CN202010223740A CN111447046B CN 111447046 B CN111447046 B CN 111447046B CN 202010223740 A CN202010223740 A CN 202010223740A CN 111447046 B CN111447046 B CN 111447046B
Authority
CN
China
Prior art keywords
data
service data
transmission
service
auxiliary
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
CN202010223740.7A
Other languages
Chinese (zh)
Other versions
CN111447046A (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.)
Bigo Technology Singapore Pte Ltd
Original Assignee
Guangzhou Baiguoyuan Information 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 Guangzhou Baiguoyuan Information Technology Co Ltd filed Critical Guangzhou Baiguoyuan Information Technology Co Ltd
Priority to CN202010223740.7A priority Critical patent/CN111447046B/en
Publication of CN111447046A publication Critical patent/CN111447046A/en
Application granted granted Critical
Publication of CN111447046B publication Critical patent/CN111447046B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1812Hybrid protocols; Hybrid automatic repeat request [HARQ]
    • H04L1/1819Hybrid protocols; Hybrid automatic repeat request [HARQ] with retransmission of additional or different redundancy
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/188Time-out mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/622Queue service order
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/6245Modifications to standard FIFO or LIFO
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2212/00Encapsulation of packets
    • 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/164Adaptation or special uses of UDP protocol

Abstract

The invention discloses a service data transmission method, a device, equipment and a storage medium. The method is applied to a transmitting end and comprises the following steps: acquiring service data of an application program and auxiliary data corresponding to the service data; transmitting the service data based on the auxiliary data and a fair queue of kernel space; and carrying out transmission confirmation and/or data retransmission according to the transmission condition of the service data. The invention transmits the service data and the auxiliary data of the application program through the fair queue in the kernel space, performs transmission confirmation and/or data retransmission according to the transmission condition of the service data, solves the problem of low transmission efficiency caused by the need of copying data between the kernel space and the user space during data transmission, improves the data transmission rate, and simultaneously can perform transmission confirmation and/or data retransmission aiming at the transmission condition of different service data, avoids waiting a great amount of time when non-important service data is lost, and further increases the high efficiency of data transmission.

Description

Service data transmission method, device, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of communication, in particular to a service data transmission method, a device, equipment and a storage medium.
Background
Common traffic data transmission modes include datagram-oriented user datagram protocol (UDP, user Datagram Protocol) and transmission control protocol (TCP, transmission Control Protocol) by which transmissions are made between a sender and a receiver. When the UDP transmission protocol is used for transmission, the transmission process of the data packet is connectionless transmission, and the data packet is unreliable transmission.
In order to improve the reliability of service data in a UDP transmission mode, the functions of ACK, packet loss retransmission, disorder, real-time sending rate determination and the like of a data packet are added, however, the existing mode for improving UDP transmission is only applied to an application layer of terminal equipment, when ACK processing is carried out, the data packet needs to be copied from a kernel space to a user space of an application program, when the data packet is retransmitted, the data packet needs to be copied from the user space to the kernel space, the processing efficiency of the data packet is extremely low, and an introduced ACK mechanism leads to the data packet to reach a receiving end strictly according to a sending sequence when in transmission. However, the importance of the service data in UDP transmission is often not high, which may allow a part of the unimportant packets, e.g. packets of non-key frames in the video data, to be lost. In the prior art, a great deal of time is spent for waiting for the transmission of unimportant data packets, and the real-time performance of the service is seriously affected.
Disclosure of Invention
The invention provides a service data transmission method, a device, equipment and a storage medium, which are used for realizing high-efficiency transmission of service data, reducing unnecessary data retransmission, reducing waiting time and increasing timeliness of data transmission on the basis of ensuring the reliability of the service data.
In a first aspect, an embodiment of the present invention provides a service data transmission method, applied to a transmitting end, where the method includes:
acquiring service data of an application program and auxiliary data corresponding to the service data;
transmitting the service data based on the auxiliary data and a fair queue of kernel space;
and carrying out transmission confirmation and/or data retransmission according to the transmission condition of the service data.
In a second aspect, an embodiment of the present invention further provides a service data transmission method, applied to a receiving end, where the method includes:
acquiring service data in a transmission data packet and auxiliary data corresponding to the service data;
sending feedback information corresponding to the service data according to the auxiliary data;
and transmitting the service data to the application program according to the auxiliary data.
In a third aspect, an embodiment of the present invention further provides a service data transmission device, applied to a transmitting end, where the device includes:
the data acquisition module is used for acquiring service data of the application program and auxiliary data corresponding to the service data;
the data sending module is used for sending the service data based on the auxiliary data and the fair queue of the kernel space;
and the feedback processing module is used for carrying out transmission confirmation and/or data retransmission according to the transmission condition of the service data.
In a fourth aspect, an embodiment of the present invention further provides a service data transmission device, applied to a receiving end, where the device includes:
the data extraction module is used for acquiring service data in the sending data packet and auxiliary data corresponding to the service data;
the information feedback module is used for sending feedback information corresponding to the service data according to the auxiliary data;
and the data uploading module is used for transmitting the service data to the application program according to the auxiliary data.
In a fifth aspect, an embodiment of the present invention further provides an apparatus, including:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the method for transmitting service data according to any one of the embodiments of the present invention.
In a sixth aspect, an embodiment of the present invention further provides a computer readable storage medium, on which a computer program is stored, where the program when executed by a processor implements a service data transmission method according to any one of the embodiments of the present invention.
The invention transmits the service data and the auxiliary data of the application program through the fair queue of the kernel space, and transmits the confirmation and/or the data retransmission according to the transmission condition of the service data, thereby solving the problem that the data needs to be copied in the kernel space and the user space of the application program when the service data is transmitted, and simultaneously, when non-important data packets are lost, a great deal of time waiting is not required, the real-time performance of the data transmission is affected, and the effect of increasing the transmission efficiency of the service data transmission while the service data transmission has reliability is realized.
Drawings
FIG. 1 is a schematic diagram of a user mode transport protocol based on UDP protocol in the prior art;
fig. 2 is a flowchart of a service data transmission method according to a first embodiment of the present invention;
fig. 3 is a flowchart of a service data transmission method according to a second embodiment of the present invention;
fig. 4 is a flowchart of a service data transmission method according to a third embodiment of the present invention;
fig. 5 is a schematic structural diagram of a service data transmission device according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a service data transmission device according to a fifth embodiment of the present invention;
fig. 7 is a schematic structural diagram of an apparatus according to a sixth embodiment of the present invention.
Detailed Description
FIG. 1 is a schematic diagram of a user mode transmission protocol based on UDP in the prior art, as shown in FIG. 1, when a user data packet is sent to a network by a paging module or a retransmission module retransmits a lost data packet, the user data packet is copied from a user space to a kernel space once; all network data packets received by the kernel space need to be copied from the kernel space to the user space protocol stack for processing, and the processing mode can lead to extremely low processing efficiency of the data packets. When some congestion control algorithms are applied, data packets need to be sent at specified intervals, that is, the functions of a paging module (timer related module) are implemented, as in fig. 1, where the paging module is implemented in the user space in the prior art, then it is necessary for an application layer protocol to design and implement a corresponding timer to handle the task.
The invention is described in further detail below with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting thereof. It should be noted that, for convenience of description, only some, but not all of the structures related to the present invention are shown in the drawings, and furthermore, embodiments of the present invention and features in the embodiments may be combined with each other without conflict.
Example 1
Fig. 2 is a flowchart of a service data transmission method provided in an embodiment of the present invention, where the embodiment is applicable to a service data transmission case based on UDP, and the method is applied to a transmitting end, and may be executed by a service data transmission device, where the device may be implemented in a hardware and/or software manner, and may be generally integrated in an intelligent terminal, and specifically includes the following steps:
step 110, acquiring service data of the application program and auxiliary data corresponding to the service data.
The virtual address space of Linux can be divided into two parts, namely a kernel space and a user space, kernel codes and data can be stored in the kernel space, and codes and data of user programs can be stored in the user space of a process. In the embodiment of the invention, the application program can be located in the user space, and the service data can be understood as data which needs to be transmitted when the application program realizes the service function, and the service data can be transmitted from one intelligent terminal to another intelligent terminal or from one application program in one intelligent terminal to another application program. The auxiliary data corresponding to the service data may be understood as identification data when the service data is transmitted, may be data for auxiliary service data transmission, may improve transmission efficiency of the service data, for example, may be type identification information of the service data, may describe whether the service data needs to be retransmitted, may record whether the service data must arrive at the receiving end in sequence reliably, and so on.
Specifically, when the application program realizes the service function, service data can be generated, the service data needs to be transmitted, auxiliary data can be generated according to the type or description of the service data, and the kernel space can acquire the service data and the corresponding auxiliary data generated in the user space. The service data and the corresponding auxiliary data may be associated into a set of data, or the service data and the corresponding auxiliary data may be generated into a data packet, and when the data is acquired in the kernel space, the service data and the corresponding auxiliary data may be acquired simultaneously.
And 120, sending the service data based on the auxiliary data and the fair queue of the kernel space.
The Fair queue is a data structure for scheduling service data, and different from the first-in first-out queue, the Fair queue can divide the service data into a plurality of sub-queues, and each sub-queue is processed fairly. The data packets on each queue can be uniformly transmitted according to the set rate through each sub-queue, the data packet transmission is not required to be triggered by setting a timer, and the data packet transmission efficiency is higher. Specifically, after the service data and the auxiliary data are acquired, the kernel space can determine a transmission mode of the service data according to the auxiliary data, for example, when the auxiliary data indicates that the service data can not be retransmitted, the service data can be directly transmitted through a fair queue of the kernel space, the fair queue of the kernel space can divide the data into a plurality of sub-queues, the service data and the auxiliary data in each sub-queue are transmitted in turn, the service data in each fair queue can be ensured to be transmitted at a constant speed according to a set rate, and when the auxiliary data indicates that the service data can be retransmitted, the service data can be transmitted through the fair queue after one service data is stored in the kernel space. Furthermore, the core may send the auxiliary data and the service data together through the fair queue when sending the service data.
And 130, carrying out transmission confirmation and/or data retransmission according to the transmission condition of the service data.
The sending acknowledgement may be understood as an acknowledgement operation performed by the sending end after the service data is sent successfully. Data retransmission is understood as the loss of service data during data transmission, and the transmitting end transmits the data packet again.
Specifically, after the service data and the auxiliary data are sent in the kernel space, monitoring can be performed, and the sending condition of the service data can be received, wherein the sending condition of the service data can be based on the data receiving information fed back by the receiving end or based on whether feedback information is received in a certain time. After determining the transmission condition of the service data, the kernel space may perform transmission acknowledgement and/or data retransmission. For example, after receiving feedback that service data is successfully sent, the kernel space may perform sending confirmation, or delete the service data after receiving ACK confirmation from the receiving end; after receiving feedback of service data transmission failure, the kernel space can retransmit the data or retransmit the data and then confirm the transmission.
According to the technical scheme, the service data and the corresponding auxiliary data of the application program are acquired, the service data and the corresponding auxiliary data are sent according to the fair queue of the kernel space, and the sending confirmation and/or the data retransmission are carried out according to the sending condition of the service data, so that the problem that the copying time of the service data from the user space to the kernel space is overlong is solved, the repeated transmission of the service data between the user space and the kernel space is avoided, and meanwhile, a part of unimportant data packets are allowed to be lost in the data transmission process, so that the data transmission efficiency is improved, and the waiting time is reduced.
Example two
Fig. 3 is a flowchart of a service data transmission method provided by the second embodiment of the present invention, and referring to fig. 3, the embodiment of the present invention embodies the service data transmission method, and the service data transmission method provided by the embodiment of the present invention includes:
step 210, acquiring service data transmitted by an application program writing function and auxiliary data corresponding to the service data.
The write function is understood to be a function called by an application program when writing a control command, data to be transmitted, and related data. In the embodiment of the invention, the write function can be used for transmitting service data and auxiliary data corresponding to the service data to the kernel space.
Specifically, when the application program needs to send data, the application program can call a self-defined writing function, the service data and auxiliary data corresponding to the service data are transmitted to the kernel space, and the kernel space can acquire the service data and the auxiliary data corresponding to the service data.
Furthermore, on the basis of the embodiment of the invention, the writing function is generated by a mode of nesting words of the character equipment custom network interface.
Specifically, the writing function of the kernel space for data exchange with the application program can be used for nesting words through the character device custom network interface, and it can be understood that the kernel space can also define a read function, an epoll function and the like through the character device custom network interface nesting words when the kernel space exchanges data with the user space where the application program is located.
And 220, packaging the service data and the auxiliary data into a sending data packet and storing the sending data packet into a kernel space.
The encapsulation may be understood as forming a data packet by packing the service data and the auxiliary data by a certain protocol, or may be forming a data packet of an encapsulation protocol by mapping the service data and the auxiliary data into a payload of a certain encapsulation protocol and then filling a packet header of a corresponding protocol, or may be forming a data packet of an encapsulation protocol by mapping the service data into a payload of a certain encapsulation protocol and filling the auxiliary data into a packet header of a corresponding protocol. The formed data packet may be referred to as a transmission data packet.
Specifically, after the service data and the corresponding auxiliary data are acquired in the kernel space, the service data and the auxiliary data are encapsulated according to a specified encapsulation protocol to form a transmission data packet, and the transmission data packet can be stored in the kernel space. After the transmitting end transmits the transmitting data packet to the receiving end, if data loss occurs, the transmitting data packet lost in transmission can be directly obtained from the kernel space when data retransmission is needed, so that data retransmission is rapidly performed, and the transmission efficiency is improved.
Step 230, determining whether the service data is retransmitted according to the retransmission identifier in the auxiliary data.
The retransmission flag may be understood as flag information indicating whether the data packet sent by the sending end needs to be retransmitted again when the data packet does not reach the receiving end. The retransmission identifier may be represented by a certain field in the auxiliary data, if the field is 0, it may represent that the data retransmission is needed when the transmitted data packet does not reach the receiving end, and if the field is 1, the data retransmission is not needed correspondingly; similarly, 1 may be identified as requiring data retransmission, and 0 may be identified as not requiring data retransmission. In actual operation, how to perform retransmission identification may be preset.
Specifically, the retransmission identifier in the auxiliary data is obtained, whether the service data needs to be retransmitted or not can be determined according to the preset representation meaning of the retransmission identifier, if yes, step 240 is performed; otherwise, step 250 is performed. In a specific example, if the retransmission flag field is preset to be 0, data retransmission is required, and if the field is 1, data retransmission is not required; when the retransmission flag in the acquired certain auxiliary data is 0, it may indicate that the corresponding service data needs to be retransmitted, and step 240 is performed next.
Step 240, storing the transmission data packet corresponding to the service data in the retransmission list, and transmitting the transmission data packet through the fair queue in the kernel space.
The retransmission list may be understood as a storage space for storing the data packet that needs to be retransmitted, which may be an actually existing data table or a fixed storage space, where the transmitted data packet may be stored in the storage space, and the storage space may be used as a retransmission list.
Specifically, the service data that needs to be retransmitted in step 230 may obtain a corresponding transmission data packet, store the transmission data packet in a retransmission list, and transmit the transmission data packet to a fair queue in kernel space, where the fair queue in kernel space transmits the transmission data packet. And storing the sending data packet corresponding to the service data needing to be retransmitted in a retransmission list, wherein when the sending data packet is lost in data transmission, the sending end can find the sending data packet with the transmission loss in the retransmission list, so that the data retransmission is performed. Step 260 is performed next.
And 250, transmitting the transmission data packet corresponding to the service data through a fair queue in the kernel space.
Specifically, when the service data does not need to be retransmitted, a sending data packet corresponding to the service data can be obtained, the sending data packet is transmitted to a fair queue in kernel space, and is sent by the fair queue in kernel space, and after the sending, the sending data packet can be directly discarded and is not stored.
Step 260, judging whether feedback information of the service data is acquired within the threshold time.
The feedback information may be understood as a prompt information that is fed back to the transmitting end after the receiving end receives the transmitting data packet, for example, may be an ACK data packet. The threshold time may be understood as the maximum waiting time for which a retransmission of a transmitted data packet is required, during which the monitoring feedback information may be received.
Specifically, after the kernel space sends out the sending data packet through the fair queue, timing starts, if the feedback information of the service data is obtained in the threshold time, it can be stated that the receiving end receives the service data, and then step 270 is performed; if the threshold time interval has elapsed and no feedback information of the service data has been obtained, it may be considered that the receiving end has not received the transmission data packet, and the transmission data packet is lost, and step 280 is performed next.
Step 270, sending confirmation to the service data.
The sending acknowledgement may be understood as an acknowledgement operation performed by the sending end after the sending data packet is successfully received by the receiving end.
Specifically, after the receiving end successfully receives the sending data packet, the kernel space performs a confirmation operation of successful sending on the sending data packet.
And 280, retransmitting the service data.
Specifically, when the receiving end does not acquire feedback information of the service data, the service data needs to be retransmitted, and a transmission data packet corresponding to the service data in the retransmission list can be retransmitted through a fair queue in the kernel space.
According to the technical scheme, whether the service data needs data retransmission or not is identified, the service data and the auxiliary data are packaged into the transmission data packet, after the transmission data is transmitted through the fair queue in the kernel space, the transmission data packet needing data retransmission is stored in the retransmission list, and the transmission data packet needing no data retransmission can be directly discarded, so that the storage space is saved, and unnecessary waiting is avoided; after transmitting the sending data packet, the agent in the kernel space monitors, when the service data transmission is successful, the corresponding sending data packet in the retransmission list is deleted, and when the service data transmission is failed, the corresponding sending data packet is retransmitted, and the process can be realized in the kernel space, so that the copying of the data between the user space and the kernel space is reduced, the computing resource is saved, and the data transmission efficiency is improved.
Further, on the basis of the embodiment of the present invention, if feedback information of service data is obtained within a threshold time, the sending confirmation of the service data may include: and in the threshold time after the service data is transmitted, monitoring the ACK data packet corresponding to the service data through the proxy of the kernel space, and deleting the transmission data packet corresponding to the service data in the retransmission list.
The agent can be implemented in Linux kernel space, and is used for replacing an application program to perform operations such as monitoring ports, receiving and sending data packets, and integrating functions of retransmitting data packets which are failed to be sent, processing ACK data packets of sent data packets, transmitting the data packets to be sent to a fair queue, and the like.
Specifically, an agent can be implemented in the kernel space, after the kernel space sends out the sending data packet through the fair queue, the received data packet is monitored, and if the ACK data packet corresponding to the service data exists in the data packet monitored by the agent in the threshold time, it can be stated that the receiving end receives the service data, so that retransmission of the service data is not needed, and then the sending data packet corresponding to the service data is deleted in the retransmission list.
Further, on the basis of the embodiment of the present invention, if feedback information of the service data is not obtained within a threshold time, the data retransmission of the service data may include: monitoring an ACK data packet corresponding to the service data through an agent in a kernel space within a threshold time after the service data is sent; and if the ACK data packet is not monitored, acquiring a sending data packet corresponding to the service data of the retransmission list for retransmission.
Specifically, an agent can be implemented in the kernel space, after the kernel space sends out the sending data packet through the fair queue, the received data packet is monitored, and if the agent does not monitor the ACK data packet corresponding to the sent service data in the threshold time, it can be stated that the receiving end does not correctly receive the service data, so that the data retransmission of the service data needs to be performed, the agent acquires the sending data packet corresponding to the service data in the retransmission list, and transmits the sending data packet to the fair queue for transmission.
Example III
Fig. 4 is a flowchart of a service data transmission method provided in the third embodiment of the present invention, where the present embodiment is applicable to a service data transmission situation based on UDP, and the method is applied to a receiving end, and may be executed by a service data transmission device, where the device may be implemented in a hardware and/or software manner, and may be generally integrated in an intelligent terminal, and specifically includes the following steps:
step 310, acquiring service data in the transmission data packet and auxiliary data corresponding to the service data.
Specifically, after receiving the sending data packet, the receiving end may parse the sending data packet to obtain service data and auxiliary data corresponding to the service data.
And 320, sending feedback information corresponding to the service data according to the auxiliary data.
Specifically, after the service data in the transmission data packet and the auxiliary data corresponding to the service data are acquired, the auxiliary data may be analyzed, and the feedback information corresponding to the service data may be determined. The auxiliary data may record whether acknowledgement information needs to be fed back to the transmitting end after receiving the service data, for example, an ACK packet is sent to the transmitting end.
Step 330, the service data is transferred to the application program according to the auxiliary data.
Specifically, the application program may be located in the user space, and in the embodiment of the present invention, receiving and analyzing the sending data packet is implemented in the kernel space, so after the service data is acquired, the relevant module or function may be called according to the relevant identification information of the service data in the auxiliary data, and the service data is transferred from the kernel space to the application program in the user space.
According to the technical scheme, the service data and the auxiliary data corresponding to the service data are obtained by analyzing the obtained transmission data packet in the kernel space, and the feedback information and the transmission data are sent according to the auxiliary data, so that the problems that the data packet needs to be copied between the kernel space and the user space in data transmission, the transmission efficiency is low and the waiting time is long are solved, whether the transmission confirmation is carried out or not is determined through the retransmission identification, meanwhile, the service data can be orderly transmitted to an application program, the calculation resources are saved under the condition that the reliable transmission of the data is ensured, and the data transmission efficiency is improved.
Further, on the basis of the embodiment of the present invention, the acquiring the service data in the transmission data packet and the auxiliary data corresponding to the service data may include: and analyzing the sending data packet in the kernel space, and extracting service data and auxiliary data in the sending data packet.
Specifically, after receiving the transmission data packet, the receiving end may parse the transmission data packet in the kernel space to obtain service data and auxiliary data corresponding to the service data. The receiving and analyzing of the sending data packet may be processed by a related module in the kernel space, for example, an agent may be implemented in the kernel space, and when the kernel agent receives the data packet, the kernel agent first determines whether the data packet is a sending data packet, if so, analyzes the sending data packet in the kernel space, and extracts service data and auxiliary data therein.
Further, on the basis of the embodiment of the present invention, sending feedback information corresponding to the service data according to the auxiliary data may include: and when the service data is determined to be transmitted and confirmed according to the retransmission identification in the auxiliary data, transmitting an ACK data packet corresponding to the service data.
The retransmission identifier may be represented by a field in the auxiliary data, if the field is 0, it may represent that the transmission acknowledgement is needed when the corresponding service data is received, and if the field is 1, the transmission acknowledgement is not needed correspondingly; similarly, 1 may be identified as requiring transmission confirmation, and 0 may be identified as not requiring transmission confirmation. In actual operation, how to perform retransmission identification may be preset.
Specifically, a retransmission identifier in the auxiliary data can be obtained, whether the service data needs to be sent for confirmation or not can be determined according to the preset representation meaning of the retransmission identifier, and if yes, an ACK data packet corresponding to the service data is sent.
Further, on the basis of the above embodiment of the present invention, transferring the service data to the application program according to the auxiliary data may include:
when the retransmission identification in the auxiliary data determines that the service data is not confirmed to be sent, the service data is transmitted to the application program through a reading function of the application program;
when the retransmission identification in the auxiliary data determines that the service data is transmitted and confirmed and the preamble data packet of the transmission data packet corresponding to the service data is transmitted to the application program, the service data is transmitted to the application program through the reading function of the application program.
A read function is understood, among other things, as an execution tool that reads and passes traffic data from kernel space to an application.
Specifically, a retransmission identifier in the auxiliary data can be obtained, the meaning of a retransmission identifier field is judged, if the field identifier of the retransmission identifier is that the service data does not need to be sent for confirmation, a reading function is directly called, and the service data is read from a kernel space and is transmitted to an application program in a user space; if the field identification of the retransmission identification is that the service data needs to be transmitted and confirmed, judging whether the preamble data packet of the transmission data packet corresponding to the service data is transmitted to an application program, and calling a reading function after the preamble data packet is transmitted to the application program, and reading the service data from a kernel space and transmitting the service data to the application program in a user space.
For example, an agent may be implemented in the kernel space, after the kernel agent receives the sending data packet, acquires the retransmission identifier in the auxiliary data, determines whether the service data needs to be sent for confirmation, if not, the kernel agent throws a readable event to the application program, and after receiving the readable event, the application program calls a reading function to read the sending data packet received by the kernel agent and transmits the sending data packet to the application program; if the sending confirmation is needed, the kernel agent needs to judge whether the sending data packet needs to be transferred to the application program in order, if the sending data packet does not need to be transferred in order, the kernel agent can throw a readable event to the application program through a user-defined indication function, the application program calls a reading function to read the sending data packet received by the kernel agent after receiving the readable event, and if the data packet needs to be transferred to the application program in order, the kernel agent needs to determine that all preceding data packets with transfer sequence numbers before the sending data packet are notified to the application program through the indication function, and then the application program can be notified to read the sending data packet.
Example IV
Fig. 5 is a schematic structural diagram of a service data transmission device according to a fourth embodiment of the present invention, where the device is applied to a transmitting end. The service data transmission device provided by the embodiment of the invention can execute the service data transmission method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. The apparatus may be implemented by software and/or hardware, and specifically includes: a data acquisition module 410, a data transmission module 420, and a feedback processing module 430.
The data acquisition module 410 is configured to acquire service data of an application program and auxiliary data corresponding to the service data.
And the data sending module 420 is configured to send the service data based on the auxiliary data and the fair queue in kernel space.
And the feedback processing module 430 is configured to perform transmission confirmation and/or data retransmission according to the transmission situation of the service data.
According to the embodiment of the invention, the service data and the auxiliary data of the application program are sent through the fair queue in the kernel space, and the sending confirmation and/or the data retransmission are carried out according to the sending condition of the service data, so that the problems that the data is required to be copied between the kernel space and the user space of the application program during data transmission and the transmission efficiency is low are solved, the efficient transmission of the service data is realized, meanwhile, the sending confirmation and/or the data retransmission can be carried out according to the sending condition of different service data, the unnecessary data retransmission is reduced, the waiting time is shortened, and the high efficiency of the data transmission is improved.
Example five
Fig. 6 is a schematic structural diagram of a service data transmission device according to a fifth embodiment of the present invention, where the device is applied to a receiving end. The service data transmission device provided by the embodiment of the invention can execute the service data transmission method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method. The apparatus may be implemented by software and/or hardware, and specifically includes: a data extraction module 510, an information feedback module 520, and a data upload module 530.
The data extraction module 510 is configured to obtain service data in the transmission data packet and auxiliary data corresponding to the service data.
And the information feedback module 520 is configured to send feedback information corresponding to the service data according to the auxiliary data.
And the data uploading module 530 is configured to transfer the service data to the application program according to the auxiliary data.
According to the technical scheme, the service data and the auxiliary data corresponding to the service data are obtained by analyzing the obtained transmission data packet in the kernel space, and the feedback information and the transmission data are transmitted according to the auxiliary data, so that the problem of high time expenditure caused by the fact that the data packet needs to be copied between the kernel space and the user space in data transmission is solved, the calculation resources are saved under the condition that the reliable transmission of the data is ensured, and the data transmission efficiency is improved.
Example six
Fig. sixth is a schematic structural diagram of an apparatus according to a sixth embodiment of the present invention, as shown in fig. 7, the apparatus includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the device may be one or more, one processor 60 being taken as an example in fig. 7; the processor 60, the memory 61, the input means 62 and the output means 63 in the device may be connected by a bus or other means, in fig. 7 by way of example.
The memory 61 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as a program module corresponding to a service data transmission method in an embodiment of the present invention (for example, the data acquisition module 410, the data transmission module 420, and the feedback processing module 430 applied to a service data transmission device at a transmitting end, and the data extraction module 510, the information feedback module 520, and the data uploading module 530 applied to a service data transmission device at a receiving end). The processor 60 executes various functional applications of the device and data processing, i.e., implements the above-described service data transmission method, by running software programs, instructions and modules stored in the memory 61.
The memory 61 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, the memory 61 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, memory 61 may further comprise memory remotely located relative to processor 60, which may be connected to the device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 62 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output 63 may comprise a display device such as a display screen.
Example seven
The seventh embodiment of the present invention also provides a storage medium containing computer-executable instructions for performing a traffic data transmission method when executed by a computer processor.
When the executed service data transmission method is applied to a transmitting end, the method comprises the following steps:
acquiring service data of an application program and auxiliary data corresponding to the service data;
transmitting the service data based on the auxiliary data and a fair queue of kernel space;
and carrying out transmission confirmation and/or data retransmission according to the transmission condition of the service data.
When the executed service data transmission method is applied to a transmitting end, the method comprises the following steps:
acquiring service data in a transmission data packet and auxiliary data corresponding to the service data;
sending feedback information corresponding to the service data according to the auxiliary data;
and transmitting the service data to the application program according to the auxiliary data.
Of course, the storage medium containing the computer executable instructions provided in the embodiments of the present invention is not limited to the method operations described above, and may also perform the related operations in the service data transmission method provided in any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the service data transmission device, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (15)

1. The service data transmission method is characterized by being applied to a transmitting end and comprising the following steps:
acquiring service data of an application program and auxiliary data corresponding to the service data; wherein the auxiliary data comprises a retransmission identifier;
transmitting the service data based on the auxiliary data and a fair queue of kernel space, including: when the auxiliary data indicates that the service data can be retransmitted, the service data is sent through the fairness queue after the service data is stored in the kernel space;
and carrying out transmission confirmation and/or data retransmission according to the transmission condition of the service data.
2. The method according to claim 1, wherein the acquiring service data of the application program and auxiliary data corresponding to the service data includes:
acquiring service data transmitted by the application program writing function and auxiliary data corresponding to the service data;
and packaging the service data and the auxiliary data into a sending data packet and storing the sending data packet into a kernel space.
3. The method of claim 2, wherein the write function is generated by character device custom network interface nesting words.
4. The method of claim 2, wherein the sending the traffic data based on the assistance data and a kernel-space fair queue comprises:
determining whether the service data is subjected to data retransmission or not according to the retransmission identification in the auxiliary data;
if yes, storing the sending data packet corresponding to the service data into a retransmission list, and sending the sending data packet through a fair queue in the kernel space;
and if not, transmitting the transmission data packet corresponding to the service data through the fair queue in the kernel space.
5. The method according to claim 1 or 4, wherein said performing transmission acknowledgement and/or data retransmission according to the transmission situation of the service data comprises:
if the feedback information of the service data is acquired within the threshold time, the service data is confirmed to be sent;
and if the feedback information of the service data is not obtained within the threshold time, retransmitting the service data.
6. The method of claim 5, wherein the sending the service data if the feedback information of the service data is obtained within a threshold time comprises:
and in the threshold time after the service data is transmitted, monitoring the ACK data packet corresponding to the service data through the proxy of the kernel space, and deleting the transmission data packet corresponding to the service data in a retransmission list.
7. The method of claim 5, wherein retransmitting the service data if feedback information of the service data is not obtained within a threshold time, comprises:
monitoring an ACK data packet corresponding to the service data through a proxy of a kernel space within a threshold time after the service data is sent;
and if the ACK data packet is not monitored, acquiring a transmission data packet corresponding to the service data of a retransmission list for retransmission.
8. The service data transmission method is characterized by being applied to a receiving end and comprising the following steps:
acquiring service data in a transmission data packet and auxiliary data corresponding to the service data; wherein the auxiliary data comprises a retransmission identifier;
sending feedback information corresponding to the service data according to the auxiliary data;
transmitting the service data to an application program according to the auxiliary data;
and after receiving the sending data packet, the kernel proxy acquires a retransmission identifier in the auxiliary data to judge whether the service data needs to be sent for confirmation.
9. The method of claim 8, wherein the obtaining the service data in the transmission data packet and the auxiliary data corresponding to the service data comprises:
analyzing the sending data packet in the kernel space, and extracting service data and auxiliary data in the sending data packet.
10. The method of claim 9, wherein the sending feedback information corresponding to the service data according to the auxiliary data comprises:
and when the service data is determined to be transmitted and confirmed according to the retransmission identification in the auxiliary data, transmitting an ACK data packet corresponding to the service data.
11. The method according to any of claims 8-10, wherein said delivering traffic data to an application according to said assistance data comprises:
when the retransmission identification in the auxiliary data determines that the service data is not transmitted for confirmation, the service data is transmitted to an application program through a reading function of the application program;
and when the retransmission identification in the auxiliary data determines that the service data is transmitted and confirmed and the preamble data packet of the transmission data packet corresponding to the service data is transmitted to the application program, transmitting the service data to the application program through the reading function of the application program.
12. A service data transmission device, which is applied to a transmitting end, comprising:
the data acquisition module is used for acquiring service data of the application program and auxiliary data corresponding to the service data; wherein the auxiliary data comprises a retransmission identifier;
the data sending module is used for sending the service data based on the auxiliary data and the fair queue of the kernel space, and comprises the following steps: when the auxiliary data indicates that the service data can be retransmitted, the service data is sent through the fairness queue after the service data is stored in the kernel space;
and the feedback processing module is used for carrying out transmission confirmation and/or data retransmission according to the transmission condition of the service data.
13. A service data transmission device, which is applied to a receiving end, and comprises:
the data extraction module is used for acquiring service data in the sending data packet and auxiliary data corresponding to the service data; wherein the auxiliary data comprises a retransmission identifier;
the information feedback module is used for sending feedback information corresponding to the service data according to the auxiliary data;
the data uploading module is used for transmitting the service data to the application program according to the auxiliary data;
and after receiving the sending data packet, the kernel proxy acquires a retransmission identifier in the auxiliary data to judge whether the service data needs to be sent for confirmation.
14. An electronic device, the device comprising:
one or more processors;
a memory for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the traffic data transmission method according to any one of claims 1 to 11.
15. A computer readable storage medium having stored thereon a computer program, which when executed by a processor implements the service data transmission method according to any of claims 1-11.
CN202010223740.7A 2020-03-26 2020-03-26 Service data transmission method, device, equipment and storage medium Active CN111447046B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010223740.7A CN111447046B (en) 2020-03-26 2020-03-26 Service data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010223740.7A CN111447046B (en) 2020-03-26 2020-03-26 Service data transmission method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111447046A CN111447046A (en) 2020-07-24
CN111447046B true CN111447046B (en) 2023-04-25

Family

ID=71650795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010223740.7A Active CN111447046B (en) 2020-03-26 2020-03-26 Service data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111447046B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114500682B (en) * 2021-12-27 2023-08-08 天翼云科技有限公司 Data packet processing method and device and side equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996821A (en) * 2006-01-05 2007-07-11 上海原动力通信科技有限公司 A data transfer method based on the data re-transfer mechanism
CN101488906A (en) * 2008-01-14 2009-07-22 中兴通讯股份有限公司 Resource allocation method for real-time service transmission and real-time service transmission method
CN102098750A (en) * 2009-12-10 2011-06-15 中兴通讯股份有限公司 Service data transmission method and system
CN104753803A (en) * 2013-12-30 2015-07-01 中国移动通信集团公司 Data transmission method, device, equipment and system
CN107786308A (en) * 2017-09-26 2018-03-09 平安科技(深圳)有限公司 Data transmission method and terminal device

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101150485A (en) * 2007-11-15 2008-03-26 曙光信息产业(北京)有限公司 A management method for network data transmission of zero copy buffer queue
US8549537B2 (en) * 2008-01-10 2013-10-01 Industrial Technology Research Institute Middleware bridge system and method
CN101304373B (en) * 2008-06-25 2011-03-02 中兴通讯股份有限公司 Method and system for implementing high-efficiency transmission chunk data in LAN
CN101340574B (en) * 2008-08-04 2010-09-08 中兴通讯股份有限公司 Method and system realizing zero-copy transmission of stream media data
CN101702688B (en) * 2009-11-24 2012-01-04 武汉绿色网络信息服务有限责任公司 Data package transmit-receive method
CN102375789B (en) * 2010-08-09 2014-05-28 中标软件有限公司 Non-buffer zero-copy method of universal network card and zero-copy system
CN102156662A (en) * 2011-02-14 2011-08-17 大唐移动通信设备有限公司 Method and equipment for processing data
CN104717189A (en) * 2013-12-16 2015-06-17 中兴通讯股份有限公司 Network data package sending method and device
CN103945456B (en) * 2014-05-12 2017-06-27 武汉邮电科学研究院 A kind of efficient UDP message of LTE base station user plane based on linux system sends optimization method
WO2018032399A1 (en) * 2016-08-17 2018-02-22 Zte Corporation Server and method having high concurrency capability
CN107959555B (en) * 2017-10-25 2021-09-03 捷开通讯(深圳)有限公司 Data transmission method, device and storage medium based on LWAAP
CN108965161A (en) * 2018-06-11 2018-12-07 联想(北京)有限公司 Information processing method and electronic equipment
CN110753008A (en) * 2018-07-24 2020-02-04 普天信息技术有限公司 Network data processing device and method based on DPAA

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1996821A (en) * 2006-01-05 2007-07-11 上海原动力通信科技有限公司 A data transfer method based on the data re-transfer mechanism
CN101488906A (en) * 2008-01-14 2009-07-22 中兴通讯股份有限公司 Resource allocation method for real-time service transmission and real-time service transmission method
CN102098750A (en) * 2009-12-10 2011-06-15 中兴通讯股份有限公司 Service data transmission method and system
CN104753803A (en) * 2013-12-30 2015-07-01 中国移动通信集团公司 Data transmission method, device, equipment and system
CN107786308A (en) * 2017-09-26 2018-03-09 平安科技(深圳)有限公司 Data transmission method and terminal device

Also Published As

Publication number Publication date
CN111447046A (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN101189840B (en) Data unit relay device and method for controlling the same
US7249192B1 (en) Protocol for insuring exactly once semantics of transactions across an unordered, unreliable network
US9379852B2 (en) Packet recovery method, communication system, information processing device, and program
WO2017050216A1 (en) Packet transmission method and user equipment
CN101340268B (en) Implementing method and system for inter-node communication confirming mechanism
US20080049617A1 (en) System for fine grained flow-control concurrency to prevent excessive packet loss
EP1694025A1 (en) Addresable queue for communicating correlated messages over a network
CN104980257B (en) Internet of things communication method and device
RU2019130588A (en) METHOD OF DATA PROCESSING AND RELATED DEVICE
CN112769939B (en) Big data reliable transmission method for real-time communication
EP3525421A1 (en) Data transmission method and apparatus
CN111970092B (en) Multi-protocol redundant network asynchronous communication method supporting reliability adjustment
CN100442755C (en) Method for guaranteeing general route package channel transmission reliability
CN111447046B (en) Service data transmission method, device, equipment and storage medium
EP3672189B1 (en) Data transmission method, device and system
CN101145968B (en) Data transmission and receiving method between network management system and transmission device
CN107181657B (en) WTB link layer interface adapter and implementation method thereof
CN113132069A (en) Communication mechanism for packet loss retransmission and method for realizing same based on FPGA
CN105634692A (en) Data packet transmitting method and receiving method based on UDP protocol
CN116527205B (en) Data transmission method, device and storage medium
CN116760510B (en) Message sending method, message receiving method, device and equipment
CN116488712B (en) Non-real-time relay communication method based on improved store-and-forward protocol
CN111756482B (en) Acknowledgement feedback method, device and computer readable storage medium
CN111541736A (en) Database stream copying method and device
CN117335931A (en) Data retransmission method, device and readable storage medium

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
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20231010

Address after: 31a, 15 / F, building 30, maple mall, bangrang Road, Brazil, Singapore

Patentee after: Baiguoyuan Technology (Singapore) Co.,Ltd.

Address before: 5-13 / F, West Tower, building C, 274 Xingtai Road, Shiqiao street, Panyu District, Guangzhou, Guangdong 510000

Patentee before: GUANGZHOU BAIGUOYUAN INFORMATION TECHNOLOGY Co.,Ltd.