A device positioning method and related device

By combining high-precision and low-power sensors and dynamically adjusting the sensor states to reduce power consumption, the problem of high power consumption in UWB device positioning methods is solved, extending the device's service life.

CN116156417BActive Publication Date: 2026-05-26HUAWEI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2020-11-30
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing device positioning methods based on UWB technology suffer from high power consumption, which affects the usage time of terminal devices.

Method used

By combining a high-precision first sensor with a low-power second sensor, the position change of the terminal device is determined by a threshold. When the position change exceeds the threshold, the high-precision sensor is triggered to switch from a low-power state to a high-power state to perform positioning calculations, thereby reducing the overall power consumption of the device.

Benefits of technology

While ensuring positioning accuracy, the overall power consumption of the terminal device is reduced and the device's service life is extended by dynamically adjusting the sensor status.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116156417B_ABST
    Figure CN116156417B_ABST
Patent Text Reader

Abstract

This application discloses a device positioning method, the method comprising: acquiring the position change of a first terminal device, the position change being determined based on first data collected by a second sensor; when the position change of the first terminal device exceeds a threshold, triggering the first sensor to change from a first working state to a second working state, wherein the power consumption of the first sensor in the first working state is less than the power consumption in the second working state; and acquiring first location information of the first terminal device, the first location information being determined based on second data collected by the first sensor in the second working state. This application only activates the high-power first sensor when the position change of the first terminal device exceeds a threshold based on the second data collected by the low-power second sensor, thereby reducing the power consumption of the first terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application is a divisional application. The original application has the application number 202011376728.6 and the original application date is November 30, 2020. The entire contents of the original application are incorporated herein by reference. Technical Field

[0002] This application relates to the field of computers, and more particularly to a device positioning method and related equipment. Background Technology

[0003] Wireless positioning technology refers to the measurement and calculation methods used to determine the location of mobile users, i.e., positioning algorithms. Currently, the most commonly used positioning technologies include: time difference of arrival (TDOA) positioning, angle-of-arrival (AOA) positioning, time of arrival (TOA) positioning, and time difference of arrival (TDOA) positioning. Among these, TDOA is currently the most popular solution, and it is also used in ultra-wideband (UWB) wireless communication technology. UWB is a carrier-free communication technology; it does not use a carrier wave but instead uses short energy pulse sequences, which are spread across a frequency range through orthogonal frequency division modulation or direct sequencing.

[0004] Spatial interaction refers to human-computer interaction technologies and methods based on spatial location awareness (including the relative position and angle between devices, etc.). To achieve a better user experience, spatial awareness is needed between multiple devices. For example, existing technologies use UWB technology to implement AirDrop directional sharing. However, UWB-based device positioning consumes a lot of power. Although it can bring a good user experience in spatial interaction, it also reduces the usage time of terminal devices. Summary of the Invention

[0005] Firstly, this application provides a device positioning method applied to a first terminal device, which can be a smart home system or another terminal device in an indoor / outdoor scenario. Data collected by the first and second sensors are used for device positioning of the first terminal device. Data collected by the second sensor is used to determine the positional change of the first terminal device. To determine its relative position with other terminal devices, the first terminal device can activate its onboard sensors. The data collected by these sensors can be used for device positioning. In this application, device positioning can be understood as determining the relative position between terminal devices. To obtain a high-precision device positioning result, the first terminal device can activate a first sensor with high positioning accuracy. In this application, "sensor with high positioning accuracy" does not mean that the sensor has positioning capability, but rather that the calculation result of device positioning based on the data collected by the sensor has high accuracy. It should be understood that the first sensor can be a single high-precision sensor or a combination of multiple high-precision sensors; this application is not limited in its embodiments. Data collected by the second sensor is used to determine the positional change of the first terminal device; that is, the data collected by the second sensor can be used to determine the amount of displacement of the terminal device. Positioning accuracy based on the data collected by the second sensor is lower, but the power consumption required by the terminal device when activating these sensors is also lower. It should be understood that the second sensor can also be other sensors that have lower positioning accuracy and lower power consumption, and this application is not limited thereto.

[0006] The data collected by the second sensor is used to determine the position change of the first terminal device. However, the data collected by the first sensor can be used to determine the relative position between terminal devices, and the data collected by the second sensor can also be used to determine the relative position between terminal devices. Alternatively, the data collected by the second sensor can be used to determine the magnitude of the position change of the terminal device, but cannot be used to determine the relative position between terminal devices. The power of the first sensor is greater than the power of the second sensor, meaning that the power consumption required for the first terminal device to keep the first sensor on per unit time is greater than the power consumption required for the first terminal device to keep the second sensor on.

[0007] The method includes: acquiring the position change of the first terminal device, the position change being determined based on first data collected by the second sensor; when the position change of the first terminal device exceeds a threshold, triggering the first sensor to change from a first operating state to a second operating state, wherein the power consumption of the first sensor in the first operating state is less than the power consumption in the second operating state. The second operating state can be a sensor-off state, or a low-power state of standby or only partially activated sensor functions. The first operating state can be a sensor-on state, or a high-power state with most sensor functions activated. For example, the first operating state is a sensor-on state, and the second operating state is a sensor-off state. Acquiring first location information of the first terminal device, the first location information being determined based on second data collected by the first sensor.

[0008] In this embodiment, the threshold may include a distance threshold and an angle threshold. It should be noted that different thresholds may correspond to different device types of the first terminal device. For example, the first terminal device may be a mobile device, such as a mobile phone, tablet, AR glasses, smartwatch, or smart bracelet; a semi-mobile device, such as a smart speaker or laptop; or a fixed device, such as a smart screen, desktop computer, or smart home appliance. The thresholds can gradually decrease from mobile devices and semi-mobile devices to fixed devices. That is, when the first terminal device is a mobile device, the first sensor is activated when the position change of the first terminal device exceeds the first threshold; when the first terminal device is a semi-mobile device, the first sensor is activated when the position change of the first terminal device exceeds the second threshold; and when the first terminal device is a fixed device, the first sensor is activated when the position change of the first terminal device exceeds the third threshold. The first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.

[0009] The first terminal device can belong to a computing system, which can be the smart home system described above or other indoor / outdoor scenarios. The computing system can include multiple terminal devices, which may include a control center, also referred to as the target terminal device in this embodiment. The computing system can include the first terminal device. In order to obtain the relative position between the first terminal device and other terminal devices in the computing system, the first terminal device can acquire second data collected by a first sensor installed on the first terminal device. This second data can be used to calculate the relative position between the first terminal device and other terminal devices in the computing system. The first position information can indicate the relative position between the first terminal device and other terminal devices in the computing system. The relative position can be a relative distance and / or a relative azimuth angle. The first position information can be directly represented by relative distance and / or relative azimuth angle, or it can be data used to calculate the relative distance and / or relative azimuth angle. Regardless of the way the first position information is represented, it can directly or indirectly obtain the relative position between the first terminal device and other terminal devices in the computing system.

[0010] In this embodiment, the high-power first sensor is only triggered to change from the first working state to the second working state when the first data collected by the low-power second sensor determines that the position change of the first terminal device exceeds the threshold, thereby reducing the power consumption of the first terminal device.

[0011] In one possible implementation, the method further includes: before acquiring the location change of the first terminal device, acquiring second location information of the first terminal device, the second location information being determined based on third data collected by the first sensor in the second working state; and triggering the first sensor to change from the second working state to the first working state.

[0012] In this embodiment, a second location information of the first terminal device can be obtained. This second location information is determined based on third data collected by the first sensor. The first terminal device may belong to a computing system, which may be the smart home system described above or other indoor / outdoor scenarios. The computing system may include multiple terminal devices, which may include a control center, also referred to as the target terminal device in this embodiment. The computing system may include the first terminal device. To obtain its relative position with other terminal devices in the computing system, the first terminal device can obtain third data collected by the first sensor installed on the first terminal device. This third data can be used to calculate the relative position between the first terminal device and other terminal devices in the computing system. The second location information can indicate the relative position between the first terminal device and other terminal devices in the computing system. The relative position can be a relative distance and / or a relative azimuth angle.

[0013] It should be understood that the second location information can be directly represented by relative distance and / or relative azimuth angle, or it can be data used to calculate relative distance and / or relative azimuth angle. Regardless of how the first location information is represented, it can directly or indirectly obtain the relative position between the first terminal device and other terminal devices in the computing system.

[0014] The first sensor is triggered to change from the second working state to the first working state. It should be understood that this application does not limit the timing between turning off the first sensor and acquiring the second location information of the first terminal device. In one implementation, after the first sensor collects the third data and before acquiring the second location information of the first terminal device, the first sensor can be triggered to change from the second working state to the first working state. In another implementation, the first sensor is triggered to change from the second working state to the first working state only after acquiring the second location information of the first terminal device.

[0015] To reduce power consumption, this application can trigger the first sensor to change from the second operating state to the first operating state. In one implementation, other terminal devices in the computing system can trigger the first terminal device to change from the second operating state to the first operating state, for example, by turning off its own first sensor. Specifically, the first terminal device can receive an instruction from other terminal devices in the computing system to turn off the first sensor, and turn off the first sensor based on the received instruction.

[0016] In one possible design, the data precision of the data acquired by the first sensor is greater than that of the data acquired by the second sensor.

[0017] It should be understood that in one implementation, the data collected by the second sensor cannot be used for positioning calculations of the first terminal device; it can only determine changes in the position of the first terminal device. In another implementation, the data collected by the second sensor can be used for positioning calculations of the first terminal device; however, the data precision of the data collected by the second sensor is lower than that of the data collected by the first sensor.

[0018] Specifically, if the first sensor and the second sensor of the first terminal device are turned on together, after the position of the first terminal device changes, the positioning calculation of the first terminal device can be performed based on the data collected by the first sensor, and the positioning calculation of the first terminal device can also be performed based on the data collected by the second sensor (the positioning algorithm used for the data collected by the first sensor and the positioning algorithm used for the data collected by the second sensor are the same or similar). However, the positioning calculation result of the first terminal device based on the data collected by the first sensor is more accurate than the positioning calculation result of the first terminal device based on the data collected by the second sensor. The so-called higher accuracy means that the positioning calculation result of the first terminal device based on the data collected by the first sensor is closer to the actual position change of the first terminal device.

[0019] When the position change of the first terminal device exceeds a threshold based on the second data collected by the low-power second sensor, positioning calculation is performed using the data collected by the first sensor with higher positioning accuracy, thus ensuring positioning accuracy.

[0020] In one possible design, the method further includes:

[0021] After the first sensor is triggered to change from the first working state to the second working state, the first sensor is triggered to change from the second working state back to the first working state.

[0022] It should be understood that this application does not limit the timing between triggering the first sensor to change from the second working state to the first working state and acquiring the first location information of the first terminal device. In one implementation, after the first sensor collects the second data, but before acquiring the first location information of the first terminal device, the first sensor may be triggered to change from the second working state to the first working state. In another implementation, the first sensor is triggered to change from the second working state to the first working state only after acquiring the first location information of the first terminal device.

[0023] In one possible design, the first location information is used to indicate a first relative position between the first terminal device and the second terminal device; the second location information is used to indicate a second relative position between the first terminal device and the second terminal device; the second terminal device and the first terminal device belong to the same computing system.

[0024] The first terminal device belongs to a computing system, which also includes other terminal devices (second terminal devices). The second terminal device can be understood as one or more terminal devices.

[0025] In one possible design, triggering the first sensor to change from the second operating state to the first operating state includes: receiving a second indication sent by the second terminal device for triggering the first sensor to change from the second operating state to the first operating state, and triggering the first sensor to change from the second operating state to the first operating state based on the second indication.

[0026] In one possible design, the step of triggering the first sensor to change from a first operating state to a second operating state when the position change of the first terminal device exceeds a threshold includes:

[0027] When the location change of the first terminal device exceeds a threshold, a third indication is sent to the second terminal device to indicate that the location change of the first terminal device exceeds the threshold.

[0028] The device receives a fourth indication sent by the second terminal device to trigger the first sensor to change from a first working state to a second working state, and triggers the first sensor to change from a first working state to a second working state based on the fourth indication.

[0029] In one possible design, the second terminal device includes M terminal devices, each of the M terminal devices including the first sensor;

[0030] The first location information is determined based on the second data and data collected by the first sensors of N terminal devices out of the M terminal devices, where N is less than or equal to M; and / or,

[0031] The second location information is determined based on the third data and the data collected by the first sensors of N of the M terminal devices, where N is less than or equal to M.

[0032] In other words, the first position can be calculated based on data collected by the first sensors of all or some of the M terminal devices. In one implementation, N is less than M, and the N terminal devices are the N terminal devices among the M terminal devices that are closest to the first terminal device. When the N terminal devices among the M terminal devices collect data for determining the second position, the first sensors of the terminal devices other than the N terminal devices among the M terminal devices are in the first working state, for example, in a closed state. In this embodiment, the N terminal devices closest to the first terminal device can be selected to be in the second working state, and the first position information can be calculated based on the data collected by the first sensors of the N terminal devices. The number of N depends on the total number of devices in the computing system and the positioning accuracy of the second sensor of the first terminal device itself. That is, the higher the positioning accuracy of the second sensor, the smaller N is. In this embodiment of the application, only the N terminal devices with close positions are selected, which can save energy and reduce consumption while ensuring the system accuracy.

[0033] In one possible design, N is less than M, and the N terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices.

[0034] In one possible design, the first relative position and the second relative position include relative distance and / or relative azimuth. The relative azimuth can also be referred to as relative pose, such as a relative 3DOF pose.

[0035] In one possible design, before obtaining the second location information of the first terminal device, the method further includes:

[0036] This indicates that the first sensor changes from the first operating state to the second operating state.

[0037] In one possible design, triggering the first sensor to change from the first operating state to the second operating state includes:

[0038] Establish a connection with the second terminal device;

[0039] The device receives a first indication sent by the second terminal device to trigger the first sensor to change from the first working state to the second working state, and triggers the first sensor to change from the first working state to the second working state based on the first indication.

[0040] In one scenario, a first terminal device can keep a first sensor in its first operating state, such as a closed state, until it receives a first instruction to trigger the first sensor to change from the first operating state to the second operating state, or determines itself that it should change from the first operating state to the second operating state. Taking the first operating state as closed and the second operating state as open as an example, the first terminal device can keep the first sensor closed until it establishes a connection with at least one terminal device (the second terminal device) in the computing system. Then, it can receive a first instruction from the second terminal device in the computing system to open the first sensor, and the first terminal device can open the first sensor based on this first instruction. Taking a smart home system as an example, the target terminal device can be a smart screen, and the first terminal device can be a user's mobile phone. When the user returns indoors from outdoors, the first terminal device can establish a connection with at least one terminal device in the smart home system. This connection can be a local area network connection, such as Bluetooth or Wi-Fi. In this case, the smart screen can detect the first terminal device's return to the smart home system, and the second terminal device can send a first instruction to the first terminal device to open the first sensor.

[0041] In one possible design, obtaining the first location information of the first terminal device includes: obtaining second data collected by the first sensor, and determining the first location information of the first terminal device based on the second data.

[0042] In one possible design, obtaining the first location information of the first terminal device includes: obtaining second data collected by the first sensor and data collected by the first sensors of the N terminal devices, and determining the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices; or, obtaining the second data collected by the first sensor; sending the second data to a target terminal device among the M terminal devices, so that the target terminal device determines the first location information of the first terminal device based on the second data, or so that the target terminal device determines the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices; and receiving the first location information sent by the target terminal device.

[0043] In one possible design, obtaining the second location information of the first terminal device includes: obtaining third data collected by the first sensor, and determining the second location information of the first terminal device based on the third data.

[0044] In one possible design, obtaining the second location information of the first terminal device includes: obtaining third data collected by the first sensor and data collected by the first sensors of the N terminal devices, and determining the second location information of the first terminal device based on the third data and the data collected by the first sensors of the N terminal devices; or, obtaining the third data collected by the first sensor; sending the third data to a target terminal device among the M terminal devices, so that the target terminal device can determine the second location information of the first terminal device based on the third data, or so that the target terminal device can determine the second location information of the first terminal device based on the third data and the data collected by the first sensors of the N terminal devices; and receiving the second location information sent by the target terminal device.

[0045] In one possible design, the first sensor includes at least one of the following sensors: an ultra-wideband (UWB) sensor, an ultrasonic sensor, a laser sensor, and a vision sensor; wherein the UWB sensor may include a UWB transmitter and a UWB receiver, the ultrasonic sensor may include an ultrasonic transmitter and an ultrasonic receiver, and the laser sensor may include a laser transmitter and a laser receiver.

[0046] The second sensor includes at least one of the following sensors: accelerometer sensor, gyroscope sensor, magnetometer sensor, Bluetooth Low Energy (BLE), and Wi-Fi.

[0047] In one possible design, the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the positioning accuracy when locating the device based on the data collected by the first sensor is greater than a preset value. When the accelerometer sensor and gyroscope sensor are activated, the power consumption of the first terminal device is also low; however, some accelerometer sensors and gyroscope sensors can also achieve high positioning accuracy when locating the device based on the data collected.

[0048] Secondly, this application provides a device positioning apparatus applied to a first terminal device, the first terminal device including a first sensor and a second sensor, wherein data collected by the first sensor is used to locate the first terminal device, data collected by the second sensor is used to determine the position change of the first terminal device, and the power of the first sensor is greater than the power of the second sensor, the apparatus comprising:

[0049] The acquisition module is used to acquire the position change of the first terminal device, wherein the position change is determined based on the first data collected by the second sensor;

[0050] The sensor state change module is used to trigger the first sensor to change from a first working state to a second working state when the position change of the first terminal device exceeds a threshold. The power consumption of the first sensor in the first working state is less than the power consumption in the second working state.

[0051] The acquisition module is used to acquire the first location information of the first terminal device, wherein the first location information is determined based on the second data collected by the first sensor in the second working state.

[0052] In one possible design, the acquisition module is used to acquire second location information of the first terminal device before acquiring the location change of the first terminal device, wherein the second location information is determined based on third data collected by the first sensor in the second working state;

[0053] The sensor state change module is used to trigger the first sensor to change from the second working state to the first working state.

[0054] In one possible design, the data precision of the data acquired by the first sensor is greater than that of the data acquired by the second sensor.

[0055] In one possible design, the sensor state change module is used for:

[0056] After triggering the first sensor to change from the first working state to the second working state, trigger the first sensor to change from the second working state back to the first working state.

[0057] In one possible design, the first location information is used to indicate a first relative position between the first terminal device and the second terminal device;

[0058] The second location information is used to indicate the second relative position between the first terminal device and the second terminal device;

[0059] The second terminal device and the first terminal device belong to the same computing system.

[0060] In one possible design, the sensor state change module is configured to receive a second indication sent by the second terminal device to trigger the first sensor to change from the second working state to the first working state, and to trigger the first sensor to change from the second working state to the first working state based on the second indication.

[0061] In one possible design, the sensor state change module is used to send a third indication to the second terminal device when the position change of the first terminal device exceeds a threshold.

[0062] The device receives a fourth indication sent by the second terminal device to trigger the first sensor to change from a first working state to a second working state, and triggers the first sensor to change from a first working state to a second working state based on the fourth indication.

[0063] In one possible design, the second terminal device includes M terminal devices, each of the M terminal devices including the first sensor;

[0064] The first location information is determined based on the second data and data collected by the first sensors of N terminal devices out of the M terminal devices, where N is less than or equal to M; and / or,

[0065] The second location information is determined based on the third data and the data collected by the first sensors of N of the M terminal devices, where N is less than or equal to M.

[0066] In one possible design, N is less than M, and the N terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices.

[0067] In one possible design, the first relative position and the second relative position include relative distance and / or relative azimuth angle.

[0068] In one possible design, the sensor state change module is used to instruct the first sensor to change from the first working state to the second working state before acquiring the second location information of the first terminal device.

[0069] In one possible design, the sensor state change module is used to establish a connection with the second terminal device;

[0070] The device receives a first indication sent by the second terminal device to trigger the first sensor to change from the first working state to the second working state, and triggers the first sensor to change from the first working state to the second working state based on the first indication.

[0071] In one possible design, the acquisition module is used for:

[0072] The second data collected by the first sensor is acquired, and the first location information of the first terminal device is determined based on the second data.

[0073] In one possible design, the acquisition module is used for:

[0074] Acquire the second data collected by the first sensor and the data collected by the first sensors of the N terminal devices, and determine the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices; or,

[0075] Acquire second data collected by the first sensor; send the second data to a target terminal device among the M terminal devices, so that the target terminal device can determine the first location information of the first terminal device based on the second data, or so that the target terminal device can determine the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices; receive the first location information sent by the target terminal device.

[0076] In one possible design, the acquisition module is used for:

[0077] The third data collected by the first sensor is acquired, and the second location information of the first terminal device is determined based on the third data.

[0078] In one possible design, the acquisition module is used for:

[0079] Acquire the third data collected by the first sensor and the data collected by the first sensors of the N terminal devices, and determine the second location information of the first terminal device based on the third data and the data collected by the first sensors of the N terminal devices; or,

[0080] Acquire third data collected by the first sensor; send the third data to a target terminal device among the M terminal devices, so that the target terminal device can determine the second location information of the first terminal device based on the third data, or so that the target terminal device can determine the second location information of the first terminal device based on the third data and the data collected by the first sensors of the N terminal devices; receive the second location information sent by the target terminal device.

[0081] In one possible design, the first sensor includes at least one of the following sensors: an ultra-wideband (UWB) sensor, an ultrasonic sensor, a laser sensor, and a vision sensor.

[0082] The second sensor includes at least one of the following sensors: accelerometer sensor, gyroscope sensor, magnetometer sensor, Bluetooth Low Energy (BLE), and Wi-Fi.

[0083] In one possible design, the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data collected by the first sensor has a data accuracy greater than a preset value.

[0084] Thirdly, this application provides a terminal device, the terminal device including a processor and a memory, the processor obtaining code stored in the memory to execute any one of the first aspect and its optional implementations.

[0085] Fourthly, this application provides a non-volatile computer-readable storage medium containing computer instructions for performing the first aspect and any of its optional implementations.

[0086] Fifthly, this application also provides a computer program product comprising code, which, when executed, is used to implement any one of the first aspect and its optional implementation methods.

[0087] In a sixth aspect, a chip is provided, the chip including a processor for performing some or all of the operations in the method described in the first aspect above.

[0088] This application provides a device positioning method applied to a first terminal device. The first terminal device includes a first sensor and a second sensor. The first sensor is used to locate the first terminal device, and the data collected by the second sensor is used to determine the position change of the first terminal device. The power of the first sensor is greater than the power of the second sensor. The method includes: acquiring the position change of the first terminal device, the position change being determined based on first data collected by the second sensor; when the position change of the first terminal device exceeds a threshold, triggering the first sensor to change from a first operating state to a second operating state, the power consumption of the first sensor in the first operating state being less than the power consumption in the second operating state; and acquiring first location information of the first terminal device, the first location information being determined based on second data collected by the first sensor in the second operating state. Through this method, the high-power first sensor is only activated when the position change of the first terminal device exceeds a threshold based on the second data collected by the low-power second sensor, thus reducing the power consumption of the first terminal device. Attached Figure Description

[0089] Figure 1a A system architecture diagram of a smart home system provided in this application embodiment;

[0090] Figure 1b A schematic diagram of the structure of the terminal device provided in this application;

[0091] Figure 2 This is a software structure block diagram of a terminal device according to an embodiment of this application;

[0092] Figure 3 A flowchart illustrating the device positioning method provided in this application embodiment;

[0093] Figure 4 A flowchart illustrating the device positioning method provided in this application embodiment;

[0094] Figure 5 A flowchart illustrating the device positioning method provided in this application embodiment;

[0095] Figure 6 A flowchart illustrating the device positioning method provided in this application embodiment;

[0096] Figure 7 A flowchart illustrating the device positioning method provided in this application embodiment;

[0097] Figure 8 A flowchart illustrating the device positioning method provided in this application embodiment;

[0098] Figure 9 A schematic diagram of the structure of a device positioning apparatus provided in an embodiment of this application;

[0099] Figure 10 A schematic diagram of the structure of a device positioning apparatus provided in an embodiment of this application;

[0100] Figure 11 A schematic diagram of the structure of a terminal device provided in this application. Detailed Implementation

[0101] The embodiments of this application are described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. As those skilled in the art will recognize, with the development of technology and the emergence of new scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0102] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that includes a series of steps or modules is not necessarily limited to those explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. The naming or numbering of steps appearing in this application does not imply that the steps in the method flow must be performed in the chronological / logical order indicated by the naming or numbering. The execution order of named or numbered process steps can be changed according to the desired technical purpose, as long as the same or similar technical effect is achieved.

[0103] Wireless positioning technology refers to the measurement and calculation methods used to determine the location of mobile users, i.e., positioning algorithms. Currently, the most commonly used positioning technologies include: time difference of arrival (TDOA) positioning, angle-of-arrival (AOA) positioning, time of arrival (TOA) positioning, and time difference of arrival (TDOA) positioning. Among these, TDOA is currently the most popular solution, and it is also used in ultra-wideband (UWB) wireless communication technology. UWB is a carrier-free communication technology; it does not use a carrier wave but instead uses short energy pulse sequences, which are spread across a frequency range through orthogonal frequency division modulation or direct sequencing.

[0104] Spatial interaction refers to human-computer interaction technologies and methods based on spatial location awareness (including the relative position and angle between devices, etc.). To achieve a better user experience, spatial awareness is needed between multiple devices. For example, existing technologies use UWB technology to implement AirDrop directional sharing. However, UWB-based device positioning consumes a lot of power. Although it can bring a good user experience in spatial interaction, it also reduces the usage time of terminal devices.

[0105] First, let me introduce the application scenarios of this application. This application can be applied in smart home systems or offices. Multiple terminal devices can be set up in a user's home or office. These multiple terminal devices have mutual spatial perception and form a spatial network (which can also be referred to as a computing system in the embodiments of this application).

[0106] Taking smart home systems as an example, Figure 1a This is a system architecture diagram of a smart home system provided in an embodiment of this application. For example... Figure 1a As shown, the smart home system includes a user terminal 11, a control center 12, and at least one screen terminal (e.g., screen terminals 13 and 14); wherein screen terminals 13 and 14 are located in different locations. The user terminal 11 and at least one screen terminal (e.g., screen terminals 13 and 14) can be in the same area or in different areas. For example, the user terminal 11 can be in the living room, and the screen terminal 13 can be in the living room or bedroom.

[0107] In some examples, both user terminal 11 and screen terminals (e.g., screen terminals 13, 14) can be electronic devices with display screens, such as mobile phones, tablets, digital cameras, personal digital assistants (PDAs), wearable devices, laptops, smart TVs, and Huawei Smart Screens. Exemplary embodiments of electronic devices include, but are not limited to, electronic devices running iOS, Android, Windows, Harmony OS, or other operating systems. The aforementioned electronic devices can also be other electronic devices, such as laptops with touch-sensitive surfaces (e.g., touch panels). This application does not specifically limit the type of electronic device.

[0108] In some examples, the control center 12 can also be a terminal device, such as a mobile phone, tablet computer, digital camera, personal digital assistant (PDA), wearable device, laptop computer, smart TV, Huawei smart screen and other electronic devices with display screens.

[0109] It should be understood that the control center 12 may not be required in the above smart home system.

[0110] User terminal 11 and screen terminals (e.g., screen terminals 13, 14) can both be connected to control center 12 via a wired network or a wireless network, or user terminal 11 and screen terminals (e.g., screen terminals 13, 14) can be connected to each other via a wired network or a wireless network. For example, the network can be a local area network (LAN) or a wide area network (WAN) (e.g., the Internet). The network between user terminal 11 and screen terminal and control center 12 can be implemented using any known network communication protocol. The aforementioned network communication protocol can be various wired or wireless communication protocols, such as Ethernet, Universal Serial Bus (USB), FireWire, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), New Radio (NR), Bluetooth, Wireless Fidelity (Wi-Fi), and other communication protocols.

[0111] In addition, user terminal 11 and screen terminals (such as screen terminals 13 and 14) can also be connected via a wired network or a wireless network. For details on network types, please refer to the description above; they will not be repeated here.

[0112] The following is a schematic diagram of the hardware structure of a terminal device according to an embodiment of this application. The terminal device can be a user terminal 11 and / or a screen terminal (e.g., screen terminals 13, 14).

[0113] Terminal equipment, also known as user equipment (UE) or electronic equipment, can be deployed on land, including indoors or outdoors, handheld or vehicle-mounted; it can also be deployed on water (such as ships); and it can also be deployed in the air (such as airplanes, balloons, and satellites). Electronic equipment can be mobile phones, tablets, wearable devices with wireless communication capabilities (such as smartwatches), location trackers with positioning capabilities, computers with wireless transceiver capabilities, virtual reality (VR) devices, augmented reality (AR) devices, wireless devices in smart homes, etc., and this application does not limit this. In this application, the aforementioned electronic equipment and the chips that can be set in the aforementioned electronic equipment are collectively referred to as electronic equipment.

[0114] The terminal devices in this application may include, but are not limited to: smartphones, televisions, tablets, wristbands, head-mounted displays (HMDs), augmented reality (AR) devices, mixed reality (MR) devices, cellular phones, smartphones, personal digital assistants (PDAs), tablet computers, in-vehicle terminal devices, laptop computers, personal computers (PCs), monitoring equipment, robots, in-vehicle terminals, and autonomous vehicles. Of course, the specific form of the terminal device is not limited in the following embodiments.

[0115] In this embodiment of the application, the terminal device may include one or more sensors (also referred to as the first sensor in this application) for collecting data for determining the relative position with other terminal devices. The first sensor may be an ultra-wideband (UWB) sensor, an ultrasonic sensor, a laser sensor, or a vision sensor.

[0116] The data collected by the UWB sensor can be used to accurately measure the relative distance and azimuth between terminal devices. The data collected by the ultrasonic sensor can also be used to accurately measure the relative distance between terminal devices. The data collected by the vision sensor can be used to accurately measure the angle between terminal devices. Positioning based on data from the first sensor provides high accuracy, but activating all these sensors simultaneously requires higher power consumption from the terminal device.

[0117] It should be understood that the first sensor can also be other sensors that can have high positioning accuracy, and this application is not limited to any particular type.

[0118] In this embodiment, the terminal device may include one or more sensors (also referred to as the second sensor in this application) for collecting data to determine whether the terminal device has moved or how much its position has changed. The second sensor may include at least one of the following sensors: accelerometer sensor, gyroscope sensor, magnetometer sensor, Bluetooth Low Energy (BLE), and Wireless Fidelity (WIFI).

[0119] The accelerometer sensor collects data to measure the movement of the terminal device itself, measuring its acceleration in the x, y, and z directions relative to its inertial coordinate system. The accelerometer sensor is the primary sensing mode of the pedometer. The gyroscope sensor collects data to measure the rotation of the terminal device itself, measuring its rotation in the x, y, and z directions relative to its inertial coordinate system. The magnetometer sensor collects data to measure the magnetic field strength detected by the terminal device, excluding drastic changes in the external environment. Changes in the magnetic field values ​​in the x, y, and z directions can indicate changes in the terminal device's position. BLE (Browser Lens) data can be used for less precise measurements of relative distance and angle between terminal devices. However, as a sensor, the received signal strength (RSS) of the BLE can serve as a position fingerprint; changes in the BLE RSS can indicate changes in the terminal device's position. While Wi-Fi data can be used for somewhat imprecise measurements of relative distances between devices, network interface cards (NICs), acting as sensors, can scan RSS (Rapid Subsequent Sequences) data, which can serve as location fingerprints. Changes in Wi-Fi RSS generally indicate changes in the location of the terminal device. Positioning based on data from a second sensor has lower accuracy, but activating these sensors simultaneously also reduces the power consumption required by the terminal device.

[0120] It should be understood that the second sensor may also be other sensors that may have lower positioning accuracy, and this application is not limited thereto.

[0121] For example, see Figure 1b The following uses a specific structure as an example to illustrate the structure of the terminal device provided in this application.

[0122] Terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, a motion sensor 180N, etc.

[0123] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0124] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0125] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0126] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0127] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0128] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C buses. The processor 110 can couple to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 can couple to the touch sensor 180K through the I2C interface, enabling the processor 110 and the touch sensor 180K to communicate through the I2C bus interface, thereby realizing the touch function of the terminal device 100.

[0129] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.

[0130] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0131] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.

[0132] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI) and a display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to enable the shooting function of the terminal device 100. The processor 110 and the display screen 194 communicate via the DSI interface to enable the display function of the terminal device 100.

[0133] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0134] USB port 130 is a USB standard compliant interface, specifically a Mini USB port, Micro USB port, USB Type-C port, etc. USB port 130 can be used to connect a charger to charge terminal device 100, and can also be used for data transfer between terminal device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other terminal devices, such as AR devices.

[0135] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the terminal device 100. In other embodiments of this application, the terminal device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0136] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the terminal device 100. While charging the battery 142, the charging management module 140 can also supply power to the terminal device via the power management module 141.

[0137] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.

[0138] The wireless communication function of the terminal device 100 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0139] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.

[0140] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0141] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0142] The wireless communication module 160 can provide solutions for wireless communication applications on the terminal device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0143] In some embodiments, the antenna 1 of the terminal device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the terminal device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technologies mentioned may include, but are not limited to: 5th-Generation (5G) systems, Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), Bluetooth, the Global Navigation Satellite System (GNSS), Wireless Fidelity (WiFi), Near Field Communication (NFC), FM (Frequency Modulation Broadcasting), Zigbee, Radio Frequency Identification (RFID), and / or Infrared (IR) technologies. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS), etc.

[0144] In some embodiments, terminal device 100 may also include a wired communication module ( Figure 1b (not shown in the image), or, the mobile communication module 150 or wireless communication module 160 here can be replaced with a wired communication module (…). Figure 1b (Not shown in the image), this wired communication module enables terminal devices to communicate with other devices via a wired network. This wired network may include, but is not limited to, one or more of the following: optical transport network (OTN), synchronous digital hierarchy (SDH), passive optical network (PON), Ethernet, or flex Ethernet (FlexE), etc.

[0145] Terminal device 100 implements display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0146] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, terminal device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0147] Terminal device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0148] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0149] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the terminal device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0150] A digital signal processor (DSP) is used to process digital signals. Besides digital image signals, it can also process other digital signals. For example, when terminal device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0151] Video codecs are used to compress or decompress digital video. Terminal device 100 may support one or more video codecs. Thus, terminal device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0152] NPU stands for Neural Network (NN) Computing Processor. By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs enable intelligent cognitive applications in terminal devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0153] The external storage interface 120 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the terminal device 100. The external storage card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external storage card.

[0154] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of terminal device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of terminal device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.

[0155] Terminal device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0156] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0157] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or make hands-free calls through the speaker 170A.

[0158] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the terminal device 100 answers a phone call or voice message, the receiver 170B can be brought close to the listener's ear to hear the voice.

[0159] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Terminal device 100 may be equipped with at least one microphone 170C. In some embodiments, terminal device 100 may be equipped with two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, terminal device 100 may be equipped with three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0160] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.

[0161] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Terminal device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, terminal device 100 detects the intensity of the touch operation based on pressure sensor 180A. Terminal device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands. For example: when a touch operation with an intensity less than a first pressure threshold is applied to the SMS application icon, a command to view an SMS is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to the SMS application icon, a command to create a new SMS is executed.

[0162] The gyroscope sensor 180B can be used to determine the motion attitude of the terminal device 100. In some embodiments, the gyroscope sensor 180B can determine the angular velocity of the terminal device 100 around three axes (i.e., the x, y, and z axes). The gyroscope sensor 180B can be used for image stabilization. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the terminal device 100's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to counteract the shake of the terminal device 100 through reverse movement, thus achieving image stabilization. The gyroscope sensor 180B can also be used in navigation and motion-sensing game scenarios.

[0163] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates altitude using the air pressure value measured by the barometric pressure sensor 180C to assist in positioning and navigation.

[0164] The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover. In some embodiments, when the terminal device 100 is a flip phone, the terminal device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. Then, based on the detected opening and closing state of the cover or the flip cover, features such as automatic flip unlocking can be set.

[0165] The 180E accelerometer can detect the magnitude of acceleration of the terminal device 100 in various directions (typically three axes). When the terminal device 100 is stationary, it can detect the magnitude and direction of gravity. It can also be used to identify the attitude of the terminal device, and can be applied to applications such as landscape / portrait switching and pedometers.

[0166] A distance sensor 180F is used to measure distance. The terminal device 100 can measure distance via infrared or laser. In some embodiments, during a shooting scene, the terminal device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.

[0167] The proximity sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The LED may be an infrared LED. The terminal device 100 emits infrared light outward through the LED. The terminal device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the terminal device 100. When insufficient reflected light is detected, the terminal device 100 can determine that there is no object near the terminal device 100. The terminal device 100 may use the proximity sensor 180G to detect when a user holds the terminal device 100 close to their ear for a call, so as to automatically turn off the screen to save power. The proximity sensor 180G can also be used in holster mode and pocket mode for automatic unlocking and screen locking.

[0168] The ambient light sensor 180L is used to sense the ambient light intensity. The terminal device 100 can adaptively adjust the brightness of the display screen 194 based on the sensed ambient light intensity. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also work with the proximity sensor 180G to detect whether the terminal device 100 is in a pocket to prevent accidental touches.

[0169] The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.

[0170] Temperature sensor 180J is used to detect temperature. In some embodiments, terminal device 100 uses the temperature detected by temperature sensor 180J to execute a temperature handling strategy. For example, when the temperature reported by temperature sensor 180J exceeds a threshold, terminal device 100 reduces the performance of the processor located near temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is below another threshold, terminal device 100 heats battery 142 to prevent abnormal shutdown of terminal device 100 due to low temperature. In still other embodiments, when the temperature is below yet another threshold, terminal device 100 boosts the output voltage of battery 142 to prevent abnormal shutdown due to low temperature.

[0171] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of terminal device 100, in a different position than display screen 194.

[0172] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire vibration signals from the vibrating bone segments of the human vocal cords. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor 180M can also be incorporated into headphones to form bone conduction headphones. The audio module 170 can parse the voice signals from the vibrating bone segments of the vocal cords acquired by the bone conduction sensor 180M to realize voice functionality. The application processor can parse heart rate information from the blood pressure signals acquired by the bone conduction sensor 180M to realize heart rate detection functionality.

[0173] The 180N motion sensor can be used to detect moving objects within the range captured by a camera, acquiring their motion contours or trajectories. For example, the 180N motion sensor can be an infrared sensor, a laser sensor, or a dynamic vision sensor (DVS). Specifically, the DVS can include sensors such as DAVIS (Dynamic and Active-pixel Vision Sensor), ATIS (Asynchronous Time-based Image Sensor), or CeleX sensors. The DVS borrows characteristics from biological vision, with each pixel simulating a neuron, independently responding to relative changes in light intensity. When the relative change in light intensity exceeds a threshold, the pixel outputs an event signal, including the pixel's position, timestamp, and characteristic information about the light intensity.

[0174] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Terminal device 100 can receive button input and generate key signal inputs related to user settings and function control of terminal device 100.

[0175] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0176] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0177] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the terminal device 100. The terminal device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the terminal device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100.

[0178] The software system of terminal device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of terminal device 100.

[0179] Figure 2 This is a software structure block diagram of the terminal device 100 according to an embodiment of the present invention.

[0180] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0181] The application layer can include a series of application packages.

[0182] like Figure 2 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and SMS.

[0183] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0184] like Figure 2 As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0185] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0186] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0187] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0188] The phone manager is used to provide communication functions for terminal device 100. For example, it manages call status (including connection, hang-up, etc.).

[0189] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0190] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of download completion or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating the device, and flashing indicator lights.

[0191] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0192] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0193] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0194] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0195] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0196] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0197] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0198] A 2D graphics engine is a graphics engine for 2D drawing.

[0199] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0200] The following is through Figure 3 The steps of the device positioning method provided in this embodiment will be described in detail, such as... Figure 3 As shown, the device positioning method may include the following steps:

[0201] 301. Obtain the position change of the first terminal device, wherein the position change is determined based on the first data collected by the second sensor.

[0202] In this embodiment of the application, in a smart home system or other indoor / outdoor scenarios, the terminal device needs to determine its relative position with other terminal devices based on data collected by its own sensors.

[0203] To obtain a high-precision device positioning result, the first terminal device can activate a first sensor with high positioning accuracy. In this application, "sensor with high positioning accuracy" does not refer to the sensor having positioning capability, but rather to the high accuracy of the device positioning calculation result based on the data collected by the sensor. It should be understood that the first sensor can be a single high-precision sensor or a combination of multiple high-precision sensors; this application is not limited in its embodiments. The data collected by the second sensor is used to determine the positional change of the first terminal device. That is, the data collected by the second sensor can be used to determine the extent of displacement of the terminal device. Positioning accuracy based on the data collected by the second sensor is lower, but the power consumption required by the terminal device is also lower when these sensors are activated. It should be understood that the second sensor can also be other sensors with lower positioning accuracy and lower power consumption; this application is not limited in its embodiments.

[0204] The data collected by the second sensor is used to determine the position change of the first terminal device. However, the data collected by the first sensor can be used to determine the relative position between terminal devices, and the data collected by the second sensor can also be used to determine the relative position between terminal devices. Alternatively, the data collected by the second sensor can be used to determine the magnitude of the position change of the terminal device, but cannot be used to determine the relative position between terminal devices.

[0205] Specifically, in one implementation, the first sensor may include, but is not limited to, at least one of the following sensors: an ultra-wideband (UWB) sensor, an ultrasonic sensor, a laser sensor, and a vision sensor. The data collected by the UWB sensor can be used to accurately measure the relative distance and relative azimuth angle between terminal devices. The data collected by the ultrasonic sensor can be used to accurately measure the relative distance between terminal devices. The data collected by the vision sensor can be used to accurately measure the angle between terminal devices. Positioning based on the data collected by the first sensor offers high accuracy, but simultaneously activating these sensors also results in higher power consumption for the terminal device.

[0206] It should be understood that the first sensor can also be other sensors that can have high positioning accuracy, and this application is not limited to any particular type.

[0207] Specifically, in one implementation, the first sensor may include, but is not limited to, at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the positioning accuracy when locating the device based on the data collected by the first sensor is greater than a preset value. When the accelerometer sensor and gyroscope sensor are activated, the power consumption of the first terminal device is also low; however, the positioning accuracy when locating the device based on the data collected by some accelerometer sensors and gyroscope sensors is also relatively high.

[0208] In this embodiment, the first terminal device may belong to a computing system. The computing system may be the smart home system described above or other indoor / outdoor scenarios. The computing system may include multiple terminal devices, and the multiple terminal devices may include a control center, which is also referred to as the second terminal device in this embodiment.

[0209] In this embodiment of the application, the computing system includes a first terminal device. In order to obtain the relative position between the first terminal device and other terminal devices in the computing system, the first terminal device can obtain first data collected by sensors installed on the first terminal device. The first data can be used to calculate the relative position between the first terminal device and other terminal devices in the computing system.

[0210] In this embodiment, the first terminal device may include a first sensor and a second sensor. Data collected by the first and second sensors are used for device positioning of the first terminal device. Data collected by the second sensor is used to determine changes in the position of the first terminal device. The power of the first sensor is greater than the power of the second sensor; that is, the power consumption required for the first terminal device to keep the first sensor active per unit time is greater than the power consumption required to keep the second sensor active. For example, the second sensor may include, but is not limited to, at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, Bluetooth Low Energy (BLE), and Wi-Fi.

[0211] The accelerometer sensor collects data to measure the movement of the terminal device itself, measuring its acceleration in the x, y, and z directions relative to its inertial coordinate system. The accelerometer sensor is the primary sensing mode of the pedometer. The gyroscope sensor collects data to measure the rotation of the terminal device itself, measuring its rotation in the x, y, and z directions relative to its inertial coordinate system. The magnetometer sensor collects data to measure the magnetic field strength detected by the terminal device, excluding drastic changes in the external environment. Changes in the magnetic field values ​​in the x, y, and z directions can indicate changes in the terminal device's position. BLE (Browser Lens) data can be used for less precise measurements of relative distance and angle between terminal devices. However, as a sensor, the received signal strength (RSS) of the BLE can serve as a position fingerprint; changes in the BLE RSS can indicate changes in the terminal device's position. While Wi-Fi data can be used for somewhat imprecise measurements of relative distances between devices, network interface cards (NICs), acting as sensors, can scan RSS (Rapid Subsequent Sequences) data, which can serve as location fingerprints. Changes in Wi-Fi RSS generally indicate changes in the location of the terminal device. Positioning based on data from a second sensor has lower accuracy, but activating these sensors simultaneously also reduces the power consumption required by the terminal device.

[0212] It should be understood that the second sensor can also be other sensors that have lower positioning accuracy and lower power consumption, and this application is not limited thereto.

[0213] In this embodiment of the application, the power consumption required for the first terminal device to keep the first sensor turned on within a unit time is greater than the power consumption required for the first terminal device to keep the second sensor turned on. However, the positioning accuracy when locating the device based on the data collected by the first sensor is greater than the positioning accuracy when locating the device based on the data obtained by the second sensor.

[0214] In other words, the relative position between the first terminal device and other terminal devices can be accurately calculated based on the data collected by the first sensor. However, the first terminal device requires high power consumption. The relative position between the first terminal device and other terminal devices cannot be accurately calculated based on the data collected by the second sensor. However, the first terminal device requires low power consumption.

[0215] It should be understood that the data collected by both the first and second sensors can be used for device positioning. However, the data collected by the first sensor can be used to determine the relative position between terminal devices, and the data collected by the second sensor can also be used to determine the magnitude of the change in the position of a terminal device, but cannot be used to determine the relative position between terminal devices. However, within a unit of time, the power consumption required for the first terminal device to keep the first sensor active is greater than the power consumption required for the first terminal device to keep the second sensor active.

[0216] The embodiments of this application can reduce the power consumption of the first terminal device while ensuring that the relative position between the first terminal device and other terminal devices can be accurately calculated.

[0217] In this embodiment, the first sensor may include a first operating state and a second operating state. The second operating state may be a sensor-off state, or a low-power state in standby mode where only some sensor functions are enabled. The first operating state may be a sensor-on state, or a high-power state where most sensor functions are enabled. For example, the first operating state may be a sensor-on state, and the second operating state may be a sensor-off state.

[0218] The following explanation will take the first working state as the sensor being off and the second working state as the sensor being on as an example.

[0219] First, let's discuss when the first terminal device activates the first sensor.

[0220] In one scenario, the first terminal device can keep the first sensor always on.

[0221] In one scenario, when all devices in the computing system where the first terminal device is located are in a preset state, the first sensor of the terminal device in the computing system can be turned on, and thus the first sensor of the first terminal device is activated. The preset state can refer to all devices simultaneously meeting the following conditions: all are powered on; they detect that they have stopped moving or are only within a certain distance range, and their moving speed and rotation speed are both less than a certain preset value, such as moving speed less than 0.01m / min and rotation speed less than 1° / min.

[0222] In one scenario, the first terminal device can keep the first sensor off until it receives a trigger to open the first sensor or determines that it should open the first sensor. For example, the first terminal device can keep the first sensor off until it establishes a connection with at least one terminal device in the computing system. Then, it can receive a fourth instruction from the target terminal device in the computing system to open the first sensor. The first terminal device can then open the first sensor based on the fourth instruction. The computing system includes M-1 terminal devices, where M-1 is a positive integer. If M-1 is greater than 1, each of the M-1 terminal devices is connected to at least one other terminal device in the M-1 system. Taking a smart home system as an example, the target terminal device can be a smart screen, and the first terminal device can be a user's mobile phone. When the user returns indoors from outdoors, the first terminal device can establish a connection with at least one terminal device in the smart home system. This connection can be a local area network connection, such as Bluetooth or Wi-Fi. In this case, the smart screen can detect the first terminal device's return to the smart home system and can then send a first instruction to open the first sensor to the first terminal device.

[0223] In this embodiment, after acquiring the third data collected by the first sensor, in order to obtain the precise location of the first terminal device, it is necessary to calculate the second location information of the first terminal device based on the third data collected by the first sensor. It should be understood that the second location information can indicate the relative position between the first terminal device and other terminal devices in the computing system, and the relative position can be the relative distance and / or relative orientation angle between the terminal devices.

[0224] It should be understood that the second location information can be directly represented by relative distance and / or relative azimuth angle, or it can be data used to calculate relative distance and / or relative azimuth angle. Regardless of how the second location information is represented, it can directly or indirectly obtain the relative position between the first terminal device and other terminal devices in the computing system.

[0225] The following describes how to obtain the second location information of the first terminal device.

[0226] In this embodiment of the application, the second location information may represent the relative position between the first terminal device and other devices in the computing system.

[0227] In one implementation, the first terminal device can acquire the third data collected by the first sensor and determine the second location information of the first terminal device based on the third data. In other words, the first terminal device can calculate the second location information itself based on the third data collected by the first sensor.

[0228] In one implementation, the first terminal device can acquire the third data collected by the first sensor and the data collected by the first sensors of other terminal devices in the system, and determine the second location information of the first terminal device based on the third data and the data collected by the first sensors of other terminal devices in the system. In other words, the first terminal device can calculate the second location information based on the third data collected by its own first sensor and the data collected by the first sensors of other terminal devices in the system.

[0229] Among them, such as Figure 4 As shown, the geometric center of the first terminal device is taken as the midpoint of the device and also as the origin of the device's coordinate system. The device establishes an X, Y, Z coordinate system based on its own structure. The distance between the two devices is the length d in space of the line connecting their centers. The orientation angles between the two devices include the elevation angle α, the horizontal angle β, and the flip angle γ.

[0230] Taking a UWB sensor as the first sensor and a simplified scenario with four devices A, B, C, and D in the computing system, the UWB sensors of all four devices are activated. Each device searches for surrounding UWB signals. Then, between every two devices, the computing system uses TDOA, TOF, and TOA positioning algorithms to calculate the relative distance between the devices, such as device A being 8.10m from device B. In the UWB positioning algorithm, any device can act as a positioning base station for other devices, without the need for additional base stations. If devices A, B, and C act as base stations, the computing system locates the position of device D relative to devices A, B, and C based on the distance from device D to devices A, B, and C. Since TOF ranging does not rely on the time synchronization between the base station and the tag, there is no error caused by clock synchronization deviation. However, the timing of the TOF ranging method depends on clock accuracy, and clock offset will introduce errors. To reduce ranging errors caused by clock offset, a two-way measurement method is typically used. The remote base station sends ranging information, the tag receives and replies, and then the tag initiates ranging again, with the remote base station responding. By calculating the average time-of-flight, the time offset between the two is reduced, thus improving ranging accuracy. The TDOA-based positioning method, also known as hyperbolic positioning, works by measuring the difference in propagation time of a UWB signal from device D to two UWB base stations (e.g., devices A and B), thus obtaining a fixed distance difference between device D and the two UWB base stations. The TOA positioning algorithm, or "Time of Arrival," achieves positioning through multiple communications between the UWB base station and the UWB tag, such as... Figure 5As shown: The UWB base station first sends a packet to the UWB tag and records its current time information, denoted as T1. The UWB tag receives the base station's information and returns an ACK. The UWB base station receives the ACK from the UWB tag and records its current time information, denoted as T2. The UWB base station calculates the time difference Tr = T2 - T1, and based on this, calculates the distance: d = c * Tr / 2, where c is the speed of light. When there are four or more devices in the positioning system, the relative positions and azimuth angles can be determined using multi-point positioning. Using the above method, the second location information of the first terminal device can be calculated.

[0231] Taking an ultrasonic sensor as the first sensor as an example, ultrasonic positioning mainly uses reflective ranging to determine the object's position through methods such as polygonal positioning. The system consists of a main rangefinder and several receivers. The main rangefinder can be placed on the target, while the receivers are fixed in an indoor environment. During positioning, a signal of the same frequency is emitted to the receivers. After receiving the signal, the receiver reflects it back to the main rangefinder. The distance is calculated based on the time difference between the echo and the emitted wave, thus determining the position. When there are three or more devices in the positioning system, the relative positions between the terminal devices can be calculated using multi-point positioning methods.

[0232] Taking a laser sensor as the first sensor as an example, its basic principle is to emit a laser pulse towards the object to be measured and start timing, stopping timing when the reflected light is received. This time can be converted into the distance between the laser and the target. A laser rangefinder can also emit multiple laser pulses, using the Doppler effect to determine whether the object is moving away from or towards the light source.

[0233] Taking the first sensor as a vision sensor as an example, the first terminal device can obtain the azimuth angle between other devices and the first terminal device through the first data collected by the vision sensor. If there is a group of devices with known positions to each other to form a multi-view vision, the position of other devices relative to the group of devices can be obtained.

[0234] It should be understood that the above method for calculating the first position information is only an illustration and is not limited to the embodiments of this application.

[0235] In one implementation, the first terminal device may not calculate the second location information. Instead, it may send the third data collected by the first sensor to other terminal devices in the computing system. These other terminal devices can function as a distributed computing system to calculate the second location information based on the third data, or a single terminal device may calculate the second location information based on the third data. After calculating the second location information, they can send it back to the first terminal device, allowing the first terminal device to obtain its own second location information. Specifically, the first terminal device can obtain the third data collected by the first sensor; send the third data to other terminal devices in the computing system so that these devices can determine the second location information of the first terminal device based on the third data, or so that these devices can determine the second location information of the first terminal device based on the third data and the data collected by the first sensors of the other terminal devices in the computing system; and receive the second location information sent by the other terminal devices in the computing system.

[0236] In one implementation, the computing system includes M terminal devices, each of the M terminal devices including the first sensor, and correspondingly, the second location information is determined based on third data collected by the first sensor and data collected by the first sensors of N of the M terminal devices, where N is less than or equal to M.

[0237] In other words, the second location information can be calculated based on data collected by the first sensors of all or some of the M terminal devices. In one implementation, N is less than M, and the N terminal devices are the N terminal devices closest to the first terminal device among the M terminal devices. When the N terminal devices among the M terminal devices collect data for determining the second location information, the first sensors of the terminal devices other than the N terminal devices among the M terminal devices are in a turned-off state. In this embodiment, the N terminal devices closest to the first terminal device can be selected to turn on their first sensors, and the second location information can be calculated based on the data collected by the first sensors of the N terminal devices. The number N depends on the total number of devices in the computing system and the positioning accuracy of the second sensor of the first terminal device itself; that is, the higher the positioning accuracy of the second sensor, the smaller N is. In this embodiment, selecting only the N terminal devices with close locations can save energy and reduce consumption while ensuring system accuracy.

[0238] It should be understood that the first sensor can be activated by N of the M terminal devices triggered by a terminal device in the computing system.

[0239] In this embodiment of the application, the first location can be shared with each terminal device in the computing system so that each terminal device in the computing system knows its relative location with the first terminal device.

[0240] It should be understood that each terminal device in a computing system can obtain its relative position to other terminal devices in the computing system based on the above method.

[0241] It should be understood that the first terminal device can also obtain other location information besides the second location information, such as the relative positions between other terminal devices, which is not limited in this application.

[0242] In this embodiment of the application, the first sensor can be triggered to change from the second working state to the first working state, for example, the first sensor can be turned off.

[0243] In this embodiment, a second location information of the first terminal device can be obtained. This second location information is determined based on third data collected by the first sensor. The first terminal device may belong to a computing system, which may be the smart home system described above or other indoor / outdoor scenarios. The computing system may include multiple terminal devices, which may include a control center, also referred to as the target terminal device in this embodiment. The computing system may include the first terminal device. To obtain its relative position with other terminal devices in the computing system, the first terminal device can obtain third data collected by the first sensor installed on the first terminal device. This third data can be used to calculate the relative position between the first terminal device and other terminal devices in the computing system. The second location information can indicate the relative position between the first terminal device and other terminal devices in the computing system. The relative position can be a relative distance and / or a relative azimuth angle.

[0244] It should be understood that the second location information can be directly represented by relative distance and / or relative azimuth angle, or it can be data used to calculate relative distance and / or relative azimuth angle. Regardless of how the first location information is represented, it can directly or indirectly obtain the relative position between the first terminal device and other terminal devices in the computing system.

[0245] The first sensor is triggered to change from the second working state to the first working state. It should be understood that this application does not limit the timing between turning off the first sensor and acquiring the second location information of the first terminal device. In one implementation, after the first sensor collects the third data and before acquiring the second location information of the first terminal device, the first sensor can be triggered to change from the second working state to the first working state. In another implementation, the first sensor is triggered to change from the second working state to the first working state only after acquiring the second location information of the first terminal device.

[0246] To reduce power consumption, this application can trigger the first sensor to change from the second operating state to the first operating state. In one implementation, other terminal devices in the computing system can trigger the first terminal device to change from the second operating state to the first operating state, for example, by turning off its own first sensor. Specifically, the first terminal device can receive an instruction from other terminal devices in the computing system to turn off the first sensor, and turn off the first sensor based on the received instruction.

[0247] In this embodiment of the application, the position change of the first terminal device can be obtained, and the position change is determined based on the first data collected by the second sensor.

[0248] In this embodiment of the application, each terminal device in the computing system includes a second sensor, and each terminal device can keep the second sensor turned on at all times. The second sensor may include at least one of the following sensors: accelerometer sensor, gyroscope sensor, magnetometer sensor, Bluetooth Low Energy (BLE), and Wi-Fi.

[0249] In this embodiment, the data precision of the data collected by the first sensor is greater than that of the data collected by the second sensor. It should be understood that in one implementation, the data collected by the second sensor cannot be used for positioning calculations of the first terminal device; it can only determine changes in the position of the first terminal device. In another implementation, the data collected by the second sensor can be used for positioning calculations of the first terminal device; however, the data precision of the data collected by the second sensor is less than that of the data collected by the first sensor.

[0250] Specifically, if the first sensor and the second sensor of the first terminal device are turned on together, after the position of the first terminal device changes, the positioning calculation of the first terminal device can be performed based on the data collected by the first sensor, and the positioning calculation of the first terminal device can also be performed based on the data collected by the second sensor (the positioning algorithm used for the data collected by the first sensor and the positioning algorithm used for the data collected by the second sensor are the same or similar). However, the positioning calculation result of the first terminal device based on the data collected by the first sensor is more accurate than the positioning calculation result of the first terminal device based on the data collected by the second sensor. The so-called higher accuracy means that the positioning calculation result of the first terminal device based on the data collected by the first sensor is closer to the actual position change of the first terminal device.

[0251] When the position change of the first terminal device exceeds a threshold based on the second data collected by the low-power second sensor, positioning calculation is performed using the data collected by the first sensor with higher positioning accuracy, thus ensuring positioning accuracy.

[0252] 302. When the position change of the first terminal device exceeds the threshold, the first sensor is triggered to change from the first working state to the second working state, for example, the first sensor can be turned on.

[0253] In this embodiment, the data collected by the second sensor can be used to determine whether the first terminal device has undergone a position change and the amount of such a change. Specifically, the criterion for determining whether the position change of the first terminal device exceeds a threshold can be based on changes in the signals collected by the second sensor. Taking a Wi-Fi sensor as an example, if the signal strength of multiple received Wi-Fi signals changes, it can be determined that the first terminal device has undergone a position change. Furthermore, the amount of the position change can be determined based on the magnitude of the change in the Wi-Fi signal strength. The Wi-Fi signal can be Wi-Fi RSS. If the change in the Wi-Fi RSS signal strength exceeds a threshold, it can be considered that the position change of the first terminal device exceeds the threshold. Similarly, if the second sensor is a magnetometer sensor, if the signal strength received by the magnetometer sensor changes, it can be determined that the first terminal device has undergone a position change. Furthermore, the amount of the position change can be determined based on the magnitude of the change in the signal strength received by the magnetometer sensor. If the change in the signal strength received by the magnetometer sensor exceeds a threshold, it can be considered that the position change of the first terminal device exceeds the threshold.

[0254] It should be noted that different thresholds may correspond to different types of first terminal devices. For example, the first terminal device can be a mobile device, such as a mobile phone, tablet, AR glasses, smartwatch, or smart bracelet; a semi-mobile device, such as a smart speaker or laptop; or a fixed device, such as a smart screen, desktop computer, or smart home appliance. The thresholds can gradually decrease from mobile devices and semi-mobile devices to fixed devices. That is, when the first terminal device is a mobile device, the first sensor is activated when the change in its position exceeds the first threshold; when the first terminal device is a semi-mobile device, the first sensor is activated when the change in its position exceeds the second threshold; and when the first terminal device is a fixed device, the first sensor is activated when the change in its position exceeds the third threshold. The first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.

[0255] In this embodiment, the threshold may include a distance threshold and an angle threshold. For example, if the second sensor is an accelerometer sensor, the accelerometer threshold can be set based on the integral of the accelerometer value over time, i.e., distance, such as 0.2m or 0.5m; if the second sensor is a gyroscope sensor, the gyroscope threshold can be set based on the integral of the gyroscope value over time, i.e., angle, such as 20° or 10°; if the second sensor is a magnetometer sensor, the magnetometer threshold can be set based on the intensity of the magnetometer change, such as 10%; if the second sensor is a BLE sensor, the threshold can be set based on the BLE's RSS; if the RSS change rate exceeds a certain percentage, it is considered exceeding the threshold, such as 20%; if the second sensor is a WIFI sensor, the threshold can be set based on the WIFI's RSS; if the RSS change rate exceeds a certain percentage, it is considered exceeding the threshold, such as 20%.

[0256] For mobile devices, such as mobile phones, considering that users are sitting on the sofa and holding and using the phone the whole time, some hand movements are not considered as the user moving the phone. The threshold for distance is set to 0.5m and the threshold for angle is set to 30°.

[0257] For semi-mobile devices, such as smart speakers, the distance threshold is set to 0.3m and the angle threshold is set to 20°. For fixed devices, such as smart screens, the distance threshold is set to 0.1m and the angle threshold is set to 10°.

[0258] In this embodiment of the application, if it is determined that the position change of the first terminal device exceeds a threshold based on the first data collected by the second sensor, the first sensor is triggered to change from the first working state to the second working state.

[0259] In this embodiment of the application, the first sensor can be triggered to be turned on by other terminal devices in the computing system. Specifically, if it is determined that the position change of the first terminal device exceeds a threshold based on the first data collected by the second sensor, the first terminal device can send a third indication to other terminal devices in the computing system to indicate that the position change of the first terminal device exceeds the threshold. After that, the first terminal device can receive a fourth indication sent by other terminal devices in the computing system to turn on the first sensor, and turn on the first sensor based on the fourth indication.

[0260] 303. Obtain the first location information of the first terminal device, wherein the first location information is determined based on the second data collected by the first sensor.

[0261] In one implementation, the first terminal device can acquire second data collected by the first sensor and determine the first location information of the first terminal device based on the second data.

[0262] In one implementation, the first terminal device can acquire second data collected by the first sensor and data collected by the first sensors of the N terminal devices, and determine the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices.

[0263] In one implementation, the first terminal device can acquire second data collected by the first sensor; send the second data to a target terminal device among the M terminal devices, so that the target terminal device can determine the first location information of the first terminal device based on the second data, or so that the target terminal device can determine the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices; and receive the first location information sent by the target terminal device.

[0264] In one implementation, the first terminal device may not calculate the first location information itself. Instead, it may send the second data collected by the first sensor to other terminal devices in the computing system. These other terminal devices can function as a distributed computing system to calculate the first location information based on the second data, or a single terminal device may calculate the first location information based on the second data. After calculating the first location information, they can send it back to the first terminal device, allowing the first terminal device to obtain its own first location information. Specifically, the first terminal device can obtain the second data collected by the first sensor; send the second data to other terminal devices in the computing system so that the other terminal devices can determine the second location of the first terminal device based on the second data, or determine the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices; and receive the first location information sent by the other terminal devices in the computing system.

[0265] Regarding how to obtain the first location information of the first terminal device, please refer to the relevant description of how to obtain the second location information of the first terminal device in the above embodiments. The similarities will not be repeated here.

[0266] In one implementation, the first sensor may include, but is not limited to, at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the positioning accuracy when locating the device based on the data collected by the first sensor is greater than a preset value. Taking an accelerometer sensor and a gyroscope sensor as the first sensor, the first terminal device can perform a time integral on the accelerometer sensor signal to obtain the movement distance since the last time the first terminal device's accelerometer was zeroed (i.e., the first terminal device was stationary), and this movement distance is based on the device's own coordinate system. Similarly, based on the gyroscope sensor signal, a time integral is performed to obtain the rotation angle since the last time the first terminal device's gyroscope was zeroed, and this rotation angle is based on the device's own coordinate system.

[0267] In this embodiment, the second location can be shared with each terminal device in the computing system so that each terminal device in the computing system knows its relative location to the first terminal device.

[0268] This application provides a device positioning method applied to a first terminal device. The first terminal device includes a first sensor and a second sensor. The first sensor is used to locate the first terminal device, and the data collected by the second sensor is used to determine the position change of the first terminal device. The power of the first sensor is greater than the power of the second sensor. The method includes: acquiring the position change of the first terminal device, the position change being determined based on first data collected by the second sensor; when the position change of the first terminal device exceeds a threshold, triggering the first sensor to change from a first operating state to a second operating state, the power consumption of the first sensor in the first operating state being less than the power consumption in the second operating state; and acquiring first location information of the first terminal device, the first location information being determined based on second data collected by the first sensor in the second operating state. Through this method, the high-power first sensor is only activated when the position change of the first terminal device exceeds a threshold based on the second data collected by the low-power second sensor, thus reducing the power consumption of the first terminal device.

[0269] Reference Figure 6 , Figure 6 This is a flowchart illustrating a device positioning method provided in an embodiment of this application. The device positioning method provided in this application can be applied to a target terminal device. The target terminal device belongs to a computing system, which includes M terminal devices. The M terminal devices include a first terminal device, which includes a first sensor and a second sensor. The first sensor is used to locate the first terminal device, and the data collected by the second sensor is used to determine the position change of the first terminal device. Furthermore, the power of the first sensor is greater than the power of the second sensor. The device positioning method provided in this application embodiment:

[0270] 601. Obtain the second location information of the first terminal device, wherein the second location information is determined based on the third data collected by the first sensor in the second working state.

[0271] In this embodiment of the application, the first location information can be shared with each terminal device in the computing system so that each terminal device in the computing system knows its relative position to the first terminal device.

[0272] It should be understood that each terminal device in a computing system can obtain its relative position to other terminal devices in the computing system based on the above method.

[0273] It should be understood that the first terminal device can also obtain other location information besides the second location information, such as the relative positions between other terminal devices, which is not limited in this application.

[0274] The specific description of step 601 can be found in the description of the relevant steps in step 301. The similarities will not be repeated here.

[0275] 602. Send a second indication to the first terminal device to trigger the first sensor to change from the second working state to the first working state, so that the first terminal device triggers the first sensor to change from the first working state to the second working state based on the second indication.

[0276] Taking a first operating state where the sensor is off and a second operating state where the sensor is on as an example, in one implementation, a target terminal device in the computing system can trigger a first terminal device to turn off its own first sensor. Specifically, the first terminal device can receive a first instruction from the target terminal device among the M terminal devices to turn off the first sensor, and turn off the first sensor based on the first instruction.

[0277] The specific description of step 602 can be found in the description of the relevant steps in step 302. The similarities will not be repeated here.

[0278] 603. If a third indication sent by the first terminal device is received, indicating that the position change of the first terminal device exceeds a threshold, then a fourth indication is sent to the first terminal device to trigger the first sensor to change from a first working state to a second working state, so that the first terminal device triggers the first sensor to change from a first working state to a second working state based on the third indication.

[0279] In this embodiment of the application, the first sensor can be triggered to be turned on by the target terminal device. Specifically, if it is determined that the position change of the first terminal device exceeds a threshold based on the first data collected by the second sensor, the first terminal device can send a third indication to the target terminal device among the M terminal devices to indicate that the position change of the first terminal device exceeds the threshold; then the second terminal device can receive a fourth indication sent by the target terminal device to turn on the first sensor, and turn on the first sensor based on the fourth indication.

[0280] The specific description of step 603 can be found in step 303. Since they are similar, they will not be repeated here.

[0281] 604. Obtain the first location information of the first terminal device, wherein the first location information is determined based on the second data collected by the first sensor.

[0282] In one possible design, the data precision of the data acquired by the first sensor is greater than that of the data acquired by the second sensor.

[0283] In one possible design, the target terminal device can send a fourth indication to the first terminal device and N of the M terminal devices to trigger the first sensor to change from a first working state to a second working state, so that the first terminal device and the N terminal devices trigger the first sensor to change from the first working state to the second working state based on the fourth indication, where N is less than or equal to M.

[0284] In one possible design, the first location information is determined based on second data collected by the first sensor and data collected by the first sensors of N of the M terminal devices.

[0285] In one possible design, N is less than M, and the target terminal device can determine the N terminal devices from the M terminal devices, wherein the N terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices.

[0286] In one possible design, the first location information and the second location information are used to indicate the relative position between the first terminal device and the terminal devices other than the first terminal device among the M terminal devices.

[0287] In one possible design, the relative position includes relative distance and / or relative azimuth.

[0288] The following description uses a computing system as an example of a smart home system to illustrate the device positioning method provided in this application embodiment, combined with a real-world scenario.

[0289] Reference Figure 7 , Figure 7 This is a flowchart illustrating a device positioning method provided in an embodiment of this application, such as... Figure 7 As shown, the computing system may include a target terminal device, a first terminal device, and at least one terminal device. The device positioning method provided in this application embodiment includes:

[0290] 701. Target terminal equipment determination: The first terminal equipment and at least one terminal equipment are in place.

[0291] The term "in position" can refer to the fact that the first terminal device and at least one other terminal device simultaneously meet the following conditions: both are powered on; they detect that they have stopped moving or are only within a certain distance range, and their moving speed and rotation speed are both less than a certain preset value, such as a moving speed of less than 0.01 m / min and a rotation speed of less than 1° / min.

[0292] 702. The target terminal device triggers the first terminal device and at least one terminal device to activate the first sensor.

[0293] 703. The first terminal device and at least one terminal device acquire the relative position between the terminal devices based on the data collected by the first sensor.

[0294] The description of step 703 can be referred to the description of step 301, and the similarities will not be repeated.

[0295] 704. The target terminal device triggers the first terminal device and at least one terminal device to shut down the first sensor.

[0296] The description of step 704 can be referred to the description of step 302, and the similarities will not be repeated here.

[0297] 705. The first terminal device determines, based on the data collected by the second sensor, that the position change exceeds a threshold.

[0298] 706. The first terminal device sends information to the target terminal device indicating that the location change exceeds a threshold.

[0299] 707. The target terminal device triggers the first terminal device and at least one terminal device to activate the first sensor.

[0300] 708. The first terminal device and at least one terminal device acquire the relative positions between the terminal devices based on the data collected by the first sensor.

[0301] 709. Trigger to shut down the first sensor.

[0302] The descriptions of steps 705 to 709 can be referred to the description of step 303, and the similarities will not be repeated here.

[0303] Reference Figure 8 , Figure 8 This is a flowchart illustrating a device positioning method provided in an embodiment of this application, such as... Figure 8 As shown, the computing system may include a target terminal device, a first terminal device, and at least one terminal device. The device positioning method provided in this application embodiment includes:

[0304] 801. Target terminal equipment: At least one terminal device is in place.

[0305] The term "in position" can refer to at least one terminal device meeting the following conditions: all are powered on; it detects that it has stopped moving or is only within a certain distance, and its moving speed and rotation speed are both less than certain preset values, such as moving speed less than 0.01m / min and rotation speed less than 1° / min.

[0306] 802. The target terminal device triggers the first terminal device and at least one terminal device to activate the first sensor.

[0307] 803. At least one terminal device obtains the relative position between terminal devices based on the data collected by the first sensor.

[0308] The description of step 803 can be referred to the description of step 301, and the similarities will not be repeated.

[0309] 804. The target terminal device triggers at least one terminal device to shut down the first sensor.

[0310] The description of step 804 can be referred to the description of step 302, and the similarities will not be repeated here.

[0311] 805. Target terminal device determination: The first terminal device is connected to the computing system.

[0312] In one scenario, the first terminal device can keep the first sensor in a closed state until it receives a trigger to open the first sensor or determines that it should open the first sensor. For example, the first terminal device can keep the first sensor in a closed state until it establishes a connection with at least one terminal device in the computing system and receives an instruction to open the first sensor from the target terminal device in the computing system. The first terminal device can then open the first sensor based on the fourth instruction.

[0313] 806. The target terminal device triggers the first terminal device and at least one terminal device to activate the first sensor.

[0314] 807. The first terminal device and at least one terminal device acquire the relative positions between the terminal devices based on the data collected by the first sensor.

[0315] 808. Trigger to shut down the first sensor.

[0316] The descriptions of steps 805 to 808 can be referred to the description of step 303, and the similarities will not be repeated here.

[0317] Reference Figure 9 , Figure 9This is a schematic diagram of a device positioning apparatus provided in an embodiment of this application. The device positioning apparatus provided in this application can be applied to a first terminal device. The first terminal device includes a first sensor and a second sensor. Data collected by the first sensor is used to locate the first terminal device, and data collected by the second sensor is used to determine the position change of the first terminal device. Furthermore, the power of the first sensor is greater than the power of the second sensor. Figure 9 As shown, the device positioning device 900 provided in this application embodiment may include:

[0318] The acquisition module 901 is used to acquire the position change of the first terminal device, wherein the position change is determined based on the first data collected by the second sensor;

[0319] The steps performed by the acquisition module 901 can be referred to in step 301 and the description in the corresponding embodiment, and will not be repeated here.

[0320] The sensor state change module 902 is used to trigger the first sensor to change from a first working state to a second working state when the position change of the first terminal device exceeds a threshold. The power consumption of the first sensor in the first working state is less than the power consumption in the second working state.

[0321] The steps performed by the sensor state change module 902 can be referred to in step 302 and the description in the corresponding embodiment, and will not be repeated here.

[0322] The acquisition module 901 is used to acquire the first location information of the first terminal device, wherein the first location information is determined based on the second data collected by the first sensor in the second working state.

[0323] The steps performed by the acquisition module 901 can be referred to in step 303 and the description in the corresponding embodiment, and will not be repeated here.

[0324] In one possible design, the acquisition module is used to acquire second location information of the first terminal device before acquiring the location change of the first terminal device, wherein the second location information is determined based on third data collected by the first sensor in the second working state;

[0325] The sensor state change module is used to trigger the first sensor to change from the second working state to the first working state.

[0326] In one possible design, the data precision of the data acquired by the first sensor is greater than that of the data acquired by the second sensor.

[0327] In one possible design, the sensor state change module is used for:

[0328] After triggering the first sensor to change from the first working state to the second working state, trigger the first sensor to change from the second working state back to the first working state.

[0329] In one possible design, the first location information is used to indicate a first relative position between the first terminal device and the second terminal device;

[0330] The second location information is used to indicate the second relative position between the first terminal device and the second terminal device;

[0331] The second terminal device and the first terminal device belong to the same computing system.

[0332] In one possible design, the sensor state change module is configured to receive a second indication sent by the second terminal device to trigger the first sensor to change from the second working state to the first working state, and to trigger the first sensor to change from the second working state to the first working state based on the second indication.

[0333] In one possible design, the sensor state change module is used to send a third indication to the second terminal device when the position change of the first terminal device exceeds a threshold.

[0334] The device receives a fourth indication sent by the second terminal device to trigger the first sensor to change from a first working state to a second working state, and triggers the first sensor to change from a first working state to a second working state based on the fourth indication.

[0335] In one possible design, the second terminal device includes M terminal devices, each of the M terminal devices including the first sensor;

[0336] The first location information is determined based on the second data and data collected by the first sensors of N terminal devices out of the M terminal devices, where N is less than or equal to M; and / or,

[0337] The second location information is determined based on the third data and the data collected by the first sensors of N of the M terminal devices, where N is less than or equal to M.

[0338] In one possible design, N is less than M, and the N terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices.

[0339] In one possible design, the first relative position and the second relative position include relative distance and / or relative azimuth angle.

[0340] In one possible design, the sensor state change module is used to instruct the first sensor to change from the first working state to the second working state before acquiring the second location information of the first terminal device.

[0341] In one possible design, the sensor state change module is used to establish a connection with the second terminal device;

[0342] The device receives a first indication sent by the second terminal device to trigger the first sensor to change from the first working state to the second working state, and triggers the first sensor to change from the first working state to the second working state based on the first indication.

[0343] In one possible design, the acquisition module is used for:

[0344] The second data collected by the first sensor is acquired, and the first location information of the first terminal device is determined based on the second data.

[0345] In one possible design, the acquisition module is used for:

[0346] Acquire the second data collected by the first sensor and the data collected by the first sensors of the N terminal devices, and determine the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices; or,

[0347] Acquire second data collected by the first sensor; send the second data to a target terminal device among the M terminal devices, so that the target terminal device can determine the first location information of the first terminal device based on the second data, or so that the target terminal device can determine the first location information of the first terminal device based on the second data and the data collected by the first sensors of the N terminal devices; receive the first location information sent by the target terminal device.

[0348] In one possible design, the acquisition module is used for:

[0349] The third data collected by the first sensor is acquired, and the second location information of the first terminal device is determined based on the third data.

[0350] In one possible design, the acquisition module is used for:

[0351] Acquire the third data collected by the first sensor and the data collected by the first sensors of the N terminal devices, and determine the second location information of the first terminal device based on the third data and the data collected by the first sensors of the N terminal devices; or,

[0352] Acquire third data collected by the first sensor; send the third data to a target terminal device among the M terminal devices, so that the target terminal device can determine the second location information of the first terminal device based on the third data, or so that the target terminal device can determine the second location information of the first terminal device based on the third data and the data collected by the first sensors of the N terminal devices; receive the second location information sent by the target terminal device.

[0353] In one possible design, the first sensor includes at least one of the following sensors: an ultra-wideband (UWB) sensor, an ultrasonic sensor, a laser sensor, and a vision sensor.

[0354] The second sensor includes at least one of the following sensors: accelerometer sensor, gyroscope sensor, magnetometer sensor, Bluetooth Low Energy (BLE), and Wi-Fi.

[0355] In one possible design, the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data collected by the first sensor has a data accuracy greater than a preset value.

[0356] Reference Figure 10 , Figure 10 This is a schematic diagram of a device positioning device provided in an embodiment of this application. The device positioning device provided in this application can be applied to a target terminal device. The target terminal device belongs to a computing system, and the computing system includes M terminal devices. The M terminal devices include a first terminal device. The first terminal device includes a first sensor and a second sensor. The data collected by the second sensor is used to determine the position change of the first terminal device, and the power of the first sensor is greater than the power of the second sensor. The device positioning device 1000 provided in this application may include:

[0357] The acquisition module 1001 is used to acquire the second location information of the first terminal device, wherein the second location information is determined based on the third data collected by the first sensor in the second working state.

[0358] The steps performed by the acquisition module 1001 can be referred to in steps 601, 604 and the descriptions in the corresponding embodiments, and will not be repeated here.

[0359] The sending module 1002 is used to send a second indication to the first terminal device to trigger the first sensor to change from a second working state to a first working state, so that the first terminal device triggers the first sensor to change from a first working state to a second working state based on the second indication.

[0360] If a third indication is received from the first terminal device indicating that the position change of the first terminal device exceeds a threshold, a fourth indication is sent to the first terminal device to trigger the first sensor to change from a first working state to a second working state, so that the first terminal device triggers the first sensor to change from a first working state to a second working state based on the third indication.

[0361] The steps performed by the sending module 1002 can be referred to in steps 602 and 603 and the descriptions in the corresponding embodiments, and will not be repeated here.

[0362] The acquisition module 1001 is used to acquire the first location information of the first terminal device, wherein the first location information is determined based on the second data collected by the first sensor.

[0363] In one possible design, the data precision of the data acquired by the first sensor is greater than that of the data acquired by the second sensor.

[0364] In one possible design, the target terminal device can send a fourth indication to the first terminal device and N of the M terminal devices to trigger the first sensor to change from a first working state to a second working state, so that the first terminal device and the N terminal devices trigger the first sensor to change from the first working state to the second working state based on the fourth indication, where N is less than or equal to M.

[0365] In one possible design, the first location information is determined based on second data collected by the first sensor and data collected by the first sensors of N of the M terminal devices.

[0366] In one possible design, N is less than M, and the target terminal device can determine the N terminal devices from the M terminal devices, wherein the N terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices.

[0367] In one possible design, the first location information and the second location information are used to indicate the relative position between the first terminal device and the terminal devices other than the first terminal device among the M terminal devices.

[0368] In one possible design, the relative position includes relative distance and / or relative azimuth.

[0369] In one possible design, the first sensor includes at least one of the following sensors: an ultra-wideband (UWB) sensor, an ultrasonic sensor, a laser sensor, and a vision sensor.

[0370] The second sensor includes at least one of the following sensors: accelerometer sensor, gyroscope sensor, magnetometer sensor, Bluetooth Low Energy (BLE), and Wi-Fi.

[0371] In one possible design, the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data collected by the first sensor has a data accuracy greater than a preset value.

[0372] Reference Figure 11 , Figure 11 This application provides a schematic diagram of the structure of a terminal device 1500, which can be described in the above embodiments. Figure 9 The device positioning device 900 described in the above embodiment, or the device positioning device 900 described in the above embodiment. Figure 10 The device positioning device 1000 described in the document, such as Figure 11 As shown, the terminal device includes a processor 1501 and a memory 1502, the processor 1501 being used to retrieve code from the memory 1502 for execution. Figure 3 , Figure 6 The device positioning method described in the corresponding embodiment.

[0373] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0374] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.

[0375] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0376] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0377] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a server, or other network device, etc.) to execute this application. Figure 2 All or part of the steps of the method described in the embodiments. The aforementioned storage medium includes: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media capable of storing program code.

Claims

1. A device positioning method characterized by, The method is applied to a first terminal device, which includes a first sensor and a second sensor. The first sensor is used to locate the first terminal device, and the data collected by the second sensor is used to determine changes in the position of the first terminal device. The power of the first sensor is greater than the power of the second sensor. The first sensor includes at least one of the following sensors: an ultra-wideband (UWB) sensor, an ultrasonic sensor, a laser sensor, and a vision sensor. The method includes: The position change of the first terminal device is obtained, and the position change is determined based on the first data collected by the second sensor; When the position change of the first terminal device exceeds a threshold, the threshold including at least one of a distance threshold or an angle threshold, the first sensor is triggered to change from a first working state to a second working state, and the power consumption of the first sensor in the first working state is less than the power consumption in the second working state. The first location information of the first terminal device is obtained. The first location information is determined based on the second data collected by the first sensor in the second working state. The first location information is used to indicate the first relative position between the first terminal device and the second terminal device. The second terminal device and the first terminal device belong to the same computing system.

2. The method of claim 1, wherein, The method further includes: Before obtaining the position change of the first terminal device, the second position information of the first terminal device is obtained, and the second position information is determined based on the third data collected by the first sensor in the second working state; The first sensor is triggered to change from the second working state to the first working state.

3. The method according to claim 1, characterized in that, The data accuracy of the data collected by the first sensor is greater than that of the data collected by the second sensor.

4. The method according to claim 2, characterized in that, The second location information is used to indicate the second relative position between the first terminal device and the second terminal device.

5. The method according to claim 4, characterized in that, The second terminal device includes M terminal devices, and each of the M terminal devices includes the first sensor; The first location information is determined based on the second data and data collected by the first sensors of N terminal devices out of the M terminal devices, where N is less than or equal to M; And / or, The second location information is determined based on the third data and the data collected by the first sensors of N of the M terminal devices, where N is less than or equal to M.

6. The method according to claim 5, characterized in that, The N is less than the M, and the N terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices.

7. The method according to any one of claims 4 to 6, characterized in that, The first relative position and the second relative position include relative distance and / or relative azimuth angle.

8. The method according to any one of claims 2 to 6, characterized in that, Before obtaining the second location information of the first terminal device, the method further includes: This indicates that the first sensor changes from the first operating state to the second operating state.

9. The method according to claim 8, characterized in that, The triggering of the first sensor to change from the first working state to the second working state includes: Establish a connection with the second terminal device; The device receives a first indication sent by the second terminal device to trigger the first sensor to change from the first working state to the second working state, and triggers the first sensor to change from the first working state to the second working state based on the first indication.

10. The method according to any one of claims 1 to 6, characterized in that, The second sensor includes at least one of the following sensors: accelerometer sensor, gyroscope sensor, magnetometer sensor, Bluetooth Low Energy (BLE), and Wi-Fi.

11. A method for positioning equipment, characterized in that, Applied to a second terminal device, the method includes: A connection is established with a first terminal device; the first terminal device includes a first sensor and a second sensor, wherein the first sensor is used to locate the first terminal device, the data collected by the second sensor is used to determine the position change of the first terminal device, and the power of the first sensor is greater than the power of the second sensor, and the first sensor includes at least one of the following sensors: ultra-wideband UWB sensor, ultrasonic sensor, laser sensor and vision sensor. When the position change of the first terminal device exceeds a threshold, a first indication is sent to the first terminal device to trigger the first sensor to change from a first working state to a second working state, and the first sensor is triggered to change from the first working state to the second working state based on the first indication. The power consumption of the first sensor in the first working state is less than the power consumption in the second working state. The second working state is used to collect second data. The second data is used to determine the first position information of the first terminal device. The first position information is used to indicate the first relative position between the first terminal device and the second terminal device. The second terminal device and the first terminal device belong to the same computing system. The threshold includes at least one of a distance threshold or an angle threshold.

12. A device positioning apparatus, characterized in that, An application is made to a first terminal device, which includes a first sensor and a second sensor. Data collected by the first sensor is used to locate the first terminal device, and data collected by the second sensor is used to determine changes in the location of the first terminal device. The power of the first sensor is greater than the power of the second sensor. The first sensor includes at least one of the following sensors: an ultra-wideband (UWB) sensor, an ultrasonic sensor, a laser sensor, and a vision sensor. The device includes: The acquisition module is used to acquire the position change of the first terminal device, wherein the position change is determined based on the first data collected by the second sensor; A sensor state change module is used to trigger the first sensor to change from a first working state to a second working state when the position change of the first terminal device exceeds a threshold, the threshold including at least one of a distance threshold or an angle threshold, wherein the power consumption of the first sensor in the first working state is less than the power consumption in the second working state. The acquisition module is used to acquire the first location information of the first terminal device. The first location information is determined based on the second data collected by the first sensor in the second working state. The first location information is used to indicate the first relative position between the first terminal device and the second terminal device. The second terminal device and the first terminal device belong to the same computing system.

13. The apparatus according to claim 12, characterized in that, The acquisition module is used to acquire second location information of the first terminal device before acquiring the location change of the first terminal device. The second location information is determined based on third data collected by the first sensor in the second working state. The sensor state change module is used to trigger the first sensor to change from the second working state to the first working state.

14. The apparatus according to claim 12, characterized in that, The data accuracy of the data collected by the first sensor is greater than that of the data collected by the second sensor.

15. The apparatus according to claim 13, characterized in that, The second location information is used to indicate the second relative position between the first terminal device and the second terminal device.

16. The apparatus according to claim 15, characterized in that, The second terminal device includes M terminal devices, and each of the M terminal devices includes the first sensor; The first location information is determined based on the second data and data collected by the first sensors of N terminal devices out of the M terminal devices, where N is less than or equal to M; And / or, The second location information is determined based on the third data and the data collected by the first sensors of N of the M terminal devices, where N is less than or equal to M.

17. The apparatus according to claim 16, characterized in that, The N is less than the M, and the N terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices.

18. The apparatus according to any one of claims 15 to 17, characterized in that, The first relative position and the second relative position include relative distance and / or relative azimuth angle.

19. The apparatus according to any one of claims 14 to 17, characterized in that, The sensor state change module is used to instruct the first sensor to change from the first working state to the second working state before acquiring the second location information of the first terminal device.

20. The apparatus according to claim 19, characterized in that, The sensor state change module is used to establish a connection with the second terminal device; The device receives a first indication sent by the second terminal device to trigger the first sensor to change from the first working state to the second working state, and triggers the first sensor to change from the first working state to the second working state based on the first indication.

21. The apparatus according to any one of claims 12 to 16, characterized in that, The second sensor includes at least one of the following sensors: accelerometer sensor, gyroscope sensor, magnetometer sensor, Bluetooth Low Energy (BLE), and Wi-Fi.

22. The apparatus according to any one of claims 12 to 16, characterized in that, The first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data collected by the first sensor has a data accuracy greater than a preset value.

23. A non-volatile computer-readable storage medium, characterized in that, The non-volatile computer-readable storage medium contains computer instructions that, when executed by one or more computers, are used to perform the device positioning method according to any one of claims 1 to 11.

24. A terminal device, characterized in that, The terminal device includes a memory and a processor. The memory stores code, and the processor is used to retrieve the code to execute the device positioning method according to any one of claims 1 to 11.