Ranging method, apparatus, and storage medium

By correcting the loop delay of the gateway in FTTH and FTTR systems, and combining the delay of photoelectric conversion and signal processing, the problem of low ranging accuracy caused by the difference of downlink gateways was solved, and high-precision ranging was achieved when the fiber length in the FTTR system exceeds 2Km.

WO2025218451A1PCT designated stage Publication Date: 2025-10-23ZTE CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/084328
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-04-18
Filing Date
2025-03-24
Publication Date
2025-10-23

AI Technical Summary

Technical Problem

Existing ranging methods in FTTH and FTTR systems have low ranging accuracy due to differences in the main chip processing power, optical module specifications, and single-board wiring of different downlink gateways. It is difficult to meet the ranging error requirement of ±1%, especially in FTTR systems where the maximum fiber length exceeds 2Km, the error may reach 100m.

Method used

By acquiring the loop delay, photoelectric conversion delay, and signal processing delay between the first gateway and the second gateway, and correcting them, the distance is determined. The accurate distance is then calculated using the fiber refractive index and ranging accuracy coefficient, thereby improving ranging accuracy.

Benefits of technology

This improves the accuracy of ranging, ensuring that the ranging error requirement of ±1% can still be met when the fiber length in the FTTR system exceeds 2Km.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025084328_23102025_PF_FP_ABST
    Figure CN2025084328_23102025_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a ranging method, an apparatus, a storage medium. The method comprises: acquiring a round-trip delay between a first gateway and a second gateway, first time information, and second time information, wherein the first time information comprises a photoelectric conversion delay of the first gateway and a signal processing delay of the first gateway, and the second time information comprises a photoelectric conversion delay of the second gateway and a signal processing delay of the second gateway; correcting the round-trip delay on the basis of the first time information and the second time information, so as to obtain a corrected round-trip delay; and determining the distance between the first gateway and the second gateway on the basis of the corrected round-trip delay.
Need to check novelty before this filing date? Find Prior Art

Description

Ranging method and device, and storage medium

[0001] The present disclosure claims priority to Chinese Patent Application No. 202410470709.1, filed on April 18, 2024, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0002] The present disclosure relates to the field of communication technology, and in particular to a ranging method, device and storage medium. BACKGROUND

[0003] With the continuous development of optical network technology, Fiber to the Home (FTTH) systems and Fiber to the Room (FTTR) systems have been widely applied.

[0004] In the FTTH system, different optical network units (ONUs) are usually arranged at physical locations with different distances from an optical line terminal (OLT). Correspondingly, in the FTTR system, different single family units (SFUs) are also usually arranged at physical locations with different distances from a main FTTR unit (MFU). In order to ensure that the data frames sent by each ONU or each SFU are synchronized, so as to realize time division multiplexing of uplink signals, it is usually necessary to measure the distance between the OLT and each ONU, or the distance between the MFU and each SFU. SUMMARY

[0005] In one aspect, a ranging method is provided, including: obtaining a loop delay between a first gateway and a second gateway, first time information and second time information, wherein the first time information includes an optoelectronic conversion delay of the first gateway and a signal processing delay of the first gateway, and the second time information includes an optoelectronic conversion delay of the second gateway and a signal processing delay of the second gateway; correcting the loop delay according to the first time information and the second time information to obtain a corrected loop delay; and determining a distance between the first gateway and the second gateway according to the corrected loop delay.

[0006] In another aspect, a ranging device is provided, comprising: a communication unit and a processing unit; the communication unit is configured to obtain a loop delay between a first gateway and a second gateway, first time information and second time information, wherein the first time information comprises an optical-electrical conversion delay of the first gateway and a signal processing delay of the first gateway, and the second time information comprises an optical-electrical conversion delay of the second gateway and a signal processing delay of the second gateway; the processing unit is configured to correct the loop delay according to the first time information and the second time information to obtain a corrected loop delay; and the processing unit is further configured to determine a distance between the first gateway and the second gateway according to the corrected loop delay.

[0007] In yet another aspect, a ranging method is provided, comprising: obtaining third time information and fourth time information, wherein the third time information is used to represent time information of receiving an optical signal and time information of sending an optical signal of a first gateway, and the fourth time information is used to represent time information of receiving an optical signal and time information of sending an optical signal of a second gateway; determining a message transmission delay between the first gateway and the second gateway according to the third time information and the fourth time information; and determining a distance between the first gateway and the second gateway according to the message transmission delay.

[0008] In yet another aspect, a ranging device is provided, comprising: a communication unit and a processing unit; the communication unit is configured to obtain third time information and fourth time information, wherein the third time information is used to represent time information of receiving an optical signal and time information of sending an optical signal of a first gateway, and the fourth time information is used to represent time information of receiving an optical signal and time information of sending an optical signal of a second gateway; the processing unit is configured to determine a message transmission delay between the first gateway and the second gateway according to the third time information and the fourth time information; and the processing unit is further configured to determine a distance between the first gateway and the second gateway according to the message transmission delay.

[0009] In yet another aspect, a communication device is provided, comprising: a memory and a processor; the memory and the processor are coupled; the memory is configured to store a computer program; and the processor is configured to implement the ranging method of any one of the above aspects or embodiments when executing the computer program.

[0010] In yet another aspect, a computer readable storage medium is provided, and the computer readable storage medium stores computer program instructions, and the computer program instructions are executed by a processor to implement the ranging method of any one of the above aspects or embodiments.

[0011] In yet another aspect, a computer program product is provided, and the computer program product comprises computer program instructions, and the computer program instructions are executed by a processor to implement the ranging method of any one of the above aspects or embodiments.

[0012] In yet another aspect, a gateway is provided for implementing the ranging method of any of the above aspects or embodiments. BRIEF DESCRIPTION OF DRAWINGS

[0013] In order to more clearly illustrate the technical solutions in the present disclosure, the following will briefly introduce the drawings needed to be used in some embodiments of the present disclosure. Obviously, the drawings described in the following are only some of the drawings of some embodiments of the present disclosure, and other drawings can also be obtained by those skilled in the art according to these drawings.

[0014] FIG. 1 is a ranging system architecture diagram provided by some embodiments of the present disclosure.

[0015] FIG. 2 is a structural schematic diagram of a first gateway and a second gateway provided by some embodiments of the present disclosure.

[0016] FIG. 3 is a flow schematic diagram of a ranging method provided by some embodiments of the present disclosure.

[0017] FIG. 4 is a flow schematic diagram of another ranging method provided by some embodiments of the present disclosure.

[0018] FIG. 5 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0019] FIG. 6 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0020] FIG. 7 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0021] FIG. 8 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0022] FIG. 9 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0023] FIG. 10 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0024] FIG. 11 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0025] FIG. 12 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0026] FIG. 13 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0027] FIG. 14 is a flow schematic diagram of yet another ranging method provided by some embodiments of the present disclosure.

[0028] FIG. 15 is a flow diagram of another ranging method according to some embodiments of the present disclosure.

[0029] FIG. 16 is a flow diagram of another ranging method according to some embodiments of the present disclosure.

[0030] FIG. 17 is a structural diagram of a communication device according to some embodiments of the present disclosure.

[0031] FIG. 18 is a structural diagram of another communication device according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0032] The technical solutions in the present disclosure will be described clearly and completely below with reference to the drawings in the present disclosure. Obviously, the described embodiments are only some of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work fall within the scope of the present disclosure.

[0033] It should be noted that in the present disclosure, the words such as "exemplarily" or "for example" are used to represent as an example, illustration or description. Any embodiment or design scheme described as "exemplarily" or "for example" in the present disclosure should not be interpreted as more preferred or more advantageous than other embodiments or design schemes. In fact, the words such as "exemplarily" or "for example" are intended to present the relevant concept by way of example.

[0034] Hereinafter, the terms "first", "second", and the like are used only for the purpose of description, and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second", and the like can explicitly or implicitly include one or more of the features.

[0035] In the description of the present disclosure, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in the present disclosure is only a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean: only A, only B, and A and B. In addition, "at least one" means one or more, and "multiple" means two or more.

[0036] It can be understood that, without conflict, the functions, steps, etc. shown in the present disclosure can occur in an order different from that shown in the present disclosure, and there can be other steps between any two adjacent functions, steps, etc. shown in the present disclosure.

[0037] With the continuous development of optical network technology, FTTH systems and FTTR systems have been widely applied.

[0038] In the FTTH system, different ONUs are usually arranged at physical locations with different distances from the OLT. Correspondingly, in the FTTR system, different SFUs are usually arranged at physical locations with different distances from the MFU. In order to ensure that the data frames transmitted by the ONUs or the SFUs are synchronized, so as to realize time division multiplexing of the upstream signals, it is usually necessary to measure the distances between the OLT and the ONUs, or between the MFU and the SFUs.

[0039] In an implementation, appropriate equalization delay parameters EqD can be set for the ONUs or the SFUs. Then, after the round trip delays RTD between the OLT and the ONUs, or between the MFU and the SFUs are obtained, the data frames transmitted by the ONUs or the SFUs can be synchronized according to the RTD and the EqD, so as to ensure that the data transmitted by the ONUs or the SFUs will not conflict in time. That is, all the ONUs or the SFUs are equivalent to being at the same logical distance and transmitting data in the corresponding time slots, so as to realize time division multiplexing of the upstream signals.

[0040] In addition, by measuring the distances between the OLT and the ONUs, or between the MFU and the SFUs, the actual fiber distances between the OLT and the ONUs, or between the MFU and the SFUs can also be determined.

[0041] Some distance measurement methods can be to correct the loop delay between the upstream gateway (such as the OLT in the FTTH system or the MFU in the FTTR system) and the downstream gateway (such as the ONU in the FTTH system or the SFU in the FTTR system) according to the minimum response time RT of the downstream gateway, and to determine the distance between the upstream gateway and the downstream gateway according to the product of the corrected delay and the coefficient of the fiber refractive index and the distance measurement accuracy. The RT is usually a fixed value.

[0042] Exemplarily, a distance measurement method satisfies the following formula: FDi=(RTDi-RTi)×102m / us;

[0043] FDi is used to represent the distance between the upstream gateway and the i-th downstream gateway, RTDi is used to represent the loop delay (which can also be referred to as the round trip delay) between the upstream gateway and the i-th downstream gateway, RTi is used to represent the minimum response time (for example, 35±1us) between the upstream gateway and the i-th downstream gateway, and 102m / us is the coefficient that best reflects the fiber refractive index and the distance measurement accuracy of G.652.

[0044] The above distance measurement method can usually ensure that the determined distance measurement error is within ±1%.

[0045] However, in actual application, due to the differences in the processing and computing capabilities of the main chips (i.e., processors) of different downstream gateways, the specifications of optical modules, and the wiring of single boards, the RTs of different downstream gateways can be different, and thus the above ranging method has low accuracy, and it is difficult to ensure the accuracy of ranging, and the ranging error can exceed the range of ±1% and reach 100 m.

[0046] In the definition of the G.fin DLL standard, the length of the optical fiber between the MFU and the SFU in the FTTR system cannot exceed 2Km. In this case, if the error of the above ranging method reaches 100 m, the actual demand cannot be met.

[0047] The ranging method provided in the embodiments of the present disclosure can be used in the communication system as shown in FIG. 1. As shown in FIG. 1, the communication system includes a first gateway 101 and a second gateway 102.

[0048] As can be seen from the above, when the first gateway corrects the loop delay, not only the signal processing delay of the downstream gateway is referred to, but also the photoelectric conversion delay of the upstream gateway, the signal processing delay of the upstream gateway, and the photoelectric conversion delay of the downstream gateway are referred to. In this way, the ranging method provided in the embodiments of the present disclosure can correct the loop delay by referring to various time delays that affect the ranging accuracy in the process of packet transmission, so as to accurately determine the distance between the first gateway and the second gateway, and improve the accuracy of ranging.

[0049] The ranging method provided in the embodiments of the present disclosure can be used in the communication system as shown in FIG. 1. As shown in FIG. 1, the communication system includes a first gateway 101 and a second gateway 102.

[0050] The first gateway 101 and the second gateway 102 are in communication connection.

[0051] In some embodiments, the first gateway can be an upstream gateway, such as an OLT in an FTTH system or an MFU in an FTTR system; and the second gateway can be a downstream gateway, such as an ONU in an FTTH system or an SFU in an FTTR system.

[0052] Of course, the first gateway can also be a downstream gateway and the second gateway can also be an upstream gateway when the distance between the first gateway and the second gateway is determined, and the first gateway and the second gateway can also both be upstream gateways or downstream gateways, which is not limited in the embodiments of the present disclosure.

[0053] For ease of description, the embodiments of the present disclosure take the first gateway as an upstream gateway and the second gateway as a downstream gateway as an example for description.

[0054] In some examples, it is assumed that the first gateway is an OLT / MFU and the second gateway is an ONU / SFU, and FIG. 2 shows a structural schematic diagram of the first gateway and the second gateway. It should be noted that when the first gateway is an OLT, the second gateway is usually an ONU. Correspondingly, when the first gateway is an MFU, the second gateway is usually an SFU, which will not be described in detail hereinafter.

[0055] As shown in (a) of FIG. 2, the OLT / MFU includes a main chip (which can also be referred to as a processor (Central Processing Unit, CPU)), a single-board wiring, and an optical-electric conversion module (which can also be referred to as an optical-electric conversion device).

[0056] The main chip is connected with the optical-electric conversion module through the single-board wiring.

[0057] The optical-electric conversion module is used to receive an optical signal carrying an upstream packet with service content, and convert the optical signal into an electrical signal, and send the converted electrical signal to the main chip through the single-board wiring.

[0058] The main chip is used to perform high-speed electrical signal processing (serdes) conversion and software processing on the electrical signal, so as to extract the service content of the upstream packet, and generate an electrical signal of a corresponding downstream packet (such as a response packet, etc.), and send the generated electrical signal of the downstream packet to the optical-electric conversion module through the single-board wiring.

[0059] The optical-electric conversion module is also used to convert the electrical signal of the downstream packet into an optical signal of the downstream packet after receiving the electrical signal of the downstream packet, and output the optical signal of the downstream packet.

[0060] From the above, the time used by the OLT / MFU between receiving the optical signal of the upstream message and outputting the optical signal of the downstream message includes three parts: the first part is the time length T1 between the time T1s when the optical signal of the upstream message is received by the photoelectric conversion module and the time T1e when the electrical signal of the upstream message is received by the main chip; the second part is the time length Tcm between the time T1e when the electrical signal of the upstream message is received by the main chip and the time T2s when the electrical signal of the downstream message is output by the main chip; and the third part is the time length T2 between the time T2s when the electrical signal of the downstream message is output by the main chip and the time T2e when the optical signal of the downstream message is output by the photoelectric conversion module.

[0061] Correspondingly, as shown in (b) of FIG. 2, the ONU / SFU also includes a main chip, a single-board wiring and a photoelectric conversion module.

[0062] The functions and connection relationships of the various components in the ONU / SFU are similar to those of the various components in the OLT / MFU, and will not be described again here.

[0063] The time used by the ONU / SFU between receiving the optical signal of the downstream message and outputting the optical signal of the upstream message includes three parts: the first part is the time length T3 between the time T3s when the optical signal of the downstream message is received by the photoelectric conversion module and the time T3e when the electrical signal of the downstream message is received by the main chip; the second part is the time length Tcs between the time T3e when the electrical signal of the downstream message is received by the main chip and the time T4s when the electrical signal of the upstream message is output by the main chip; and the third part is the time length T4 between the time T4s when the electrical signal of the upstream message is output by the main chip and the time T4e when the optical signal of the upstream message is output by the photoelectric conversion module.

[0064] It should be noted that, due to differences in the photoelectric conversion modules of different manufacturers, the processing and operation capabilities of the main chips, the wiring methods of different types and specifications of single boards, etc., the time used by the OLT / MFU and the ONU / SFU between receiving the optical signal of the message and outputting the optical signal of the message will also be different. In this case, in order to accurately determine the distance between the OLT / MFU and the ONU / SFU, the OLT / MFU can correct the loop delay according to T1, Tcs, T2, T3, Tcm, T4, thereby obtaining the distance between the OLT / MFU and the ONU / SFU.

[0065] As shown in (c) of FIG. 2, the loop delay RTD between the OLT / MFU and the ONU / SFU includes T1, Tcs, T2, T3, Tcm, T4 and the optical path transmission delay 2*TL between the OLT / MFU and the ONU / SFU. In this case, the ranging method provided by the embodiment of the present disclosure satisfies the following formula: FD=(RTD-RT-T4-T3-T2-T1)×102m / us; RT=Tcs+Tcm.

[0066] As can be seen from the above, compared with correcting the loop delay RTD by only using the fixed value RT, the present disclosure also refers to the errors caused by T1, T2, T3, Tcm, Tcs and T4, so that the present disclosure can accurately determine the distance between the OLT / MFU and the ONU / SFU, and improve the accuracy of ranging.

[0067] It should be noted that the system architecture and application scenarios described in the embodiments of the present disclosure are for more clearly illustrating the technical solutions of the embodiments of the present disclosure, and do not constitute a limitation on the technical solutions provided by the embodiments of the present disclosure. Those skilled in the art can know that, with the evolution of system architecture and the appearance of new business scenarios, the technical solutions provided by the embodiments of the present disclosure are also applicable to similar technical problems.

[0068] For example, the above communication system can be an FTTH system or an FTTR system, and can also be applicable to most current passive optical network (PON) systems, such as a Gigabit-capable PON (GPON) system, an Ethernet PON (EPON) system, a 10-Gigabit-capable symmetric PON (XGSPON) system, an XEPON asymmetric system, an XEPON symmetric system, an NGPON2 system, and a 50G PON system and a 200G PON system, etc.

[0069] The ranging method provided by the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0070] The ranging method provided by the embodiments of the present disclosure can be applied to the first gateway 101 in the communication system shown in FIG. 1. FIG. 3 shows a flowchart of a ranging method, as shown in FIG. 3, the ranging method includes the following S301-S303.

[0071] S301, the first gateway obtains the loop delay between the first gateway and the second gateway, the first time information and the second time information.

[0072] The first time information comprises an optical-electric conversion time delay of the first gateway and a signal processing time delay of the first gateway; and the second time information comprises an optical-electric conversion time delay of the second gateway and a signal processing time delay of the second gateway.

[0073] In an implementable manner, when the first gateway is manufactured, a configuration personnel can configure a test code of the loop time delay in the first gateway. When the first gateway interacts with the second gateway, the first gateway can obtain the loop time delay between the first gateway and the second gateway through the test code.

[0074] In an implementable manner, when the first gateway is manufactured, the configuration personnel can also configure the first time information and the second time information in the database of the first gateway. When the ranging method provided by the embodiment of the present disclosure is executed, the first gateway can directly obtain the first time information and the second time information from the database.

[0075] In another implementable manner, the first gateway can obtain a time point at which the optical-electric conversion module of the first gateway receives the optical signal of the second message, a time point at which the optical-electric conversion module of the first gateway sends the optical signal of the first message corresponding to the second message, a time point at which the processor (i.e., the main chip) of the first gateway receives the electric signal of the second message, and a time point at which the processor of the first gateway sends the electric signal of the first message. Then, the first gateway can determine the first time information according to the above time points, and store the first time information in the database of the first gateway. Subsequently, when the ranging method provided by the embodiment of the present disclosure is executed, the first gateway can directly obtain the first time information from the database.

[0076] In another implementable manner, when the first gateway is manufactured, the configuration personnel can configure the second time information in the database of the second gateway. When the ranging method provided by the embodiment of the present disclosure is executed, the first gateway can send a request message to the second gateway to request to obtain the second time information. The second gateway can obtain the second time information from the database in response to the request message, and send the second time information to the first gateway.

[0077] In another implementable manner, when the second time information is not configured in the database of the second gateway, the first gateway can send a request message to the second gateway to request to obtain various time point information used to determine the second time information, including a time point at which the optical-electric conversion module of the second gateway receives the optical signal of the first message, a time point at which the optical-electric conversion module of the second gateway sends the optical signal of the second message corresponding to the first message, a time point at which the processor of the second gateway receives the electric signal of the first message, and a time point at which the processor of the second gateway sends the electric signal of the second message. The second gateway can send the above time point information to the first gateway in response to the request message. After receiving the time point information, the first gateway can determine the second time information according to the time point information.

[0078] S302, the first gateway corrects the loop delay according to the first time information and the second time information to obtain a corrected loop delay.

[0079] In some implementations, since the first time information and the second time information are time information that causes errors to the loop delay, the first gateway needs to correct the loop delay according to the first time information and the second time information to obtain a corrected loop delay.

[0080] The corrected loop delay X satisfies the following formula: X = RTD - Tcs - Tcm - T4 - T3 - T2 - T1.

[0081] RTD is the loop delay, T1 and T2 are the photoelectric conversion delay of the first gateway, Tcm is the signal processing delay of the first gateway, T3 and T4 are the photoelectric conversion delay of the second gateway, and Tcs is the signal processing delay of the second gateway.

[0082] S303, the first gateway determines the distance between the first gateway and the second gateway according to the corrected loop delay.

[0083] After obtaining the corrected loop delay, the first gateway can determine the product of the corrected loop delay, the fiber refractive index, and the coefficient of ranging accuracy as the distance between the first gateway and the second gateway.

[0084] In an example, 102m / us is the coefficient that best reflects the G.652 fiber refractive index and the ranging accuracy. Therefore, the distance FD between the first gateway and the second gateway satisfies the following formula: FD = (RTD - Tcs - Tcm - T4 - T3 - T2 - T1) x 102m / us.

[0085] FIG. 4 shows a flowchart of another ranging method. In some embodiments, in combination with FIG. 3, as shown in FIG. 4, in the above S302, the first gateway corrects the loop delay according to the first time information and the second time information to obtain a corrected loop delay can include: S401-S402.

[0086] S401, the first gateway determines the sum of the photoelectric conversion delay of the first gateway, the signal processing delay of the first gateway, the photoelectric conversion delay of the second gateway, and the signal processing delay of the second gateway as a correction value.

[0087] In some implementations, since the loop delay between the first gateway and the second gateway includes the optical path transmission delay between the first gateway and the second gateway, the photoelectric conversion delay of the first gateway, the signal processing delay of the first gateway, the photoelectric conversion delay of the second gateway, and the signal processing delay of the second gateway, and the photoelectric conversion delay of the first gateway, the signal processing delay of the first gateway, the photoelectric conversion delay of the second gateway, and the signal processing delay of the second gateway are all time delays that cause errors to the loop delay, the first gateway can determine the sum of the photoelectric conversion delay of the first gateway, the signal processing delay of the first gateway, the photoelectric conversion delay of the second gateway, and the signal processing delay of the second gateway as the correction value.

[0088] S402, the first gateway determines the difference between the loop delay and the correction value as the corrected loop delay.

[0089] For example, assuming that the loop delay between the first gateway and the second gateway is 10s, the photoelectric conversion delay of the first gateway is 1s (including the photoelectric conversion delay of 0.5s of the uplink message and the photoelectric conversion delay of 0.5s of the downlink message), the signal processing delay of the first gateway is 1s, the photoelectric conversion delay of the second gateway is 1s (including the photoelectric conversion delay of 0.5s of the uplink message and the photoelectric conversion delay of 0.5s of the downlink message), and the signal processing delay of the second gateway is 1s, the correction value of the loop delay is 4s. In this case, the first gateway determines the difference between the loop delay and the correction value (10s-4s=6s) as the corrected loop delay, i.e., the optical path transmission delay between the first gateway and the second gateway is 6s.

[0090] FIG. 5 shows a flowchart of another ranging method. In some embodiments, as shown in FIG. 5, in S301 described above, the first gateway obtaining the first time information can include S501-S502.

[0091] S501, the first gateway sends a first request message to the second gateway.

[0092] The first request message is a message based on a Physical Layer Operations, Administration and Maintenance (Ploam) protocol or a message based on an Optical Network Unit Management and Control Interface (OMCI) protocol.

[0093] In some implementations, the second gateway is configured with the second time information in the database of the second gateway by a configuration personnel when the second gateway is manufactured. In this case, the first gateway can send the first request message to the second gateway to request to obtain the second time information.

[0094] S502, the first gateway receives second time information sent by the second gateway in response to the first request message.

[0095] In some implementations, since the second time information is pre-configured in the database of the second gateway, after receiving the first request message, the second gateway can send the second time information to the first gateway in response to the first request message. Accordingly, the first gateway can receive the second time information sent by the second gateway in response to the first request message.

[0096] It should be noted that the second time information is also sent based on the Ploam protocol or the OMCI protocol, and the message protocols of the first request message and the second time information are the same.

[0097] However, since the manufacturers and models of different second gateways can be different, if the second time information is pre-configured in the database of each second gateway, the configuration cost of the second gateway is increased. In this case, the first gateway can calculate the second time information by obtaining the time information of the second gateway. FIG. 6 shows a flowchart of another ranging method provided by the embodiments of the present disclosure. In some embodiments, as shown in FIG. 6, in the above S301, the first gateway obtaining the second time information can include S601-S603.

[0098] S601, the first gateway sends a second request message to the second gateway.

[0099] The second request message is a message based on the Ploam protocol or a message based on the OMCI protocol.

[0100] In an example, assuming that the first gateway is an OLT and the second gateway is an ONU, under the G984.3 standard protocol, the OLT sends a message example format of the second request message to the ONU based on the Ploam protocol as shown in Table 1.

[0101] Table 1

[0102] It should be noted that the second request message is a private Ploam message. The "field" can be referred to as "Octet" in the standard, the "content" can be referred to as "Content" in the standard, the "description" can be referred to as "Description" in the standard, and the "identifier of one ONU or identifier of all ONUs" can be referred to as "ONU-ID or 11111111" in the standard. The "directed message to one ONU or all ONUs. As a broadcast to all ONUs, ONU ID = 0xFF = 11111111" can be referred to as "Directed message to one ONU or all ONUs. As a broadcast to all ONUs, ONU ID = 0xFF = 11111111" in the standard. The "message identification of the second request message (also referred to as the response delay request message)" can be referred to as "Message identification Get Response Delay" in the standard. The "reserved bit" can be referred to as "reserved" in the standard. In the following table, the same description as in Table 1 can refer to the related description in the standard, and the subsequent description will not be repeated.

[0103] In yet another example, assuming that the first gateway is an OLT and the second gateway is an ONU, the message format of the second request message sent by the OLT to the ONU based on the G987.3 standard protocol is shown in Table 2.

[0104] Table 2

[0105] It should be noted that the second request message is a private Ploam message. The above "single or broadcast to all ONUs, when broadcast to all ONUs, ONU ID is 0x3FF" can be referred to as "Directed message to one ONU or broadcast message to all ONUs. As a broadcast to all ONUs, ONU ID = 0x03FF" in the standard, the above "sequence number" can be referred to as "SeqNo" in the standard, the above "unicast or broadcast physical layer operation management and maintenance sequence number, as appropriate" can be referred to as "Unicast or broadcast PLOAM sequence number, as appropriate" in the standard, the above "message integrity check" can be referred to as "Messages Integrity Check, MIC", and the above "message integrity check based on the second request message of the physical layer operation management and maintenance protocol using message integrity check" can be referred to as "Message integrity check computed using the default PLOAM" in the standard. In the following table, the same description as Table 2 can refer to the related description in the standard, and the subsequent description will not be repeated.

[0106] In another example, assuming that the first gateway is an OLT and the second gateway is an ONU, under the G9804.2 standard protocol, the OLT sends a second request message to the ONU based on the Ploam protocol. The message example format is shown in Table 3.

[0107] Table 3

[0108] It should be noted that the second request message is a private Ploam message. The above "message type ID" can be referred to as "Message type ID" in the standard, the above "padding" can be referred to as "Padding" in the standard, and the above "transmitter sets to 0x00, receiver does not set" can be referred to as "Set to 0x00 by the transmitter; treated as“don't care”by the receiver" in the standard. In the following table, the same description as Table 3 can refer to the related description in the standard, and the subsequent description will not be repeated.

[0109] In another example, assuming that the first gateway is an MFU and the second gateway is an SFU, under the G.Fin standard protocol, the MFU sends a second request message to the SFU based on the Ploam protocol. The message example format is shown in Table 4.

[0110] Table 4

[0111] S602, the first gateway receives the time information sent by the second gateway in response to the second request message.

[0112] The time information includes: a first time, a second time, a third time and a fourth time; the first time is the time when the optical-electric conversion module of the second gateway receives the optical signal of the first message; the second time is the time when the optical-electric conversion module of the second gateway sends the optical signal of the second message corresponding to the first message; the third time is the time when the processor of the second gateway receives the electrical signal of the first message; and the fourth time is the time when the processor of the second gateway sends the electrical signal of the second message.

[0113] In some embodiments, the first message and the second message can be a group of request messages and response messages.

[0114] In some implementations, after receiving the second request message, the second gateway can collect the above-mentioned time information, and send the above-mentioned time information to the first gateway in response to the second request message. Accordingly, the first gateway can receive the above-mentioned time information sent by the second gateway in response to the second request message.

[0115] It should be noted that the time information is also sent based on the Ploam protocol or based on the OMCI protocol, and the message protocol of the second request message and the time information is the same.

[0116] In an example, assuming that the first gateway is an OLT and the second gateway is an ONU, under the G984.3 standard protocol, the ONU sends the time information to the OLT based on the Ploam protocol. The message format is shown in Table 5.

[0117] Table 5

[0118] It should be noted that the message for reporting the time information is a private Ploam message. The "identity of the ONU receiving the message" in the standard can also be referred to as "Indicates the ONU sourcing this message", the "identity of the message for reporting the time information (which can also be referred to as the message for reporting the response delay)" in the standard can also be referred to as "Message identification Pon Response Delay notify", the "time when the optical signal of the first message arrives at the ONU optical-electric conversion module" in the standard can also be referred to as "The Time message arriving ONU Optical device", the "time when the electrical signal of the first message arrives at the ONU processor" in the standard can also be referred to as "The Time message arriving ONU CPU", the "time when the electrical signal of the second message leaves the ONU processor" in the standard can also be referred to as "The Time message leaving ONU CPU", and the "time when the optical signal of the second message leaves the ONU optical-electric conversion module" in the standard can also be referred to as "The Time message leaving ONU Optical device". In the following table, the same description as Table 5 can refer to the related description in the standard, and subsequent descriptions will not be repeated.

[0119] In another example, assuming that the first gateway is an OLT and the second gateway is an ONU, under the G987.3 standard protocol, the ONU sends a message for reporting time information to the OLT based on the Ploam protocol. The example format is shown in Table 6.

[0120] Table 6

[0121] It should be noted that the message for reporting the time information is a private Ploam message. The "identity of the ONU receiving the message" in the standard can also be referred to as "Indicates the ONU sourcing this message", the "identity of the message for reporting the time information (which can also be referred to as the message for reporting the response delay)" in the standard can also be referred to as "Message identification Pon Response Delay notify", the "time when the optical signal of the first message arrives at the ONU optical-electric conversion module" in the standard can also be referred to as "The Time message arriving ONU Optical device", the "time when the electrical signal of the first message arrives at the ONU processor" in the standard can also be referred to as "The Time message arriving ONU CPU", the "time when the electrical signal of the second message leaves the ONU processor" in the standard can also be referred to as "The Time message leaving ONU CPU", and the "time when the optical signal of the second message leaves the ONU optical-electric conversion module" in the standard can also be referred to as "The Time message leaving ONU Optical device". In the following table, the same description as Table 5 can refer to the related description in the standard, and subsequent descriptions will not be repeated.

[0122] In another example, assuming the first gateway is an OLT and the second gateway is an ONU, under the G.9804.2 standard protocol, the ONU sends a message of time information to the OLT based on the Ploam protocol. An example format of the message is shown in Table 7.

[0123] Table 7

[0124] It should be noted that the above message of reporting time information is a private Ploam message. The above "message type of reporting time information (which can also be referred to as a message of reporting response delay) is identified as 0x1F" can also be referred to as "0x1F, Message identification Pon Response Delay notify" in the standard. In the following table, the same description as Table 7 can refer to the relevant description in the standard, and the following will not be described in detail.

[0125] In another example, assuming the first gateway is an OLT and the second gateway is an ONU, under the G.Fin standard protocol, the ONU sends a message of time information to the OLT based on the Ploam protocol. An example format of the message is shown in Table 8.

[0126] Table 8

[0127] It should be noted that the above message of reporting time information is a private Ploam message.

[0128] In another example, in addition to the above private Ploam message, the second gateway can also report time information using the reserved bits of the related standard Ploam message to be compatible with the related standard. Taking the G.987.3 standard protocol as an example, the 17-20 bytes of the Serial Number ONU message defined by the standard can be used to transmit time information.

[0129] Assuming the first gateway is an OLT and the second gateway is an ONU, under the G.987.3 standard protocol, the ONU sends a message of time information to the OLT based on the Serial Number ONU message. An example format of the message is shown in Table 9.

[0130] Table 9

[0131] The "broadcast ONU identifier" can be referred to as "Unassigned ONU ID" in the standard, the "message type is a sending ONU serial number message" can be referred to as "Message type ID Serial Number ONU" in the standard, the "vendor identifier" can be referred to as "Vendor ID" in the standard, the "vendor-specific serial number" can be referred to as "Vendor specific serial number, VSSN" in the standard, the "random delay" can be referred to as "Random delay" in the standard, and the "random delay used by the ONU when sending this message, measured in bit times with respect to the nominal upstream line rate of 2.48832Gbit / s" can be referred to as "The random delay used by the ONU when sending this message, measured in bit times with respect to the nominal upstream line rate of 2.48832Gbit / s" in the standard. In the following table, the same description as Table 9 can refer to the related description in the standard, and subsequent descriptions will not be repeated.

[0132] In another example, assuming that the first gateway is an OLT and the second gateway is an ONU, the message format for the ONU to send time information to the OLT based on the OMCI protocol is shown in Table 10.

[0133] Table 10

[0134] It should be noted that the above message for reporting time information is a private OMCI message. The "managed entity identifier" can be referred to as "Managed entity ID" in the standard, the "LT vendor identifier" can be referred to as "OLT vendor ID" in the standard, the "device identifier" can be referred to as "Serial Number" in the standard, and the "operation type identifier" can be referred to as "Action Type" in the standard. In the following table, the same description as Table 10 can refer to the related description in the standard, and subsequent descriptions will not be repeated.

[0135] In another implementable manner, in addition to the above private OMCI message, the second gateway can also report time information using a related standard OMCI message to be compatible with the related standard. The message format for sending time information to the OLT based on the related standard OMCI message is shown in Table 11.

[0136] Table 11

[0137] The above "This attribute uniquely identifies each instance of this ME" can be referred to as "This attribute uniquely identifies each instance of this ME" in the standard, the above "Optical signal level" can be referred to as "Optical signal level" in the standard, the above "This attribute reports the current measurement of the total downstream optical signal level" can be referred to as "This attribute reports the current measurement of the total downstream optical signal level" in the standard, the above "Lower optical threshold" can be referred to as "Lower optical threshold" in the standard, the above "This attribute specifies the optical level the ONU uses to declare the downstream low received optical power alarm" can be referred to as "This attribute specifies the optical level the ONU uses to declare the downstream low received optical power alarm" in the standard, the above "Upper optical threshold" can be referred to as "Upper optical threshold" in the standard, the above "This attribute specifies the optical level the ONU uses to declare the downstream high received optical power alarm" can be referred to as "This attribute specifies the optical level the ONU uses to declare the downstream high received optical power alarm" in the standard, the above "ONU response time" can be referred to as "ONU response time" in the standard, the above "This attribute indicates the ONU's actual response time" can be referred to as "This attribute indicates the ONU's actual response time" in the standard, the above "Upper transmit power threshold" can be referred to as "Upper transmit power threshold" in the standard,The above "This attribute specifies the maximum mean optical launch power that the ONU uses to declare the high transmit optical power alarm" can be referred to in the standard as "This attribute specifies the maximum mean optical launch power that the ONU uses to declare the high transmit optical power alarm".

[0138] S603, the first gateway determines the second time information according to the time information.

[0139] In some implementations, the first gateway can determine the difference between the third time and the first time as a first difference, and determine the difference between the second time and the fourth time as a second difference. Then, the first gateway can determine the sum of the first difference and the second difference as the optical-electric conversion delay of the second gateway, and determine the difference between the fourth time and the third time as the signal processing delay of the second gateway. In this way, the first gateway can obtain the second time information.

[0140] The above embodiment provides an example implementation of a first gateway calculating second time information by obtaining time information of a second gateway. Of course, the first gateway can also calculate the first time information by obtaining time information related to the message of the first gateway. FIG. 7 shows a flowchart of another ranging method provided by the embodiment of the present disclosure. In some embodiments, as shown in FIG. 7, in the above S301, the first gateway obtaining the first time information can include S701-S702.

[0141] S701, the first gateway determines a fifth time, a sixth time, a seventh time and an eighth time.

[0142] The fifth time is the time when the optical-electric conversion module of the first gateway receives the optical signal of the second message; the sixth time is the time when the optical-electric conversion module of the first gateway sends the optical signal corresponding to the first message of the second message; the seventh time is the time when the processor of the first gateway receives the electrical signal of the second message; and the eighth time is the time when the processor of the first gateway sends the electrical signal of the first message.

[0143] In some implementations, after receiving the second message, the first gateway needs to convert the optical signal of the second message into an electrical signal through the optical-electric conversion module. In this case, the first gateway can determine the fifth time through the optical-electric conversion module.

[0144] After the photoelectric conversion module converts the optical signal of the second message into an electrical signal, the first gateway needs to generate a first message corresponding to the second message through a processor. In this case, the first gateway can determine the seventh time and the eighth time according to the time information before and after the processor processes the message.

[0145] After generating the first message, the first gateway needs to convert the electrical signal of the first message into an optical signal through a photoelectric conversion module, and send the optical signal of the first message. In this case, the first gateway can determine the sixth time through the photoelectric conversion module.

[0146] S702, the first gateway determines the first time information according to the fifth time, the sixth time, the seventh time and the eighth time.

[0147] In some implementations, the first gateway can determine the difference between the seventh time and the fifth time as a third difference value, and determine the difference between the eighth time and the sixth time as a fourth difference value. Then, the first gateway can determine the sum of the third difference value and the fourth difference value as the photoelectric conversion delay of the first gateway, and determine the difference between the eighth time and the seventh time as the processing conversion delay of the first gateway. In this way, the first gateway can obtain the second time information.

[0148] In some implementations, after determining the first time information, the first gateway can store the first time information in a database for subsequent measurement of the length of the optical fiber.

[0149] In an example, it is assumed that the first gateway is an OLT / MFU, the second gateway is an ONU / SFU, the first message is a downstream message, and the second message is an upstream message. After receiving the upstream message sent by the ONU / SFU, the OLT / MFU can timestamp the time when the photoelectric conversion module receives the optical signal of the upstream message, so as to determine the time corresponding to the timestamp as the fifth time T1s.

[0150] After the photoelectric conversion module converts the optical signal of the upstream message into an electrical signal, the OLT / MFU can timestamp the start time when the processor processes the electrical signal of the upstream message, so as to determine the time corresponding to the timestamp as the seventh time T1e.

[0151] After the processor processes the upstream message into a downstream message, the OLT / MFU can timestamp the end time when the processor processes the electrical signal of the downstream message, so as to determine the time corresponding to the timestamp as the eighth time T2s.

[0152] After the photoelectric conversion module converts the electrical signal of the downstream message into an optical signal, the OLT / MFU can timestamp the time when the photoelectric conversion module sends the optical signal of the downstream message, so as to determine the time corresponding to the timestamp as the sixth time T2e.

[0153] Then, the OLT / MFU can determine the first time information according to T1s, T1e, T2s and T2e, including:

[0154] The optical-electric conversion delay of the first gateway = (T1e-T1s) + (T2e-T2s);

[0155] The signal processing delay of the first gateway = T2s-T1e.

[0156] The above embodiment provides an example implementation manner in which the first gateway calculates the second time information by obtaining the time information of the second gateway, and an example implementation manner in which the first gateway calculates the first time information by obtaining the time information related to the message of the first gateway. Of course, the first time information and the second time information can also be pre-stored in a database. FIG. 8 shows a flowchart of another ranging method provided by the embodiment of the present disclosure. In some embodiments, in combination with FIG. 4, as shown in FIG. 8, in the above S301, the first gateway obtaining the first time information and the second time information can include S801.

[0157] S801, the first gateway obtains the first time information and the second time information from the database.

[0158] The database stores a plurality of optical-electric conversion delays and a plurality of signal processing delays; the plurality of optical-electric conversion delays include the optical-electric conversion delay of the first gateway and the optical-electric conversion delay of the second gateway; and the plurality of signal processing delays include the signal processing delay of the first gateway and the signal processing delay of the second gateway.

[0159] In some embodiments, the second gateway sends the device information (such as Serial Number, etc.) of the second gateway to the first gateway in the registration online phase. When the first gateway retrieves the second time information through the database, the device information of the second gateway can be used for retrieval.

[0160] In some embodiments, the above database can be the database of the first gateway, or other databases for storing gateway information, which are not limited in the embodiment of the present disclosure.

[0161] The first gateway can actively send a data acquisition request to the database to obtain the first time information and the second time information. The database can also periodically send the first time information and the second time information to the first gateway, which are not limited in the embodiment of the present disclosure.

[0162] In an example, assuming that the first gateway is an OLT / MFU and the second gateway is an ONU / SFU, FIG. 9 shows a flowchart of the OLT / MFU obtaining the first time information and the second time information from the database. As shown in FIG. 9, it includes:

[0163] S901, the OLT (Optical Line Terminal) / MFU (Fiber to the Room Master Device) sends a data acquisition request to the database.

[0164] The data acquisition request is used to request to acquire the first time information and the second time information. The data acquisition request carries the identifier of the OLT / MFU and the identifier of the ONU / SFU.

[0165] S902, the database determines the first time information according to the identifier of the OLT / MFU, and determines the second time information according to the identifier of the ONU (Optical Network Unit) / SFU (Single Household Unit).

[0166] S903, the database sends the first time information and the second time information to the OLT / MFU.

[0167] The above mainly introduces the ranging method provided by the embodiments of the present disclosure from the example implementation of each step respectively. Next, the complete process of the ranging method provided by the embodiments of the present disclosure will be introduced in combination with the example implementation of each step above, and taking the first gateway as the OLT / MFU and the second gateway as the ONU / SFU as an example. As shown in FIG. 10, in the scenario of acquiring the first time information through the database, the ranging method provided by the embodiments of the present disclosure can include:

[0168] S1001, the ONU / SFU reports device information to the OLT / MFU.

[0169] In some embodiments, the ONU / SFU can report the device information to the OLT / MFU in the registration online phase. The device information can be the unique identifier such as the Serial Number of the ONU / SFU.

[0170] S1002, the OLT / MFU queries the second time information in the database according to the device information reported by the ONU / SFU.

[0171] S1003, the OLT / MFU judges whether the second time information is queried.

[0172] If the OLT / MFU does not query the second time information, S1004 is executed; if the OLT / MFU queries the second time information, S1005 is executed.

[0173] S1004, the OLT / MFU determines the optical-electric conversion time delay and the signal processing time delay in the second time information as default values.

[0174] That is, in the case that the OLT / MFU does not query the second time information, the OLT / MFU determines the ONU / SFU optical-electric conversion time and signal processing time as a default value. The default value can be the minimum response time of the ONU / SFU specified in the G984.3 standard protocol: 35±1us, or other values preset according to experience, which are not limited in the disclosure.

[0175] S1005, the OLT / MFU acquires the first time information, and determines the distance between the OLT / MFU and the ONU / SFU according to the first time information and the second time information, and outputs the distance.

[0176] Of course, the OLT / MFU can also acquire the first time information based on the first request message of the Ploam protocol. As shown in FIG. 11, in the case that the OLT / MFU acquires the first time information based on the first request message of the Ploam protocol, the ranging method provided by the embodiments of the disclosure can include:

[0177] S1101, the OLT / MFU sends a first request message based on a physical layer operation management and maintenance protocol to the ONU / SFU.

[0178] S1102, the OLT / MFU receives second time information sent by the ONU / SFU in response to the first request message.

[0179] The second time information is also sent based on the Ploam protocol.

[0180] S1103, the OLT / MFU determines whether the message to which the second time information belongs is valid.

[0181] In some embodiments, the OLT / MFU can determine whether the message to which the second time information belongs is valid according to the MIC field in the message to which the second time information belongs.

[0182] If the OLT / MFU determines that the message to which the second time information belongs is invalid, it performs S1104; if the OLT / MFU determines that the message to which the second time information belongs is valid, it performs S1105.

[0183] S1104, the OLT / MFU determines the optical-electric conversion time and signal processing time in the second time information as a default value.

[0184] S1105, the OLT / MFU acquires the first time information, and determines the distance between the OLT / MFU and the ONU / SFU according to the first time information and the second time information, and outputs the distance.

[0185] Of course, the OLT / MFU can also acquire the second time information based on the first request message of the OMCI protocol. As shown in FIG. 12, in the scenario where the OLT / MFU acquires the second time information based on the first request message of the OMCI protocol, the ranging method provided by the embodiments of the present disclosure can include the following S1201-S1203.

[0186] S1201, the OLT / MFU sends a first request message based on the optical network unit management control interface protocol to the ONU / SFU.

[0187] S1202, the OLT / MFU receives second time information sent by the ONU / SFU in response to the first request message.

[0188] The second time information is also sent based on the OMCI protocol.

[0189] S1203, the OLT / MFU determines whether the message to which the second time information belongs is valid.

[0190] In some embodiments, the OLT / MFU can determine whether the message to which the second time information belongs is valid according to the MIC field in the message to which the second time information belongs.

[0191] If the OLT / MFU determines that the message to which the second time information belongs is invalid, the OLT / MFU performs S1204; if the OLT / MFU determines that the message to which the second time information belongs is valid, the OLT / MFU performs S1205.

[0192] S1204, the OLT / MFU determines the optical-electric conversion time delay and the signal processing time delay in the second time information as default values.

[0193] S1205, the OLT / MFU acquires the first time information, determines the distance between the OLT / MFU and the ONU / SFU according to the first time information and the second time information, and outputs the distance.

[0194] In some embodiments, since the time period between the time when the second gateway sends the packet and the time when the first gateway receives the packet is the time period during which the packet is transmitted in the optical path between the first gateway and the second gateway, the time information for indicating the time when the first gateway receives the optical signal and the time when the first gateway sends the optical signal, and the time information for indicating the time when the second gateway receives the optical signal and the time when the second gateway sends the optical signal, can also be used to accurately determine the packet transmission delay between the first gateway and the second gateway, and further accurately determine the distance between the first gateway and the second gateway. Therefore, the embodiments of the present disclosure also provide another ranging method, which can be applied to the first gateway 101 in the communication system shown in FIG. 1. FIG. 13 shows another flowchart of a ranging method, as shown in FIG. 13, the ranging method includes the following S1301-S1303.

[0195] S1301, the first gateway acquires third time information and fourth time information.

[0196] The third time information is used to represent the time information of receiving the optical signal and the time information of sending the optical signal of the first gateway. The fourth time information is used to represent the time information of receiving the optical signal and the time information of sending the optical signal of the second gateway.

[0197] The example implementation of the first gateway acquiring the third time information and the fourth time information can refer to the example implementation of the first gateway acquiring the first time information and the second time information in the above FIG. 3-FIG. 12, which will not be described here.

[0198] S1302, the first gateway determines the message transmission delay between the first gateway and the second gateway according to the third time information and the fourth time information.

[0199] In some implementations, since the time period between the time when the second gateway sends the message and the time when the first gateway receives the message is the time period of the message transmission in the optical path between the first gateway and the second gateway, the first gateway can determine the difference between the time when the optical-electric conversion module of the first gateway receives the optical signal of the second message in the third time information and the time when the optical-electric conversion module of the second gateway sends the optical signal of the second message corresponding to the first message in the fourth time information as the message transmission delay of the second gateway sending the second message to the first gateway.

[0200] Then, the first gateway can determine the difference between the time when the optical-electric conversion module of the second gateway receives the optical signal of the first message in the fourth time information and the time when the optical-electric conversion module of the first gateway sends the optical signal of the second message corresponding to the first message in the third time information as the message transmission delay of the first gateway sending the first message to the second gateway.

[0201] Then, the first gateway can determine the sum of the message transmission delay of the second gateway sending the second message to the first gateway and the message transmission delay of the first gateway sending the first message to the second gateway as the message transmission delay between the first gateway and the second gateway.

[0202] S1303, the first gateway determines the distance between the first gateway and the second gateway according to the message transmission delay.

[0203] After obtaining the message transmission delay between the first gateway and the second gateway, the first gateway can determine the product between the message transmission delay between the first gateway and the second gateway and the coefficient of the refractive index of the optical fiber and the ranging accuracy as the distance between the first gateway and the second gateway.

[0204] In an example, taking the G984.3 standard protocol as an example, 102 m / us is the coefficient that can best reflect the refractive index of the G.652 optical fiber and the ranging accuracy. Therefore, the distance FD between the first gateway and the second gateway satisfies the following formula: FD = (T1s-T4e) + (T3s-T2e) x 102 m / us.

[0205] T1s is the fifth time, T4e is the second time, T3s is the first time, and T2e is the sixth time.

[0206] In some embodiments, the third time information includes a fifth time and a sixth time. The fifth time is the time at which the photoelectric conversion module of the first gateway receives the optical signal of the second message. The sixth time is the time at which the photoelectric conversion module of the first gateway transmits the optical signal of the first message corresponding to the second message. The fourth time information includes a first time and a second time. The first time is the time at which the photoelectric conversion module of the second gateway receives the optical signal of the first message. The second time is the time at which the photoelectric conversion module of the second gateway transmits the optical signal of the second message corresponding to the first message. In this case, as shown in FIG. 14, in the above S1302, the method for determining the message transmission delay between the first gateway and the second gateway according to the third time information and the fourth time information by the first gateway can include:

[0207] S1401, the first gateway determines the sum of the first value and the second value as the message transmission delay between the first gateway and the second gateway.

[0208] The first value is the difference between the fifth time and the second time. The second value is the difference between the first time and the sixth time.

[0209] In some embodiments, in combination with FIG. 14, as shown in FIG. 15, the method for the first gateway to obtain the fourth time information can include:

[0210] S1501, the first gateway sends a third request message to the second gateway.

[0211] The third request message is a message based on the Ploam protocol or a message based on the OMCI protocol.

[0212] S1502, the first gateway receives the fourth time information sent by the second gateway in response to the third request message.

[0213] The example implementation of the first gateway obtaining the fourth time information can refer to the example implementation of the first gateway obtaining the second time information described above in FIG. 6, and will not be described here.

[0214] In some embodiments, in combination with FIG. 14, as shown in FIG. 16, the method for the first gateway to obtain the third time information and the fourth time information can include:

[0215] S1601, the first gateway obtains third time information and fourth time information from the database.

[0216] The database stores time information of a plurality of received optical signals and time information of a plurality of sent optical signals; the time information of the plurality of received optical signals includes time information of the optical signal received by the first gateway and time information of the optical signal received by the second gateway; and the time information of the plurality of sent optical signals includes time information of the optical signal sent by the first gateway and time information of the optical signal sent by the second gateway.

[0217] For example implementation of the first gateway obtaining the third time information and the fourth time information, reference can be made to the example implementation of the first gateway obtaining the first time information and the second time information in the above-mentioned FIG. 8, which will not be repeated here.

[0218] It can be understood that, in order to implement the above-mentioned functions, the first gateway comprises hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments of the present disclosure, the present disclosure can be realized in the form of hardware or combination of hardware and computer software. Whether a certain function is realized in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present disclosure.

[0219] The embodiments of the present disclosure can divide the function modules of the first gateway according to the above-mentioned method embodiments. For example, each function module can be divided corresponding to each function, or two or more functions can be integrated in one function module. The integrated module can be realized in the form of hardware or software. It should be noted that the division of modules in the embodiments of the present disclosure is illustrative, and is only a logical function division. When actually implemented, there can be another division manner. Hereinafter, taking the example of dividing each function module corresponding to each function is taken as an example.

[0220] FIG. 17 is a structural schematic diagram of a communication device provided by an embodiment of the present disclosure, which can execute the ranging method provided by the above-mentioned method embodiments, and can be applied to the first gateway. As shown in FIG. 17, the communication device comprises a communication unit 1701 and a processing unit 1702.

[0221] The communication unit 1701 is configured to obtain the loop delay between the first gateway and the second gateway, the first time information and the second time information; the first time information includes the photoelectric conversion delay of the first gateway and the signal processing delay of the first gateway; and the second time information includes the photoelectric conversion delay of the second gateway and the signal processing delay of the second gateway.

[0222] The processing unit 1702 is configured to correct the loop delay according to the first time information and the second time information, to obtain a corrected loop delay.

[0223] The processing unit 1702 is further configured to determine the distance between the first gateway and the second gateway according to the corrected loop delay.

[0224] In an implementable manner, the processing unit 1702 can be configured to:

[0225] determine a sum of the photoelectric conversion delay of the first gateway, the signal processing delay of the first gateway, the photoelectric conversion delay of the second gateway, and the signal processing delay of the second gateway as the correction value;

[0226] determine a difference between the loop delay and the correction value as the corrected loop delay.

[0227] In an implementable manner, the communication unit 1701 can be configured to:

[0228] send a first request message to the second gateway, wherein the first request message is a message based on a physical layer operation administration and maintenance protocol or a message based on an optical network unit management control interface protocol;

[0229] receive second time information sent by the second gateway in response to the first request message.

[0230] In an implementable manner, the communication unit 1701 can be configured to:

[0231] send a second request message to the second gateway, wherein the second request message is a message based on a physical layer operation administration and maintenance protocol or a message based on an optical network unit management control interface protocol;

[0232] receive time point information sent by the second gateway in response to the second request message, wherein the time point information includes a first time point, a second time point, a third time point, and a fourth time point, the first time point is a time point at which an optical signal of the first message is received by a photoelectric conversion module of the second gateway, the second time point is a time point at which an optical signal of a second message corresponding to the first message is sent by the photoelectric conversion module of the second gateway, the third time point is a time point at which an electrical signal of the first message is received by a processor of the second gateway, and the fourth time point is a time point at which an electrical signal of the second message is sent by the processor of the second gateway;

[0233] determine the second time information according to the time point information.

[0234] In an implementable manner, the processing unit 1702 can be configured to:

[0235] determine a difference between the third time point and the first time point as a first difference;

[0236] determining a second difference value as a difference between the second time and the fourth time;

[0237] determining a second difference value as a difference between the second time and the fourth time;

[0238] determining a second difference value as a difference between the second time and the fourth time;

[0239] In an implementable manner, the communication unit 1701 can be configured to:

[0240] determining a fifth time, a sixth time, a seventh time and an eighth time, wherein the fifth time is a time at which the optoelectronic conversion module of the first gateway receives the optical signal of the second message, the sixth time is a time at which the optoelectronic conversion module of the first gateway sends the optical signal of the first message corresponding to the second message, the seventh time is a time at which the processor of the first gateway receives the electrical signal of the second message, and the eighth time is a time at which the processor of the first gateway sends the electrical signal of the first message;

[0241] determining the first time information according to the fifth time, the sixth time, the seventh time and the eighth time.

[0242] In an implementable manner, the processing unit 1702 can be configured to:

[0243] determining a third difference value as a difference between the seventh time and the fifth time;

[0244] determining a fourth difference value as a difference between the eighth time and the sixth time;

[0245] determining the first time information according to the fifth time, the sixth time, the seventh time and the eighth time.

[0246] determining the first time information according to the fifth time, the sixth time, the seventh time and the eighth time.

[0247] In an implementable manner, the processing unit 1702 can be configured to:

[0248] obtaining the first time information and the second time information from a database; wherein the database stores a plurality of optoelectronic conversion time delays and a plurality of signal processing time delays; the plurality of optoelectronic conversion time delays include the optoelectronic conversion time delay of the first gateway and the optoelectronic conversion time delay of the second gateway; and the plurality of signal processing time delays include the signal processing time delay of the first gateway and the signal processing time delay of the second gateway.

[0249] In an implementable manner, the communication unit 1701 is further configured to obtain third time information and fourth time information, wherein the third time information is used to represent time information of receiving optical signals and time information of sending optical signals of the first gateway, and the fourth time information is used to represent time information of receiving optical signals and time information of sending optical signals of the second gateway.

[0250] The processing unit 1702 is further configured to determine a message transmission delay between the first gateway and the second gateway according to the third time information and the fourth time information.

[0251] The processing unit 1702 is further configured to determine a distance between the first gateway and the second gateway according to the message transmission delay.

[0252] In an implementable manner, the third time information includes a fifth time point and a sixth time point, the fifth time point is a time point at which the photoelectric conversion module of the first gateway receives optical signals of the second message, and the sixth time point is a time point at which the photoelectric conversion module of the first gateway sends optical signals of the first message corresponding to the second message, and the fourth time information includes a first time point and a second time point, the first time point is a time point at which the photoelectric conversion module of the second gateway receives optical signals of the first message, and the second time point is a time point at which the photoelectric conversion module of the second gateway sends optical signals of the second message corresponding to the first message.

[0253] The processing unit 1702 can be configured to determine the message transmission delay between the first gateway and the second gateway as a sum of a first value and a second value, wherein the first value is a difference between the fifth time point and the second time point, and the second value is a difference between the first time point and the sixth time point.

[0254] In an implementable manner, the communication unit 1701 can be configured to:

[0255] send a third request message to the second gateway, the third request message being a message based on a physical layer operation management and maintenance protocol or a message based on an optical network unit management control interface protocol;

[0256] receive fourth time information sent by the second gateway in response to the third request message.

[0257] In an implementable manner, the communication unit 1701 can be configured to:

[0258] obtain the third time information and the fourth time information from a database, wherein the database stores a plurality of time information of receiving optical signals and a plurality of time information of sending optical signals, the plurality of time information of receiving optical signals includes time information of receiving optical signals of the first gateway and time information of receiving optical signals of the second gateway, and the plurality of time information of sending optical signals includes time information of sending optical signals of the first gateway and time information of sending optical signals of the second gateway.

[0259] In the case of implementing the functions of the above-mentioned integrated modules in the form of hardware, the embodiments of the present disclosure provide another example structure of the communication apparatus involved in the above-mentioned embodiments. As shown in FIG. 18, the communication apparatus 180 includes a processor 1802, a bus 1804. In some embodiments, the communication apparatus can further include a memory 1801; in some embodiments, the communication apparatus can further include a communication interface 1803.

[0260] The processor 1802 can implement or execute the various exemplary logical blocks, modules, and circuits described in combination with the embodiments of the present disclosure. The processor 1802 can be a central processing unit, a general purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic device, transistor logic device, hardware component, or any combination thereof, which can implement or execute the various exemplary logical blocks, modules, and circuits described in combination with the embodiments of the present disclosure. The processor 1802 can also be a combination of implementing computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like.

[0261] The communication interface 1803 is used to connect with other devices through a communication network. The communication network can be an Ethernet, a wireless access network, a wireless local area network (WLAN), and the like.

[0262] The memory 1801 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, an electrically erasable programmable read-only memory (EEPROM), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.

[0263] As an implementation manner, the memory 1801 can exist independently of the processor 1802, and the memory 1801 can be connected with the processor 1802 through the bus 1804, for storing instructions or program codes. When the processor 1802 invokes and executes the instructions or program codes stored in the memory 1801, the ranging method provided by the embodiments of the present disclosure can be implemented.

[0264] In another implementation manner, the memory 1801 can also be integrated with the processor 1802.

[0265] The bus 1804 can be an extended industry standard architecture (EISA) bus, etc. The bus 1804 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is shown in FIG. 18, but it does not mean that there is only one bus or only one type of bus.

[0266] Some embodiments of the present disclosure provide a gateway, which can perform the ranging method as described in any of the above embodiments.

[0267] Some embodiments of the present disclosure provide a computer readable storage medium (for example, a non-transitory computer readable storage medium) having computer program instructions stored therein, which, when executed on a computer, cause the computer to perform the ranging method as described in any of the above embodiments.

[0268] Exemplarily, the above computer readable storage medium can include, but is not limited to, a magnetic storage device (for example, a hard disk, a floppy disk or a magnetic tape, etc.), an optical disc (for example, a compact disc (CD), a digital versatile disc (DVD), etc.), a smart card and a flash memory device (for example, an erasable programmable read-only memory (EPROM), a card, a stick or a key drive, etc.). The various computer readable storage media described in the present disclosure can represent one or more devices and / or other machine readable storage media for storing information. The term "machine readable storage medium" can include, but is not limited to, a wireless channel and various other media capable of storing, containing and / or carrying instructions and / or data.

[0269] The embodiments of the present disclosure provide a computer program product containing instructions, which, when executed on a computer, cause the computer to perform the ranging method as described in any of the above embodiments.

[0270] The above is only a specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto, and any change or replacement within the technical scope disclosed in the present disclosure should be covered in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.

Claims

1. A ranging method, comprising: obtaining a loop delay between a first gateway and a second gateway, first time information and second time information, wherein the first time information comprises an optical-electrical conversion delay of the first gateway and a signal processing delay of the first gateway, and the second time information comprises an optical-electrical conversion delay of the second gateway and a signal processing delay of the second gateway; correcting the loop delay according to the first time information and the second time information to obtain a corrected loop delay; determining a distance between the first gateway and the second gateway according to the corrected loop delay.

2. The ranging method according to claim 1, wherein, The correcting the loop delay according to the first time information and the second time information to obtain a corrected loop delay comprises: determining a sum of the optical-electrical conversion delay of the first gateway, the signal processing delay of the first gateway, the optical-electrical conversion delay of the second gateway and the signal processing delay of the second gateway as a correction value; determining a difference between the loop delay and the correction value as the corrected loop delay.

3. The ranging method of claim 1, wherein, The second time information is obtained by: sending a first request message to the second gateway, wherein the first request message is a message based on a physical layer operation management and maintenance protocol or a message based on an optical network unit management control interface protocol; receiving the second time information sent by the second gateway in response to the first request message.

4. The ranging method of claim 1, wherein, The second time information is obtained by: sending a second request message to the second gateway, wherein the second request message is a message based on a physical layer operation management and maintenance protocol or a message based on an optical network unit management control interface protocol; receiving time information sent by the second gateway in response to the second request message, wherein the time information comprises a first time, a second time, a third time and a fourth time, the first time is a time at which an optical signal of a first message is received by an optical-electrical conversion module of the second gateway, the second time is a time at which an optical signal of a second message corresponding to the first message is sent by the optical-electrical conversion module of the second gateway, the third time is a time at which an electrical signal of the first message is received by a processor of the second gateway, and the fourth time is a time at which an electrical signal of the second message is sent by the processor of the second gateway; determining the second time information according to the time information.

5. The ranging method according to claim 4, wherein, The determining the second time information according to the time information comprises: determining a first difference value as a difference between the third time and the first time; determining a second difference value as a difference between the second time and the fourth time; determining a sum of the first difference value and the second difference value as the optical-electrical conversion delay of the second gateway; determining a difference between the fourth time and the third time as the signal processing delay of the second gateway.

6. The ranging method of claim 1, wherein, The first time information is obtained by: determining a fifth time, a sixth time, a seventh time and an eighth time, wherein the fifth time is a time at which the optical-electric conversion module of the first gateway receives the optical signal of the second message, the sixth time is a time at which the optical-electric conversion module of the first gateway sends the optical signal of the first message corresponding to the second message, the seventh time is a time at which the processor of the first gateway receives the electrical signal of the second message, and the eighth time is a time at which the processor of the first gateway sends the electrical signal of the first message; determining the first time information according to the fifth time, the sixth time, the seventh time and the eighth time.

7. The ranging method of claim 6, wherein, The determination of the first time information according to the fifth time, the sixth time, the seventh time and the eighth time comprises: determining a third difference value as a difference between the seventh time and the fifth time; determining a fourth difference value as a difference between the eighth time and the sixth time; determining a sum of the third difference value and the fourth difference value as the optical-electric conversion time delay of the first gateway; determining a difference between the eighth time and the seventh time as the signal processing time delay of the first gateway.

8. The ranging method of claim 1, wherein, The first time information and the second time information are obtained in the following manner: obtaining the first time information and the second time information from a database, wherein the database stores a plurality of optical-electric conversion time delays and a plurality of signal processing time delays, the plurality of optical-electric conversion time delays include the optical-electric conversion time delay of the first gateway and the optical-electric conversion time delay of the second gateway, and the plurality of signal processing time delays include the signal processing time delay of the first gateway and the signal processing time delay of the second gateway.

9. A ranging method, comprising: obtaining third time information and fourth time information, wherein the third time information is used to represent time information of receiving an optical signal and time information of sending an optical signal of a first gateway, and the fourth time information is used to represent time information of receiving an optical signal and time information of sending an optical signal of a second gateway; determining a message transmission time delay between the first gateway and the second gateway according to the third time information and the fourth time information; and determining a distance between the first gateway and the second gateway according to the message transmission time delay.

10. The ranging method of claim 9, wherein, The third time information comprises a fifth time and a sixth time, the fifth time is a time at which an optical-electric conversion module of the first gateway receives an optical signal of a second message, and the sixth time is a time at which the optical-electric conversion module of the first gateway sends an optical signal of a first message corresponding to the second message; the fourth time information comprises a first time and a second time, the first time is a time at which an optical-electric conversion module of the second gateway receives an optical signal of the first message, and the second time is a time at which the optical-electric conversion module of the second gateway sends an optical signal of a second message corresponding to the first message; The determination of the message transmission time delay between the first gateway and the second gateway according to the third time information and the fourth time information comprises: The sum of the first value and the second value is determined as a message transmission delay between the first gateway and the second gateway; wherein the first value is a difference between the fifth time and the second time, and the second value is a difference between the first time and the sixth time.

11. The ranging method of claim 9, wherein, The fourth time information is obtained by the following way: sending a third request message to the second gateway; the third request message is a message based on a physical layer operation management and maintenance protocol or a message based on an optical network unit management control interface protocol; receiving the fourth time information sent by the second gateway in response to the third request message.

12. The ranging method of claim 9, wherein, The obtaining of the third time information and the fourth time information comprises: obtaining the third time information and the fourth time information from a database; wherein the database stores a plurality of received optical signal time information and a plurality of sent optical signal time information; the plurality of received optical signal time information comprises the first gateway received optical signal time information and the second gateway received optical signal time information; and the plurality of sent optical signal time information comprises the first gateway sent optical signal time information and the second gateway sent optical signal time information. 13.A communication device comprising a processor, wherein the processor implements the ranging method according to any one of claims 1 to 12 when executing a computer program.

14. A computer-readable storage medium comprising computer instructions; wherein, When the computer instructions are executed, the ranging method according to any one of claims 1 to 12 is implemented.

15. A gateway, wherein, The gateway is used to implement the ranging method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Method and system for measuring transmission delay between optical line terminal and optical network unit

    CN102036127A

  • GPON accurate distance measurement method and system

    CN111866627A

  • Distance measurement method and device and storage medium

    CN118101056A