Distance measurement method and device

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

CN119375825APending Publication Date: 2025-01-28HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310940084.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The prior art cannot realize online measurement of the gap after the veneer is connected to the back plate, and a specific structure or measuring instrument is required.

Method used

By setting a processor on the single board, sending a test signal and obtaining the sending and receiving time, the transmission speed of the transmission path is calculated to obtain the distance of the distance to be measured.

Benefits of technology

The online measurement of the gap between the single board and the back plate is realized without installing additional devices to improve the flexibility and efficiency of measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119375825A_ABST
    Figure CN119375825A_ABST
Patent Text Reader

Abstract

The invention discloses a distance measuring method and device, and relates to the technical field of computers. The method is executed by a processor, and compared with the need of a specific structure or a specific test tool, online measurement of the distance of an object to be subjected to distance measurement cannot be realized. In the application, the single board does not need to be provided with other devices, and the single board sends the test signal by adopting the processor arranged on the single board. And the processor obtains the sending time and the receiving time of the test signal, and realizes the online measurement of the distance of the object to be measured according to the sending time, the receiving time and the transmission speed of the test signal in the transmission path.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] The gap (demating) refers to the maximum gap between the single board and the backplane after they are connected by the connector. The gap can be measured by changing the structure of the connector (such as a long and short pin connector), customizing the test tooling, or using a micro switch to detect the single board. The above methods require the installation of a specific structure (such as a long and short pin connector) or a specific measuring instrument for the object to be tested, and it is impossible to measure the gap online. Summary of the invention

[0003] The present application provides a distance measurement method and device for solving the problem that the gap between a single board and a backboard cannot be measured online after the two are connected.

[0004] In a first aspect, the present application provides a method for distance measurement. The method is executed by a first processor, which is arranged on a single board, and the method includes: the first processor obtains a first time. The first time is used to indicate: the time when the first processor sends a test signal. The first processor obtains a second time. The second time is used to indicate: the time when the test signal returns to the first processor via a transmission path. The transmission path is used to indicate: the path through which the test signal passes and includes the 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 on the transmission path.

[0005] In conventional technology, a single board needs to use a specific structure or a specific test fixture to realize the distance measurement process of the object to be measured, which leads to the problem that the distance measurement of the object to be measured cannot be realized online. In contrast, in the present application, the single board does not need to install other devices, and the single board uses a processor arranged thereon to send a test signal. The processor obtains the sending time and receiving time of the test signal, and according to the sending time, receiving time and the transmission speed of the test signal in the transmission path, the effect of online measurement of the distance of the object to be measured is realized.

[0006] In a 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 sends 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 sends the test signal. The second time is used to indicate: the time when the test signal returns to the first signal transceiver via the transmission path.

[0007] 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 in 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 in the first transmission path, and the transmission speed of the test signal in the second transmission path.

[0008] In another possible implementation, the first processor obtains 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, including: the first processor obtains a first time difference according to the first time and the second time. The first time difference is used to indicate: the transmission duration of the test signal in the first transmission path and the second transmission path. The first processor obtains a second time difference according to the first time difference and the third time. The second time difference is used to indicate: the transmission duration of the test signal in the second transmission path. The first processor obtains the distance of the object to be measured according to the second time difference and the transmission speed of the test signal in the second transmission path.

[0009] 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 is used to indicate: the transmission time length of the test signal transmitted from the first processor to the second processor. And the first processor obtains a second sub-time. The second sub-time is used to indicate: the transmission time length of the test signal forwarded from the second processor to the first processor. The first processor obtains the second time according to the first sub-time and the second sub-time.

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

[0011] In another possible implementation, when 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. 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 to reduce the gap.

[0012] In another possible implementation, when 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. After obtaining the distance of the object to be measured, the first processor obtains the historical distance of the object to be measured. The historical distance is used to indicate: the measured distance of the object to be measured. The first processor compares the distance and the historical distance, and switches to other single boards when the distance is greater than the historical distance.

[0013] In another possible implementation, when 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, and 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 first processor obtains the distance of the object to be measured, including: obtaining the distance of the first detection point and the distance of the second detection point.

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

[0015] In a third aspect, the present application provides a communication device. The communication device includes: a processing circuit and a transceiver. The transceiver is used to receive data from other devices outside the communication device and transmit it to the processing circuit, or send data from the processing circuit to other devices outside the communication device. The processing circuit is used to perform the operation steps of the method described in the first aspect or any possible implementation of the first aspect through a logic circuit or execution code instructions. Several possible examples of the communication device are given below.

[0016] 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.

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

[0018] In a fourth aspect, the present application provides a computer-readable storage medium, including: computer software instructions; when the computer software instructions are executed in a computing device, the computing device executes the operation steps of the method described in the first aspect or any possible implementation of the first aspect.

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

[0020] 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 implementation provided by the above aspects, the present application may be further combined to provide more implementations. Based on the implementation provided by the above aspects, the present application may be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of the structure of a communication device provided by the present application;

[0022] Figure 2 A schematic diagram of a structure in which a male connector and a female connector are connected;

[0023] Figure 3 A schematic diagram of a gap measurement structure;

[0024] Figure 4 A schematic diagram of another type of gap measurement structure;

[0025] Figure 5 A flow chart of a distance measurement method provided by the present application;

[0026] Figure 6 A schematic diagram of a structure for measuring an object to be measured provided by the present application;

[0027] Figure 7 A schematic diagram of the first transmission path provided for this application;

[0028] Figure 8 A schematic diagram of the second transmission path provided for this application;

[0029] Fig. 9 A schematic diagram of the third transmission path provided by this application;

[0030] Fig.10 A schematic diagram of the fourth transmission path provided by this application;

[0031] Fig.11 A schematic diagram of the first situation after the male connector and the female connector provided in this application are connected;

[0032] Fig.12 A schematic diagram of the second situation after the male connector and the female connector provided in this application are connected;

[0033] Fig.13 A schematic diagram of the third situation after the male connector and the female connector provided in this application are connected;

[0034] Fig.14 A schematic diagram of the flow chart of the second distance measurement method provided in this application;

[0035] Fig.15 A schematic diagram of the fifth transmission path provided by this application;

[0036] Fig.16 A code element and timing comparison diagram provided for this application;

[0037] Fig.17 A schematic diagram of the structure of a distance measuring device provided in this application. DETAILED DESCRIPTION

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

[0039] Figure 1 A schematic diagram of the structure of a communication device provided in this application, such as Figure 1 As shown, 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.

[0040] 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 gates or transistor logic devices, discrete hardware components, etc. In practical applications, the single board 110 may also include multiple processors.

[0041] An operating system and other software programs are installed in the processor 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.

[0042] The connector 130 may include a male connector and a female connector that cooperate with each other. The male connector may be arranged on the single board 110, and the female connector may be arranged 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 realizing data transmission between the single board 110 and the single board 110. The present application does not limit the positions where the male connector and the female connector are arranged. In some possible situations, the male connector may be arranged on the backplane 120, and the female connector may be arranged on the single board 110.

[0043] Figure 2 Schematic diagram of a structure of a male connector and a female connector connected, such as Figure 2 As shown in a, the male connector and the female connector are tightly connected without any gap (demating). Figure 2 As shown in b, the male connector and the female connector are not tightly connected and there is a gap. 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, since the refractive index of the male connector and the female connector is different from 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.

[0044] Method ①: Use a long and short pin connector to measure whether there is a gap. Figure 3 A schematic diagram of the gap measurement structure is shown in FIG. Figure 3 As shown, Figure 3 The long and short pin connector is used to measure the gap between the male connector and the female connector. When the single board and the backplane are not tightly connected, the long pin is in normal contact and the short pin is not in contact. This measurement method can only detect whether there is a gap, and it can only detect a gap of a certain distance, which is costly.

[0045] Method ②: Use test tooling to test the gap. Figure 4 A schematic diagram of another type of gap measurement is shown in FIG. Figure 4 As shown, Figure 4 In the process, a test fixture is used to measure D2, and D1 is obtained according to the male connector. The gap is calculated based on D2 and D1. The object to be tested needs to be installed on the corresponding measuring instrument to measure D2. Online testing of the gap cannot be achieved, and customized test fixtures are required, resulting in high testing costs.

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

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

[0048] Secondly, the processor receives a test signal, and obtains a receiving time of the test signal.

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

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

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

[0052] Figure 5 A flow chart of a distance measurement method provided in this application is shown as follows: Figure 5 As shown, this method can be Figure 1 The described processor is executed, the processor is set on a single board, and the single board is connected to the backplane through a connector. The method includes the following steps S510 to S530.

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

[0054] 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.

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

[0056] The second time is used to indicate the time it takes for the test signal to return to the first processor via the transmission path. The transmission path is used to indicate the path that the test signal passes through and includes the object to be measured. The object to be measured may include cables, optical fibers, etc., which are not limited in this application. In some possible situations, the object to be measured may also be a gap. The gap is used to indicate the gap between the board and the backplane on which the first processor is arranged. Figure 6 As shown, Figure 6 A schematic diagram of a structure for measuring an object to be measured provided in the present application.

[0057] In one possible scenario, the first processor includes a first signal transceiver. The first processor uses the first signal transceiver to send and receive data. The rate at which the first signal transceiver sends and receives data is greater than or equal to a preset threshold. The first signal transceiver can be a high-speed communication interface such as serdes, or it can be other equipment, devices or chips that can realize high-speed data transceiver functions. In this case, the first time indicates: the time when the first signal transceiver sends the test signal. The second time indicates: the time when the test signal returns to the first signal transceiver via the transmission path.

[0058] 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. The first processor uses the time when the prbs is received as the second time.

[0059] 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 it in two ways: mode 1 and mode 2.

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

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

[0062] In conventional technology, a single board needs to use a specific structure or a specific test fixture to realize the distance measurement process of the object to be measured, which leads to the problem that the distance measurement of the object to be measured cannot be realized online. In contrast, in the present application, the single board does not need to install other devices, and the single board uses a processor arranged thereon to send a test signal. The processor obtains the sending time and receiving time of the test signal, and according to the sending time, receiving time and the transmission speed of the test signal in the transmission path, the effect of online measurement of the distance of the object to be measured is realized.

[0063] Mode 2: The test signal sent by the first processor is forwarded by other processors and returns to the first processor.

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

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

[0066] Figure 8 A schematic diagram of the second transmission path provided for this application, such as Figure 8 As shown, the single board includes a first processor and a second processor, the single board is connected to the backplane via a connector, and the test signal passes through the following two paths.

[0067] 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 D, the transmission path K1 included in the backplane, and the transmission path S2 included in the single board.

[0068] Path ②, the path of the test signal from the second processor to the first processor, specifically includes: the transmission path S3 included in the single board, the connector D, the transmission path K2 included in the backplane, and the transmission path S4 included in the single 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.

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

[0070] Fig. 9 A schematic diagram of the third transmission path provided by this application, such as Fig. 9 As shown, the first processor is arranged on the first single board, and the first single board is connected to the backplane through the first connector. The second processor is arranged on the second single board, and the second single board is connected to the backplane through the second connector. The test signal passes through the following two paths.

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

[0072] Path ②, the path of the test signal from the second processor to the first processor. Specifically includes: the transmission path S4 included in the second single board, the second connector D2, the transmission path K4 included in the backplane, and the transmission path S4 included in the first single 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.

[0073] The test signal passes through the first connector and the second connector. There is a first gap in the first connector, and there is a second gap in the second connector. Only the sum of the distances of the first gap and the second gap can be obtained by one measurement. In this case, other processors connected to the first connector can be used to send test signals, and the distance measurement method described above can be used to obtain the distance of the first gap, thereby calculating the distance of the second gap. Alternatively, other processors connected to the second connector can be used to send test signals, and the distance measurement method described above can be used to obtain the distance of the second gap, thereby calculating the distance of the first gap.

[0074] 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.

[0075] The above describes the situation in which 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 conjunction with the accompanying drawings. In some possible situations, Fig.10 A schematic diagram of the fourth transmission path provided by this application, such as Fig.10 As shown, the test signal passes through an internal transmission path included in the first processor, and the second time includes the transmission duration of the test signal on the internal transmission path.

[0076] In a 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, and 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.

[0077] The above description uses the example that the object to be measured includes 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 the detection points at the edge of the object to be measured. The present 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 situation of the male connector and the female connector. Several examples of the situation of the male connector and the female connector are given below.

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

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

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

[0081] In this case, the distances of the first number of detection points are different from the distances of other detection points, the proportion of the first number in all detection points does not exceed the set proportion threshold, and the difference in distances detected by each detection point in the first number of detection points exceeds the set threshold. If the set proportion threshold is 20%, m1 is different from m2 to m10 and the distance difference is greater than the set threshold, the first processor determines that at least one of the male connector and the female connector is deformed, such as Fig.12 As shown, Fig.12 This is a schematic diagram of the second situation after the male connector and the female connector provided in this application are connected.

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

[0083] In this case, the distances detected at each detection point are distributed in increasing or decreasing order, such as Fig.13 As shown, Fig.13 This is a schematic diagram of the third situation after the male connector and the female connector provided in this application are connected.

[0084] 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.

[0085] 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.

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

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

[0088] The first time difference is used to indicate: the transmission time length of the test signal (such as prbs) in the transmission path. The first processor may calculate the first time difference using formula (1).

[0089] △t1=t2-t1 Formula (1)

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

[0091] 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.

[0092] The transmission path may include: a transmission path on a printed circuit board (PCB), an optical fiber, a cable, or a combination of one or more thereof. Depending on the transmission path, the transmission speed of the prbs on the transmission path is also different, as shown in Table 1.

[0093] Table 1

[0094] Transfer Materials cable optical fiber PCB Speed ​​of Light Transmission time per meter (ns / m) 4.39 5 7.086614 3.33

[0095] The following takes the transmission path as a transmission path on a PCB as an example to illustrate that 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] See the description above. Figure 7 ,like Figure 7 As shown, the transmission path includes: an object to be measured and a transmission path on the PCB, and the transmission path on the PCB includes: a transmission path on the single 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 according to 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.

[0098] t=s*m Formula (2)

[0099] 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.

[0100] Secondly, 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.

[0101] t0=△t1-t Formula (3)

[0102] 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.

[0103] Finally, the first processor may use formula (4) to obtain the distance of the object to be measured according to 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.

[0104] s0=t0 / m0 formula (4)

[0105] Wherein, t0 is used to indicate: the transmission time length of the test signal in the object to be tested, m0 is used to indicate: the transmission time length 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.

[0106] Depending on the object to be tested, the transmission time of the test signal on each meter of the object to be tested is also different. Several possible examples are given below.

[0107] 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).

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

[0109] Example 3: The object to be tested is a gap. The medium filled in the gap is air, and the speed of light transmission in air is the speed of light. That is, the transmission time of the test signal on each meter of the object to be tested is: 3.33 nanoseconds (ns).

[0110] The above text takes the transmission path as a transmission path on a PCB as an example to specifically describe the method for obtaining the distance of the object to be measured. When the transmission path is: any one of an optical fiber and a cable or a combination of at least two of the transmission path, optical fiber, and cable on a PCB, the distance of the object to be measured can also be obtained by the method described above.

[0111] In this application, the processor arranged on the single board calculates the distance of the object to be measured according to the sending time, receiving time and the transmission speed of the test signal in the transmission path. Compared with the need for a specific structure or a specific test fixture, this embodiment does not require the installation of other devices. When the processor is working normally, by sending a test signal and obtaining the sending time and receiving time of the test signal, the distance of the gap between the single board and the backplane can be calculated to achieve online measurement of the gap.

[0112] The distance measurement method described above is based on the situation that the transmission time of the test signal on the internal transmission path included in the signal transceiver is predictable or negligible. In some possible situations, the transmission time on the internal transmission path included in the signal transceiver is unpredictable, such as when the signal transceiver is a serdes. In this case, the clock data recovery (CDR) of the serdes can be set to 0 phase difference or determine the phase difference or use the following method to measure the transmission time of the test signal on the internal transmission path.

[0113] Fig.14 A flow chart of the second distance measurement method provided in this application is as follows: Fig.14 As shown, before the first processor obtains the distance of the object to be measured in step S530 described above, the first processor may further perform the following step S540.

[0114] Step S540: The first processor obtains the third time.

[0115] The third time is used to indicate: the transmission duration of the test signal in the first transmission path. Fig.15 A schematic diagram of the fifth transmission path provided by this application, such as Fig.15 As shown, 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 S3 included in the first signal transceiver. The second transmission path is used to indicate: a transmission path (such as S1, S2, D1) that the test signal passes through but 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 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.

[0116] In this case, the difference from the first processor obtaining 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 described above is that after obtaining the first time difference, the first processor uses formula (5) to obtain the second time difference according to the first time difference and the third time. The second time difference is used to indicate the transmission time of the test signal in the second transmission path. And the first processor obtains the distance of the object to be measured according to the second time difference and the transmission speed of the test signal in the second transmission path.

[0117] △t2=△t1-t3 Formula (5)

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

[0119] Regarding the process by which 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 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.

[0120] Taking the first signal transceiver as serdes as an example, the signal sending 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 ④.

[0121] Step ①: The first processor sets the serdes internal loopback. The serdes internal loopback may refer to a test signal sent by A, which is received by B after being transmitted via an internal transmission path (first transmission path) included in the serdes.

[0122] 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.

[0123] Step ③, the first processor receives the test signal from B. The CDR contained in the serdes is locked according to the phase detection result when the edge (Edge, E) phase difference is 0, and this time is recorded as the fifth time. The fifth time is used to indicate the time when B can recover the code element sent by A.

[0124] Step ④: The first processor takes the difference between the fifth time and the fourth time as the third time.

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

[0126] For example, Fig.16 A code element and timing comparison diagram provided for this application, such as Fig.16 As shown, when the first processor is set to the serdes inner loopback, A sends codewords 1 to codeword n, B can completely recover the codewords from codeword 3, and the CDR of the serdes is locked. The sending time of codeword 1 is time 4, the receiving time of codeword 3 is time 5, and the difference between time 4 and time 5 is time 3. When the CDR of the serdes is locked, the first processor sets the serdes outer loopback, A sends codewords 1 to codeword n, and B can completely recover the codewords from codeword 1. The time when A sends codeword 1 is time 1, and the time when B receives codeword 1 is time 2.

[0127] In this embodiment, the influence of the first transmission path on the distance of the object to be measured is eliminated. The processor obtains the third time for the first transmission path to transmit the test signal, and obtains the first time difference for the first transmission path and the second transmission path to transmit the test signal, and obtains the transmission time of the test signal on the second transmission path by subtracting the first time difference from the third time. The influence of the transmission time generated by the transmission of the test signal on the first transmission path on the distance of the object to be measured is avoided, and the accuracy of the measured distance of the object to be measured is improved.

[0128] 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 connected 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 of the present application is not limited. For example, the first prompt message can also be an alarm.

[0129] In a possible scenario, when 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. After obtaining the distance of the object to be measured, the first processor obtains the historical distance of the object to be measured. The historical distance is used to indicate the measured distance of the object to be measured. The first processor compares the distance and the historical distance. When the distance is greater than the historical distance, switch to other single boards.

[0130] The historical distance may be one value or multiple values. According to different values ​​of the historical distance, the first processor may compare the distance with the historical distance in different ways, which are described below.

[0131] In the first possible case, the historical distance is a 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 may obtain the historical distance using the following possible examples.

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

[0133] For example, if the first processor measures the distance of the object to be measured 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.

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

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

[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 historical distance is the average value of the distances measured from the nmth to n-1th times. If n=10 and m=4, the historical distance is the average value of the distances measured from the 6th to the 9th times.

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

[0138] 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 historical distance is the weighted value of the distance measured from the nmth to the n-1th times. The user can set the weight of each distance measured from the nmth to the n-1th times as needed, and this application does not limit this. If n=10 and m=4, the historical distance is the weighted value of the distance measured from the 6th to the 9th time.

[0139] In the second possible case, the historical distance is a plurality of values, and the plurality of values ​​are used to indicate the distance measured a first number of times before the current time. In this case, the first processor compares the distance measured a first number of times before with the distance measured a current time one by one, and switches to other boards when the distance measured a first number of times before and the distance measured a current time gradually increase.

[0140] Exemplarily, 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 n-1 If n-m to n Gradually increase the size and switch to other boards.

[0141] It is understandable that, in order to implement the functions in the above-mentioned embodiments, the communication device includes hardware structures and / or software modules corresponding to the execution of each function. It should be easily appreciated by 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 the form of hardware or computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0142] Combined with the above Figures 1 to 16 , describes in detail the ranging method provided by this embodiment, and will be combined with Fig.17 The distance measuring device provided by this embodiment is described. Fig.17 This is a schematic diagram of the structure of a distance measuring device provided in the present application. The distance measuring device 1700 can be used to implement the function of the processor in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment. In this embodiment, the distance measuring device 1700 can be a module (such as a chip) applied to a server.

[0143] like Fig.17 As shown, the distance measuring device 1700 includes: a time acquisition module 1710 and a processing module 1720. The time acquisition module 1710 is used to: obtain a first time. The first time is used to indicate: the time when the distance measuring device 1700 sends a test signal. The time acquisition module 1710 is also used to: obtain a second time. The second time is used to indicate: the time when the test signal returns to the distance measuring device 1700 via the transmission path. The transmission path is used to indicate: the path that the test signal passes through and includes the object to be measured. The processing module 1720 is used to: obtain 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.

[0144] In a possible scenario, the ranging device 1700 further includes: a signal transceiver module 1730. The rate at which the signal transceiver module 1730 transmits and receives signals is greater than or equal to a preset threshold. The signal transceiver module 1730 is used to send a test signal. The first time is used to indicate: the time when the signal transceiver module 1730 sends the test signal. The second time is used to indicate: the time when the test signal returns to the signal transceiver module 1730 via the transmission path.

[0145] In a possible scenario, 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 signal transceiver module 1730. The second transmission path is used to indicate: a transmission path that the test signal passes through but does not include an internal transmission path and includes the object to be measured. Before the processing module 1720 obtains the distance of the object to be measured, the time acquisition module 1710 obtains a third time. The third time is used to indicate: the transmission duration of the test signal in the first transmission path. The 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 in the first transmission path, and the transmission speed of the test signal in the second transmission path.

[0146] In a possible scenario, the processing module 1720 obtains 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, including: the processing module 1720 obtains the first time difference according to the first time and the second time. The first time difference is used to indicate: the transmission duration of the test signal in the transmission path. The processing module 1720 obtains the second time difference according to the first time difference and the third time. The second time difference is used to indicate: the transmission duration of the test signal in the second transmission path. The processing module 1720 obtains the distance of the object to be measured according to the second time difference and the transmission speed of the test signal in the second transmission path.

[0147] In a 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 is used to indicate: the test obtains a second time difference according to the first time difference and the third time. The second time difference is used to indicate: the transmission duration of the test signal in the second transmission path. The processing module 1720 obtains the distance of the object to be measured according to the second time difference and the transmission speed of the test signal in the second transmission path.

[0148] In a possible scenario, the transmission path is a transmission time length of the second signal transmitted from the first processor to the second processor. The time acquisition module 1710 acquires the second sub-time. The second sub-time is used to indicate: the transmission time length of the test signal transmitted from the second processing module to the first processor. The processing module 1720 obtains the second time according to the first sub-time and the second sub-time.

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

[0150] In a possible scenario, when the object to be measured is a gap, the gap is used to indicate: the gap existing after the single board is connected to the backboard. After obtaining the distance of the object to be measured, the processing module 1720 compares the distance with a preset first distance threshold. When the distance is greater than or equal to the first distance threshold, the processing module 1720 issues a first prompt message. The first prompt message is used to indicate the distance existing after the single board is connected to the backboard.

[0151] In a possible scenario, when the object to be measured is a gap, the gap is used to indicate: the gap existing after the single board is connected to the backboard. After obtaining the distance of the object to be measured, the processing module 1720 obtains the historical distance of the object to be measured, and the historical distance is used to indicate the measured distance of the object to be measured. The processing module 1720 compares the distance and the historical distance. When the distance is greater than the historical distance, the processing module 1720 switches to other single boards.

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

[0153] When the distance measuring device implements the distance measuring method shown in any of the above-mentioned figures through software, the distance measuring device and its various units can also be software modules. The above-mentioned distance measuring method is implemented by calling the software module through a processor. The processor can 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.

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

[0155] When the distance measuring device is implemented by hardware, the hardware can be implemented by a processor or a 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 send data from the control circuit to other devices outside the chip. The control circuit is used to implement any possible implementation method in the above embodiments through a logic circuit or an execution code instruction. The beneficial effects can be found in the description of any aspect of the above embodiments, which will not be repeated here.

[0156] Alternatively, the chip includes a processor and a power supply circuit, the power supply circuit is used to power the processor, and the processor can be used to implement the distance measurement method in the aforementioned embodiment. Exemplarily, the power supply circuit can be located in the same chip as the processor, or in another chip outside the chip where the processor is located. The power supply circuit can include but is not limited to at least one of the following: a power supply subsystem, a power management chip, a power consumption management processor, or a power consumption management control circuit, etc.

[0157] 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 ROM (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 a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a computing device. Of course, the processor and the storage medium can also exist as discrete components in a network device or a terminal device.

[0158] 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, or can include a chip and other discrete devices.

[0159] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part 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 instruction is loaded and executed on a computer, the process or function described in the embodiment of the present application is executed in whole or in part. The computer may 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 may 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 may be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired or wireless means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, for example, a floppy disk, a hard disk, a tape; it may also be an optical medium, for example, a digital video disc (DVD); it may also be a semiconductor medium, for example, a solid state drive (SSD).

[0160] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope 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, the rate of the first signal transceiver receiving and sending signals 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.