[go: up one dir, main page]

CN118694462B - A method and system for verifying the accuracy of timestamp of network equipment - Google Patents

A method and system for verifying the accuracy of timestamp of network equipment Download PDF

Info

Publication number
CN118694462B
CN118694462B CN202410739314.7A CN202410739314A CN118694462B CN 118694462 B CN118694462 B CN 118694462B CN 202410739314 A CN202410739314 A CN 202410739314A CN 118694462 B CN118694462 B CN 118694462B
Authority
CN
China
Prior art keywords
timestamp
accuracy
network
delay
precision
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410739314.7A
Other languages
Chinese (zh)
Other versions
CN118694462A (en
Inventor
沈文博
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Teletest Technology Co ltd
Original Assignee
Beijing Teletest 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 Beijing Teletest Technology Co ltd filed Critical Beijing Teletest Technology Co ltd
Priority to CN202410739314.7A priority Critical patent/CN118694462B/en
Publication of CN118694462A publication Critical patent/CN118694462A/en
Application granted granted Critical
Publication of CN118694462B publication Critical patent/CN118694462B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps

Landscapes

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

Abstract

本申请涉及一种网络设备的时间戳精度验证方法和系统,其属于数据处理技术领域,该方法包括:获取n组延迟数据,n≥2,n组延迟数据对应的网络通道的参数值不相同,网络通道由传输线和网关设备组成,参数值是指传输线的长度;根据n组延迟数据计算得到实际时间戳精度;根据实际时间戳精度和预设时间戳精度得到验证结果。本申请具有提高网络传输时所用的时间戳精度的可靠性的效果。

The present application relates to a timestamp accuracy verification method and system for network equipment, which belongs to the field of data processing technology. The method includes: obtaining n groups of delay data, n≥2, the parameter values of the network channels corresponding to the n groups of delay data are different, the network channels are composed of transmission lines and gateway devices, and the parameter value refers to the length of the transmission line; calculating the actual timestamp accuracy according to the n groups of delay data; and obtaining the verification result according to the actual timestamp accuracy and the preset timestamp accuracy. The present application has the effect of improving the reliability of the timestamp accuracy used in network transmission.

Description

Method and system for verifying timestamp precision of network equipment
Technical Field
The present application relates to the field of data processing technologies, and in particular, to a method and a system for verifying timestamp accuracy of a network device.
Background
The time delay is an important parameter of network testing, and a time stamp (timestamp) mechanism is one of key elements of time synchronization and time delay testing, and the precision of the time stamp directly corresponds to the precision of the time delay testing.
In an actual application scenario, a network device timestamp belonging to a sender and a network device timestamp belonging to a receiver are driven by a counter with the same frequency, a network packet is sent out from an output port of the sender, the network packet arrives at an input port of the receiver through a network channel assuming that the timestamp value of the network packet sent out by the sender is v1, and the delay of the network packet is deltat= (v 2-v 1) d, and d is the timestamp precision, assuming that the timestamp value of the network packet received by the receiver is v 2.
In the process of calculating the delay of the network packet, deltav is calculated by hardware in the FPGA and stored in a register, and after the software system reads the value of Deltav, the value is multiplied by the precision of the time stamp to obtain Deltat.
Since the calculation of Δv is done inside the FPGA, it is difficult to prove the authenticity of the timestamp accuracy at the time of network transmission. Two methods are known at present, namely, a method for explaining the time delay testing principle and scheme orally or in writing, but the method lacks the evidence of tools of three parties, is not convincing, and has low reliability. In addition, the clock of the counter is led out through the pin of the FPGA chip and then measured by the oscilloscope, but the clock driven by the frequency is arranged in the FPGA chip, and the clock with the same frequency can not be proved to be used for time delay test, so that the reliability of the time stamp precision can not be ensured.
Disclosure of Invention
In order to improve the reliability of the time stamp accuracy used in network transmission, the application provides a time stamp accuracy verification method and a time stamp accuracy verification system for network equipment.
In a first aspect of the present application, there is provided a method for verifying timestamp accuracy of a network device, the method comprising:
acquiring n groups of delay data, wherein n is more than or equal to 2, the parameter values of network channels corresponding to the n groups of delay data are different, the network channels consist of transmission lines and gateway equipment, and the parameter values refer to the lengths of the transmission lines;
Calculating according to n groups of delay data to obtain actual timestamp accuracy;
And obtaining a verification result according to the actual time stamp precision and the preset time stamp precision.
In one possible implementation manner, the method for acquiring any one of n sets of delay data includes:
adjusting the length of a transmission line to obtain a transmission delay, wherein the transmission delay is positively correlated with the length of the transmission line;
Acquiring a forwarding delay, a sending time stamp and a receiving time stamp, wherein the forwarding delay is related to the forwarding speed of the gateway equipment, the receiving time stamp is the moment when a network packet is sent out, and the receiving time stamp is the moment when the network packet is received;
Building a relation from the transmission delay, the forwarding delay, the sending timestamp and the receiving timestamp:
Transmission delay+forwarding delay= (reception timestamp-transmission timestamp) ×initial timestamp accuracy, which is the timestamp accuracy of any one of n sets of delay data.
By adopting the technical scheme, the length of the transmission line is changed to obtain multiple groups of delay data with different transmission delay increment, and because the change of the length of the transmission line and the process of calculating the difference value between the receiving time stamp and the sending time stamp do not have communication channels, namely the change of the length of the transmission line is not self-modified or determined in a system for calculating the difference value between the receiving time stamp and the sending time stamp, the two are mutually independent processes, the possibility of cheating is eliminated, and the reliability of the result of verifying the accuracy of the preset time stamp according to the multiple groups of delay data can be ensured.
In one possible implementation, when the length of the transmission line is adjusted to obtain the transmission delay, the increment of the adjusted transmission delay is larger than the preset timestamp precision.
By adopting the technical scheme, when the increment of the transmission delay is smaller than the precision of the time stamp, the increment of the transmission delay possibly falls into the non-driving time stamp of the gateway device, so that the gateway device does not have network packets capable of being forwarded on the driving time stamp, and the received network packets in the non-driving time stamp are not forwarded, namely the increment of the transmission delay is annihilated by the forwarding delay. Therefore, the increment of the transmission delay after adjustment is set to be larger than the preset time stamp precision, and the method has the advantage of avoiding annihilation of the increment of the transmission delay, thereby providing technical guarantee for improving the reliability of the time stamp precision used in network transmission.
In one possible implementation manner, the calculating the actual timestamp accuracy according to the n sets of delay data includes:
calculating to obtain the initial time stamp precision of each group of delay data through the relational expression;
Calculating the average value of the initial timestamp precision of n groups of delay data;
And determining the mean value as the actual timestamp precision.
In one possible implementation manner, the calculating the actual timestamp accuracy according to the n sets of delay data includes:
calculating to obtain the initial time stamp precision of each group of delay data through the relational expression;
the mode of the initial timestamp accuracy of the n sets of delay data is determined to be the actual timestamp accuracy.
By adopting the technical scheme, the application provides two modes for calculating the accuracy of the actual time stamp, and the two calculation modes comprehensively consider the initial time stamps of a plurality of groups of delay data, so that the accuracy of the actual time stamp obtained by calculation can be ensured no matter which calculation mode is selected, and a plurality of selectable calculation modes can also adapt the verification method of the application to a plurality of application scenes, thereby improving the practicability of the application.
In one possible implementation manner, the obtaining the verification result according to the actual timestamp precision and the preset timestamp precision includes:
Calculating a difference value between the actual timestamp precision and the preset timestamp precision;
When the absolute value of the difference value is less than or equal to a difference value threshold value, obtaining a verification result as verification passing;
And when the absolute value of the difference value is greater than the difference value threshold value, obtaining a verification result that the verification is not passed.
By adopting the technical scheme, after the actual timestamp precision is obtained, the difference between the actual timestamp precision and the preset timestamp precision is required to be judged, and when the difference between the actual timestamp precision and the preset timestamp precision is not larger than the difference threshold value, the preset timestamp precision is considered to pass verification, namely, the smaller the difference between the actual timestamp precision and the preset timestamp precision is, the higher the reliability of the verification result is.
In a second aspect of the present application, there is provided a time stamp accuracy verification system for a network device, the system being applied to a network architecture, the network architecture including a transmitting device for transmitting a network packet and embedding a transmission time stamp in the network packet, a gateway device for receiving and forwarding the network packet, and a receiving device for receiving the network packet, the gateway device being connected to the transmitting device and the receiving device respectively through transmission lines, the system including a network tester for executing the time stamp accuracy verification method for any one of the above network devices.
By adopting the technical scheme, on one hand, the application designs the verification method based on the existing network architecture without system cost. On the other hand, the process of changing the length of the transmission line and calculating the difference between the receiving timestamp and the sending timestamp has no communication channel, namely, the change of the length of the transmission line is not self-modified or determined in the network tester and is mutually independent, so that the possibility of cheating is eliminated, and the reliability of the result of verifying the accuracy of the preset timestamp according to multiple groups of delay data can be ensured.
In one possible implementation, the receiving device and the network tester are the same network device.
By adopting the technical scheme, the receiving equipment and the network tester are the same network equipment, so that the verification cost is reduced, the verification process is directly carried out in the network tester, the data exchange times are reduced, and the verification error is reduced.
In one possible implementation, the transmission line is an optical fiber.
By adopting the technical scheme, the optical fiber is adopted as the transmission line, on one hand, the optical fiber can adapt to a high-speed network, the transmission efficiency of the network packet between the sending equipment and the receiving equipment is improved, and the transmission delay of the network packet in the optical fiber is more stable compared with that of a common copper cable, so that the length of the optical fiber can be dynamically set according to the transmission delay requirement.
In one possible implementation, the network tester includes:
The data acquisition module is used for acquiring n groups of delay data, wherein n is more than or equal to 2, the parameter values of network channels corresponding to the n groups of delay data are different, the network channels consist of transmission lines and gateway equipment, and the parameter values refer to the lengths of the transmission lines;
The data calculation module is used for calculating and obtaining the actual timestamp precision according to n groups of delay data;
and the data determining module is used for obtaining a verification result according to the actual time stamp precision and the preset time stamp precision.
In summary, the application has the following beneficial technical effects:
Firstly, the increment of the transmission delay after adjustment is set to be larger than the preset time stamp precision, and the increment of the transmission delay is prevented from falling on the non-driving time stamp of the gateway equipment, so that the accuracy of the obtained actual time stamp precision is improved. Secondly, the process of changing the length of the transmission line and calculating the difference between the receiving timestamp and the sending timestamp has no communication channel, namely, the change of the length of the transmission line is not self-modified or determined in the network tester and is mutually independent, so that the possibility of cheating is eliminated, and the reliability of the verification result can be ensured. Therefore, the application has the effect of doubly guaranteeing the reliability of the verification result, and can improve the reliability of the time stamp precision used in network transmission.
Drawings
FIG. 1 is a schematic diagram of an exemplary operating environment for an embodiment of the present application.
Fig. 2 is a flowchart of a method for verifying the accuracy of a timestamp of a network device according to the present application.
Figure 3 is an exemplary diagram of transmission delay delta-forwarded delay annihilation in a method embodiment of the present application.
Fig. 4 is a block diagram of a time stamp accuracy verification system of a network device of the present application.
The reference numerals comprise 1, a transmitting device, 2, a network channel, 21, a transmission line, 22, a gateway device, 3, a receiving device, 4, a network tester, 41, a data acquisition module, 42, a data calculation module and 43, and a data determination module.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Fig. 1 shows a schematic diagram of an exemplary operating environment in which an embodiment of the application can be implemented, comprising a transmitting device 1, a receiving device 3 and a gateway device 22, the transmitting device 1 being in information interaction with the receiving device 3 via the gateway device 22.
The transmitting device 1 is driven by a counter of a high frequency clock, for example, one frequency is selected from MHz-GHz or GHz-THz as a driving frequency of the counter. The high frequency clock generates a time stamp on which the transmitting device 1 is triggered, and simultaneously issues a network packet, which may be data requested by the receiving party or data randomly transmitted by the transmitting device 1 to the receiving device 3. In addition, the transmitting apparatus 1 embeds the binary value of the time stamp into the network packet at the time stamp, and then transmits the network packet. In this example, the corresponding timestamp when the network packet was sent out is referred to as a transmission timestamp.
The gateway device 22 is disposed between the transmitting device 1 and the receiving device 3, and the gateway device 22, such as a switch, a router, etc., is connected to the transmitting device 1 and the receiving device 3 through the transmission line 21, where the transmission line 21 is a cable capable of transmitting network packets, such as an optical fiber, a copper cable, etc., and the optical fiber is adapted to a high-speed network, and the transmission delay of the optical fiber is more stable than that of the copper cable, and is less interfered by external environmental factors, so that the optical fiber will be described below as the transmission line 21. Since the network packet output from the transmitting device 1 reaches the gateway device 22 through the optical fiber, and is forwarded by the gateway device 22 to the receiving device 3 through the optical fiber, a transmission channel formed by the gateway device 22 and the optical fiber is also referred to as a network channel 2.
The reception device 3 is also driven by a counter of a high-frequency clock, and the driving frequency is selected to be the same as that of the counter of the transmission device 1, so that the transmission device 1 and the reception device 3 perform synchronous signal processing. Specifically, the high-frequency clock generates a time stamp on which the receiving apparatus 3 is triggered while receiving a network packet, which is data output by the transmitting apparatus 1, and the time stamp corresponding to when the network packet is received is referred to as a reception time stamp in this example. At the receiving device 3 side, the receiving device 3 takes out the transmission timestamp in the network packet, calculates the difference between the reception timestamp and the transmission timestamp, and multiplies the difference by the timestamp precision to obtain the delay of the network packet, that is, the delay of the network packet= (reception timestamp-transmission timestamp) = timestamp precision, where the timestamp precision is related to the driving frequency of the counter of the receiving device 3, and since the driving frequency of the counter of the receiving device 3 is equal to the driving frequency of the counter of the transmitting device 1, the timestamp precision is also considered to be related to the driving frequency of the transmitting device 1, specifically, the product of the driving frequency and the period is equal to 1 second, and the period refers to the triggering period of the counter, that is, the period of the time stamp generated by the transmitting device 1 or the receiving device 3.
Since the receiving device 3 has a function of calculating the delay of the network packet, the receiving device 3 may be the network tester 4, and the relationship between the network tester 4 and the transmitting device 1 and the receiving device 3 is indicated by a broken line. Of course, a network tester 4 may be separately set up, and the network tester 4 is connected to the receiving device 3 so as to be capable of reading the receiving time stamp and the sending time stamp, and calculating the delay of the network packet according to the receiving time stamp and the sending time stamp.
It should be noted that, in the case where the receiving device 3 is the network tester 4, the sending device 1 and the receiving device 3 may also be the same network tester 4, that is, one network tester 4 takes two roles, for example, one port of the network tester 4 outputs a network packet, and the network packet enters the network tester 4 from the other port after passing through the network channel 2 formed by the optical fiber and the gateway device 22.
The network tester 4 is a network device having an FPGA chip, wherein the FPGA chip calculates the difference between the receiving time stamp and the sending time stamp, stores the difference in a register, reads the difference by a software system in the network tester 4, and calculates the product of the difference and the time stamp precision to obtain the delay of the network packet. In addition, the software system of the network tester 4 also has a function of verifying the accuracy of the time stamp.
It should also be noted that the operating environment illustrated in fig. 1 is merely illustrative and is in no way intended to limit the application or uses of embodiments of the present application. For example, the operating environment may include a plurality of transmitting devices 1, a plurality of receiving devices 3, and a plurality of gateway devices 22.
Fig. 2 shows a flowchart of a method for verifying the accuracy of a timestamp of a network device according to an embodiment of the application, which is applied to the network tester 4. Specifically, the main flow of the timestamp accuracy verification method of the network device is described as follows.
Step S1, n groups of delay data are acquired, n is more than or equal to 2, parameter values of a network channel 2 corresponding to the n groups of delay data are different, the network channel 2 consists of optical fibers and gateway equipment 22, and the parameter values refer to lengths of the optical fibers.
As the network packets pass through the network channel 2, the delay in transmission may be different even though the network packets are going from the same transmitting device 1 to the same receiving device 3, due to the length of the optical fiber and the forwarding speed of the gateway device 22.
In order to verify the accuracy of the timestamp accuracy, n groups of delay data need to be acquired first, specifically, each time the length of the optical fiber is adjusted, a group of corresponding delay data is acquired. In order to ensure the accuracy of verification, the application reduces the number of variables involved in the verification process, namely the gateway equipment 22 used in the verification process is the same, namely the forwarding speeds corresponding to the gateway equipment 22 in n groups of delay data are the same, so that the time stamp accuracy can be verified by only changing the length of the optical fiber and changing the delay increment of the network packet caused by the length of the optical fiber.
Specifically, each set of delay data includes a transmission delay, a forwarding delay, a transmission timestamp, a reception timestamp, and a relationship between the four. The propagation delay is positively correlated with the length of the fiber, and typically, each 0.2 meter increase in length of the fiber increases the corresponding propagation delay by 1ns. The forwarding delay is a delay when the gateway apparatus 22 forwards the network packet, and is typically in the order of milliseconds, and is an attribute defined by the gateway apparatus 22 before leaving the factory. The transmission time stamp is the time when the transmission device 1 transmits the network packet, and the reception time stamp is the time when the reception device 3 receives the network packet. Specifically, the relation among the transmission delay, the forwarding delay, the sending timestamp and the receiving timestamp is that the transmission delay and the forwarding delay= (receiving timestamp-sending timestamp) ×initial timestamp precision, wherein the initial timestamp precision refers to the timestamp precision of any one of n groups of delay data.
In the above-mentioned relation, the transmission delay may be calculated by the length of the optical fiber, the forwarding delay may be obtained by reading the attribute of the gateway device 22, then calculating the difference between the receiving timestamp and the sending timestamp by the receiving device 3, and finally constructing the above-mentioned relation by the network tester 4 under the condition that the initial timestamp is unchanged, thereby obtaining one set of delay data. In the whole test process, similar to a double-blind test in medicine, the increase of the length of the optical fiber and the calculation of the difference value between the receiving time stamp and the sending time stamp are not the same group of people, and no communication channel exists (the length of the optical fiber is input into the network tester 4 by a tester and is not self-modifiable or determinable at the end of the network tester 4), so that the possibility of cheating is eliminated, and the reliability of a verification result is ensured.
In this example, the length of the optical fiber is sequentially increased or decreased, so that the transmission delay is also changed, and the difference between the receiving timestamp and the sending timestamp is changed, so that multiple sets of delay data are obtained, and the accuracy of the timestamp is verified through the multiple sets of delay data. When the length of the optical fiber is changed, the optical fiber between the transmitting device 1 and the gateway device 22 may be changed, the optical fiber between the gateway device 22 and the receiving device 3 may be changed, or the lengths of both optical fibers may be changed, and the specific changing manner is not limited herein. It should be further noted that, whether the length of the optical fiber is sequentially increased or the length of the optical fiber is sequentially decreased, the transmission delay caused by the change of the optical fiber length should be greater than the timestamp precision, because the receiving device 3 and the gateway device 22 may have clocks asynchronous, and the receiving device 3 and the gateway device 22 are driven by clocks with different driving frequencies, and the gateway device 22 is of a storage forwarding type, that is, the gateway device 22 receives all bytes of one network packet and forwards the network packet, and when the increment of the transmission delay is less than the timestamp precision, the increment of the transmission delay may fall on a non-driving timestamp of the gateway device 22, so that the gateway device 22 has no network packet to forward on the driving timestamp, and the network packet received in the non-driving timestamp is not forwarded, that is, the increment of the transmission delay is annihilated by the forwarding delay.
To illustrate the above annihilation, for example, as shown in fig. 3, if the driving frequency of the gateway device 22 is 300MHz, the maximum possible forwarding delay due to the asynchronous clock of the gateway device 22 reaches 3.3ns, and at this time, the clock period of the gateway device 22 is considered to be 3.3ns, i.e., a driving timestamp is reached after every 3.3ns, and the clock period is within 3.3ns as a non-driving timestamp. Again assuming that the driving frequency of the receiving device 3 is 400MHz, the time interval for each bit is 2.5ns, i.e. the time stamp accuracy is 2.5ns. If, in the first test, 0.5 meters of fiber were added such that the increment of transmission delay was 2.5ns, the gateway device 22 received the first network packet at a time of 0.2ns,0.2ns slightly later than the first clock edge 0 (drive timestamp) of the gateway device 22, then the first network packet would be in a state to be forwarded until the time reached the second clock edge 3.3ns, and the network packet would not be forwarded. Similarly, since the transmission delay of the network packet is 2.5ns, the time when the second network packet arrives at the receiving device 3 is 2.7ns, but 2.7ns is still later than the first clock edge 0 and earlier than the second clock edge 3.3ns, so the second network packet is still forwarded after the clock edge 3.3ns, so on the driving timestamp of 3.3ns, the first network packet and the second network packet are forwarded at the same time, and it is difficult for the receiving device 3 to know the transmission delay of the two packets before and after each other, that is, the transmission delay is annihilated.
For this reason, it is necessary to amplify the time stamp accuracy of the receiving apparatus 3 by changing the length of the optical fiber, for example, the initial time stamp accuracy of different sets of delay data is amplified by 10 times, 20 times, 100 times, etc., respectively, and may even be an arbitrarily large prime number times, the delay of the corresponding network packet will be increased by 25ns,50ns,250ns, etc., and the larger the increment of the transmission delay, the larger the amplification of the corresponding initial time stamp accuracy, the smaller the influence due to the above-mentioned clock-crossing domain will be.
And S2, calculating according to n groups of delay data to obtain the actual timestamp accuracy.
In the above-described relation, transmission delay+transfer delay= (reception timestamp-transmission timestamp) = initial timestamp accuracy, since the transmission delay is calculated by the length of the optical fiber, the transfer delay is also calculated by reading the attribute of the gateway device 22, and the difference between the reception timestamp and the transmission timestamp is calculated by the receiving device 3, the differences between the transmission delay, the transfer delay, the reception timestamp and the transmission timestamp are all known numbers, and only the initial timestamp accuracy is unknown, and the initial timestamp accuracy of each set of delay data is obtained by using the above-described relation.
In a specific example, the actual time stamp accuracy is calculated by obtaining an initial time stamp accuracy of each set of delay data in the n sets of delay data, and then calculating an average value of the n initial time stamp accuracy, and taking the average value as the actual time stamp accuracy of the receiving device 3.
Before calculating the actual timestamp accuracy, the maximum value and the minimum value of the initial timestamp accuracy in n groups of delay data are removed, or the initial timestamp accuracy beyond a threshold range is removed, so that the accuracy of the calculated actual timestamp accuracy is ensured.
In another specific example, the actual time stamp accuracy is calculated by obtaining an initial time stamp accuracy of each of the n sets of delay data and taking a mode of the n initial time stamp accuracy as the actual time stamp accuracy.
In addition, in the actual test, the method of calculating the accuracy of the actual timestamp is specifically adopted, and the present application is not limited herein.
And step S3, obtaining a verification result according to the actual time stamp precision and the preset time stamp precision.
First, a difference between an actual time stamp accuracy and a preset time stamp accuracy, which is a time stamp accuracy to be verified, is calculated. Then, the magnitude relation between the absolute value of the difference value and the difference value threshold value is judged, and when:
When the absolute value of the difference value is less than or equal to the difference value threshold value, obtaining a verification result as verification passing;
and when the absolute value of the difference value is greater than the difference value threshold value, obtaining a verification result that the verification is not passed.
The difference threshold is a value set in advance, and when the absolute value of the difference is smaller than or equal to the difference threshold, the actual timestamp precision is considered to be equal to the preset timestamp precision, which indicates that the preset timestamp precision passes verification.
Therefore, the application designs a verification mode based on the existing network architecture, realizes the aim of verifying the time stamp accuracy of the receiving equipment 3 by only changing the length of the optical fiber, precisely controls the increment of the transmission delay by the length of the optical fiber, avoids errors caused by clock domain crossing, and has no communication channel in the process of calculating the difference value between the receiving time stamp and the transmitting time stamp due to the increment of the length of the optical fiber, so the application has the effect of doubly guaranteeing the reliability of the verification result.
In summary, the implementation principle of the method for verifying the timestamp accuracy of the network device according to the embodiment of the application is that, firstly, the length of the transmission line 21 is changed, and the transmission delay is changed due to the change of the length of the transmission line 21, so that the difference value between the corresponding receiving timestamp and the corresponding transmitting timestamp is changed, and then, a relational expression is constructed according to the corresponding transmission delay, the forwarding delay, the difference value between the receiving timestamp and the transmitting timestamp and the initial timestamp accuracy during each adjustment, so as to obtain multiple groups of delay data. In each set of relation, the differences of the transmission delay, the forwarding delay, the receiving time stamp and the sending time stamp are all known numbers, so that the initial time stamp precision corresponding to each set of delay data can be obtained by calculating the relation. And finally, comprehensively calculating the actual timestamp precision by utilizing the calculated multiple initial timestamp precision, ensuring the accuracy of the obtained actual timestamp precision, further judging the size relation between the actual timestamp precision and the preset timestamp precision to obtain a final verification result, and when the difference between the actual timestamp precision and the preset timestamp precision is not greater than a threshold value difference value, indicating that the verification of the preset timestamp precision is passed, thereby improving the reliability of the timestamp precision used in network transmission.
Fig. 4 shows a block diagram of a time stamp accuracy verification system of a network device according to an embodiment of the application, the system comprising a data acquisition module 41, a data calculation module 42 and a data determination module 43.
The data acquisition module 41 is configured to acquire n sets of delay data, where n is greater than or equal to 2, and parameter values of the network channels 2 corresponding to the n sets of delay data are different, where the network channels 2 are composed of the transmission line 21 and the gateway device 22, and the parameter values refer to lengths of the transmission line 21.
The data calculation module 42 is configured to calculate the actual timestamp accuracy according to the n sets of delay data.
The data determining module 43 is configured to obtain a verification result according to the actual timestamp precision and the preset timestamp precision.
The modules involved in the embodiments of the present application may be implemented in software or in hardware. The described modules may also be provided in a processor, for example, a processor may be described as comprising a data acquisition module 41, a data calculation module 42 and a data determination module 43. The names of these modules do not constitute a limitation of the module itself in some cases, and the data acquisition module 41 may also be described as "a module for acquiring n sets of delay data", for example.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the described modules may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
In order to better execute the program of the method, the application also provides a timestamp accuracy verification device of the network equipment, which comprises a memory and a processor.
Wherein the memory may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory may include a storage program area that may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing a time stamp accuracy verification method of the network device, and the like, and a storage data area that may store data and the like involved in the time stamp accuracy verification method of the network device.
The processor may include one or more processing cores. The processor performs the various functions of the application and processes the data by executing or executing instructions, programs, code sets, or instruction sets stored in memory, calling data stored in memory. The processor may be at least one of an application specific integrated circuit, a digital signal processor, a digital signal processing device, a programmable logic device, a field programmable gate array, a central processing unit, a controller, a microcontroller, and a microprocessor. It will be appreciated that the electronics for implementing the above-described processor functions may be other for different devices, and embodiments of the present application are not particularly limited.
The application also provides a computer readable storage medium, such as a U disk, a mobile hard disk, a Read Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk or an optical disk, etc., which can store program codes. The computer readable storage medium stores a computer program that can be loaded by a processor and that performs the above method for verifying the accuracy of a timestamp of a network device.
The above description is only illustrative of the preferred embodiments of the present application and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in the present application is not limited to the specific combinations of technical features described above, but also covers other technical features which may be formed by any combination of the technical features described above or their equivalents without departing from the spirit of the disclosure. Such as the above-mentioned features and the technical features disclosed in the present application (but not limited to) having similar functions are replaced with each other.

Claims (9)

1. A method for verifying the accuracy of a timestamp of a network device, comprising:
acquiring n groups of delay data, wherein n is more than or equal to 2, the parameter values of network channels (2) corresponding to the n groups of delay data are different, the network channels (2) consist of transmission lines (21) and gateway equipment (22), and the parameter values refer to the lengths of the transmission lines (21);
Calculating according to n groups of delay data to obtain actual timestamp accuracy;
obtaining a verification result according to the actual timestamp precision and the preset timestamp precision;
Wherein,
The method for acquiring any one of n groups of delay data comprises the following steps:
-adjusting the length of a transmission line (21) to obtain a transmission delay, said transmission delay being positively correlated with the length of said transmission line (21);
Acquiring a forwarding delay, a sending timestamp and a receiving timestamp, wherein the forwarding delay is related to forwarding speed of the gateway device (22), the sending timestamp is the moment of sending out a network packet, and the receiving timestamp is the moment of receiving the network packet;
Building a relation from the transmission delay, the forwarding delay, the sending timestamp and the receiving timestamp:
Transmission delay+forwarding delay= (reception timestamp-transmission timestamp) ×initial timestamp accuracy, which is the timestamp accuracy of any one of n sets of delay data.
2. The method for verifying the accuracy of the timestamp of the network device according to claim 1, wherein when the length of the transmission line (21) is adjusted to obtain the transmission delay, the increment of the adjusted transmission delay is larger than the preset timestamp accuracy.
3. The method for verifying the timestamp accuracy of a network device according to claim 1, wherein the calculating the actual timestamp accuracy according to the n sets of delay data comprises:
calculating to obtain the initial time stamp precision of each group of delay data through the relational expression;
Calculating the average value of the initial timestamp precision of n groups of delay data;
And determining the mean value as the actual timestamp precision.
4. The method for verifying the timestamp accuracy of a network device according to claim 1, wherein the calculating the actual timestamp accuracy according to the n sets of delay data comprises:
calculating to obtain the initial time stamp precision of each group of delay data through the relational expression;
the mode of the initial timestamp accuracy of the n sets of delay data is determined to be the actual timestamp accuracy.
5. The method for verifying the timestamp accuracy of the network device according to claim 1, wherein the obtaining the verification result according to the actual timestamp accuracy and the preset timestamp accuracy includes:
Calculating a difference value between the actual timestamp precision and the preset timestamp precision;
When the absolute value of the difference value is less than or equal to a difference value threshold value, obtaining a verification result as verification passing;
And when the absolute value of the difference value is greater than the difference value threshold value, obtaining a verification result that the verification is not passed.
6. A time stamp accuracy verification system of a network device is applied to a network architecture, the network architecture comprises a sending device (1), a gateway device (22) and a receiving device (3), the sending device (1) is used for sending out a network packet and embedding a sending time stamp in the network packet, the gateway device (22) is used for receiving and forwarding the network packet, the receiving device (3) is used for receiving the network packet, and the gateway device (22) is respectively connected with the sending device (1) and the receiving device (3) through a transmission line (21), and the time stamp accuracy verification system is characterized by comprising a network tester (4) used for executing the method according to any one of claims 1-5.
7. The system for verifying the accuracy of a timestamp of a network device according to claim 6, wherein the receiving device (3) and the network tester (4) are the same network device.
8. The system of claim 6, wherein the transmission line is an optical fiber.
9. The time stamp accuracy verification system of a network device according to claim 6, wherein the network tester (4) comprises:
The data acquisition module (41) is used for acquiring n groups of delay data, wherein n is more than or equal to 2, the parameter values of network channels (2) corresponding to the n groups of delay data are different, the network channels (2) are composed of transmission lines (21) and gateway equipment (22), and the parameter values refer to the lengths of the transmission lines (21);
a data calculation module (42) for calculating an actual timestamp accuracy according to n groups of the delay data;
And the data determining module (43) is used for obtaining a verification result according to the actual timestamp precision and the preset timestamp precision.
CN202410739314.7A 2024-06-07 2024-06-07 A method and system for verifying the accuracy of timestamp of network equipment Active CN118694462B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410739314.7A CN118694462B (en) 2024-06-07 2024-06-07 A method and system for verifying the accuracy of timestamp of network equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410739314.7A CN118694462B (en) 2024-06-07 2024-06-07 A method and system for verifying the accuracy of timestamp of network equipment

Publications (2)

Publication Number Publication Date
CN118694462A CN118694462A (en) 2024-09-24
CN118694462B true CN118694462B (en) 2025-03-18

Family

ID=92774961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410739314.7A Active CN118694462B (en) 2024-06-07 2024-06-07 A method and system for verifying the accuracy of timestamp of network equipment

Country Status (1)

Country Link
CN (1) CN118694462B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116482964A (en) * 2023-03-29 2023-07-25 中国煤炭地质总局地球物理勘探研究院 A system and method for verifying the time accuracy of TB timestamp recording equipment
CN119995769A (en) * 2025-04-09 2025-05-13 深圳市丰润达科技有限公司 Adaptive time synchronization method, device, equipment and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111342926A (en) * 2020-02-28 2020-06-26 盛科网络(苏州)有限公司 Method for optimizing time synchronization of PTP (precision time protocol) in asymmetric network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10341083B2 (en) * 2016-09-09 2019-07-02 Huawei Technologies Co., Ltd. System and methods for network synchronization
CN111245542B (en) * 2018-11-28 2022-01-28 中兴通讯股份有限公司 Method for acquiring time stamp and time synchronization system
CN114745071B (en) * 2022-04-13 2024-07-30 芯河半导体科技(无锡)有限公司 High-precision time stamp verification method based on UVM
CN116482964A (en) * 2023-03-29 2023-07-25 中国煤炭地质总局地球物理勘探研究院 A system and method for verifying the time accuracy of TB timestamp recording equipment
CN118041830A (en) * 2024-02-07 2024-05-14 北京信而泰科技股份有限公司 Tester and test method for time-sensitive network gating mechanism

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111342926A (en) * 2020-02-28 2020-06-26 盛科网络(苏州)有限公司 Method for optimizing time synchronization of PTP (precision time protocol) in asymmetric network

Also Published As

Publication number Publication date
CN118694462A (en) 2024-09-24

Similar Documents

Publication Publication Date Title
CN118694462B (en) A method and system for verifying the accuracy of timestamp of network equipment
US7953014B2 (en) FPGA-based network device testing equipment for high load testing
US3934224A (en) Apparatus for continuous assessment of data transmission accuracy in a communication system
US6741952B2 (en) Instrument timing using synchronized clocks
US6985823B2 (en) System and method of testing a transceiver
WO2001028159A2 (en) System and method to determine data throughput in a communication network
EP2976866A2 (en) Timestamp correction in a multi-lane communication link with skew
CN111585836B (en) Automatic test method and device for time-sensitive network
CN112865901B (en) High-speed data packet acquisition system and method based on FPGA nanosecond timestamp
US6470031B1 (en) Method and apparatus for accurate packet time stamping
CN113282520B (en) EPA System Test Methods, EPA System Test Equipment and Media
US10033523B1 (en) Circuit for and method of measuring latency in an integrated circuit
US7493530B2 (en) Method and apparatus for detecting an error in a bit sequence
CN117014931A (en) Communication method and device
Depari et al. A new instrument for real-time ethernet performance measurement
CA2328256C (en) Methods and apparatus for exchanging data
CN101123482A (en) A device and method for testing sliding index in digital communication network
CN114814379B (en) A narrow pulse detection method, system, medium and equipment based on fault injection
CN116232597B (en) Plug-and-play measurement device independent quantum digital signature method based on untrusted source
Mulholland A Novel Technique for Sample Point Discovery and Its Use in a Proposed Broadcast Confusion Attack on High-Speed Controller Area Networks
JP3365160B2 (en) Error measurement circuit
KR100361493B1 (en) ATM Cell Formation and Testing Apparatus
CN117856986A (en) Circuit system design applied to bit error rate test
US6507934B1 (en) Apparatus and method for source synchronous link testing of an integrated circuit
CN101257418A (en) Method and device for bit error generation and system for implementing bit error insertion

Legal Events

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