CN109120469B - Line transmission delay calculation method and device - Google Patents

Line transmission delay calculation method and device Download PDF

Info

Publication number
CN109120469B
CN109120469B CN201710495000.7A CN201710495000A CN109120469B CN 109120469 B CN109120469 B CN 109120469B CN 201710495000 A CN201710495000 A CN 201710495000A CN 109120469 B CN109120469 B CN 109120469B
Authority
CN
China
Prior art keywords
line
message
network element
time
packet
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
CN201710495000.7A
Other languages
Chinese (zh)
Other versions
CN109120469A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201710495000.7A priority Critical patent/CN109120469B/en
Publication of CN109120469A publication Critical patent/CN109120469A/en
Application granted granted Critical
Publication of CN109120469B publication Critical patent/CN109120469B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/06Generation of reports

Landscapes

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

Abstract

The embodiment of the application discloses a method and a device for calculating line transmission delay. The scheme is applied to a first network element or a second network element, and a first line and a second line are respectively arranged between the first network element and the second network element. The method comprises the steps that a first network element sends a first message with a first wavelength to a second network element through a first line, the second network element returns the first message to the first network element through a second line, the first network element sends a second message with a second wavelength to the second network element through a second line, the second network element returns the second message to the first network element through the first line, T11, T12, T21 and T22 are obtained in the process, and the line transmission delay of the first message and the line transmission delay of the second message are calculated according to the T11, the T12, the T21 and the T22. According to the scheme, the line transmission delay of the first wavelength and the second wavelength can be calculated, the accuracy of obtaining the line transmission delay is improved, and optical fiber information such as the dispersion coefficient of the optical fiber and the length of the optical fiber is not required to be utilized.

Description

Line transmission delay calculation method and device
Technical Field
The present application relates to the field of communications, and in particular, to a method and an apparatus for calculating a line transmission delay.
Background
In the current transmission system, information is usually transmitted between two station network elements in a single-line bidirectional manner, such as a single-fiber bidirectional manner. Referring to fig. 1, a schematic diagram of a connection relationship between a first network element and a second network element is shown, in which the first network element and the second network element transmit information in a single-fiber bidirectional manner, where the first network element and the second network element are connected by an optical fiber, and the optical fiber is connected with the first network element and the second network element by an optical line interface board (SFIU) supporting synchronization information transmission. In addition, fig. 2 can be obtained by simplifying fig. 1, and referring to fig. 2, a transmitting port TX and a receiving port RX are both arranged in the first network element and the second network element, the first network element can send the message information of the first wavelength to the receiving port of the second network element through its own transmitting port, and the second network element can send the message information of the second wavelength to the receiving port of the first network element through its own transmitting port, thereby implementing single-fiber bidirectional information transmission.
In addition, when information is transmitted in a single-line bidirectional manner, sometimes it is necessary to calculate the line transmission delay of the first wavelength and the line transmission delay of the second wavelength, where the line transmission delay refers to the time consumed by the message of the first wavelength and the message of the second wavelength in the line respectively. The prior art generally adopts the following two methods to calculate the transmission delay of the line:
the first method calculates the line transmission delay by time stamp using 1588 clock synchronization protocol, and during the calculation, it is assumed that the line transmission delays of the first wavelength and the second wavelength are the same. Referring to the information interaction process shown in fig. 3, in the calculation process of the line transmission delay, a clock of a first network element is set as a first clock, a clock of a second network element is set as a second clock, a wavelength of a message sent by the first network element to the second network element is a first wavelength, a wavelength of a message sent by the second network element to the first network element is a second wavelength, the first network element sends a Sync synchronization message to the second network element at a time t1 of the first clock, where the Sync synchronization message includes a time t1, or, after the Sync synchronization message is sent, the first network element sends a Follow message that includes the time t1 to the second network element; the second network element receives the Sync synchronization message at the time t2 of the second clock, and then sends a Delay _ Req request message to the first network element at the time t3 of the second clock; the first network element receives the Delay _ Req request message at time t4 of the first clock, and then the first network element sends a Delay _ Resp reply message containing time t4 to the second network element, so that the second network element determines the actual time when the first network element receives the Delay _ Req request message. In this case, the second network element can obtain the timestamp data t1, t2, t3 and t4, and since the line transmission delays of the first wavelength and the second wavelength are assumed to be the same in this method, the following formula can be obtained: t2-t1 ═ Delay + Offset, and t4-t3 ═ Delay-Offset. In the formula, Offset represents the time deviation between the first clock and the second clock, 2Delay represents the total time consumption of the message with the first wavelength and the message with the second wavelength in the line, and Delay is used as the line transmission Delay of the first wavelength and the second wavelength. Accordingly, the Delay of the line transmission between the first wavelength and the second wavelength is calculated to be [ (t2-t1) + (t4-t3) ]/2. Further, in this way, the time Offset of the first clock and the second clock [ (t2-t1) - (t4-t3) ]/2 can be calculated.
In the second method, if a single-fiber bidirectional mode is adopted to transmit information, optical fiber information is required to be acquired, the optical fiber information comprises the dispersion coefficient of an optical fiber and the length of the optical fiber, then the delay difference between the first wavelength and the second wavelength is calculated according to the optical fiber information, and the line transmission delay of the first wavelength and the line transmission delay of the second wavelength are determined according to the delay difference. For example, if the first wavelength is 1491nm and the second wavelength is 1511nm, i.e. the wavelength interval between the first wavelength and the second wavelength is 20nm, and if the length of the optical fiber is 100km and the optical fiber connecting the first network element and the second network element is a g.652 optical fiber, the dispersion coefficient of which is 15ps/nm/km, the delay difference between the first wavelength and the second wavelength is about: 20 × 15 × 100 ═ 30 ns. And further calculating to obtain the line transmission delay of the first wavelength and the line transmission delay of the second wavelength according to the delay difference.
However, in the research process of the present application, the inventor finds that if the line transmission delay is calculated by the first method, because the line transmission delays of the first wavelength and the second wavelength are not the same and there is a delay difference between the two in the actual process of transmitting information by using a single-fiber bidirectional manner, the calculated line transmission delay is not accurate, and even the accuracy requirement of clock synchronization cannot be met sometimes. For example, if the delay difference between the first wavelength and the second wavelength is 30ns, calculating the line transmission delay by the first method may cause the first network element and the second network element to have an error of about 15ns, and along with the evolution and development of the wireless technology, the clock synchronization requirement of each network element needs to be maintained at an accuracy of 5ns in some cases, so that the method cannot meet the accuracy requirement of the wireless cooperative service on the clock synchronization. The second method is used for calculating the line transmission delay, optical fiber information needs to be acquired, but in practical application, the optical fiber information cannot be acquired frequently, so that the line transmission delay of the first wavelength and the line transmission delay of the second wavelength cannot be calculated.
Disclosure of Invention
The application provides a method and a device for calculating line transmission delay, which are used for solving the problem that the line transmission delay cannot be accurately calculated or only can be calculated by acquiring optical fiber information through calculation in the prior art.
In a first aspect, the present application provides a line transmission delay calculation method, which is applied to a first network element, where the first network element is connected to a second network element through a first line and a second line, respectively, and the line transmission delay calculation method includes:
the first network element sends a first message with a first wavelength to the second network element through a first line;
the first network element receives the first message returned by the second network element through a second line, determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message, and receives the residence time T12 of the first message in the second network element from the second network element;
the first network element sends a second message with a second wavelength to the second network element through a second line;
the first network element receives the second message returned by the second network element through a first line, determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message, and receives the residence time T22 of the second message in the second network element from the second network element;
and the first network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to T11, T12, T21 and T22.
By the line transmission delay calculation method disclosed by the embodiment of the invention, the line transmission delay of the first wavelength and the line transmission delay of the second wavelength can be calculated, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
With reference to the first aspect, in a first possible implementation manner of the first aspect, the calculating, by the first network element, the line transmission delay of the first packet and the line transmission delay of the second packet according to T11, T12, T21, and T22 includes:
calculating the difference value between the T11 and the T12, and taking the difference value as the transmission time T13 of the first message in the first line and the second line;
calculating the difference value between the T21 and the T22, and taking the difference value as the transmission time T23 of the second message in the first line and the second line;
calculating the time ratio of the T23 to the T13, and taking the time ratio as the speed ratio V1/V2 of the first message to the second message;
determining the ratio T1(L1)/T2(L1) of the line transmission delay of the first message and the second message in the first line respectively according to the V1/V2;
according to the total time consumption of the first message and the second message in the first line and the T1(L1)/T2(L1), calculating the line transmission delay T1(L1) of the first message in the first line and the line transmission delay T2(L1) of the second message in the first line, and/or according to the total time consumption of the first message and the second message in the second line and the T1(L1)/T2(L1), calculating the line transmission delay T1(L2) of the first message in the second line and the line transmission delay T2(L2) of the second message in the second line.
With reference to the first aspect, in a second possible implementation manner of the first aspect, the method further includes:
setting the clock of the first network element as a first clock, setting the clock of the second network element as a second clock, and transmitting a third message with a first wavelength to the second network element by the first network element through a first line at the time t10 of the first clock;
the first network element receives a fourth message from the second network element, where the fourth message includes a time t20, and the time t20 is a time recorded by a second clock by the second network element when the third message is received;
the first network element receives a fifth message with a second wavelength, which is transmitted by the second network element, through a first line, and records, through the first clock, that the time when the fifth message is received is the time t 40;
the first network element receives a sixth message from the second network element, where the sixth message includes a time t30, and the time t30 is a time of the second network element transmitting the fifth message recorded by a second clock;
after the first network element calculates the line transmission delay of the first message in the first line and the line transmission delay of the second message in the first line, calculating the delay difference between the first message and the second message;
taking t10, t20, t30 and t40 as timestamp information, and performing delay compensation on a target timestamp in the timestamp information by the first network element according to the delay difference, wherein the target timestamp is a timestamp corresponding to a wavelength transmission information with a smaller delay through a line;
and the first network element calculates the time deviation between the first network element and the second network element according to the time stamp information after the time delay compensation.
Through the steps, the time deviation between the first network element and the second network element can be calculated, and compared with the first method disclosed by the prior art, the method improves the precision of calculating the time deviation.
With reference to the first aspect, with reference to the first possible implementation manner of the first aspect, with reference to the second possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the method further includes:
if the first line is an optical fiber, after calculating the line transmission delay of the first message in the first line, calculating the ratio of the light speed to the refractive index of the first message in the first line, and taking the ratio as the transmission speed of the first message in the first line;
and calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
By this step, line ranging can be realized.
With reference to the third possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the method further includes:
if the first line is an optical fiber, calculating the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line and the wavelength interval of the first wavelength and the second wavelength after calculating the line transmission delay of the first message and the line transmission delay of the second message.
Through the steps, the dispersion coefficient of the line can be obtained, and the diversified requirements of workers are met.
In a second aspect, the present application further provides a method for calculating a line transmission delay,
the method is applied to a first network element, the first network element is respectively connected with a second network element through a first line and a second line, and the line transmission delay calculation method comprises the following steps:
the first network element sends a first message with a first wavelength to the second network element through a first line;
the first network element receives the first message returned by the second network element through a second line, and determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message;
the first network element sends a second message with a second wavelength to the second network element through a second line;
the first network element receives the second message returned by the second network element through a first line, and determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message;
the first network element transmits the T11 and T21 to the second network element.
By the line transmission delay calculation method disclosed by the embodiment of the invention, the line transmission delay of the first wavelength and the line transmission delay of the second wavelength can be calculated, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
In a third aspect, the present application further provides a line transmission delay calculation method, which is applied to a second network element, where the second network element is connected to a first network element through a first line and a second line, and the line transmission delay calculation method includes:
the second network element receives a first message with a first wavelength transmitted by the first network element through a first line;
the second network element transmits the first message back to the first network element through a second line, records the residence time T12 of the first message in the second network element, and receives the total delay time T11 of the first message from the first network element;
the second network element receives a second message with a second wavelength, which is transmitted by the first network element through a second line;
the second network element transmits the second message back to the first network element through a first line, records the residence time T22 of the second message in the second network element, and receives the total delay time T21 of the second message from the first network element;
and the second network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to T11, T12, T21 and T22.
By the line transmission delay calculation method disclosed by the embodiment of the invention, the line transmission delay of the first wavelength and the line transmission delay of the second wavelength can be calculated, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
With reference to the third aspect, in a first possible implementation manner of the third aspect, the calculating, by the second network element, the line transmission delay of the first packet and the line transmission delay of the second packet according to T11, T12, T21, and T22 includes:
calculating the difference value between the T11 and the T12, and taking the difference value as the transmission time T13 of the first message in the first line and the second line;
calculating the difference value between the T21 and the T22, and taking the difference value as the transmission time T23 of the second message in the first line and the second line;
calculating the time ratio of the T23 to the T13, and taking the time ratio as the speed ratio V1/V2 of the first message to the second message;
determining the ratio T1(L1)/T2(L1) of the line transmission delay of the first message and the second message in the first line respectively according to the V1/V2;
according to the total time consumption of the first message and the second message in the first line and the T1(L1)/T2(L1), calculating the line transmission delay T1(L1) of the first message in the first line and the line transmission delay T2(L1) of the second message in the first line, and/or according to the total time consumption of the first message and the second message in the second line and the T1(L1)/T2(L1), calculating the line transmission delay T1(L2) of the first message in the second line and the line transmission delay T2(L2) of the second message in the second line.
With reference to the third aspect, in a second possible implementation manner of the third aspect, the method further includes:
setting the clock of the first network element as a first clock, setting the clock of the second network element as a second clock, and receiving, by the second network element, a third message with a first wavelength transmitted by the first network element through a first line, and recording, by the second clock, a time t20 at which the third message is received;
the second network element receives a seventh message from the first network element, where the seventh message includes a time t10, and the time t10 is a time recorded by the first network element through the first clock when the third message is transmitted;
the second network element transmits a fifth message with a second wavelength to the first network element through a first line, and records the t30 moment of transmitting the fifth message through the second clock;
the second network element receives an eighth message from the first network element, where the eighth message includes a time t40, and the time t40 is a time recorded by the first network element through a first clock when the fifth message is received;
after calculating the line transmission delay of the first message and the line transmission delay of the second message, the second network element calculates the delay difference between the first message and the second message;
taking t10, t20, t30 and t40 as timestamp information, and performing delay compensation on a target timestamp in the timestamp information by the second network element according to the delay difference, wherein the target timestamp is a timestamp acquired when information is transmitted through a line with a wavelength with a smaller delay;
and the second network element calculates the time deviation between the first network element and the second network element according to the time stamp information after the time delay compensation.
With reference to the third aspect, with reference to the first possible implementation manner of the third aspect, with reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the method further includes:
if the first line is an optical fiber, after calculating the line transmission delay of the first message in the first line, calculating the ratio of the light speed to the refractive index of the first message in the first line, and taking the ratio as the transmission speed of the first message in the first line;
and calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
By this step, line ranging can be realized.
With reference to the third possible implementation manner of the third aspect, in a fourth possible implementation manner of the second aspect, the method further includes:
if the first line is an optical fiber, calculating the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line and the wavelength interval of the first wavelength and the second wavelength after calculating the line transmission delay of the first message and the line transmission delay of the second message.
Through the steps, the dispersion coefficient of the line can be obtained, and the diversified requirements of workers are met.
In a fourth aspect, the present application further provides a line transmission delay calculation method, which is applied to a second network element, where the second network element is connected to a first network element through a first line and a second line, and the line transmission delay calculation method includes:
the second network element receives a first message with a first wavelength transmitted by the first network element through a first line;
the second network element transmits the first message back to the first network element through a second line, and records the residence time T12 of the first message in the second network element;
the second network element receives a second message with a second wavelength, which is transmitted by the first network element through a second line;
the second network element transmits the second message back to the first network element through a first line, and records the residence time T22 of the second message in the second network element;
the second network element transmits T12 and T22 to the first network element.
By the line transmission delay calculation method disclosed by the embodiment of the invention, the line transmission delay of the first wavelength and the line transmission delay of the second wavelength can be calculated, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
In a fifth aspect, the present application further provides a line transmission delay calculation apparatus, where the line transmission delay calculation apparatus includes a module configured to perform the method steps in the various implementations of the first aspect.
In a sixth aspect, the present application further provides a line transmission delay calculation apparatus, where the line transmission delay calculation apparatus includes a module configured to perform the method steps in various implementations of the second aspect.
In a seventh aspect, the present application further provides a line transmission delay calculation apparatus, where the line transmission delay calculation apparatus includes a module configured to perform the method steps in the various implementation manners of the third aspect.
In an eighth aspect, the present application further provides a line transmission delay calculation apparatus, where the line transmission delay calculation apparatus includes a module configured to perform the method steps in the various implementation manners of the fourth aspect.
In a ninth aspect, the present application further provides a line transmission delay calculating system, including:
the first network element is connected with the second network element through a first line and a second line respectively;
the first network element sends a first message with a first wavelength to the second network element through a first line;
after receiving the first message, the second network element transmits the first message back to the first network element through a second line, and records the residence time T12 of the first message in the second network element;
the second network element transmits the T12 to the first network element;
the first network element receives the first message returned by the second network element through a second line, determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message, and receives the residence time T12 of the first message in the second network element from the second network element;
the first network element sends a second message with a second wavelength to the second network element through a second line;
after receiving the second message, the second network element transmits the second message back to the first network element through a first line, and records the residence time T22 of the second message in the second network element;
the second network element transmits the T22 to the first network element;
the first network element receives the second message returned by the second network element through a first line, determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message, and receives the residence time T22 of the second message in the second network element from the second network element;
and the first network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to T11, T12, T21 and T22.
In a tenth aspect, the present application further provides a line transmission delay calculating system, including:
the first network element is connected with the second network element through a first line and a second line respectively;
the first network element sends a first message with a first wavelength to the second network element through a first line;
after receiving the first message, the second network element transmits the first message back to the first network element through a second line, and records the residence time T12 of the first message in the second network element;
the first network element receives the first message returned by the second network element through a second line, and determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message;
the first network element sends a second message with a second wavelength to the second network element through a second line;
after receiving the second message, the second network element transmits the second message back to the first network element through a first line, and records the residence time T22 of the second message in the second network element;
the first network element receives the second message returned by the second network element through a first line, and determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message;
the first network element transmits T11 and T21 to a second network element;
and the second network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to T11, T12, T21 and T22.
In an eleventh aspect, the present application further provides a network element, including: a transceiver, a processor, and a memory; the transceiver is used for receiving and transmitting messages with other network elements and transmitting the messages received from other network elements to the processor; the processor is configured to obtain a message transmitted by the transceiver, and execute a program or an instruction stored in the memory, thereby implementing the line transmission delay calculation method according to the various implementation manners of the first aspect.
In a twelfth aspect, the present application further provides a network element, including: a transceiver, a processor, and a memory; the transceiver is used for receiving and transmitting messages with other network elements and transmitting the messages received from other network elements to the processor; the processor is configured to obtain a message transmitted by the transceiver, and execute a program or an instruction stored in the memory, thereby implementing the line transmission delay calculation method according to the various implementation manners of the second aspect.
In a thirteenth aspect, the present application further provides a network element, including: a transceiver, a processor, and a memory; the transceiver is used for receiving and transmitting messages with other network elements and transmitting the messages received from other network elements to the processor; the processor is configured to obtain a message transmitted by the transceiver, and execute a program or an instruction stored in the memory, thereby implementing the line transmission delay calculation method according to the various implementation manners of the third aspect.
In a fourteenth aspect, the present application further provides a network element, including: a transceiver, a processor, and a memory; the transceiver is used for receiving and transmitting messages with other network elements and transmitting the messages received from other network elements to the processor; the processor is configured to obtain a message transmitted by the transceiver, and execute a program or an instruction stored in the memory, so as to implement the line transmission delay calculation method according to the various implementation manners of the fourth aspect.
In a fifteenth aspect, the present invention further provides a computer program product, which includes instructions that, when executed on a computer, cause the computer to perform the method of the first aspect.
In a sixteenth aspect, the present invention further provides a computer program product, which includes instructions that, when executed on a computer, cause the computer to execute the method of the second aspect.
In a seventeenth aspect, the present invention also provides a computer program product, which includes instructions that, when executed on a computer, cause the computer to perform the method of the third aspect.
In an eighteenth aspect, embodiments of the present invention also provide a computer program product, which includes instructions that, when executed on a computer, cause the computer to perform the method of the fourth aspect.
In a nineteenth aspect, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, part or all of the steps in each embodiment of the line transmission delay calculation method provided in the first aspect may be implemented.
In a twentieth aspect, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, part or all of the steps in each embodiment of the line transmission delay calculation method provided in the second aspect may be implemented.
In a twenty-first aspect, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, part or all of the steps in each embodiment of the line transmission delay calculation method provided in the third aspect may be implemented.
In a twenty-second aspect, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, part or all of the steps in each embodiment of the line transmission delay calculation method provided in the fourth aspect may be implemented.
According to the scheme disclosed by the embodiment of the invention, the line transmission delay of the first wavelength and the line transmission delay of the second wavelength can be calculated, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
Drawings
In order to more clearly explain the technical solution of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious to those skilled in the art that other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a schematic diagram of a connection relationship between a first network element and a second network element disclosed in the prior art;
fig. 2 is a schematic diagram of a connection relationship between the first network element and the second network element obtained by simplifying the processing of fig. 1;
FIG. 3 is a schematic diagram of an information interaction process disclosed in the prior art;
fig. 4 is a schematic view of an application scenario in a method for calculating a line transmission delay disclosed in the embodiment of the present application;
fig. 5 is a schematic workflow diagram of a method for calculating a line transmission delay according to an embodiment of the present application;
fig. 6 is a schematic diagram of a connection relationship between the first network element and the second network element obtained by simplifying the processing of fig. 4;
fig. 7 is a schematic diagram of a working flow of calculating a line transmission delay of a first wavelength and a line transmission delay of a second wavelength in a line transmission delay calculation method disclosed in an embodiment of the present application;
fig. 8 is a schematic diagram of an information interaction process in a method for calculating a line transmission delay according to an embodiment of the present application;
fig. 9 is a schematic diagram of a workflow of calculating a time offset in a method for calculating a line transmission delay according to an embodiment of the present application;
fig. 10 is a schematic view of an application scenario of a method for calculating a line transmission delay according to an embodiment of the present application;
fig. 11 is a schematic workflow diagram of another line transmission delay calculation method disclosed in the embodiment of the present application;
fig. 12 is a schematic workflow diagram of another line transmission delay calculation method disclosed in the embodiment of the present application;
fig. 13 is a schematic diagram of an information interaction process in a method for calculating a line transmission delay according to an embodiment of the present application;
fig. 14 is a schematic diagram of a workflow of calculating a time offset in a method for calculating a line transmission delay according to an embodiment of the present application;
fig. 15 is a schematic workflow diagram of another line transmission delay calculation method disclosed in the embodiment of the present application;
fig. 16 is a schematic structural diagram of a circuit transmission delay calculating apparatus according to an embodiment of the present application;
fig. 17 is a schematic structural diagram of another line transmission delay calculation apparatus according to an embodiment of the present application;
fig. 18 is a schematic structural diagram of another line transmission delay calculation apparatus according to an embodiment of the present application;
fig. 19 is a schematic structural diagram of another line transmission delay calculation apparatus according to an embodiment of the present application.
Detailed Description
Embodiments of the present invention will be described below with reference to the accompanying drawings.
The embodiment of the invention discloses a method and a device for calculating line transmission delay, which are used for solving the problem that the line transmission delay is not accurate through calculation in the prior art or can be calculated only by acquiring optical fiber information.
The first embodiment of the invention discloses a method for calculating the transmission delay of a line. Referring to the schematic view of the application scenario shown in fig. 4, the first network element is connected to the second network element through a first line and a second line, where the first line and the second line can both transmit and receive message information in two directions. In addition, if the first line and the second line are optical fibers, the first line and the second line may be connected to the first network element and the second network element through an optical line interface board (SFIU, for short) supporting transmission of synchronization information, or through other components, and two sets of optical supervisory channels (OSC, for short) are formed through the first line and the second line.
The line transmission delay calculation method disclosed in the embodiment of the present invention is applied to a first network element, and is shown in a schematic working flow diagram in fig. 5, and includes the following steps:
step S11, the first network element sends a first message with a first wavelength to the second network element through a first line.
After the first network element sends the first message, the second network element receives the first message through a receiving port connected with the first line and transmits the first message to a controller of the second network element through the receiving port; and after receiving the first message, the controller of the second network element transmits the first message to a sending port connected with the second line, and then transmits the first message back to the first network element through the sending port connected with the second line.
Therefore, the first packet will reside in the second network element for a certain period of time, and the second network element records the residence time T12 of the first packet in the second network element.
Step S12, the first network element receives the first packet returned by the second network element through the second line, determines the total delay time T11 of the first packet according to the sending time and the receiving time of the first packet, and receives the residence time T12 of the first packet in the second network element from the second network element.
When a first network element sends a first message to a second network element through a first line, the sending time of the first message is recorded, and when the first message is received through a second line, the receiving time of the first message is recorded. In this case, the total delay time T11 of the first packet is the difference between the receiving time and the sending time of the first packet.
After recording the residence time T12 of the first packet in the second network element, the second network element transmits T12 to the first network element, so that the first network element obtains the residence time T12 of the first packet transmitted by the second network element in the second network element.
Step S13, the first network element sends a second message with a second wavelength to the second network element through a second line.
After the first network element sends the second message, the second network element receives the second message through a receiving port connected with the second line and transmits the second message to a controller of the second network element through the receiving port; and after receiving the second message, the controller of the second network element transmits the second message to the sending port connected with the first line, and then transmits the second message back to the first network element through the sending port connected with the first line.
In this case, the second packet will also reside in the second network element for a period of time, and the second network element will record the residence time T22 of the second packet in the second network element.
Step S14, the first network element receives the second packet returned by the second network element through the first line, determines the total delay time T21 of the second packet according to the sending time and the receiving time of the second packet, and receives the residence time T22 of the second packet in the second network element from the second network element.
When the first network element sends the second message to the second network element through the second line, the sending time of the second message is recorded, and when the second message is received through the first line, the receiving time of the second message is recorded. In this case, the total delay time T21 of the second packet is the difference between the receiving time and the sending time of the second packet.
After recording the residence time T22 of the second packet in the second network element, the second network element transmits T22 to the first network element, so that the first network element obtains the residence time T22 of the second packet transmitted by the second network element in the second network element.
Step S15, the first network element calculates the line transmission delay of the first packet and the line transmission delay of the second packet according to T11, T12, T21, and T22.
The first network element may calculate the total delay time T11 of the first packet, the residence time T12 of the first packet in the second network element, the total delay time T21 of the second packet, and the residence time T22 of the second packet in the second network element, so as to obtain the line transmission delay of the first wavelength and the line transmission delay of the second wavelength, respectively.
The embodiment of the invention discloses a method for calculating the transmission delay of a line. Compared with the prior art, the line transmission delay calculation method disclosed by the embodiment is applied to the first network element, and the first line and the second line are respectively arranged between the first network element and the second network element. In the line transmission delay calculation method, a first network element sends a first message with a first wavelength to a second network element through a first line, and after receiving the first message, the second network element records the residence time T12 of the first message in the second network element and transmits the first message back to the first network element through a second line; after receiving the first message through the second line, the first network element determines the total delay time T11 of the first message and obtains T12 transmitted by the second network element; in addition, the first network element sends a second message with a second wavelength to the second network element through the second line, and after receiving the second message, the second network element records the residence time T22 of the second message in the second network element and transmits the second message back to the first network element through the first line; after receiving the second message through the first line, the first network element determines the total delay time T21 of the second message, and obtains T22 transmitted by the second network element; then, the first network element may calculate the line propagation delay of the first wavelength and the line propagation delay of the second wavelength according to T11, T12, T21, and T22.
By the line transmission delay calculation method disclosed by the embodiment of the invention, the line transmission delay of the first wavelength and the line transmission delay of the second wavelength can be calculated, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
In order to elaborate how the first network element T11, T12, T21 and T22 calculates the line transmission delay of the first packet and the line transmission delay of the second packet, as a refinement of the method of fig. 4, the present invention discloses a second embodiment, and the step S15 is further explained by the second embodiment.
In order to enhance the understanding of step S15, the application scenario diagram disclosed in fig. 4 is further refined to obtain fig. 6. Referring to fig. 6, a first line between the first network element and the second network element is L1, and a second line between the first network element and the second network element is L2, where L1 and L2 can both transmit information in a single-fiber bidirectional manner.
Referring to the workflow diagram shown in fig. 7, in the second embodiment of the present invention, the calculating, by the first network element, the line transmission delay of the first packet and the line transmission delay of the second packet according to T11, T12, T21, and T22 includes the following steps:
and S151, calculating a difference value between the T11 and the T12, and taking the difference value as transmission time T13 of the first message in the first line and the second line.
That is, T13-T11-T12.
And S152, calculating the difference value between the T21 and the T22, and taking the difference value as the transmission time T23 of the second message in the first line and the second line.
That is, T23-T21-T22.
And S153, calculating the time ratio of the T23 to the T13, and taking the time ratio as the speed ratio V1/V2 of the first message to the second message.
Since the first packet and the second packet have the same path length and are the sum of the lengths of the first line and the second line, T13 × V1 is T23 × V2, and thus V1/V2 is T23/T13.
Step S154, according to the V1/V2, determining the ratio T1(L1)/T2(L1) of the line transmission delay of the first message and the second message in the first line respectively.
Since T1(L1) × V1 is L1 and T2(L1) × V2 is L1, it can be determined that T1(L1) × V1 is T2(L1) × V2. Therefore, T1(L1)/T2(L1) ═ V2/V1 can be determined. Where L1 is the length of the first line.
Step S155, according to the total time consumption of the first packet and the second packet in the first line and the T1(L1)/T2(L1), calculating a line transmission delay T1(L1) of the first packet in the first line and a line transmission delay T2(L1) of the second packet in the first line, and/or according to the total time consumption of the first packet and the second packet in the second line and the T1(L1)/T2(L1), calculating a line transmission delay T1(L2) of the first packet in the second line and a line transmission delay T2(L2) of the second packet in the second line.
In addition, the specific value of the total time consumption of the first message and the second message in the first line, or the specific value of the total time consumption of the first message and the second message in the second line, may be obtained by a timestamp when information is transferred between the first network element and the second network element.
Specifically, referring to the information interaction process shown in fig. 2, a clock of the first network element is set as a first clock, a clock of the second network element is set as a second clock, a wavelength of a message sent by the first network element to the second network element is a first wavelength, and a wavelength of a message sent by the second network element to the first network element is a second wavelength, and in the information interaction process, a line used when the first network element sends the message to the second network element is the same as a line used when the second network element sends the message to the first network element (that is, both the first line and the second line). The first network element sends a Sync synchronization message to the second network element at the time t1 of the first clock, wherein the Sync synchronization message contains the time t1, or after the Sync synchronization message is sent, the first network element sends a Follow message containing the time t1 to the second network element; the second network element receives the Sync synchronization message at the time t2 of the second clock, and then sends a Delay _ Req message to the first network element at the time t3 of the second clock; the first network element receives the Delay _ Req request message at time t4 of the first clock, and then the first network element sends a Delay _ Resp reply message containing time t4 to the second network element, so that the second network element determines the actual time when the first network element receives the Delay _ Req request message. In this case, the second network element can acquire the timestamp information t1, t2, t3, and t4, from which 2 xdelay [ (t2-t1) + (t4-t3) ] can be determined. If the line used when the first network element sends the message to the second network element is the first line, the 2 × Delay obtained according to the timestamp information t1, t2, t3, and t4 is the total consumed time in the first line. If the line used when the first network element sends the message to the second network element is the second line, the 2 × Delay obtained according to the timestamp information t1, t2, t3, and t4 is the total consumed time in the second line.
In this case, since the wavelength of the first message is the first wavelength and the wavelength of the second message is the second wavelength, the specific value of 2 × Delay obtained by the calculation according to the above steps is the total consumed time of the first message and the second message. If the 2 × Delay is the total time consumption in the first line, the specific value of the total time consumption of the first message and the second message in the first line is 2 × Delay; if the 2 × Delay is the total time consumption in the second line, the specific value of the total time consumption of the first message and the second message in the second line is 2 × Delay.
In addition, the length of the second line is set to be L2, since V1/V2 is T23/T13, and T1(L2) × V1 is L2, and T1(L2) × V2 is L2, it can be determined that T1(L2)/T2(L2) is V2/V1, that is, the ratio of the line transmission delays of the first message and the second message in the second line is also V2/V1, and the ratio of the line transmission delays of the first message and the second message in the second line is the same as the ratio of the line transmission delays of the first message and the second message in the first line. In this case, according to the total time consumption of the first packet and the second packet in the second line and the ratio T1(L1)/T2(L1) of the line transmission delays of the first packet and the second packet in the first line, respectively, the line transmission delay T1(L2) of the first wavelength in the second line and the line transmission delay T2(L2) of the second wavelength in the second line can be calculated.
In order to clarify the advantages of the line transmission delay calculation method disclosed in the embodiment of the present invention and the first method in the prior art, the line transmission delay calculation method disclosed in the embodiment of the present invention and the first method in the prior art are described below with reference to a specific example.
Referring to the schematic application scenario shown in fig. 6, assuming that the second clock of the second network element is 10ns faster than the first clock of the first network element, the first network element sends the first packet with the first wavelength to the second network element, the second network element sends the second packet with the second wavelength to the first network element, the first wavelength is 1511nm, the second wavelength is 1491nm, the line transmission delay T1(L1) of the first packet on the first line is 80ns, and the line transmission delay T2(L1) of the second packet on the first line is 100 ns.
When the line transmission delays of the first message and the second message are calculated by the first method disclosed in the prior art, the first network element sends the first message with a wavelength of 1511nm to the second network element at the time of Ta (assuming that Ta is 20, and the time of the second network element at this time is Tb + Ta +10 is 30), and then t1 is 20. When the second network element receives the first packet at time T2, T2 ═ Tb + T1(L1) ═ Ta +10+ T1(L1) ═ 20+10+80 ═ 110. Assuming that the second network element sends the protocol packet to the first network element at the time Tb +200, t3, Tb +200, Ta +10+200, 20+10+200, and 230. When the first network element receives the protocol packet at time T4, T4 is T3-10+ T2(L1) is 230-10+100 is 320.
In this case, according to the formula: t2-t1 ═ Delay + Offset, t4-t3 ═ Delay-Offset, we can get: offset is [ (t2-t1) - (t4-t3) ]/2, Delay is [ (t2-t1) + (t4-t3) ]/2, so that the line transmission Delay of the first wavelength and the line transmission Delay of the second wavelength are both 90ns, and the time deviation Offset of the first clock and the second clock is 0ns, which has an error from the actual situation. That is, if the line transmission delay is calculated by the first method in the prior art, there is an error and the accuracy is low.
By adopting the line transmission delay calculation method disclosed by the embodiment of the invention, it is also assumed that the second clock of the second network element is 10ns faster than the first clock of the first network element, the first network element sends the message with the first wavelength to the second network element through the first line, and the first network element receives the message with the first wavelength returned by the second network element through the second line, the first network element sends the message with the second wavelength to the second network element through the second line, and the first network element receives the message with the second wavelength returned by the second network element through the first light, the first wavelength is 1511nm, the second wavelength is 1491nm, and the line propagation delay T1(L1) of the first wavelength on the first line is 80ns, the line propagation delay T2(L1) of the second wavelength on the first line is 100ns, the line propagation delay T1(L2) of the first wavelength on the second line is 100ns, and the line propagation delay T2(L2) of the second wavelength on the second line is 125 ns. Meanwhile, for the sake of calculation, both T12 and T22 are set to 0.
In this case, on the first line, according to the first method disclosed in the prior art, t1 ═ 20, t2 ═ 110, t3 ═ 230, and t4 ═ 320 can be determined, and according to the formula Delay [ (t2-t1) + (t4-t3) ]/2, it can be known that 2 × Delay ═ t [ (t2-t1) + (t4-t3) ], 180.
Then, the line transmission delay calculation method disclosed by the embodiment of the invention is adopted for calculation. The path through which the message with the first wavelength passes is as follows: a1- > B1- > B2- > A2; the path through which the message with the second wavelength passes is as follows: a2- > B2- > B1- > A1. Accordingly, the transmission time T13 of the first packet in the first line and the second line is T1(L1) + T1(L2) is 80ns +100ns is 180 ns; the transmission time T23 of the second packet in the first line and the second line is T2(L1) + T2(L2) is 100ns +125ns is 225 ns. By the line transmission delay calculation method disclosed by the embodiment of the invention, the following calculation process can be obtained:
V1/V2=T23/T13 =>V1/V2=225/180;
T1(L1)×V1=T2(L1)×V2 =>T1(L1)/T2(L1)=V2/V1=180/225;
T1(L1)+T2(L1)=2×Delay =>T1(L1)+T2(L1)=180。
according to the above calculation process, the line propagation delay T1(L1) of the first wavelength on the first line is 80ns, and the line propagation delay T2(L1) of the second wavelength on the first line is 100ns, which is consistent with the assumption. Compared with the calculation result obtained by the first method disclosed in the prior art, the method improves the accuracy of calculating the transmission delay of the line.
Further, referring to the information interaction process schematic diagram shown in fig. 8 and the workflow schematic diagram shown in fig. 9, in this embodiment or some other embodiments of the present invention, the method may further include the following steps:
step S91, setting the clock of the first network element as a first clock, the clock of the second network element as a second clock, and the first network element transmitting a third packet with the first wavelength to the second network element through the first line at the time t10 of the first clock.
Wherein the first network element will record the time t 10.
Step S92, the first network element receives, from the second network element, a fourth packet including a time t20, where the time t20 is a time at which the second network element receives the third packet recorded by a second clock.
After receiving the third packet, the second network element records the time of receiving the third packet, that is, the time of t20, according to its own second clock, and then transmits a fourth packet including the time of t20 to the first network element, so that the first network element obtains the time of t 20.
Step S93, the first network element receives, through the first line, the fifth packet with the second wavelength and transmitted by the second network element, and records, through the first clock, that the time when the fifth packet is received is the time t 40.
And the second network element transmits a fifth message with the second wavelength to the first network element through the first line, and the fifth message contains the time recorded by the second network element through the second clock for transmitting the fifth message, namely the time t 30.
After receiving the fifth message, the first network element records the time when the fifth message is received, that is, the time t40, according to its own first clock.
Step S94, the first network element receives, from the second network element, a sixth packet including a time t30, where the time t30 is a time at which the second network element transmits the fifth packet recorded by a second clock.
After recording the time t30, the second network element transmits a sixth packet including the time t30 to the first network element, so that the first network element obtains the time t 30.
Step S95, after the first network element calculates the line transmission delay of the first packet in the first line and the line transmission delay of the second packet in the first line, calculates the delay difference between the first packet and the second packet.
Step S96, taking t10, t20, t30, and t40 as timestamp information, and the first network element performs delay compensation on a target timestamp in the timestamp information according to the delay difference, where the target timestamp is a timestamp corresponding to a wavelength transmission information with a smaller delay through a line.
Step S97, the first network element calculates a time offset between the first network element and the second network element according to the time stamp information after the delay compensation.
In the foregoing step, the timestamp may be compensated for a delay time according to the delay difference between the first wavelength and the second wavelength, and specifically, when performing the delay compensation, the timestamp corresponding to the path with the smaller transmission delay of the line is compensated according to the delay difference.
For example, in the above example, T10, T1, T20, T2, T30, T3, and T40, T4 are set to 320, the line propagation delay T1(L1) of the first line is 80ns, the line propagation delay T2(L1) of the second wavelength of the first line is 100ns, the line propagation delay of the first wavelength of the first line is small, and when information is transmitted through the first line by the first wavelength, the obtained timestamp is T20, and it is determined that T20 is the target timestamp, and delay compensation needs to be performed for T20. In this case, t20 (offset) is t20+ delay difference is 110+20 is 130.
Then, according to the time stamp information after the time delay compensation, the time Offset between the first network element and the second network element is calculated, and then the Offset is [ (t20 (compensation) -t10) - (t40-t30) ]/2 is [ (130-20) - (320-.
Through the steps, the time deviation between the first network element and the second network element can be calculated, and compared with the first method disclosed by the prior art, the method improves the precision of calculating the time deviation.
Further, in this embodiment or other embodiments of the present invention, the method may further include the following steps:
firstly, if the first line is an optical fiber, after calculating the line transmission delay of a first message in the first line, calculating the ratio of the light speed to the refractive index of the first message in the first line, and taking the ratio as the transmission speed of the first message in the first line;
then, calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
In addition, the ratio of the light speed to the refractive index of the first message on the second line can be calculated, the ratio is used as the transmission speed of the first message on the second line, and then the product of the transmission speed of the first message on the second line and the line transmission delay of the first message on the second line is calculated, and the product is the length of the second line.
By utilizing the steps, the lengths of the first line and the second line can be respectively calculated according to the line transmission delay obtained by the previous calculation. That is, by this step, line ranging can be realized.
Further, in this embodiment or other embodiments of the present invention, the method may further include the following steps:
if the first line is an optical fiber, calculating the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line and the wavelength interval of the first wavelength and the second wavelength after calculating the line transmission delay of the first message and the line transmission delay of the second message.
In the calculation of the dispersion coefficient, the following calculation formula can be adopted: the delay difference is the wavelength interval x the dispersion coefficient of the line x the length of the line. In this case, the dispersion coefficient of the first line can be calculated based on the formula, the delay difference between the first wavelength and the second wavelength, the length of the first line, and the wavelength interval between the first wavelength and the second wavelength.
The wavelength interval between the first wavelength and the second wavelength refers to a difference between the first wavelength and the second wavelength. For example, if the first wavelength is 1511nm and the second wavelength is 1491nm, the difference between the first wavelength and the second wavelength is 20 nm.
In addition, according to the calculation formula: the delay time is the wavelength interval x the dispersion coefficient of the line x the length of the line, and the delay time of the first wavelength and the second wavelength, the length of the second line, and the wavelength interval of the first wavelength and the second wavelength, the dispersion coefficient of the second line is calculated.
Through the steps, the dispersion coefficient of the line can be obtained, and the diversified requirements of workers are met.
Through the introduction of the line transmission delay calculation method disclosed in each embodiment of the present invention, it can be known that, by the line transmission delay calculation method, when a network element transmits information in a single-fiber bidirectional manner, line transmission delay of a wavelength can be calculated, and further, line ranging can be realized, and a dispersion coefficient of a line can be obtained. Compared with the first calculation method disclosed by the prior art, the line transmission delay calculation method disclosed by each embodiment of the invention improves the accuracy of calculating the line transmission delay, and compared with the second calculation method disclosed by the prior art, the method does not need to acquire optical fiber information (such as the dispersion coefficient and the optical fiber length of an optical fiber) in advance in the calculation process, so that the line transmission delays of the first wavelength and the second wavelength can be calculated under the condition that the line information cannot be acquired.
Moreover, the line transmission delay calculation method disclosed in the embodiment of the present invention can be applied to various communication networks, for example, referring to an application scenario diagram shown in fig. 10, the method can be applied to a fronthaul network and a backhaul network of a 5G system. In the figure, BC is an abbreviation for boundary clock, indicating a boundary clock; the BBU is an abbreviation of building base station unit and represents a base band processing unit; RRU is an abbreviation for radio remote unit and denotes a radio remote unit.
In addition, the line transmission delay calculation method disclosed in the embodiment of the present invention is not limited to a single-fiber bidirectional application scenario, and may also be applied to any other transmission medium, as long as the transmission medium can transmit message information with different wavelengths and support bidirectional signal transmission. In this case, the first line and the second line may be optical fibers, or may be wireless transmission lines, and the embodiment of the present invention is not limited thereto.
The invention further discloses a line transmission delay calculation method, which is applied to a first network element, wherein the first network element is connected with a second network element through a first line and a second line respectively. Referring to the schematic workflow diagram shown in fig. 11, the method for calculating the line transmission delay disclosed in the embodiment of the present invention includes the following steps:
step S21, the first network element sends a first message with a first wavelength to the second network element through a first line.
After the first network element sends the first message, the second network element receives the first message through a receiving port connected with the first line and transmits the first message to a controller of the second network element through the receiving port; and after receiving the first message, the controller of the second network element transmits the first message to a sending port connected with the second line, and then transmits the first message back to the first network element through the sending port connected with the second line.
Therefore, the first packet will reside in the second network element for a certain period of time, and the second network element records the residence time T12 of the first packet in the second network element.
Step S22, the first network element receives the first packet returned by the second network element through the second line, and determines the total delay time T11 of the first packet according to the sending time and the receiving time of the first packet.
When a first network element sends a first message to a second network element through a first line, the sending time of the first message is recorded, and when the first message is received through a second line, the receiving time of the first message is recorded. In this case, the total delay time T11 of the first packet is the difference between the receiving time and the sending time of the first packet.
Step S23, the first network element sends a second message with a second wavelength to the second network element through a second line.
After the first network element sends the second message, the second network element receives the second message through a receiving port connected with the second line and transmits the second message to a controller of the second network element through the receiving port; and after receiving the second message, the controller of the second network element transmits the second message to the sending port connected with the first line, and then transmits the second message back to the first network element through the sending port connected with the first line.
In this case, the second packet will also reside in the second network element for a period of time, and the second network element will record the residence time T22 of the second packet in the second network element.
Step S24, the first network element receives the second packet returned by the second network element through the first line, and determines the total delay time T21 of the second packet according to the sending time and the receiving time of the second packet.
When the first network element sends the second message to the second network element through the second line, the sending time of the second message is recorded, and when the second message is received through the first line, the receiving time of the second message is recorded. In this case, the total delay time T21 of the second packet is the difference between the receiving time and the sending time of the second packet.
And step S25, the first network element transmits the T11 and the T21 to the second network element.
And the second network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to the residence time T12 of the first message in the second network element and the residence times T22, T11 and T21 of the second message in the second network element.
By the line transmission delay calculation method disclosed by the embodiment of the invention, the second network element can calculate the line transmission delay with the first wavelength and the line transmission delay with the second wavelength, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
In the foregoing embodiments, a method for calculating a line transmission delay applied to a first network element is disclosed. Correspondingly, another embodiment of the present invention discloses a method for calculating a line transmission delay, which is applied to a second network element, where the second network element is connected to a first network element through a first line and a second line, and an application scenario diagram thereof can be seen in fig. 4 and fig. 6.
Referring to the schematic workflow diagram shown in fig. 12, the method for calculating the line transmission delay disclosed in the embodiment of the present invention includes the following steps:
step S31, the second network element receives the first message with the first wavelength transmitted by the first network element through the first line.
Step S32, the second network element returns the first packet to the first network element through a second line, records the residence time T12 of the first packet in the second network element, and receives the total delay time T11 of the first packet from the first network element.
The second network element receives the first message through a receiving port connected with the first line and transmits the first message to a controller of the second network element through the receiving port; and after receiving the first message, the controller of the second network element transmits the first message to a sending port connected with the second line, and then transmits the first message back to the first network element through the sending port connected with the second line.
Therefore, the first message will reside in the second network element for a certain period of time, and the second network element will record the residence time T12 of the first message in the second network element.
In addition, after receiving the first packet transmitted back from the second line, the first network element determines a total delay time T11 of the first packet according to the sending time and the receiving time of the first packet, and transmits T11 to the second network element.
Step S33, the second network element receives a second message with a second wavelength, which is transmitted by the first network element through a second line.
Step S34, the second network element returns the second packet to the first network element through the first line, records the residence time T22 of the second packet in the second network element, and receives the total delay time T21 of the second packet from the first network element.
The second network element receives the second message through a receiving port connected with a second line, and transmits the second message to a controller of the second network element through the receiving port; and after receiving the second message, the controller of the second network element transmits the second message to the sending port connected with the first line, and then transmits the second message back to the first network element through the sending port connected with the first line.
In this case, the second packet will also reside in the second network element for a period of time, and the second network element will record the residence time T22 of the second packet in the second network element.
In addition, after receiving the second packet transmitted back from the first line, the first network element determines a total delay time T21 of the second packet according to the sending time and the receiving time of the second packet, and transmits T21 to the second network element.
Step S35, the second network element calculates the line transmission delay of the first packet and the line transmission delay of the second packet according to T11, T12, T21, and T22.
The embodiment of the invention discloses a method for calculating the transmission delay of a line. Compared with the prior art, the line transmission delay calculation method disclosed by the embodiment is applied to the second network element, and the first line and the second line are respectively arranged between the first network element and the second network element. By the line transmission delay calculation method disclosed by the embodiment of the invention, the line transmission delay of the first wavelength and the line transmission delay of the second wavelength can be calculated, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
To elaborate how the second network element calculates the line propagation delay of the first wavelength and the line propagation delay of the second wavelength according to T11, T12, T21 and T22, as a refinement of the method of fig. 12, the present invention discloses another embodiment by which step S35 is further explained. An application scenario diagram of this embodiment may be as shown in fig. 6.
In this embodiment, the calculating, by the second network element, the line transmission delay of the first packet and the line transmission delay of the second packet according to T11, T12, T21, and T22 includes the following steps:
and calculating the difference value between the T11 and the T12, and taking the difference value as the transmission time T13 of the first message in the first line and the second line, namely T13-T11-T12.
And calculating the difference value between the T21 and the T22, and taking the difference value as the transmission time T23 of the second message in the first line and the second line, namely T23-T21-T22.
And calculating the time ratio of the T23 to the T13, and taking the time ratio as the speed ratio V1/V2 of the first message to the second message. Since the first packet and the second packet have the same path length and are the sum of the lengths of the first line and the second line, T13 × V1 is T23 × V2, and thus V1/V2 is T23/T13.
And determining the ratio T1(L1)/T2(L1) of the line transmission delay of the first message and the second message in the first line respectively according to the V1/V2. Since T1(L1) × V1 is L1 and T2(L1) × V2 is L1, it can be determined that T1(L1) × V1 is T2(L1) × V2. Therefore, T1(L1)/T2(L1) ═ V2/V1 can be determined. Where L1 is the length of the first line.
According to the total time consumption of the first message and the second message in the first line and the T1(L1)/T2(L1), calculating the line transmission delay T1(L1) of the first message in the first line and the line transmission delay T2(L1) of the second message in the first line, and/or according to the total time consumption of the first message and the second message in the second line and the T1(L1)/T2(L1), calculating the line transmission delay T1(L2) of the first message in the second line and the line transmission delay T2(L2) of the second message in the second line.
In the above step, the specific value of the total time consumption of the first message and the second message in the first line, or the specific value of the total time consumption of the first message and the second message in the second line, may be obtained by a timestamp when information is transmitted between the first network element and the second network element.
Specifically, referring to the information interaction process shown in fig. 2, a clock of the first network element is set as a first clock, a clock of the second network element is set as a second clock, a wavelength of a message sent by the first network element to the second network element is a first wavelength, and a wavelength of a message sent by the second network element to the first network element is a second wavelength, and in the information interaction process, a line used when the first network element sends the message to the second network element is the same as a line used when the second network element sends the message to the first network element (that is, both the first line and the second line). The first network element sends a Sync synchronization message to the second network element at the time t1 of the first clock, wherein the Sync synchronization message contains the time t1, or after the Sync synchronization message is sent, the first network element sends a Follow message containing the time t1 to the second network element; the second network element receives the Sync synchronization message at the time t2 of the second clock, and then sends a Delay _ Req message to the first network element at the time t3 of the second clock; the first network element receives the Delay _ Req request message at time t4 of the first clock, and then the first network element sends a Delay _ Resp reply message containing time t4 to the second network element, so that the second network element determines the actual time when the first network element receives the Delay _ Req request message. In this case, the second network element can acquire the timestamp information t1, t2, t3, and t4, from which 2 xdelay [ (t2-t1) + (t4-t3) ] can be determined. If the line used when the first network element sends the message to the second network element is the first line, the 2 × Delay obtained according to the timestamp information t1, t2, t3, and t4 is the total consumed time in the first line. If the line used when the first network element sends the message to the second network element is the second line, the 2 × Delay obtained according to the timestamp information t1, t2, t3, and t4 is the total consumed time in the second line.
In this case, since the wavelength of the first message is the first wavelength and the wavelength of the second message is the second wavelength, the specific value of 2 × Delay obtained by the calculation according to the above steps is the total consumed time of the first message and the second message. If the 2 × Delay is the total time consumption in the first line, the specific value of the total time consumption of the first message and the second message in the first line is 2 × Delay; if the 2 × Delay is the total time consumption in the second line, the specific value of the total time consumption of the first message and the second message in the second line is 2 × Delay.
In addition, the length of the second line is set to be L2, since V1/V2 is T23/T13, and T1(L2) × V1 is L2, and T1(L2) × V2 is L2, it can be determined that T1(L2)/T2(L2) is V2/V1, that is, the ratio of the line transmission delays of the first message and the second message in the second line is also V2/V1, and the ratio of the line transmission delays of the first message and the second message in the second line is the same as the ratio of the line transmission delays of the first message and the second message in the first line. In this case, according to the total time consumption of the first packet and the second packet in the second line and the ratio T1(L1)/T2(L1) of the line transmission delays of the first packet and the second packet in the first line, respectively, the line transmission delay T1(L2) of the first wavelength in the second line and the line transmission delay T2(L2) of the second wavelength in the second line can be calculated.
Further, referring to the information interaction process schematic diagram shown in fig. 13 and the workflow schematic diagram shown in fig. 14, in this embodiment or some other embodiments of the present invention, the method may further include the following steps:
step S141, setting the clock of the first network element as a first clock, setting the clock of the second network element as a second clock, and receiving, by the second network element, a third packet with a first wavelength transmitted by the first network element through the first line, and recording, by the second clock, a time t20 at which the third packet is received.
Step S142, the second network element receives, from the first network element, a seventh packet including a time t10, where the time t10 is a time at which the first network element transmits the third packet through the first clock.
When the first network element transmits the third message to the second network element, the time of transmitting the third message, that is, the time of t10, is recorded, and the second network element obtains the time of t10 by transmitting the seventh message to the second network element.
Step S143, the second network element transmits a fifth packet with a second wavelength to the first network element through the first line, and records a time t30 when the fifth packet is transmitted through the second clock.
Step S144, the second network element receives, from the first network element, an eighth packet including a time t40, where the time t40 is a time recorded by the first network element through a first clock when the fifth packet is received.
When receiving the fifth message, the first network element records the time when the fifth message is received, that is, the time t40, and transmits an eighth message including the time t40 to the second network element, so that the second network element obtains the time t 40.
Step S145, after the second network element calculates the line transmission delay of the first packet and the line transmission delay of the second packet, calculates the delay difference between the first packet and the second packet.
And step S146, taking t10, t20, t30 and t40 as timestamp information, and the second network element performing delay compensation on a target timestamp in the timestamp information according to the delay difference, wherein the target timestamp is a timestamp acquired when information is transmitted through a line with a wavelength with a small delay.
Step S147, the second network element calculates a time offset between the first network element and the second network element according to the time stamp information after the delay compensation.
Through the steps, the time deviation between the first network element and the second network element can be calculated, and compared with the first method disclosed by the prior art, the method improves the precision of calculating the time deviation.
Further, in this embodiment or other embodiments of the present invention, the method may further include the following steps:
firstly, if the first line is an optical fiber, after calculating the line transmission delay of a first message in the first line, calculating the ratio of the light speed to the refractive index of the first message in the first line, and taking the ratio as the transmission speed of the first message in the first line;
then, calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
In addition, the ratio of the light speed to the refractive index of the first message on the second line can be calculated, the ratio is used as the transmission speed of the first message on the second line, and then the product of the transmission speed of the first message on the second line and the line transmission delay of the first message on the second line is calculated, and the product is the length of the second line.
By utilizing the steps, the lengths of the first line and the second line can be respectively calculated according to the line transmission delay obtained by the previous calculation. That is, by this step, line ranging can be realized.
Further, in this embodiment or other embodiments of the present invention, the method may further include the following steps:
if the first line is an optical fiber, calculating the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line and the wavelength interval of the first wavelength and the second wavelength after calculating the line transmission delay of the first message and the line transmission delay of the second message.
In the calculation of the dispersion coefficient, the following calculation formula can be adopted: the delay difference is the wavelength interval x the dispersion coefficient of the line x the length of the line. In this case, the dispersion coefficient of the first line can be calculated based on the formula, the delay difference between the first wavelength and the second wavelength, the length of the first line, and the wavelength interval between the first wavelength and the second wavelength.
The wavelength interval between the first wavelength and the second wavelength refers to a difference between the first wavelength and the second wavelength. For example, if the first wavelength is 1511nm and the second wavelength is 1491nm, the difference between the first wavelength and the second wavelength is 20 nm.
In addition, according to the calculation formula: the delay time is the wavelength interval x the dispersion coefficient of the line x the length of the line, and the delay time of the first wavelength and the second wavelength, the length of the second line, and the wavelength interval of the first wavelength and the second wavelength, the dispersion coefficient of the second line is calculated.
Through the steps, the dispersion coefficient of the line can be obtained, and the diversified requirements of workers are met.
Through the introduction of the line transmission delay calculation method disclosed in each embodiment of the present invention, it can be known that, by the line transmission delay calculation method, when a network element transmits information in a single-fiber bidirectional manner, line transmission delay of a wavelength can be calculated, and further, line ranging can be realized, and a dispersion coefficient of a line can be obtained. Compared with the first calculation method disclosed by the prior art, the line transmission delay calculation method disclosed by each embodiment of the invention improves the accuracy of calculating the line transmission delay, and compared with the second calculation method disclosed by the prior art, the method does not need to acquire optical fiber information (such as the dispersion coefficient and the optical fiber length of an optical fiber) in advance in the calculation process, so that the line transmission delays of the first wavelength and the second wavelength can be calculated under the condition that the line information cannot be acquired.
Moreover, the line transmission delay calculation method disclosed in the embodiment of the present invention can be applied to various communication networks, for example, referring to an application scenario diagram shown in fig. 10, the method can be applied to a fronthaul network and a backhaul network of a 5G system. In the figure, BC is an abbreviation for boundary clock, indicating a boundary clock; the BBU is an abbreviation of building base station unit and represents a base band processing unit; RRU is an abbreviation for radio remote unit and denotes a radio remote unit.
In addition, the line transmission delay calculation method disclosed in the embodiment of the present invention is not limited to a single-fiber bidirectional application scenario, and may also be applied to any other transmission medium, as long as the transmission medium can transmit message information with different wavelengths and support bidirectional signal transmission. In this case, the first line and the second line may be optical fibers, or may be wireless transmission lines, and the embodiment of the present invention is not limited thereto.
The invention also discloses a line transmission delay calculation method, which is applied to a second network element, wherein the second network element is connected with the first network element through a first line and a second line respectively. Referring to a work flow diagram shown in fig. 15, the method for calculating the line transmission delay disclosed in the embodiment of the present invention includes the following steps:
step S151, the second network element receives a first packet with a first wavelength transmitted by the first network element through a first line.
Step S152, the second network element returns the first packet to the first network element through the second line, and records a residence time T12 of the first packet in the second network element.
The second network element receives the first message through a receiving port connected with the first line and transmits the first message to a controller of the second network element through the receiving port; and after receiving the first message, the controller of the second network element transmits the first message to a sending port connected with the second line, and then transmits the first message back to the first network element through the sending port connected with the second line.
Therefore, the first message will reside in the second network element for a certain period of time, and the second network element will record the residence time T12 of the first message in the second network element.
Step S153, the second network element receives a second message with a second wavelength, which is transmitted by the first network element through a second line.
Step S154, the second network element returns the second packet to the first network element through the first line, and records the residence time T22 of the second packet in the second network element.
The second network element receives the second message through a receiving port connected with a second line, and transmits the second message to a controller of the second network element through the receiving port; and after receiving the second message, the controller of the second network element transmits the second message to the sending port connected with the first line, and then transmits the second message back to the first network element through the sending port connected with the first line.
In this case, the second packet will also reside in the second network element for a period of time, and the second network element will record the residence time T22 of the second packet in the second network element.
Step S155, the second network element transmits T12 and T22 to the first network element.
And the first network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to the total delay time T11 of the first message and the total delay time T21, T12 and T22 of the second message.
By the line transmission delay calculation method disclosed by the embodiment of the invention, the first network element can calculate the line transmission delay with the first wavelength and the line transmission delay with the second wavelength, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
Correspondingly, the embodiment of the invention discloses a line transmission delay calculating device, which is applied to a first network element, wherein the first network element is connected with a second network element through a first line and a second line respectively. Referring to the schematic structural diagram shown in fig. 16, the line transmission delay calculating apparatus includes: a first sending module 110, a first obtaining module 120, a second sending module 130, a second obtaining module 140, and a first calculating module 150.
The first sending module 110 is configured to send a first packet with a first wavelength to the second network element through a first line;
the first obtaining module 120 is configured to receive the first packet returned by the second network element through a second line, determine a total delay time T11 of the first packet according to the sending time and the receiving time of the first packet, and receive a residence time T12 of the first packet in the second network element from the second network element;
the second sending module 130 is configured to send a second message with a second wavelength to the second network element through a second line;
the second obtaining module 140 is configured to receive the second packet returned by the second network element through the first line, determine a total delay time T21 of the second packet according to the sending time and the receiving time of the second packet, and receive a residence time T22 of the second packet in the second network element from the second network element;
the first calculating module 150 is configured to calculate the line transmission delay of the first packet and the line transmission delay of the second packet according to T11, T12, T21, and T22.
The line transmission delay calculation device disclosed by the embodiment of the invention can calculate the line transmission delay with the first wavelength and the line transmission delay with the second wavelength, and can improve the accuracy of obtaining the line transmission delay compared with the first method in the prior art. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
Further, in the line transmission delay calculating apparatus disclosed in the embodiment of the present invention, the first calculating module 150 includes:
a first transmission time calculation unit, configured to calculate a difference between the T11 and the T12, and use the difference as a transmission time T13 of the first packet in the first line and the second line;
a second transmission time calculating unit, configured to calculate a difference between the T21 and the T22, and use the difference as a transmission time T23 of a second packet in a first line and a second line;
a first speed ratio calculating unit, configured to calculate a time ratio between the T23 and the T13, and use the time ratio as a speed ratio V1/V2 between a first packet and a second packet;
a first delay ratio calculation unit, configured to determine, according to the V1/V2, a ratio T1(L1)/T2(L1) of line transmission delays of the first packet and the second packet in the first line, respectively;
a first transmission delay calculating unit, configured to calculate, according to total time consumption of the first packet and the second packet in the first line and the T1(L1)/T2(L1), a line transmission delay T1(L1) of the first packet in the first line and a line transmission delay T2(L1) of the second packet in the first line, and/or, according to total time consumption of the first packet and the second packet in the second line and the T1(L1)/T2(L1), calculate a line transmission delay T1(L2) of the first packet in the second line and a line transmission delay T2(L2) of the second packet in the second line.
Further, setting the clock of the first network element as a first clock, and setting the clock of the second network element as a second clock, in the device for calculating line transmission delay disclosed in the embodiment of the present invention, the device further includes:
a third message transmission module, configured to transmit a third message with the first wavelength to the second network element through the first line at time t10 of the first clock;
a fourth packet receiving module, configured to receive a fourth packet from the second network element, where the fourth packet includes a time t20, and the time t20 is a time recorded by the second network element through a second clock when the third packet is received;
a fifth message receiving module, configured to receive, through a first line, a fifth message with a second wavelength and transmitted by the second network element, and record, through the first clock, that a time when the fifth message is received is a time t 40;
a sixth message module, configured to receive a sixth message including a time t30 from the second network element, where the time t30 is a time at which the second network element transmits the fifth message recorded by a second clock;
the first delay difference calculation module is used for calculating the delay difference between the first message and the second message after the line transmission delay of the first message on the first line and the line transmission delay of the second message on the first line are obtained through calculation;
the first delay compensation module takes t10, t20, t30 and t40 as timestamp information, and the delay compensation unit is configured to perform delay compensation on a target timestamp in the timestamp information according to the delay difference, where the target timestamp is a timestamp corresponding to a wavelength transmission information with a smaller delay through a line;
and the first time deviation calculating module is used for calculating the time deviation between the first network element and the second network element according to the timestamp information after the time delay compensation.
By the device, the time deviation between the first network element and the second network element can be calculated, and compared with the first method disclosed by the prior art, the method improves the precision of calculating the time deviation.
Further, in the line transmission delay calculating apparatus disclosed in the embodiment of the present invention, the apparatus further includes:
the first speed calculation module is used for calculating a ratio of an optical speed to a refractive index of a first message on a first line after calculating line transmission delay of the first message on the first line if the first line is an optical fiber, and taking the ratio as the transmission speed of the first message on the first line;
and the first length calculation module is used for calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
In addition, the ratio of the light speed to the refractive index of the first message on the second line can be calculated, the ratio is used as the transmission speed of the first message on the second line, and then the product of the transmission speed of the first message on the second line and the line transmission delay of the first message on the second line is calculated, and the product is the length of the second line.
By using the module, the lengths of the first line and the second line can be respectively calculated according to the line transmission delay obtained by the previous calculation. That is, line ranging can be achieved by the module.
Further, in the line transmission delay calculating apparatus disclosed in the embodiment of the present invention, the apparatus further includes:
a first dispersion coefficient calculation module;
if the first line is an optical fiber, after calculating the line transmission delay of the first message and the line transmission delay of the second message, the first dispersion coefficient calculating module is configured to calculate the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line, and the wavelength interval between the first wavelength and the second wavelength.
In the calculation of the dispersion coefficient, the following calculation formula can be adopted: the delay difference is the wavelength interval x the dispersion coefficient of the line x the length of the line. In this case, the dispersion coefficient of the first line can be calculated based on the formula, the delay difference between the first wavelength and the second wavelength, the length of the first line, and the wavelength interval between the first wavelength and the second wavelength.
The wavelength interval between the first wavelength and the second wavelength refers to a difference between the first wavelength and the second wavelength. For example, if the first wavelength is 1511nm and the second wavelength is 1491nm, the difference between the first wavelength and the second wavelength is 20 nm.
In addition, the first dispersion coefficient calculating module may further calculate, according to the calculation formula: the delay time is the wavelength interval x the dispersion coefficient of the line x the length of the line, and the delay time of the first wavelength and the second wavelength, the length of the second line, and the wavelength interval of the first wavelength and the second wavelength, the dispersion coefficient of the second line is calculated.
Through the device, the dispersion coefficient of the line can be acquired, and the diversified requirements of workers are met.
Correspondingly, in another embodiment of the present invention, a device for calculating a line transmission delay is disclosed, where the device is applied to a first network element, and the first network element is connected to a second network element through a first line and a second line, respectively. Referring to the schematic structural diagram shown in fig. 17, the line transmission delay calculating apparatus includes: a third sending module 210, a first determining module 220, a fourth sending module 230, a second determining module 240, and a first time transmission module 250.
The third sending module 210 is configured to send a first packet with a first wavelength to the second network element through a first line;
the first determining module 220 is configured to receive the first packet returned by the second network element through a second line, and determine a total delay time T11 of the first packet according to the sending time and the receiving time of the first packet;
the fourth sending module 230 is configured to send a second message with a second wavelength to the second network element through a second line;
the second determining module 240 is configured to receive the second packet returned by the second network element through the first line, and determine a total delay time T21 of the second packet according to the sending time and the receiving time of the second packet;
the first time transmission module 250 is configured to transmit T11 and T21 to the second network element. And the second network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to the residence time T12 of the first message in the second network element and the residence times T22, T11 and T21 of the second message in the second network element.
By the line transmission delay calculation device disclosed by the embodiment of the invention, the second network element can calculate the line transmission delay with the first wavelength and the line transmission delay with the second wavelength, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
Correspondingly, in another embodiment of the present invention, a device for calculating a line transmission delay is disclosed, where the device is applied to a second network element, and the second network element is connected to a first network element through a first line and a second line, respectively. Referring to the schematic structural diagram shown in fig. 18, the line transmission delay calculating device includes: a fourth receiving module 310, a third obtaining module 320, a fifth receiving module 330, a fourth obtaining module 340, and a fourth calculating module 350.
The fourth receiving module 310 is configured to receive a first message with a first wavelength, where the first message is transmitted by the first network element through a first line;
the third obtaining module 320 is configured to transmit the first packet back to the first network element through a second line, record a residence time T12 of the first packet in the second network element, and receive a total delay time T11 of the first packet from the first network element;
the fifth receiving module 330 is configured to receive a second message with a second wavelength, where the second message is transmitted by the first network element through a second line;
the fourth obtaining module 340 is configured to transmit the second packet back to the first network element through the first line, record a residence time T22 of the second packet in the second network element, and receive a total delay time T21 of the second packet from the first network element;
the fourth calculating module 350 is configured to calculate the line transmission delay of the first packet and the line transmission delay of the second packet according to T11, T12, T21, and T22.
The line transmission delay calculation device disclosed by the embodiment of the invention can calculate the line transmission delay with the first wavelength and the line transmission delay with the second wavelength, and can improve the accuracy of obtaining the line transmission delay compared with the first method in the prior art. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
Further, the fourth calculating module 350 includes:
a third transmission time calculating unit, configured to calculate a difference between the T11 and the T12, and use the difference as a transmission time T13 of the first packet in the first line and the second line;
a fourth transmission time calculating unit, configured to calculate a difference between the T21 and the T22, and use the difference as a transmission time T23 of the second packet in the first line and the second line;
a second speed ratio calculating unit, configured to calculate a time ratio between the T23 and the T13, and use the time ratio as a speed ratio V1/V2 between the first packet and the second packet;
a second delay ratio calculating unit, configured to determine, according to the V1/V2, a ratio T1(L1)/T2(L1) of line transmission delays of the first packet and the second packet in the first line, respectively;
a second transmission delay calculating unit, configured to calculate, according to the total time consumption of the first packet and the second packet in the first line and the T1(L1)/T2(L1), a line transmission delay T1(L1) of the first packet in the first line and a line transmission delay T2(L1) of the second packet in the first line, and/or, according to the total time consumption of the first packet and the second packet in the second line and the T1(L1)/T2(L1), calculate a line transmission delay T1(L2) of the first packet in the second line and a line transmission delay T2(L2) of the second packet in the second line.
Further, setting the clock of the first network element as a first clock, and setting the clock of the second network element as a second clock, in the device for calculating line transmission delay disclosed in the embodiment of the present invention, the device further includes:
a third packet receiving module, configured to receive a third packet with a first wavelength and transmitted by the first network element through a first line, and record, through the second clock, a t20 time when the third packet is received;
a seventh packet receiving module, configured to receive a seventh packet from the first network element, where the seventh packet includes a time t10, and the time t10 is a time when the first network element transmits the third packet through the first clock;
a fifth message transmission module, configured to transmit a fifth message with a second wavelength to the first network element through a first line, and record, through the second clock, a t30 time at which the fifth message is transmitted;
an eighth packet receiving module, configured to receive an eighth packet from the first network element, where the eighth packet includes a time t40, and the time t40 is a time when the fifth packet is received by the first network element through a first clock record;
the second delay difference calculation module is used for calculating the delay difference between the first message and the second message after calculating the line transmission delay of the first message and the line transmission delay of the second message;
the second delay compensation module takes t10, t20, t30 and t40 as timestamp information, and is used for performing delay compensation on a target timestamp in the timestamp information according to the delay difference, wherein the target timestamp is a timestamp acquired when information is transmitted through a line with smaller delay and wavelength;
and the second time deviation calculating module is used for calculating the time deviation between the first network element and the second network element according to the time stamp information after the time delay compensation.
By the device, the time deviation between the first network element and the second network element can be calculated, and compared with the first method disclosed by the prior art, the method improves the precision of calculating the time deviation.
Further, in the line transmission delay calculating apparatus disclosed in the embodiment of the present invention, the apparatus further includes:
the second speed calculation module is used for calculating the ratio of the light speed to the refractive index of the first message on the first line after calculating the line transmission delay of the first message on the first line if the first line is an optical fiber, and taking the ratio as the transmission speed of the first message on the first line;
and the second length calculation module is used for calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
In addition, the ratio of the light speed to the refractive index of the first message on the second line can be calculated, the ratio is used as the transmission speed of the first message on the second line, and then the product of the transmission speed of the first message on the second line and the line transmission delay of the first message on the second line is calculated, and the product is the length of the second line.
By using the module, the lengths of the first line and the second line can be respectively calculated according to the line transmission delay obtained by the previous calculation. That is, line ranging can be achieved by the module.
Further, in the line transmission delay calculating apparatus disclosed in the embodiment of the present invention, the apparatus further includes:
a second dispersion coefficient calculation module;
if the first line is an optical fiber, after calculating the line transmission delay of the first message and the line transmission delay of the second message, the second dispersion coefficient calculating module is configured to calculate the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line, and the wavelength interval between the first wavelength and the second wavelength.
In the calculation of the dispersion coefficient, the following calculation formula can be adopted: the delay difference is the wavelength interval x the dispersion coefficient of the line x the length of the line. In this case, the dispersion coefficient of the first line can be calculated based on the formula, the delay difference between the first wavelength and the second wavelength, the length of the first line, and the wavelength interval between the first wavelength and the second wavelength.
The wavelength interval between the first wavelength and the second wavelength refers to a difference between the first wavelength and the second wavelength. For example, if the first wavelength is 1511nm and the second wavelength is 1491nm, the difference between the first wavelength and the second wavelength is 20 nm.
In addition, the first dispersion coefficient calculating module may further calculate, according to the calculation formula: the delay time is the wavelength interval x the dispersion coefficient of the line x the length of the line, and the delay time of the first wavelength and the second wavelength, the length of the second line, and the wavelength interval of the first wavelength and the second wavelength, the dispersion coefficient of the second line is calculated.
Through the device, the dispersion coefficient of the line can be acquired, and the diversified requirements of workers are met.
Correspondingly, in another embodiment of the present invention, a device for calculating a line transmission delay is disclosed, where the device is applied to a second network element, and the second network element is connected to a first network element through a first line and a second line, respectively. Referring to the schematic structural diagram shown in fig. 19, the line transmission delay calculating apparatus includes: a sixth receiving module 410, a first recording module 420, a seventh receiving module 430, a second recording module 440, and a second time transmitting module 450.
The sixth receiving module 410 is configured to receive a first message with a first wavelength, where the first message is transmitted by the first network element through a first line;
the first recording module 420 is configured to transmit the first packet back to the first network element through a second line, and record a residence time T12 of the first packet in the second network element;
the seventh receiving module 430 is configured to receive a second message with a second wavelength, where the second message is transmitted by the first network element through a second line;
the second recording module 440 is configured to transmit the second packet back to the first network element through the first line, and record a residence time T22 of the second packet in the second network element;
the second time transmission module 450 is configured to transmit, by the second network element, the T12 and the T22 to the first network element.
And the first network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to the total delay time T11 of the first message and the total delay time T21, T12 and T22 of the second message.
By the line transmission delay calculation device disclosed by the embodiment of the invention, the first network element can calculate the line transmission delay with the first wavelength and the line transmission delay with the second wavelength, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
Accordingly, another embodiment of the present invention discloses a system for calculating a line transmission delay, comprising:
the first network element is connected with the second network element through a first line and a second line respectively;
the first network element sends a first message with a first wavelength to the second network element through a first line;
after receiving the first message, the second network element transmits the first message back to the first network element through a second line, and records the residence time T12 of the first message in the second network element;
the second network element transmits the T12 to the first network element;
the first network element receives the first message returned by the second network element through a second line, determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message, and receives the residence time T12 of the first message in the second network element from the second network element;
the first network element sends a second message with a second wavelength to the second network element through a second line;
after receiving the second message, the second network element transmits the second message back to the first network element through a first line, and records the residence time T22 of the second message in the second network element;
the second network element transmits the T22 to the first network element;
the first network element receives the second message returned by the second network element through a first line, determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message, and receives the residence time T22 of the second message in the second network element from the second network element;
and the first network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to T11, T12, T21 and T22.
By the line transmission delay calculation system disclosed by the embodiment of the invention, the first network element can calculate the line transmission delay with the first wavelength and the line transmission delay with the second wavelength, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
Accordingly, another embodiment of the present invention discloses a system for calculating a line transmission delay, comprising:
the first network element is connected with the second network element through a first line and a second line respectively;
the first network element sends a first message with a first wavelength to the second network element through a first line;
after receiving the first message, the second network element transmits the first message back to the first network element through a second line, and records the residence time T12 of the first message in the second network element;
the first network element receives the first message returned by the second network element through a second line, and determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message;
the first network element sends a second message with a second wavelength to the second network element through a second line;
after receiving the second message, the second network element transmits the second message back to the first network element through a first line, and records the residence time T22 of the second message in the second network element;
the first network element receives the second message returned by the second network element through a first line, and determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message;
the first network element transmits T11 and T21 to a second network element;
and the second network element calculates the line transmission delay of the first message and the line transmission delay of the second message according to T11, T12, T21 and T22.
By the line transmission delay calculation system disclosed by the embodiment of the invention, the second network element can calculate the line transmission delay with the first wavelength and the line transmission delay with the second wavelength, and compared with the first method in the prior art, the accuracy of obtaining the line transmission delay can be improved. In addition, optical fiber information such as the dispersion coefficient of the optical fiber, the length of the optical fiber and the like is not needed, and the problem that the transmission delay of a line cannot be obtained under the condition that the optical fiber information cannot be obtained in the second method in the prior art is solved.
In a specific implementation, an embodiment of the present invention further provides a network element, a transceiver, a processor, and a memory; the transceiver is used for receiving and transmitting messages with other network elements and transmitting the messages received from other network elements to the processor; the processor is configured to obtain a message transmitted by the transceiver, and execute a program or an instruction stored in the memory, so as to implement the line transmission delay calculation method in the method embodiments disclosed in fig. 5 to 10.
The embodiment of the invention also provides a network element, a transceiver, a processor and a memory; the transceiver is used for receiving and transmitting messages with other network elements and transmitting the messages received from other network elements to the processor; the processor is configured to obtain a message transmitted by the transceiver, and execute a program or an instruction stored in the memory, so as to implement the line transmission delay calculation method in the embodiment of the method disclosed in fig. 11.
The embodiment of the invention also provides a network element, a transceiver, a processor and a memory; the transceiver is used for receiving and transmitting messages with other network elements and transmitting the messages received from other network elements to the processor; the processor is configured to acquire a message transmitted by the transceiver and execute a program or an instruction stored in the memory, so as to implement the line transmission delay calculation method in the method embodiment disclosed in fig. 12 to 14.
The embodiment of the invention also provides a network element, a transceiver, a processor and a memory; the transceiver is used for receiving and transmitting messages with other network elements and transmitting the messages received from other network elements to the processor; the processor is configured to obtain a message transmitted by the transceiver, and execute a program or an instruction stored in the memory, so as to implement the line transmission delay calculation method in the embodiment of the method disclosed in fig. 15.
In addition, an embodiment of the present invention further provides a computer program product, which includes instructions, and when the instructions are run on a computer, the instructions cause the computer to execute the line transmission delay calculation method disclosed in each of the above embodiments.
An embodiment of the present invention further provides a computer program product, which includes instructions, and when the instructions are executed on a computer, the instructions cause the computer to execute the method for calculating line transmission delay in the method embodiments disclosed in fig. 5 to fig. 10.
An embodiment of the present invention further provides a computer program product, which includes instructions, and when the instructions are executed on a computer, the instructions cause the computer to execute the method for calculating line transmission delay in the method embodiment disclosed in fig. 11.
An embodiment of the present invention further provides a computer program product, which includes instructions, and when the instructions are executed on a computer, the instructions cause the computer to execute the method for calculating line transmission delay in the method embodiment disclosed in fig. 12 to 14.
An embodiment of the present invention further provides a computer program product, which includes instructions, and when the instructions are executed on a computer, the instructions cause the computer to execute the method for calculating line transmission delay in the method embodiment disclosed in fig. 15.
In a specific implementation, an embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, part or all of the steps in the line transmission delay calculation method in the method embodiments disclosed in fig. 5 to fig. 10 may be implemented. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, part or all of the steps in the line transmission delay calculation method in the embodiment of the method disclosed in fig. 11 may be implemented. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, part or all of the steps in the line transmission delay calculation method in the method embodiments disclosed in fig. 12 to 14 may be implemented. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, part or all of the steps in the line transmission delay calculation method in the embodiment of the method disclosed in fig. 15 may be implemented. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be essentially or partially implemented in the form of a software product, which may be stored in a storage medium, such as ROM/RAM, magnetic disk, optical disk, etc., and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments or some parts of the embodiments.
The same and similar parts in the various embodiments in this specification may be referred to each other. Especially, for the … … embodiment, since it is basically similar to the method embodiment, the description is simple, and the relevant points can be referred to the description in the method embodiment.
The above-described embodiments of the present invention should not be construed as limiting the scope of the present invention.

Claims (18)

1. A line transmission delay calculation method is applied to a first network element, wherein the first network element is connected with a second network element through a first line and a second line respectively, and the line transmission delay calculation method comprises the following steps:
the first network element sends a first message with a first wavelength to the second network element through a first line;
the first network element receives the first message returned by the second network element through a second line, determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message, and receives the residence time T12 of the first message in the second network element from the second network element;
the first network element sends a second message with a second wavelength to the second network element through a second line;
the first network element receives the second message returned by the second network element through a first line, determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message, and receives the residence time T22 of the second message in the second network element from the second network element;
the first network element calculates a difference value between the T11 and the T12, and takes the difference value as transmission time T13 of the first message in the first line and the second line;
the first network element calculates a difference value between the T21 and the T22, and takes the difference value as transmission time T23 of the second message in the first line and the second line;
the first network element calculates the time ratio of the T23 to the T13, and the time ratio is used as the speed ratio V1/V2 of the first message to the second message;
the first network element determines a ratio T1(L1)/T2(L1) of line transmission delay of the first message and the second message in a first line respectively according to the V1/V2;
and the first network element calculates a line transmission delay T1(L1) of the first message on the first line and a line transmission delay T2(L1) of the second message on the first line according to the total time consumption of the first message and the second message in the first line and the T1(L1)/T2(L1), and/or calculates a line transmission delay T1(L2) of the first message on the second line and a line transmission delay T2(L2) of the second message on the second line according to the total time consumption of the first message and the second message on the second line and the T1(L1)/T2 (L1).
2. The line transmission delay calculation method according to claim 1, further comprising:
setting the clock of the first network element as a first clock, setting the clock of the second network element as a second clock, and transmitting a third message with a first wavelength to the second network element by the first network element through a first line at the time t10 of the first clock;
the first network element receives a fourth message from the second network element, where the fourth message includes a time t20, and the time t20 is a time recorded by a second clock by the second network element when the third message is received;
the first network element receives a fifth message with a second wavelength, which is transmitted by the second network element, through a first line, and records, through the first clock, that the time when the fifth message is received is the time t 40;
the first network element receives a sixth message from the second network element, where the sixth message includes a time t30, and the time t30 is a time of the second network element transmitting the fifth message recorded by a second clock;
after the first network element calculates the line transmission delay of the first message in the first line and the line transmission delay of the second message in the first line, calculating the delay difference between the first message and the second message;
taking t10, t20, t30 and t40 as timestamp information, and the first network element performing delay compensation on a target timestamp in the timestamp information according to the delay difference, wherein the target timestamp is a timestamp corresponding to a wavelength transmission information with a smaller delay through a line between the first wavelength and the second wavelength;
and the first network element calculates the time deviation between the first network element and the second network element according to the time stamp information after the time delay compensation.
3. The line transmission delay calculation method according to claim 1 or 2, further comprising:
if the first line is an optical fiber, after calculating the line transmission delay of the first message in the first line, calculating the ratio of the light speed to the refractive index of the first message in the first line, and taking the ratio as the transmission speed of the first message in the first line;
and calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
4. The line transmission delay calculation method according to claim 3, further comprising:
if the first line is an optical fiber, calculating the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line and the wavelength interval of the first wavelength and the second wavelength after calculating the line transmission delay of the first message and the line transmission delay of the second message.
5. A line transmission delay calculation method is applied to a second network element, the second network element is connected with a first network element through a first line and a second line respectively, and the line transmission delay calculation method comprises the following steps:
the second network element receives a first message with a first wavelength transmitted by the first network element through a first line;
the second network element transmits the first message back to the first network element through a second line, records the residence time T12 of the first message in the second network element, and receives the total delay time T11 of the first message from the first network element;
the second network element receives a second message with a second wavelength, which is transmitted by the first network element through a second line;
the second network element transmits the second message back to the first network element through a first line, records the residence time T22 of the second message in the second network element, and receives the total delay time T21 of the second message from the first network element;
the second network element calculates a difference value between the T11 and the T12, and takes the difference value as transmission time T13 of the first message in the first line and the second line;
the second network element calculates a difference value between the T21 and the T22, and takes the difference value as transmission time T23 of the second message in the first line and the second line;
the second network element calculates the time ratio of the T23 to the T13, and takes the time ratio as the speed ratio V1/V2 of the first message to the second message;
the second network element determines, according to the V1/V2, a ratio T1(L1)/T2(L1) of line transmission delays of the first packet and the second packet in the first line, respectively;
and the second network element calculates the line transmission delay T1(L1) of the first message on the first line and the line transmission delay T2(L1) of the second message on the first line according to the total time consumption of the first message and the second message in the first line and the T1(L1)/T2(L1), and/or calculates the line transmission delay T1(L2) of the first message on the second line and the line transmission delay T2(L2) of the second message on the second line according to the total time consumption of the first message and the second message on the second line and the T1(L1)/T2 (L1).
6. The line transmission delay calculation method according to claim 5, further comprising:
setting the clock of the first network element as a first clock, setting the clock of the second network element as a second clock, and receiving, by the second network element, a third message with a first wavelength transmitted by the first network element through a first line, and recording, by the second clock, a time t20 at which the third message is received;
the second network element receives a seventh message from the first network element, where the seventh message includes a time t10, and the time t10 is a time recorded by the first network element through the first clock when the third message is transmitted;
the second network element transmits a fifth message with a second wavelength to the first network element through a first line, and records the t30 moment of transmitting the fifth message through the second clock;
the second network element receives an eighth message from the first network element, where the eighth message includes a time t40, and the time t40 is a time recorded by the first network element through a first clock when the fifth message is received;
after calculating the line transmission delay of the first message and the line transmission delay of the second message, the second network element calculates the delay difference between the first message and the second message;
taking t10, t20, t30 and t40 as timestamp information, and the second network element performing delay compensation on a target timestamp in the timestamp information according to the delay difference, wherein the target timestamp is a timestamp acquired when information is transmitted through a wavelength with smaller delay between the first wavelength and the second wavelength;
and the second network element calculates the time deviation between the first network element and the second network element according to the time stamp information after the time delay compensation.
7. The line transmission delay calculation method according to claim 5 or 6, further comprising:
if the first line is an optical fiber, after calculating the line transmission delay of the first message in the first line, calculating the ratio of the light speed to the refractive index of the first message in the first line, and taking the ratio as the transmission speed of the first message in the first line;
and calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
8. The line transmission delay calculation method according to claim 7, further comprising:
if the first line is an optical fiber, calculating the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line and the wavelength interval of the first wavelength and the second wavelength after calculating the line transmission delay of the first message and the line transmission delay of the second message.
9. A line transmission delay calculating device is applied to a first network element, wherein the first network element is connected with a second network element through a first line and a second line respectively, and the line transmission delay calculating device comprises:
a first sending module, configured to send a first packet with a first wavelength to the second network element through a first line;
a first obtaining module, configured to receive the first packet returned by the second network element through a second line, determine a total delay time T11 of the first packet according to sending time and receiving time of the first packet, and receive, from the second network element, a residence time T12 of the first packet in the second network element;
a second sending module, configured to send a second message with a second wavelength to the second network element through a second line;
a second obtaining module, configured to receive the second packet returned by the second network element through the first line, determine a total delay time T21 of the second packet according to sending time and receiving time of the second packet, and receive, from the second network element, a residence time T22 of the second packet in the second network element;
a first calculating module, configured to calculate a line transmission delay of the first packet and a line transmission delay of the second packet according to T11, T12, T21, and T22;
the first computing module includes:
a first transmission time calculation unit, configured to calculate a difference between the T11 and the T12, and use the difference as a transmission time T13 of the first packet in the first line and the second line;
a second transmission time calculating unit, configured to calculate a difference between the T21 and the T22, and use the difference as a transmission time T23 of a second packet in a first line and a second line;
a first speed ratio calculating unit, configured to calculate a time ratio between the T23 and the T13, and use the time ratio as a speed ratio V1/V2 between a first packet and a second packet;
a first delay ratio calculation unit, configured to determine, according to the V1/V2, a ratio T1(L1)/T2(L1) of line transmission delays of the first packet and the second packet in the first line, respectively;
a first transmission delay calculating unit, configured to calculate, according to total time consumption of the first packet and the second packet in the first line and the T1(L1)/T2(L1), a line transmission delay T1(L1) of the first packet in the first line and a line transmission delay T2(L1) of the second packet in the first line, and/or, according to total time consumption of the first packet and the second packet in the second line and the T1(L1)/T2(L1), calculate a line transmission delay T1(L2) of the first packet in the second line and a line transmission delay T2(L2) of the second packet in the second line.
10. The apparatus of claim 9, wherein the clock of the first network element is set as a first clock, and the clock of the second network element is set as a second clock, further comprising:
a third message transmission module, configured to transmit a third message with the first wavelength to the second network element through the first line at time t10 of the first clock;
a fourth packet receiving module, configured to receive a fourth packet from the second network element, where the fourth packet includes a time t20, and the time t20 is a time recorded by the second network element through a second clock when the third packet is received;
a fifth message receiving module, configured to receive, through a first line, a fifth message with a second wavelength and transmitted by the second network element, and record, through the first clock, that a time when the fifth message is received is a time t 40;
a sixth message module, configured to receive a sixth message including a time t30 from the second network element, where the time t30 is a time at which the second network element transmits the fifth message recorded by a second clock;
the first delay difference calculation module is used for calculating the delay difference between the first message and the second message after the line transmission delay of the first message on the first line and the line transmission delay of the second message on the first line are obtained through calculation;
the first delay compensation module takes t10, t20, t30 and t40 as timestamp information, and the delay compensation unit is configured to perform delay compensation on a target timestamp in the timestamp information according to the delay difference, where the target timestamp is a timestamp corresponding to a wavelength transmission information with a smaller delay transmitted through a line between the first wavelength and the second wavelength;
and the first time deviation calculating module is used for calculating the time deviation between the first network element and the second network element according to the timestamp information after the time delay compensation.
11. The line propagation delay calculation apparatus according to claim 9 or 10, further comprising:
the first speed calculation module is used for calculating a ratio of an optical speed to a refractive index of a first message on a first line after calculating line transmission delay of the first message on the first line if the first line is an optical fiber, and taking the ratio as the transmission speed of the first message on the first line;
and the first length calculation module is used for calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
12. The line propagation delay calculation apparatus according to claim 11, further comprising:
a first dispersion coefficient calculation module;
if the first line is an optical fiber, after calculating the line transmission delay of the first message and the line transmission delay of the second message, the first dispersion coefficient calculating module is configured to calculate the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line, and the wavelength interval between the first wavelength and the second wavelength.
13. A line transmission delay calculating device is applied to a second network element, the second network element is connected with a first network element through a first line and a second line respectively, the line transmission delay calculating device comprises:
a fourth receiving module, configured to receive a first message with a first wavelength, where the first message is transmitted by the first network element through a first line;
a third obtaining module, configured to transmit the first packet back to the first network element through a second line, record a residence time T12 of the first packet in the second network element, and receive a total delay time T11 of the first packet from the first network element;
a fifth receiving module, configured to receive a second message with a second wavelength, where the second message is transmitted by the first network element through a second line;
a fourth obtaining module, configured to transmit the second packet back to the first network element through a first line, record a residence time T22 of the second packet in the second network element, and receive a total delay time T21 of the second packet from the first network element;
a fourth calculating module, configured to calculate a line transmission delay of the first packet and a line transmission delay of the second packet according to T11, T12, T21, and T22;
the fourth calculation module includes:
a third transmission time calculating unit, configured to calculate a difference between the T11 and the T12, and use the difference as a transmission time T13 of the first packet in the first line and the second line;
a fourth transmission time calculating unit, configured to calculate a difference between the T21 and the T22, and use the difference as a transmission time T23 of the second packet in the first line and the second line;
a second speed ratio calculating unit, configured to calculate a time ratio between the T23 and the T13, and use the time ratio as a speed ratio V1/V2 between the first packet and the second packet;
a second delay ratio calculating unit, configured to determine, according to the V1/V2, a ratio T1(L1)/T2(L1) of line transmission delays of the first packet and the second packet in the first line, respectively;
a second transmission delay calculating unit, configured to calculate, according to the total time consumption of the first packet and the second packet in the first line and the T1(L1)/T2(L1), a line transmission delay T1(L1) of the first packet in the first line and a line transmission delay T2(L1) of the second packet in the first line, and/or, according to the total time consumption of the first packet and the second packet in the second line and the T1(L1)/T2(L1), calculate a line transmission delay T1(L2) of the first packet in the second line and a line transmission delay T2(L2) of the second packet in the second line.
14. The apparatus of claim 13, wherein the clock of the first network element is set as a first clock, and the clock of the second network element is set as a second clock, further comprising:
a third packet receiving module, configured to receive a third packet with a first wavelength and transmitted by the first network element through a first line, and record, through the second clock, a t20 time when the third packet is received;
a seventh packet receiving module, configured to receive a seventh packet from the first network element, where the seventh packet includes a time t10, and the time t10 is a time when the first network element transmits the third packet through the first clock;
a fifth message transmission module, configured to transmit a fifth message with a second wavelength to the first network element through a first line, and record, through the second clock, a t30 time at which the fifth message is transmitted;
an eighth packet receiving module, configured to receive an eighth packet from the first network element, where the eighth packet includes a time t40, and the time t40 is a time when the fifth packet is received by the first network element through a first clock record;
the second delay difference calculation module is used for calculating the delay difference between the first message and the second message after calculating the line transmission delay of the first message and the line transmission delay of the second message;
a second delay compensation module, which takes t10, t20, t30 and t40 as timestamp information, and is configured to perform delay compensation on a target timestamp in the timestamp information according to the delay difference, where the target timestamp is a timestamp obtained when information is transmitted through a wavelength with a smaller delay between the first wavelength and the second wavelength;
and the second time deviation calculating module is used for calculating the time deviation between the first network element and the second network element according to the time stamp information after the time delay compensation.
15. The line transmission delay calculation apparatus according to claim 13 or 14, further comprising:
the second speed calculation module is used for calculating the ratio of the light speed to the refractive index of the first message on the first line after calculating the line transmission delay of the first message on the first line if the first line is an optical fiber, and taking the ratio as the transmission speed of the first message on the first line;
and the second length calculation module is used for calculating the product of the transmission speed of the first message on the first line and the line transmission delay of the first message on the first line, and taking the product as the length of the first line.
16. The line propagation delay calculation apparatus according to claim 15, further comprising:
a second dispersion coefficient calculation module;
if the first line is an optical fiber, after calculating the line transmission delay of the first message and the line transmission delay of the second message, the second dispersion coefficient calculating module is configured to calculate the dispersion coefficient of the first line according to the line transmission delay difference of the first message and the second message, the length of the first line, and the wavelength interval between the first wavelength and the second wavelength.
17. A line transmission delay calculation system, comprising:
the first network element is connected with the second network element through a first line and a second line respectively;
the first network element sends a first message with a first wavelength to the second network element through a first line;
after receiving the first message, the second network element transmits the first message back to the first network element through a second line, and records the residence time T12 of the first message in the second network element;
the second network element transmits the T12 to the first network element;
the first network element receives the first message returned by the second network element through a second line, determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message, and receives the residence time T12 of the first message in the second network element from the second network element;
the first network element sends a second message with a second wavelength to the second network element through a second line;
after receiving the second message, the second network element transmits the second message back to the first network element through a first line, and records the residence time T22 of the second message in the second network element;
the second network element transmits the T22 to the first network element;
the first network element receives the second message returned by the second network element through a first line, determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message, and receives the residence time T22 of the second message in the second network element from the second network element;
the first network element calculates a difference value between the T11 and the T12, and takes the difference value as transmission time T13 of the first message in the first line and the second line;
the first network element calculates a difference value between the T21 and the T22, and takes the difference value as transmission time T23 of the second message in the first line and the second line;
the first network element calculates the time ratio of the T23 to the T13, and the time ratio is used as the speed ratio V1/V2 of the first message to the second message;
the first network element determines a ratio T1(L1)/T2(L1) of line transmission delay of the first message and the second message in a first line respectively according to the V1/V2;
and the first network element calculates a line transmission delay T1(L1) of the first message on the first line and a line transmission delay T2(L1) of the second message on the first line according to the total time consumption of the first message and the second message in the first line and the T1(L1)/T2(L1), and/or calculates a line transmission delay T1(L2) of the first message on the second line and a line transmission delay T2(L2) of the second message on the second line according to the total time consumption of the first message and the second message on the second line and the T1(L1)/T2 (L1).
18. A line transmission delay calculation system, comprising:
the first network element is connected with the second network element through a first line and a second line respectively;
the first network element sends a first message with a first wavelength to the second network element through a first line;
after receiving the first message, the second network element transmits the first message back to the first network element through a second line, and records the residence time T12 of the first message in the second network element;
the first network element receives the first message returned by the second network element through a second line, and determines the total delay time T11 of the first message according to the sending time and the receiving time of the first message;
the first network element sends a second message with a second wavelength to the second network element through a second line;
after receiving the second message, the second network element transmits the second message back to the first network element through a first line, and records the residence time T22 of the second message in the second network element;
the first network element receives the second message returned by the second network element through a first line, and determines the total delay time T21 of the second message according to the sending time and the receiving time of the second message;
the first network element transmits T11 and T21 to a second network element;
the second network element calculates a difference value between the T11 and the T12, and takes the difference value as transmission time T13 of the first message in the first line and the second line;
the second network element calculates a difference value between the T21 and the T22, and takes the difference value as transmission time T23 of the second message in the first line and the second line;
the second network element calculates the time ratio of the T23 to the T13, and takes the time ratio as the speed ratio V1/V2 of the first message to the second message;
the second network element determines, according to the V1/V2, a ratio T1(L1)/T2(L1) of line transmission delays of the first packet and the second packet in the first line, respectively;
and the second network element calculates the line transmission delay T1(L1) of the first message on the first line and the line transmission delay T2(L1) of the second message on the first line according to the total time consumption of the first message and the second message in the first line and the T1(L1)/T2(L1), and/or calculates the line transmission delay T1(L2) of the first message on the second line and the line transmission delay T2(L2) of the second message on the second line according to the total time consumption of the first message and the second message on the second line and the T1(L1)/T2 (L1).
CN201710495000.7A 2017-06-26 2017-06-26 Line transmission delay calculation method and device Active CN109120469B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710495000.7A CN109120469B (en) 2017-06-26 2017-06-26 Line transmission delay calculation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710495000.7A CN109120469B (en) 2017-06-26 2017-06-26 Line transmission delay calculation method and device

Publications (2)

Publication Number Publication Date
CN109120469A CN109120469A (en) 2019-01-01
CN109120469B true CN109120469B (en) 2021-11-30

Family

ID=64821737

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710495000.7A Active CN109120469B (en) 2017-06-26 2017-06-26 Line transmission delay calculation method and device

Country Status (1)

Country Link
CN (1) CN109120469B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112825510A (en) * 2019-11-21 2021-05-21 华为技术有限公司 Method and device for updating mapping relation
CN111064507A (en) * 2019-12-25 2020-04-24 中国联合网络通信集团有限公司 Method and device for detecting length of optical fiber link and terminal equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011085585A1 (en) * 2010-07-23 2011-07-21 华为技术有限公司 Method and device for time synchronization
CN103210690B (en) * 2011-09-09 2014-12-31 华为技术有限公司 Time synchronization method and system, and node device
CN102412955B (en) * 2011-11-28 2015-08-19 华为技术有限公司 Time deviation acquisition methods when optical fiber is asymmetric between master-slave equipment and communication system
CN102394741A (en) * 2011-12-13 2012-03-28 杭州华三通信技术有限公司 Method for realizing precision time synchronization based on IEEE1588 and apparatus thereof
CN105933085B (en) * 2016-04-27 2018-06-12 西南民族大学 The method for measuring asymmetric fiber loop chain circuit transmission time delay

Also Published As

Publication number Publication date
CN109120469A (en) 2019-01-01

Similar Documents

Publication Publication Date Title
EP3284217B1 (en) Methods, systems, and computer readable medium for synchronizing timing among network interface cards (nics) in a network equipment test device
EP3284244B1 (en) Methods, systems, and computer readable media for emulating network devices with different clocks
EP2528254B1 (en) Method and device for time synchronization
KR101705592B1 (en) Method and apparatus for performing time synchronization between nodes
US9762318B2 (en) Time synchronization apparatus and method for automatically detecting the asymmetry of an optical fiber
CN103168440B (en) Time path compensation method and device
CN104113517A (en) Timestamp generation method, device and system
CN109392074B (en) Clock calibration method and device
CN109714700B (en) Synchronization method, positioning method, main base station and positioning system
CN104836630A (en) IEEE1588 clock synchronization system and implementation method therefor
CN107836136B (en) Synchronization method and device
CN109120469B (en) Line transmission delay calculation method and device
WO2013143385A1 (en) Calculating time offset
KR102614829B1 (en) Apparatus and method for synchoronizing clock
CN109995604B (en) Flexible Ethernet time delay measurement method and related equipment
CN112564842B (en) Control system timing method and device for railway vehicle
CN116684028B (en) Multi-sensor time synchronization method, device, equipment and storage medium
JP5913067B2 (en) Time synchronization system, transmission path delay time correction method, time synchronization device
US20150244455A1 (en) Calculating time offset
CN108401287B (en) Networking method and device
CN113259039A (en) Time synchronization method and device, computer equipment and storage medium
CN112398560A (en) Measuring method, measuring device and storage medium
CN113204516A (en) Method and device for time synchronization of processors
CN112152744A (en) Clock synchronization method and device, FPGA chip and optical fiber communication network
CN109379252B (en) Network delay measurement method and device based on programmable logic device

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