CN117596219A - Data transmission method, device, equipment and storage medium - Google Patents

Data transmission method, device, equipment and storage medium Download PDF

Info

Publication number
CN117596219A
CN117596219A CN202311628852.0A CN202311628852A CN117596219A CN 117596219 A CN117596219 A CN 117596219A CN 202311628852 A CN202311628852 A CN 202311628852A CN 117596219 A CN117596219 A CN 117596219A
Authority
CN
China
Prior art keywords
transmission
data
time
time point
information
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.)
Pending
Application number
CN202311628852.0A
Other languages
Chinese (zh)
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.)
Asmet Chengdu Technology Co ltd
Smart Dust Shanghai Communication Technology Co ltd
Original Assignee
Asmet Chengdu Technology Co ltd
Smart Dust Shanghai Communication 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 Asmet Chengdu Technology Co ltd, Smart Dust Shanghai Communication Technology Co ltd filed Critical Asmet Chengdu Technology Co ltd
Priority to CN202311628852.0A priority Critical patent/CN117596219A/en
Publication of CN117596219A publication Critical patent/CN117596219A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/30Flow control; Congestion control in combination with information about buffer occupancy at either end or at transit nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • H04L43/087Jitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a data transmission method, a device, equipment and a storage medium, wherein the method applied to a receiving side comprises the following steps: acquiring and analyzing a plurality of data packets sent by a sending side, and sequentially caching the analyzed time information and data information; determining a transmission time point of each data message according to all the time messages; and when the local time reaches any transmission time point, controlling the transmission of the corresponding data information. The method applied to the transmitting side comprises the following steps: and recording the time point of the data information to be transmitted currently as the sending time, and combining the preset expected transmission delay amount and the data information to be transmitted to form a data packet to be transmitted. The invention solves the technical problems that the transmission jitter cannot be completely eliminated and the arrival time of the data packet cannot be accurately controlled in the prior art, reduces or even eliminates the delay jitter caused by a transmission network by utilizing the buffer of the receiving side, achieves the purpose of accurately controlling the transmission time of the data packet, and improves the accuracy of data transmission.

Description

Data transmission method, device, equipment and storage medium
Technical Field
The present invention relates to the field of wireless communications technologies, and in particular, to a method, an apparatus, a device, and a storage medium for data transmission.
Background
In some special scene network scenes, the certainty of the transmission delay of the data is definitely required. With the rise of wireless internet, 5G, industrial internet of things (IIoT) and industry 4.0, some specific scenes and services put higher demands on network delay jitter.
Currently, in the prior art, the time for data transmission is determined based on the timestamp of the transmitting side carried by the data packet and the estimated maximum delay of each network node, so that the transmitting time can only be a fixed delay value, which results in the delay value being equal to the estimated maximum transmission delay, and the precision of each network node and equipment can affect the time precision of the final receiving side receiving the data packet. Based on this, it is also disclosed that the priority of the network node device for sending the data corresponding to the data packet is scheduled by the time stamp information of the data packet and the time delay jitter information of all the network node devices, so that the corresponding sending time is avoided to be calculated by the maximum transmission time delay, but the time delay jitter is only reduced as much as possible, the accurate time delay or time point of the data packet reaching the receiving side device cannot be ensured, and the accuracy of the jitter information also depends on the clock accuracy of the whole network node device. In addition, it is also disclosed to convert non-periodic transmission data into periodic transmission data, so as to ensure that the time interval between each data packet is a fixed value to eliminate the jitter of transmission delay, but the time interval of data transmission is easy to be longer in a multi-control scenario, and meanwhile, the precision of the method depends on the timing recovery precision of the TSN network, so that the method is not suitable for the scenario of the non-TSN network.
Therefore, there is a need for a method for eliminating transmission jitter and precisely controlling the arrival time of data packets.
Disclosure of Invention
The invention provides a data transmission method, a device, equipment and a storage medium, which are used for solving the technical problems that transmission jitter cannot be completely eliminated and the arrival time of a data packet cannot be accurately controlled in the prior art.
In order to solve the above technical problems, an embodiment of the present invention provides a data transmission method, applied to a receiving side, including:
acquiring and analyzing a plurality of data packets sent by a sending side, and sequentially caching the analyzed time information and data information; wherein each data packet comprises time information and data information;
determining a transmission time point of each data message according to all the time messages;
and when the local time reaches any transmission time point, controlling the transmission of the corresponding data information.
Preferably, the determining a transmission time point of each data information according to all the time information includes:
according to the sending time and the expected transmission delay amount of each data packet, calculating the transmission time point of the data information in each data packet in turn; wherein the time information includes an issue time and a transmission expected delay amount corresponding to the data packet.
Preferably, the calculation formula for calculating the transmission time point of the data information in each data packet is as follows:
T exp,n =T n +D n
wherein T is exp,n T is the transmission time point of the data information in the nth data packet n For the time of issuance of the nth packet, D n An amount of delay is expected for the transmission of the nth packet.
Preferably, the method further comprises:
judging whether the transmission expected time delay amount of the current acquired data packet is a preset value or not;
if the transmission expected delay amount of the current acquired data packet is a preset value, recording a first receiving time point of the current acquired data packet, filling the first receiving time point into a field of the transmission expected delay amount, and returning the field as a response message to the transmitting side.
Preferably, when the local time reaches any transmission time point, controlling transmission of the corresponding data information includes:
determining current data information to be controlled, acquiring current first local time in real time, and judging whether the first local time reaches a transmission time point corresponding to the current data information to be controlled; the control sequence of the data information is determined by the sequence of data packet acquisition, and the transmission time point of each data information corresponds to the control sequence;
When the first local time reaches the transmission time point, reading and outputting data information corresponding to the transmission time point;
and waiting for the current first local time to reach the transmission time point when the first local time is earlier than the expected transmission time point.
Preferably, after the determining the data information to be controlled currently, the method further includes:
judging overtime of the current data information to be controlled, thereby acquiring the current second local time in real time, and comparing the second local time with a transmission time point corresponding to the current data information to be controlled;
and outputting a data packet transmission overtime signaling corresponding to the current data information to be controlled when the second local time exceeds the transmission time point corresponding to the current data information to be controlled.
Preferably, the first local time and the second local time are acquired by a GNSS clock of the receiving side.
Correspondingly, the invention also provides a data transmission method which is applied to the transmitting side and comprises the following steps:
transmitting a number of data packets to a receiving side to cause the receiving side to perform the method of data transmission as described in any one of the above.
Preferably, before the transmitting of the plurality of data packets to the receiving side, the method further includes:
And recording the time point of the data information to be transmitted currently as the sending time, and combining the preset expected transmission delay amount and the data information to be transmitted to form a data packet to be transmitted.
As a preferred solution, the method for measuring the preset expected transmission delay includes:
filling a preset expected transmission delay amount in a data packet to be sent to a preset value, so that a receiving side records a first receiving time point of the currently acquired data packet, fills the first receiving time point into a field of the expected transmission delay amount, and returns the field as a response message to a sending side;
receiving a response message returned from a receiving side, recording a second receiving time point when the response message is received, and analyzing the response message to obtain a first receiving time point;
calculating a first transmission delay amount according to the sending time and the first receiving time point, and calculating a second transmission delay amount according to the first receiving time point and the second receiving time point;
and determining a transmission expected time delay amount according to the first transmission time delay amount and the second transmission time delay amount.
Preferably, the method further comprises:
repeating the step of measuring the preset expected transmission delay amount, thereby obtaining a plurality of expected transmission delay amounts;
And determining the final transmission expected delay amount according to the obtained multiple transmission expected delay amounts.
Preferably, the sending time and the second receiving time point are acquired by a GNSS clock of the sending side.
Correspondingly, the invention also provides a data transmission device which is arranged at the receiving side and comprises:
the receiving module is used for acquiring and analyzing a plurality of data packets sent by the sending side, and sequentially caching the analyzed time information and the analyzed data information; wherein each data packet comprises time information and data information;
the timing module is used for determining the transmission time point of each data message according to all the time messages;
and the control module is used for controlling the transmission of the corresponding data information when the local time reaches any transmission time point.
Correspondingly, the invention also provides a data transmission device which is arranged at the transmitting side and comprises:
the combination module is used for recording the time point of the data information to be sent currently as the sending time, combining the preset expected transmission delay amount and the data information to be sent to form a data packet to be sent;
a transmitting module, configured to transmit a number of data packets to a receiving side, so that the receiving side performs the method for data transmission according to any one of the above.
Accordingly, the present invention also provides a network device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, where the processor implements the method for data transmission applied to a receiving side as set forth in any one of the above, or implements the method for data transmission applied to a transmitting side as set forth in any one of the above when executing the computer program.
Correspondingly, the invention further provides a computer readable storage medium, which comprises a stored computer program, wherein the computer program controls a device where the computer readable storage medium is located to implement the method applied to the data transmission of the receiving side or the method applied to the data transmission of the transmitting side according to any one of the above when running.
Compared with the prior art, the embodiment of the invention has the following beneficial effects:
according to the technical scheme, the receiving side analyzes the data packets sent by the sending side, so that the analyzed time information and the data information are cached, the receiving side analyzes the transmission time point corresponding to each data information, and the reading time of the data cache is controlled through the local time of the receiving side and the analyzed time information, so that the time delay jitter caused by a transmission network is reduced or even eliminated by utilizing the cache of the receiving side, the purpose of precisely controlling the data packet transmission time is achieved, and the accuracy of data transmission is improved.
Furthermore, by adding time information in each data packet by the transmitting side, the time information carries the current sending time of the transmitting side and the expected transmission delay amount of the data packet, so as to realize controllable data delay, and meanwhile, according to the time information transmitted by the transmitting side, different delay effects such as reaching of the data packet in equal period, reaching of the data packet at the same time and reaching of the data packet at a designated time point can be achieved, and the controllability of data transmission and the accuracy of arrival time control can be further improved.
Drawings
Fig. 1: the method for transmitting the data comprises the following steps of a flow chart of the method for transmitting the data;
fig. 2: the embodiment of the invention provides a schematic structure diagram of a data packet;
fig. 3: the processing schematic diagram of the receiving side provided by the embodiment of the invention;
fig. 4: the processing flow chart of the receiving side provided by the embodiment of the invention;
fig. 5: the method for transmitting the data comprises the following steps of a flow chart of the method for transmitting the data;
fig. 6: the data transmission device provided by the embodiment of the invention is provided with a structure diagram of the data transmission device arranged at the receiving side;
fig. 7: the embodiment of the invention provides a structure diagram of a data transmission device arranged at a transmitting side;
Fig. 8: schematic diagrams of GNSS clock injection transmitting equipment and receiving equipment are provided for the embodiment of the invention;
fig. 9: schematic diagrams of a head node and a tail node are injected into a GNSS clock provided by the embodiment of the invention;
fig. 10: the embodiment of the invention provides a schematic diagram of a GNSS clock injection time synchronization server.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1, a data transmission method provided in an embodiment of the present invention is applied to a receiving side, and includes the following steps S101 to S103:
step S101: acquiring and analyzing a plurality of data packets sent by a sending side, and sequentially caching the analyzed time information and data information; wherein each data packet includes time information and data information.
It should be noted that, referring to fig. 2, the transmitting side adds a field of time information in each data packet, where the time information carries the current transmission time (time stamp) of the transmitting side and the Expected transmission Delay amount (Expected Delay) of the data packet, so that the data information (Payload) is combined into a complete data packet.
In this embodiment, the plurality of data packets sent by the sending side may be sent periodically or aperiodically, so that the receiving side sequentially analyzes the data packets sent by the sending side, and caches time information and data information obtained after analysis.
It should be noted that the receiving side mainly includes a parser, a Timer, a buffer and a processor. The parser is used for inputting and parsing the data packet, namely, after a plurality of data packets sent by the sending side are acquired, parsing is performed, so that time information and data information obtained by sequentially parsing are cached in the buffer.
Step S102: and determining the transmission time point of each data message according to all the time messages.
As a preferred aspect of this embodiment, the determining, according to all the time information, a transmission time point of each data information includes:
According to the sending time and the expected transmission delay amount of each data packet, calculating the transmission time point of the data information in each data packet in turn; wherein the time information includes an issue time and a transmission expected delay amount corresponding to the data packet.
In this embodiment, the sending time and the expected transmission delay amount in each data packet are used to calculate the data information in each data packet, so that the sending transmission time point needs to be read.
Further, since the sending of the data packet is real-time, the data packet received by the receiving side is also obtained in real time, that is, after each time a data packet is received by the receiving side, the received data packet is parsed by the parser, and then the time information and the data information obtained after the parsing are stored in the buffer, so that the time information and the data information in the buffer are sequentially buffered according to the time sequence of the read data packet, instead of buffering after all the data packets are received at one time.
Preferably, the parser is simultaneously able to parse the issue time T in the corresponding time information n And D n And calculating the transmission time point so that the obtained transmission time point is obtained after the time information is analyzed in the buffer.
As a preferred solution of this embodiment, the calculation formula for calculating the transmission time point of the data information in each data packet is as follows:
T exp,n =T n +D n
wherein T is exp,n T is the transmission time point of the data information in the nth data packet n For the time of issuance of the nth packet, D n An amount of delay is expected for the transmission of the nth packet.
In this embodiment, since the reading and parsing of the data packet are real-time, the transmission time point of the data information in the data packet can be calculated after each data packet is acquired. In general, for data transmitted by the same transmitting side, the corresponding expected transmission delays are the same, so that the data packet is also periodic in data transmission in the receiving side. Meanwhile, different data packets can be set to have different expected transmission delays, so that the transmission of the different data packets can be controlled by controlling the different delays.
As a preferable mode of the present embodiment, further comprising:
judging whether the transmission expected time delay amount of the current acquired data packet is a preset value or not; if the transmission expected delay amount of the current acquired data packet is a preset value, recording a first receiving time point of the current acquired data packet, filling the first receiving time point into a field of the transmission expected delay amount, and returning the field as a response message to the transmitting side.
In this embodiment, in order to determine the expected transmission delay amount, the transmitting side device may set the expected transmission delay amount corresponding to the transmitted data packet to be a preset value, so that when the receiving side parses that the corresponding expected transmission delay amount is the preset value, the step of measuring the expected transmission delay amount may be triggered; preferably, the preset value is 0.
In this embodiment, when the expected transmission delay amount of the acquired data packet is a preset value, a first receiving time point of the acquired data packet is recorded, that is, the corresponding first receiving time point may be filled into a field of the expected transmission delay amount in the corresponding response packet, and the field is returned to the transmitting side, so that the transmitting side can calculate the corresponding expected transmission delay amount according to the first receiving time and the time for receiving the response packet, so as to update the expected transmission delay amount in the subsequent transmitted data packet.
Further, the step of triggering and measuring the expected transmission delay amount can be repeatedly executed, the sending side can count the delay distribution conditions of two transmission directions according to the result of multiple measurement, the maximum delay value and the delay jitter value can be used as a reference for configuring the expected transmission delay amount Dn by the sending side, and the expected transmission delay amount Dn must be larger than the maximum transmission delay to ensure that no overtime occurs when the data packet reaches the receiving side. Meanwhile, the delay jitter value can be used as a reference for setting the depth of the data Buffer at the receiving side. The depth of buffer must be greater than the fluctuation of transmission delay to ensure that jitter of all data packets can be absorbed.
Step S103: and when the local time reaches any transmission time point, controlling the transmission of the corresponding data information.
In this embodiment, please refer to fig. 3, which is a processing diagram of the receiving side. After receiving the data packet, the receiving side analyzes the time information (the transmission time point after the time information analysis) and the data information, and stores the time information and the data information in the corresponding buffer respectively, and the timer of the receiving side reads the buffer of the data information at the appointed time point (the local time point reaches the corresponding transmission time point) according to the analyzed transmission time point. The receiving side reads the transmission time point of the data from the buffer and is strictly controlled by the parsed time information, so that the data jitter at the buffer outlet of the receiving side can be completely eliminated, the read transmission time point is controlled by the transmitting side, and the jitter of the transmission delay caused by the network can be absorbed by the buffer of the receiving side.
As a preferred solution of this embodiment, when the local time reaches any transmission time point, controlling transmission of the corresponding data information includes:
determining current data information to be controlled, acquiring current first local time in real time, and judging whether the first local time reaches a transmission time point corresponding to the current data information to be controlled; the control sequence of the data information is determined by the sequence of data packet acquisition, and the transmission time point of each data information corresponds to the control sequence; when the first local time reaches the transmission time point, reading and outputting data information corresponding to the transmission time point; and waiting for the current first local time to reach the transmission time point when the first local time is earlier than the expected transmission time point.
In this embodiment, referring to fig. 4, it is necessary to determine data information corresponding to a next data packet to be sent, that is, the data information to be controlled currently, and after determining, acquire a current first local time in real time, so that the first local time is compared with a transmission time point of the data information to be controlled. When the first local time is the same as the transmission time point, that is, the current time (the first local time) has reached the time corresponding to the transmission time point, the data information to be controlled needs to be read from the buffer and output, so that the data information to be controlled can be transmitted to the processor of the receiving side.
Further, when the first local time is earlier than the transmission time point, it is explained that the current time (first local time) has not reached the time corresponding to the transmission time point, so that it is necessary to continue reading and updating the first local time (hold waiting to read the data information).
As a preferable solution of this embodiment, after the determining the data information to be currently controlled, the method further includes:
judging overtime of the current data information to be controlled, thereby acquiring the current second local time in real time, and comparing the second local time with a transmission time point corresponding to the current data information to be controlled; and outputting a data packet transmission overtime signaling corresponding to the current data information to be controlled when the second local time exceeds the transmission time point corresponding to the current data information to be controlled.
In the present embodiment, when the first local time is different from the transmission time point, there is also a possibility that the current time (first local time) has exceeded the time corresponding to the transmission time point, that is, the problem of the data information reading timeout has occurred. In order to avoid this, it is also necessary to make a timeout judgment for the data information to be currently controlled after determining the data information to be currently controlled.
In this embodiment, the current second local time is obtained in real time, and the second local time is compared with the transmission time point corresponding to the current data information to be controlled, and when the second local time exceeds the transmission time point corresponding to the current data information to be controlled, it is obvious that the transmission of the data packet (data information) has timed out.
It can be understood that, since the step of performing timeout determination on the data information to be controlled currently occurs after determining the data information to be controlled currently, and in order to avoid the occurrence of the timeout phenomenon, the step of performing timeout determination has a higher priority than the step of data information reading, that is, the step of performing data information reading and transmission after completing the timeout determination of data information transmission is performed. Therefore, the second local time obtained in the step of timeout determination is not the same time as the first local time obtained in the step of data information reading, but in order to ensure the accuracy of data information transmission, the second local time obtained by the previous execution cannot be used for reading the data information transmission, so that after the timeout determination is finished, the first local time needs to be obtained again for reading and transmitting the data cache.
In this embodiment, the expected transmission delay Dn of each packet must be greater than the actual transmission delay Tdelay of the network. If it is found at the receiving side that the current time point has exceeded the transmission time point determined by tn+dn, indicating that the time for the packet to reach the receiving side has timed out, it is necessary to initiate exception handling measures and to issue corresponding packet transmission timeout signaling.
As a preferable solution of this embodiment, the first local time and the second local time are acquired by a GNSS clock of the receiving side. Further, the first receiving time point is also acquired by the GNSS clock of the receiving side. The GNSS clock on the receiving side is used for acquisition of time on the receiving side.
Note that the GNSS (Global Navigation Satellite System) clock is a global navigation satellite system clock, and provides a high-precision time reference based on signals transmitted by satellites, and the GNSS system (e.g. GPS, GLONASS, galileo) determines the position and time of the receiver by deploying a plurality of satellites in space, and receiving and measuring satellite signals. The GNSS receiver receives signals transmitted by satellites and calculates the signal propagation time from the satellites to the receiver. By signal measurement and calculation of multiple satellites, the receiver can determine its own position and accurate time.
As another preferred solution of the present embodiment, when performing actual network deployment, the embodiment of the present invention may also perform local time acquisition by using other technologies, including but not limited to IEEE 1588, 1588V2, PTP, NTP, TSN, and other clocks or clock protocols, due to the difference between the accuracy requirement of transmission and the implementation of the technology.
It should be noted that, the method provided by the embodiment of the invention can meet the requirement of transmission delay in various typical scenes. For the requirements of packet cycle achievement, in some industrial control scenarios, such as a control network based on EtherCat (Ethernet for Control Automation Technology), it is desirable to fix the time interval when the control packet reaches the receiving side, and the third proposed method in the prior art is to achieve this objective and convert the non-periodic data into periodic data. With the method of the present invention, only the desired delay D of each data packet needs to be adjusted n The value of (2) is sufficient. Assuming that the delay interval at which successive adjacent data packets are expected to reach the receiving side is a fixed value T delta The transmission time point of the nth packet is T n The expected arrival delay is D n The expected delay calculation formula of the n+1th data packet is: d (D) n+1 =T n +D n +T delta -T n+1
For the requirement of data packet simultaneous achievement, when multiple mechanical arms or multiple robots cooperate, it is often desirable that multiple receiving side devices perform a certain operation simultaneously. Assuming that the transmission time point and the expected delay value of the nth device data packet are T respectively user n And D user n The transmission time point of the n+1th device data packet is T user n+1 The calculation formula of the expected delay value of the data packet of the n+1th device is as follows:
D user n+1 =T user n +D user n -T user n+1
for the requirement reached at the appointed time point, because the delay amount is completely appointed by the transmitting side, the method provided by the invention can realize that the data packet reaches the requirement of the receiving device at any appointed time (the delay corresponding to the appointed time is more than or equal to the maximum transmission delay). Let the transmission time point of the data packet be T tx n The desired arrival time point is T rx n Then a delay of D is expected n =T rx n –T tx n
The implementation of the above embodiment has the following effects:
according to the technical scheme, the receiving side analyzes the data packets sent by the sending side, so that the analyzed time information and the data information are cached, the receiving side analyzes the transmission time point corresponding to each data information, and the reading time of the data cache is controlled through the local time of the receiving side and the analyzed time information, so that the time delay jitter caused by a transmission network is reduced or even eliminated by utilizing the cache of the receiving side, the purpose of precisely controlling the data packet transmission time is achieved, and the accuracy of data transmission is improved.
Example two
Referring to fig. 5, a method for data transmission according to an embodiment of the present invention is applied to a transmitting side, and includes the following steps S201 to S202:
step S201: and recording the time point of the data information to be transmitted currently as the sending time, and combining the preset expected transmission delay amount and the data information to be transmitted to form a data packet to be transmitted.
In the present embodiment, each data packet is composed of time information and data information, and the time information includes the time point (issue time) of the data information to be currently transmitted and the transmission expected delay amount.
Step S202: transmitting a number of data packets to a receiving side to cause the receiving side to perform the method of data transmission as described in any one of the above.
As a preferred solution of this embodiment, the method for measuring the preset expected transmission delay includes the following steps S2011-S2014:
step S2011: and filling a preset expected transmission delay amount in the data packet to be sent to a preset value, so that the receiving side records a first receiving time point of the currently acquired data packet, fills the first receiving time point into a field of the expected transmission delay amount, and returns the field as a response message to the sending side.
Step S2012: and receiving a response message returned from the receiving side, recording a second receiving time point when the response message is received, and analyzing the response message to obtain a first receiving time point.
Step S2013: and calculating a first transmission delay amount according to the sending time and the first receiving time point, and calculating a second transmission delay amount according to the first receiving time point and the second receiving time point.
Step S2014: and determining a transmission expected time delay amount according to the first transmission time delay amount and the second transmission time delay amount.
In the present embodiment, the expected delay D of the transmitting side configuration n Must be greater than the physical delay Tdelay of the network transmission, otherwise each transmitted packet will be determined to be a timeout. Therefore, a method is needed to measure the actual transmission delay between the transmitting side and the receiving side, and in this embodiment, a simple delay measurement procedure can be defined by using the time information of the transmitting side carried in the data packet sent by the transmitting side. Periodically transmitting special delay measurement data packets on the transmitting side, wherein the format of the data packets can be consistent with that of normal data packets, and the data packets are filled with time information T n Filling the current time information time of the transmitting side tx1, Desired time delay D n Filling with 0 as the basis of time delay measurement message. After receiving the time delay measurement message, the receiving side does not perform buffer processing on the message and immediately sends D n Field filling is the current time information time of the receiving side rx1 And sending a response message serving as time delay measurement back to the sending side. After receiving the message, the transmitting side can use the time rx1 And time tx1 The actual delay from the transmitting side to the receiving side, i.e. the amount corresponding to the first transmission delay, is calculated.
Further, the transmitting side can record the time of receiving the response message tx2 According to time tx2 And time rx1 The delay from the receiving side to the transmitting side, i.e. the amount corresponding to the second transmission delay, can be calculated.
In this embodiment, the expected delay information D may be preferably configured by using the maximum delay value as the transmitting side by the size between the first transmission delay amount and the second transmission delay amount n Can be shown by reference toFor example, the maximum delay value may be used as a preset transmission expected delay amount on the transmitting side. As a preferable mode of the present embodiment, step S2014 and step S2015 are further included:
step S2014: and repeatedly executing the measurement of the preset expected transmission delay amount, thereby obtaining a plurality of expected transmission delay amounts.
Step S2015: and determining the final transmission expected delay amount according to the obtained multiple transmission expected delay amounts.
It should be noted that the time delay measurement process may be repeated periodically, and the transmitting side may count the time delay distribution situations of the two transmission directions, the maximum time delay value and the time delay jitter value according to the result of multiple measurements.
It should be noted that, the maximum delay value may be used as a reference for configuring the expected delay information Dn at the transmitting side, where the expected delay Dn must be greater than the maximum transmission delay to ensure that no timeout occurs when the data packet reaches the receiving side. The delay jitter value can be used as a reference for setting the depth of the data Buffer at the receiving side. The depth of buffer must be greater than the fluctuation of transmission delay to ensure that jitter of all data packets can be absorbed.
As a preferred solution of the present embodiment, the sending time and the second receiving time point are acquired by a GNSS clock on the sending side.
The implementation of the above embodiment has the following effects:
according to the technical scheme, the time information is added into each data packet by the transmitting side, the time information carries the current sending time of the transmitting side and the expected transmission time delay amount of the data packet, so that controllable data time delay is realized, meanwhile, according to the time information transmitted by the transmitting side, different time delay effects such as cycle achievement, simultaneous achievement and achievement at a designated time point of the data packet can be achieved, and the controllability of data transmission and the accuracy of arrival time control can be further improved.
Example III
Referring to fig. 6, a data transmission device provided in an embodiment of the invention is disposed on a receiving side, and includes: a receiving module 01, a timing module 02 and a control module 03.
The receiving module 01 is used for acquiring and analyzing a plurality of data packets sent by the sending side, and sequentially caching the analyzed time information and data information; wherein each data packet includes time information and data information.
And the timing module 02 is used for determining the transmission time point of each data message according to all the time messages.
And the control module 03 is used for controlling the transmission of the corresponding data information when the local time reaches any transmission time point.
Preferably, the determining a transmission time point of each data information according to all the time information includes:
according to the sending time and the expected transmission delay amount of each data packet, calculating the transmission time point of the data information in each data packet in turn; wherein the time information includes an issue time and a transmission expected delay amount corresponding to the data packet.
Preferably, the calculation formula for calculating the transmission time point of the data information in each data packet is as follows:
T exp,n =T n +D n
Wherein T is exp,n T is the transmission time point of the data information in the nth data packet n For the time of issuance of the nth packet, D n An amount of delay is expected for the transmission of the nth packet.
Preferably, the method further comprises:
judging whether the transmission expected time delay amount of the current acquired data packet is a preset value or not; if the transmission expected delay amount of the current acquired data packet is a preset value, recording a first receiving time point of the current acquired data packet, filling the first receiving time point into a field of the transmission expected delay amount, and returning the field as a response message to the transmitting side.
Preferably, when the local time reaches any transmission time point, controlling transmission of the corresponding data information includes:
determining current data information to be controlled, acquiring current first local time in real time, and judging whether the first local time reaches a transmission time point corresponding to the current data information to be controlled; the control sequence of the data information is determined by the sequence of data packet acquisition, and the transmission time point of each data information corresponds to the control sequence; when the first local time reaches the transmission time point, reading and outputting data information corresponding to the transmission time point; and waiting for the current first local time to reach the transmission time point when the first local time is earlier than the expected transmission time point.
Preferably, after the determining the data information to be controlled currently, the method further includes:
judging overtime of the current data information to be controlled, thereby acquiring the current second local time in real time, and comparing the second local time with a transmission time point corresponding to the current data information to be controlled; and outputting a data packet transmission overtime signaling corresponding to the current data information to be controlled when the second local time exceeds the transmission time point corresponding to the current data information to be controlled.
Preferably, the first local time and the second local time are acquired by a GNSS clock of the receiving side.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the above-described apparatus, which is not described herein again.
The implementation of the above embodiment has the following effects:
according to the technical scheme, the receiving side analyzes the data packets sent by the sending side, so that the analyzed time information and the data information are cached, the receiving side analyzes the transmission time point corresponding to each data information, and the reading time of the data cache is controlled through the local time of the receiving side and the analyzed time information, so that the time delay jitter caused by a transmission network is reduced or even eliminated by utilizing the cache of the receiving side, the purpose of precisely controlling the data packet transmission time is achieved, and the accuracy of data transmission is improved.
Example IV
Referring to fig. 7, a data transmission device provided in an embodiment of the invention is disposed on a transmitting side, and includes: a combining module 04 and a transmitting module 05.
The combining module 04 is configured to record a time point of the data information to be sent currently as an sending time, and combine the sending time with a preset expected transmission delay amount to form a data packet to be sent.
A transmitting module 05, configured to transmit a number of data packets to a receiving side, so that the receiving side performs the method for data transmission according to any one of the above.
As a preferred solution, the method for measuring the preset expected transmission delay includes:
filling a preset expected transmission delay amount in a data packet to be sent to a preset value, so that a receiving side records a first receiving time point of the currently acquired data packet, fills the first receiving time point into a field of the expected transmission delay amount, and returns the field as a response message to a sending side; receiving a response message returned from a receiving side, recording a second receiving time point when the response message is received, and analyzing the response message to obtain a first receiving time point; calculating a first transmission delay amount according to the sending time and the first receiving time point, and calculating a second transmission delay amount according to the first receiving time point and the second receiving time point; and determining a transmission expected time delay amount according to the first transmission time delay amount and the second transmission time delay amount.
Preferably, the method further comprises:
repeating the step of measuring the preset expected transmission delay amount, thereby obtaining a plurality of expected transmission delay amounts; and determining the final transmission expected delay amount according to the obtained multiple transmission expected delay amounts.
Preferably, the sending time and the second receiving time point are acquired by a GNSS clock of the sending side.
It will be clear to those skilled in the art that, for convenience and brevity of description, reference may be made to the corresponding process in the foregoing method embodiment for the specific working process of the above-described apparatus, which is not described herein again.
The implementation of the above embodiment has the following effects:
the time information is added into each data packet by the transmitting side, and the time information carries the current sending time of the transmitting side and the expected transmission time delay amount of the data packet, so that controllable data time delay is realized, meanwhile, according to the time information transmitted by the transmitting side, different time delay effects such as the reaching of the data packet in equal periods, the reaching of the data packet in equal periods and the reaching of the data packet in a designated time point can be achieved, and the controllability of data transmission and the accuracy of arrival time control can be further improved.
Example five
Fig. 8 is a schematic diagram of a transmitting device and a receiving device to which the GNSS high precision clock of the present embodiment is injected.
In this embodiment, the receiving side is a corresponding device terminal, i.e. a specific receiving device, and the transmitting side is a corresponding device terminal, i.e. a specific transmitting device, so as to implement injection of GNSS high-precision clocks on the transmitting device and the receiving device.
In the embodiment of the present embodiment, the addition of the time information of the data packet on the transmitting side is directly implemented in the transmitting device. The analysis of time information of the data packet at the receiving side, data caching and reading data according to the designated delay are realized in the receiving equipment.
The embodiment is suitable for custom equipment as well as sending equipment and receiving equipment, and can realize the scene of high-precision clock injection, and no special requirement is required for a transmission network between the sending equipment and the receiving equipment under the condition.
Example six
Fig. 9 is a schematic diagram of a first node and a last node of a transmission network into which a GNSS high-precision clock is injected in the present embodiment.
In this embodiment, the receiving side is an end network node, i.e. a tail node, in the transmission network, and the transmitting side is a head network node, i.e. a head node, in the transmission network, so as to implement injection of the GNSS high-precision clock on the tail node and the head node.
The embodiment of this embodiment, in which the addition of the time information of the data packet on the transmitting side is implemented in the head node. And the analysis of time information in the data packet of the receiving side, the data caching and the reading of data according to the designated delay are realized in the end node.
The embodiment is suitable for the scene without special requirements on the transmission network between the first node and the last node and special requirements on the sending equipment and the receiving equipment.
Example seven
Please refer to fig. 10, which is a schematic diagram illustrating the injection of the GNSS high precision clock into the TSN/synchronization network in the present embodiment.
In this embodiment, the receiving side is a corresponding device terminal, i.e. a specific receiving device, and the transmitting side is a corresponding device terminal, i.e. a specific transmitting device, but injection of the GNSS high precision clock is implemented on the TSN/synchronization network, i.e. the GNSS high precision clock is injected into a time synchronization server of the TSN/synchronization network, so that all network nodes are synchronized to the time synchronization server, and further, accurate timing of the transmitting side and the receiving side is ensured by the process of transmitting data packets by the TSN/synchronization network. In a TSN/synchronous network, the high precision clock may also be obtained by a time synchronization server in the network.
The network requirement between the transmitting side and the receiving side of the present embodiment is a TSN/synchronization network, and all network nodes are synchronized to a time synchronization server so that precise timing of the transmitting side and the receiving side is ensured by the TSN/synchronization network.
Example eight
Correspondingly, the invention also provides a network device, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the method of data transmission as described in embodiment one or implementing the method of data transmission as described in embodiment two when executing the computer program.
The network device of this embodiment includes: a processor, a memory, a computer program stored in the memory and executable on the processor, and computer instructions. The processor implements the steps of the first or second embodiment described above, for example, steps S101 to S103 shown in fig. 1, when executing the computer program. Alternatively, the processor may implement the functions of the modules/units in the above-described device embodiments, such as the receiving module 01, when executing the computer program.
The computer program may be divided into one or more modules/units, which are stored in the memory and executed by the processor to accomplish the present invention, for example. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program in the network device. For example, the receiving module 01 is configured to acquire and parse a plurality of data packets sent by the sending side, and sequentially cache parsed time information and data information; wherein each data packet includes time information and data information.
The network device may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The network device may include, but is not limited to, a processor, a memory. It will be appreciated by those skilled in the art that the schematic diagram is merely an example of a network device and is not limiting of the network device, and may include more or fewer components than shown, or may combine some components, or different components, e.g., the network device may also include input-output devices, network access devices, buses, etc.
The processor may be a central processing unit (Central Processing Unit, CPU), other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like that is a control center of the network device, connecting various parts of the entire network device using various interfaces and lines.
The memory may be used to store the computer program and/or modules, and the processor may implement various functions of the network device by running or executing the computer program and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to the use of the mobile terminal, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, memory, plug-in hard disk, smart Media Card (SMC), secure Digital (SD) Card, flash Card (Flash Card), at least one disk storage device, flash memory device, or other volatile solid-state storage device.
Wherein the network device integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present invention may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
Example nine
Correspondingly, the invention further provides a computer readable storage medium, which comprises a stored computer program, wherein the computer program controls the equipment where the computer readable storage medium is located to realize the method of data transmission according to the first embodiment or realize the method of data transmission according to the second embodiment when running.
The foregoing embodiments have been provided for the purpose of illustrating the general principles of the present invention, and are not to be construed as limiting the scope of the invention. It should be noted that any modifications, equivalent substitutions, improvements, etc. made by those skilled in the art without departing from the spirit and principles of the present invention are intended to be included in the scope of the present invention.

Claims (16)

1. A method for data transmission, applied to a receiving side, comprising:
acquiring and analyzing a plurality of data packets sent by a sending side, and sequentially caching the analyzed time information and data information; wherein each data packet comprises time information and data information;
Determining a transmission time point of each data message according to all the time messages;
and when the local time reaches any transmission time point, controlling the transmission of the corresponding data information.
2. The method of claim 1, wherein said determining a transmission time point of each data message based on all of said time messages comprises:
according to the sending time and the expected transmission delay amount of each data packet, calculating the transmission time point of the data information in each data packet in turn; wherein the time information includes an issue time and a transmission expected delay amount corresponding to the data packet.
3. The method of claim 2, wherein the calculation formula for calculating the transmission time point of the data information in each data packet is as follows:
T exp,n =T n +D n
wherein T is exp,n T is the transmission time point of the data information in the nth data packet n For the time of issuance of the nth packet, D n An amount of delay is expected for the transmission of the nth packet.
4. A method of data transmission according to any one of claim 2, further comprising:
judging whether the transmission expected time delay amount of the current acquired data packet is a preset value or not;
If the transmission expected delay amount of the current acquired data packet is a preset value, recording a first receiving time point of the current acquired data packet, filling the first receiving time point into a field of the transmission expected delay amount, and returning the field as a response message to the transmitting side.
5. The method of claim 1, wherein when the local time reaches any transmission time point, controlling the transmission of the corresponding data information includes:
determining current data information to be controlled, acquiring current first local time in real time, and judging whether the first local time reaches a transmission time point corresponding to the current data information to be controlled; the control sequence of the data information is determined by the sequence of data packet acquisition, and the transmission time point of each data information corresponds to the control sequence;
when the first local time reaches the transmission time point, reading and outputting data information corresponding to the transmission time point;
and waiting for the current first local time to reach the transmission time point when the first local time is earlier than the expected transmission time point.
6. The method of data transmission according to claim 4, further comprising, after said determining the data information to be currently controlled:
Judging overtime of the current data information to be controlled, thereby acquiring the current second local time in real time, and comparing the second local time with a transmission time point corresponding to the current data information to be controlled;
and outputting a data packet transmission overtime signaling corresponding to the current data information to be controlled when the second local time exceeds the transmission time point corresponding to the current data information to be controlled.
7. A method of data transmission according to claim 5 or 6, wherein the first local time and the second local time are obtained by a GNSS clock on the receiving side.
8. A method for data transmission, applied to a transmitting side, comprising:
transmitting a number of data packets to a receiving side for the receiving side to perform the method of data transmission according to any of claims 1 to 7.
9. The method of data transmission according to claim 8, further comprising, before said transmitting a plurality of data packets to the receiving side:
and recording the time point of the data information to be transmitted currently as the sending time, and combining the preset expected transmission delay amount and the data information to be transmitted to form a data packet to be transmitted.
10. The method for data transmission according to claim 9, wherein the method for measuring the preset expected transmission delay comprises:
filling a preset expected transmission delay amount in a data packet to be sent to a preset value, so that a receiving side records a first receiving time point of the currently acquired data packet, fills the first receiving time point into a field of the expected transmission delay amount, and returns the field as a response message to a sending side;
receiving a response message returned from a receiving side, recording a second receiving time point when the response message is received, and analyzing the response message to obtain a first receiving time point;
calculating a first transmission delay amount according to the sending time and the first receiving time point, and calculating a second transmission delay amount according to the first receiving time point and the second receiving time point;
and determining a transmission expected time delay amount according to the first transmission time delay amount and the second transmission time delay amount.
11. The method of data transmission of claim 10, further comprising:
repeating the step of measuring the preset expected transmission delay amount, thereby obtaining a plurality of expected transmission delay amounts;
And determining the final transmission expected delay amount according to the obtained multiple transmission expected delay amounts.
12. A method of data transmission according to any one of claims 11, wherein said time of transmission and said second point in time of reception are obtained by a GNSS clock on said transmitting side.
13. A data transmission apparatus, provided on a receiving side, comprising:
the receiving module is used for acquiring and analyzing a plurality of data packets sent by the sending side, and sequentially caching the analyzed time information and the analyzed data information; wherein each data packet comprises time information and data information;
the timing module is used for determining the transmission time point of each data message according to all the time messages;
and the control module is used for controlling the transmission of the corresponding data information when the local time reaches any transmission time point.
14. A data transmission apparatus provided on a transmitting side, comprising:
the combination module is used for recording the time point of the data information to be sent currently as the sending time, combining the preset expected transmission delay amount and the data information to be sent to form a data packet to be sent;
A transmitting module for transmitting a number of data packets to a receiving side for the receiving side to perform the method of data transmission according to any one of claims 1 to 7.
15. A network device comprising a processor, a memory and a computer program stored in the memory and configured to be executed by the processor, the processor implementing the method of data transmission according to any one of claims 1 to 7 or the method of data transmission according to any one of claims 8 to 12 when the computer program is executed.
16. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored computer program, wherein the computer program, when run, controls a device in which the computer readable storage medium is located to implement the method of data transmission according to any one of claims 1 to 7 or to implement the method of data transmission according to any one of claims 8 to 12.
CN202311628852.0A 2023-11-30 2023-11-30 Data transmission method, device, equipment and storage medium Pending CN117596219A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311628852.0A CN117596219A (en) 2023-11-30 2023-11-30 Data transmission method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311628852.0A CN117596219A (en) 2023-11-30 2023-11-30 Data transmission method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117596219A true CN117596219A (en) 2024-02-23

Family

ID=89921681

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311628852.0A Pending CN117596219A (en) 2023-11-30 2023-11-30 Data transmission method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117596219A (en)

Similar Documents

Publication Publication Date Title
US8370675B2 (en) Precise clock synchronization
US6535926B1 (en) Time synchronization system for industrial control network using global reference pulses
EP3284217B1 (en) Methods, systems, and computer readable medium for synchronizing timing among network interface cards (nics) in a network equipment test device
EP1427121B1 (en) Radio access network, radio communication method, synchronous server and node
US7191354B2 (en) Method for synchronizing a first clock to a second clock, processing unit and synchronization system
EP3531610B1 (en) Frequency synchronization method and slave clock
US11424902B2 (en) System and method for synchronizing nodes in a network device
WO2021077289A1 (en) Synchronization method and device
CN111090093A (en) PD radar emission waveform configuration method and device based on FPGA
CN112395231B (en) Method and device for calculating data delay time among multiple processors
US20090238166A1 (en) Method for realtime digital processing of communications signals
CN116684028B (en) Multi-sensor time synchronization method, device, equipment and storage medium
CN117596219A (en) Data transmission method, device, equipment and storage medium
US11824748B2 (en) Communication apparatus and ranging method
WO2021208868A1 (en) Method for determining clock and related apparatus
CN115333660A (en) Precision timestamp correction
CN108401287B (en) Networking method and device
WO2020132834A1 (en) Method and device for stamping processing
CN113485523B (en) Clock compensation method and device
CN114448543B (en) GPS time synchronization method, BBU system, electronic equipment and storage medium
CN117411582A (en) Time synchronization method and device
CN117015024A (en) Time synchronization method, network equipment and communication system
CN112769515A (en) Bidirectional time service and distance measurement system and method based on radio station
CN117879747A (en) Method, device, equipment and storage medium for acquiring message time stamp
Garnica et al. Argos: A gps time-synchronized network interface card based on netfpga

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