Distance measurement method and device, electronic device and storage medium

By measuring the signal duration and strength of mobile devices, combined with the logarithmic path loss model, the problem of insufficient accuracy of distance measurement in low-power Bluetooth is solved, and efficient and accurate distance measurement is achieved on resource-constrained devices.

CN120294730APending Publication Date: 2025-07-11HUIZHOU TCL MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510475237.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

In the existing low-power Bluetooth ranging method, the accuracy of distance estimation is greatly affected by environmental factors, and the existing methods increase the system implementation cost and power consumption, making it difficult to apply in embedded devices with low-power and resource-constrained.

Method used

By measuring the duration and signal strength of the signal sent by mobile devices, combining the logarithmic distance path loss model, the distance between devices is determined, and the training data is used to improve model accuracy.

Benefits of technology

It realizes accurate distance measurement of mobile devices under low power consumption conditions, and is suitable for resource-constrained embedded devices, meeting energy consumption optimization needs and improving distance measurement accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120294730A_ABST
    Figure CN120294730A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a distance measurement method, a distance measurement device, an electronic device and a storage medium. The distance measurement accuracy can be improved. The method comprises the following steps: the measuring equipment measures the first duration of a first signal, wherein the first signal is a signal measured by the measuring equipment after a second signal sent by mobile measured equipment within the first duration is spatially transmitted; and the measuring equipment determines a first distance of the measured equipment moving in the first time length according to the first duration and the first time length.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present application relate to the field of communications, and more specifically, to a device, a method for measuring distance, a measuring device, an electronic device, and a storage medium. Background Art

[0002] With the rapid popularization of the Internet of Things (IoT) and smart devices, application scenarios such as indoor and outdoor positioning and asset tracking have put forward higher requirements for the accuracy of position measurement and the energy consumption of devices. Bluetooth Low Energy technology has become one of the main technologies for realizing short-distance wireless communication and positioning due to its low power consumption, low cost, and wide device compatibility. In traditional Bluetooth Low Energy (BLE) ranging methods, distance estimation mainly relies on the Received Signal Strength Indication (RSSI) value, and the received signal strength is mapped to the distance between devices through a preset path loss model. However, the RSSI value is affected by various factors, such as obstacles in the environment, signal interference, multipath effects, and changes in the relative positions of devices, resulting in large errors in distance estimation accuracy.

[0003] To solve the above problems, in the prior art, filtering algorithms (such as Kalman filtering and moving average filtering) are used to smooth RSSI data and improve ranging accuracy. In addition, some studies have tried to further improve the accuracy of indoor positioning through technical means such as multi-point reception and fingerprint recognition, combined with machine learning algorithms. However, these methods often require complex calculations and additional hardware support, increasing the implementation cost and power consumption of the system, and restricting their application in low-power and resource-constrained embedded devices. Summary of the Invention

[0004] Embodiments of the present application provide a method for measuring distance, a measuring device, an electronic device, and a storage medium, which can improve the accuracy of distance measurement.

[0005] In a first aspect, embodiments of the present application provide a method for measuring distance, which is applied to a measuring device. The method includes:

[0006] The measuring device measures a first duration of a first signal, where the first signal is a signal measured by the measuring device after a second signal transmitted by a moving device under test within a first time period is transmitted through space;

[0007] The measuring device determines a first distance that the device under test moves within the first time period according to the first duration and the first time period.

[0008] This solution can determine the distance that the device under test has moved when the device under test is moving.

[0009] In a possible implementation of the embodiments of the present application, the second signal carries information about the first duration.

[0010] In a possible implementation of the embodiments of the present application, the second signal carries information about the signal strength of the second signal.

[0011] Optionally, before the device under test moves, the communication method provided by the embodiments of the present application further includes:

[0012] The measuring device determines the signal strength of the first signal;

[0013] The measuring device determines a second distance between the device under test and the measuring device before the device under test moves according to the signal strength of the first signal and the signal strength of the second signal.

[0014] This solution can determine the distance between the device under test and the measuring device before the device under test moves.

[0015] In a possible implementation of the embodiments of the present application, the measuring device determines the second distance between the device under test and the measuring device before the device under test moves according to the signal strength of the first signal, the signal strength of the second signal, and the log-distance path loss model.

[0016] Optionally, after the measuring device determines the second distance, the method further includes:

[0017] The measuring device determines the distance between the device under test and the measuring device after the movement according to the first distance and the second distance.

[0018] In a possible implementation of the embodiments of the present application, the signal strength of the first signal, the signal strength of the second signal, and the second distance are used to train the log-distance path loss model.

[0019] Optionally, after the measuring device determines the signal strength of the first signal, the method further includes: the measuring device sends information about the signal strength of the first signal to the device under test so that the device under test adjusts the signal strength of the second signal and / or the first duration of the second signal according to the information about the signal strength of the first signal.

[0020] In a second aspect, the embodiments of the present application further provide a measuring device, and this device includes:

[0021] A measurement module, configured to measure a first duration of a first signal, where the first signal is a signal measured by the measurement module after a second signal transmitted by a moving device under test within a first time period undergoes spatial transmission;

[0022] A calculation module, configured to determine a first distance that the device under test moves within the first time period according to the first duration and the first time period.

[0023] In a possible implementation manner of an embodiment of the present application, the first signal carries information about the first time period.

[0024] In a possible implementation manner of an embodiment of the present application, the first signal carries information about the signal strength of the second signal.

[0025] Optionally, the measurement module is further configured to determine the signal strength of the first signal;

[0026] The calculation module is further configured to determine a second distance between the device under test and the measurement device before the device under test moves according to the signal strength of the first signal and the signal strength of the second signal.

[0027] In a possible implementation manner of an embodiment of the present application, the calculation module determines the second distance between the device under test and the measurement device before the device under test moves according to the signal strength of the first signal, the signal strength of the second signal, and a log-distance path loss model.

[0028] Optionally, after the calculation module determines the second distance, the calculation module is further configured to determine a distance between the device under test and the measurement device after movement according to the first distance and the second distance.

[0029] In a possible implementation manner of an embodiment of the present application, the signal strength of the first signal, the signal strength of the second signal, and the second distance are used to train the log-distance path loss model.

[0030] In a possible implementation manner of an embodiment of the present application, the device further includes: a transceiver module, configured to send information about the signal strength of the first signal to the device under test.

[0031] In a third aspect, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the steps in the above method for measuring distance are implemented.

[0032] Fourthly, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method for measuring distance are implemented.

[0033] Fifthly, an embodiment of the present application further provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the various optional implementation manners of the embodiment of the present application.

[0034] In an embodiment of the present application, the measuring device can determine the distance that the device under test moves within the first time period by measuring the first duration of the first signal. Wherein, the first signal is the signal measured by the measuring device after the second signal sent by the moving device under test is transmitted through space within the first time period. Further, before the device under test moves, the measuring device can measure the signal strength of the first signal, and then determine the second distance between the device under test and the measuring device before the device under test moves according to the signal strength of the first signal, the signal strength of the second signal, and the logarithmic path loss model. Finally, the measuring device can determine the distance between the moving device under test and the measuring device according to the first distance and the second distance. Additionally, the second distance, the signal strength of the first signal, and the signal strength of the second signal can be used as training data to train the logarithmic distance path loss model, so as to further improve the accuracy of the model. The method for measuring distance provided by the embodiment of the present application, on the one hand, can determine the distance that the moving device under test moves and can monitor the device under test in real time. On the other hand, due to the low complexity of the logarithmic distance path loss model, it can run efficiently on resource-constrained embedded devices, meet the requirements of energy consumption optimization, and make the determined distance between the moving device under test and the measuring device more accurate, improving the accuracy of distance measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those skilled in the art, without creative efforts, other drawings can be obtained according to these drawings.

[0036] Figure 1 It is a schematic flowchart of an example of the method for measuring distance provided by an embodiment of the present application;

[0037] Figure 2 It is a schematic diagram of the first time period and the first duration provided by an embodiment of the present application;

[0038] Figure 3 It is a schematic flow chart of another example of the method for measuring distance provided by an embodiment of the present application;

[0039] Figure 4 It is a schematic flow chart of the method for training the logarithmic distance path loss model provided by an embodiment of the present application;

[0040] Figure 5 It is a schematic structural diagram of the measurement device provided by an embodiment of the present application;

[0041] Figure 6 It is a schematic structural diagram of the electronic device provided by an embodiment of the present application. Detailed implementation manners

[0042] In the description of the present application, unless otherwise specified, " / " indicates that the objects associated before and after are in an "or" relationship. For example, A / B may represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. Among them, A and B may be singular or plural.

[0043] In the description of the present application, unless otherwise specified, "a plurality of" means two or more than two. "At least one (item) or similar expressions hereinafter" refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b, and (or) c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, and c may be single or multiple.

[0044] In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit being different.

[0045] In the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific way for easy understanding.

[0046] It can be understood that the "embodiments" mentioned throughout the specification mean that specific features, structures, or characteristics related to the embodiments are included in at least one embodiment of the present application. Therefore, the various embodiments throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in one or more embodiments in any suitable manner. It can be understood that in various embodiments of the present application, the magnitude of the serial numbers of the various processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0047] It can be understood that in the present application, both "when..." and "if" refer to corresponding processing under certain objective circumstances, do not limit time, do not require a judgment action during implementation, and do not mean the existence of other limitations.

[0048] It can be understood that some optional features in the embodiments of the present application can, in certain scenarios, be implemented independently without relying on other features, such as the current underlying solution, to solve the corresponding technical problems and achieve the corresponding effects. In some scenarios, they can also be combined with other features according to requirements. Correspondingly, the devices given in the embodiments of the present application can also implement these features or functions accordingly, which will not be elaborated here.

[0049] In the present application, unless otherwise specified, the same or similar parts between the various embodiments can be referred to each other. In the various embodiments of the present application, if there is no special specification and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be mutually referred to. The technical features in different embodiments can be combined to form new embodiments according to their internal logical relationships. The embodiments of the present application described below do not constitute a limitation on the protection scope of the present application.

[0050] Please refer to Figure 1 , Figure 1 which is a schematic flowchart of the method for measuring distance provided by the embodiments of the present application. The process includes the following steps:

[0051] S101, the measuring device measures the first duration of the first signal.

[0052] In the embodiments of the present application, the first signal is the signal measured by the measuring device after the second signal transmitted by the moving device under test within the first time period is transmitted through space. In other words, the device under test transmits the second signal, and the measuring device measures the first signal after the second signal is transmitted through space, or measures the signal after the second signal is attenuated, that is, the first signal.

[0053] In the embodiments of the present application, the measuring device may determine whether the device under test is moving away from the measuring device according to the first duration and the first time length of the measured first signal, or the measuring device may determine whether the device under test is moving towards the measuring device according to the first duration and the first time length of the measured first signal. For example, if the first duration is less than the first time length, the device under test is moving towards the measuring device. For another example, if the first duration is greater than the first time length, the device under test is moving away from the measuring device.

[0054] Exemplarily, the second signal may be a broadcast, or the second signal may also be other signals, which are not limited in the embodiments of the present application. Among them, when the second signal is a BLE broadcast, the energy consumption management of the device under test can be optimized to achieve low-energy consumption distance measurement. And since the device under test does not need to establish a BLE connection when sending a broadcast signal, the distances of multiple devices under test can be measured simultaneously, improving the measurement efficiency.

[0055] In a possible implementation manner, the second signal may carry the information of the first time length, or, in other words, the second signal includes the information of the first time length. This solution can flexibly indicate the information of the first time length to the measuring device. For example, if the device under test moves fast, a shorter first time length can be set; if the device under test moves slowly, a longer first time length can be set.

[0056] In another possible implementation manner, the information of the first time length may be predefined, which can save the signaling overhead.

[0057] Or, the measuring device may determine the information of the first time length in other ways, which are not limited in the embodiments of the present application.

[0058] Optionally, the second signal may carry the information of the signal strength of the second signal, or, in other words, the second signal includes the information of the signal strength of the second signal. In this way, the device under test can change the signal strength of the second signal and indicate the signal strength information of the second signal to the measuring device. On the one hand, it can enable the device under test to adjust the power level of the transmitter in real time to optimize the signal coverage and energy consumption. On the other hand, it can enable the device under test to dynamically adjust the interval and amplitude of the transmit power switching to ensure the stability and accuracy of the distance measurement.

[0059] Or, the signal strength of the second signal may be predefined, which can save the signaling overhead, and the embodiments of the present application are not limited thereto.

[0060] S102. The measuring device determines the first distance that the device under test moves within the first time length according to the first duration and the first time length.

[0061] Exemplarily, the first duration is T1', the first time length is T1, and the measuring device may determine the first distance according to the product of the difference in time length between the first duration and the first time length and the speed of light.

[0062] A possible implementation is as Figure 2 shown. The device under test sends the second signal at a signal strength R1 within a time length T1, sends the second signal at a signal strength R2 within a time length T2, and sends the second signal at a signal strength R3 within a time length T3. The measuring device may determine T1' corresponding to T1 according to R1 and T1 carried in the measured first signal, determine T2' corresponding to T2 according to R2 and T2 carried in the first signal, and determine T3' corresponding to T3 according to R3 and T3 carried in the first signal, and further may determine the distance that the device under test moves.

[0063] Optionally, the measuring device may respectively determine the difference between T1 and T1', the difference between T2 and T2', and the difference between T3 and T3', determine the distances that the device under test moves respectively within the time periods T1, T2, and T3, and further determine the total moving distance of the device under test. Or, optionally, the measuring device may determine the difference between T1'+T2'+T3' and (T1+T2+T3), and further determine the total distance that the device under test moves within the time period T1+T2+T3. The embodiments of the present application do not make any limitation thereto.

[0064] Optionally, before the device under test moves, as Figure 3 shown, the method for measuring distance provided by the embodiments of the present application further includes:

[0065] S103. The measuring device determines the signal strength of the first signal.

[0066] In the embodiments of the present application, the signal strength of the first signal may be characterized by RSSI, or the signal strength of the first signal may also be characterized by other parameters. The embodiments of the present application do not make any limitation thereto.

[0067] S104. The measuring device determines a second distance between the device under test and the measuring device before the device under test moves according to the signal strength of the first signal and the signal strength of the second signal.

[0068] It should be noted that in the embodiments of the present application, using the signal strength actually measured by the measuring device to determine the second distance can improve the accuracy of distance measurement.

[0069] Exemplarily, Table 1 shows the data of the signal strength measured under ideal conditions.

[0070] Table 1

[0071]

[0072] Among them, the first column of the table represents the second distance, the values in the second to fourth columns represent the intensity of the first signal measured under ideal conditions, and the values in the fifth column represent the path loss under ideal conditions. For example, the second signal intensity is R3, the measured intensity of the first signal is -50 dBm, the path loss is -30 dBm, and the second distance is 1 m.

[0073] Exemplarily, Table 2 shows the data of the actually measured signal intensity.

[0074] Table 2

[0075]

[0076] Among them, the first column of the table represents the second distance, the values in the second to fourth columns represent the intensity of the first signal actually measured, and the fifth column represents the actual path loss.

[0077] From the above examples, it can be seen that using the signal intensity of the actually measured first signal to determine the path loss can improve the accuracy of distance measurement. Among them, the path attenuation index n corresponding to the actual loss can be configured. For the logarithmic distance path loss model, generally, 2 ≤ n ≤ 6. Of course, n can take other values, and the scope of n is not limited in the embodiments of the present application.

[0078] In a possible implementation manner, the measuring device can determine the second distance according to the logarithmic distance path loss model, the signal intensity of the first signal, and the signal intensity of the second signal.

[0079] Exemplarily, using the logarithmic distance path loss model, the signal intensity of the first signal, and the signal intensity of the second signal to determine the second distance can be shown as the following formula:

[0080]

[0081] Among them, d can represent the second distance, RSSI can represent the signal intensity of the first signal, and P tx can represent the signal intensity of the second signal.

[0082] Optionally, as Figure 3 shown, the method for measuring distance provided by the embodiments of the present application further includes:

[0083] S105, determining the distance between the measured device and the measuring device after movement according to the first distance and the second distance.

[0084] For example, the distance between the measured device and the measuring device after movement is d + d', where d' represents the first distance.

[0085] Optionally, as Figure 4As shown, the signal strength of the first signal, the signal strength of the second signal, and the second distance are used to train the log-distance path loss model. This solution enables the log-distance path loss model to be trained using actual measurement data, and the trained log-distance path loss model can be more accurate, further improving the accuracy of distance measurement.

[0086] Specifically, the training process of the log-distance path loss model includes:

[0087] Step 1:

[0088] Initialize the correspondence between the power loss S0 and the distance D0 in the surrounding environment under ideal conditions.

[0089] Step 2: Scan the surrounding BLE devices.

[0090] Step 3: Calculate the correspondence between the power loss Sn and the distance Dn of at least one target device.

[0091] Step 4: After scanning a new device, use the log-distance path loss model to calculate the distance between the new device and the measurement device. Here, the new device is the above-mentioned device under test, and the data of the new device includes the signal strength of the first signal, the signal strength of the second signal, and the second distance.

[0092] Step 5: Add the data of the new device to the training data of the log-distance path loss model.

[0093] Optionally, the method for measuring distance provided in the embodiments of the present application further includes: the measurement device sends information about the signal strength of the first signal to the device under test. Correspondingly, the device under test receives the information about the signal strength of the first signal from the measurement device.

[0094] Optionally, the method for measuring distance provided in the embodiments of the present application further includes: the device under test adjusts the signal strength of the second signal, and / or, the first duration according to the information about the signal strength of the first signal.

[0095] In this solution, the device under test can dynamically and real-time adjust the transmission power, that is, the signal strength of the first signal, based on the information about the signal strength feedback by the measurement device, thereby optimizing the signal coverage and energy consumption, and ensuring the stability and accuracy of distance measurement.

[0096] In the embodiments of the present application, the measuring device can determine the distance that the device under test moves within the first time period by measuring the first duration of the first signal. Herein, the first signal is the signal measured by the measuring device after the second signal transmitted by the moving device under test within the first time period undergoes spatial transmission. Further, before the device under test moves, the measuring device can measure the signal strength of the first signal, and then determine the second distance between the device under test and the measuring device before the device under test moves according to the signal strength of the first signal, the signal strength of the second signal, and the logarithmic path loss model. Finally, the measuring device can determine the distance between the moving device under test and the measuring device according to the first distance and the second distance. Additionally, the second distance, the signal strength of the first signal, and the signal strength of the second signal can be used as training data to train the logarithmic distance path loss model, so as to further improve the accuracy of the model. The method for measuring distance provided by the embodiments of the present application, on the one hand, can determine the distance that the moving device under test moves, and can monitor the device under test in real time. On the other hand, due to the low complexity of the logarithmic distance path loss model, it can operate efficiently on resource-constrained embedded devices, meet the requirements of energy consumption optimization, and make the determined distance between the moving device under test and the measuring device more accurate, improving the accuracy of distance measurement.

[0097] To facilitate better implementation of the method for measuring distance in the present application, the present application also provides a device for measuring distance, and the specific implementation details can refer to the description in the method embodiments.

[0098] Please refer to Figure 5 , Figure 5 which is a schematic structural diagram of the measuring device provided by the embodiments of the present application. The device can be specifically as follows:

[0099] A measuring module 510, configured to measure the first duration of the first signal, where the first signal is the signal measured by the measuring module after the second signal transmitted by the moving device under test within the first time period undergoes spatial transmission;

[0100] A calculation module 520, configured to determine the first distance that the device under test moves within the first time period according to the first duration and the first time period.

[0101] In a possible implementation manner of the embodiments of the present application, the first signal carries information about the first time period.

[0102] In a possible implementation manner of the embodiments of the present application, the first signal carries information about the signal strength of the second signal.

[0103] Optionally, the measuring module 510 is further configured to determine the signal strength of the first signal;

[0104] The calculation module 520 is further configured to determine a second distance between the device under test and the measurement device before the device under test moves according to the signal strength of the first signal and the signal strength of the second signal.

[0105] In a possible implementation manner of the embodiment of the present application, the calculation module 520 determines the second distance between the device under test and the measurement device before the device under test moves according to the signal strength of the first signal, the signal strength of the second signal, and the log-distance path loss model.

[0106] Optionally, after the calculation module 520 determines the second distance, the calculation module 520 is further configured to determine the distance between the device under test and the measurement device after the movement according to the first distance and the second distance.

[0107] In a possible implementation manner of the embodiment of the present application, the signal strength of the first signal, the signal strength of the second signal, and the second distance are used to train the log-distance path loss model.

[0108] In the embodiment of the present application, the measurement module 510 can determine the distance that the device under test moves within the first time period by measuring the first duration of the first signal. The first signal is the signal measured by the measurement module 510 after the second signal sent by the moving device under test is transmitted through space. Further, before the device under test moves, the measurement module 510 can measure the signal strength of the first signal, and then determine the second distance between the device under test and the measurement device before the device under test moves according to the signal strength of the first signal, the signal strength of the second signal, and the log-distance path loss model. Finally, the calculation module 520 can determine the distance between the moving device under test and the measurement device according to the first distance and the second distance. Additionally, the second distance, the signal strength of the first signal, and the signal strength of the second signal can be used as training data to train the log-distance path loss model, so as to further improve the accuracy of the model. The measurement device for measuring distance provided by the embodiment of the present application, on the one hand, can determine the distance that the moving device under test moves and can monitor the device under test in real time. On the other hand, due to the low complexity of the log-distance path loss model, it can operate efficiently on resource-constrained embedded devices, meet the requirements of energy consumption optimization, and make the determined distance between the moving device under test and the measurement device more accurate, improving the accuracy of distance measurement.

[0109] In addition, the present application further provides an electronic device, as Figure 6 shown, which shows a schematic structural diagram of the electronic device involved in the present application. Specifically:

[0110] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 of one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art can understand that Figure 6 the structure of the electronic device shown in

[0111] does not limit the electronic device. It may include more or fewer components than shown in the figure, combine certain components, or have a different component arrangement. Among them:

[0112] The processor 601 is the control center of the electronic device, connecting various parts of the entire electronic device through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 602, and calling the data stored in the memory 602, it executes various functions of the electronic device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 601.

[0113] The electronic device also includes a power supply 603 that powers each component. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 603 may also include any components such as one or more DC or AC power supplies, a recharge system, a power device debugging circuit, a power converter or inverter, and a power status indicator.

[0114] The electronic device may further include an input unit 604, which may be configured to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0115] Although not shown, the electronic device may further include a display unit and the like, which will not be elaborated here. Specifically, in this embodiment, the processor 601 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 602 according to the following instructions, and the processor 601 will run the application programs stored in the memory 602, so as to implement the steps in any of the distance measurement methods provided in the embodiments of the present application.

[0116] For the specific implementation of the above operations, reference may be made to the previous embodiments and will not be elaborated here.

[0117] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling relevant hardware through instructions. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0118] Therefore, the present application provides a computer-readable storage medium, on which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any of the distance measurement methods provided by the present application.

[0119] For the specific implementation of the above operations, reference may be made to the previous embodiments and will not be elaborated here.

[0120] Among them, the computer-readable storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.

[0121] Since the instructions stored in the computer-readable storage medium can execute the steps in any of the multi-modal information display methods of the extended reality device provided by the present application, the beneficial effects that can be achieved by any of the distance measurement methods provided by the present application can be realized. For details, refer to the previous embodiments and will not be elaborated here.

[0122] The above has introduced in detail a method, apparatus, electronic device, and computer-readable storage medium for measuring distance provided by the present application. Specific examples are used herein to elaborate on the principles and implementation manners of the present invention. The description of the above embodiments is only used to help understand the method and its core idea of the present invention; at the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present invention.

[0123] Among them, it should be noted that in the specific implementation manner of the present application, for the relevant data involved, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of the relevant data need to comply with the relevant laws, regulations, and standards of the relevant countries and regions.

Claims

1. A method for measuring distance, characterized in that, Applied to a measurement device, including: The measurement device measures a first duration of a first signal, where the first signal is a signal measured by the measurement device after a second signal transmitted by a moving device under test within a first time period has undergone spatial transmission; The measurement device determines a first distance that the device under test has moved within the first time period based on the first duration and the first time period.

2. The method according to claim 1, wherein The second signal carries information about the first time period, and / or the second signal carries information about the signal strength of the second signal.

3. The method according to claim 2, wherein Before the device under test moves, the method further includes: The measurement device determines the signal strength of the first signal; The measurement device determines a second distance between the device under test and the measurement device before the device under test moves based on the signal strength of the first signal and the signal strength of the second signal.

4. The method according to claim 3, characterized in that, The measurement device determines a second distance between the device under test and the measurement device before the device under test moves based on the signal strength of the first signal, the signal strength of the second signal, and a log-distance path loss model.

5. The method according to claim 3, wherein After the measurement device determines the signal strength of the first signal, the method further includes: The measurement device sends information about the signal strength of the first signal to the device under test.

6. The method according to claim 4, wherein After the measurement device determines the second distance, the method further includes: The measurement device determines the distance between the device under test and the measurement device after movement based on the first distance and the second distance.

7. The method according to claim 4, characterized in that, The signal strength of the first signal, the signal strength of the second signal, and the second distance are used to train the log-distance path loss model.

8. A measuring device, characterized in that, Including: A measurement module for measuring a first duration of a first signal, where the first signal is a signal measured by the measurement module after a second signal transmitted by a moving device under test within a first time period has undergone spatial transmission; A calculation module for determining a first distance that the device under test has moved within the first time period based on the first duration and the first time period.

9. An electronic device, characterized in that, Including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the method for measuring distance according to any one of claims 1 to 7 is implemented.

10. A storage medium, characterized in that, A computer program is stored on the storage medium, and when the computer program is executed by a processor, the method for measuring distance according to any one of claims 1 to 7 is implemented.