Distance measurement method and apparatus

By setting a processor on the board, sending a test signal and calculating the transmission time, the existing technology cannot measure the problem of the gap between the single board and the back plate of the backplane online, and realize the efficient and flexible online measurement.

WO2025020965A1PCT designated stage expired Publication Date: 2025-01-30HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/105533
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-27
Filing Date
2024-07-15
Publication Date
2025-01-30

AI Technical Summary

Technical Problem

The prior art cannot measure the gap between the two after the connection between the single plate and the back plate online, and a specific structure or measuring instrument is required.

Method used

By setting up a processor on the single board, sending test signals and getting the sending and receiving time, using the transmission speed of the transmission path to calculate the distance of the ranging object to achieve online measurement.

Benefits of technology

There is no need to install other devices, and the online measurement of the gap between the single board and the back plate is realized, which improves the flexibility and efficiency of measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024105533_30012025_PF_FP_ABST
    Figure CN2024105533_30012025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a distance measurement method and apparatus, which relate to the technical field of computers. The method is executed by means of a processor. Compared with a conventional method in which online measurement of the distance of an object to be subjected to distance measurement cannot be realized by means of a specific structure or a specific test tool, the present application makes it unnecessary to install other devices on a single board, and the single board sends a test signal by using a processor provided thereon. The processor acquires a sending time and a receiving time of the test signal, and realizes the online measurement of the distance of said object according to the sending time, the receiving time and the transmission speed of the test signal on a transmission path.
Need to check novelty before this filing date? Find Prior Art

Description

A distance measurement method and device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on July 27, 2023, with application number 202310940084.6 and invention name “A method and device for measuring distance”. The entire contents of the application are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of computer technology, and in particular to a distance measurement method and device. Background Art

[0003] Deming refers to the maximum gap between a board and backplane after they are connected via a connector. Deming can be measured by modifying the connector structure (e.g., by lengthening or shortening the pins), customizing test fixtures, or using micro switches to test the boards. However, these methods require specific structures (e.g., lengthening or shortening the pins) or measuring instruments installed on the test object, making online deming impossible.

[0004] Summary of the Invention

[0005] The present application provides a distance measurement method and device for solving the problem of being unable to measure the gap between a single board and a backplane after the two are connected online.

[0006] In a first aspect, the present application provides a distance measurement method. The method is executed by a first processor, which is deployed on a single board. The method includes: the first processor obtains a first time. The first time indicates the time when the first processor sends a test signal. The first processor obtains a second time. The second time indicates the time when the test signal returns to the first processor via a transmission path. The transmission path indicates the path along which the test signal passes and includes an object to be measured. The first processor obtains the distance of the object to be measured based on the first time, the second time, and the transmission speed of the test signal along the transmission path.

[0007] In conventional technology, a single board requires the use of a specific structure or specific test fixture to achieve the distance measurement process of the object to be measured, resulting in the problem of being unable to measure the distance of the object to be measured online. In contrast, in this application, the single board does not need to install other devices, and the single board uses a processor arranged on it to send a test signal. The processor obtains the sending time and receiving time of the test signal, and based on the sending time, receiving time and the transmission speed of the test signal in the transmission path, achieves the effect of online measurement of the distance of the object to be measured.

[0008] In one possible implementation, the first processor includes a first signal transceiver. The first processor uses the first signal transceiver to send a test signal. The rate at which the first signal transceiver transmits and receives signals is greater than or equal to a preset threshold. The first time is used to indicate the time when the first signal transceiver transmits the test signal. The second time is used to indicate the time when the test signal returns to the first signal transceiver via a transmission path.

[0009] In another possible implementation, the transmission path includes: a first transmission path and a second transmission path. The first transmission path is used to indicate: an internal transmission path included in the first signal transceiver. The second transmission path is used to indicate: a transmission path that the test signal passes through but does not include the internal transmission path and includes the object to be measured. Before obtaining the distance of the object to be measured, the first processor obtains a third time. The third time is used to indicate: the transmission duration of the test signal on the first transmission path. The first processor obtains the distance of the object to be measured based on the first time, the second time, the third time, the transmission speed of the test signal on the first transmission path, and the transmission speed of the test signal on the second transmission path.

[0010] In another possible implementation, the first processor obtains the distance of the object to be measured based on the first time, the second time, the third time, the transmission speed of the test signal on the first transmission path, and the transmission speed of the test signal on the second transmission path. This includes: the first processor obtains a first time difference based on the first time and the second time. The first time difference indicates the transmission duration of the test signal on the first transmission path and the second transmission path. The first processor obtains a second time difference based on the first time difference and the third time. The second time difference indicates the transmission duration of the test signal on the second transmission path. The first processor obtains the distance of the object to be measured based on the second time difference and the transmission speed of the test signal on the second transmission path.

[0011] In another possible implementation, the transmission path passes through the second processor. The first processor obtains the second time, including: the first processor obtains a first sub-time, the first sub-time indicating the duration of transmission of the test signal from the first processor to the second processor; and the first processor obtains a second sub-time, the second sub-time indicating the duration of transmission of the test signal from the second processor to the first processor. The first processor obtains the second time based on the first sub-time and the second sub-time.

[0012] In another possible implementation, the object to be measured includes at least one of an optical fiber, a cable, and a gap, wherein the gap is used to indicate a gap between a board and a backplane.

[0013] In another possible implementation, when the object to be measured is a gap, the gap indicates the gap between the board and the backplane. After obtaining the distance to the object to be measured, the first processor compares the distance with a preset first distance threshold. If the distance is greater than or equal to the first distance threshold, the first processor issues a first prompt message. The first prompt message indicates that the gap should be reduced.

[0014] In another possible implementation, if the object to be measured is a gap, the gap indicates the gap between the board and the backplane. After obtaining the distance to the object to be measured, the first processor obtains a historical distance of the object to be measured. The historical distance indicates the measured distance of the object to be measured. The first processor compares the distance with the historical distance and, if the distance is greater than the historical distance, switches to another board.

[0015] In another possible implementation, when the object to be measured is a gap, the gap is used to indicate the gap between the board and the backplane. The object to be measured includes a first detection point and a second detection point. The first detection point is located at a first position of the object to be measured, and the second detection point is located at a second position of the object to be measured, where the first position and the second position are different. The first processor obtains the distance to the object to be measured, including obtaining the distance to the first detection point and the distance to the second detection point.

[0016] In a second aspect, the present application provides a distance measurement device, which includes modules for executing the distance measurement method in the first aspect or any possible design of the first aspect.

[0017] In a third aspect, the present application provides a communication device. The communication device includes a processing circuit and a transceiver. The transceiver is configured to receive data from a device outside the communication device and transmit it to the processing circuit, or to transmit data from the processing circuit to a device outside the communication device. The processing circuit, through logic circuitry or executing code instructions, is configured to perform the operating steps of the method described in the first aspect or any possible implementation of the first aspect. Several possible examples of communication devices are provided below.

[0018] Example 1: The communication device may be a chip, which includes: the processing circuit and transceiver included in the communication device provided in the third aspect.

[0019] Example 2: The communication device may be a ranging system, which may be a server including a processing circuit and a transceiver, or a cluster including a plurality of the aforementioned servers.

[0020] In a fourth aspect, the present application provides a computer-readable storage medium comprising computer software instructions that, when executed in a computing device, cause the computing device to execute the operating steps of the method described in the first aspect or any possible implementation of the first aspect.

[0021] In a fifth aspect, the present application provides a computer program product. When the computer program product is executed on a computer, the computer device executes the operation steps of the method described in the first aspect or any possible implementation of the first aspect.

[0022] Regarding the beneficial effects of the second to fifth aspects above, reference may be made to the description of any implementation in the first aspect, which will not be repeated here. Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] FIG1 is a schematic structural diagram of a communication device provided by the present application;

[0024] FIG2 is a schematic structural diagram of a male connector and a female connector;

[0025] FIG3 is a schematic structural diagram of a gap measurement;

[0026] FIG4 is a schematic structural diagram of another gap measurement;

[0027] FIG5 is a flow chart of a distance measurement method provided by the present application;

[0028] FIG6 is a schematic diagram of a structure for measuring an object to be measured provided by the present application;

[0029] FIG7 is a schematic diagram of a first transmission path provided by the present application;

[0030] FIG8 is a schematic diagram of a second transmission path provided by this application;

[0031] FIG9 is a schematic diagram of a third transmission path provided by this application;

[0032] FIG10 is a schematic diagram of a fourth transmission path provided by this application;

[0033] FIG11 is a schematic diagram of the first situation after the male connector and the female connector provided by the present application are connected;

[0034] FIG12 is a schematic diagram of a second situation after the male connector and the female connector provided by the present application are connected;

[0035] FIG13 is a schematic diagram of a third situation after the male connector and the female connector provided by the present application are connected;

[0036] FIG14 is a schematic flow chart of a second ranging method provided in this application;

[0037] FIG15 is a schematic diagram of a fifth transmission path provided by this application;

[0038] FIG16 is a diagram showing a comparison of code elements and timing provided by the present application;

[0039] FIG17 is a schematic structural diagram of a distance measurement device provided in this application. DETAILED DESCRIPTION

[0040] In order to make the description of the following embodiments clear and concise, a brief introduction to the relevant technology is first given.

[0041] FIG1 is a schematic diagram of the structure of a communication device provided by the present application. As shown in FIG1 , the communication device 100 includes: at least one single board 110 and a backboard 120. The single board 110 can be connected to the backboard 120 using a connector 130.

[0042] The single board 110 may include: a processor. The processor is the computing core and control core of the single board 110. The processor may be a very large-scale integrated circuit. The processor includes one or more processor cores. The processor core in the processor is, for example, a central processing unit (CPU) or other specific integrated circuit (ASIC). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. In actual applications, the single board 110 may also include multiple processors.

[0043] The processor is installed with an operating system and other software programs so that the processor can interact with other processors through a communication interface. The communication interface can be a high-speed communication interface, such as a serializer / deserializer (serdes). The processor and other processors can be arranged on the same single board or on different single boards, and this application does not limit this. Other processors can refer to multiple processors or one processor. In the case where other processors refer to multiple processors, the multiple processors can be arranged on the same single board or on different single boards, and this application does not limit the number and position of other processors.

[0044] The connector 130 may include a male connector and a female connector that cooperate with each other. The male connector may be provided on the single board 110, and the female connector may be provided on the backplane 120. The single board 110 and the backplane 120 form a communication link through the male connector and the female connector that cooperate with each other, thereby enabling data transmission between the single boards 110. This application does not limit the location of the male connector and the female connector. In some possible scenarios, the male connector may be provided on the backplane 120, and the female connector may be provided on the single board 110.

[0045] Figure 2 is a schematic diagram of the structure of a male connector and a female connector. As shown in Figure 2a, the male connector and the female connector are tightly connected without a gap (demating). As shown in Figure 2b, the male connector and the female connector are not tightly connected and a gap exists. In practical applications, there is often a gap between the male connector and the female connector. In the case of a gap between the male connector and the female connector, due to the difference in the refractive index of the male connector and the female connector and the refractive index of air, the gap and the distance of the gap will affect the accuracy of the data transmitted by the processor arranged on the single board. The following possible methods can be used to measure the presence and size of the gap.

[0046] Method 1: Use a long-short pin connector to measure the presence of a gap. Figure 3 shows a schematic diagram of a gap measurement structure. As shown in Figure 3, a long-short pin connector is used to measure the gap between the male and female connectors. When the board and backplane are not tightly connected, the long pin contacts normally, while the short pin does not. This measurement method can only detect the presence of a gap, and can only detect a gap of a certain distance, resulting in high cost.

[0047] Method 2: Use a test fixture to test the gap. Figure 4 shows a schematic diagram of another gap measurement structure. In this example, a test fixture is used to measure D2, and D1 is obtained from the male connector. The gap is calculated based on D2 and D1. This method requires the object under test to be mounted on the corresponding measuring instrument to measure D2, making online gap testing impossible. Furthermore, a custom test fixture is required, resulting in high testing costs.

[0048] The above measurement method requires a specific structure or specific operation of the object to be tested, and cannot achieve online measurement of gaps. Therefore, this application provides a method for online gap measurement. The principle of gap measurement in this application is described as follows:

[0049] First, the processor on the board sends a test signal, and the processor obtains a sending time for sending the test signal.

[0050] Next, the processor receives a test signal and acquires a reception time of the test signal.

[0051] Thirdly, the processor calculates the transmission duration of the test signal according to the time difference between the sending time and the receiving time.

[0052] Finally, the processor calculates the transmission distance of the test signal based on the time difference.

[0053] The distance measurement method provided by this application is described in detail below with reference to the accompanying drawings.

[0054] FIG5 is a flow chart of a distance measurement method provided by the present application. As shown in FIG5 , the method can be executed by the processor described in FIG1 , which is provided on a single board connected to a backplane via a connector. The method includes the following steps S510 to S530 .

[0055] Step S510: The first processor obtains a first time.

[0056] The first time is used to indicate the time when the first processor sends the test signal. The test signal may be a pseudo-random binary sequence (PRBS), which is also called a pseudo-random code in some possible situations.

[0057] Step S520: The first processor obtains the second time.

[0058] The second time indicates the time it takes for the test signal to return to the first processor via the transmission path. The transmission path indicates the path the test signal takes, including the object to be measured. The object to be measured may include cables, optical fibers, etc., though this application does not limit this. In some possible scenarios, the object to be measured may also be a gap. A gap indicates the gap between the board and backplane on which the first processor is mounted. Figure 6 shows a schematic diagram of a structure for measuring an object to be measured, as provided in this application.

[0059] In one possible scenario, the first processor includes a first signal transceiver. The first processor uses the first signal transceiver to transmit and receive data. The data transmission and reception rate of the first signal transceiver is greater than or equal to a preset threshold. The first signal transceiver can be a high-speed communication interface such as a SerDes (SerDes), or can be other equipment, devices, or chips capable of high-speed data transmission and reception. In this scenario, the first time indication is the time when the first signal transceiver transmits the test signal. The second time indication is the time when the test signal returns to the first signal transceiver via the transmission path.

[0060] Exemplarily, the first processor includes a serdes, and the serdes sends and receives prbs as a test signal. The first processor obtains the time when the serdes sends the prbs as the first time, and the first processor uses the time when the prbs is received as the second time.

[0061] In a possible scenario, the second time has different configurations according to different test signal transmission paths. The following takes the case where the distance object is a gap as an example, and describes the configurations in two ways: mode 1 and mode 2.

[0062] Method 1: The test signal sent by the first processor does not pass through other processors and directly returns to the first processor.

[0063] Figure 7 is a schematic diagram of the first transmission path provided by this application. As shown in Figure 7, the first processor is provided on a single board. The path through which the test signal passes includes: transmission path S1 included in the single board, connector D1, transmission path K0 included in the backplane, and transmission path S2 included in the single board. The second time includes: the transmission duration on S1, the transmission duration on D1, the transmission duration on K0, and the transmission duration on S2.

[0064] In conventional technology, a single board requires the use of a specific structure or specific test fixture to achieve the distance measurement process of the object to be measured, resulting in the problem of being unable to measure the distance of the object to be measured online. In contrast, in this application, the single board does not need to install other devices, and the single board uses a processor arranged on it to send a test signal. The processor obtains the sending time and receiving time of the test signal, and based on the sending time, receiving time and the transmission speed of the test signal in the transmission path, achieves the effect of online measurement of the distance of the object to be measured.

[0065] Method 2: The test signal sent by the first processor is forwarded by other processors and returned to the first processor.

[0066] The other processors may be located on the same board as the first processor, or on different boards from the first processor. The following takes the other processor as the second processor as an example to illustrate different situations.

[0067] In a first possible scenario, the first processor and the second processor are located on the same board.

[0068] FIG8 is a schematic diagram of the second transmission path provided in the present application. As shown in FIG8 , the single board includes a first processor and a second processor. The single board is connected to the backplane through a connector. The test signal passes through the following two paths.

[0069] Path ①, the path of the test signal from the first processor to the second processor, specifically including: the transmission path S1 included in the single board, the connector D1, the transmission path K1 included in the backplane, and the transmission path S2 included in the single board.

[0070] Path ②, the path of the test signal from the second processor to the first processor, specifically includes: transmission path S3 included in the board, connector D1, transmission path K2 included in the backplane, and transmission path S4 included in the board. The second time includes: the transmission time of the test signal on the path from the first processor to the second processor and the transmission time of the test signal on the path from the second processor to the first processor.

[0071] In a second possible scenario, the first processor and the second processor are located on different boards.

[0072] Figure 9 is a schematic diagram of the third transmission path provided by this application. As shown in Figure 9, the first processor is arranged on the first board, which is connected to the backplane via a first connector. The second processor is arranged on the second board, which is connected to the backplane via a second connector. The test signal passes through the following two paths.

[0073] Path ①, the path of the test signal from the first processor to the second processor, specifically includes: the transmission path S1 included in the first board, the first connector D1, the transmission path K3 included in the backplane, and the transmission path S3 included in the second board.

[0074] Path ②, the path of the test signal from the second processor to the first processor. Specifically, it includes: transmission path S4 included in the second board, second connector D2, transmission path K4 included in the backplane, and transmission path S4 included in the first board. The second time includes: the transmission time of the test signal on the path from the first processor to the second processor, and the transmission time of the test signal on the path from the second processor to the first processor.

[0075] The test signal passes through the first connector and the second connector. A first gap exists in the first connector, and a second gap exists in the second connector. A single measurement can only obtain the sum of the distances to the first gap and the second gap. In this case, another processor connected to the first connector can be used to send a test signal, and the distance measurement method described above can be used to obtain the distance to the first gap, thereby calculating the distance to the second gap. Alternatively, another processor connected to the second connector can be used to send a test signal, and the distance measurement method described above can be used to obtain the distance to the second gap, thereby calculating the distance to the first gap.

[0076] In this embodiment, the first processor arranged on the single board sends a test signal and receives a test signal forwarded by the second processor, which can avoid the waste of connector transmission resources and the waste of computing resources of the first processor caused by the test signal sent by the first processor being directly looped back by the backplane.

[0077] The above text, in combination with the accompanying drawings, describes the situation where the first processor and the second processor are located on different boards, and the transmission time of the test signal through the internal transmission path included in the first processor is ignored. In some possible situations, Figure 10 is a schematic diagram of the fourth transmission path provided by this application. As shown in Figure 10, the test signal passes through the internal transmission path included in the first processor, and the second time includes the transmission time of the test signal on the internal transmission path.

[0078] In one possible scenario, when the object to be measured is a gap, the object to be measured includes a first detection point and a second detection point. The first detection point is located at a first position of the object to be measured, and the second detection point is located at a second position of the object to be measured, where the first position and the second position are different. The first processor uses the method described above to obtain the distance of the first detection point and the distance of the second detection point.

[0079] The above description uses the example of an object to be measured including two detection points. In some possible examples, the object to be measured includes: at least two detection points. The at least two detection points can be evenly distributed on the object to be measured, or they can be distributed on the object to be measured in other preset distribution methods. Other layout methods can also be selected as needed to layout the detection points on the object to be measured, such as only arranging detection points at the edge of the object to be measured. This application does not limit the number and layout positions of the detection points. The first processor compares the distances of each detection point to determine the status of the male connector and the female connector. Several examples of male and female connectors are given below.

[0080] Example 1: The male connector and the female connector are connected normally.

[0081] In this case, the difference in distances detected at each detection point does not exceed a set threshold. The object to be measured includes: detection points 1 to 10 evenly spaced from left to right. The distances between detection points 1 and 10 are m1 to m10, respectively. If the difference between any two distances m1 to m10 is less than the set threshold, the first processor determines that the male connector and the female connector are properly connected, as shown in Figure 11, which is a schematic diagram of the first situation after the male connector and the female connector are connected provided by the present application.

[0082] Example 2: At least one of the male connector and the female connector is deformed.

[0083] In this scenario, the distances between the first number of detection points differ from the distances between the other detection points, the proportion of the first number of detection points in all detection points does not exceed a set threshold, and the distances detected at each of the first number of detection points differ by more than the set threshold. For example, if the set threshold is 20%, and m1 differs from m2 through m10 by a distance greater than the set threshold, the first processor determines that at least one of the male and female connectors has been deformed, as shown in FIG12 , which is a schematic diagram of the second situation after the male and female connectors are connected.

[0084] Example 3: The male connector and the female connector are connected at an angle.

[0085] In this case, the distances detected at each detection point are distributed in an increasing or decreasing manner, as shown in FIG13 , which is a schematic diagram of the third situation after the male connector and the female connector provided in the present application are connected.

[0086] In this embodiment, the first processor sends test signals to different detection points and determines the tilted connection between the male connector and the female connector or the deformation of at least one of the male connector and the female connector based on the distance of the gap calculated at each detection point.

[0087] Step S530: The first processor obtains the distance of the object to be measured according to the first time, the second time, and the transmission speed of the test signal in the transmission path.

[0088] The first processor may use the following steps ① and ② to obtain the distance of the object to be measured.

[0089] Step ①: The first processor calculates a first time difference based on the first time and the second time.

[0090] The first time difference is used to indicate the transmission time of the test signal (such as prbs) in the transmission path. The first processor can use formula (1) to calculate the first time difference. △t1=t2-t1 Formula (1)

[0091] Wherein, t2 is used to indicate the reception time of the prbs by the first processor, t1 is used to indicate the transmission time of the prbs by the first processor, and Δt1 is used to indicate the transmission duration of the prbs in the transmission path.

[0092] In step ②, the first processor obtains the distance of the object to be measured according to the first time difference and the transmission speed of the test signal in the transmission path.

[0093] The transmission path may include a transmission path on a printed circuit board (PCB), an optical fiber, or a cable. Depending on the transmission path, the transmission speed of the PRBs along the transmission path may also vary, as shown in Table 1.

[0094] Table 1

[0095] The following takes the transmission path as a transmission path on a PCB as an example to illustrate how the first processor obtains the distance of the object to be measured according to the first time difference and the transmission speed of the test signal in the transmission path.

[0096] Please refer to FIG. 7 described above. As shown in FIG. 7 , the transmission path includes: an object to be measured and a transmission path on the PCB. The transmission path on the PCB includes: a transmission path on the board and a transmission path on the backplane.

[0097] First, the first processor uses formula (2) to obtain the transmission time of the test signal on the transmission path of the PCB based on the length of the transmission path on the PCB and the transmission time of the test signal on the transmission path per meter of the PCB. t=s*m Formula (2)

[0098] Among them, s is used to indicate the length of the transmission path on the PCB, m is used to indicate the transmission time of the transmission path per meter of the PCB, and t is used to indicate the transmission time of the test signal in the transmission path of the PCB.

[0099] Next, the first processor uses formula (3) to subtract the first time difference from the transmission duration to obtain the transmission duration of the test signal in the object to be tested. t0 = Δt1 - t Formula (3)

[0100] Among them, △t1 is used to indicate the transmission time of the test signal in the transmission path, t is used to indicate the transmission time of the test signal on the transmission path of the PCB, and t0 is used to indicate the transmission time of the test signal in the object to be tested.

[0101] Finally, the first processor can use formula (4) to obtain the distance of the object to be measured based on the transmission time per meter of the test signal on the object to be tested and the transmission time of the test signal on the object to be measured.

[0102] Wherein, t0 is used to indicate the transmission time of the test signal in the object to be tested, m0 is used to indicate the transmission time of the test signal per meter of the object to be tested, and s0 is used to indicate the distance of the object to be measured.

[0103] Depending on the object to be tested, the transmission time of the test signal per meter of the object to be tested may also vary. Several possible examples are given below.

[0104] Example 1: The object to be tested is a cable. The transmission time of the test signal on each meter of the object to be tested is 4.39 nanoseconds (ns).

[0105] Example 2: The object to be tested is an optical fiber, and the transmission time of the test signal on each meter of the object to be tested is 5 nanoseconds (ns).

[0106] Example 3: The object under test is a gap. The gap is filled with air, and light travels at the speed of light in air. This means the test signal takes 3.33 nanoseconds (ns) to travel per meter of the object under test.

[0107] The above description uses a transmission path on a PCB as an example to specifically describe a method for obtaining the distance to an object. The method described above can also be used to obtain the distance to an object using a transmission path on a PCB, such as an optical fiber or an electrical cable, or a combination of at least two of these.

[0108] In this application, a processor deployed on a single board calculates the distance to the object to be measured based on the transmission time, reception time, and transmission speed of the test signal along the transmission path. Compared to requiring specific structures or test fixtures, this embodiment does not require the installation of additional components. By sending a test signal and obtaining the transmission and reception times of the test signal while the processor is operating normally, the distance of the gap between the single board and the backplane can be calculated, enabling online measurement of the gap.

[0109] The ranging method described above is based on the assumption that the transmission duration of the test signal on the internal transmission path of the signal transceiver is predictable or negligible. In some possible scenarios, the transmission duration of the internal transmission path of the signal transceiver is unpredictable, such as when the signal transceiver is a SerDes (SerDes). In this case, the SerDes' clock data recovery (CDR) can be set to zero phase difference, or a phase difference can be determined, or the following method can be used to measure the transmission duration of the test signal on the internal transmission path.

[0110] FIG14 is a flow chart of the second distance measurement method provided in the present application. As shown in FIG14 , before the first processor described in step S530 above obtains the distance of the object to be measured, the first processor may further execute the following step S540.

[0111] Step S540: The first processor obtains a third time.

[0112] The third time is used to indicate: the transmission duration of the test signal in the first transmission path. Figure 15 is a schematic diagram of the fifth transmission path provided in the present application. As shown in Figure 15, the transmission path includes: a first transmission path and a second transmission path. The first transmission path is used to indicate: the internal transmission path S3 included in the first signal transceiver. The second transmission path is used to indicate: the transmission path (such as S1, S2, D1) through which the test signal passes and does not include the first transmission path S3 and includes the object to be measured. And the first processor obtains the distance of the object to be measured based on the first time, the second time, the third time, the transmission speed of the test signal in the first transmission path, and the transmission speed of the test signal in the second transmission path.

[0113] In this case, unlike the first processor described above, which obtains the distance to the object to be measured based on the first time, the second time, and the transmission speed of the test signal on the transmission path, the first processor obtains the second time difference using formula (5) based on the first time difference and the third time. The second time difference is used to indicate the transmission duration of the test signal on the second transmission path. The first processor obtains the distance to the object to be measured based on the second time difference and the transmission speed of the test signal on the second transmission path. △t2=△t1-t3 Formula (5)

[0114] Δt1 is used to indicate the transmission time of the test signal in the transmission path, t3 is used to indicate the transmission time of the test signal in the first transmission path, and Δt2 is used to indicate the transmission time of the test signal in the second transmission path.

[0115] Regarding the process of the first processor obtaining the distance of the object to be measured based on the second time difference and the transmission speed of the test signal in the second transmission path, please refer to the relevant description of the first processor obtaining the distance of the object to be measured based on the first time difference and the transmission speed of the test signal in the transmission path described above, and the relevant description of the first processor obtaining the first time difference, please refer to the relevant content described above, and no further details will be given here.

[0116] Taking the first signal transceiver as a serdes as an example, the signal transmitting end of the serdes is A, and the signal receiving end is B. The process of the first processor acquiring the third time is described in detail below, and the process includes the following steps ① to ④.

[0117] Step ①: The first processor sets the Serdes internal loopback. The Serdes internal loopback may refer to a test signal sent by A being transmitted through an internal transmission path (first transmission path) included in the Serdes and then received by B.

[0118] In step ②, the first processor A sends a test signal including multiple code elements and records the time of sending the first code element as the fourth time.

[0119] In step 3, the first processor receives the test signal from processor B. Based on the phase detection result, the CDR contained in the serdes locks when the edge (Edge, E) phase difference reaches 0. This time is recorded as the fifth time. The fifth time indicates the time when processor B can recover the corresponding code element sent by processor A.

[0120] Step ④: The first processor calculates the difference between the fifth time and the fourth time, and uses the result as the third time.

[0121] After the CDR is locked, the first processor sets the serdes outloop. The serdes outloop may refer to a test signal sent by A being transmitted through a transmission path including the test object and then received by B. The time when A sends the test signal is a first time, and the time when B receives the test signal is a second time.

[0122] For example, FIG16 is a diagram comparing symbols and timing provided by the present application. As shown in FIG16 , when the first processor is in a serdes inner loop, A sends symbols 1 to n, B can fully recover the symbols from symbol 3, and the serdes CDR is locked. Symbol 1 is sent at time 4, symbol 3 is received at time 5, and the difference between time 4 and time 5 is time 3. When the serdes CDR is locked, the first processor is in a serdes outer loop, A sends symbols 1 to n, and B can fully recover the symbols from symbol 1. A sends symbol 1 at time 1, and B receives symbol 1 at time 2.

[0123] In this embodiment, the influence of the first transmission path on the distance to the object being measured is eliminated. The processor obtains a third time for transmitting a test signal on the first transmission path, as well as a first time difference between the first and second transmission paths. The processor then subtracts the first time difference from the third time difference to determine the transmission duration of the test signal on the second transmission path. This eliminates the influence of the transmission duration of the test signal on the first transmission path on the distance to the object being measured, thereby improving the accuracy of the measured distance to the object.

[0124] In one possible scenario, when the object to be measured is a gap, the gap is used to indicate: the gap that exists after the single board is connected to the backplane. After obtaining the distance of the object to be measured, the first processor compares the distance with a preset first distance threshold. When the distance is greater than or equal to the first distance threshold, the first processor issues a first prompt message. The first prompt message is used to indicate: reduce the distance between the connection between the single board and the backplane. The first prompt message can be implemented by a combination of one or more of an indicator light, a command alarm, and a network management. The implementation method of the first prompt message in this application is not limited. For example, the first prompt message can also be an alarm.

[0125] In one possible scenario, if the object to be measured is a gap, the gap indicates the gap between the board and the backplane. After obtaining the distance to the object to be measured, the first processor obtains a historical distance of the object to be measured. The historical distance indicates the measured distance of the object to be measured. The first processor compares the distance with the historical distance. If the distance is greater than the historical distance, the processor switches to another board.

[0126] The historical distance can be a single value or multiple values. Depending on the value of the historical distance, the first processor compares the distance with the historical distance in different ways, which are described below.

[0127] In the first possible scenario, the historical distance is a single value. In this case, the first processor compares the distance with the historical distance. If the distance is greater than the historical distance, the processor switches to another board. The first processor can use the following possible examples to obtain the historical distance.

[0128] Example 1: The first processor obtains the distance measured last time, and uses the distance measured last time as the historical distance.

[0129] For example, if the first processor measures the distance of the object n times, if the nth time is the current time, then the n-1th time is the time before the current time. The historical distance is the distance measured at the n-1th time. If n = 10, then the distance measured at the 9th time is the historical distance.

[0130] Example 2: The first processor obtains the distances measured a first number of times before the current time, and the first processor may use the following method ① or method ② to calculate the historical distance based on the distances measured the first number of times.

[0131] Method ①: Calculate the average of the distances measured before the current time for the first number of times, and use the average as the historical distance.

[0132] For example, the first processor measures the distance to the object n times, where the first number is m. The nth time is the current time, and the nmth to n-1th times are the first number of times before the current time. The historical distance is the average of the distances measured from the nmth to n-1th times. For example, if n = 10 and m = 4, the historical distance is the average of the distances measured from the 6th to the 9th time.

[0133] Method ②: Calculate the weighted value of the distance measured the first number of times before the current time, and use the weighted value as the historical distance.

[0134] For example, the first processor measures the distance of the object to be measured n times, with the first number being m. The nth time is the current time, and the nmth to n-1th times are the first number of times before the current time. The historical distance is the weighted value of the distances measured from the nmth to n-1th times. The user can set the weight of each distance measured from the nmth to n-1th times as needed, and this application does not limit this. For example, if n = 10 and m = 4, the historical distance is the weighted value of the distances measured from the 6th to the 9th time.

[0135] In a second possible scenario, the historical distance is multiple values, each of which indicates the distance measured a first number of times before the current measurement. In this case, the first processor compares the distances measured a first number of times with the current measurement one by one. If the distances measured a first number of times before the current measurement gradually increase, the processor switches to another board.

[0136] For example, the first processor measures the distance of the object to be measured n times, and the first number is m. The nth time is the current time, and the nmth to n-1th times are the first number of times before the current time. The distance measured at the nth time is: s n , the distances measured from the nmth to the n-1th time are: s n-m to s n-1 If s n-m to s n Gradually increase the size and switch to other boards.

[0137] It is understood that in order to implement the functions in the above embodiments, the communication device includes hardware structures and / or software modules corresponding to the execution of each function. It should be readily apparent to those skilled in the art that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in hardware or in a manner driven by computer software depends on the specific application scenario and design constraints of the technical solution.

[0138] The above description, in conjunction with Figures 1 to 16, details the ranging method provided in accordance with this embodiment. The following description of the ranging device provided in accordance with this embodiment will be made in conjunction with Figure 17. Figure 17 is a schematic structural diagram of a ranging device provided in this application. The ranging device 1700 can be used to implement the functions of the processor in the above method embodiment, thereby also achieving the beneficial effects of the above method embodiment. In this embodiment, the ranging device 1700 can be a module (e.g., a chip) applied to a server.

[0139] As shown in Figure 17, distance measurement device 1700 includes a time acquisition module 1710 and a processing module 1720. Time acquisition module 1710 is configured to acquire a first time. The first time indicates the time when distance measurement device 1700 transmits a test signal. Time acquisition module 1710 is also configured to acquire a second time. The second time indicates the time when the test signal returns to distance measurement device 1700 via a transmission path. The transmission path indicates the path along which the test signal passes and includes the object to be measured. Processing module 1720 is configured to determine the distance to the object to be measured based on the first time, the second time, and the transmission speed of the test signal along the transmission path.

[0140] In one possible scenario, ranging apparatus 1700 further includes a signal transceiver module 1730. The signal transceiver module 1730 has a signal transceiver rate greater than or equal to a preset threshold. Signal transceiver module 1730 is configured to send a test signal. The first time indicates the time at which the test signal is sent by the signal transceiver module 1730. The second time indicates the time at which the test signal returns to the signal transceiver module 1730 via the transmission path.

[0141] In one possible scenario, the transmission path includes a first transmission path and a second transmission path. The first transmission path indicates the internal transmission path included in the signal transceiver module 1730. The second transmission path indicates the transmission path that the test signal passes through, excluding the internal transmission path and including the object to be measured. Before the processing module 1720 obtains the distance to the object to be measured, the time acquisition module 1710 obtains a third time. The third time indicates the transmission duration of the test signal on the first transmission path. The processing module 1720 obtains the distance to the object to be measured based on the first time, the second time, the third time, the transmission speed of the test signal on the first transmission path, and the transmission speed of the test signal on the second transmission path.

[0142] In one possible scenario, processing module 1720 obtains the distance of the object to be measured based on the first time, the second time, the third time, the transmission speed of the test signal on the first transmission path, and the transmission speed of the test signal on the second transmission path. This includes: processing module 1720 obtains a first time difference based on the first time and the second time. The first time difference indicates the transmission duration of the test signal on the transmission path. Processing module 1720 obtains a second time difference based on the first time difference and the third time. The second time difference indicates the transmission duration of the test signal on the second transmission path. Processing module 1720 obtains the distance of the object to be measured based on the second time difference and the transmission speed of the test signal on the second transmission path.

[0143] In one possible scenario, the time acquisition module 1710 acquires the second time, including: the time acquisition module 1710 acquires a first sub-time. The first sub-time indicates that a second time difference is obtained by testing based on the first time difference and the third time. The second time difference indicates the transmission duration of the test signal on the second transmission path. The processing module 1720 obtains the distance to the object to be measured based on the second time difference and the transmission speed of the test signal on the second transmission path.

[0144] In one possible scenario, the transmission path is the duration of transmission of the second signal from the first processor to the second processor. Time acquisition module 1710 acquires a second sub-time. The second sub-time is used to indicate the transmission duration of the test signal from the second processing module to the first processor. Processing module 1720 obtains a second time based on the first sub-time and the second sub-time.

[0145] In a possible scenario, the object to be measured includes at least one of an optical fiber, a cable, and a gap, wherein the gap is used to indicate a gap existing after the single board is connected to the backboard.

[0146] In one possible scenario, if the object to be measured is a gap, the gap indicates the gap that exists after the board and the backplane are connected. After obtaining the distance to the object to be measured, processing module 1720 compares the distance with a preset first distance threshold. If the distance is greater than or equal to the first distance threshold, processing module 1720 issues a first prompt message. The first prompt message indicates that the distance between the board and the backplane should be reduced.

[0147] In one possible scenario, if the object to be measured is a gap, the gap indicates the gap between the board and the backplane. After obtaining the distance to the object to be measured, processing module 1720 obtains the historical distance of the object to be measured. The historical distance indicates the measured distance of the object to be measured. Processing module 1720 compares the distance with the historical distance. If the distance is greater than the historical distance, processing module 1720 switches to another board.

[0148] In a possible scenario, the first signal transceiver and / or the second signal transceiver is a serializer / deserializer (serdes).

[0149] When the distance measurement device implements any of the distance measurement methods shown in the aforementioned figures through software, the distance measurement device and its various units may also be software modules. The distance measurement method described above is implemented by calling the software module via a processor. The processor may be a CPU, an application-specific integrated circuit (ASIC), other general-purpose processors, a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a complex programmable logical device (CPLD), a generic array logic (GAL), or any combination thereof.

[0150] For a more detailed description of the above-mentioned ranging device, please refer to the relevant description of the embodiment shown in the aforementioned figures, and will not be repeated here. It will be understood that the ranging device shown in the aforementioned figures is only an example provided in this embodiment. Depending on actual needs, the ranging device may include more or fewer modules, and this application is not limited to this.

[0151] When the distance measurement device is implemented via hardware, the hardware may be implemented via a processor or chip. The chip includes an interface circuit, a control circuit, and a power supply circuit. The interface circuit is used to receive data from other devices outside the chip and transmit it to the control circuit, or to send data from the control circuit to other devices outside the chip. The control circuit implements the method of any possible implementation method in the above-mentioned embodiments via logic circuits or executing code instructions. The beneficial effects can be found in the description of any aspect of the above-mentioned embodiments and will not be repeated here.

[0152] Alternatively, the chip includes a processor and a power supply circuit, the power supply circuit being used to power the processor, and the processor being used to implement the ranging method in the aforementioned embodiment. For example, the power supply circuit may be located within the same chip as the processor, or within a separate chip from the processor. The power supply circuit may include, but is not limited to, at least one of the following: a power supply subsystem, a power management chip, a power management processor, or a power management control circuit.

[0153] The method steps in this embodiment can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and storage medium can be located in an ASIC. In addition, the ASIC can be located in a computing device. Of course, the processor and storage medium can also exist as discrete components in a network device or a terminal device.

[0154] The present application also provides a chip system, which includes a processor for implementing the functions of the data processing unit in the above method. In one possible design, the chip system also includes a memory for storing program instructions and / or data. The chip system can be composed of a chip alone or can include a chip and other discrete devices.

[0155] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the process or function described in the embodiments of the present application is performed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user device or other programmable device. The computer program or instruction can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instruction can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired or wireless means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, a hard disk, or a tape; it can also be an optical medium, such as a digital video disc (DVD); it can also be a semiconductor medium, such as a solid state drive (SSD).

[0156] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A distance measurement method, characterized in that: The method is executed by a first processor, the first processor is arranged on a single board, and the method includes: Acquire a first time, where the first time is used to indicate a time when the first processor sends a test signal; Acquire a second time, where the second time is used to indicate the time when the test signal returns to the first processor via a transmission path, where the transmission path is used to indicate a path including an object to be measured and through which the test signal passes; The distance of the object to be measured is obtained according to the first time, the second time and the transmission speed of the test signal in the transmission path.

2. The method according to claim 1, characterized in that: The first processor includes: a first signal transceiver, the first processor uses the first signal transceiver to send the test signal, and the rate of transmitting and receiving signals by the first signal transceiver is greater than or equal to a preset threshold. The first time is used to indicate: the time when the first signal transceiver sends the test signal; And / or, the second time is used to indicate: the time it takes for the test signal to return to the first signal transceiver via the transmission path.

3. The method according to claim 2, characterized in that The transmission path includes: a first transmission path and a second transmission path, the first transmission path is used to indicate: an internal transmission path included in the first signal transceiver, and the second transmission path is used to indicate: a transmission path that the test signal passes through but does not include the internal transmission path and includes the object to be measured, Before obtaining the distance of the object to be measured, the method further includes: Acquire a third time; wherein the third time is used to indicate: the transmission duration of the test signal in the first transmission path; The distance of the object to be measured is obtained according to the first time, the second time, the third time, the transmission speed of the test signal on the first transmission path, and the transmission speed of the test signal on the second transmission path.

4. The method according to claim 3, characterized in that: The obtaining the distance of the object to be measured according to the first time, the second time, the third time, the transmission speed of the test signal in the first transmission path, and the transmission speed of the test signal in the second transmission path includes: Obtaining a first time difference according to the first time and the second time; wherein the first time difference is used to indicate: the transmission duration of the test signal on the first transmission path and the second transmission path; According to the first time difference and the third time, a second time difference is obtained; wherein the second time difference is used to indicate: the transmission time length of the test signal in the second transmission path; The distance of the object to be measured is obtained according to the second time difference and the transmission speed of the test signal in the second transmission path.

5. The method according to any one of claims 1 to 4, characterized in that The transmission path passes through a second processor, The second time includes: a first sub-time and a second sub-time; the first sub-time is used to indicate: the transmission duration of the test signal from the first processor to the second processor; the second sub-time is used to indicate: the transmission duration of the test signal from the second processor to the first processor.

6. The method according to any one of claims 1 to 5, characterized in that The object to be measured includes: at least one of: an optical fiber, a cable and a gap; wherein the gap is used to indicate: a gap existing after the single board is connected to the backboard.

7. The method according to claim 6, characterized in that In the case where the object to be measured is a gap, the gap is used to indicate: a gap existing after the single board is connected to the backboard, the object to be measured includes a first detection point and a second detection point, the first detection point is located at a first position of the object to be measured, the second detection point is located at a second position of the object to be measured, and the first position and the second position are different, The obtaining the distance of the object to be measured comprises: The distance of the first detection point and the distance of the second detection point are obtained.

8. The method according to any one of claims 1 to 6, characterized in that In the case where the object to be measured is a gap, the gap is used to indicate: a gap existing after the single board and the backboard are connected, After obtaining the distance of the object to be measured, the method further includes: comparing the distance with a preset first distance threshold; When the distance is greater than or equal to the first distance threshold, a first prompt message is issued, where the first prompt message is used to instruct to reduce the gap.

9. The method according to any one of claims 1 to 6, characterized in that: In the case where the object to be measured is a gap, the gap is used to indicate: a gap existing after the single board and the backboard are connected, After obtaining the distance of the object to be measured, the method further includes: Acquire a historical distance of the object to be measured, where the historical distance is used to indicate the measured distance of the object to be measured; comparing the distance to the historical distance; When the distance is greater than the historical distance, switch to other boards.

10. The method according to any one of claims 2 to 9, characterized in that: The first signal transceiver and / or the second signal transceiver is: a serializer / deserializer serdes.

11. A distance measuring device, characterized in that: The apparatus comprises: a module for executing the method according to any one of claims 1-10.

12. A communication device, characterized in that: include: A processing circuit and a transceiver, wherein the transceiver is used to receive data from other devices outside the communication device and transmit it to the processing circuit, or to send data from the processing circuit to other devices outside the communication device; the processing circuit is used to execute the method described in any one of claims 1-10 through a logic circuit or execution code instructions.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by an electronic device, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Calibration tool and measuring device and method for mutual matching gap of blind-mating connector

    CN109737911A

  • Power line distance measurement method, system and device

    CN113391162A

  • Device for measuring incomplete matching distance of connector

    CN113640711A

  • Connector fit clearance performance testing device and performance data system

    CN115980634A

  • Communications system, transmitter / receiver and transmission line monitoring method

    JP2005341022A