A data transmission method, system and storage medium
By generating a list of answers to be answered based on the priority of the data packets in the data transmission system, calculating garbled values based on the data packets of the answered list, and calling corresponding adjustment methods, problems such as disordered order and packet loss in data transmission are solved, and the problems of improvement are improved Reliability and detection efficiency of data transmission.
Patent Information
- Application Number
- CN202410834968.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-06-26
AI Technical Summary
In broadcast transmission systems, detection problems such as out of order and packet loss are common during data transmission, which affects the reliability of data transmission, and the prior art is inefficient when detecting all transmitted data.
By obtaining the packet sending list and generating a list of to be answered, the target packet is sent according to the priority of the packet to be sent, and migrating it to the answered list. Calculate the data transmission garbled value based on the answered packets in the answered list. If the out of order or the packet loss rate exceeds the threshold, the corresponding adjustment method will be called to replenish the packet or strictly control the transmission of the data packet.
The reliability of data transmission is improved, and the detection efficiency is improved by setting the priority of data packets to be sent, and detection problems such as out of order and packet loss are solved.
Smart Images

Figure CN118590189B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of digital information transmission, and in particular to a data transmission method, system and storage medium. Background Art
[0002] In the broadcast transmission system, a large amount of data is transmitted between acoustic-related equipment and the server. In the data transmission process, there are common detection problems such as disorder and packet loss, which affect the reliability of data transmission. If all transmitted data is detected, there is a problem of low detection efficiency. Summary of the invention
[0003] In order to solve the above technical problems, the purpose of the present invention is to provide a data transmission method, comprising the following steps: obtaining a data packet sending list, the sending list including data packets to be sent; generating a pending reply list according to the priority of the data packets to be sent, the pending reply list including a target data packet; sending the target data packet, and migrating the target data packet to an replied list, determining whether a confirmation reception information for the target data packet is received, if so, recording the target data packet as a first replied data packet, if not, recording the target data packet as a second replied data packet; generating a data transmission garbled value according to the replied data packets in the replied list, calling a corresponding adjustment method according to the data transmission garbled value, the replied data packets including the first replied data packet and the second replied data packet.
[0004] Furthermore, the data transmission garbled value includes a packet loss rate and a disorder rate, and generating the data transmission garbled value based on the acknowledged data packets in the acknowledged list specifically includes: obtaining the ratio of the number of the second acknowledged data packets to the number of the acknowledged data packets to obtain the packet loss rate; obtaining the ratio of the number of disordered data packets in the first acknowledged data packet to the number of the acknowledged data packets to obtain the disorder rate.
[0005] Furthermore, calling a corresponding adjustment method according to the data transmission garbled value specifically includes: when the packet loss rate exceeds a first threshold, performing packet replenishment according to the number of packet replenishment times generated by the packet loss rate; when the disorder rate exceeds a second threshold, determining the program for sending the target data packet as a strict control program.
[0006] Furthermore, the time interval for performing packet replenishment is set to a local delay mean, and the local delay mean is a delay mean of a plurality of the first acknowledged data packets.
[0007] Furthermore, the sending of the target data packet and migrating the target data packet to an acknowledged list, determining whether confirmation reception information for the target data packet feedback is received, and if so, recording the target data packet as a first acknowledged data packet, and if not, recording the target data packet as a second acknowledged data packet, specifically includes: sending the target data packet and migrating the target data packet to an acknowledged list, determining whether confirmation reception information for the target data packet feedback is received within a first time interval, and if so, recording the target data packet as a first acknowledged data packet, and if not, recording the target data packet as a second acknowledged data packet, and the first time interval is set to twice the local delay mean.
[0008] Furthermore, the strict control procedure specifically includes: sending the next target data packet when receiving a confirmation reception message fed back for the previous target data packet.
[0009] Furthermore, obtaining the ratio of the number of out-of-order data packets in the first acknowledged data packet to the number of acknowledged data packets to obtain the out-of-order rate specifically includes: judging whether the first acknowledged data packet is out-of-order based on the data packet sequence index of the first acknowledged data packet, and if so, the first acknowledged data packet is an out-of-order data packet.
[0010] The second object of the present invention is to provide a data transmission system, comprising: a priority division unit, used to generate a to-be-answered list according to the priority of the data packet to be sent, wherein the to-be-answered list includes the target data packet; a sending unit, used to obtain a data packet sending list, wherein the data packet sending list includes the to-be-sent data packet; used to send the target data packet and migrate the target data packet to an answered list; a judgment unit, used to judge whether a confirmation reception information fed back for the target data packet is received, and if so, the target data packet is recorded as a first answered data packet, and if not, the target data packet is recorded as a second answered data packet; a data transmission garbled value generation unit, used to generate a data transmission garbled value according to the answered data packets in the answered list, wherein the answered data packets include the first answered data packet and the second answered data packet; an adjustment unit, used to call a corresponding adjustment method according to the data transmission garbled value.
[0011] The third object of the present invention is to provide a computer storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above-mentioned data transmission method when executed by a processor.
[0012] Compared with the prior art, the invention has the following beneficial effects:
[0013] The present invention provides a data transmission method, which generates a to-be-answered list according to the priority of a data packet to be sent, wherein the to-be-answered list includes a target data packet, sends the target data packet, and migrates the target data packet to an answered list, calculates a data transmission garbled value according to the answered data packet in the answered list, and calls a corresponding adjustment method according to the data transmission garbled value, thereby solving the detection problems of disorder, packet loss, etc. in the data transmission process, increasing the reliability of data transmission, and improving the detection efficiency by setting the priority of the data packet to be sent. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 is a flow chart of a data transmission method provided by an embodiment of the present invention;
[0015] Figure 2 This is a data transmission mode for a data packet with a high priority provided by an embodiment of the present invention;
[0016] Figure 3 This is the data transmission mode for low-priority data packets provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0018] like Figure 1 As shown, an embodiment of the present invention provides a data transmission method, comprising the following steps:
[0019] Step S1: Obtain a data packet sending list, wherein the sending list includes data packets to be sent; generate a pending reply list according to the priority of the data packets to be sent, wherein the pending reply list includes a target data packet.
[0020] In an embodiment of the present invention, the same target data packet is synchronously stored in the sending list and the waiting list. The waiting list is used to count whether the confirmation reception information fed back for the target data packet has been received. The waiting list is generated according to the priority of the data packet to be sent. In an embodiment of the present invention, according to the priority of the data packet to be sent, it is divided into high-priority data packets and low-priority data packets. For a data packet with a high priority, it is a target data packet and needs to be synchronously stored in the waiting list for subsequent statistical calculation of detection parameters such as packet loss rate, disorder rate, and local delay mean. For a data packet with a low priority, it does not need to be stored in the waiting list. After the sending list sends the data packet, it is not necessary to receive confirmation reception information, and it is not necessary to calculate its packet loss rate, disorder rate, and local delay mean. By prioritizing the data packets to be sent, parameter detection is only performed on the data packets with high priority, thereby improving the detection efficiency.
[0021] In an embodiment of the present invention, the priority of the data packet to be sent can be represented by setting different numbers in the flag field in the data packet structure. In the data packet to be sent, the developer manually sets the flag value according to the priority of the data packet. For example, for a data packet with a high priority, its flag is set to 1, and for a data packet with a low priority, its flag is set to 0. The target data packet with the flag set to 1 in the data packet to be sent is synchronously stored in the waiting response list.
[0022] For example, Figure 2 As shown, for the target data packet in the waiting list, after the sending end sends the target data packet (flag is set to 1), the receiving end feeds back confirmation reception information for the target data packet. Among them, the flag in the confirmation reception information is set to 2.
[0023] For example, Figure 3 As shown, for a data packet with a low priority (flag is set to 0), after the sending end sends the data packet, the receiving end does not need to send a confirmation receipt message.
[0024] In an embodiment of the present invention, the sending end stores the target data packet in a list to be responded to, specifically including: integrating the target data packet into a valid data packet (payload), initializing it as trusted data (Reliable Data), and using the terminal unique identifier as the first key value and the protocol identification code as the second key value, and storing the trusted data in the list to be responded to.
[0025] Step S3: Send the target data packet and migrate the target data packet to the acknowledged list, determine whether a confirmation reception information for the target data packet feedback is received, if so, record the target data packet as the first acknowledged data packet, if not, record the target data packet as the second acknowledged data packet.
[0026] In the embodiment of the present invention, the sending list sends the target data packet, and the waiting list moves the target data packet out to the acknowledged list, and the two are considered to be completed synchronously. The acknowledged list is used to calculate the packet loss rate, local delay mean, and disorder rate.
[0027] Step S5: Generate a data transmission garbled value according to the acknowledged data packets in the acknowledged list, and call a corresponding adjustment method according to the data transmission garbled value. The acknowledged data packets include the first acknowledged data packet and the second acknowledged data packet.
[0028] In the embodiment of the present invention, the data transmission garbled value includes a packet loss rate and a disorder rate. The acknowledged data packet includes both a first acknowledged data packet for which a confirmation receipt message has been received and a second acknowledged data packet that is considered as a packet loss. The number of acknowledged data packets is the sum of the number of first acknowledged data packets and the number of second acknowledged data packets.
[0029] In some embodiments, a data transmission garbled value is generated based on the acknowledged data packets in the acknowledged list, specifically including: obtaining the ratio of the number of second acknowledged data packets to the number of acknowledged data packets to obtain the packet loss rate; obtaining the ratio of the number of out-of-order data packets in the first acknowledged data packet to the number of acknowledged data packets to obtain the out-of-order rate.
[0030] In some embodiments, a corresponding adjustment method is called according to the data transmission garbled value, specifically including: when the packet loss rate exceeds a first threshold, packet replenishment is performed according to the number of packet replenishment times generated by the packet loss rate; when the disorder rate exceeds a second threshold, the program sending the target data packet is determined as a strict control program.
[0031] In an embodiment of the present invention, the data packet sending list and the waiting response list are updated according to the number of packet replenishment times. The number of packet replenishment times is dynamically adjusted according to the packet loss rate, wherein the calculation formula of the number of packet replenishment times is:
[0032] AP=LPP×MP+1
[0033] Among them, AP represents the number of packet replenishment times, LPP represents the packet loss rate, and MP represents the maximum number of packet replenishment times.
[0034] The maximum number of packet replenishment is the maximum number of times the same data packet is sent. It can be set according to the actual situation and is generally set to 5. For example, if the packet loss rate is 50%, the maximum number of packet replenishment is set to 2, and the number of packet replenishment is 3, that is, by sending the same data packet 3 times, packet loss can be avoided.
[0035] In the embodiment of the present invention, for the data packets that have been lost, no packet replenishment is performed. When the packet loss rate exceeds the first threshold, packet replenishment is required. The principle of packet replenishment is: the packet loss rate is used to calculate how many times the sender needs to send the same data packet before it can be delivered to the receiver.
[0036] In some embodiments, the time interval for performing packet replenishment is set to the local delay average, and the local delay average is the delay average of multiple first acknowledged data packets. Delay refers to the time length of the data packet from the sender to the receiver and from the receiver back to the sender. When the packet loss rate is greater than the first threshold, packet replenishment will be performed within the time interval of the local delay average.
[0037] In the embodiment of the present invention, the target data packet is moved from the waiting list to the answered list, and its flag is set as the packet loss flag. In the answered list, the packet loss rate is obtained by calculating the ratio of the number of packet loss flags to the number of answered data packets.
[0038] In some embodiments, a target data packet is sent and migrated to an acknowledged list, and it is determined whether confirmation receipt information for the target data packet feedback is received within a first time interval. If so, the target data packet is recorded as the first acknowledged data packet. If not, the target data packet is recorded as the second acknowledged data packet. The first time interval is set to twice the local delay average.
[0039] In some embodiments, the strict control procedure specifically includes: sending the next target data packet upon receiving a confirmation reception message fed back for the previous target data packet.
[0040] A strict control procedure is used to ensure that the order in which confirmation reception information for target data packets is received is consistent with the order in which the target data packets are sent, thereby solving the problem of disorder during data transmission.
[0041] In some embodiments, the ratio of the number of out-of-order data packets in the first acknowledged data packet to the number of acknowledged data packets is obtained to obtain the out-of-order rate, which specifically includes: judging whether the first acknowledged data packet is out-of-order based on the data packet sequence index of the first acknowledged data packet, and if so, the first acknowledged data packet is an out-of-order data packet.
[0042] In some embodiments, the calculation formula for the number of out-of-order packets is:
[0043]
[0044] in, represents the number of out-of-order packets among K acknowledged packets, O(k) represents the out-of-order value of the kth acknowledged packet, Index k Indicates the packet sequence index of the kth acknowledged packet.
[0045] If the out-of-order value of the acknowledged data packet is 0, it indicates that the acknowledged data packet is a non-out-of-order data packet. If the out-of-order value of the acknowledged data packet is 1, it indicates that the acknowledged data packet is an out-of-order data packet.
[0046] The data packets to be sent in the data packet sending list are sent in sequence according to the data packet order index. The acknowledged list stores acknowledged data packets in sequence in the form of a linear linked list, and the data packet order index Index can be used to k To determine whether the acknowledged data packets are out of order.
[0047] In the embodiment of the present invention, if it is detected that the disorder rate of the target terminal exceeds the second threshold, the target data packets are divided into specific containers in the sending list, and the data packets are sent according to a strict control procedure.
[0048] In an embodiment of the present invention, the first time interval is used to determine whether a target data packet in the to-be-answered list has been lost, and a target data packet whose period exceeds the first time interval is deemed to have been lost. The period of the target data packet refers to the time interval between the latest timestamp and the timestamp stored in the to-be-answered list. The second time interval is used to determine whether a responded data packet in the responded list is valid data, and a responded data packet whose period exceeds the second time interval is deemed to be invalid data, wherein valid data is used to calculate parameters such as packet loss rate, disorder rate, and local delay mean. The period of the responded data packet refers to the time interval between the latest timestamp and the timestamp stored in the responded list. The third time interval is used to determine whether a target data packet in the to-be-answered list is within the life cycle, and when the period of the target data packet is less than the third time interval, the target data packet is still within the life cycle, and is used to make a judgment when traversing the to-be-answered list.
[0049] In an embodiment of the present invention, the second time interval is set to 30 minutes. In the answered list, the answered data packets within the second time interval are valid data, and the above-mentioned calculations of packet loss rate, disorder rate and local delay mean are all statistically calculated within the valid data range. For example, the local mean delay refers to the delay mean of multiple first answered data packets within the second time interval. The packet loss rate refers to the ratio of the number of multiple second answered data packets within the second time interval to the total number of answered data packets. The disorder rate refers to the ratio of the number of disordered data packets in the first answered data packets within the second time interval to the total number of answered data packets.
[0050] In some embodiments, when traversing the pending response list, a timeout judgment is made on the period of the target data packet based on the latest timestamp of the target data packet: if the period of the target data packet is within a third time interval, it means that the data packet is still within its survival period, and the current traversal skips the target data packet; if the period of the target data packet exceeds the first time interval, the target data packet is deemed to have been lost, and the target data packet is migrated to the acknowledged list, and its flag is set to a packet loss flag; if the period of the target data packet is between the first time interval and the third time interval, and when the packet loss rate exceeds a first threshold, the pending response list and the sending list are supplemented.
[0051] In some embodiments, when traversing the acknowledged list, multiple acknowledged data packets constitute local data, and the period of the local data is timed out according to the latest timestamp of the local data: if the period of the local data exceeds the second time interval, the local data is invalid data; if the period of the local data is within the second time interval, the local data is valid local data, and the valid local data is used to calculate the packet loss rate, disorder rate, local delay mean, etc. For example, the local delay mean is the delay mean of the valid local data.
[0052] In some embodiments, the server is the sending end and the device is the receiving end. The server sends a request to the device to turn on the device sound card (flag is set to 0). After receiving the request, the device does not need to send an additional confirmation message to the server.
[0053] In some embodiments, the server (sender) requests the device (receiver) to turn on the device sound card. In the request sent, the flag is set to 1, which indicates that the device needs to send a confirmation message to the server after receiving the request. In the confirmation message, the flag is set to 2. After the server receives the confirmation message sent by the device, the target data packet in the waiting list is moved to the answered list.
[0054] In some embodiments, in the IP broadcast system, the sending end may be a server or an acoustic-related device, and the receiving end may be a server or an acoustic-related device.
[0055] In some embodiments, the pending response list and the answered list are stored in a dictionary table format, using the terminal unique identifier as the dictionary key. The core storage content of the pending response list includes: protocol identification code, used to distinguish protocol categories; data packet sequence index, used to determine whether the data packet is out of order; timestamp record point, used to determine timeout; payload valid data transmission. The core storage content of the answered list includes: data packet sequence index; timestamp record point.
[0056] In some embodiments, in a broadcast system, for example, according to the normal process, the terminal needs to be initialized first, that is, the terminal sound card acquisition is turned off, and then the terminal service is enabled, that is, the terminal sound card acquisition is turned on. Due to factors such as fluctuations in the data transmission process, the protocol for turning on the terminal sound card acquisition arrives at the server first, and the protocol for turning off the terminal sound card acquisition is lost, causing the server to send the protocol for turning off the terminal sound card acquisition to the target device, resulting in an instruction error. The embodiment of the present invention uses a conflict protocol table to solve such problems. The conflict protocol table refers to classifying and storing conflict protocols in the form of a linked list containing a dictionary. Conflicting protocols include {turn on the sound card, turn off the sound card}, {set display content, clear display content}, etc. When the sending end stores the target data packet in the pending response list, it will query the content in the conflict protocol table at the same time. If the relevant conflict protocol content is found, the corresponding target data packet in the pending response list needs to be cleared, and then the preset instruction is written into the pending response list.
[0057] In summary, the present invention provides a data transmission method, which generates a pending reply list according to the priority of a data packet to be sent, the pending reply list includes a target data packet, sends the target data packet, and migrates the target data packet to an answered list, calculates a data transmission garbled value according to the answered data packet in the answered list, and calls a corresponding adjustment method according to the data transmission garbled value, solves the detection problems such as disorder and packet loss in the data transmission process, increases the reliability of data transmission, and improves the detection efficiency by setting the priority of the data packet to be sent.
[0058] According to a second aspect of an embodiment of the present invention, a data transmission system is provided, comprising: a priority division unit, for generating a to-be-acknowledged list according to the priority of a data packet to be sent, wherein the to-be-acknowledged list includes a target data packet; a sending unit, for obtaining a data packet sending list, wherein the data packet sending list includes the data packet to be sent; for sending the target data packet and migrating the target data packet to an acknowledged list; a judgment unit, for judging whether a confirmation reception information is received for the target data packet, and if so, recording the target data packet as a first acknowledged data packet, and if not, recording the target data packet as a second acknowledged data packet; a data transmission garbled value generation unit, for generating a data transmission garbled value according to the acknowledged data packets in the acknowledged list, wherein the acknowledged data packets include the first acknowledged data packet and the second acknowledged data packet; and an adjustment unit, for calling a corresponding adjustment method according to the data transmission garbled value.
[0059] According to a third aspect of an embodiment of the present invention, a computer storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned data transmission methods are implemented.
[0060] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and substitutions can be made without departing from the technical principles of the present invention. These improvements and substitutions should also be regarded as the scope of protection of the present invention.
Claims
1. A data transmission method, characterized in that: The steps include: Obtain a data packet sending list, wherein the sending list contains data packets to be sent; Generate a pending reply list according to the priority of the data packet to be sent, wherein the pending reply list includes a target data packet; Send the target data packet, and migrate the target data packet to the acknowledged list, determine whether a confirmation reception information for the target data packet is received within a first time interval, if so, record the target data packet as a first acknowledged data packet, if not, record the target data packet as a second acknowledged data packet; Generate a data transmission garbled value according to the acknowledged data packets in the acknowledged list, wherein the acknowledged data packets include the first acknowledged data packet and the second acknowledged data packet, and the data transmission garbled value includes a packet loss rate and a disorder rate; Calling a corresponding adjustment method according to the data transmission garbled value specifically includes: when the packet loss rate exceeds a first threshold, performing packet replenishment according to the number of packet replenishment times generated by the packet loss rate; When the disorder rate exceeds a second threshold, the program for sending the target data packet is determined as a strict control program.
2. The data transmission method according to claim 1, characterized in that: The generating of the data transmission garbled value according to the answered data packets in the answered list specifically includes: Obtaining the ratio of the second number of acknowledged data packets to the number of acknowledged data packets to obtain the packet loss rate; The ratio of the number of out-of-order data packets in the first acknowledged data packet to the number of acknowledged data packets is obtained to obtain the out-of-order rate.
3. The data transmission method according to claim 2, characterized in that: The obtaining of the ratio of the number of out-of-order data packets in the first acknowledged data packet to the number of acknowledged data packets to obtain the out-of-order rate specifically includes: According to the data packet sequence index of the first acknowledged data packet, it is determined whether the first acknowledged data packet is out of sequence; if so, the first acknowledged data packet is an out of sequence data packet.
4. The data transmission method according to claim 1, characterized in that: The time interval for performing packet replenishment is set to a local delay average, and the local delay average is a delay average of multiple first acknowledged data packets.
5. The data transmission method according to claim 4, characterized in that: The first time interval is set to be twice the local delay average.
6. The data transmission method according to claim 1, characterized in that: The strict control procedure specifically includes: sending the next target data packet when receiving a confirmation reception message fed back for the previous target data packet.
7. A data transmission system, used to implement the data transmission method according to any one of claims 1 to 6, characterized in that: include: A priority division unit, used for generating a to-be-answered list according to the priority of the data packet to be sent, wherein the to-be-answered list includes the target data packet; A sending unit, used for acquiring a data packet sending list, wherein the data packet sending list includes the data packet to be sent; Used to send the target data packet and migrate the target data packet to the answered list; A determination unit, configured to determine whether a confirmation receipt information fed back for the target data packet is received, and if so, record the target data packet as a first acknowledged data packet; if not, record the target data packet as a second acknowledged data packet; a data transmission garbled value generating unit, which generates a data transmission garbled value according to the acknowledged data packets in the acknowledged list, wherein the acknowledged data packets include the first acknowledged data packet and the second acknowledged data packet; The adjustment unit is used to call a corresponding adjustment method according to the data transmission garbled value.
8. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and system of data retransmission
CN102843223A
Data transmission method and device
CN112713967A