Terminal distance measurement method and device, computer equipment and storage medium

By introducing a dynamic preamble code jump strategy in UWB ranging and switching different preamble codes, the problem of homofrequency interference in UWB ranging is solved, the ranging accuracy and efficiency are improved, and the stability and reliability of the system are enhanced.

CN120378822APending Publication Date: 2025-07-25XUANCHENG LUXSHARE PRECISION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510571254.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

UWB technology faces the problem of co-frequency interference in digital key applications, and traditional time-hopping schemes affect positioning efficiency and are difficult to meet actual needs.

Method used

The dynamic preamble code jump strategy based on the ultra-wideband protocol is adopted to avoid synchronous interference and improve ranging accuracy and efficiency by switching different preamble codes between multiple ranging requirements and periods.

Benefits of technology

It effectively solves the signal mutual interference problem caused by fixed preambles in UWB ranging, improves the ranging accuracy and system capacity, and improves the accuracy and anti-interference ability of terminal ranging.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120378822A_ABST
    Figure CN120378822A_ABST
Patent Text Reader

Abstract

The invention relates to a terminal distance measurement method and device, computer equipment and a storage medium. The method comprises the following steps: performing distance measurement interaction based on a distance measurement frame signal; wherein the ranging frame signal is generated based on a preset leader sequence code hopping strategy; the leader sequence code jumping strategy comprises the following steps: selecting a first leader sequence code from a leader sequence code set corresponding to the ultra-wideband protocol, and generating a ranging frame signal in the last ranging demand based on the first leader sequence code; selecting a second leader sequence code from a leader sequence code set corresponding to the ultra-wideband protocol in the ranging demand; the leader sequence code jumping strategy further comprises the following steps: in the distance measurement demand, selecting a third leader sequence code from a leader sequence code set corresponding to the ultra-wideband protocol, and generating a distance measurement frame signal in the previous distance measurement period based on the third leader sequence code; and selecting a fourth leader sequence code from a leader sequence code set corresponding to the ultra-wideband protocol. The method can improve the ranging efficiency of the terminal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a method and device for terminal ranging, a computer device, a storage medium, and a computer program product. Background Art

[0002] With the development of UWB (Ultra-Wideband) technology, mobile phones have fully supported this technology. Nowadays, as digital keys, mobile phones are gradually replacing traditional physical keys, and this trend is irresistible. With the increasing popularity of UWB technology on mobile phones, the UWB precise positioning system is expected to completely replace the BLE (Bluetooth Low Energy) rough positioning system.

[0003] However, when UWB technology is applied as a digital key, it inevitably faces the problem of co-frequency interference. In addition, since UWB belongs to broadband technology, it is difficult to implement common narrowband frequency hopping schemes. Therefore, the prior art usually adopts a time hopping scheme to partially modify the time of UWB transmission to avoid co-frequency interference. However, this time hopping scheme affects the positioning efficiency to a certain extent and is difficult to meet the actual requirements. Summary of the Invention

[0004] In some embodiments of the present invention, a method and device for terminal ranging, a computer device, a computer-readable storage medium, and a computer program product are provided to solve the problem of co-frequency interference.

[0005] In a first aspect, the present application provides a method for terminal ranging. The method includes:

[0006] Performing ranging interaction based on a ranging frame signal; wherein, the ranging frame signal is generated based on a preset preamble code hopping strategy;

[0007] When the preamble code hopping strategy is applied between multiple ranging requirements, the preamble code hopping strategy includes:

[0008] Selecting a first preamble code from a set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging requirement is generated based on the first preamble code;

[0009] In this ranging requirement, selecting a second preamble code from the set of preamble codes corresponding to the ultra-wideband protocol; wherein, the second preamble code is different from the first preamble code, and the ranging frame signal in the current ranging requirement is generated based on the second preamble code.

[0010] In one embodiment, when the preamble code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the preamble code hopping strategy further includes:

[0011] In this ranging requirement, a third preamble code is selected from the set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging period is generated based on the third preamble code;

[0012] A fourth preamble code is selected from the set of preamble codes corresponding to the ultra-wideband protocol, where the fourth preamble code is different from the third preamble code, and the ranging frame signal in the current ranging period is generated based on the fourth preamble code.

[0013] In one embodiment, the method is applied to a first terminal, and the ranging frame signal includes a ranging initial frame signal, a ranging response frame signal, and a ranging end frame signal; the interaction based on the ranging frame signal includes:

[0014] After detecting the ranging initial frame signal sent by the second terminal, a ranging response frame signal is sent based on the ranging initial frame signal for the second terminal to send a ranging end frame signal.

[0015] In one embodiment, when the preamble code hopping strategy is applied between multiple ranging periods of the same ranging requirement, the preamble code hopping strategy further includes:

[0016] Determine whether there is co-channel interference. If there is co-channel interference, the ranging frame signal in the current period is generated based on the fourth preamble code;

[0017] If there is no co-channel interference, the ranging frame signal in the current period is generated based on the third preamble code.

[0018] In one embodiment, the method further includes:

[0019] If the ranging initial frame signal sent by the second terminal is not received, or the ranging end frame signal sent by the second terminal is not received, or the second terminal does not receive the ranging response frame signal, it is determined that there is co-channel interference.

[0020] In one embodiment, the method is applied to a first terminal. When the preamble code hopping strategy is applied between multiple ranging requirements, the ranging interaction based on the ranging frame signal includes:

[0021] Compare the ranging frame signal with the preamble code corresponding to the ranging frame signal of the current ranging requirement in the preset preamble code hopping strategy;

[0022] If the similarity is greater than the preset threshold, perform ranging interaction based on the ranging frame signal sent by the second terminal;

[0023] When the leading sequence code hopping strategy is applied between multiple ranging cycles with the same ranging requirement, the ranging interaction based on the ranging frame signal includes:

[0024] Compare the ranging frame signal with the leading sequence code corresponding to the ranging frame signal in the current ranging cycle in the preset leading sequence code hopping strategy;

[0025] When the similarity is greater than the preset threshold, perform ranging interaction based on the ranging frame signal sent by the second terminal.

[0026] In one embodiment, within one ranging requirement, there are multiple ranging cycles, and each ranging cycle includes multiple time slices; when the leading sequence code hopping strategy is applied between multiple ranging cycles with the same ranging requirement, the leading sequence code hopping strategy includes:

[0027] In the previous ranging cycle, the ranging frame signal is transmitted in the first time slice;

[0028] In the current ranging cycle, the ranging frame signal is transmitted in the second time slice, and the second time slice is different from the first time slice in terms of the moment within the corresponding ranging cycle.

[0029] In one embodiment, after determining whether there is co-frequency interference, it further includes:

[0030] If the ranging initial frame signal sent by the second terminal is not received, or the ranging end frame signal sent by the second terminal is not received, then generate a co-frequency interference monitoring result;

[0031] Transmit the co-frequency interference monitoring result to the second terminal using a low-power Bluetooth signal.

[0032] In one embodiment, the ranging frame signal is generated based on a preset leading sequence code hopping strategy, including: generating a synchronization symbol and a frame start delimiter based on the preset leading sequence code hopping strategy, and generating a ranging frame signal based on the synchronization symbol and the frame start delimiter.

[0033] In a second aspect, the present application also provides a terminal ranging device. The device includes:

[0034] A ranging interaction module, configured to perform ranging interaction based on a ranging frame signal; wherein, the ranging frame signal is generated based on a preset leading sequence code hopping strategy;

[0035] A strategy storage module, configured to store a leading sequence code hopping strategy; wherein, when the leading sequence code hopping strategy is applied between multiple ranging requirements, the leading sequence code hopping strategy includes:

[0036] Select a first preamble code from the set of preamble codes corresponding to the ultra-wideband protocol. The ranging frame signal in the previous ranging requirement is generated based on the first preamble code.

[0037] In this ranging requirement, select a second preamble code from the set of preamble codes corresponding to the ultra-wideband protocol. Wherein, the second preamble code is different from the first preamble code, and the ranging frame signal in the current ranging requirement is generated based on the second preamble code.

[0038] In one embodiment, when the preamble code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the preamble code hopping strategy includes:

[0039] In this ranging requirement, select a third preamble code from the set of preamble codes corresponding to the ultra-wideband protocol. The ranging frame signal in the previous ranging cycle is generated based on the third preamble code.

[0040] Select a fourth preamble code from the set of preamble codes corresponding to the ultra-wideband protocol. Wherein, the fourth preamble code is different from the third preamble code, and the ranging frame signal in the current ranging cycle is generated based on the fourth preamble code.

[0041] In one embodiment, the ranging interaction module includes a signal transceiver module and a processor. The signal transceiver module is used to receive and transmit ranging signals. The processor is used to select a second preamble code based on the preamble code hopping strategy stored in the strategy storage module and generate a ranging frame signal. The processor is also used to determine the target distance based on the received signal.

[0042] In one embodiment, the signal transceiver module includes an ultra-wideband signal receiver and a transmitter. The strategy storage module includes at least one of the following: embedded flash memory, memory card, flash drive, storage chip, hard disk, cloud storage server.

[0043] In one embodiment, the strategy storage module is further used to store the preamble codes selected for historical ranging interactions and the preamble codes selected for the current ranging requirement.

[0044] In a third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the terminal ranging method according to any one of the embodiments of the present disclosure.

[0045] Fourthly, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the terminal ranging method as described in any one of the embodiments of the present disclosure is implemented.

[0046] Fifthly, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the terminal ranging method as described in any one of the embodiments of the present disclosure is implemented.

[0047] The above terminal ranging method, device, computer device, storage medium and computer program product propose a dynamic preamble code hopping strategy based on the ultra-wideband protocol for the generation and interaction control of ranging frame signals. Between multiple independent ranging requirements, different preamble codes (such as the first and second sequence codes) are switched each time. This solution effectively solves the problem of signal interference caused by fixed preambles in traditional ultra-wideband ranging by introducing a dynamic hopping strategy for preamble codes. At the technical level, it utilizes the preamble code set resources predefined by the protocol and avoids preamble code conflicts in a multi-device environment through the switching of preamble codes across ranging requirements. While maintaining protocol compatibility, this strategy significantly improves the ranging accuracy and system capacity in high-density deployment scenarios. This strategy selects different preamble codes between different ranging requirements to ensure that each ranging signal is generated based on a different sequence code, thereby improving ranging accuracy and reliability. It improves the overall performance and anti-interference ability of terminal ranging, and further improves the accuracy and efficiency of terminal ranging. Description of the Drawings

[0048] Figure 1 It is the first process schematic diagram of the terminal ranging method in an embodiment;

[0049] Figure 2 It is the second process schematic diagram of the terminal ranging method in an embodiment;

[0050] Figure 3 It is the first schematic diagram of signal composition and code hopping in an embodiment;

[0051] Figure 4 It is the process schematic diagram of generating a ranging frame signal in an embodiment;

[0052] Figure 5 It is the second schematic diagram of signal composition and code hopping in an embodiment;

[0053] Figure 6 It is the process schematic diagram of signal interaction in an embodiment;

[0054] Figure 7 It is the process schematic diagram of time slice transmission in an embodiment;

[0055] Figure 8 The third schematic diagram of signal composition and hopping code in an embodiment;

[0056] Figure 9 The fourth schematic diagram of signal composition and hopping code in an embodiment;

[0057] Figure 10 The schematic flow diagram of low - power Bluetooth signal synchronization in an embodiment;

[0058] Figure 11 The application scenario diagram of the terminal ranging method in an embodiment;

[0059] Figure 12 The first schematic flow diagram of the implementation of the terminal ranging method in an embodiment;

[0060] Figure 13 The second schematic flow diagram of the implementation of the terminal ranging method in an embodiment;

[0061] Figure 14 The structural block diagram of the terminal ranging device in an embodiment;

[0062] Figure 15 The internal structure diagram of a computer device in an embodiment. Detailed implementation manners

[0063] In order to make the purpose, technical solutions and advantages of this application more clear and understandable, the following further details this application in combination with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not used to limit this application.

[0064] In one embodiment, as Figure 1 shown, a terminal ranging method is provided. In this embodiment, this method is exemplified by being applied to a terminal. It can be understood that this method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:

[0065] Step S100, perform ranging interaction based on the ranging frame signal; wherein, the ranging frame signal is generated based on a preset preamble code hopping strategy.

[0066] In an exemplary embodiment, the ranging frame signal may include an ultra-wideband signal, etc. It can be understood that the ultra-wideband signal may be composed of five parts: SYNC (Synchronization), SFD (Frame Start Delimiter), STS (Secure Timestamp), PHR (Physical Layer Header), and PSDU (Physical Layer Service Data Unit); among them, SYNC and SFD are necessary parts, and these two parts are composed of a preamble sequence code. Therefore, the ranging frame signal is generated based on a preset preamble sequence code hopping strategy, including that the SYNC and SFD of the ranging frame signal are generated based on a preset preamble sequence code hopping strategy. While STS, PHR, and PSDU are optional parts, etc.; in the actual use process, the frame format of the ultra-wideband signal usually may include the following several types: "SYNC-SFD-PHR-PSDU", "SYNC-SFD-STS-PHR-PSDU", "SYNC-SFD-PHR-PSDU-STS", "SYNC-SFD-STS", etc.

[0067] In an exemplary embodiment, the terminal ranging method may be applied to distance detection between two terminals, etc. Specifically, the first terminal may include an automotive terminal or a mobile phone terminal, etc.; the second terminal may include a mobile phone terminal or an automotive terminal, etc. The mobile phone terminal sends a ranging signal to the automotive terminal and conducts interactions, so as to obtain the distance between the mobile phone terminal and the automotive terminal, and further determine the position of the vehicle, etc.

[0068] When the preamble sequence code hopping strategy is applied between multiple ranging requirements, the preamble sequence code hopping strategy includes:

[0069] Step S200: Select a first preamble sequence code from the set of preamble sequence codes corresponding to the ultra-wideband protocol. The ranging frame signal in the previous ranging requirement is generated based on the first preamble sequence code.

[0070] In an exemplary embodiment, the ultra-wideband protocol may include protocols for interactions between terminals, etc.; for example, the terminals may include an automotive terminal and a mobile phone terminal, then the ultra-wideband protocol may include digital key protocols (such as CCC Digital Key 2.0, CCC Digital Key 3.0 standards), etc.; among them, the ultra-wideband protocol may be associated with the set of preamble sequence codes, etc.; the preamble sequence code may be used to construct the signal identifier of the transmitted signal, etc.

[0071] In an exemplary embodiment, the selecting a first preamble sequence code from the set of preamble sequence codes corresponding to the ultra-wideband protocol may include determining the ranging frame signal of the previous ranging requirement and determining the first preamble sequence code from the ranging frame signal. Here, it can be understood that the SYNC part and the SFD part in the ranging frame signal may be composed of N repeated preamble sequence codes. Therefore, a preamble sequence code can be randomly obtained from the ranging frame signal, which is the first preamble sequence code, etc.

[0072] In an exemplary embodiment, the preamble code in the set of preamble codes may be composed of ternary codes of a certain length, etc.; the length may include 31, 91, 127, etc.; the preamble codes in the set of preamble codes may all be orthogonal sequence codes, etc., the autocorrelation coefficient of the preamble code is relatively large, and the cross-correlation coefficient is approximately equal to zero, etc.

[0073] Step S300, in this ranging requirement, select a second preamble code from the set of preamble codes corresponding to the ultra-wideband protocol; wherein, the second preamble code is different from the first preamble code, and the ranging frame signal in the current ranging requirement is generated based on the second preamble code.

[0074] In an exemplary embodiment, the selection of the second preamble code may include determining it using a preset rule, or determining the second preamble code by means of interaction before each terminal ranging, etc.; specifically, determining the second preamble code using a preset rule may include the second preamble code corresponding to the first preamble code, etc.; for example, "sequence 1 corresponds to sequence 2", "sequence 2 corresponds to sequence 3", etc.; that is, when the first preamble code is "sequence 1", the second preamble code is "sequence 2"; when the first preamble code is "sequence 2", the second preamble code is "sequence 3", etc.; determining the second preamble code by means of interaction before each terminal ranging may include that before ranging, the first terminal and the second terminal interact, negotiate to determine the second preamble code, and in each period of this ranging requirement, this second preamble code is used.

[0075] In an exemplary embodiment, as Figure 2 shown, when the preamble code hopping strategy is applied between multiple ranging periods of the same ranging requirement, the preamble code hopping strategy includes:

[0076] Step S400, in this ranging requirement, select a third preamble code from the set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging period is generated based on the third preamble code.

[0077] In an exemplary embodiment, the determination of the third preamble code may include obtaining and determining the ranging frame signal in the previous ranging period, and determining the third preamble code from the ranging frame signal. Here, it can be understood that the SYNC part and the SFD part in the ranging frame signal may be composed of N repeated preamble codes. Therefore, a preamble code can be randomly obtained from the ranging frame signal, which is the third preamble code, etc.

[0078] Step S500: Select a fourth preamble code from the set of preamble codes corresponding to the ultra-wideband protocol. The fourth preamble code is different from the third preamble code, and the ranging frame signal in the current ranging period is generated based on the fourth preamble code.

[0079] In an exemplary embodiment, the acquisition of the fourth preamble code may include randomly obtaining a preamble code from the set of preamble codes and determining the obtained preamble code as the fourth preamble code. It can be understood that in the case of ranging among multiple terminals (for example, there are multiple mobile terminals corresponding to different vehicles), the same preamble code may still be selected due to random selection (or different selection strategies), resulting in co-frequency interference. Therefore, the fourth preamble code is determined once in each period. If co-frequency interference occurs in a period, the preamble code is changed in the next period, which can reduce the probability of co-frequency interference.

[0080] In an exemplary embodiment, the set of preamble codes may include the mandatory preamble codes carried in the ultra-wideband protocol, as well as optional preamble codes.

[0081] In an exemplary embodiment, the ranging frame signal generated based on the fourth preamble code may be as Figure 3 shown. Specifically, each ranging period may include multiple time slices. Assuming that the ranging interaction is selected to be carried out in time slice 0, a fourth preamble code is randomly selected in each period, and the preamble code of time slice 0 is scrambled to the fourth preamble code.

[0082] In the above terminal ranging method, a dynamic preamble code hopping strategy based on the ultra-wideband protocol is proposed for the generation and interaction control of ranging frame signals. Between multiple independent ranging requirements, different preamble codes (such as the first and second codes) are switched each time; within the consecutive ranging cycles of the same ranging requirement, different preamble codes (such as the third and fourth codes) can also be used in each cycle to ensure the uniqueness of the preamble codes in adjacent ranging processes through a two-way dynamic switching mechanism. By introducing the dynamic hopping strategy of the preamble code, this scheme effectively solves the problem of signal interference caused by fixed preamble codes in traditional ultra-wideband ranging. At the technical level, it utilizes the pre-defined preamble code set resources of the protocol and, through dual codeword switching across ranging requirements and cycle levels, not only avoids preamble code conflicts in a multi-device environment but also suppresses the accumulation of ranging errors caused by multipath effects. While maintaining protocol compatibility, this strategy significantly improves the ranging accuracy and system capacity in high-density deployment scenarios. This strategy selects different preamble codes between different ranging requirements to ensure that each ranging signal is generated based on a different code, thereby improving ranging accuracy and reliability. In multiple ranging cycles of the same ranging requirement, using different preamble codes further enhances the signal discrimination, reduces the possibility of interference and misjudgment, improves the overall performance and anti-interference ability of terminal ranging, and further improves the accuracy and efficiency of terminal ranging.

[0083] In one embodiment, the method is applied to a first terminal, and the ranging frame signal includes a ranging initial frame signal, a ranging response frame signal, and a ranging end frame signal; the interaction based on the ranging frame signal includes:

[0084] After detecting the ranging initial frame signal sent by the second terminal, a ranging response frame signal is sent based on the ranging initial frame signal for the second terminal to send a ranging end frame signal.

[0085] In an exemplary embodiment, the ranging frame signal may include a ranging initial frame signal sent by the second terminal to the first terminal, a ranging response frame signal replied by the first terminal to the second terminal, and a ranging end frame signal sent by the second terminal to the first terminal, etc. In an exemplary embodiment, the first terminal may include an automotive terminal; the second terminal may include a mobile phone terminal. The automotive terminal may include multiple anchors. Specifically, the UWB positioning system of the digital key may be composed of multiple anchors on the mobile phone terminal and the vehicle terminal. The specific use may include that the mobile phone terminal initiates a ranging initial frame, multiple anchors on the vehicle terminal reply with response frames in sequence, and the mobile phone terminal sends a ranging end frame, thereby implementing a bilateral two-way ranging method. After obtaining the relative distances between multiple anchors on the vehicle terminal and the mobile phone, the coordinate position of the mobile phone relative to the vehicle can be calculated through a three-point positioning algorithm to achieve the positioning effect, etc.

[0086] In this embodiment, the ranging process is initiated by the second terminal, and in combination with the response of the first terminal, high-precision two-way ranging is achieved. This method utilizes the high-precision characteristics of UWB technology, significantly improving the accuracy and stability of positioning. As the initiator of ranging, the second terminal first sends a ranging initial frame signal to the first terminal. After receiving this signal, the first terminal replies with a ranging response frame signal. After the second terminal receives all the ranging response frame signals from the first terminal, it then sends a ranging end frame signal, marking the end of a complete ranging process, thus achieving high-precision and high-efficiency ranging. Through the interaction of the ranging initial frame signal, the ranging response frame signal, and the ranging end frame signal, the integrity and accuracy of the ranging process are ensured. This method not only improves the ranging accuracy but also enhances the stability and reliability of the system through two-way ranging.

[0087] In one embodiment, as Figure 4 shown, when the preamble code hopping strategy is applied between multiple ranging cycles for the same ranging requirement, the preamble code hopping strategy further includes:

[0088] Step S401, determine whether there is co-frequency interference. In the case of co-frequency interference, the ranging frame signal in the current cycle is generated based on the fourth preamble code.

[0089] Step S402, in the case of no co-frequency interference, the ranging frame signal in the current cycle is generated based on the third preamble code.

[0090] In an exemplary embodiment, determining whether there is co-frequency interference can be based on multiple factors. For example, the signal strength and signal frequency distribution in the current communication environment can be detected to determine whether there is interference caused by using the same preamble code as other terminals. If other signals with the same preamble code are detected and the signal strength reaches a preset interference threshold, it can be determined that there is co-frequency interference. In the case of determining the existence of co-frequency interference, in order to avoid the interference affecting the ranging accuracy and communication stability, the system will choose to use a new preamble code, that is, the fourth preamble code, to generate the ranging frame signal in the current cycle. This can ensure that in the current ranging cycle, this terminal uses a different preamble code from other potentially interfering terminals, thereby reducing or avoiding the impact of co-frequency interference. On the contrary, if it is determined that there is no co-frequency interference, that is, the current communication environment is relatively clean and no potential interference caused by using the same preamble code as other terminals is detected, the system can continue to use the preamble code in the previous ranging cycle, that is, the third preamble code, to generate the ranging frame signal in the current cycle. This can maintain the continuity and stability of the ranging signal, while reducing unnecessary preamble code replacement, improving the ranging efficiency and accuracy, etc.

[0091] In an exemplary embodiment, when it is necessary to select a preamble code to generate a ranging response frame signal, the ranging response frame signal corresponding to the third preamble code used in the previous cycle can be generated and sent to the first terminal. If interference occurs, a fourth preamble code is generated, and a new ranging response frame signal is generated using the fourth preamble code, and so on.

[0092] In an exemplary embodiment, the preamble code hopping strategy can be implemented as shown in Figure 5 the schematic diagram described. Specifically, no interference occurs in cycle N, so no code hopping is performed, that is, the third preamble code is used to generate a ranging frame signal; interference occurs in cycle N+1, so code hopping is performed in cycle N+2, that is, the fourth preamble code is used to generate a ranging frame signal, and so on.

[0093] In this embodiment, by determining whether there is co-channel interference, the preamble code on which the ranging frame signal in the current cycle is based is flexibly selected. In the case of co-channel interference, a new preamble code (the fourth preamble code) is used to generate a ranging frame signal to avoid interference and ensure the accuracy of ranging and the stability of communication. In the case of no co-channel interference, the preamble code of the previous cycle (the third preamble code) is continued to be used to maintain the continuity and stability of the ranging signal, while reducing unnecessary preamble code replacement, improving the ranging efficiency and accuracy. This strategy not only improves the flexibility and adaptability of ranging, but also further enhances the stability and reliability of the system.

[0094] In one embodiment, the method further includes:

[0095] When the ranging initial frame signal sent by the second terminal is not received, or the ranging end frame signal sent by the second terminal is not received, or the second terminal does not receive the ranging response frame signal, it is determined that there is co-channel interference.

[0096] In an exemplary embodiment, when the ranging initial frame signal sent by the second terminal is not received, or the ranging end frame signal sent by the second terminal is not received, or the second terminal does not receive the ranging response frame signal, it is determined that there is co-channel interference, and so on. It can be understood that if co-channel interference occurs, the first terminal or the second terminal cannot obtain the signal sent by the corresponding second terminal or the first terminal. Therefore, when the ranging initial frame signal sent by the second terminal is not received, or the ranging end frame signal sent by the second terminal is not received, or the second terminal does not receive the ranging response frame signal, it is determined that there is co-channel interference, and so on.

[0097] In this embodiment, when the second terminal fails to receive the ranging response frame signal from the first terminal, or the first terminal fails to receive the ranging initial frame signal or the ranging end frame signal from the second terminal, it is considered that there is co-frequency interference. In this way, it is possible to quickly and accurately determine whether there is co-frequency interference, so as to quickly respond to co-frequency interference to improve the efficiency and accuracy of ranging.

[0098] In one embodiment, as Figure 6 shown, when the method is applied to a first terminal and the preamble code hopping strategy is applied between multiple ranging requirements, the ranging interaction based on the ranging frame signal includes:

[0099] Step S111, comparing the ranging frame signal with the preamble code corresponding to the ranging frame signal of the current ranging requirement in the preset preamble code hopping strategy.

[0100] Step S112, when the similarity is greater than a preset threshold, perform ranging interaction based on the ranging frame signal sent by the second terminal.

[0101] In an exemplary embodiment, after the first terminal receives the ranging initial frame signal sent by the second terminal, it can use the corresponding preamble code to compare with the ranging initial frame signal. Only when the correlation coefficient is greater than the preset threshold, it will be considered that the ranging initial frame signal sent by the second terminal is received. In this way, it can be avoided that due to receiving a signal sent by a non-corresponding second terminal, the ranging response frame signal starts to be generated, thus increasing the working pressure of the first terminal, etc. Specifically, in the ranging interaction process, the transmitter sends signals according to the frame format. After the receiver receives the signals, it needs to calculate the correlation coefficient between the received signals and the preamble codes negotiated in advance by both parties. If a relatively large correlation coefficient is obtained, it is considered that the preamble codes negotiated in advance are received, and then the SYNC and SFD parts are further parsed, and then the subsequent STS, PHR, and PSDU parts can be parsed; among them, the SYNC and SFD parts are the preamble code parts, and the information carried can be parsed out from SYS, PHR, and PSDU. According to this information, the distance value between the first terminal and the second terminal can be calculated, etc.

[0102] When the preamble code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the ranging interaction based on the ranging frame signal includes:

[0103] Step S113, comparing the ranging frame signal with the preamble code corresponding to the ranging frame signal of the current ranging cycle in the preset preamble code hopping strategy.

[0104] Step S114, when the similarity is greater than a preset threshold, perform ranging interaction based on the ranging frame signal sent by the second terminal.

[0105] In an exemplary embodiment, after the first terminal receives the ranging response frame signal or the ranging end frame signal sent by the second terminal, similarly, the corresponding preamble sequence code can be used to compare with the received ranging response frame signal or the ranging end frame signal. If the correlation coefficient is greater than a preset threshold, it is confirmed that a valid ranging response frame signal or ranging end frame signal sent by the second terminal has been received. This comparison mechanism ensures the accuracy and effectiveness of the signal during the ranging process, and avoids ranging errors caused by erroneously receiving non-corresponding signals. In this way, the reliability and accuracy of the ranging process can be further enhanced, and the overall performance of terminal ranging can be improved. During specific implementation, the size of the preset threshold can be adjusted according to actual needs to balance the accuracy of ranging and the flexibility of the system.

[0106] In this embodiment, through the comparison mechanism of the preset preamble sequence code, the effectiveness and accuracy of the ranging frame signal are ensured. At the initial stage of ranging, after the first terminal receives the ranging initial frame signal sent by the second terminal, the comparison of the preamble sequence code will be carried out. Only when the matching degree of the preamble sequence code of the received ranging initial frame signal with the preamble sequence code required by the current ranging in the preset preamble sequence code hopping strategy is higher than the preset threshold, will the first terminal confirm that a valid ranging initial frame signal has been received and send a ranging response frame signal accordingly. Similarly, at the end stage of ranging, after the first terminal receives the ranging end frame signal sent by the second terminal, the comparison of the preamble sequence code will also be carried out to ensure the effectiveness of the ranging end frame signal. This comparison mechanism not only improves the accuracy of ranging, but also effectively avoids ranging errors caused by erroneously receiving non-corresponding signals, thereby enhancing the reliability and stability of the ranging process. During specific implementation, the size of the preset threshold can be flexibly adjusted according to the actual scenario and requirements to achieve the best ranging effect and system performance.

[0107] In one embodiment, as Figure 7 shown, within one ranging requirement, it includes multiple ranging cycles, and each ranging cycle includes multiple time slices; when the preamble sequence code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the preamble sequence code hopping strategy includes:

[0108] Step S601, within the previous ranging cycle, the ranging frame signal is transmitted in the first time slice.

[0109] Step S602, within the current ranging cycle, the ranging frame signal is transmitted in the second time slice, and the second time slice is at a different moment within the corresponding ranging cycle from the first time slice.

[0110] In an exemplary embodiment, as Figure 8As shown, there may be multiple time slices within a ranging period. In period N, the preamble code of time slice 0 is hopped to x; in period N+1, the preamble code of time slice 1 is hopped to y; in period N+2, the preamble code of time slice 2 is hopped to z, etc. That is, in period N, the preamble code x is selected and ranging interaction is performed with time slice 0 to generate a ranging frame signal; in period N+1, the preamble code y is selected and ranging interaction is performed with time slice 1 to generate a ranging frame signal; in period N+2, the preamble code z is selected and ranging interaction is performed with time slice 2 to generate a ranging frame signal, etc.

[0111] In one exemplary embodiment, as Figure 9 shown, when there is no interference in period N, no hopping occurs in period N and period N+1. When interference occurs in period N+1, one of the time slices is selected for hopping in period N+2. Specifically, when there is no interference in period N, the preamble code of the previous ranging requirement (i.e., the third preamble code) can be used in period N and period N+1 for ranging interaction with the corresponding time slice of the previous ranging requirement to generate a ranging frame signal; when co-frequency interference occurs in period N+1, in period N+2, a preamble code that is not the preamble code of the previous ranging requirement (i.e., the fourth preamble code) can be selected from the preamble code set, and (using a random method or a preset strategy, etc.) one of the time slices is selected for ranging interaction to generate a ranging frame signal, etc.

[0112] In this embodiment, ranging frame signals are transmitted in different time slices within different ranging periods, and the preamble codes are flexibly selected for hopping to cope with possible co-frequency interference. In the previous ranging period, the ranging frame signal is transmitted in the first time slice, ensuring that in the current ranging period, the ranging frame signal can be transmitted in different time slices, thereby reducing the possibility of conflict with the ranging signals of other terminals in the same time slice. This time slice allocation strategy not only improves the transmission efficiency of the ranging signal but also enhances the anti-interference ability of the system. In the current ranging period, the ranging frame signal is transmitted in the second time slice, and the second time slice is at a different moment within the corresponding ranging period from the first time slice. In this way, even if there is co-frequency interference in the current ranging period, since the ranging frame signal is transmitted in different time slices, interference can be effectively avoided, ensuring the accuracy and stability of ranging. In addition, when co-frequency interference occurs, the system will also select one of the time slices for hopping, that is, within one period, a new preamble code is used for ranging interaction with any time slice to generate a ranging frame signal. This hopping strategy not only further improves the anti-interference ability of the system but also makes the ranging signal more difficult to be predicted and interfered with, thus ensuring the safety and reliability of the ranging process. In specific implementation, the number of time slices and the hopping strategy can be flexibly adjusted according to actual needs to achieve the best ranging effect and system performance.

[0113] In one embodiment, the ranging frame signal is generated based on a preset preamble code hopping strategy, including: generating a sync symbol and a frame start delimiter based on the preset preamble code hopping strategy, and generating a ranging frame signal based on the sync symbol and the frame start delimiter.

[0114] In an exemplary embodiment, the ranging frame signal may include a ranging identifier and ranging data, etc.; the ranging identifier may include signals for identification, specifically, it may include SYNC (sync symbol), SFD (frame start delimiter), STS (secure timestamp), etc.; the ranging data may include PHR (physical layer header) and PSDU (physical layer service data unit), etc.; in actual use, the ranging initial frame may have the following composition formats: {SYNC, SFD, PHR, PSDU}, {SYNC, SFD, STS, PHR, PSDU}, {SYNC, SFD, PHR, PSDU, STS}, {SYNC, SFD, STS}, etc.

[0115] In an exemplary embodiment, after the first terminal receives the ranging initial frame, it can identify the SYNC and SFD in the ranging initial frame to obtain the preamble code, and calculate the correlation coefficient between the preamble code in the ranging initial frame and the pre-negotiated preamble code, so as to determine whether it is the ranging initial frame sent by the corresponding second terminal according to the correlation coefficient. In the case of determining that it is the ranging initial frame signal sent by the corresponding second terminal, the SYNC and SFD can be parsed out from the ranging initial frame, and further the STS, PHR, and PSDU can be parsed out for ranging, etc.

[0116] In one embodiment, as Figure 10 shown, after determining whether there is co-channel interference, it further includes:

[0117] Step S611, if the ranging initial frame signal sent by the second terminal is not received, or the ranging end frame signal sent by the second terminal is not received, a co-channel interference monitoring result is generated.

[0118] Step S612, transmitting the co-channel interference monitoring result to the second terminal using a low-power Bluetooth signal.

[0119] In an exemplary embodiment, the low-power Bluetooth signal may include transmission via broadcast channels or data channels in Bluetooth Low Energy (BLE) technology, etc. Specifically, when the second terminal sends a ranging frame signal, it can simultaneously generate a low-power Bluetooth signal indicating whether the ranging frame signal is received using BLE and send it to the first terminal. In the case where the first terminal does not receive the ranging frame signal from the second terminal within a preset period, the first terminal can generate a low-power Bluetooth signal indicating that the ranging frame signal is not received using BLE and send it to the second terminal; it can be understood that in the case of co-channel interference, the first terminal cannot receive the ranging frame signal sent by the second terminal. Therefore, if the first terminal does not receive the ranging frame signal within the preset period, it can be considered that co-channel interference has occurred in the ranging frame signal, etc. By using BLE with a faster speed for interaction, the second terminal can learn earlier that co-channel interference has occurred in the ranging frame signal, and thus regenerate and send a ranging frame signal, etc. Specifically, during the ranging process between the first terminal and the second terminal, BLE can be used for synchronous interaction each time to speed up the detection of co-channel interference and thereby improve the ranging speed, etc.

[0120] In an exemplary embodiment, real-time synchronization can be achieved using low-power Bluetooth signals. After interference occurs, the first terminal generates a co-channel interference monitoring result and transmits this result to the second terminal in real time via low-power Bluetooth signals. The use of low-power Bluetooth signals ensures that the co-channel interference monitoring result can be quickly and accurately conveyed to the second terminal. After receiving the co-channel interference monitoring result, the second terminal can immediately take corresponding countermeasures, such as adjusting its own ranging strategy or selecting a new preamble code, to avoid or mitigate the impact of co-channel interference. This real-time interference monitoring and result transmission mechanism significantly improves the flexibility and adaptability of the ranging process, enabling the system to maintain a high degree of stability and reliability in a complex and changing communication environment. In addition, synchronizing and transmitting results via low-power Bluetooth signals also simplifies the system architecture and reduces hardware costs, etc.

[0121] In an exemplary embodiment, in the case where the ranging response frame signal sent by the second terminal is not received, a co-channel interference monitoring result is also generated and transmitted to the second terminal in real time using low-power Bluetooth signals. In this way, it can be ensured that when the first terminal fails to receive the ranging response frame signal normally, the second terminal can also promptly learn about the possible co-channel interference situation and thus take corresponding measures to deal with it. This comprehensive interference monitoring and result transmission mechanism further enhances the stability and reliability of the ranging system, improving the accuracy and efficiency of ranging. In specific implementation, the generation conditions and transmission methods of the co-channel interference monitoring result can be flexibly adjusted according to actual needs to achieve the best ranging effect and system performance.

[0122] In an exemplary embodiment, when ranging signals are interacted between two terminals, low-power Bluetooth signals can be synchronously used to send signals. If no ranging signal is received within a preset time period after receiving the low-power Bluetooth signal, it is considered that co-frequency interference has occurred, and the low-power Bluetooth signal is used to interact with the corresponding sending terminal to quickly eliminate the interference, etc.

[0123] In this embodiment, by using low-power Bluetooth signals to transmit the co-frequency interference monitoring results, real-time synchronization and information sharing between the first terminal and the second terminal are achieved. This mechanism not only improves the flexibility and adaptability of the ranging system, but also ensures that the system can maintain a high degree of stability and reliability in a complex and changing communication environment.

[0124] In an exemplary embodiment, the terminal ranging method can be applied to a Figure 11 scene graph as shown. It includes multiple vehicle terminals (solid dots) and a mobile phone terminal (hollow dot). The dashed lines represent the distances between the mobile phone terminal and each anchor point of the vehicle terminal. The terminal ranging method can communicate between the mobile phone terminal and multiple vehicle terminals to obtain the distances between the anchor points of multiple vehicle terminals and the mobile phone terminal, and use the three-point positioning method to calculate the coordinate position of the mobile phone terminal relative to the vehicle terminal, thereby realizing the positioning of the vehicle. Specifically, it can be implemented using a schematic diagram as shown in Figure 12 and specifically includes:

[0125] Step S901, the mobile phone terminal initiates a ranging request and sends a ranging initial frame; wherein, the ranging initial frame may include a sequence selection strategy.

[0126] Step S902, after each vehicle terminal receives the signal, it identifies the received signal to determine whether it is the ranging initial frame sent by the mobile phone terminal; wherein, determining whether it is the ranging initial frame sent by the mobile phone terminal may include extracting a sequence to be detected from the received signal, comparing the sequence to be detected with a target sequence to obtain a similarity, and using the similarity to determine whether it is the ranging initial frame sent by the mobile phone terminal.

[0127] Step S903, after determining that the received signal is the ranging initial frame sent by the mobile phone terminal, obtain a preset set of preamble sequence codes; wherein, the set of preamble sequence codes may include the preamble sequence codes in the automotive link alliance key, and may also include some independently set preamble sequence codes, etc.; the automotive link alliance digital key may include standards such as CCC3.0.

[0128] Step S904: Select a target preamble code from the set of preamble codes, and generate a signal identifier based on the target preamble code; wherein, the target preamble code is different from the preamble code used in the previous ranging requirement; among them, the target preamble code can be obtained by using a selection strategy; the selection strategy can include being preset, or negotiated before each communication, or stored in the ranging initial frame sent by the mobile phone terminal, and the selection strategy can be obtained by parsing the ranging initial frame;

[0129] Step S905: The vehicle terminal generates a response frame by using the signal identifier and sends the response frame to the mobile phone terminal;

[0130] Step S906: After receiving the response frame, the mobile phone terminal sends a ranging end frame to each vehicle terminal; if the vehicle terminal does not receive the ranging end frame within a certain time, it reselects the target preamble code and the converted preamble code to avoid co-frequency interference.

[0131] In an exemplary embodiment, the terminal ranging method may be implemented as follows: Figure 13 Specifically, it includes the following steps:

[0132] Step S911: In response to the first signal sent by the second terminal, calculate the similarity coefficient between the first signal and the preamble code pre-negotiated by both terminals. If the similarity coefficient is greater than the preset threshold, it is considered that the received signal is the first signal sent by the corresponding second terminal, and further parse the data carried by the first signal.

[0133] Step S912: Generate the data to be returned by using the data carried by the parsed first signal.

[0134] Step S913: Select an initial preamble code from the set of preamble codes, and obtain a preset number of initial preamble codes to get a plurality of preamble codes.

[0135] Step S914: Generate a second signal based on the plurality of preamble codes and the data to be returned, and send the second signal to the second terminal; wherein, the second signal may include multiple cycles, the same preamble code is used within a single cycle, and the initial preamble code of each cycle is obtained through negotiation between the first terminal and the second terminal.

[0136] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are shown in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0137] Based on the same inventive concept, an embodiment of the present application further provides a terminal ranging device for implementing the above-mentioned terminal ranging method. The implementation solutions provided by this device to solve problems are similar to the implementation solutions described in the above method. Therefore, the specific limitations in one or more embodiments of the terminal ranging device provided below can refer to the limitations on the terminal ranging method in the above text, and will not be repeated here.

[0138] In one embodiment, as Figure 14 shown, a terminal ranging device 100 is provided, including: a ranging interaction module 101 and a policy storage module 102, where:

[0139] The ranging interaction module is used to perform ranging interaction based on a ranging frame signal; wherein, the ranging frame signal is generated based on a preset preamble code hopping strategy;

[0140] The policy storage module is used to store the preamble code hopping strategy; wherein, when the preamble code hopping strategy is applied between multiple ranging requirements, the preamble code hopping strategy includes:

[0141] Select a first preamble code from the set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging requirement is generated based on the first preamble code;

[0142] In this ranging requirement, select a second preamble code from the set of preamble codes corresponding to the ultra-wideband protocol; wherein, the second preamble code is different from the first preamble code, and the ranging frame signal in the current ranging requirement is generated based on the second preamble code.

[0143] In one of the embodiments, when the preamble code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the preamble code hopping strategy includes:

[0144] In this ranging requirement, a third preamble code is selected from the set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging period is generated based on the third preamble code.

[0145] A fourth preamble code is selected from the set of preamble codes corresponding to the ultra-wideband protocol, where the fourth preamble code is different from the third preamble code, and the ranging frame signal in the current ranging period is generated based on the fourth preamble code.

[0146] In one embodiment, the ranging interaction module includes a signal transceiver module and a processor; the signal transceiver module is used to receive and transmit ranging signals; the processor is used to select a second preamble code based on the preamble code hopping strategy stored in the policy storage module and generate a ranging frame signal; the processor is also used to determine the target distance based on the received signal.

[0147] In one embodiment, the signal transceiver module includes an ultra-wideband signal receiver and a transmitter; the policy storage module includes at least one of the following: embedded flash memory, memory card, flash drive, storage chip, hard disk, cloud storage server.

[0148] In one embodiment, the policy storage module is further used to store the preamble codes selected for historical ranging interactions and the preamble codes selected for the current ranging requirement.

[0149] In an exemplary embodiment, the signal transceiver module may adopt an ultra-wideband signal receiver and transmitter, etc., and perform ranging by sending and receiving ultra-wideband signals. Ultra-wideband technology can provide stable and reliable ranging services in complex environments. The transmitter generates a series of ultra-wideband signals that carry the information required for ranging. When these signals are captured by the receiver, the system will parse and process them to calculate the distance between the two terminals. The policy storage module may select a memory card. The memory card has the characteristics of large capacity, convenient reading and writing, etc., and can store a large amount of ranging policy information, such as signal processing methods at different frequencies. This enables the device to adapt to more variable ranging environments and improve the flexibility and accuracy of ranging. Specifically, the first terminal may include devices such as cars, and the second terminal may include mobile electronic devices, for example, smartphones, tablets, etc.; wherein, both the first terminal and the second terminal include a ranging interaction module and a policy storage module; during actual use, the second terminal may use an ultra-wideband signal transmitter to send a ranging initial frame to the first terminal; the first terminal may use an ultra-wideband signal receiver to receive the ranging initial frame sent by the second terminal, generate a reply response frame according to the preamble code hopping policy stored in the policy storage module, and use the ultra-wideband signal transmitter of the first terminal to send the reply response frame to the second terminal. After the second terminal receives the reply response frame sent by the first terminal using the ultra-wideband receiver, the second terminal may determine the distance between the first terminal and the second terminal based on the received reply response frame, and send a ranging end frame to the first terminal using the ultra-wideband transmitter to complete the ranging, etc.

[0150] In an exemplary embodiment, the processor may be used to perform various calculation tasks during ranging, such as calculating the distance, etc. It can also intelligently select the preamble code required for the next ranging period according to the preamble code hopping policy stored in the policy storage module to ensure the diversity and anti-interference of the ranging signal. In addition, the processor can monitor the working state of the ranging interaction module, detect and handle possible faults or abnormal conditions in a timely manner, thereby further improving the stability and reliability of the ranging system. During specific implementation, the processor may adopt a microprocessor or a digital signal processor (DSP), etc., to meet the requirements of the ranging system for calculation speed and accuracy, etc.

[0151] In an exemplary embodiment, the processor may calculate the distance between the two terminals according to the received ranging frame signal and reply response frame signal, and store the result in the memory of the device. The processor can also work in coordination with other modules, such as communicating with the ranging interaction module to obtain real-time ranging data; interacting with the policy storage module to obtain the latest preamble code hopping policy, etc. This mechanism of working in coordination enables the entire ranging device to complete the ranging task more efficiently and accurately and adapt to various complex communication environments.

[0152] In one embodiment, the method is applied to a first terminal, and the ranging frame signal includes a ranging initial frame signal, a ranging response frame signal, and a ranging end frame signal; the ranging interaction module is further configured to:

[0153] After detecting the ranging initial frame signal sent by the second terminal, send a ranging response frame signal based on the ranging initial frame signal for the second terminal to send a ranging end frame signal.

[0154] In one embodiment, when the preamble code hopping strategy is applied between multiple ranging cycles with the same ranging requirement, the preamble code hopping strategy further includes:

[0155] Determine whether there is co-channel interference. If there is co-channel interference, the ranging frame signal in the current cycle is generated based on the fourth preamble code;

[0156] If there is no co-channel interference, the ranging frame signal in the current cycle is generated based on the third preamble code.

[0157] In one embodiment, the device further includes:

[0158] An interference determination module, configured to determine that there is co-channel interference when the ranging initial frame signal sent by the second terminal is not received, or the ranging end frame signal sent by the second terminal is not received, or the second terminal does not receive the ranging response frame signal.

[0159] In one embodiment, when the preamble code hopping strategy is applied between multiple ranging requirements, the ranging interaction module includes:

[0160] A sequence code comparison sub-module, configured to compare the ranging frame signal with the preamble code corresponding to the ranging frame signal of the current ranging requirement in the preset preamble code hopping strategy;

[0161] An interaction sub-module, configured to perform ranging interaction based on the ranging frame signal sent by the second terminal when the similarity is greater than a preset threshold;

[0162] When the preamble code hopping strategy is applied between multiple ranging cycles with the same ranging requirement, the performing ranging interaction based on the ranging frame signal includes:

[0163] The sequence code comparison sub-module is further configured to compare the ranging frame signal with the preamble code corresponding to the ranging frame signal of the current ranging cycle in the preset preamble code hopping strategy;

[0164] The interaction sub-module is further configured to perform ranging interaction based on the ranging frame signal sent by the second terminal when the similarity is greater than a preset threshold.

[0165] In one embodiment, within a ranging requirement, there are multiple ranging cycles, and each ranging cycle includes multiple time slices; when the preamble code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the preamble code hopping strategy includes:

[0166] In the previous ranging cycle, the ranging frame signal is transmitted in the first time slice;

[0167] In the current ranging cycle, the ranging frame signal is transmitted in the second time slice, and the second time slice has a different time moment in the corresponding ranging cycle from the first time slice.

[0168] In one embodiment, the device further includes:

[0169] An interference determination module, configured to generate a co-frequency interference monitoring result when the ranging initial frame signal sent by the second terminal is not received, or when the ranging end frame signal sent by the second terminal is not received;

[0170] A result interaction module, configured to transmit the co-frequency interference monitoring result to the second terminal using a low-power Bluetooth signal.

[0171] Each module in the above terminal ranging device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or can be stored in the memory in the computer device in software form to facilitate the processor to call and execute the operations corresponding to the above respective modules.

[0172] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 15As shown in the figure. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store distance data. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements a method for measuring the distance of a terminal.

[0173] Those skilled in the art can understand that Figure 15 the structure shown in the figure is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0174] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0175] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0176] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.

[0177] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A terminal ranging method, characterized in that, The method includes: Performing ranging interaction based on a ranging frame signal; wherein, the ranging frame signal is generated based on a preset preamble code hopping strategy. When the preamble code hopping strategy is applied between multiple ranging requirements, the preamble code hopping strategy includes: Selecting a first preamble code from a set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging requirement is generated based on the first preamble code. In this ranging requirement, selecting a second preamble code from the set of preamble codes corresponding to the ultra-wideband protocol; wherein, the second preamble code is different from the first preamble code, and the ranging frame signal in the current ranging requirement is generated based on the second preamble code.

2. The method according to claim 1, characterized in that When the preamble code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the preamble code hopping strategy further includes: In this ranging requirement, selecting a third preamble code from the set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging cycle is generated based on the third preamble code. Selecting a fourth preamble code from the set of preamble codes corresponding to the ultra-wideband protocol, wherein, the fourth preamble code is different from the third preamble code, and the ranging frame signal in the current ranging cycle is generated based on the fourth preamble code.

3. The method according to claim 1, characterized in that The method is applied to a first terminal, and the ranging frame signal includes a ranging initial frame signal, a ranging response frame signal, and a ranging end frame signal; the performing ranging interaction based on the ranging frame signal includes: After detecting a ranging initial frame signal sent by a second terminal, sending a ranging response frame signal based on the ranging initial frame signal for the second terminal to send a ranging end frame signal.

4. The method according to claim 3, characterized in that, When the preamble code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the preamble code hopping strategy further includes: Judging whether there is co-frequency interference. In the case of co-frequency interference, the ranging frame signal in the current cycle is generated based on the fourth preamble code. In the case of no co-frequency interference, the ranging frame signal in the current cycle is generated based on the third preamble code.

5. The method according to claim 4, characterized in that, The method further includes: Determining that there is co-frequency interference when not receiving the ranging initial frame signal sent by the second terminal, or not receiving the ranging end frame signal sent by the second terminal, or the second terminal not receiving the ranging response frame signal.

6. The method according to any one of claims 1-5, characterized in that, The method is applied to a first terminal. When the preamble code hopping strategy is applied between multiple ranging requirements, the performing ranging interaction based on the ranging frame signal includes: Comparing the ranging frame signal with the preamble code corresponding to the ranging frame signal of the current ranging requirement in the preset preamble code hopping strategy. In the case that the similarity is greater than a preset threshold, performing ranging interaction based on the ranging frame signal sent by the second terminal. When the preamble code hopping strategy is applied between multiple ranging cycles of the same ranging requirement, the performing ranging interaction based on the ranging frame signal includes: Compare the ranging frame signal with the preamble code corresponding to the ranging frame signal in the current ranging period in the preset preamble code hopping strategy; In the case where the similarity is greater than a preset threshold, perform ranging interaction based on the ranging frame signal sent by the second terminal.

7. The method according to any one of claims 1-5, characterized in that Within one ranging requirement, multiple ranging periods are included, and each ranging period includes multiple time slices; in the case where the preamble code hopping strategy is applied between multiple ranging periods of the same ranging requirement, the preamble code hopping strategy includes: In the previous ranging period, the ranging frame signal is transmitted in the first time slice; In the current ranging period, the ranging frame signal is transmitted in the second time slice, and the second time slice is different from the first time slice in terms of the moment within the corresponding ranging period.

8. The method according to any one of claims 4-5, characterized in that, After determining whether there is co-frequency interference, it further includes: If the ranging initial frame signal sent by the second terminal is not received, or the ranging end frame signal sent by the second terminal is not received, generate a co-frequency interference monitoring result; Transmit the co-frequency interference monitoring result to the second terminal using a low-power Bluetooth signal.

9. The method according to claim 1, wherein The ranging frame signal is generated based on a preset preamble code hopping strategy, including: generating a synchronization symbol and a frame start delimiter based on the preset preamble code hopping strategy, and generating a ranging frame signal based on the synchronization symbol and the frame start delimiter.

10. A terminal ranging device, characterized in that, The device includes: A ranging interaction module for performing ranging interaction based on a ranging frame signal; wherein, the ranging frame signal is generated based on a preset preamble code hopping strategy; A strategy storage module for storing a preamble code hopping strategy; wherein, in the case where the preamble code hopping strategy is applied between multiple ranging requirements, the preamble code hopping strategy includes: Select a first preamble code from the set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging requirement is generated based on the first preamble code; In this ranging requirement, select a second preamble code from the set of preamble codes corresponding to the ultra-wideband protocol; wherein, the second preamble code is different from the first preamble code, and the ranging frame signal in the current ranging requirement is generated based on the second preamble code.

11. The device according to claim 10, characterized in that, In the case where the preamble code hopping strategy is applied between multiple ranging periods of the same ranging requirement, the preamble code hopping strategy includes: In this ranging requirement, select a third preamble code from the set of preamble codes corresponding to the ultra-wideband protocol, and the ranging frame signal in the previous ranging period is generated based on the third preamble code; Select a fourth preamble code from the set of preamble codes corresponding to the ultra-wideband protocol, wherein the fourth preamble code is different from the third preamble code, and the ranging frame signal in the current ranging period is generated based on the fourth preamble code.

12. The device according to any one of claims 10-11, characterized in that, The ranging interaction module includes a signal transceiver module and a processor; the signal transceiver module is used to receive and transmit ranging signals; the processor is used to select a second preamble code based on the preamble code hopping strategy stored in the strategy storage module and generate a ranging frame signal; the processor is also used to determine the target distance based on the received signal.

13. The device according to claim 12, characterized in that, The signal transceiver module includes an ultra-wideband signal receiver and a transmitter; the policy storage module includes at least one of the following: an embedded flash memory, a memory card, a flash drive, a storage chip, a hard disk, and a cloud storage server.

14. The device according to claim 10, characterized in that, The policy storage module is further configured to store the preamble sequence codes selected by the historical ranging interaction and the preamble sequence codes selected by the current ranging requirement.

15. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, the method according to any one of claims 1 to 9 is implemented.

16. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 9 is implemented.

17. A computer program product comprising a computer program, characterized in that, When the computer program is executed by the processor, the method according to any one of claims 1 to 9 is implemented.