WO2022028362A1 - Device positioning method and related device therefor - Google Patents

Device positioning method and related device therefor Download PDF

Info

Publication number
WO2022028362A1
WO2022028362A1 PCT/CN2021/110046 CN2021110046W WO2022028362A1 WO 2022028362 A1 WO2022028362 A1 WO 2022028362A1 CN 2021110046 W CN2021110046 W CN 2021110046W WO 2022028362 A1 WO2022028362 A1 WO 2022028362A1
Authority
WO
WIPO (PCT)
Prior art keywords
sensor
terminal device
working state
data collected
change
Prior art date
Application number
PCT/CN2021/110046
Other languages
French (fr)
Chinese (zh)
Inventor
何彦杉
许强
刘哲
黄雪妍
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022028362A1 publication Critical patent/WO2022028362A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/023Services making use of location information using mutual or relative location information between multiple location based services [LBS] targets or of distance thresholds
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/38Services specially adapted for particular environments, situations or purposes for collecting sensor information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/02Power saving arrangements
    • H04W52/0209Power saving arrangements in terminal devices
    • H04W52/0225Power saving arrangements in terminal devices using monitoring of external events, e.g. the presence of a signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W52/00Power management, e.g. TPC [Transmission Power Control], power saving or power classes
    • H04W52/04TPC
    • H04W52/18TPC being performed according to specific parameters
    • H04W52/28TPC being performed according to specific parameters using user profile, e.g. mobile speed, priority or network state, e.g. standby, idle or non transmission
    • H04W52/288TPC being performed according to specific parameters using user profile, e.g. mobile speed, priority or network state, e.g. standby, idle or non transmission taking into account the usage mode, e.g. hands-free, data transmission, telephone
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of computers, and in particular, to a device positioning method and related devices.
  • Wireless positioning technology refers to the measurement method and calculation method used to determine the location of a mobile user, that is, a positioning algorithm.
  • the most commonly used positioning technologies are: time difference positioning technology, signal angle of arrival (angle-of-arrival, AOA) technology, time of arrival (time of arrival, TOA) and time difference of arrival (time different of arrival, TDOA) positioning Wait.
  • the TDOA technology is the most popular solution at present, and the ultra-wideband wireless communication technology (ultra wide band, UWB) also adopts this technology.
  • UWB is a carrierless communication technology. UWB does not use a carrier, but a short sequence of energy pulses, and the pulses are extended to a frequency range through orthogonal frequency division modulation or direct sequencing.
  • Spatial interaction refers to human-computer interaction technologies and methods based on spatial position awareness (including relative position and angle between devices, etc.).
  • users need to realize spatial awareness between multiple devices.
  • the existing technology center uses UWB technology to realize the Airdrop directional sharing function.
  • the device positioning based on UWB has high power consumption. Although it can bring a good experience to the user in spatial interaction, it also reduces the use time of the terminal device.
  • the present application provides a device positioning method, which is applied to a first terminal device, where the first terminal device may be a terminal device in a smart home system or other indoor/outdoor scenarios.
  • the data collected by the first sensor and the second sensor is used to locate the first terminal device by the device, and the data collected by the second sensor is used to determine the position change of the first terminal device.
  • the terminal device can turn on the sensor carried by itself, and the data collected by the sensor can be used for device positioning.
  • the so-called device positioning in this application can be understood as determining the relationship between terminal devices. relative position.
  • the first terminal device can turn on the first sensor with high positioning accuracy.
  • the so-called sensor with high positioning accuracy in this application does not mean that the sensor has positioning capability, but refers to The calculation result of device positioning based on the data collected by the sensor has high precision.
  • the first sensor may be a high-precision sensor or a combination of multiple precision sensors, which is not limited in this embodiment of the present application.
  • the data collected by the second sensor is used to determine the position change of the first terminal device, that is, the data collected by the second sensor can be used to determine how much displacement has occurred in the terminal device, based on the data collected by the second sensor.
  • the positioning accuracy of the data for positioning is low, but the corresponding power consumption of the terminal device is also low when these sensors are turned on at the same time.
  • the second sensor may also be other sensors with lower positioning accuracy and lower power consumption, which is not limited in this application.
  • the data collected by the second sensor is used to determine the position change of the first terminal device, but the data collected by the first sensor can be used to determine the relative position between the terminal devices, and the data collected by the second sensor can also It is used to determine the relative position between the terminal devices, or the data collected by the second sensor can be used to determine the size of the position change of the terminal device, but cannot be used to determine the relative position between the terminal devices.
  • the power of the first sensor is greater than the power of the second sensor, that is, in a unit time, the power consumption required by the first terminal device to keep the first sensor turned on is greater than that of the first terminal device. The power consumption required for turning on the second sensor.
  • the method includes: acquiring a position change of the first terminal device, the position change being determined according to the first data collected by the second sensor; when the position change of the first terminal device exceeds a threshold, triggering the The first sensor is changed from a first working state to a second working state, and the power consumption of the first sensor in the first working state is smaller than that in the second working state.
  • the second working state may be a sensor off state, or a low power consumption state in which only a part of the sensor functions are turned on in a standby state.
  • the first working state may be a sensor-on state, or a high-power-consumption state in which most sensor functions are turned on.
  • the first operating state is a sensor-on state
  • the second operating state is a sensor-off state.
  • Acquire first location information of the first terminal device where the first location information is determined according to second data collected by the first sensor.
  • the threshold may include a distance threshold and an angle threshold.
  • the first terminal device may be a mobile device, such as a mobile phone, a Pad, AR glasses, a smart watch, a smart bracelet, etc.
  • the first terminal device may be a semi-mobile device such as a smart speaker, a notebook computer, etc.
  • the first terminal device may be a fixed device such as a smart screen, a desktop computer, a smart home appliance, and the like. From mobile devices, semi-mobile devices to fixed devices, the corresponding thresholds can be gradually reduced.
  • the first terminal device when the first terminal device is a mobile device, when the position of the first terminal device changes beyond the first threshold, all The first sensor, when the first terminal device is a semi-mobile device, when the position change of the first terminal device exceeds the second threshold, the first sensor is turned on, and when the first terminal device is a fixed device, when the first When the position change of a terminal device exceeds a third threshold, the first sensor is turned on, the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.
  • the first terminal device may belong to a computing system, the computing system may be the above-described smart home system or other indoor/outdoor scenarios, and the computing system may include multiple terminal devices, wherein the multiple terminal devices may include a control center, the control center This embodiment is also referred to as a target terminal device.
  • the computing system may include a first terminal device, and in order to obtain a relative position with other terminal devices in the computing system, the first terminal device may obtain second data collected by a first sensor set on the first terminal device, the second data It can be used to calculate the relative position between the first terminal device and other terminal devices in the computing system.
  • the first location information may indicate a relative location between the first terminal device and other terminal devices in the computing system, and the relative location may be a relative distance and/or a relative azimuth.
  • the first position information may be directly represented by relative distance and/or relative azimuth, or may be data used to calculate relative distance and/or relative azimuth. Or indirectly obtain the relative position between the first terminal device and other terminal devices in the computing system.
  • the first sensor with high power consumption is triggered to change from the first working state to In the second working state, the power consumption of the first terminal device is reduced.
  • the method further includes: before acquiring the location change of the first terminal device, acquiring second location information of the first terminal device, where the second location information is based on the It is determined by 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.
  • the second location information of the first terminal device may be acquired, and the second location information is determined according to the third data collected by the first sensor; the first terminal device may belong to a computing system, and the computing
  • the system may be the smart home system described above or other indoor/outdoor scenarios, and the computing system may include multiple terminal devices, wherein the multiple terminal devices may include a control center, which is also referred to as the target terminal device in this embodiment.
  • the computing system may include a first terminal device, and in order to obtain a relative position with other terminal devices in the computing system, the first terminal device may obtain third data collected by a first sensor set on the first terminal device, the third data It 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 may indicate a relative location between the first terminal device and other terminal devices in the computing system, and the relative location may be a relative distance and/or a relative azimuth.
  • the second position information may be directly represented by relative distance and/or relative azimuth, or may be data used to calculate relative distance and/or relative azimuth, no matter what the expression of the first position information is, its The relative positions between the first terminal device and other terminal devices in the computing system can be obtained directly or indirectly.
  • the first sensor Trigger the first sensor to change from the second working state to the first working state; it should be understood that this application does not limit the period between turning off the first sensor and acquiring the second position information of the first terminal device
  • the first sensor can be triggered to change from the second working state to the all In the first working state, in one implementation, the first sensor is triggered to change from the second working state to the first working state after acquiring the second position information of the first terminal device.
  • the first sensor may be triggered to change from the second working state to the first working state.
  • other terminal devices in the computing system may trigger the first terminal device to change from the second working state to the first working state, for example, turning off its own first sensor.
  • the first terminal device may receive an instruction for turning off the first sensor sent by other terminal devices in the computing system, and turn off the first sensor based on the received instruction.
  • the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
  • the data collected by the second sensor cannot be used to perform the positioning operation of the first terminal device, and can only determine the location change of the first terminal device.
  • the data collected by the second sensor can be used to perform the positioning operation of the first terminal device.
  • the data accuracy of the data collected by the second sensor is smaller than that of the data collected by the first sensor. data precision.
  • the positioning calculation of the first terminal device can be performed according to the data collected by the first sensor, and according to the second sensor
  • the collected data can also perform the positioning calculation of the first terminal device (the positioning algorithm using the data collected by the first sensor is the same as or similar to the positioning algorithm using the data collected by the second sensor), but according to the data collected by the first sensor
  • the calculation result that can perform the positioning calculation of the first terminal device is more accurate than the calculation result that can also perform the positioning calculation of the first terminal device according to the data collected by the second sensor.
  • the so-called high accuracy is based on the first sensor.
  • the collected data can be used for positioning calculation of the first terminal device, and the calculation result is closer to the actual position change of the first terminal device.
  • the positioning calculation is performed by using the data collected by the first sensor with higher positioning accuracy, so as to ensure the positioning accuracy .
  • the method further includes:
  • the first sensor 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 to the first working state.
  • this application does not limit the timing between triggering the change of the first sensor from the second working state to the first working state and acquiring the first position information of the first terminal device.
  • the first sensor can be triggered to change from the second working state to the first working state, and In one implementation, the first sensor is triggered to change from the second working state to the first working state after acquiring the first position information of the first terminal device.
  • the first position information is used to indicate a first relative position between the first terminal device and the second terminal device;
  • the second position information is used to indicate the first terminal
  • the second relative position between the device and the second terminal device; the second terminal device and the first terminal device belong to the same computing system.
  • the first terminal device belongs to a computing system, and the computing system further includes other terminal devices (second terminal devices), and the second terminal device may be understood as one or more terminal devices.
  • the triggering of the first sensor to change from the second working state to the first working state includes: receiving a message sent by the second terminal device for triggering the first sensor A second indication of the sensor changing from the second working state to the first working state, and triggering the first sensor to change from the second working state to the first working state based on the second indication.
  • triggering the first sensor to change from the first working state to the second working state includes:
  • the state changes to the second working state.
  • the second terminal device includes M terminal devices, and each terminal device in the M terminal devices includes the first sensor;
  • the first location information is determined according to the second data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M; and/or,
  • the second location information is determined according to the third data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M.
  • the calculation of the first position may be performed based on the data collected by the first sensors of all or part of the M terminal devices.
  • the N is less than the M, and the N The terminal devices are N terminal devices that are closest to the first terminal device among the M terminal devices, and N terminal devices in the M terminal devices collect data for determining the second position is in the first working state, for example, in an off state, among the M terminal devices except the N terminal devices.
  • N terminal devices closest to the first terminal device may be selected to be in the second working state, and the calculation of the first position information is performed based on 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, 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 the embodiment of the present application, only N terminal equipments located close to each other are selected, which can save energy and reduce consumption under the condition of ensuring system accuracy.
  • 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.
  • the first relative position and the second relative position include relative distances and/or relative azimuths.
  • the relative azimuth angle can also be referred to as a relative pose, such as a relative 3DOF pose.
  • the method before the acquiring the second location information of the first terminal device, the method further includes:
  • the triggering of the first sensor to change from the first working state to the second working state includes:
  • the first terminal device may keep the first sensor in the first working state, for example, in an off state, until receiving a trigger for the first sensor to change from the first working state to the first working state
  • the first indication of the second working state or the self-determination should be changed from the first working state to the second working state.
  • the first terminal The device can keep the off state of the first sensor until after the first terminal device establishes a connection with at least one terminal device (second terminal device) in the computing system, it can receive the opening said device sent by the second terminal device in the computing system.
  • the first indication of the first sensor the first terminal device may turn on the first sensor based on the first indication.
  • the target terminal device can be a smart screen
  • the first terminal device can be a mobile phone carried by the user.
  • the first terminal device can be connected to at least one of the smart home system.
  • a terminal device is established.
  • the so-called established connection can be a local area network connection, such as Bluetooth, WIFI, etc.
  • the smart screen can capture the first terminal device and return to the smart home system, then the second terminal device can send to the smart home system.
  • the first terminal device sends a first instruction to turn on the first sensor.
  • the acquiring the first location information of the first terminal device includes: acquiring second data collected by the first sensor, and determining the first terminal according to the second data The first location information of the device.
  • the acquiring the first location information of the first terminal device includes: acquiring 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 according to the second data and the data collected by the first sensors of the N terminal devices; or, obtain the second data collected by the first sensor;
  • the target terminal device among the M terminal devices sends the second data, so that the target terminal device can determine the first location information of the first terminal device according to the second data, or the target terminal device can determine the first location information of the first terminal device according to the second data.
  • the acquiring the second location information of the first terminal device includes: acquiring third data collected by the first sensor, and determining the first terminal according to the third data Second location information of the device.
  • the acquiring the second position information of the first terminal device includes: acquiring third data collected by the first sensor and data collected by the first sensors of the N terminal devices , and determine the second position information of the first terminal device according to the third data and the data collected by the first sensors of the N terminal devices; or, obtain the third data collected by the first sensor;
  • the target terminal device among the M terminal devices sends the third data, so that the target terminal device can determine the second location information of the first terminal device according to the third data, or so that the target terminal device can determine the second location information of the first terminal device according to the third data.
  • 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, and the ultrasonic sensor The sensor may include an ultrasonic transmitter and an ultrasonic receiver, and the laser sensor may include a laser transmitter and a laser receiver.
  • the second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
  • the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the positioning accuracy when positioning the device according to the data collected by the first sensor is greater than a preset value .
  • the accelerometer sensor and the gyroscope sensor are turned on, the power consumption of the first terminal device is also low.
  • the positioning accuracy of the data collected by some accelerometer sensors and the gyroscope sensor for device positioning is also high.
  • the present application provides a device positioning apparatus, which is applied to a first terminal device, where the first terminal device includes a first sensor and a second sensor, wherein the data collected by the first sensor is used for all The first terminal device is positioned, 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 device includes:
  • an acquisition module configured to acquire a position change of the first terminal device, where the position change is determined according to the first data collected by the second sensor;
  • a sensor state change module configured 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, and the first sensor is in the first working state
  • the power consumption is less than the power consumption in the second working state
  • the acquiring module is configured to acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor in the second working state.
  • the acquiring module is configured to acquire second location information of the first terminal device before acquiring the location change of the first terminal device, where the second location information is based on the determined by the third data collected by the first sensor in the second working state;
  • the sensor state changing module is configured to trigger the first sensor to change from the second working state to the first working state.
  • the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
  • the sensor state change module is used to:
  • the first sensor 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 to the first working state.
  • the first position information is used to indicate a first relative position between the first terminal device and the second terminal device;
  • the second position 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.
  • the sensor state change module is configured to receive a message sent by the second terminal device for triggering the first sensor to change from the second working state to the first working state a second indication, and triggering the first sensor to change from the second working state to the first working state based on the second indication.
  • the sensor state change module is configured to, when the position change of the first terminal device exceeds a threshold, send a message indicating the position change of the first terminal device to the second terminal device a third indication that the threshold is exceeded;
  • the state changes to the second working state.
  • the second terminal device includes M terminal devices, and each terminal device in the M terminal devices includes the first sensor;
  • the first location information is determined according to the second data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M; and/or,
  • the second location information is determined according to the third data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M.
  • 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.
  • the first relative position and the second relative position include relative distances and/or relative azimuths.
  • the sensor state change module is configured to instruct the first sensor to change from the first working state to the first working state before acquiring the second position information of the first terminal device 2.
  • Working status is configured to instruct the first sensor to change from the first working state to the first working state before acquiring the second position information of the first terminal device 2.
  • the sensor state change module is used to establish a connection with the second terminal device
  • the acquisition module is used to:
  • Second data collected by the first sensor is acquired, and first location information of the first terminal device is determined according to the second data.
  • the acquisition module is used to:
  • the target terminal device determines the first terminal device according to the second data the first location information of the first terminal device, or so that the target terminal device can determine the first location information of the first terminal device according to the second data and the data collected by the first sensors of the N terminal devices; receive the target The first location information sent by the terminal device.
  • the acquisition module is used to:
  • the third data collected by the first sensor is acquired, and the second position information of the first terminal device is determined according to the third data.
  • the acquisition module is used to:
  • the target terminal device determines the first terminal device according to the third data the second location information of the first terminal device, or so that the target terminal device can determine the second location information of the first terminal device according to the third data and the data collected by the first sensors of the N terminal devices; receive the target the second location information sent by the terminal device.
  • 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 second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
  • the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data accuracy of the data collected by the first sensor is greater than a preset value.
  • the present application provides a terminal device, the terminal device includes a processor and a memory, and the processor acquires code stored in the memory to execute any one of the first aspect and its optional implementation manners kind.
  • the present application provides a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium containing computer instructions for executing any of the first aspect and its optional implementation manners A sort of.
  • the present application further provides a computer program product, which includes code, and when the code is executed, is used to implement any one of the first aspect and its optional implementation manners.
  • a chip in a sixth aspect, includes a processor, and the processor is configured to perform some or all of the operations in the method described in the first aspect above.
  • An embodiment of the present application provides a device positioning method, which is applied to a first terminal device, where the first terminal device includes a first sensor and a second sensor, wherein the first sensor is used to locate the first terminal device positioning, 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 method includes: acquiring the first The position of the terminal device changes, and the position change is determined according to the 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 the first working state is a second working state, and the power consumption of the first sensor in the first working state is smaller than that in the second working state; acquiring the first location information of the first terminal device, the first The location information is determined according to second data collected by the first sensor in the second working state.
  • the first sensor with high power consumption is turned on only when it is determined based on the second data collected by the second sensor with low power consumption that the position change of the first terminal device exceeds the threshold, which reduces the power consumption of the first terminal device. power consumption.
  • 1a is a system architecture diagram of a smart home system provided by an embodiment of the application
  • FIG. 1b is a schematic structural diagram of a terminal device provided by this application.
  • FIG. 2 is a block diagram of a software structure of a terminal device according to an embodiment of the application.
  • FIG. 3 is a schematic flowchart of a device positioning method provided by an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of a device positioning method provided by an embodiment of the present application.
  • FIG. 5 is a schematic flowchart of a device positioning method provided by an embodiment of the present application.
  • FIG. 6 is a schematic flowchart of a device positioning method provided by an embodiment of the present application.
  • FIG. 7 is a schematic flowchart of a device positioning method provided by an embodiment of the present application.
  • FIG. 8 is a schematic flowchart of a device positioning method provided by an embodiment of the present application.
  • FIG. 9 is a schematic structural diagram of a device positioning apparatus provided by an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of a device positioning apparatus provided by an embodiment of the application.
  • FIG. 11 is a schematic structural diagram of a terminal device provided by this application.
  • Wireless positioning technology refers to the measurement method and calculation method used to determine the location of a mobile user, that is, a positioning algorithm.
  • the most commonly used positioning technologies are: time difference positioning technology, signal angle of arrival (angle-of-arrival, AOA) technology, time of arrival (time of arrival, TOA) and time difference of arrival (time different of arrival, TDOA) positioning Wait.
  • the TDOA technology is the most popular solution at present, and the ultra-wideband wireless communication technology (ultra wide band, UWB) also adopts this technology.
  • UWB is a carrierless communication technology. UWB does not use a carrier, but a short sequence of energy pulses, and the pulses are extended to a frequency range through orthogonal frequency division modulation or direct sequencing.
  • Spatial interaction refers to human-computer interaction technologies and methods based on spatial position awareness (including relative position and angle between devices, etc.).
  • users need to realize spatial awareness between multiple devices.
  • the existing technology center uses UWB technology to realize the Airdrop directional sharing function.
  • the device positioning based on UWB has high power consumption. Although it can bring a good experience to the user in spatial interaction, it also reduces the use time of the terminal device.
  • 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. Multiple terminal devices have mutual spatial awareness and form a spatial network. (It may also be referred to as a computing system in this embodiment of the present application).
  • FIG. 1a is a system architecture diagram of a smart home system provided by an embodiment of the present application.
  • the smart home system includes a user terminal 11, a control center 12, and at least one screen terminal (eg, screen terminals 13, 14); wherein, the screen terminals 13, 14 are set at different positions.
  • the user terminal 11 and at least one screen terminal may be located in the same area or in different areas.
  • the user terminal 11 may be in the living room
  • the screen terminal 13 may be located in the living room or the bedroom.
  • both the user terminal 11 and the screen terminals may be mobile phones, tablet computers, digital cameras, personal digital assistants (PDAs), wearable devices, laptop computers (laptops) ), smart TVs, Huawei smart screens and other electronic devices with display screens.
  • PDAs personal digital assistants
  • Exemplary embodiments of electronic devices include, but are not limited to, electronic devices equipped with iOS, android, Windows, Harmony OS, or other operating systems.
  • the electronic device described above may also be other electronic devices, such as a laptop or the like having a touch-sensitive surface (eg, a touch panel).
  • the embodiment of the present application does not specifically limit the type of the electronic device.
  • control center 12 may also be a terminal device, such as a mobile phone, a tablet computer, a digital camera, a personal digital assistant (PDA), a wearable device, a laptop computer (laptop), a smart TV, Electronic devices with display screens such as Huawei Smart Screens.
  • a terminal device such as a mobile phone, a tablet computer, a digital camera, a personal digital assistant (PDA), a wearable device, a laptop computer (laptop), a smart TV, Electronic devices with display screens such as Huawei Smart Screens.
  • control center 12 may not be provided in the above-mentioned smart home system.
  • Both the user terminal 11 and the screen terminals can be connected to the control center 12 through a network such as a wired network (wired network) or a wireless network (wireless network), or the user terminal 11 and the screen terminals (for example, the screen terminal 13) , 14) can be connected through a wired network (Wired network) or a wireless network (wireless network) and other networks.
  • the network may be a local area network (LAN) or a wide area network (WAN) (eg, the Internet).
  • the network between the user terminal 11 and the screen terminal and the control center 12 can be implemented using any known network communication protocol, which can be various wired or wireless communication protocols, such as Ethernet, Universal Serial Bus ( universal serial bus, USB), firewire (firewire), global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), new air interface ( New radio, NR), Bluetooth (bluetooth), wireless fidelity (wireless fidelity, Wi-Fi) and other communication protocols.
  • Ethernet Universal Serial Bus
  • USB universal serial bus
  • Firewire firewire
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA code division multiple access
  • WCDMA wideband code division multiple access
  • time division code division multiple access time-division code division multiple access
  • LTE
  • the following describes a schematic diagram of a hardware structure of a terminal device in an embodiment of the present application, where the terminal device may be a user terminal 11 and/or a screen terminal (eg, screen terminals 13 and 14 ).
  • Terminal equipment also known as user equipment (UE) or electronic equipment
  • UE user equipment
  • Electronic devices can be mobile phones, tablet computers (pads), wearable devices with wireless communication functions (such as smart watches), location trackers with positioning functions, computers with wireless transceiver functions, virtual reality (virtual reality) , VR) equipment, augmented reality (augmented reality, AR) equipment, wireless equipment in a smart home (smart home), etc., which are not limited in this application.
  • the aforementioned electronic devices and chips that can be provided in the aforementioned electronic devices are collectively referred to as electronic devices.
  • Terminal devices in this application may include, but are not limited to: smart mobile phones, TVs, tablet computers, wristbands, head mounted display devices (Head Mount Display, HMD), augmented reality (augmented reality, AR) devices, mixed reality (mixed reality) reality, MR) equipment, cellular phone (cellular phone), smart phone (smart phone), personal digital assistant (personal digital assistant, PDA), tablet computer, vehicle terminal equipment, laptop computer (laptop computer), personal computer (personal computer, PC), monitoring equipment, robots, in-vehicle terminals, autonomous vehicles, etc.
  • head mounted display devices Head Mount Display, HMD
  • augmented reality augmented reality, AR
  • mixed reality mixed reality
  • MR mixed reality
  • cellular phone cellular phone
  • smart phone smart phone
  • PDA personal digital assistant
  • tablet computer vehicle terminal equipment
  • laptop computer laptop computer
  • personal computer personal computer
  • monitoring equipment robots
  • robots in-vehicle terminals, autonomous vehicles, etc.
  • the terminal device may include one or more sensors that collect data for determining relative positions with other terminal devices (also referred to as the first sensor in this application), and the first sensor may be Ultra wide band (UWB) sensors, ultrasonic sensors, laser sensors and vision sensors.
  • UWB Ultra wide band
  • the data collected by the UWB sensor can be used for accurate measurement of the relative distance and relative azimuth between the terminal device and the terminal device.
  • the data collected by the ultrasonic sensor can be used to make accurate terminal-to-terminal relative distance measurements.
  • Data collected by vision sensors can be used to make precise end-to-end angle measurements. The positioning accuracy is high when positioning based on the data collected by the first sensor, but the corresponding power consumption of the terminal device is also high when these sensors are turned on at the same time.
  • the first sensor may also be other sensors with higher positioning accuracy, which is not limited in the present application.
  • the terminal device may include one or more sensors (which may also be referred to as second sensors in this application) for collecting data for determining whether the terminal device moves or how much position change has occurred.
  • the second sensor may include at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, bluetooth low energy (BLE) and wireless fidelity (WIFI).
  • the data collected by the accelerometer sensor can be used to measure the movement of the terminal device itself.
  • the acceleration of the device in the x, y, and z directions is measured based on the inertial coordinate system of the terminal device.
  • the accelerometer sensor is the main component of the pedometer. sensing modality.
  • the data collected by the gyroscope sensor can be used to measure the rotation of the terminal device itself, and the rotation of the device in the three directions of x, y, and z is measured based on the inertial coordinate system of the device.
  • the data collected by the magnetometer sensor can be used to measure the magnetic field strength detected by the terminal device, excluding drastic changes in the external environment, where the changes in the magnetic force values in the three directions of x, y, and z can represent the change in the position of the terminal device.
  • the data collected by BLE can be used to measure the relative distance and relative angle between the terminal device and the terminal device. Changes in BLE RSS can be indicative of changes in the location of the end device.
  • the data collected by WIFI can be used to measure the relative distance between the terminal device and the terminal device which is not very accurate, but the network card is used as a sensor, and the scanned RSS can be used as the location fingerprint.
  • the change of WiFi RSS can indicate the location of the terminal device. The change.
  • the positioning accuracy is low when positioning based on the data collected by the second sensor, but the corresponding power consumption of the terminal device is also low when these sensors are turned on at the same time.
  • the second sensor may also be other sensors that may have lower positioning accuracy, which is not limited in this application.
  • FIG. 1b the following takes a specific structure as an example to illustrate the structure of the terminal device provided by the present application.
  • the 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 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on.
  • SIM Subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light.
  • the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the terminal device 100 .
  • the terminal device 100 may include more or less components than those shown in the drawings, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • the controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transceiver
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL).
  • the processor 110 may contain multiple sets of I2C buses.
  • the processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the terminal device 100 .
  • the I2S interface can be used for audio communication.
  • the processor 110 may contain multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170 .
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
  • the PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals.
  • the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • a UART interface is typically used to connect the processor 110 with the wireless communication module 160 .
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 .
  • MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc.
  • the processor 110 communicates with the camera 193 through the CSI interface, so as to realize the shooting function of the terminal device 100 .
  • the processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the terminal device 100 .
  • the GPIO interface can be configured by software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like.
  • the GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other terminal devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the terminal device 100 .
  • the terminal device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 may receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the terminal device through the power management module 141 .
  • the power management module 141 is used for connecting 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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the terminal device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low frequency baseband signal is processed by the baseband processor and passed to the application processor.
  • the application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR).
  • WLAN wireless local area networks
  • BT Bluetooth
  • GNSS global navigation satellite system
  • FM frequency modulation
  • NFC near field communication
  • IR infrared technology
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
  • the antenna 1 of the terminal device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with 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 technology may include but is not limited to: the fifth generation mobile communication technology (5th-Generation, 5G) system, the global system for mobile communications (global system for mobile communications, GSM), the general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA) ), long term evolution (LTE), Bluetooth (bluetooth), global navigation satellite system (the global navigation satellite system, GNSS), wireless fidelity (wireless fidelity, WiFi), near field communication (near field communication, NFC), FM (also known as FM radio), Zigbee, radio frequency identification (radio frequency identification, RFID) and/or infrared (infrared,
  • the GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS), etc.
  • global positioning system global positioning system, GPS
  • global navigation satellite system global navigation satellite system, GLONASS
  • Beidou navigation satellite system beidou navigation satellite system, BDS
  • quasi-zenith satellite system quadsi -zenith satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the terminal device 100 may also include a wired communication module (not shown in FIG. 1 b ), or the mobile communication module 150 or the wireless communication module 160 here may be replaced by a wired communication module (not shown in FIG. 1 b ) out), the wired communication module can enable the terminal device to communicate with other devices through the wired network.
  • the 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 network (Ethernet), or flexible Ethernet (flex Ethernet, FlexE).
  • the terminal device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
  • Display screen 194 is used to display images, videos, and the like.
  • Display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light).
  • LED diode AMOLED
  • flexible light-emitting diode flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on.
  • the terminal device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
  • the terminal device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used to process the data fed back by the camera 193 .
  • the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin tone.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object is projected through the lens to generate an optical image onto the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB camera, YUV and other formats of image signals.
  • the terminal device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • a digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
  • Video codecs are used to compress or decompress digital video.
  • the terminal device 100 may support one or more video codecs.
  • the terminal device 100 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the terminal device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100 .
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 121 may be used to store computer executable program code, which includes instructions.
  • the internal memory 121 may include a storage program area and a storage data area.
  • the storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like.
  • the storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal device 100 and the like.
  • the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like.
  • the processor 110 executes various functional applications and data processing of the terminal device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
  • the audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
  • Speaker 170A also referred to as a "speaker" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also referred to as "earpiece" is used to convert audio electrical signals into sound signals.
  • the terminal device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals.
  • the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C.
  • the terminal device 100 may be provided with at least one microphone 170C.
  • the terminal device 100 may be provided with two microphones 170C, which may implement a noise reduction function in addition to collecting sound signals.
  • the terminal device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
  • the earphone jack 170D is used to connect wired earphones.
  • the earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194 .
  • the capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the terminal device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
  • the gyro sensor 180B may be used to determine the motion attitude of the terminal device 100 .
  • the angular velocity of the end device 100 about three axes ie, the x, y and z axes
  • the gyro sensor 180B can be used for image stabilization.
  • the gyro sensor 180B detects the shaking angle of the terminal device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse motion to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
  • the air pressure sensor 180C is used to measure air pressure.
  • the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the terminal device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D.
  • the terminal device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes).
  • the magnitude and direction of gravity can be detected when the terminal device 100 is stationary. It can also be used to identify the posture of terminal devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
  • the terminal device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
  • Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes.
  • the light emitting diodes may be infrared light emitting diodes.
  • the terminal device 100 emits infrared light to the outside through the light emitting diode.
  • the terminal device 100 detects infrared reflected light from nearby objects using a photodiode. 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 may determine that there is no object near the terminal device 100 .
  • the terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
  • the ambient light sensor 180L is used to sense ambient light brightness.
  • the terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness.
  • 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 cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket, so as to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
  • the temperature sensor 180J is used to detect the temperature.
  • the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the terminal device 100 when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 caused by the low temperature.
  • the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch device”.
  • the touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”.
  • the touch sensor 180K is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations may be provided through display screen 194 .
  • the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position where the display screen 194 is located.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal.
  • the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function.
  • the application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
  • the motion sensor 180N can be used to detect moving objects within the range captured by the camera, and collect the motion contours or motion trajectories of the moving objects.
  • the motion sensor 180N may be an infrared sensor, a laser sensor, a dynamic vision sensor (DVS), etc.
  • the DVS may specifically include DAVIS (Dynamic and Active-pixel Vision Sensor), ATIS (Asynchronous Time-based Image Sensor) ) or sensors such as CeleX sensors.
  • DAVIS Dynamic and Active-pixel Vision Sensor
  • ATIS Asynchronous Time-based Image Sensor
  • CeleX sensors such as CeleX sensors.
  • DVS draws on the properties of biological vision, where each pixel simulates a neuron that responds independently to relative changes in light intensity (hereafter referred to as "light intensity"). When the relative change in light intensity exceeds a threshold, the pixel outputs an event signal that includes the pixel's position, timestamp, and characteristic information about the light intensity.
  • the keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key.
  • the terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .
  • Motor 191 can generate vibrating cues.
  • the motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback.
  • touch operations acting on different applications can correspond to different vibration feedback effects.
  • the motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
  • the SIM card interface 195 is used to connect a SIM card.
  • the SIM card can be contacted and separated from the terminal device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 .
  • the terminal device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • the SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different.
  • the SIM card interface 195 can also be 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.
  • the terminal device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
  • the software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiments of the present invention take an Android system with a layered architecture as an example to exemplarily describe the software structure of the terminal device 100 .
  • FIG. 2 is a block diagram of a software structure of a terminal device 100 according to an embodiment of the present invention.
  • the layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces.
  • the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
  • the application layer can include a series of application packages.
  • the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
  • the application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer.
  • the application framework layer includes some predefined functions.
  • the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
  • a window manager is used to manage window programs.
  • the window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
  • Content providers are used to store and retrieve data and make these data accessible to applications.
  • the data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications.
  • a display interface can consist of one or more views.
  • the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
  • the telephony manager is used to provide the communication function of the terminal device 100 .
  • the management of call status including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
  • the notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc.
  • the notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the terminal device vibrates, and the indicator light flashes.
  • Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
  • the core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
  • the application layer and the application framework layer run in virtual machines.
  • the virtual machine executes the java files of the application layer and the application framework layer as binary files.
  • the virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
  • a system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library eg: OpenGL ES
  • 2D graphics engine eg: SGL
  • the Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • the media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
  • 2D graphics engine is a drawing engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
  • the device positioning method may include the following steps:
  • the terminal device needs to determine the relative position with other terminal devices based on data collected by the sensor carried by the terminal device.
  • the first terminal device can turn on the first sensor with higher positioning accuracy.
  • the so-called sensor with higher positioning accuracy in this application does not mean that the sensor has positioning capability, but It means that the calculation result of device positioning based on the data collected by the sensor has high accuracy.
  • the first sensor may be a high-precision sensor or a combination of multiple precision sensors, which is not limited in this embodiment of the present application.
  • the data collected by the second sensor is used to determine the position change of the first terminal device, that is, the data collected by the second sensor can be used to determine how much displacement has occurred in the terminal device, based on the data collected by the second sensor.
  • the positioning accuracy of the data for positioning is low, but the corresponding power consumption of the terminal device is also low when these sensors are turned on at the same time. It should be understood that the second sensor may also be other sensors with lower positioning accuracy and lower power consumption, which is not limited in this application.
  • the data collected by the second sensor is used to determine the position change of the first terminal device, but the data collected by the first sensor can be used to determine the relative position between the terminal devices, and the data collected by the second sensor can also It is used to determine the relative position between the terminal devices, or the data collected by the second sensor can be used to determine the size of the position change of the terminal device, but cannot be used to determine the relative position between the terminal devices.
  • 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 visual sensor.
  • the data collected by the UWB sensor can be used for accurate measurement of the relative distance and relative azimuth between the terminal device and the terminal device.
  • the data collected by the ultrasonic sensor can be used to make accurate terminal-to-terminal relative distance measurements.
  • Data collected by vision sensors can be used to make precise end-to-end angle measurements. The positioning accuracy is high when positioning based on the data collected by the first sensor, but the corresponding power consumption of the terminal device is also high when these sensors are turned on at the same time.
  • the first sensor may also be other sensors with higher positioning accuracy, which is not limited in the present application.
  • the first sensor may also include, but is not limited to, at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the device positioning is performed according to the data collected by the first sensor.
  • the positioning accuracy is greater than the preset value.
  • the accelerometer sensor and the gyroscope sensor are turned on, the power consumption of the first terminal device is also low.
  • the positioning accuracy of the data collected by some accelerometer sensors and the gyroscope sensor for device positioning is also high.
  • 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, wherein the multiple terminal devices may include one A control center, which is also referred to as a second terminal device in this embodiment.
  • the computing system includes a first terminal device.
  • the first terminal device can obtain the first data collected by the sensor set 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.
  • the first terminal device may include a first sensor and a second sensor, wherein the data collected by the first sensor and the second sensor are used to locate the first terminal device by the device , 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, that is, within a unit time, the first terminal
  • the power consumption required by the device to keep the first sensor turned on is greater than the power consumption required by the first terminal device to keep the second sensor turned on.
  • 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.
  • the data collected by the accelerometer sensor can be used to measure the movement of the terminal device itself.
  • the acceleration of the device in the x, y, and z directions is measured based on the inertial coordinate system of the terminal device.
  • the accelerometer sensor is the main component of the pedometer. sensing modality.
  • the data collected by the gyroscope sensor can be used to measure the rotation of the terminal device itself, and the rotation of the device in the three directions of x, y, and z is measured based on the inertial coordinate system of the device.
  • the data collected by the magnetometer sensor can be used to measure the magnetic field strength detected by the terminal device, excluding drastic changes in the external environment, wherein the changes of the magnetic force values in the three directions of x, y, and z can represent the changes in the position of the terminal device.
  • the data collected by BLE can be used to measure the relative distance and relative angle between the terminal device and the terminal device. Changes in BLE RSS can be indicative of changes in the location of the end device.
  • the data collected by WIFI can be used to measure the relative distance between the terminal device and the terminal device, which is not very accurate, but the network card is used as a sensor, and the RSS scanned by it can be used as a location fingerprint.
  • the change of WiFi RSS can indicate the location of the terminal device. The change.
  • the positioning accuracy is low when positioning based on the data collected by the second sensor, but the corresponding power consumption of the terminal device is also low when these sensors are turned on at the same time.
  • the second sensor may also be other sensors with lower positioning accuracy and lower power consumption, which is not limited in this application.
  • the power consumption required by the first terminal device to keep the first sensor turned on is greater than the power consumption required by the first terminal device to keep the second sensor turned on , however, the positioning accuracy when the device is positioned according to the data collected by the first sensor is greater than the positioning accuracy when the device is positioned according to the data obtained by the second sensor.
  • 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.
  • the power consumption required by the first terminal device is relatively high.
  • the relative position between the first terminal device and other terminal devices cannot be accurately calculated, but the power consumption required by the first terminal device is low.
  • both the data collected by the first sensor and the second sensor can be used for device positioning, but the data collected by the first sensor can be used to determine the relative position between terminal devices, while the data collected by the second sensor The data can also be used to determine the relative position between the terminal devices, or the data collected by the second sensor can be used to determine the size of the position change of the terminal device, but cannot be used to determine the relative position between the terminal devices.
  • the power consumption required by the first terminal device to keep the first sensor turned on is greater than the power consumption required by the first terminal device to keep the second sensor turned on.
  • the embodiments of the present application can reduce the power consumption of the first terminal device on the premise that the relative position between the first terminal device and other terminal devices can be accurately calculated.
  • the first sensor may include a first working state and a second working state; wherein, the second working state may be a sensor off state, or a low power consumption state in standby and only part of sensor functions are turned on.
  • the first working state may be a sensor-on state, or a high-power-consumption state in which most sensor functions are turned on.
  • the first operating state is a sensor-on state
  • the second operating state is a sensor-off state.
  • the first working state is the sensor-off state
  • the second working state is the sensor-on state as an example for description.
  • the first terminal device may keep the always-on state of the first sensor all the time.
  • the first sensor of the terminal device in the computing system may be turned on, and then the first sensor of the first terminal device is turned on, wherein , the preset state can mean that all devices meet the following conditions at the same time: they are all powered on; they detect that they have stopped moving or are only within a certain distance range, and the moving speed and rotation speed are both less than a certain preset value, such as the moving speed Less than 0.01m/min, rotation speed less than 1°/min.
  • the first terminal device may keep the first sensor off until it receives a trigger to turn on the first sensor or determines itself that the first sensor should be turned on, for example, the first terminal device may keep the first sensor off state, until the first terminal device establishes a connection with at least one terminal device in the computing system, it can receive the fourth instruction to turn on the first sensor sent by the target terminal device in the computing system, and the first terminal device can be based on the The fourth instruction turns on the first sensor, wherein the computing system includes M-1 terminal devices, the M-1 is a positive integer, and when the M-1 is greater than 1, the M - Each of the 1 terminal devices is connected to at least one terminal device other than itself among the M-1 terminal devices.
  • the target terminal device can be a smart screen
  • the first terminal device can be a mobile phone carried by the user.
  • the first terminal device can be connected to at least one of the smart home system.
  • the so-called established connection can be a local area network connection, such as Bluetooth, WIFI, etc.
  • the smart screen can capture the first terminal device and return to the smart home system, then the first terminal device can be sent to the first terminal device. A first instruction to turn on the first sensor is sent.
  • the second position information may indicate a relative position between the first terminal device and other terminal devices in the computing system, and the relative position may be a relative distance and/or a relative direction angle between the terminal devices.
  • the second location information may be directly represented by relative distance and/or relative azimuth, or may be data used to calculate relative distance and/or relative azimuth, no matter what the representation of the second location information is, its The relative positions between the first terminal device and other terminal devices in the computing system can be obtained directly or indirectly.
  • the second location information may represent a relative location between the first terminal device and other devices in the computing system.
  • the first terminal device may acquire third data collected by the first sensor, and determine the second location information of the first terminal device according to the third data, that is, the first terminal device The calculation of the second position information can be performed by itself based on the third data collected by the first sensor.
  • the first terminal device may acquire third data collected by the first sensor and data collected by first sensors of other terminal devices in the system, and obtain third data and data collected by other terminal devices in the system according to the third data and data collected by the first sensors of other terminal devices in the system.
  • the data collected by the first sensor determines the second position information of the first terminal device, that is, the first terminal device may be based on third data collected by its own first sensor and first sensors collected by other terminal devices of the computing system data, and calculate the second position information.
  • the geometric center of the first terminal device is taken as the midpoint of the device, and at the same time as the origin of the coordinate system of the device, the device establishes an X, Y, Z coordinate system based on its own structure.
  • the distance between the two devices is the length d of the center line connecting the two devices in space, and the direction angle between the two devices includes a height angle ⁇ , a horizontal angle ⁇ and a flip angle ⁇ .
  • the UWB sensors of the four devices are turned on. Each device searches for surrounding UWB signals. Then, between every two devices, the computing system of the device uses the TDOA positioning algorithm, the TOF positioning algorithm, and the TOA positioning algorithm to calculate the relative distance between the devices, for example, the distance between device A and device B is 8.10m.
  • the UWB positioning algorithm all devices can be used as positioning base stations for other devices, and no additional base stations are required.
  • 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.
  • the TOF-based ranging method does not depend on the time synchronization between the base station and the tag, so there is no error caused by clock synchronization deviation, but the time of the TOF ranging method depends on the clock accuracy, and the clock offset will bring errors.
  • the measurement method in both positive and negative directions is usually used, that is, the remote base station sends the ranging information, the tag receives the ranging information and replies, and then the tag initiates the ranging information, and the remote base station sends the ranging information.
  • the end base station replies, and reduces the time offset between the two by calculating the average value of the flight time, thereby improving the ranging accuracy.
  • the positioning method based on TDOA is also called hyperbolic positioning. Fixed distance difference between.
  • the TOA positioning algorithm is "time of arrival". This method of positioning is achieved through multiple communications between the UWB base station and the UWB tag, as shown in Figure 5:
  • the UWB base station first sends a packet to the UWB tag, and records the UWB base station at the same time.
  • the current time information is recorded as T1
  • the UWB tag receives the information from the base station and returns an ACK
  • the UWB base station receives the ACK of the UWB tag and records the current time information, recorded as T2.
  • the second location information of the first terminal device can be obtained by calculation.
  • the ultrasonic positioning mainly adopts the reflective ranging method, and determines the position of the object through multilateral positioning and other methods.
  • the system consists of a main rangefinder and several receivers.
  • the main rangefinder can be placed in the waiting area.
  • the receiver On the measurement target, the receiver is fixed in the indoor environment.
  • the signal of the same frequency is transmitted to the receiver, and after the receiver receives it, it is reflected and transmitted to the main rangefinder, and the distance is calculated according to the time difference between the echo and the transmitted wave, thereby determining the position.
  • the relative positions between the terminal devices can be calculated by the multi-point positioning method.
  • the basic principle is to emit laser pulses to the object to be ranged and start timing, and stop timing when the reflected light is received. This time can be converted to the distance between the laser and the target.
  • Laser rangefinders can also fire multiple laser pulses, using the Doppler effect to determine whether an object is moving away or approaching the light source.
  • the first terminal device can obtain the azimuth angle between other devices and the first terminal device through the first data collected by the visual sensor. Visually, you can get the position of other devices relative to the device group.
  • the first terminal device may not calculate the second position information, but send the third data collected by the first sensor to other terminal devices in the computing system, and the other terminal devices may act as a distributed computing system based on The third data completes the calculation of the second position information, or a terminal device completes the calculation of the second position information based on the third data. After the calculation of the second position information is completed, the second position information can be sent to the first terminal device. , so that the first terminal device can obtain the second location information of the first terminal device.
  • the first terminal device may acquire the third data collected by the first sensor, and send the third data to other terminal devices in the computing system, so that other terminal devices in the computing system can determine the The second location information of the first terminal device, or so that other terminal devices in the computing system can determine the second location information of the first terminal device according to the third data and data collected by the first sensors of other terminal devices in the computing system ; Receive the second location information sent by other terminal devices in the computing system.
  • the computing system includes M terminal devices, each of the M terminal devices includes the first sensor, and correspondingly, the second location information is based on the first sensor.
  • the third data collected and the data collected by the first sensors of N terminal devices among the M terminal devices are determined, and the N is less than or equal to the M.
  • the calculation of the second position information may be performed based on data collected by the first sensors of all or part of the M terminal devices.
  • the N is smaller than the M, and the N The terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices, and the N terminal devices in the M terminal devices collect information for determining the second location
  • the first sensors of the terminal devices other than the N terminal devices among the M terminal devices are in an off state.
  • N terminal devices closest to the first terminal device may be selected to turn on the first sensor, and the second position information may be calculated based on 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, 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 the embodiment of the present application, only N terminal equipments located close to each other are selected, which can save energy and reduce consumption under the condition of ensuring system accuracy.
  • a certain terminal device in the computing system may trigger the N terminal devices among the M terminal devices to turn on the first sensor.
  • the first position may be shared with each terminal device in the computing system, so that each terminal device in the computing system knows the relative position with the first terminal device.
  • the first terminal device may also acquire other location information other than the second location information, such as relative locations between other terminal devices, which is not limited in this application.
  • the first sensor may be triggered to change from the second working state to the first working state, for example, the first sensor may be turned off.
  • the second location information of the first terminal device may be acquired, and the second location information is determined according to the third data collected by the first sensor; the first terminal device may belong to a computing system, and the computing
  • the system may be the smart home system described above or other indoor/outdoor scenarios, and the computing system may include multiple terminal devices, wherein the multiple terminal devices may include a control center, which is also referred to as the target terminal device in this embodiment.
  • the computing system may include a first terminal device, and in order to obtain a relative position with other terminal devices in the computing system, the first terminal device may obtain third data collected by a first sensor set on the first terminal device, the third data It 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 may indicate a relative location between the first terminal device and other terminal devices in the computing system, and the relative location may be a relative distance and/or a relative azimuth.
  • the second position information may be directly represented by relative distance and/or relative azimuth, or may be data used to calculate relative distance and/or relative azimuth, no matter what the expression of the first position information is, its The relative positions between the first terminal device and other terminal devices in the computing system can be obtained directly or indirectly.
  • the first sensor Trigger the first sensor to change from the second working state to the first working state; it should be understood that this application does not limit the period between turning off the first sensor and acquiring the second position information of the first terminal device
  • the first sensor can be triggered to change from the second working state to the all In the first working state, in one implementation, the first sensor is triggered to change from the second working state to the first working state after acquiring the second position information of the first terminal device.
  • the first sensor may be triggered to change from the second working state to the first working state.
  • other terminal devices in the computing system may trigger the first terminal device to change from the second working state to the first working state, for example, turning off its own first sensor.
  • the first terminal device may receive an instruction for turning off the first sensor sent by other terminal devices in the computing system, and turn off the first sensor based on the received instruction.
  • the position change of the first terminal device may be acquired, and the position change is determined according to the first data collected by the second sensor.
  • each terminal device in the computing system includes a second sensor, and each terminal device may keep the second sensor turned on all the time, wherein the second sensor may include at least one of the following sensors: an accelerometer sensor , gyroscope sensor, magnetometer sensor, low energy bluetooth BLE and wireless fidelity WIFI.
  • the second sensor may include at least one of the following sensors: an accelerometer sensor , gyroscope sensor, magnetometer sensor, low energy bluetooth BLE and wireless fidelity WIFI.
  • the data accuracy of the data collected by the first sensor is greater than the data accuracy 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 to perform the positioning operation of the first terminal device, and can only determine the location change of the first terminal device. In another implementation, the data collected by the second sensor can be used to perform the positioning operation of the first terminal device. However, the data accuracy of the data collected by the second sensor is smaller than that of the data collected by the first sensor. data precision.
  • the positioning calculation of the first terminal device can be performed according to the data collected by the first sensor, and according to the second sensor
  • the collected data can also perform the positioning calculation of the first terminal device (the positioning algorithm using the data collected by the first sensor is the same as or similar to the positioning algorithm using the data collected by the second sensor), but according to the data collected by the first sensor
  • the calculation result that can perform the positioning calculation of the first terminal device is more accurate than the calculation result that can also perform the positioning calculation of the first terminal device according to the data collected by the second sensor.
  • the so-called high accuracy is based on the first sensor.
  • the collected data can be used for positioning calculation of the first terminal device, and the calculation result is closer to the actual position change of the first terminal device.
  • the positioning calculation is performed by using the data collected by the first sensor with higher positioning accuracy, so as to ensure the positioning accuracy .
  • the first sensor When the position change of the first terminal device exceeds a threshold, trigger the first sensor to change from a first working state to a second working state, for example, the first sensor may be turned on.
  • the data collected by the second sensor can be used to determine whether the first terminal device has a position change and the amount of the position change.
  • the determination basis for determining that the position change of the first terminal device exceeds the threshold value may be based on the change of the signal collected by the second sensor.
  • the second sensor as WIFI as an example, it may be based on the received signal strengths of multiple WIFIs. If there is a change, it can be determined that the position of the first terminal device has changed, and the amount of change in the position of the first terminal device can be determined according to the change in the signal strength of the WIFI.
  • the signal of the WIFI can be WIFI RSS.
  • the amount change exceeds the threshold value it can be considered that the position change of the first terminal device exceeds the threshold value; taking the second sensor as the magnetometer sensor, it can be determined that the position of the first terminal device has changed according to the signal strength received by the magnetometer sensor. change, and the amount of change in the position of the first terminal device can be determined according to the change in the signal strength received by the magnetometer sensor. If the change in the signal strength received by the magnetometer sensor exceeds the threshold, it can be considered that the position change of the first terminal device exceeds the threshold. .
  • the first terminal device may be a mobile device, such as a mobile phone, a Pad, AR glasses, a smart watch, a smart bracelet, etc.;
  • the first terminal device may be a semi-mobile device such as a smart speaker, a notebook computer, etc.;
  • the first terminal device may be a fixed device such as a smart screen, a desktop computer, a smart home appliance, and the like. From mobile devices, semi-mobile devices to fixed devices, the corresponding thresholds can be gradually reduced.
  • the first terminal device when the first terminal device is a mobile device, when the position of the first terminal device changes beyond the first threshold, all The first sensor, when the first terminal device is a semi-mobile device, when the position change of the first terminal device exceeds the second threshold, the first sensor is turned on, and when the first terminal device is a fixed device, when the first When the position change of a terminal device exceeds a third threshold, the first sensor is turned on, the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.
  • the threshold may include a distance threshold and an angle threshold.
  • the threshold value of the accelerometer can be set based on the time integration of the accelerometer value, that is, the distance, for example, 0.2m, 0.5m; if the second sensor is a gyroscope sensor , the threshold value of the gyroscope can be set based on the integral of the gyroscope value in time, that is, the angle, such as 20°, 10°; if the second sensor is a magnetometer sensor, it can be set based on the change intensity of the magnetometer.
  • the threshold of the magnetometer such as 10%; if the second sensor is BLE, it can be based on BLE's RSS, if the RSS change rate exceeds a certain percentage, that is, it exceeds the threshold, such as 20%; if the second sensor is WIFI, it can be based on WIFI. RSS, if the rate of change of RSS exceeds a certain percentage, that is, it exceeds the threshold, such as 20%.
  • the distance threshold is set to 0.3m, and the angle threshold is set to 20°.
  • the distance threshold is set to 0.1m, and the angle threshold is set to 10°.
  • the first sensor if it is determined based on the first data collected by the second sensor that the position change of the first terminal device exceeds a threshold, the first sensor is triggered to change from the first working state to the second working state .
  • the first sensor may be triggered and turned on by other terminal devices in the computing system. Specifically, if it is determined based on the first data collected by the second sensor that the position change of the first terminal device exceeds a threshold , 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 messages sent by other terminal devices in the computing system. the fourth indication for turning on the first sensor, and turning on the first sensor based on the fourth indication.
  • the first terminal device may acquire the second data collected by the first sensor, and determine the first location information of the first terminal device according to the second data.
  • the first terminal device may acquire the second data collected by the first sensor and the data collected by the first sensors of the N terminal devices, and obtain the second data and the N terminals according to the second data and the data collected by the first sensors of the N terminal devices.
  • the data collected by the first sensor of the device determines the first location information of the first terminal device.
  • the first terminal device may acquire the second data collected by the first sensor; and send the second data to a target terminal device among the M terminal devices, so that the target terminal device can
  • the second data determines the first location information of the first terminal device, or the target terminal device determines the first terminal according to the second data and the data collected by the first sensors of the N terminal devices.
  • the first location information of the device; and the first location information sent by the target terminal device is received.
  • the first terminal device may not calculate the first location information by itself, but may send the second data collected by the first sensor to other terminal devices in the computing system, and the other terminal devices may serve as a distributed computing system
  • the calculation of the first position information is completed based on the second data, or a terminal device completes the calculation of the first position information based on the second data.
  • the first position information may be sent to the first terminal. device, and then the first terminal device can obtain the first location information of the first terminal device.
  • the first terminal device may acquire the second data collected by the first sensor; send the second data to other terminal devices in the computing system, so that other terminal devices in the computing system can determine according to the second data The second position where the first terminal device is located, or so that other terminal devices in the computing system can determine the location of the first terminal device according to the second data and the data collected by the first sensors of the N terminal devices.
  • first location information receiving the first location information sent by other terminal devices in the computing system.
  • 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 positioning the device according to the data collected by the first sensor is greater than a predetermined value set value.
  • the first sensor as an accelerometer sensor and a gyroscope sensor as an example, the first terminal device can integrate the signal of the accelerometer sensor over time according to the signal of its accelerometer sensor, that is, to obtain the acceleration from the last first terminal device. Calculate the moving distance after zeroing (that is, the first terminal device is stationary), and this moving distance is based on the coordinate system of the device itself.
  • the signal of its gyroscope sensor integrate the signal of the gyroscope sensor in time, that is, to obtain the rotation angle since the last time the gyroscope of the first terminal device was zeroed, and this rotation angle is based on the device's own coordinate system.
  • the second position may be shared with each terminal device in the computing system, so that each terminal device in the computing system knows the relative position with the first terminal device.
  • An embodiment of the present application provides a device positioning method, which is applied to a first terminal device, where the first terminal device includes a first sensor and a second sensor, wherein the first sensor is used to locate the first terminal device positioning, 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 method includes: acquiring the first The position of the terminal device changes, and the position change is determined according to the 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 the first working state is a second working state, and the power consumption of the first sensor in the first working state is smaller than that in the second working state; acquiring the first location information of the first terminal device, the first The location information is determined according to second data collected by the first sensor in the second working state.
  • the first sensor with high power consumption is turned on only when it is determined based on the second data collected by the second sensor with low power consumption that the position change of the first terminal device exceeds the threshold, which reduces the power consumption of the first terminal device. power consumption.
  • FIG. 6 is a schematic flowchart of a device positioning method provided by an embodiment of the present application.
  • the device positioning method provided by the embodiment of the present application can be applied to a target terminal device.
  • the target terminal device belongs to a computing system, and the computing The system includes M terminal devices, the M terminal devices include a first terminal device, and the first terminal device includes a first sensor and a second sensor, wherein the first sensor is used to monitor the first terminal device Positioning, 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 method provided by the embodiment of the present application:
  • the first location information may be shared with each terminal device in the computing system, so that each terminal device in the computing system knows the relative position with the first terminal device.
  • the first terminal device may also acquire other location information other than the second location information, such as relative locations between other terminal devices, which is not limited in this application.
  • step 601 For the specific description of step 601, reference may be made to the description of the relevant steps in step 301, and the similarities will not be repeated here.
  • the target terminal device in the computing system can trigger the first terminal device to turn off its own first sensor.
  • the first terminal device may receive a first instruction for turning off the first sensor sent by a target terminal device among the M terminal devices, and turn off the first sensor based on the first instruction.
  • step 602 For the specific description of step 602, reference may be made to the description of the relevant steps in step 302, and the similarities are not repeated here.
  • the first sensor may be triggered to be turned on by the target terminal device. Specifically, if it is determined based on the first data collected by the second sensor that the position change of the first terminal device exceeds a threshold, the first sensor The terminal device may send a third indication to the target terminal device among the M terminal devices, which is used to indicate that the position change of the first terminal device exceeds a threshold; then the second terminal device may receive the information sent by the target terminal device. In response to a fourth instruction to turn on the first sensor, the first sensor is turned on based on the fourth instruction.
  • step 603 can refer to step 303, and the similarities are not repeated here.
  • the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
  • the target terminal device may send a message to the first terminal device and N terminal devices among the M terminal devices for triggering the first sensor to change from the first working state to the second The fourth indication of the working state, so that the first terminal device and N terminal devices trigger the first sensor to change from the first working state to the second working state based on the fourth indication, and the N is less than or equal to the said M;
  • the first location information is determined according to the second data collected by the first sensor and data collected by the first sensors of N terminal devices among the M terminal devices.
  • the N is less than the M
  • the target terminal device may determine the N terminal devices from the M terminal devices, where the N terminal devices are the M terminals N terminal devices that are closest to the first terminal device in the device.
  • the first location information and the second location information are used to indicate the first terminal device and terminal devices other than the first terminal device among the M terminal devices relative position between.
  • the relative positions include relative distances and/or relative azimuths.
  • FIG. 7 is a schematic flowchart of a device positioning method provided by an embodiment of the present application.
  • a computing system may include a target terminal device, a first terminal device, and at least one terminal device.
  • the device positioning method provided by the embodiment includes:
  • the target terminal device determines that the first terminal device and at least one terminal device are in place.
  • the so-called in-position can mean that both the first terminal device and at least one terminal device meet the following conditions at the same time: both are in the power-on state; it is detected that they have stopped moving or are only within a certain distance range, and the moving speed and rotation speed are both less than a certain preset.
  • the value of , for example, the moving speed is less than 0.01m/min, and the rotation speed is less than 1°/min.
  • the target terminal device triggers the first terminal device and at least one terminal device to turn on the first sensor.
  • the first terminal device and the at least one terminal device acquire relative positions between the terminal devices based on the data collected by the first sensor.
  • step 703 may refer to the description of step 301, and the similarities will not be repeated.
  • the target terminal device triggers the first terminal device and at least one terminal device to turn off the first sensor.
  • step 704 may refer to the description of step 302, and the similarities will not be repeated.
  • the first terminal device determines, based on the data collected by the second sensor, that the position change exceeds a threshold.
  • the first terminal device sends information indicating that the position change exceeds a threshold value to the target terminal device.
  • the target terminal device triggers the first terminal device and at least one terminal device to turn on the first sensor.
  • the first terminal device and at least one terminal device acquire relative positions between the terminal devices based on the data collected by the first sensor.
  • step 705 to step 709 may refer to the description of step 303, and the similarities will not be repeated.
  • FIG. 8 is a schematic flowchart of a device positioning method provided by an embodiment of the application.
  • a computing system may include a target terminal device, a first terminal device, and at least one terminal device.
  • the device positioning method provided by the embodiment includes:
  • the target terminal device determines that at least one terminal device is in place.
  • the so-called in-position can mean that at least one terminal device satisfies the following conditions: it is all powered on; it detects that it has stopped moving or is only within a certain distance range, and the moving speed and rotation speed are both less than a certain preset value, for example, the moving speed is less than 0.01m/min, the rotation speed is less than 1°/min.
  • the target terminal device triggers the first terminal device and at least one terminal device to turn on the first sensor.
  • At least one terminal device acquires relative positions between terminal devices based on the data collected by the first sensor.
  • step 803 may refer to the description of step 301, and the similarities will not be repeated.
  • the target terminal device triggers at least one terminal device to turn off the first sensor.
  • step 804 may refer to the description of step 302, and the similarities will not be repeated.
  • the target terminal device determines that the first terminal device is connected to the computing system.
  • the first terminal device may keep the first sensor off until it receives a trigger to turn on the first sensor or determines itself that the first sensor should be turned on, for example, the first terminal device may keep the first sensor off until the first terminal device establishes a connection with at least one terminal device in the computing system, it can receive an instruction to turn on the first sensor sent by the target terminal device in the computing system, and the first terminal device can start the first sensor based on the first terminal device. Four indicates that the first sensor is turned on.
  • the target terminal device triggers the first terminal device and at least one terminal device to turn on the first sensor.
  • the first terminal device and at least one terminal device acquire relative positions between the terminal devices based on the data collected by the first sensor.
  • step 805 to step 808 may refer to the description of step 303, and the similarities will not be repeated.
  • FIG. 9 is a schematic structural diagram of a device positioning apparatus provided by an embodiment of the present application.
  • the device positioning apparatus provided by an embodiment of the present application may be applied to a first terminal device, where the first terminal device includes a first sensor and a A second sensor, wherein the data collected by 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 first sensor The power of one sensor is greater than the power of the second sensor.
  • the device positioning apparatus 900 provided in this embodiment of the present application may include:
  • an acquisition module 901 configured to acquire a position change of the first terminal device, where the position change is determined according to the first data collected by the second sensor;
  • step 301 For the steps performed by the obtaining module 901, reference may be made to the description in step 301 and the corresponding embodiments, and details are not repeated here.
  • a sensor state change module 902 configured 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, and the first sensor is in the first working state The power consumption of the state is less than the power consumption of the second working state;
  • step 302 For the steps performed by the sensor state change module 902, reference may be made to the description in step 302 and the corresponding embodiments, and details are not repeated here.
  • the acquiring module 901 is configured to acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor in the second working state.
  • step 303 For the steps performed by the obtaining module 901, reference may be made to the description in step 303 and the corresponding embodiments, and details are not repeated here.
  • the acquiring module is configured to acquire the second location information of the first terminal device before acquiring the location change of the first terminal device, so The second position information is determined according to third data collected by the first sensor in the second working state;
  • the sensor state changing module is configured to trigger the first sensor to change from the second working state to the first working state.
  • the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
  • the sensor state change module is used to:
  • the first sensor 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 to the first working state.
  • the first position information is used to indicate a first relative position between the first terminal device and the second terminal device;
  • the second position 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.
  • the sensor state change module is configured to receive a message sent by the second terminal device for triggering the first sensor to change from the second working state to the first working state a second indication, and triggering the first sensor to change from the second working state to the first working state based on the second indication.
  • the sensor state change module is configured to, when the position change of the first terminal device exceeds a threshold, send a message indicating the position change of the first terminal device to the second terminal device a third indication that the threshold is exceeded;
  • the state changes to the second working state.
  • the second terminal device includes M terminal devices, and each terminal device in the M terminal devices includes the first sensor;
  • the first location information is determined according to the second data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M; and/or,
  • the second location information is determined according to the third data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M.
  • 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.
  • the first relative position and the second relative position include relative distances and/or relative azimuths.
  • the sensor state change module is configured to instruct the first sensor to change from the first working state to the first working state before acquiring the second position information of the first terminal device 2.
  • Working status is configured to instruct the first sensor to change from the first working state to the first working state before acquiring the second position information of the first terminal device 2.
  • the sensor state change module is used to establish a connection with the second terminal device
  • the acquisition module is used to:
  • Second data collected by the first sensor is acquired, and first location information of the first terminal device is determined according to the second data.
  • the acquisition module is used to:
  • the target terminal device determines the first terminal device according to the second data the first location information of the first terminal device, or so that the target terminal device can determine the first location information of the first terminal device according to the second data and the data collected by the first sensors of the N terminal devices; receive the target The first location information sent by the terminal device.
  • the acquisition module is used to:
  • the third data collected by the first sensor is acquired, and the second position information of the first terminal device is determined according to the third data.
  • the acquisition module is used to:
  • the target terminal device determines the first terminal device according to the third data the second location information of the first terminal device, or so that the target terminal device can determine the second location information of the first terminal device according to the third data and the data collected by the first sensors of the N terminal devices; receive the target the second location information sent by the terminal device.
  • 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 second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
  • the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data accuracy of the data collected by the first sensor is greater than a preset value.
  • FIG. 10 is a schematic structural diagram of a device positioning apparatus provided by an embodiment of the present application.
  • the device positioning apparatus provided by the embodiment of the present application may be applied to a target terminal device, where the target terminal device belongs to a computing system, and the computing The system includes M terminal devices, the M terminal devices include a first terminal device, and the first terminal device includes a first sensor and a second sensor, wherein the data collected by the second sensor is used to determine the first terminal device.
  • the position of a terminal device changes, and the power of the first sensor is greater than the power of the second sensor;
  • a device positioning apparatus 1000 provided by an embodiment of the present application may include:
  • the obtaining module 1001 is configured to obtain second position information of the first terminal device, wherein the second position information is determined according to third data collected by the first sensor in the second working state.
  • a sending module 1002 configured to send, to the first terminal device, a second indication for triggering the first sensor to change from a second working state to a first working state, so that the first terminal device is based on the second
  • the instruction triggers the first sensor to change from the first working state to the second working state.
  • the working state is changed to the fourth indication of the second 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 third indication.
  • step 602 For the steps performed by the sending module 1002, reference may be made to the descriptions in step 602, step 603 and corresponding embodiments, and details are not repeated here.
  • the acquiring module 1001 is configured to acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor.
  • the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
  • the target terminal device may send a message to the first terminal device and N terminal devices among the M terminal devices for triggering the first sensor to change from the first working state to the second The fourth indication of the working state, so that the first terminal device and N terminal devices trigger the first sensor to change from the first working state to the second working state based on the fourth indication, and the N is less than or equal to the said M;
  • the first location information is determined according to the second data collected by the first sensor and data collected by the first sensors of N terminal devices among the M terminal devices.
  • the N is less than the M
  • the target terminal device may determine the N terminal devices from the M terminal devices, where the N terminal devices are the M terminals N terminal devices that are closest to the first terminal device in the device.
  • the first location information and the second location information are used to indicate the first terminal device and terminal devices other than the first terminal device among the M terminal devices relative position between.
  • the relative positions include relative distances and/or relative azimuths.
  • 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 second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
  • the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data accuracy of the data collected by the first sensor is greater than a preset value.
  • FIG. 11 is a schematic structural diagram of a terminal device 1500 provided by the present application, and the terminal device 1500 may be the device positioning apparatus 900 described in FIG. Device positioning apparatus 1000, as shown in FIG. 11 , the terminal device includes a processor 1501 and a memory 1502, and the processor 1501 is used to obtain the code of the memory 1502 to execute the codes in the corresponding embodiments of FIG. 3 and FIG. 6 . Describes the device location method.
  • the disclosed system, apparatus and method may be implemented in other manners.
  • the device embodiments described above are only illustrative.
  • the division of units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or other network device, etc.) to execute all or part of the steps of the method described in the embodiment of FIG. 2 of the present application.
  • the aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Abstract

The embodiments of the present application disclose a device positioning method. Said method comprises: acquiring a position change of a first terminal device, the position change being determined according to first data acquired by a second sensor; when the position change of the first terminal device exceeds a threshold, triggering a first sensor to change from a first working state to a second working state, the power consumption of the first sensor in the first working state being less than the power consumption of the first sensor in the second working state; and acquiring first position information of the first terminal device, the first position information being determined according to second data acquired by the first sensor in the second working state. In the present application, only when it is determined, on the basis of the second data acquired by a second sensor with low power consumption, that the position change of the first terminal device exceeds the threshold, the first sensor with high power consumption is enabled, reducing the power consumption of the first terminal device.

Description

一种设备定位方法及其相关设备A device positioning method and related devices
本申请要求于2020年11月30日提交中国国家知识产权局、申请号为202011376728.6、申请名称为“一种设备定位方法及其相关设备”的中国专利申请的优先权,以及要求于2020年8月5日提交中国国家知识产权局、申请号为202010780901.2、申请名称为“一种定位方法及其装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application filed on November 30, 2020, with the application number of 202011376728.6, and the application title is "A Device Positioning Method and Related Equipment", and claimed on August 2020. The priority of the Chinese patent application with the application number of 202010780901.2 and the application title of "a positioning method and device therefor" was submitted to the State Intellectual Property Office of China on May 5, the entire contents of which are incorporated in this application by reference.
技术领域technical field
本申请涉及计算机领域,尤其涉及一种设备定位方法及其相关设备。The present application relates to the field of computers, and in particular, to a device positioning method and related devices.
背景技术Background technique
无线定位技术是指用来判定移动用户位置的测量方法和计算方法,即定位算法。目前最常用的定位技术主要有:时差定位技术、信号到达角度测量(angle-of-arrival,AOA)技术、到达时间定位(time of arrival,TOA)和到达时间差定位(time different of arrival,TDOA)等。其中,TDOA技术是目前最为流行的一种方案,超宽带无线通信技术(ultra wide band,UWB)采用的也是这种技术。UWB是一种无载波通信技术,UWB不使用载波,而是使用短的能量脉冲序列,并通过正交频分调制或直接排序将脉冲扩展到一个频率范围内。Wireless positioning technology refers to the measurement method and calculation method used to determine the location of a mobile user, that is, a positioning algorithm. At present, the most commonly used positioning technologies are: time difference positioning technology, signal angle of arrival (angle-of-arrival, AOA) technology, time of arrival (time of arrival, TOA) and time difference of arrival (time different of arrival, TDOA) positioning Wait. Among them, the TDOA technology is the most popular solution at present, and the ultra-wideband wireless communication technology (ultra wide band, UWB) also adopts this technology. UWB is a carrierless communication technology. UWB does not use a carrier, but a short sequence of energy pulses, and the pulses are extended to a frequency range through orthogonal frequency division modulation or direct sequencing.
空间交互是指基于空间位置感知(包括设备与设备之间的相对位置和角度等等)的人机交互技术和方法,为了实现更好的使用体验,用户的多个设备之间需要实现空间感知,如现有技术中心使用UWB技术实现Airdrop定向分享功能。然而,基于UWB实现的设备定位功耗较高,虽然可以在空间交互上给用户带来了好的体验,但同时也减少了终端设备的使用时间。Spatial interaction refers to human-computer interaction technologies and methods based on spatial position awareness (including relative position and angle between devices, etc.). In order to achieve a better user experience, users need to realize spatial awareness between multiple devices. , for example, the existing technology center uses UWB technology to realize the Airdrop directional sharing function. However, the device positioning based on UWB has high power consumption. Although it can bring a good experience to the user in spatial interaction, it also reduces the use time of the terminal device.
发明内容SUMMARY OF THE INVENTION
第一方面,本申请提供了一种设备定位方法,应用于第一终端设备,其中,第一终端设备可以为智能家居系统或者其他室内/室外场景中的一个终端设备。所述第一传感器和所述第二传感器采集的数据用于进行设备对所述第一终端设备定位,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,第一终端设备为了确定与其他终端设备之间的相对位置,可以开启自身携带的传感器,该传感器采集的数据可以用于进行设备定位,本申请中所谓的设备定位,可以理解为确定终端设备之间的相对位置。为了得到一个高精度的设备定位结果,第一终端设备可以开启具有较高定位精度的第一传感器,本申请中所谓的具有较高定位精度的传感器,不是指该传感器具有定位能力,而是指基于该传感器采集的数据进行的设备定位的计算结果具有较高的精度。应理解,第一传感器可以是一个高精度传感器或者是多个精度传感器的组合,本申请实施例并不限定。所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,也就是说,第二传感器采集的数据可以用于进行终端设备发生了多少位移的确定,基于第二传感器采集的数据进行定位时的定位精度较低,但同时开启这些传感器时终端设备相应需要的功耗也较低。应理解,第二传 感器还可以为其他可以具有较低定位精度以及较低功耗的传感器,本申请并不限定。In a first aspect, the present application provides a device positioning method, which is applied to a first terminal device, where the first terminal device may be a terminal device in a smart home system or other indoor/outdoor scenarios. The data collected by the first sensor and the second sensor is used to locate the first terminal device by the device, and the data collected by the second sensor is used to determine the position change of the first terminal device. In order to determine the relative position with other terminal devices, the terminal device can turn on the sensor carried by itself, and the data collected by the sensor can be used for device positioning. The so-called device positioning in this application can be understood as determining the relationship between terminal devices. relative position. In order to obtain a high-precision device positioning result, the first terminal device can turn on the first sensor with high positioning accuracy. The so-called sensor with high positioning accuracy in this application does not mean that the sensor has positioning capability, but refers to The calculation result of device positioning based on the data collected by the sensor has high precision. It should be understood that the first sensor may be a high-precision sensor or a combination of multiple precision sensors, which is not limited in this embodiment of the present application. The data collected by the second sensor is used to determine the position change of the first terminal device, that is, the data collected by the second sensor can be used to determine how much displacement has occurred in the terminal device, based on the data collected by the second sensor. The positioning accuracy of the data for positioning is low, but the corresponding power consumption of the terminal device is also low when these sensors are turned on at the same time. It should be understood that the second sensor may also be other sensors with lower positioning accuracy and lower power consumption, which is not limited in this application.
所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,然而第一传感器采集的数据可以用于进行终端设备之间相对位置的确定,而第二传感器采集的数据也可以用于进行终端设备之间相对位置的确定,或者,第二传感器采集的数据可以用于进行终端设备所处位置改变大小的确定,而不能用于进行终端设备之间相对位置的确定。所述第一传感器的功率大于所述第二传感器的功率,也就是在单位时间内,所述第一终端设备保持所述第一传感器的开启所需的功耗大于所述第一终端设备保持所述第二传感器的开启所需的功耗。The data collected by the second sensor is used to determine the position change of the first terminal device, but the data collected by the first sensor can be used to determine the relative position between the terminal devices, and the data collected by the second sensor can also It is used to determine the relative position between the terminal devices, or the data collected by the second sensor can be used to determine the size of the position change of the terminal device, but cannot be used to determine the relative position between the terminal devices. The power of the first sensor is greater than the power of the second sensor, that is, in a unit time, the power consumption required by the first terminal device to keep the first sensor turned on is greater than that of the first terminal device. The power consumption required for turning on the second sensor.
所述方法包括:获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的;当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,所述第一传感器处于所述第一工作状态的功耗小于处于所述第二工作状态的功耗。其中,第二工作状态可以是传感器关闭状态,或者是待机、只开启一部分传感器功能的低功耗状态。第一工作状态可以是传感器打开状态,或者是开启大部分传感器功能的高功耗状态。例如,第一工作状态是传感器打开状态,第二工作状态是传感器关闭状态。获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器采集的第二数据确定的。The method includes: acquiring a position change of the first terminal device, the position change being determined according to the first data collected by the second sensor; when the position change of the first terminal device exceeds a threshold, triggering the The first sensor is changed from a first working state to a second working state, and the power consumption of the first sensor in the first working state is smaller than that in the second working state. The second working state may be a sensor off state, or a low power consumption state in which only a part of the sensor functions are turned on in a standby state. The first working state may be a sensor-on state, or a high-power-consumption state in which most sensor functions are turned on. For example, the first operating state is a sensor-on state, and the second operating state is a sensor-off state. Acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor.
本申请实施例中,阈值可以包括距离阈值以及角度阈值。需要说明的是,根据第一终端设备的设备类型不同,可以对应不同的阈值,示例性的,第一终端设备可以为移动设备,如手机、Pad、AR眼镜、智能手表、智能手环等;第一终端设备可以为半移动设备如智能音箱、笔记本电脑等;第一终端设备可以为固定设备如智慧屏、台式电脑、智能家电等。从移动类设备、半移动设备到固定设备,其对应的阈值可以逐渐减少,也就是说当第一终端设备为移动设备时,当第一终端设备的位置变化超过第一阈值时,则开启所述第一传感器,当第一终端设备为半移动设备时,当第一终端设备的位置变化超过第二阈值时,则开启所述第一传感器,当第一终端设备为固定设备时,当第一终端设备的位置变化超过第三阈值时,则开启所述第一传感器,第一阈值大于第二阈值,第二阈值大于第三阈值。In this embodiment of the present application, 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. Exemplarily, the first terminal device may be a mobile device, such as a mobile phone, a Pad, AR glasses, a smart watch, a smart bracelet, etc.; The first terminal device may be a semi-mobile device such as a smart speaker, a notebook computer, etc.; the first terminal device may be a fixed device such as a smart screen, a desktop computer, a smart home appliance, and the like. From mobile devices, semi-mobile devices to fixed devices, the corresponding thresholds can be gradually reduced. That is to say, when the first terminal device is a mobile device, when the position of the first terminal device changes beyond the first threshold, all The first sensor, when the first terminal device is a semi-mobile device, when the position change of the first terminal device exceeds the second threshold, the first sensor is turned on, and when the first terminal device is a fixed device, when the first When the position change of a terminal device exceeds a third threshold, the first sensor is turned on, the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.
第一终端设备可以属于计算系统,计算系统可以是上述描述的智能家居系统或者其他室内/室外场景,计算系统可以包括多个终端设备,其中,多个终端设备可以包括一个控制中心,该控制中心本实施例也称之为目标终端设备。计算系统可以包括第一终端设备,第一终端设备为了获取与计算系统中其他终端设备之间的相对位置,可以获取第一终端设备上设置的第一传感器采集的第二数据,该第二数据可用于计算第一终端设备与计算系统中其他终端设备之间的相对位置。第一位置信息可以指示第一终端设备与计算系统中其他终端设备之间的相对位置,相对位置可以是相对距离和/或相对方位角。第一位置信息可以直接用相对距离和/或相对方位角来表示,也可以是用于计算相对距离和/或相对方位角的数据,不论第一位置信息的表现方式是什么,其都可以直接或间接得到第一终端设备与计算系统中其他终端设备之间的相对位置。The first terminal device may belong to a computing system, the computing system may be the above-described smart home system or other indoor/outdoor scenarios, and the computing system may include multiple terminal devices, wherein the multiple terminal devices may include a control center, the control center This embodiment is also referred to as a target terminal device. The computing system may include a first terminal device, and in order to obtain a relative position with other terminal devices in the computing system, the first terminal device may obtain second data collected by a first sensor set on the first terminal device, the second data It can be used to calculate the relative position between the first terminal device and other terminal devices in the computing system. The first location information may indicate a relative location between the first terminal device and other terminal devices in the computing system, and the relative location may be a relative distance and/or a relative azimuth. The first position information may be directly represented by relative distance and/or relative azimuth, or may be data used to calculate relative distance and/or relative azimuth. Or indirectly obtain the relative position between the first terminal device and other terminal devices in the computing system.
本实施例中,只有在基于低功耗的第二传感器采集的第一数据确定所述第一终端设备的位置变化超过阈值时,才触发高功耗的第一传感器由第一工作状态改变为第二工作状态, 降低了第一终端设备的功耗。In this embodiment, only when it is determined based on the first data collected by the second sensor with low power consumption that the position change of the first terminal device exceeds a threshold, the first sensor with high power consumption is triggered to change from the first working state to In the second working state, the power consumption of the first terminal device is reduced.
在一种可能的实现中,所述方法还包括:在获取所述第一终端设备的位置变化之前,获取所述第一终端设备的第二位置信息,所述第二位置信息为根据所述第一传感器在所述第二工作状态采集的第三数据确定的;触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。In a 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, where the second location information is based on the It is determined by 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.
本实施例中,可以获取所述第一终端设备的第二位置信息,所述第二位置信息为根据所述第一传感器采集的第三数据确定的;第一终端设备可以属于计算系统,计算系统可以是上述描述的智能家居系统或者其他室内/室外场景,计算系统可以包括多个终端设备,其中,多个终端设备可以包括一个控制中心,该控制中心本实施例也称之为目标终端设备。计算系统可以包括第一终端设备,第一终端设备为了获取与计算系统中其他终端设备之间的相对位置,可以获取第一终端设备上设置的第一传感器采集的第三数据,该第三数据可用于计算第一终端设备与计算系统中其他终端设备之间的相对位置。第二位置信息可以指示第一终端设备与计算系统中其他终端设备之间的相对位置,相对位置可以是相对距离和/或相对方位角。In this embodiment, the second location information of the first terminal device may be acquired, and the second location information is determined according to the third data collected by the first sensor; the first terminal device may belong to a computing system, and the computing The system may be the smart home system described above or other indoor/outdoor scenarios, and the computing system may include multiple terminal devices, wherein the multiple terminal devices may include a control center, which is also referred to as the target terminal device in this embodiment. . The computing system may include a first terminal device, and in order to obtain a relative position with other terminal devices in the computing system, the first terminal device may obtain third data collected by a first sensor set on the first terminal device, the third data It 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 may indicate a relative location between the first terminal device and other terminal devices in the computing system, and the relative location may be a relative distance and/or a relative azimuth.
应理解,第二位置信息可以直接用相对距离和/或相对方位角来表示,也可以是用于计算相对距离和/或相对方位角的数据,不论第一位置信息的表现方式是什么,其都可以直接或间接得到第一终端设备与计算系统中其他终端设备之间的相对位置。It should be understood that the second position information may be directly represented by relative distance and/or relative azimuth, or may be data used to calculate relative distance and/or relative azimuth, no matter what the expression of the first position information is, its The relative positions between the first terminal device and other terminal devices in the computing system can be obtained directly or indirectly.
触发所述第一传感器由所述第二工作状态改变为所述第一工作状态;应理解本申请并不限定关闭所述第一传感器与获取所述第一终端设备的第二位置信息之间的时序,在一种实现中,第一传感器采集第三数据之后,在获取所述第一终端设备的第二位置信息之前,可以触发所述第一传感器由所述第二工作状态改变为所述第一工作状态,在一种实现中,在获取所述第一终端设备的第二位置信息之后,才触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。Trigger the first sensor to change from the second working state to the first working state; it should be understood that this application does not limit the period between turning off the first sensor and acquiring the second position information of the first terminal device In an implementation, after the first sensor collects the third data, before obtaining the second position information of the first terminal device, the first sensor can be triggered to change from the second working state to the all In the first working state, in one implementation, the first sensor is triggered to change from the second working state to the first working state after acquiring the second position information of the first terminal device.
本申请为了降低功耗,可以触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。在一种实现中,计算系统的中的其他终端设备可以触发第一终端设备由所述第二工作状态改变为所述第一工作状态,例如关闭自身的第一传感器。具体的,第一终端设备可以接收计算系统内的其他终端设备发送的用于关闭所述第一传感器的指示,并基于接收到的指示关闭所述第一传感器。In order to reduce power consumption in the present application, the first sensor may be triggered to change from the second working state to the first working state. In one implementation, other terminal devices in the computing system may trigger the first terminal device to change from the second working state to the first working state, for example, turning off its own first sensor. Specifically, the first terminal device may receive an instruction for turning off the first sensor sent by other terminal devices in the computing system, and turn off the first sensor based on the received instruction.
在一种可能的设计中,所述第一传感器采集的数据的数据精度大于所述第二传感器采集的数据的数据精度。In a possible design, the data accuracy of the data collected by the first sensor is greater than the data accuracy 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 to perform the positioning operation of the first terminal device, and can only determine the location change of the first terminal device. In another implementation, the data collected by the second sensor can be used to perform the positioning operation of the first terminal device. However, the data accuracy of the data collected by the second sensor is smaller than that of the data collected by the first sensor. data precision.
具体的,若第一终端设备的第一传感器和第二传感器一起打开,在第一终端设备发生 位置变化后,根据第一传感器采集的数据可以进行第一终端设备的定位计算,根据第二传感器采集的数据也可以进行第一终端设备的定位计算(利用第一传感器采集的数据进行的定位算法和利用第二传感器采集的数据进行的定位算法相同或相似),然而根据第一传感器采集的数据可以进行第一终端设备的定位计算的计算结果,要比根据第二传感器采集的数据也可以进行第一终端设备的定位计算的计算结果的准确度高,所谓准确度高,就是根据第一传感器采集的数据可以进行第一终端设备的定位计算的计算结果更接近第一终端设备的实际位置变化。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 according to the data collected by the first sensor, and according to the second sensor The collected data can also perform the positioning calculation of the first terminal device (the positioning algorithm using the data collected by the first sensor is the same as or similar to the positioning algorithm using the data collected by the second sensor), but according to the data collected by the first sensor The calculation result that can perform the positioning calculation of the first terminal device is more accurate than the calculation result that can also perform the positioning calculation of the first terminal device according to the data collected by the second sensor. The so-called high accuracy is based on the first sensor. The collected data can be used for positioning calculation of the first terminal device, and the calculation result is closer to the actual position change of the first terminal device.
在基于低功耗的第二传感器采集的第二数据确定所述第一终端设备的位置变化超过阈值时,通过具有更高定位精度的第一传感器采集的数据进行定位计算,保证了定位准确度。When it is determined based on the second data collected by the second sensor with low power consumption that the position change of the first terminal device exceeds the threshold, the positioning calculation is performed by using the data collected by the first sensor with higher positioning accuracy, so as to ensure the positioning accuracy .
在一种可能的设计中,所述方法还包括:In a possible design, the method further includes:
在所述触发所述第一传感器由第一工作状态改变为第二工作状态后,触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。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 to the first working state.
应理解本申请并不限定触发所述第一传感器由所述第二工作状态改变为所述第一工作状态与获取所述第一终端设备的第一位置信息之间的时序,在一种实现中,第一传感器采集第二数据之后,在获取所述第一终端设备的第一位置信息之前,可以触发所述第一传感器由所述第二工作状态改变为所述第一工作状态,在一种实现中,在获取所述第一终端设备的第一位置信息之后,才触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。It should be understood that this application does not limit the timing between triggering the change of the first sensor from the second working state to the first working state and acquiring the first position information of the first terminal device. , after the first sensor collects the second data, and before obtaining the first position information of the first terminal device, the first sensor can be triggered to change from the second working state to the first working state, and In one implementation, the first sensor is triggered to change from the second working state to the first working state after acquiring the first position information of the first terminal device.
在一种可能的设计中,所述第一位置信息用于指示所述第一终端设备与第二终端设备之间的第一相对位置;所述第二位置信息用于指示所述第一终端设备与所述第二终端设备之间的第二相对位置;所述第二终端设备和所述第一终端设备属于同一计算系统。In a possible design, the first position information is used to indicate a first relative position between the first terminal device and the second terminal device; the second position information is used to indicate the first terminal The second relative position between the device and the second terminal device; the second terminal device and the first terminal device belong to the same computing system.
所述第一终端设备属于计算系统,所述计算系统还包括其他终端设备(第二终端设备),第二终端设备可以理解为一个或多个终端设备。The first terminal device belongs to a computing system, and the computing system further includes other terminal devices (second terminal devices), and the second terminal device may be understood as one or more terminal devices.
在一种可能的设计中,所述触发所述第一传感器由所述第二工作状态改变为所述第一工作状态,包括:接收所述第二终端设备发送的用于触发所述第一传感器由所述第二工作状态改变为所述第一工作状态的第二指示,并基于所述第二指示触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。In a possible design, the triggering of the first sensor to change from the second working state to the first working state includes: receiving a message sent by the second terminal device for triggering the first sensor A second indication of the sensor changing from the second working state to the first working state, and triggering the first sensor to change from the second working state to the first working state based on the second indication.
在一种可能的设计中,所述当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,包括:In a possible design, when the position change of the first terminal device exceeds a threshold, triggering the first sensor to change from the first working state to the second working state includes:
当所述第一终端设备的位置变化超过阈值,向所述第二终端设备发送用于指示所述第一终端设备的位置变化超过阈值的第三指示;When the position change of the first terminal device exceeds a threshold, sending a third indication to the second terminal device for indicating that the position change of the first terminal device exceeds the threshold;
接收所述第二终端设备发送的用于触发所述第一传感器由第一工作状态改变为第二工作状态的第四指示,并基于所述第四指示触发所述第一传感器由第一工作状态改变为第二工作状态。Receive a fourth instruction sent by the second terminal device for triggering the first sensor to change from a first working state to a second working state, and trigger the first sensor to change from the first working state to the first working state based on the fourth instruction The state changes to the second working state.
在一种可能的设计中,所述第二终端设备包括M个终端设备,所述M个终端设备中 的每个终端设备包括所述第一传感器;In a possible design, the second terminal device includes M terminal devices, and each terminal device in the M terminal devices includes the first sensor;
所述第一位置信息为根据所述第二数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M;和/或,The first location information is determined according to the second data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M; and/or,
所述第二位置信息为根据所述第三数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M。The second location information is determined according to the third data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M.
也就是说,可以基于M个终端设备中的全部或部分终端设备的第一传感器采集的数据进行第一位置的计算,在一种实现中,所述N小于所述M,且所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备,且在所述M个终端设备中的N个终端设备采集用于确定所述第二位置的数据时,所述M个终端设备中除所述N个终端设备之外的终端设备的第一传感器处于所述第一工作状态,例如处于关闭状态。本实施例中,可以选择与第一终端设备距离最近的N个终端设备处于所述第二工作状态,并基于N个终端设备的第一传感器采集的数据进行第一位置信息的计算。N的数目取决于计算系统中设备总数,第一终端设备自身第二传感器的定位精度,即第二传感器的定位精度越高,N越小。本申请实施例中,仅选择位置接近的N个终端设备设备,能够在保证系统精度的条件下节能降耗。That is to say, the calculation of the first position may be performed based on the data collected by the first sensors of all or part of the M terminal devices. In one implementation, the N is less than the M, and the N The terminal devices are N terminal devices that are closest to the first terminal device among the M terminal devices, and N terminal devices in the M terminal devices collect data for determining the second position is in the first working state, for example, in an off state, among the M terminal devices except the N terminal devices. In this embodiment, N terminal devices closest to the first terminal device may be selected to be in the second working state, and the calculation of the first position information is performed based on 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, 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 the embodiment of the present application, only N terminal equipments located close to each other are selected, which can save energy and reduce consumption under the condition of ensuring system accuracy.
在一种可能的设计中,所述N小于所述M,所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备。In a possible design, 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.
在一种可能的设计中,所述第一相对位置和所述第二相对位置包括相对距离和/或相对方位角。其中,相对方位角也可以称之为相对位姿,例如相对的3DOF位姿。In a possible design, the first relative position and the second relative position include relative distances and/or relative azimuths. The relative azimuth angle can also be referred to as a relative pose, such as a relative 3DOF pose.
在一种可能的设计中,所述获取所述第一终端设备的第二位置信息之前,所述方法还包括:In a possible design, before the acquiring the second location information of the first terminal device, the method further includes:
指示所述第一传感器由所述第一工作状态改变为所述第二工作状态。Instructing the first sensor to change from the first operating state to the second operating state.
在一种可能的设计中,所述触发所述第一传感器由所述第一工作状态改变为所述第二工作状态,包括:In a possible design, the triggering of the first sensor to change from the first working state to the second working state includes:
与所述第二终端设备建立连接;establishing a connection with the second terminal device;
接收所述第二终端设备发送的用于触发所述第一传感器由所述第一工作状态改变为所述第二工作状态的第一指示,并基于所述第一指示触发所述第一传感器由所述第一工作状态改变为所述第二工作状态。Receive a first indication sent by the second terminal device for triggering the first sensor to change from the first working state to the second working state, and trigger the first sensor based on the first indication Change from the first working state to the second working state.
在一种场景中,第一终端设备可以保持第一传感器处于所述第一工作状态,例如处于关闭状态,直到接收到用于触发所述第一传感器由所述第一工作状态改变为所述第二工作状态的第一指示或者自身确定应由所述第一工作状态改变为所述第二工作状态,以第一工作状态为关闭状态,第二工作状态为开启状态为例,第一终端设备可以保持第一传感器的关闭状态,直到第一终端设备与计算系统中的至少一个终端设备(第二终端设备)建立连接后,可以接收到计算系统中的第二终端设备发送的开启所述第一传感器的第一指示,第一终端设备可以基于所述第一指示开启所述第一传感器。以计算系统为智能家居系统为例,目标终端设备可以为智慧屏,第一终端设备可以为用户携带的手机,当用户从室外回到室内时,第一终端设备可以与智能家居系统中的至少一个终端设备建立了建立,所谓建立连 接可以是局域网连接,例如蓝牙、WIFI等,在这种情况下,智慧屏可以捕捉到第一终端设备回到智能家居系统内,则第二终端设备可以向第一终端设备发送开启所述第一传感器的第一指示。In one scenario, the first terminal device may keep the first sensor in the first working state, for example, in an off state, until receiving a trigger for the first sensor to change from the first working state to the first working state The first indication of the second working state or the self-determination should be changed from the first working state to the second working state. Taking the first working state as the off state and the second working state as the on state as an example, the first terminal The device can keep the off state of the first sensor until after the first terminal device establishes a connection with at least one terminal device (second terminal device) in the computing system, it can receive the opening said device sent by the second terminal device in the computing system. The first indication of the first sensor, the first terminal device may turn on the first sensor based on the first indication. Taking the computing system as a smart home system as an example, the target terminal device can be a smart screen, and the first terminal device can be a mobile phone carried by the user. When the user returns indoors from the outdoors, the first terminal device can be connected to at least one of the smart home system. A terminal device is established. The so-called established connection can be a local area network connection, such as Bluetooth, WIFI, etc. In this case, the smart screen can capture the first terminal device and return to the smart home system, then the second terminal device can send to the smart home system. The first terminal device sends a first instruction to turn on the first sensor.
在一种可能的设计中,所述获取所述第一终端设备的第一位置信息,包括:获取所述第一传感器采集的第二数据,并根据所述第二数据确定所述第一终端设备的第一位置信息。In a possible design, the acquiring the first location information of the first terminal device includes: acquiring second data collected by the first sensor, and determining the first terminal according to the second data The first location information of the device.
在一种可能的设计中,所述获取所述第一终端设备的第一位置信息,包括:获取所述第一传感器采集的第二数据以及所述N个终端设备的第一传感器采集的数据,并根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息;或,获取所述第一传感器采集的第二数据;向所述M个终端设备中的目标终端设备发送所述第二数据,以便所述目标终端设备根据所述第二数据确定所述第一终端设备的第一位置信息,或者以便所述目标终端设备根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息;接收所述目标终端设备发送的所述第一位置信息。In a possible design, the acquiring the first location information of the first terminal device includes: acquiring 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 according to the second data and the data collected by the first sensors of the N terminal devices; or, obtain the second data collected by the first sensor; The target terminal device among the M terminal devices sends the second data, so that the target terminal device can determine the first location information of the first terminal device according to the second data, or the target terminal device can determine the first location information of the first terminal device according to the second data. Determine the first location information of the first terminal device according to 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.
在一种可能的设计中,所述获取所述第一终端设备的第二位置信息,包括:获取所述第一传感器采集的第三数据,并根据所述第三数据确定所述第一终端设备的第二位置信息。In a possible design, the acquiring the second location information of the first terminal device includes: acquiring third data collected by the first sensor, and determining the first terminal according to the third data Second location information of the device.
在一种可能的设计中,所述获取所述第一终端设备的第二位置信息,包括:获取所述第一传感器采集的第三数据以及所述N个终端设备的第一传感器采集的数据,并根据所述第三数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第二位置信息;或,获取所述第一传感器采集的第三数据;向所述M个终端设备中的目标终端设备发送所述第三数据,以便所述目标终端设备根据所述第三数据确定所述第一终端设备的第二位置信息,或者以便所述目标终端设备根据所述第三数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第二位置信息;接收所述目标终端设备发送的所述第二位置信息。In a possible design, the acquiring the second position information of the first terminal device includes: acquiring third data collected by the first sensor and data collected by the first sensors of the N terminal devices , and determine the second position information of the first terminal device according to the third data and the data collected by the first sensors of the N terminal devices; or, obtain the third data collected by the first sensor; The target terminal device among the M terminal devices sends the third data, so that the target terminal device can determine the second location information of the first terminal device according to the third data, or so that the target terminal device can determine the second location information of the first terminal device according to the third data. Determine the second location information of the first terminal device according to the third data and the data collected by the first sensors of the N terminal devices; and receive the second location information sent by the target terminal device.
在一种可能的设计中,所述第一传感器包括如下传感器的至少一种:超宽频UWB传感器、超声波传感器、镭射传感器以及视觉传感器;其中,UWB传感器可以包括UWB发送器和UWB接收器,超声波传感器可以包括超声波发送器和超声波接收器,镭射传感器可以包括镭射发送器和镭射接收器。In a 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, and the ultrasonic sensor The sensor may include an ultrasonic transmitter and an ultrasonic receiver, and the laser sensor may include a laser transmitter and a laser receiver.
所述第二传感器包括如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙BLE以及无线保真WIFI。The second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
在一种可能的设计中,所述第一传感器包括如下传感器的至少一种:加速计传感器以及陀螺仪传感器,且根据所述第一传感器采集的数据进行设备定位时的定位精度大于预设值。加速计传感器以及陀螺仪传感器在开启时,第一终端设备的功耗也较低,然而一些加速计传感器以及陀螺仪传感器采集的数据进行设备定位时的定位精度同样较高。In a 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 positioning the device according to the data collected by the first sensor is greater than a preset value . When the accelerometer sensor and the gyroscope sensor are turned on, the power consumption of the first terminal device is also low. However, the positioning accuracy of the data collected by some accelerometer sensors and the gyroscope sensor for device positioning is also high.
第二方面,本申请提供了一种设备定位装置,应用于第一终端设备,所述第一终端设备包括第一传感器和第二传感器,其中,所述第一传感器采集的数据用于对所述第一终端 设备定位,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,且所述第一传感器的功率大于所述第二传感器的功率,所述装置包括:In a second aspect, the present application provides a device positioning apparatus, which is applied to a first terminal device, where the first terminal device includes a first sensor and a second sensor, wherein the data collected by the first sensor is used for all The first terminal device is positioned, 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 device includes:
获取模块,用于获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的;an acquisition module, configured to acquire a position change of the first terminal device, where the position change is determined according to the first data collected by the second sensor;
传感器状态变化模块,用于当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,所述第一传感器处于所述第一工作状态的功耗小于处于所述第二工作状态的功耗;A sensor state change module, configured 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, and the first sensor is in the first working state The power consumption is less than the power consumption in the second working state;
所述获取模块,用于获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器在所述第二工作状态采集的第二数据确定的。The acquiring module is configured to acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor in the second working state.
在一种可能的设计中,所述获取模块,用于在获取所述第一终端设备的位置变化之前,获取所述第一终端设备的第二位置信息,所述第二位置信息为根据所述第一传感器在所述第二工作状态采集的第三数据确定的;In a possible design, the acquiring module is configured to acquire second location information of the first terminal device before acquiring the location change of the first terminal device, where the second location information is based on the determined by the third data collected by the first sensor in the second working state;
所述传感器状态变化模块,用于触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。The sensor state changing module is configured to trigger the first sensor to change from the second working state to the first working state.
在一种可能的设计中,所述第一传感器采集的数据的数据精度大于所述第二传感器采集的数据的数据精度。In a possible design, the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
在一种可能的设计中,所述传感器状态变化模块,用于:In a possible design, the sensor state change module is used to:
在触发所述第一传感器由第一工作状态改变为第二工作状态后,触发所述第一传感器由第二工作状态改变为第一工作状态。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 to the first working state.
在一种可能的设计中,所述第一位置信息用于指示所述第一终端设备与第二终端设备之间的第一相对位置;In a possible design, the first position information is used to indicate a first relative position between the first terminal device and the second terminal device;
所述第二位置信息用于指示所述第一终端设备与所述第二终端设备之间的第二相对位置;The second position 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.
在一种可能的设计中,所述传感器状态变化模块,用于接收所述第二终端设备发送的用于触发所述第一传感器由所述第二工作状态改变为所述第一工作状态的第二指示,并基于所述第二指示触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。In a possible design, the sensor state change module is configured to receive a message sent by the second terminal device for triggering the first sensor to change from the second working state to the first working state a second indication, and triggering the first sensor to change from the second working state to the first working state based on the second indication.
在一种可能的设计中,所述传感器状态变化模块,用于当所述第一终端设备的位置变化超过阈值,向所述第二终端设备发送用于指示所述第一终端设备的位置变化超过阈值的第三指示;In a possible design, the sensor state change module is configured to, when the position change of the first terminal device exceeds a threshold, send a message indicating the position change of the first terminal device to the second terminal device a third indication that the threshold is exceeded;
接收所述第二终端设备发送的用于触发所述第一传感器由第一工作状态改变为第二工 作状态的第四指示,并基于所述第四指示触发所述第一传感器由第一工作状态改变为第二工作状态。Receive a fourth instruction sent by the second terminal device for triggering the first sensor to change from a first working state to a second working state, and trigger the first sensor to change from the first working state to the first working state based on the fourth instruction The state changes to the second working state.
在一种可能的设计中,所述第二终端设备包括M个终端设备,所述M个终端设备中的每个终端设备包括所述第一传感器;In a possible design, the second terminal device includes M terminal devices, and each terminal device in the M terminal devices includes the first sensor;
所述第一位置信息为根据所述第二数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M;和/或,The first location information is determined according to the second data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M; and/or,
所述第二位置信息为根据所述第三数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M。The second location information is determined according to the third data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M.
在一种可能的设计中,所述N小于所述M,所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备。In a possible design, 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.
在一种可能的设计中,所述第一相对位置和所述第二相对位置包括相对距离和/或相对方位角。In a possible design, the first relative position and the second relative position include relative distances and/or relative azimuths.
在一种可能的设计中,所述传感器状态变化模块,用于在获取所述第一终端设备的第二位置信息之前,指示所述第一传感器由所述第一工作状态改变为所述第二工作状态。In a possible design, the sensor state change module is configured to instruct the first sensor to change from the first working state to the first working state before acquiring the second position information of the first terminal device 2. Working status.
在一种可能的设计中,所述传感器状态变化模块,用于与所述第二终端设备建立连接;In a possible design, the sensor state change module is used to establish a connection with the second terminal device;
接收所述第二终端设备发送的用于触发所述第一传感器由所述第一工作状态改变为所述第二工作状态的第一指示,并基于所述第一指示触发所述第一传感器由所述第一工作状态改变为所述第二工作状态。Receive a first indication sent by the second terminal device for triggering the first sensor to change from the first working state to the second working state, and trigger the first sensor based on the first indication Change from the first working state to the second working state.
在一种可能的设计中,所述获取模块,用于:In a possible design, the acquisition module is used to:
获取所述第一传感器采集的第二数据,并根据所述第二数据确定所述第一终端设备的第一位置信息。Second data collected by the first sensor is acquired, and first location information of the first terminal device is determined according to the second data.
在一种可能的设计中,所述获取模块,用于:In a possible design, the acquisition module is used to:
获取所述第一传感器采集的第二数据以及所述N个终端设备的第一传感器采集的数据,并根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息;或,Acquire second data collected by the first sensor and data collected by the first sensors of the N terminal devices, and determine the the first location information of the first terminal device; or,
获取所述第一传感器采集的第二数据;向所述M个终端设备中的目标终端设备发送所述第二数据,以便所述目标终端设备根据所述第二数据确定所述第一终端设备的第一位置信息,或者以便所述目标终端设备根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息;接收所述目标终端设备发送的所述第一位置信息。acquiring 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 terminal device according to the second data the first location information of the first terminal device, or so that the target terminal device can determine the first location information of the first terminal device according to the second data and the data collected by the first sensors of the N terminal devices; receive the target The first location information sent by the terminal device.
在一种可能的设计中,所述获取模块,用于:In a possible design, the acquisition module is used to:
获取所述第一传感器采集的第三数据,并根据所述第三数据确定所述第一终端设备的第二位置信息。The third data collected by the first sensor is acquired, and the second position information of the first terminal device is determined according to the third data.
在一种可能的设计中,所述获取模块,用于:In a possible design, the acquisition module is used to:
获取所述第一传感器采集的第三数据以及所述N个终端设备的第一传感器采集的数据,并根据所述第三数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第二位置信息;或,Acquire third data collected by the first sensor and data collected by the first sensors of the N terminal devices, and determine the second location information of the first terminal device; or,
获取所述第一传感器采集的第三数据;向所述M个终端设备中的目标终端设备发送所述第三数据,以便所述目标终端设备根据所述第三数据确定所述第一终端设备的第二位置信息,或者以便所述目标终端设备根据所述第三数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第二位置信息;接收所述目标终端设备发送的所述第二位置信息。acquiring 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 determines the first terminal device according to the third data the second location information of the first terminal device, or so that the target terminal device can determine the second location information of the first terminal device according to the third data and the data collected by the first sensors of the N terminal devices; receive the target the second location information sent by the terminal device.
在一种可能的设计中,所述第一传感器包括如下传感器的至少一种:超宽频UWB传感器、超声波传感器、镭射传感器以及视觉传感器;In a 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;
所述第二传感器包括如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙BLE以及无线保真WIFI。The second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
在一种可能的设计中,所述第一传感器包括如下传感器的至少一种:加速计传感器以及陀螺仪传感器,且所述第一传感器采集的数据的数据精度大于预设值。In a possible design, the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data accuracy of the data collected by the first sensor is greater than a preset value.
第三方面,本申请提供了一种终端设备,所述终端设备包括处理器和存储器,所述处理器获取存储器中存储的代码,以执行第一方面以及其可选的实现方式中的任意一种。In a third aspect, the present application provides a terminal device, the terminal device includes a processor and a memory, and the processor acquires code stored in the memory to execute any one of the first aspect and its optional implementation manners kind.
第四方面,本申请提供了一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质包含计算机指令用于执行第一方面以及其可选的实现方式中的任意一种。In a fourth aspect, the present application provides a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium containing computer instructions for executing any of the first aspect and its optional implementation manners A sort of.
第五方面,本申请还提供了一种计算机程序产品,包含代码,代码被执行时,用于实现执行第一方面以及其可选的实现方式中的任意一种。In a fifth aspect, the present application further provides a computer program product, which includes code, and when the code is executed, is used to implement any one of the first aspect and its optional implementation manners.
第六方面,提供了一种芯片,所述芯片包括处理器,所述处理器用于执行上述第一方面所描述的方法中的部分或全部操作。In a sixth aspect, a chip is provided, the chip includes a processor, and the processor is configured to perform some or all of the operations in the method described in the first aspect above.
本申请实施例提供了一种设备定位方法,应用于第一终端设备,所述第一终端设备包括第一传感器和第二传感器,其中,所述第一传感器用于对所述第一终端设备定位,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,且所述第一传感器的功率大于所述第二传感器的功率,所述方法包括:获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的;当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,所述第一传感器处于 所述第一工作状态的功耗小于处于所述第二工作状态的功耗;获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器在所述第二工作状态采集的第二数据确定的。通过上述方式,只有在基于低功耗的第二传感器采集的第二数据确定所述第一终端设备的位置变化超过阈值时,才开启高功耗的第一传感器,降低了第一终端设备的功耗。An embodiment of the present application provides a device positioning method, which is applied to a first terminal device, where the first terminal device includes a first sensor and a second sensor, wherein the first sensor is used to locate the first terminal device positioning, 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 method includes: acquiring the first The position of the terminal device changes, and the position change is determined according to the 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 the first working state is a second working state, and the power consumption of the first sensor in the first working state is smaller than that in the second working state; acquiring the first location information of the first terminal device, the first The location information is determined according to second data collected by the first sensor in the second working state. In the above manner, the first sensor with high power consumption is turned on only when it is determined based on the second data collected by the second sensor with low power consumption that the position change of the first terminal device exceeds the threshold, which reduces the power consumption of the first terminal device. power consumption.
附图说明Description of drawings
图1a为本申请实施例提供的一种智能家居系统的系统架构图;1a is a system architecture diagram of a smart home system provided by an embodiment of the application;
图1b为本申请提供的终端设备的结构示意;FIG. 1b is a schematic structural diagram of a terminal device provided by this application;
图2为本申请实施例的终端设备的软件结构框图;2 is a block diagram of a software structure of a terminal device according to an embodiment of the application;
图3为本申请实施例提供的设备定位方法的流程示意;FIG. 3 is a schematic flowchart of a device positioning method provided by an embodiment of the present application;
图4为本申请实施例提供的设备定位方法的流程示意;FIG. 4 is a schematic flowchart of a device positioning method provided by an embodiment of the present application;
图5为本申请实施例提供的设备定位方法的流程示意;FIG. 5 is a schematic flowchart of a device positioning method provided by an embodiment of the present application;
图6为本申请实施例提供的设备定位方法的流程示意;FIG. 6 is a schematic flowchart of a device positioning method provided by an embodiment of the present application;
图7为本申请实施例提供的设备定位方法的流程示意;FIG. 7 is a schematic flowchart of a device positioning method provided by an embodiment of the present application;
图8为本申请实施例提供的设备定位方法的流程示意;FIG. 8 is a schematic flowchart of a device positioning method provided by an embodiment of the present application;
图9为本申请实施例提供的一种设备定位装置的结构示意;FIG. 9 is a schematic structural diagram of a device positioning apparatus provided by an embodiment of the present application;
图10为本申请实施例提供的一种设备定位装置的结构示意;FIG. 10 is a schematic structural diagram of a device positioning apparatus provided by an embodiment of the application;
图11为本申请提供的一种终端设备的结构示意。FIG. 11 is a schematic structural diagram of a terminal device provided by this application.
具体实施方式detailed description
下面结合附图,对本申请的实施例进行描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。The embodiments of the present application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Those of ordinary skill in the art know that with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块。在本申请中出现的对步骤进行的命名或者编号,并不意味着必须按照命名或者编号所指示的时间/逻辑先后顺序执行方法流程中的步骤,已经命名或者编号的流程步骤可以根据要实现的技术目的变更执行次序,只要能达到相同或者相类似的技术效果即可。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It is to be understood that data so used may be interchanged under appropriate circumstances so that the embodiments described herein can be practiced in sequences other than those 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 comprising a series of steps or modules is not necessarily limited to those expressly listed Rather, those steps or modules may include other steps or modules not expressly listed or inherent to the process, method, product or apparatus. The naming or numbering of the steps in this application does not mean that the steps in the method flow must be executed in the time/logical sequence indicated by the naming or numbering, and the named or numbered process steps can be implemented according to the The technical purpose is to change the execution order, as long as the same or similar technical effects can be achieved.
无线定位技术是指用来判定移动用户位置的测量方法和计算方法,即定位算法。目前最常用的定位技术主要有:时差定位技术、信号到达角度测量(angle-of-arrival,AOA)技术、到达时间定位(time of arrival,TOA)和到达时间差定位(time different of arrival,TDOA)等。其中,TDOA技术是目前最为流行的一种方案,超宽带无线通信技术(ultra wide band,UWB) 采用的也是这种技术。UWB是一种无载波通信技术,UWB不使用载波,而是使用短的能量脉冲序列,并通过正交频分调制或直接排序将脉冲扩展到一个频率范围内。Wireless positioning technology refers to the measurement method and calculation method used to determine the location of a mobile user, that is, a positioning algorithm. At present, the most commonly used positioning technologies are: time difference positioning technology, signal angle of arrival (angle-of-arrival, AOA) technology, time of arrival (time of arrival, TOA) and time difference of arrival (time different of arrival, TDOA) positioning Wait. Among them, the TDOA technology is the most popular solution at present, and the ultra-wideband wireless communication technology (ultra wide band, UWB) also adopts this technology. UWB is a carrierless communication technology. UWB does not use a carrier, but a short sequence of energy pulses, and the pulses are extended to a frequency range through orthogonal frequency division modulation or direct sequencing.
空间交互是指基于空间位置感知(包括设备与设备之间的相对位置和角度等等)的人机交互技术和方法,为了实现更好的使用体验,用户的多个设备之间需要实现空间感知,如现有技术中心使用UWB技术实现Airdrop定向分享功能。然而,基于UWB实现的设备定位功耗较高,虽然可以在空间交互上给用户带来了好的体验,但同时也减少了终端设备的使用时间。Spatial interaction refers to human-computer interaction technologies and methods based on spatial position awareness (including relative position and angle between devices, etc.). In order to achieve a better user experience, users need to realize spatial awareness between multiple devices. , for example, the existing technology center uses UWB technology to realize the Airdrop directional sharing function. However, the device positioning based on UWB has high power consumption. Although it can bring a good experience to the user in spatial interaction, it also reduces the use time of the terminal device.
首先介绍本申请的应用场景,本申请可以应用在智能家居系统或办公室中,用户家或办公室中可以设置有多个终端设备,多个终端设备之间具备相互的空间感知,并构成一个空间网络(本申请实施例中还可以称之为计算系统)。First, the application scenarios of this application are introduced. 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. Multiple terminal devices have mutual spatial awareness and form a spatial network. (It may also be referred to as a computing system in this embodiment of the present application).
以智能家居系统为例,图1a是本申请实施例提供的一种智能家居系统的系统架构图。如图1a所示,智能家居系统包括用户终端11、控制中心12以及至少一个屏幕终端(例如屏幕终端13,14);其中,屏幕终端13,14被设置在不同的位置。用户终端11与至少一个屏幕终端(例如屏幕终端13,14)可以处于相同区域,也可以处于不同区域,举例来说,用户终端11可以处于客厅中,屏幕终端13可以处于客厅或卧室中。Taking a smart home system as an example, FIG. 1a is a system architecture diagram of a smart home system provided by an embodiment of the present application. As shown in FIG. 1a, the smart home system includes a user terminal 11, a control center 12, and at least one screen terminal (eg, screen terminals 13, 14); wherein, the screen terminals 13, 14 are set at different positions. The user terminal 11 and at least one screen terminal (eg, screen terminals 13 and 14) may be located in the same area or in different areas. For example, the user terminal 11 may be in the living room, and the screen terminal 13 may be located in the living room or the bedroom.
在一些示例中,用户终端11和屏幕终端(例如屏幕终端13,14)均可以为手机、平板电脑、数码相机、个人数字助理(personal digitalassistant,PDA)、可穿戴设备、膝上型计算机(laptop)、智能电视、华为智慧屏等具有显示屏幕的电子设备。电子设备的示例性实施例包括但不限于搭载iOS、android、Windows、鸿蒙系统(Harmony OS)或者其他操作系统的电子设备。上述电子设备也可以是其他电子设备,诸如具有触敏表面(例如触控面板)的膝上型计算机(laptop)等。本申请实施例对电子设备的类型不做具体限定。In some examples, both the user terminal 11 and the screen terminals (eg, screen terminals 13, 14) may be mobile phones, tablet computers, digital cameras, personal digital assistants (PDAs), wearable devices, laptop computers (laptops) ), smart TVs, Huawei smart screens and other electronic devices with display screens. Exemplary embodiments of electronic devices include, but are not limited to, electronic devices equipped with iOS, android, Windows, Harmony OS, or other operating systems. The electronic device described above may also be other electronic devices, such as a laptop or the like having a touch-sensitive surface (eg, a touch panel). The embodiment of the present application does not specifically limit the type of the electronic device.
在一些示例中,控制中心12也可以为终端设备,例如可以为手机、平板电脑、数码相机、个人数字助理(personal digitalassistant,PDA)、可穿戴设备、膝上型计算机(laptop)、智能电视、华为智慧屏等具有显示屏幕的电子设备。In some examples, the control center 12 may also be a terminal device, such as a mobile phone, a tablet computer, a digital camera, a personal digital assistant (PDA), a wearable device, a laptop computer (laptop), a smart TV, Electronic devices with display screens such as Huawei Smart Screens.
应理解,上述智能家居系统中也可以不设置控制中心12。It should be understood that the control center 12 may not be provided in the above-mentioned smart home system.
用户终端11和屏幕终端(例如屏幕终端13,14)均可以与控制中心12通过有线网络(Wired network)或无线网络(wireless network)等网络连接,或者用户终端11和屏幕终端(例如屏幕终端13,14)可以之间通过有线网络(Wired network)或无线网络(wireless network)等网络连接。例如,该网络可以为局域网(local area networks,LAN),也可以为广域网(wide area networks,WAN)(例如互联网)。用户终端11和屏幕终端与控制中心12之间的网络均可使用任何已知的网络通信协议来实现,上述网络通信协议可以是各种有线或无线通信协议,诸如以太网、通用串行总线(universal serial bus,USB)、火线(firewire)、全球移动通讯系统(global system for mobile communications,GSM)、通用分组无线服务(general packet radio service,GPRS)、码分多址接入(code divisionmultiple 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)等通信协议。Both the user terminal 11 and the screen terminals (such as the screen terminals 13, 14) can be connected to the control center 12 through a network such as a wired network (wired network) or a wireless network (wireless network), or the user terminal 11 and the screen terminals (for example, the screen terminal 13) , 14) can be connected through a wired network (Wired network) or a wireless network (wireless network) and other networks. For example, the network may be a local area network (LAN) or a wide area network (WAN) (eg, the Internet). The network between the user terminal 11 and the screen terminal and the control center 12 can be implemented using any known network communication protocol, which can be various wired or wireless communication protocols, such as Ethernet, Universal Serial Bus ( universal serial bus, USB), firewire (firewire), global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), new air interface ( New radio, NR), Bluetooth (bluetooth), wireless fidelity (wireless fidelity, Wi-Fi) and other communication protocols.
此外,用户终端11和屏幕终端(例如屏幕终端13,14)之间也可以通过有线网络(WiredIn addition, a wired network (Wired
network)或无线网络(wireless network)等网络连接。详细的网络类型参考上述描述,在此就不再一一赘述。network) or a wireless network. For detailed network types, refer to the above description, which will not be repeated here.
下面介绍本申请实施例中一种终端设备的硬件结构示意图,其中,该终端设备可以为用户终端11和/或屏幕终端(例如屏幕终端13,14)。The following describes a schematic diagram of a hardware structure of a terminal device in an embodiment of the present application, where the terminal device may be a user terminal 11 and/or a screen terminal (eg, screen terminals 13 and 14 ).
终端设备又可称之为用户设备(user equipment,UE)或者电子设备,可以部署在陆地上,包括室内或室外、手持或车载;也可以部署在水面上(如轮船等);还可以部署在空中(例如飞机、气球和卫星上等)。电子设备可以是手机(mobile phone)、平板电脑(pad)、具备无线通讯功能的可穿戴设备(如智能手表)、具有定位功能的位置追踪器、带无线收发功能的电脑、虚拟现实(virtual reality,VR)设备、增强现实(augmented reality,AR)设备、智慧家庭(sma rt home)中的无线设备等,本申请对此不作限定。本申请中将前述电子设备及可设置于前述电子设备的芯片统称为电子设备。Terminal equipment, also known as user equipment (UE) or electronic equipment, can be deployed on land, including indoor or outdoor, handheld or vehicle-mounted; it can also be deployed on water (such as ships, etc.); it can also be deployed on In the air (eg on airplanes, balloons and satellites, etc.). Electronic devices can be mobile phones, tablet computers (pads), wearable devices with wireless communication functions (such as smart watches), location trackers with positioning functions, computers with wireless transceiver functions, virtual reality (virtual reality) , VR) equipment, augmented reality (augmented reality, AR) equipment, wireless equipment in a smart home (smart home), etc., which are not limited in this application. In this application, the aforementioned electronic devices and chips that can be provided in the aforementioned electronic devices are collectively referred to as electronic devices.
本申请中的终端设备可以包括但不限于:智能移动电话、电视、平板电脑、手环、头戴显示设备(Head Mount Display,HMD)、增强现实(augmented reality,AR)设备,混合现实(mixed reality,MR)设备、蜂窝电话(cellular phone)、智能电话(smart phone)、个人数字助理(personal digital assistant,PDA)、平板型电脑、车载终端设备、膝上型电脑(laptop computer)、个人电脑(personal computer,PC)、监控设备、机器人、车载终端、自动驾驶车辆等。当然,在以下实施例中,对该终端设备的具体形式不作任何限制。Terminal devices in this application may include, but are not limited to: smart mobile phones, TVs, tablet computers, wristbands, head mounted display devices (Head Mount Display, HMD), augmented reality (augmented reality, AR) devices, mixed reality (mixed reality) reality, MR) equipment, cellular phone (cellular phone), smart phone (smart phone), personal digital assistant (personal digital assistant, PDA), tablet computer, vehicle terminal equipment, laptop computer (laptop computer), personal computer (personal computer, PC), monitoring equipment, robots, in-vehicle terminals, autonomous vehicles, etc. Of course, in the following embodiments, no limitation is imposed on the specific form of the terminal device.
本申请实施例中,终端设备可以包含一种或多种采集用于进行与其他终端设备进行相对位置确定的数据的传感器(本申请中也可以称之为第一传感器),第一传感器可以为超宽频(ultra wide band,UWB)传感器、超声波传感器、镭射传感器以及视觉传感器。In this embodiment of the present application, the terminal device may include one or more sensors that collect data for determining relative positions with other terminal devices (also referred to as the first sensor in this application), and the first sensor may be Ultra wide band (UWB) sensors, ultrasonic sensors, laser sensors and vision sensors.
其中,UWB传感器采集的数据可以用于进行精确的终端设备到终端设备间相对距离和相对方位角的测量。超声波传感器采集的数据可以用于进行精确的终端设备到终端设备间相对距离的测量。视觉传感器采集的数据可以用于进行精确的终端设备到终端设备间角度的测量。基于第一传感器采集的数据进行定位时的定位精度较高,但同时开启这些传感器时终端设备相应需要的功耗也较高。Among them, the data collected by the UWB sensor can be used for accurate measurement of the relative distance and relative azimuth between the terminal device and the terminal device. The data collected by the ultrasonic sensor can be used to make accurate terminal-to-terminal relative distance measurements. Data collected by vision sensors can be used to make precise end-to-end angle measurements. The positioning accuracy is high when positioning based on the data collected by the first sensor, but the corresponding power consumption of the terminal device is also high when these sensors are turned on at the same time.
应理解,第一传感器还可以为其他可以具有较高定位精度的传感器,本申请并不限定。It should be understood that the first sensor may also be other sensors with higher positioning accuracy, which is not limited in the present application.
本申请实施例中,终端设备可以包含一种或多种采集用于确定终端设备是否移动或者发生了多少位置变化的数据的传感器(本申请中也可以称之为第二传感器)。所述第二传感器可以包括如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙(bluetooth low energy,BLE)以及无线保真(wireless fidelity,WIFI)。In this embodiment of the present application, the terminal device may include one or more sensors (which may also be referred to as second sensors in this application) for collecting data for determining whether the terminal device moves or how much position change has occurred. The second sensor may include at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, bluetooth low energy (BLE) and wireless fidelity (WIFI).
其中,加速计传感器采集的数据可以用于进行测量终端设备自身的移动,以终端设备惯性坐标系为基准测量设备在x,y,z三个方向的加速度,加速计传感器是计步器的主要传感模态。陀螺仪传感器采集的数据可以用于进行测量终端设备自身的转动,以设备惯性坐标系为基准测量设备在x,y,z三个方向的转动。磁力计传感器采集的数据可以用于进行测量终端设备检测到的磁场强度,排除外界环境的剧烈变化,其中,x,y,z三个方向 的磁力值的变化可以表示终端设备位置的变化。BLE采集的数据可以用于进行不太精确的终端设备到终端设备间相对距离和相对角度的测量,但BLE作为传感器,其扫描到的接收信号强度(received signal strength,RSS)可以作为位置指纹,BLE RSS的变化可以是表示终端设备位置的变化。WIFI采集的数据可以用于进行不太精确的终端设备到终端设备间相对距离的测量,但网卡作为传感器,其扫描到的RSS可以作为位置指纹,一般WiFi RSS的变化可以表示终端设备所处位置的变化。基于第二传感器采集的数据进行定位时的定位精度较低,但同时开启这些传感器时终端设备相应需要的功耗也较低。Among them, the data collected by the accelerometer sensor can be used to measure the movement of the terminal device itself. The acceleration of the device in the x, y, and z directions is measured based on the inertial coordinate system of the terminal device. The accelerometer sensor is the main component of the pedometer. sensing modality. The data collected by the gyroscope sensor can be used to measure the rotation of the terminal device itself, and the rotation of the device in the three directions of x, y, and z is measured based on the inertial coordinate system of the device. The data collected by the magnetometer sensor can be used to measure the magnetic field strength detected by the terminal device, excluding drastic changes in the external environment, where the changes in the magnetic force values in the three directions of x, y, and z can represent the change in the position of the terminal device. The data collected by BLE can be used to measure the relative distance and relative angle between the terminal device and the terminal device. Changes in BLE RSS can be indicative of changes in the location of the end device. The data collected by WIFI can be used to measure the relative distance between the terminal device and the terminal device which is not very accurate, but the network card is used as a sensor, and the scanned RSS can be used as the location fingerprint. Generally, the change of WiFi RSS can indicate the location of the terminal device. The change. The positioning accuracy is low when positioning based on the data collected by the second sensor, but the corresponding power consumption of the terminal device is also low when these sensors are turned on at the same time.
应理解,第二传感器还可以为其他可以具有较低定位精度的传感器,本申请并不限定。It should be understood that the second sensor may also be other sensors that may have lower positioning accuracy, which is not limited in this application.
示例性地,参阅图1b,下面以一个具体的结构为例,对本申请提供的终端设备的结构进行示例性说明。Exemplarily, referring to FIG. 1b, the following takes a specific structure as an example to illustrate the structure of the terminal device provided by the present application.
终端设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M,运动传感器180N等。The 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 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, buttons 190, motor 191, indicator 192, camera 193, display screen 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195 and so on. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, and ambient light. Sensor 180L, bone conduction sensor 180M, motion sensor 180N, etc.
可以理解的是,本发明实施例示意的结构并不构成对终端设备100的具体限定。在本申请另一些实施例中,终端设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It can be 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 the present application, the terminal device 100 may include more or less components than those shown in the drawings, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions.
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby increasing the efficiency of the system.
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接 口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transceiver (universal asynchronous transmitter) receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / or universal serial bus (universal serial bus, USB) interface, etc.
I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。在一些实施例中,处理器110可以包含多组I2C总线。处理器110可以通过不同的I2C总线接口分别耦合触摸传感器180K,充电器,闪光灯,摄像头193等。例如:处理器110可以通过I2C接口耦合触摸传感器180K,使处理器110与触摸传感器180K通过I2C总线接口通信,实现终端设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 can be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193 and the like through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate with each other through the I2C bus interface, so as to realize the touch function of the terminal device 100 .
I2S接口可以用于音频通信。在一些实施例中,处理器110可以包含多组I2S总线。处理器110可以通过I2S总线与音频模块170耦合,实现处理器110与音频模块170之间的通信。在一些实施例中,音频模块170可以通过I2S接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement 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 through the I2S interface, so as to realize the function of answering calls through a Bluetooth headset.
PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块170与无线通信模块160可以通过PCM总线接口耦合。在一些实施例中,音频模块170也可以通过PCM接口向无线通信模块160传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。在一些实施例中,UART接口通常被用于连接处理器110与无线通信模块160。例如:处理器110通过UART接口与无线通信模块160中的蓝牙模块通信,实现蓝牙功能。在一些实施例中,音频模块170可以通过UART接口向无线通信模块160传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160 . For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器110与显示屏194,摄像头193等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serial interface,DSI)等。在一些实施例中,处理器110和摄像头193通过CSI接口通信,实现终端设备100的拍摄功能。处理器110和显示屏194通过DSI接口通信,实现终端设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193 . MIPI interfaces include camera serial interface (CSI), display serial interface (DSI), etc. In some embodiments, the processor 110 communicates with the camera 193 through the CSI interface, so as to realize the shooting function of the terminal device 100 . The processor 110 communicates with the display screen 194 through the DSI interface to implement the display function of the terminal device 100 .
GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头193,显示屏194,无线通信模块160,音频模块170,传感器模块180等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为终端设备100充电,也可以用于终端设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他终端设备,例如AR设备等。The USB interface 130 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 130 can be used to connect a charger to charge the terminal device 100, and can also be used to transmit data between the terminal device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other terminal devices, such as AR devices.
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对终端设备100的结构限定。在本申请另一些实施例中,终端设备100也可以采用 上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the terminal device 100 . In other embodiments of the present application, the terminal device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过终端设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为终端设备供电。The charging management module 140 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB interface 130 . In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through the wireless charging coil of the terminal device 100 . While the charging management module 140 charges the battery 142 , it can also supply power to the terminal device through the power management module 141 .
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。The power management module 141 is used for connecting 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, and supplies power to the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110 . In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
终端设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。The wireless communication function of the terminal device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, the baseband processor, and the like.
天线1和天线2用于发射和接收电磁波信号。终端设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
移动通信模块150可以提供应用在终端设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。The mobile communication module 150 may provide a wireless communication solution including 2G/3G/4G/5G, etc. applied on the terminal device 100 . The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA) and the like. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and then turn it into an electromagnetic wave for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110 . In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the same device as at least part of the modules of the processor 110 .
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or videos through the display screen 194 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 110, and may be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块160可以提供应用在终端设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。 无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 160 can provide applications on the terminal device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellites Wireless communication solutions such as global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared technology (IR). The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 . The wireless communication module 160 can also receive the signal to be sent from the processor 110 , perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2 .
在一些实施例中,终端设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得终端设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括但不限于:第五代移动通信技术(5th-Generation,5G)系统,全球移动通讯系统(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(也可以称为调频广播),紫蜂协议(Zigbee),射频识别技术(radio frequency identification,RFID)和/或红外(infrared,IR)技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)等。In some embodiments, the antenna 1 of the terminal device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with 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 technology may include but is not limited to: the fifth generation mobile communication technology (5th-Generation, 5G) system, the global system for mobile communications (global system for mobile communications, GSM), the general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA) ), long term evolution (LTE), Bluetooth (bluetooth), global navigation satellite system (the global navigation satellite system, GNSS), wireless fidelity (wireless fidelity, WiFi), near field communication (near field communication, NFC), FM (also known as FM radio), Zigbee, radio frequency identification (radio frequency identification, RFID) and/or infrared (infrared, IR) technology, etc. The GNSS may include global positioning system (global positioning system, GPS), global navigation satellite system (global navigation satellite system, GLONASS), Beidou navigation satellite system (beidou navigation satellite system, BDS), quasi-zenith satellite system (quasi -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS), etc.
在一些实施方式中,终端设备100也可以包括有线通信模块(图1b中未示出),或者,此处的移动通信模块150或者无线通信模块160可以替换为有线通信模块(图1b中未示出),该有线通信模块可以使终端设备通过有线网络与其他设备进行通信。该有线网络可以包括但不限于以下一项或者多项:光传送网(optical transport network,OTN)、同步数字体系(synchronous digital hierarchy,SDH)、无源光网络(passive optical network,PON)、以太网(Ethernet)、或灵活以太网(flex Ethernet,FlexE)等。In some embodiments, the terminal device 100 may also include a wired communication module (not shown in FIG. 1 b ), or the mobile communication module 150 or the wireless communication module 160 here may be replaced by a wired communication module (not shown in FIG. 1 b ) out), the wired communication module can enable the terminal device to communicate with other devices through the wired network. The 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 network (Ethernet), or flexible Ethernet (flex Ethernet, FlexE).
终端设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The terminal device 100 implements a display function through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,终端设备100可以包括1个或N个显示屏194,N为大于1的正整数。Display screen 194 is used to display images, videos, and the like. Display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light). emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diode (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the terminal device 100 may include one or N display screens 194 , where N is a positive integer greater than one.
终端设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。The terminal device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor.
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP 还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。The ISP is used to process the data fed back by the camera 193 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193 .
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB摄像头,YUV等格式的图像信号。在一些实施例中,终端设备100可以包括1个或N个摄像头193,N为大于1的正整数。Camera 193 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB camera, YUV and other formats of image signals. In some embodiments, the terminal device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当终端设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the terminal device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, and the like.
视频编解码器用于对数字视频压缩或解压缩。终端设备100可以支持一种或多种视频编解码器。这样,终端设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record videos in various encoding formats, for example, moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现终端设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the terminal device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展终端设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the terminal device 100 . The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example to save files like music, video etc in external memory card.
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储终端设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行终端设备100的各种功能应用以及数据处理。Internal memory 121 may be used to store computer executable program code, which includes instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the terminal device 100 and the like. In addition, the internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like. The processor 110 executes various functional applications and data processing of the terminal device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
终端设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playback, recording, etc.
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。The audio module 170 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be provided in the processor 110 , or some functional modules of the audio module 170 may be provided in the processor 110 .
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。终端设备100可以通过扬声器170A收听音乐,或收听免提通话。Speaker 170A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当终端设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。The receiver 170B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the terminal device 100 answers a call or a voice message, the voice can be answered by placing the receiver 170B close to the human ear.
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。终端设备100可以设置至少一个麦克风170C。在另一些实施例中,终端设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,终端设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。The microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 170C through a human mouth, and input the sound signal into the microphone 170C. The terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, which may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the terminal device 100 may further be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动终端设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The earphone jack 170D is used to connect wired earphones. The earphone interface 170D may be the USB interface 130, or may be a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。压力传感器180A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器180A,电极之间的电容改变。终端设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏194,终端设备100根据压力传感器180A检测所述触摸操作强度。终端设备100也可以根据压力传感器180A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 180A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194 . There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The terminal device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal device 100 may also calculate the touched position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.
陀螺仪传感器180B可以用于确定终端设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器180B确定终端设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器180B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器180B检测终端设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消终端设备100的抖动,实现防抖。陀螺仪传感器180B还可以用于导航,体感游戏场景。The gyro sensor 180B may be used to determine the motion attitude of the terminal device 100 . In some embodiments, the angular velocity of the end device 100 about three axes (ie, the x, y and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shaking angle of the terminal device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to offset the shaking of the terminal device 100 through reverse motion to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenarios.
气压传感器180C用于测量气压。在一些实施例中,终端设备100通过气压传感器180C测得的气压值计算海拔高度,辅助定位和导航。The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
磁传感器180D包括霍尔传感器。终端设备100可以利用磁传感器180D检测翻盖皮套的开合。在一些实施例中,当终端设备100是翻盖机时,终端设备100可以根据磁传感器180D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。The magnetic sensor 180D includes a Hall sensor. The terminal device 100 can detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the terminal device 100 is a flip machine, the terminal device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.
加速度传感器180E可检测终端设备100在各个方向上(一般为三轴)加速度的大小。当终端设备100静止时可检测出重力的大小及方向。还可以用于识别终端设备姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 180E can detect the magnitude of the acceleration of the terminal device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the terminal device 100 is stationary. It can also be used to identify the posture of terminal devices, and can be used in applications such as horizontal and vertical screen switching, pedometers, etc.
距离传感器180F,用于测量距离。终端设备100可以通过红外或激光测量距离。在一 些实施例中,拍摄场景,终端设备100可以利用距离传感器180F测距以实现快速对焦。Distance sensor 180F for measuring distance. The terminal device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the terminal device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。终端设备100通过发光二极管向外发射红外光。终端设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定终端设备100附近有物体。当检测到不充分的反射光时,终端设备100可以确定终端设备100附近没有物体。终端设备100可以利用接近光传感器180G检测用户手持终端设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 180G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The terminal device 100 emits infrared light to the outside through the light emitting diode. The terminal device 100 detects infrared reflected light from nearby objects using a photodiode. 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 may determine that there is no object near the terminal device 100 . The terminal device 100 can use the proximity light sensor 180G to detect that the user holds the terminal device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 180G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.
环境光传感器180L用于感知环境光亮度。终端设备100可以根据感知的环境光亮度自适应调节显示屏194亮度。环境光传感器180L也可用于拍照时自动调节白平衡。环境光传感器180L还可以与接近光传感器180G配合,检测终端设备100是否在口袋里,以防误触。The ambient light sensor 180L is used to sense ambient light brightness. The terminal device 100 can adaptively adjust the brightness of the display screen 194 according to the perceived ambient light brightness. 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 cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket, so as to prevent accidental touch.
指纹传感器180H用于采集指纹。终端设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 180H is used to collect fingerprints. The terminal device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering incoming calls with fingerprints, and the like.
温度传感器180J用于检测温度。在一些实施例中,终端设备100利用温度传感器180J检测的温度,执行温度处理策略。例如,当温度传感器180J上报的温度超过阈值,终端设备100执行降低位于温度传感器180J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,终端设备100对电池142加热,以避免低温导致终端设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,终端设备100对电池142的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 180J is used to detect the temperature. In some embodiments, the terminal device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the terminal device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the terminal device 100 heats the battery 142 to avoid abnormal shutdown of the terminal device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the terminal device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器180K,也称“触控器件”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于终端设备100的表面,与显示屏194所处的位置不同。Touch sensor 180K, also called "touch device". The touch sensor 180K may be disposed on the display screen 194 , and the touch sensor 180K and the display screen 194 form a touch screen, also called a “touch screen”. The touch sensor 180K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 194 . In other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal device 100 , which is different from the position where the display screen 194 is located.
骨传导传感器180M可以获取振动信号。在一些实施例中,骨传导传感器180M可以获取人体声部振动骨块的振动信号。骨传导传感器180M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器180M也可以设置于耳机中,结合成骨传导耳机。音频模块170可以基于所述骨传导传感器180M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器180M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 170 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 180M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the function of heart rate detection.
运动传感器180N,可以用于对摄像头拍摄的范围内的运动物体进行检测,采集运动物体的运动轮廓或者运动轨迹等。例如,该运动传感器180N可以是红外传感器、激光传感器、动态视觉传感器(dynamic vision sensor,DVS)等,该DVS具体可以包括DAVIS(Dynamic and Active-pixel Vision Sensor)、ATIS(Asynchronous Time-based Image Sensor)或者CeleX传感器等传感器。DVS借鉴了生物视觉的特性,每个像素模拟一个神经元,独立地对光照强度(以下简称“光强”)的相对变化做出响应。当光强的相对变化超过阈值时,像素会输出一个事件信号,包括像素的位置、时间戳以及光强的特征信息。The motion sensor 180N can be used to detect moving objects within the range captured by the camera, and collect the motion contours or motion trajectories of the moving objects. For example, the motion sensor 180N may be an infrared sensor, a laser sensor, a dynamic vision sensor (DVS), etc. The DVS may specifically include DAVIS (Dynamic and Active-pixel Vision Sensor), ATIS (Asynchronous Time-based Image Sensor) ) or sensors such as CeleX sensors. DVS draws on the properties of biological vision, where each pixel simulates a neuron that responds independently to relative changes in light intensity (hereafter referred to as "light intensity"). When the relative change in light intensity exceeds a threshold, the pixel outputs an event signal that includes the pixel's position, timestamp, and characteristic information about the light intensity.
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。终端设备100可以接收按键输入,产生与终端设备100的用户设置以及功能控制有关的键信号输入。The keys 190 include a power-on key, a volume key, and the like. Keys 190 may be mechanical keys. It can also be a touch key. The terminal device 100 may receive key input and generate key signal input related to user settings and function control of the terminal device 100 .
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 191 can generate vibrating cues. The motor 191 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 194 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。The indicator 192 can be an indicator light, which can be used to indicate the charging state, the change of the power, and can also be used to indicate a message, a missed call, a notification, and the like.
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和终端设备100的接触和分离。终端设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。终端设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,终端设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在终端设备100中,不能和终端设备100分离。The SIM card interface 195 is used to connect a SIM card. The SIM card can be contacted and separated from the terminal device 100 by inserting into the SIM card interface 195 or pulling out from the SIM card interface 195 . The terminal device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the plurality of cards may be the same or different. The SIM card interface 195 can also be 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 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100 .
终端设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本发明实施例以分层架构的Android系统为例,示例性说明终端设备100的软件结构。The software system of the terminal device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present invention take an Android system with a layered architecture as an example to exemplarily describe the software structure of the terminal device 100 .
图2是本发明实施例的终端设备100的软件结构框图。FIG. 2 is a block diagram of a software structure of a terminal device 100 according to an embodiment of the present invention.
分层架构将软件分成若干个层,每一层都有清晰的角色和分工。层与层之间通过软件接口通信。在一些实施例中,将Android系统分为四层,从上至下分别为应用程序层,应用程序框架层,安卓运行时(Android runtime)和系统库,以及内核层。The layered architecture divides the software into several layers, and each layer has a clear role and division of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, which are, from top to bottom, an application layer, an application framework layer, an Android runtime (Android runtime) and a system library, and a kernel layer.
应用程序层可以包括一系列应用程序包。The application layer can include a series of application packages.
如图2所示,应用程序包可以包括相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。As shown in Figure 2, the application package can include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and so on.
应用程序框架层为应用程序层的应用程序提供应用编程接口(application programming interface,API)和编程框架。应用程序框架层包括一些预先定义的函数。The application framework layer provides an application programming interface (application programming interface, API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图2所示,应用程序框架层可以包括窗口管理器,内容提供器,视图系统,电话管理器,资源管理器,通知管理器等。As shown in Figure 2, the application framework layer may include window managers, content providers, view systems, telephony managers, resource managers, notification managers, and the like.
窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.
内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
电话管理器用于提供终端设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The telephony manager is used to provide the communication function of the terminal device 100 . For example, the management of call status (including connecting, hanging up, etc.).
资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.
通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端设备振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt sound is issued, the terminal device vibrates, and the indicator light flashes.
Android Runtime包括核心库和虚拟机。Android runtime负责安卓系统的调度和管理。Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.
核心库包含两部分:一部分是java语言需要调用的功能函数,另一部分是安卓的核心库。The core library consists of two parts: one is the function functions that the java language needs to call, and the other is the core library of Android.
应用程序层和应用程序框架层运行在虚拟机中。虚拟机将应用程序层和应用程序框架层的java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理,堆栈管理,线程管理,安全和异常的管理,以及垃圾回收等功能。The application layer and the application framework layer run in virtual machines. The virtual machine executes the java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, safety and exception management, and garbage collection.
系统库可以包括多个功能模块。例如:表面管理器(surface manager),媒体库(Media Libraries),三维图形处理库(例如:OpenGL ES),2D图形引擎(例如:SGL)等。A system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (eg: OpenGL ES), 2D graphics engine (eg: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了2D和3D图层的融合。The Surface Manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频,视频格式回放和录制,以及静态图像文件等。媒体库可以支持多种音视频编码格式,例如:MPEG4,H.264,MP3,AAC,AMR,JPG,PNG等。The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
三维图形处理库用于实现三维图形绘图,图像渲染,合成,和图层处理等。The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
2D图形引擎是2D绘图的绘图引擎。2D graphics engine is a drawing engine for 2D drawing.
内核层是硬件和软件之间的层。内核层至少包含显示驱动,摄像头驱动,音频驱动,传感器驱动。The kernel layer is the layer between hardware and software. The kernel layer contains at least display drivers, camera drivers, audio drivers, and sensor drivers.
下面通过图3对本实施例提供的设备定位方法的步骤进行详细说明,如图3所示,该设备定位方法可以包括以下步骤:The steps of the device positioning method provided by this embodiment are described in detail below with reference to FIG. 3 . As shown in FIG. 3 , the device positioning method may include the following steps:
301、获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的。301. Acquire a position change of the first terminal device, where the position change is determined according to first data collected by the second sensor.
本申请实施例中,在智能家居系统或者其他室内/室外场景中,终端设备需要基于自身携带的传感器采集的数据进行与其他终端设备之间的相对位置确定。In the embodiments of the present application, in a smart home system or other indoor/outdoor scenarios, the terminal device needs to determine the relative position with other terminal devices based on data collected by the sensor carried by the terminal device.
其中,为了得到一个高精度的设备定位结果,第一终端设备可以开启具有较高定位精度的第一传感器,本申请中所谓的具有较高定位精度的传感器,不是指该传感器具有定位 能力,而是指基于该传感器采集的数据进行的设备定位的计算结果具有较高的精度。应理解,第一传感器可以是一个高精度传感器或者是多个精度传感器的组合,本申请实施例并不限定。所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,也就是说,第二传感器采集的数据可以用于进行终端设备发生了多少位移的确定,基于第二传感器采集的数据进行定位时的定位精度较低,但同时开启这些传感器时终端设备相应需要的功耗也较低。应理解,第二传感器还可以为其他可以具有较低定位精度以及较低功耗的传感器,本申请并不限定。Among them, in order to obtain a high-precision device positioning result, the first terminal device can turn on the first sensor with higher positioning accuracy. The so-called sensor with higher positioning accuracy in this application does not mean that the sensor has positioning capability, but It means 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 may be a high-precision sensor or a combination of multiple precision sensors, which is not limited in this embodiment of the present application. The data collected by the second sensor is used to determine the position change of the first terminal device, that is, the data collected by the second sensor can be used to determine how much displacement has occurred in the terminal device, based on the data collected by the second sensor. The positioning accuracy of the data for positioning is low, but the corresponding power consumption of the terminal device is also low when these sensors are turned on at the same time. It should be understood that the second sensor may also be other sensors with lower positioning accuracy and lower power consumption, which is not limited in this application.
所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,然而第一传感器采集的数据可以用于进行终端设备之间相对位置的确定,而第二传感器采集的数据也可以用于进行终端设备之间相对位置的确定,或者,第二传感器采集的数据可以用于进行终端设备所处位置改变大小的确定,而不能用于进行终端设备之间相对位置的确定。The data collected by the second sensor is used to determine the position change of the first terminal device, but the data collected by the first sensor can be used to determine the relative position between the terminal devices, and the data collected by the second sensor can also It is used to determine the relative position between the terminal devices, or the data collected by the second sensor can be used to determine the size of the position change of the terminal device, but cannot be used to determine the relative position between the terminal devices.
具体的,在一种实现中,所述第一传感器可以但不限于包括如下传感器的至少一种:超宽频UWB传感器、超声波传感器、镭射传感器以及视觉传感器。其中,UWB传感器采集的数据可以用于进行精确的终端设备到终端设备间相对距离和相对方位角的测量。超声波传感器采集的数据可以用于进行精确的终端设备到终端设备间相对距离的测量。视觉传感器采集的数据可以用于进行精确的终端设备到终端设备间角度的测量。基于第一传感器采集的数据进行定位时的定位精度较高,但同时开启这些传感器时终端设备相应需要的功耗也较高。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 visual sensor. Among them, the data collected by the UWB sensor can be used for accurate measurement of the relative distance and relative azimuth between the terminal device and the terminal device. The data collected by the ultrasonic sensor can be used to make accurate terminal-to-terminal relative distance measurements. Data collected by vision sensors can be used to make precise end-to-end angle measurements. The positioning accuracy is high when positioning based on the data collected by the first sensor, but the corresponding power consumption of the terminal device is also high when these sensors are turned on at the same time.
应理解,第一传感器还可以为其他可以具有较高定位精度的传感器,本申请并不限定。It should be understood that the first sensor may also be other sensors with higher positioning accuracy, which is not limited in the present application.
具体的,在一种实现中,所述第一传感器还可以但不限于包括如下传感器的至少一种:加速计传感器以及陀螺仪传感器,且根据所述第一传感器采集的数据进行设备定位时的定位精度大于预设值。加速计传感器以及陀螺仪传感器在开启时,第一终端设备的功耗也较低,然而一些加速计传感器以及陀螺仪传感器采集的数据进行设备定位时的定位精度同样较高。Specifically, in one implementation, the first sensor may also include, but is not limited to, at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the device positioning is performed according to the data collected by the first sensor. The positioning accuracy is greater than the preset value. When the accelerometer sensor and the gyroscope sensor are turned on, the power consumption of the first terminal device is also low. However, the positioning accuracy of the data collected by some accelerometer sensors and the gyroscope sensor for device positioning is also high.
本申请实施例中,第一终端设备可以属于计算系统,计算系统可以是上述描述的智能家居系统或者其他室内/室外场景,计算系统可以包括多个终端设备,其中,多个终端设备可以包括一个控制中心,该控制中心本实施例也称之为第二终端设备。In this embodiment of the present application, 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, and the computing system may include multiple terminal devices, wherein the multiple terminal devices may include one A control center, which is also referred to as a second terminal device in this embodiment.
本申请实施例中,计算系统包括第一终端设备,第一终端设备为了获取与计算系统中其他终端设备之间的相对位置,可以获取第一终端设备上设置的传感器采集的第一数据,该第一数据可用于计算第一终端设备与计算系统中其他终端设备之间的相对位置。In the embodiment of the present application, the computing system includes a first terminal device. In order to obtain the relative position with other terminal devices in the computing system, the first terminal device can obtain the first data collected by the sensor set 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.
本申请实施例中,所述第一终端设备可以包括第一传感器和第二传感器,其中,所述第一传感器和所述第二传感器采集的数据用于进行设备对所述第一终端设备定位,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,所述第一传感器的功率大于所述第二传感器的功率,也就是在单位时间内,所述第一终端设备保持所述第一传感器的开启所需的功耗大于所述第一终端设备保持所述第二传感器的开启所需的功耗。例如,所述第二传感器可以包括但不限于如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙BLE以及无线保真WIFI。In this embodiment of the present application, the first terminal device may include a first sensor and a second sensor, wherein the data collected by the first sensor and the second sensor are used to locate the first terminal device by the device , 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, that is, within a unit time, the first terminal The power consumption required by the device to keep the first sensor turned on is greater than the power consumption required by the first terminal device to keep the second sensor turned on. 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.
其中,加速计传感器采集的数据可以用于进行测量终端设备自身的移动,以终端设备惯性坐标系为基准测量设备在x,y,z三个方向的加速度,加速计传感器是计步器的主要传感模态。陀螺仪传感器采集的数据可以用于进行测量终端设备自身的转动,以设备惯性坐标系为基准测量设备在x,y,z三个方向的转动。磁力计传感器采集的数据可以用于进行测量终端设备检测到的磁场强度,排除外界环境的剧烈变化,其中,x,y,z三个方向的磁力值的变化可以表示终端设备位置的变化。BLE采集的数据可以用于进行不太精确的终端设备到终端设备间相对距离和相对角度的测量,但BLE作为传感器,其扫描到的接收信号强度(received signal strength,RSS)可以作为位置指纹,BLE RSS的变化可以是表示终端设备位置的变化。WIFI采集的数据可以用于进行不太精确的终端设备到终端设备间相对距离的测量,但网卡作为传感器,其扫描到的RSS可以作为位置指纹,一般WiFi RSS的变化可以表示终端设备所处位置的变化。基于第二传感器采集的数据进行定位时的定位精度较低,但同时开启这些传感器时终端设备相应需要的功耗也较低。Among them, the data collected by the accelerometer sensor can be used to measure the movement of the terminal device itself. The acceleration of the device in the x, y, and z directions is measured based on the inertial coordinate system of the terminal device. The accelerometer sensor is the main component of the pedometer. sensing modality. The data collected by the gyroscope sensor can be used to measure the rotation of the terminal device itself, and the rotation of the device in the three directions of x, y, and z is measured based on the inertial coordinate system of the device. The data collected by the magnetometer sensor can be used to measure the magnetic field strength detected by the terminal device, excluding drastic changes in the external environment, wherein the changes of the magnetic force values in the three directions of x, y, and z can represent the changes in the position of the terminal device. The data collected by BLE can be used to measure the relative distance and relative angle between the terminal device and the terminal device. Changes in BLE RSS can be indicative of changes in the location of the end device. The data collected by WIFI can be used to measure the relative distance between the terminal device and the terminal device, which is not very accurate, but the network card is used as a sensor, and the RSS scanned by it can be used as a location fingerprint. Generally, the change of WiFi RSS can indicate the location of the terminal device. The change. The positioning accuracy is low when positioning based on the data collected by the second sensor, but the corresponding power consumption of the terminal device is also low when these sensors are turned on at the same time.
应理解,第二传感器还可以为其他可以具有较低定位精度以及较低功耗的传感器,本申请并不限定。It should be understood that the second sensor may also be other sensors with lower positioning accuracy and lower power consumption, which is not limited in this application.
本申请实施例中,在单位时间内,所述第一终端设备保持所述第一传感器的开启所需的功耗大于所述第一终端设备保持所述第二传感器的开启所需的功耗,然而,根据所述第一传感器采集的数据进行设备定位时的定位精度,大于根据所述第二传感器获取的数据进行设备定位时的定位精度。In this embodiment of the present application, in a unit time, the power consumption required by the first terminal device to keep the first sensor turned on is greater than the power consumption required by the first terminal device to keep the second sensor turned on , however, the positioning accuracy when the device is positioned according to the data collected by the first sensor is greater than the positioning accuracy when the device is positioned according to the data obtained by the second sensor.
也就是说,基于第一传感器采集的数据可以精准的计算出第一终端设备与其他终端设备之间的相对位置,然而第一终端设备所需要的功耗较高,基于第二传感器采集的数据无法精准的计算出第一终端设备与其他终端设备之间的相对位置,然而第一终端设备所需要的功耗较低。That is to say, 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 power consumption required by the first terminal device is relatively high. Based on the data collected by the second sensor The relative position between the first terminal device and other terminal devices cannot be accurately calculated, but the power consumption required by the first terminal device is low.
应理解,所述第一传感器和所述第二传感器采集的数据都可以用于进行设备定位,然而第一传感器采集的数据可以用于进行终端设备之间相对位置的确定,而第二传感器采集的数据也可以用于进行终端设备之间相对位置的确定,或者,第二传感器采集的数据可以用于进行终端设备所处位置改变大小的确定,而不能用于进行终端设备之间相对位置的确定。然而,在单位时间内,所述第一终端设备保持所述第一传感器的开启所需的功耗大于所述第一终端设备保持所述第二传感器的开启所需的功耗。It should be understood that both the data collected by the first sensor and the second sensor can be used for device positioning, but the data collected by the first sensor can be used to determine the relative position between terminal devices, while the data collected by the second sensor The data can also be used to determine the relative position between the terminal devices, or the data collected by the second sensor can be used to determine the size of the position change of the terminal device, but cannot be used to determine the relative position between the terminal devices. Sure. However, in a unit time, the power consumption required by the first terminal device to keep the first sensor turned on is greater than the power consumption required by the first terminal device to keep the second sensor turned on.
本申请实施例可以在保证可以精准的计算出第一终端设备与其他终端设备之间的相对位置的前提下,降低第一终端设备的功耗。The embodiments of the present application can reduce the power consumption of the first terminal device on the premise that the relative position between the first terminal device and other terminal devices can be accurately calculated.
本申请实施例中第一传感器可以包括第一工作状态和第二工作状态;其中,第二工作状态可以是传感器关闭状态,或者是待机、只开启一部分传感器功能的低功耗状态。第一工作状态可以是传感器打开状态,或者是开启大部分传感器功能的高功耗状态。例如,第一工作状态是传感器打开状态,第二工作状态是传感器关闭状态。In the embodiment of the present application, the first sensor may include a first working state and a second working state; wherein, the second working state may be a sensor off state, or a low power consumption state in standby and only part of sensor functions are turned on. The first working state may be a sensor-on state, or a high-power-consumption state in which most sensor functions are turned on. For example, the first operating state is a sensor-on state, and the second operating state is a sensor-off state.
接下来以第一工作状态为传感器关闭状态,第二工作状态为传感器开启状态为例进行说明。Next, the first working state is the sensor-off state, and the second working state is the sensor-on state as an example for description.
首先介绍第一终端设备开启第一传感器的时机。First, the timing when the first terminal device turns on the first sensor is introduced.
在一种场景中,第一终端设备可以一直保持第一传感器的常开状态。In one scenario, the first terminal device may keep the always-on state of the first sensor all the time.
在一种场景中,第一终端设备所处的计算系统中的设备都处于预设状态时,可以打开计算系统中终端设备的第一传感器,进而第一终端设备的第一传感器被开启,其中,预设状态可以是指所有设备都同时满足以下条件:都处于开机状态;检测到自身停止移动或仅在一定距离范围内,且移动速度以及转动速度都小于一定预设的值,例如移动速度小于0.01m/min,转动速度小于1°/min。In one scenario, when the devices in the computing system where the first terminal device is located are all in a preset state, the first sensor of the terminal device in the computing system may be turned on, and then the first sensor of the first terminal device is turned on, wherein , the preset state can mean that all devices meet the following conditions at the same time: they are all powered on; they detect that they have stopped moving or are only within a certain distance range, and the moving speed and rotation speed are both less than a certain preset value, such as the moving speed Less than 0.01m/min, rotation speed less than 1°/min.
在一种场景中,第一终端设备可以保持第一传感器的关闭状态,直到接收到打开第一传感器的触发或者自身确定应打开第一传感器,例如,第一终端设备可以保持第一传感器的关闭状态,直到第一终端设备与计算系统中的至少一个终端设备建立连接后,可以接收到计算系统中的目标终端设备发送的开启所述第一传感器的第四指示,第一终端设备可以基于所述第四指示开启所述第一传感器,其中,所述计算系统包括M-1个终端设备,所述M-1为正整数,且在所述M-1大于1的情况下,所述M-1个终端设备中的每个终端设备与所述M-1个终端设备中除自身之外的至少一个终端设备连接。以计算系统为智能家居系统为例,目标终端设备可以为智慧屏,第一终端设备可以为用户携带的手机,当用户从室外回到室内时,第一终端设备可以与智能家居系统中的至少一个终端设备建立了建立,所谓建立连接可以是局域网连接,例如蓝牙、WIFI等,在这种情况下,智慧屏可以捕捉到第一终端设备回到智能家居系统内,则可以向第一终端设备发送开启所述第一传感器的第一指示。In one scenario, the first terminal device may keep the first sensor off until it receives a trigger to turn on the first sensor or determines itself that the first sensor should be turned on, for example, the first terminal device may keep the first sensor off state, until the first terminal device establishes a connection with at least one terminal device in the computing system, it can receive the fourth instruction to turn on the first sensor sent by the target terminal device in the computing system, and the first terminal device can be based on the The fourth instruction turns on the first sensor, wherein the computing system includes M-1 terminal devices, the M-1 is a positive integer, and when the M-1 is greater than 1, the M - Each of the 1 terminal devices is connected to at least one terminal device other than itself among the M-1 terminal devices. Taking the computing system as a smart home system as an example, the target terminal device can be a smart screen, and the first terminal device can be a mobile phone carried by the user. When the user returns indoors from the outdoors, the first terminal device can be connected to at least one of the smart home system. When a terminal device is established, the so-called established connection can be a local area network connection, such as Bluetooth, WIFI, etc. In this case, the smart screen can capture the first terminal device and return to the smart home system, then the first terminal device can be sent to the first terminal device. A first instruction to turn on the first sensor is sent.
本申请实施例中,在获取到第一传感器采集的第三数据之后,为了获取到第一终端设备所处的精确位置,需要基于第一传感器采集的第三数据进行第一终端设备的第二位置信息的计算。应理解,第二位置信息可以指示第一终端设备与计算系统中其他终端设备之间的相对位置,相对位置可以是终端设备之间的相对距离和/或相对方向角。In this embodiment of the present application, after the third data collected by the first sensor is obtained, in order to obtain the precise position where the first terminal device is located, it is necessary to perform the second data analysis of the first terminal device based on the third data collected by the first sensor Calculation of location information. It should be understood that the second position information may indicate a relative position between the first terminal device and other terminal devices in the computing system, and the relative position may be a relative distance and/or a relative direction angle between the terminal devices.
应理解,第二位置信息可以直接用相对距离和/或相对方位角来表示,也可以是用于计算相对距离和/或相对方位角的数据,不论第二位置信息的表现方式是什么,其都可以直接或间接得到第一终端设备与计算系统中其他终端设备之间的相对位置。It should be understood that the second location information may be directly represented by relative distance and/or relative azimuth, or may be data used to calculate relative distance and/or relative azimuth, no matter what the representation of the second location information is, its The relative positions between the first terminal device and other terminal devices in the computing system can be obtained directly or indirectly.
接下来描述,如何获取第一终端设备的第二位置信息。Next, it is described how to obtain the second location information of the first terminal device.
本申请实施例中,第二位置信息可以表示第一终端设备与计算系统其他设备之间的相对位置。In this embodiment of the present application, the second location information may represent a relative location between the first terminal device and other devices in the computing system.
在一种实现中,第一终端设备可以获取所述第一传感器采集的第三数据,并根据所述第三数据确定所述第一终端设备的第二位置信息,也就是说第一终端设备可以自己基于第一传感器采集的第三数据进行第二位置信息的计算。In one implementation, the first terminal device may acquire third data collected by the first sensor, and determine the second location information of the first terminal device according to the third data, that is, the first terminal device The calculation of the second position information can be performed by itself based on the third data collected by the first sensor.
在一种实现中,第一终端设备可以获取所述第一传感器采集的第三数据以及系统中其他终端设备的第一传感器采集的数据,并根据所述第三数据以及系统中其他终端设备的第一传感器采集的数据确定所述第一终端设备的第二位置信息,也就是说,第一终端设备可以基于自身的第一传感器采集的第三数据以及计算系统其他终端设备的第一传感器采集的数据,进行第二位置信息的计算。In one implementation, the first terminal device may acquire third data collected by the first sensor and data collected by first sensors of other terminal devices in the system, and obtain third data and data collected by other terminal devices in the system according to the third data and data collected by the first sensors of other terminal devices in the system. The data collected by the first sensor determines the second position information of the first terminal device, that is, the first terminal device may be based on third data collected by its own first sensor and first sensors collected by other terminal devices of the computing system data, and calculate the second position information.
其中,如图4所示,以第一终端设备的几何中心为设备的中点,同时作为设备的坐标 系的原点,设备基于自身结构建立X,Y,Z坐标系。两个设备之间的距离为两个设备的中心连线在空间中的长度d,两个设备之间的方向角包括高度角α,水平角β以及翻转角γ。Wherein, as shown in Figure 4, the geometric center of the first terminal device is taken as the midpoint of the device, and at the same time as the origin of the coordinate system of the device, the device establishes an X, Y, Z coordinate system based on its own structure. The distance between the two devices is the length d of the center line connecting the two devices in space, and the direction angle between the two devices includes a height angle α, a horizontal angle β and a flip angle γ.
以第一传感器为UWB传感器为例,以计算系统中包括四个设备A、B、C、D的最简场景为例,四个设备的UWB传感器开启。每个设备搜寻周围的UWB信号。然后在每两个设备之间,设备的计算系统运用TDOA定位算法、TOF定位算法、TOA定位算法计算出设备间的相对距离,如设备A距离设备B 8.10m。在UWB定位算法中,设备都可以作为其他设备的定位基站,不需要额外添加基站。如设备A、B、C作为基站,计算系统基于设备D至设备A、B、C的距离,定位设备D相对于的设备A、B、C的位置。基于TOF测距不依赖基站与标签的时间同步,故没有时钟同步偏差带来的误差,但TOF测距方法的时间取决于时钟精度,时钟偏移会带来误差。为了减少时钟偏移量造成的测距误差,通常采用正反两个方向的测量方法,即远端基站发送测距信息,标签接收测距信息并回复,然后再由标签发起测距信息,远端基站回复,通过求取飞行时间平均值,减少两者之间的时间偏移,从而提高测距精度。基于TDOA的定位方法又称为双曲线定位,其原理是通过测量UWB信号从设备D到两个UWB基站之间(如设备A、B)传播时间的差值,得到设备D到两个UWB基站之间的固定距离差。TOA定位算法即“到达时间”,这种方式定位是通过UWB基站和UWB标签之间的多次通信实现的,如图5所示:UWB基站首先发给UWB标签一个包,同时记录下UWB基站当前的时间信息,记为T1,UWB标签收到基站的信息,返回一个ACK,UWB基站收到UWB标签的ACK,记录当前的时间信息,记为T2。UWB基站计算时间差Tr=T2-T1,并且根据此计算出距离:d=c*Tr/2其中c为光速。当定位系统中有大于等于4个设备时,可以通过多点定位法定位出相对位置及方位角。通过上述方式,可以计算得到第一终端设备的第二位置信息。Taking the first sensor as an UWB sensor as an example, and taking the simplest scenario in which the computing system includes four devices A, B, C, and D as an example, the UWB sensors of the four devices are turned on. Each device searches for surrounding UWB signals. Then, between every two devices, the computing system of the device uses the TDOA positioning algorithm, the TOF positioning algorithm, and the TOA positioning algorithm to calculate the relative distance between the devices, for example, the distance between device A and device B is 8.10m. In the UWB positioning algorithm, all devices can be used as positioning base stations for other devices, and no additional base stations are required. For example, if devices A, B, and C are used 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. The TOF-based ranging method does not depend on the time synchronization between the base station and the tag, so there is no error caused by clock synchronization deviation, but the time of the TOF ranging method depends on the clock accuracy, and the clock offset will bring errors. In order to reduce the ranging error caused by the clock offset, the measurement method in both positive and negative directions is usually used, that is, the remote base station sends the ranging information, the tag receives the ranging information and replies, and then the tag initiates the ranging information, and the remote base station sends the ranging information. The end base station replies, and reduces the time offset between the two by calculating the average value of the flight time, thereby improving the ranging accuracy. The positioning method based on TDOA is also called hyperbolic positioning. Fixed distance difference between. The TOA positioning algorithm is "time of arrival". This method of positioning is achieved through multiple communications between the UWB base station and the UWB tag, as shown in Figure 5: The UWB base station first sends a packet to the UWB tag, and records the UWB base station at the same time. The current time information is recorded as T1, the UWB tag receives the information from the base station and returns an ACK, and the UWB base station receives the ACK of the UWB tag and records the current time information, recorded as T2. The UWB base station calculates the time difference Tr=T2-T1, and calculates the distance according to this: d=c*Tr/2 where c is the speed of light. When there are more than or equal to 4 devices in the positioning system, the relative position and azimuth angle can be located by the multi-point positioning method. In the above manner, the second location information of the first terminal device can be obtained by calculation.
以第一传感器为超声波传感器为例,超声波定位主要采用反射式测距法,通过多边定位等方法确定物体位置,系统由一个主测距器和若干接收器组成,主测距仪可放置在待测目标上,接收器固定于室内环境中。在进行定位时,向接收器发射同频率的信号,接收器接收后又反射传输给主测距器,根据回波和发射波的时间差计算出距离,从而确定位置。当定位系统中有大于等于3个设备时,可以通过多点定位方法计算出终端设备之间的相对位置。Taking the first sensor as an ultrasonic sensor as an example, the ultrasonic positioning mainly adopts the reflective ranging method, and determines the position of the object through multilateral positioning and other methods. The system consists of a main rangefinder and several receivers. The main rangefinder can be placed in the waiting area. On the measurement target, the receiver is fixed in the indoor environment. When positioning, the signal of the same frequency is transmitted to the receiver, and after the receiver receives it, it is reflected and transmitted to the main rangefinder, and the distance is calculated according to the time difference between the echo and the transmitted wave, thereby determining the position. When there are more than or equal to 3 devices in the positioning system, the relative positions between the terminal devices can be calculated by the multi-point positioning method.
以第一传感器为镭射传感器为例,其基本原理是,向待测距的物体发射激光脉冲并开始计时,接收到反射光时停止计时。这段时间即可以转换为激光器与目标之间的距离。激光测距仪也可以发射多次激光脉冲,通过多普勒效应来确定物体是在远离还是在接近光源。Taking the first sensor as a laser sensor as an example, the basic principle is to emit laser pulses to the object to be ranged and start timing, and stop timing when the reflected light is received. This time can be converted to the distance between the laser and the target. Laser rangefinders can also fire multiple laser pulses, using the Doppler effect to determine whether an object is moving away or approaching the light source.
以第一传感器为视觉传感器为例,第一终端设备可以通过视觉传感器采集的第一数据得到其他设备与第一终端设备之间的方位角,如果有相互间已知位置的设备群组构成多目视觉,即可得到其他设备相对设备群组的位置。Taking the first sensor as a visual 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 visual sensor. Visually, you can get the position of other devices relative to the device group.
应理解,上述计算第一位置信息的方式仅为一种示意,本申请实施例并不限定。It should be understood that the foregoing manner of calculating the first position information is merely an illustration, and is not limited in the embodiments of the present application.
在一种实现中,第一终端设备可以不计算第二位置信息,而是将第一传感器采集的第三数据发送至计算系统中的其他终端设备,其他终端设备可以作为一个分布式计算系统基 于第三数据完成第二位置信息的计算,或者由一个终端设备基于第三数据完成第二位置信息的计算,在完成第二位置信息的计算之后,可以将第二位置信息发送给第一终端设备,进而第一终端设备可以获取到第一终端设备的第二位置信息。具体的,第一终端设备可以获取所述第一传感器采集的第三数据;向计算系统中其他终端设备发送所述第三数据,以便计算系统中其他终端设备根据所述第三数据确定所述第一终端设备的第二位置信息,或者以便计算系统中其他终端设备根据所述第三数据以及计算系统中其他终端设备的第一传感器采集的数据确定所述第一终端设备的第二位置信息;接收计算系统中其他终端设备发送的所述第二位置信息。In one implementation, the first terminal device may not calculate the second position information, but send the third data collected by the first sensor to other terminal devices in the computing system, and the other terminal devices may act as a distributed computing system based on The third data completes the calculation of the second position information, or a terminal device completes the calculation of the second position information based on the third data. After the calculation of the second position information is completed, the second position information can be sent to the first terminal device. , so that the first terminal device can obtain the second location information of the first terminal device. Specifically, the first terminal device may acquire the third data collected by the first sensor, and send the third data to other terminal devices in the computing system, so that other terminal devices in the computing system can determine the The second location information of the first terminal device, or so that other terminal devices in the computing system can determine the second location information of the first terminal device according to the third data and data collected by the first sensors of other terminal devices in the computing system ; Receive the second location information sent by other terminal devices in the computing system.
在一种实现中,计算系统中包括M个终端设备,所述M个终端设备中的每个终端设备包括所述第一传感器,相应的,所述第二位置信息为根据所述第一传感器采集的第三数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M。In one implementation, the computing system includes M terminal devices, each of the M terminal devices includes the first sensor, and correspondingly, the second location information is based on the first sensor. The third data collected and the data collected by the first sensors of N terminal devices among the M terminal devices are determined, and the N is less than or equal to the M.
也就是说,可以基于M个终端设备中的全部或部分终端设备的第一传感器采集的数据进行第二位置信息的计算,在一种实现中,所述N小于所述M,且所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备,且在所述M个终端设备中的N个终端设备采集用于确定所述第二位置信息的数据时,所述M个终端设备中除所述N个终端设备之外的终端设备的第一传感器处于关闭状态。本实施例中,可以选择与第一终端设备距离最近的N个终端设备打开第一传感器,并基于N个终端设备的第一传感器采集的数据进行第二位置信息的计算。N的数目取决于计算系统中设备总数,第一终端设备自身第二传感器的定位精度,即第二传感器的定位精度越高,N越小。本申请实施例中,仅选择位置接近的N个终端设备设备,能够在保证系统精度的条件下节能降耗。That is to say, the calculation of the second position information may be performed based on data collected by the first sensors of all or part of the M terminal devices. In one implementation, the N is smaller than the M, and the N The terminal devices are the N terminal devices that are closest to the first terminal device among the M terminal devices, and the N terminal devices in the M terminal devices collect information for determining the second location When the data is received, the first sensors of the terminal devices other than the N terminal devices among the M terminal devices are in an off state. In this embodiment, N terminal devices closest to the first terminal device may be selected to turn on the first sensor, and the second position information may be calculated based on 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, 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 the embodiment of the present application, only N terminal equipments located close to each other are selected, which can save energy and reduce consumption under the condition of ensuring system accuracy.
应理解,可以由计算系统中的某个终端设备触发所述M个终端设备中的所述N个终端设备开启第一传感器。It should be understood that a certain terminal device in the computing system may trigger the N terminal devices among the M terminal devices to turn on the first sensor.
本申请实施例中,可以将第一位置共享至计算系统中的各个终端设备,以便计算系统中的各个终端设备知晓与第一终端设备之间的相对位置。In this embodiment of the present application, the first position may be shared with each terminal device in the computing system, so that each terminal device in the computing system knows the relative position with the first terminal device.
应理解,针对于计算系统中的各个终端设备,都可以基于上述方式获取到自身与计算系统中其他终端设备之间的相对位置。It should be understood that, for each terminal device in the computing system, the relative position between itself and other terminal devices in the computing system can be obtained based on the foregoing manner.
应理解,第一终端设备还可以获取到除了第二位置信息之外的其他位置信息,例如其他终端设备之间的相对位置,本申请并不限定。It should be understood that the first terminal device may also acquire other location information other than the second location information, such as relative locations between other terminal devices, which is not limited in this application.
本申请实施例中,可以触发所述第一传感器由所述第二工作状态改变为所述第一工作状态,例如可以关闭所述第一传感器。In this embodiment of the present application, the first sensor may be triggered to change from the second working state to the first working state, for example, the first sensor may be turned off.
本实施例中,可以获取所述第一终端设备的第二位置信息,所述第二位置信息为根据所述第一传感器采集的第三数据确定的;第一终端设备可以属于计算系统,计算系统可以是上述描述的智能家居系统或者其他室内/室外场景,计算系统可以包括多个终端设备,其中,多个终端设备可以包括一个控制中心,该控制中心本实施例也称之为目标终端设备。计算系统可以包括第一终端设备,第一终端设备为了获取与计算系统中其他终端设备之间的相对位置,可以获取第一终端设备上设置的第一传感器采集的第三数据,该第三数据可 用于计算第一终端设备与计算系统中其他终端设备之间的相对位置。第二位置信息可以指示第一终端设备与计算系统中其他终端设备之间的相对位置,相对位置可以是相对距离和/或相对方位角。In this embodiment, the second location information of the first terminal device may be acquired, and the second location information is determined according to the third data collected by the first sensor; the first terminal device may belong to a computing system, and the computing The system may be the smart home system described above or other indoor/outdoor scenarios, and the computing system may include multiple terminal devices, wherein the multiple terminal devices may include a control center, which is also referred to as the target terminal device in this embodiment. . The computing system may include a first terminal device, and in order to obtain a relative position with other terminal devices in the computing system, the first terminal device may obtain third data collected by a first sensor set on the first terminal device, the third data It 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 may indicate a relative location between the first terminal device and other terminal devices in the computing system, and the relative location may be a relative distance and/or a relative azimuth.
应理解,第二位置信息可以直接用相对距离和/或相对方位角来表示,也可以是用于计算相对距离和/或相对方位角的数据,不论第一位置信息的表现方式是什么,其都可以直接或间接得到第一终端设备与计算系统中其他终端设备之间的相对位置。It should be understood that the second position information may be directly represented by relative distance and/or relative azimuth, or may be data used to calculate relative distance and/or relative azimuth, no matter what the expression of the first position information is, its The relative positions between the first terminal device and other terminal devices in the computing system can be obtained directly or indirectly.
触发所述第一传感器由所述第二工作状态改变为所述第一工作状态;应理解本申请并不限定关闭所述第一传感器与获取所述第一终端设备的第二位置信息之间的时序,在一种实现中,第一传感器采集第三数据之后,在获取所述第一终端设备的第二位置信息之前,可以触发所述第一传感器由所述第二工作状态改变为所述第一工作状态,在一种实现中,在获取所述第一终端设备的第二位置信息之后,才触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。Trigger the first sensor to change from the second working state to the first working state; it should be understood that this application does not limit the period between turning off the first sensor and acquiring the second position information of the first terminal device In an implementation, after the first sensor collects the third data, before obtaining the second position information of the first terminal device, the first sensor can be triggered to change from the second working state to the all In the first working state, in one implementation, the first sensor is triggered to change from the second working state to the first working state after acquiring the second position information of the first terminal device.
本申请为了降低功耗,可以触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。在一种实现中,计算系统的中的其他终端设备可以触发第一终端设备由所述第二工作状态改变为所述第一工作状态,例如关闭自身的第一传感器。具体的,第一终端设备可以接收计算系统内的其他终端设备发送的用于关闭所述第一传感器的指示,并基于接收到的指示关闭所述第一传感器。In order to reduce power consumption in the present application, the first sensor may be triggered to change from the second working state to the first working state. In one implementation, other terminal devices in the computing system may trigger the first terminal device to change from the second working state to the first working state, for example, turning off its own first sensor. Specifically, the first terminal device may receive an instruction for turning off the first sensor sent by other terminal devices in the computing system, and turn off the first sensor based on the received instruction.
本申请实施例中,可以获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的。In this embodiment of the present application, the position change of the first terminal device may be acquired, and the position change is determined according to the first data collected by the second sensor.
本申请实施例中,计算系统中的各个终端设备包括第二传感器,且各个终端设备可以一直保持第二传感器的开启,其中,所述第二传感器可以包括如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙BLE以及无线保真WIFI。In this embodiment of the present application, each terminal device in the computing system includes a second sensor, and each terminal device may keep the second sensor turned on all the time, wherein the second sensor may include at least one of the following sensors: an accelerometer sensor , gyroscope sensor, magnetometer sensor, low energy bluetooth BLE and wireless fidelity WIFI.
本申请实施例中,所述第一传感器采集的数据的数据精度,大于所述第二传感器采集的数据的数据精度。应理解,在一种实现中,所述第二传感器采集的数据不可用于进行第一终端设备的定位运算,只可以确定第一终端设备的位置改变确定。而在另一种实现中,所述第二传感器采集的数据可用于进行第一终端设备的定位运算,然而,所述第二传感器采集的数据的数据精度小于所述第一传感器采集的数据的数据精度。In this embodiment of the present application, the data accuracy of the data collected by the first sensor is greater than the data accuracy 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 to perform the positioning operation of the first terminal device, and can only determine the location change of the first terminal device. In another implementation, the data collected by the second sensor can be used to perform the positioning operation of the first terminal device. However, the data accuracy of the data collected by the second sensor is smaller than that of the data collected by the first sensor. data precision.
具体的,若第一终端设备的第一传感器和第二传感器一起打开,在第一终端设备发生位置变化后,根据第一传感器采集的数据可以进行第一终端设备的定位计算,根据第二传感器采集的数据也可以进行第一终端设备的定位计算(利用第一传感器采集的数据进行的定位算法和利用第二传感器采集的数据进行的定位算法相同或相似),然而根据第一传感器采集的数据可以进行第一终端设备的定位计算的计算结果,要比根据第二传感器采集的数据也可以进行第一终端设备的定位计算的计算结果的准确度高,所谓准确度高,就是根据第一传感器采集的数据可以进行第一终端设备的定位计算的计算结果更接近第一终端设备的实际位置变化。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 according to the data collected by the first sensor, and according to the second sensor The collected data can also perform the positioning calculation of the first terminal device (the positioning algorithm using the data collected by the first sensor is the same as or similar to the positioning algorithm using the data collected by the second sensor), but according to the data collected by the first sensor The calculation result that can perform the positioning calculation of the first terminal device is more accurate than the calculation result that can also perform the positioning calculation of the first terminal device according to the data collected by the second sensor. The so-called high accuracy is based on the first sensor. The collected data can be used for positioning calculation of the first terminal device, and the calculation result is closer to the actual position change of the first terminal device.
在基于低功耗的第二传感器采集的第二数据确定所述第一终端设备的位置变化超过阈值时,通过具有更高定位精度的第一传感器采集的数据进行定位计算,保证了定位准确度。When it is determined based on the second data collected by the second sensor with low power consumption that the position change of the first terminal device exceeds the threshold, the positioning calculation is performed by using the data collected by the first sensor with higher positioning accuracy, so as to ensure the positioning accuracy .
302、当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,例如可以开启所述第一传感器。302. When the position change of the first terminal device exceeds a threshold, trigger the first sensor to change from a first working state to a second working state, for example, the first sensor may be turned on.
本申请实施例中,第二传感器采集的数据可以进行第一终端设备是否发生位置变化以及位置变化量的确定。具体的,确定所述第一终端设备的位置变化超过阈值的判断依据可以是根据第二传感器采集到的信号的变化,以第二传感器为WIFI为例,可以根据接收的多个WIFI的信号强度发生了变化,则可以确定第一终端设备发生了位置变化,且可以根据WIFI的信号强度的变化大小,确定第一终端设备的位置变化量,WIFI的信号可以是WIFI RSS,若WIFI RSS的信号量变化超过阈值,则可以认为第一终端设备的位置变化超过阈值;以第二传感器为磁力计传感器,可以根据磁力计传感器接收的信号强度发生了变化,则可以确定第一终端设备发生了位置变化,且可以根据磁力计传感器接收的信号强度的变化大小,确定第一终端设备的位置变化量,若磁力计传感器接收的信号强度变化超过阈值,则可以认为第一终端设备的位置变化超过阈值。In this embodiment of the present application, the data collected by the second sensor can be used to determine whether the first terminal device has a position change and the amount of the position change. Specifically, the determination basis for determining that the position change of the first terminal device exceeds the threshold value may be based on the change of the signal collected by the second sensor. Taking the second sensor as WIFI as an example, it may be based on the received signal strengths of multiple WIFIs. If there is a change, it can be determined that the position of the first terminal device has changed, and the amount of change in the position of the first terminal device can be determined according to the change in the signal strength of the WIFI. The signal of the WIFI can be WIFI RSS. If the signal of the WIFI RSS If the amount change exceeds the threshold value, it can be considered that the position change of the first terminal device exceeds the threshold value; taking the second sensor as the magnetometer sensor, it can be determined that the position of the first terminal device has changed according to the signal strength received by the magnetometer sensor. change, and the amount of change in the position of the first terminal device can be determined according to the change in the signal strength received by the magnetometer sensor. If the change in the signal strength received by the magnetometer sensor exceeds the threshold, it can be considered that the position change of the first terminal device exceeds the threshold. .
需要说明的是,根据第一终端设备的设备类型不同,可以对应不同的阈值,示例性的,第一终端设备可以为移动设备,如手机、Pad、AR眼镜、智能手表、智能手环等;第一终端设备可以为半移动设备如智能音箱、笔记本电脑等;第一终端设备可以为固定设备如智慧屏、台式电脑、智能家电等。从移动类设备、半移动设备到固定设备,其对应的阈值可以逐渐减少,也就是说当第一终端设备为移动设备时,当第一终端设备的位置变化超过第一阈值时,则开启所述第一传感器,当第一终端设备为半移动设备时,当第一终端设备的位置变化超过第二阈值时,则开启所述第一传感器,当第一终端设备为固定设备时,当第一终端设备的位置变化超过第三阈值时,则开启所述第一传感器,第一阈值大于第二阈值,第二阈值大于第三阈值。It should be noted that different thresholds may correspond to different device types of the first terminal device. Exemplarily, the first terminal device may be a mobile device, such as a mobile phone, a Pad, AR glasses, a smart watch, a smart bracelet, etc.; The first terminal device may be a semi-mobile device such as a smart speaker, a notebook computer, etc.; the first terminal device may be a fixed device such as a smart screen, a desktop computer, a smart home appliance, and the like. From mobile devices, semi-mobile devices to fixed devices, the corresponding thresholds can be gradually reduced. That is to say, when the first terminal device is a mobile device, when the position of the first terminal device changes beyond the first threshold, all The first sensor, when the first terminal device is a semi-mobile device, when the position change of the first terminal device exceeds the second threshold, the first sensor is turned on, and when the first terminal device is a fixed device, when the first When the position change of a terminal device exceeds a third threshold, the first sensor is turned on, the first threshold is greater than the second threshold, and the second threshold is greater than the third threshold.
本申请实施例中,阈值可以包括距离阈值以及角度阈值。示例性的,若第二传感器为加速计传感器,可以基于加速计值在时间上的积分,即距离,设定出加速计的阈值,例如0.2m,0.5m;若第二传感器为陀螺仪传感器,可以基于陀螺仪值在时间上的积分,即角度,设定出陀螺仪的阈值,例如20°,10°;若第二传感器为磁力计传感器,可以基于磁力计的变化强度,设定出磁力计的阈值,如10%;若第二传感器为BLE,可以基于BLE的RSS,如果RSS变化率超过一定比例,即为超过阈值,如20%;若第二传感器为WIFI,可以基于WIFI的RSS,如果RSS变化率超过一定比例,即为超过阈值,如20%。In this embodiment of the present application, the threshold may include a distance threshold and an angle threshold. Exemplarily, if the second sensor is an accelerometer sensor, the threshold value of the accelerometer can be set based on the time integration of the accelerometer value, that is, the distance, for example, 0.2m, 0.5m; if the second sensor is a gyroscope sensor , the threshold value of the gyroscope can be set based on the integral of the gyroscope value in time, that is, the angle, such as 20°, 10°; if the second sensor is a magnetometer sensor, it can be set based on the change intensity of the magnetometer. The threshold of the magnetometer, such as 10%; if the second sensor is BLE, it can be based on BLE's RSS, if the RSS change rate exceeds a certain percentage, that is, it exceeds the threshold, such as 20%; if the second sensor is WIFI, it can be based on WIFI. RSS, if the rate of change of RSS exceeds a certain percentage, that is, it exceeds the threshold, such as 20%.
对于移动设备,如手机,考虑到用户坐着沙发上,一直手握并使用手机,手有些移动并不视为用户将手机移动,将手机对于距离的阈值设置为0.5m,角度阈值设置为30°。For mobile devices, such as mobile phones, considering that the user is sitting on the sofa, holding and using the mobile phone all the time, some movement of the hand is not regarded as the user moving the mobile phone. °.
对于半移动设备,如智能音箱距离阈值设置为0.3m,角度阈值设置为20°。对于固定设备,如智慧大屏,距离阈值设置为0.1m,角度阈值设置为10°。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°.
本申请实施例中,若基于所述第二传感器采集的第一数据,确定所述第一终端设备的位置变化超过阈值,则触发所述第一传感器由第一工作状态改变为第二工作状态。In the embodiment of the present application, if it is determined based on the first data collected by the second sensor that the position change of the first terminal device exceeds a threshold, the first sensor is triggered to change from the first working state to the second working state .
本申请实施例中,第一传感器可以由计算系统中的其他终端设备来触发开启,具体的,若基于所述第二传感器采集的第一数据,确定所述第一终端设备的位置变化超过阈值,则第一终端设备可以向计算系统中的其他终端设备发送用于指示所述第一终端设备的位置变 化超过阈值的第三指示;之后第一终端设备可以接收计算系统中的其他终端设备发送的用于开启所述第一传感器的第四指示,并基于所述第四指示开启所述第一传感器。In this embodiment of the present application, the first sensor may be triggered and turned on by other terminal devices in the computing system. Specifically, if it is determined based on the first data collected by the second sensor that the position change of the first terminal device exceeds a threshold , 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 messages sent by other terminal devices in the computing system. the fourth indication for turning on the first sensor, and turning on the first sensor based on the fourth indication.
303、获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器采集的第二数据确定的。303. Acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor.
在一种实现中,第一终端设备可以获取所述第一传感器采集的第二数据,并根据所述第二数据确定所述第一终端设备的第一位置信息。In one implementation, the first terminal device may acquire the second data collected by the first sensor, and determine the first location information of the first terminal device according to the second data.
在一种实现中,第一终端设备可以获取所述第一传感器采集的第二数据以及所述N个终端设备的第一传感器采集的数据,并根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息。In one implementation, the first terminal device may acquire the second data collected by the first sensor and the data collected by the first sensors of the N terminal devices, and obtain the second data and the N terminals according to the second data and the data collected by the first sensors of the N terminal devices. The data collected by the first sensor of the device determines the first location information of the first terminal device.
在一种实现中,第一终端设备可以获取所述第一传感器采集的第二数据;向所述M个终端设备中的目标终端设备发送所述第二数据,以便所述目标终端设备根据所述第二数据确定所述第一终端设备的第一位置信息,或者以便所述目标终端设备根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息;接收所述目标终端设备发送的所述第一位置信息。In one implementation, the first terminal device may acquire the second data collected by the first sensor; and send the second data to a target terminal device among the M terminal devices, so that the target terminal device can The second data determines the first location information of the first terminal device, or the target terminal device determines the first terminal according to the second data and the data collected by the first sensors of the N terminal devices. The first location information of the device; and the first location information sent by the target terminal device is received.
在一种实现中,第一终端设备可以不自己计算第一位置信息,而是将第一传感器采集的第二数据发送至计算系统中的其他终端设备,其他终端设备可以作为一个分布式计算系统基于第二数据完成第一位置信息的计算,或者由一个终端设备基于第二数据完成第一位置信息的计算,在完成第一位置信息的计算之后,可以将第一位置信息发送给第一终端设备,进而第一终端设备可以获取到第一终端设备的第一位置信息。具体的,第一终端设备可以获取所述第一传感器采集的第二数据;向计算系统中的其他终端设备发送所述第二数据,以便计算系统中的其他终端设备根据所述第二数据确定所述第一终端设备所处的第二位置,或者以便计算系统中的其他终端设备根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息;接收计算系统中的其他终端设备发送的所述第一位置信息。In one implementation, the first terminal device may not calculate the first location information by itself, but may send the second data collected by the first sensor to other terminal devices in the computing system, and the other terminal devices may serve as a distributed computing system The calculation of the first position information is completed based on the second data, or a terminal device completes the calculation of the first position information based on the second data. After the calculation of the first position information is completed, the first position information may be sent to the first terminal. device, and then the first terminal device can obtain the first location information of the first terminal device. Specifically, the first terminal device may acquire the second data collected by the first sensor; send the second data to other terminal devices in the computing system, so that other terminal devices in the computing system can determine according to the second data The second position where the first terminal device is located, or so that other terminal devices in the computing system can determine the location of the first terminal device according to the second data and the data collected by the first sensors of the N terminal devices. first location information; receiving the first location information sent by other terminal devices in the computing system.
关于如何获取第一终端设备的第一位置信息可以参照上述实施例中如何获取第一终端设备的第二位置信息的相关描述,相似之处这里不再赘述。For how to acquire the first location information of the first terminal device, reference may be made to the relevant description of how to acquire the second location information of the first terminal device in the foregoing embodiment, and the similarities are not repeated here.
在一种实现中,所述第一传感器可以但不限于包括如下传感器的至少一种:加速计传感器以及陀螺仪传感器,且根据所述第一传感器采集的数据进行设备定位时的定位精度大于预设值。以第一传感器为加速计传感器和陀螺仪传感器为例,第一终端设备可以根据其加速计传感器的信号,做加速计传感器的信号在时间上的积分,即得到从上一次第一终端设备加速计置零(即第一终端设备静止)后的移动距离,此移动距离是基于设备自身坐标系。根据其陀螺仪传感器的信号,做陀螺仪传感器的信号在时间上的积分,即得到从上一次第一终端设备陀螺仪置零后的转动角度,此转动角度是基于设备自身坐标系。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 positioning the device according to the data collected by the first sensor is greater than a predetermined value set value. Taking the first sensor as an accelerometer sensor and a gyroscope sensor as an example, the first terminal device can integrate the signal of the accelerometer sensor over time according to the signal of its accelerometer sensor, that is, to obtain the acceleration from the last first terminal device. Calculate the moving distance after zeroing (that is, the first terminal device is stationary), and this moving distance is based on the coordinate system of the device itself. According to the signal of its gyroscope sensor, integrate the signal of the gyroscope sensor in time, that is, to obtain the rotation angle since the last time the gyroscope of the first terminal device was zeroed, and this rotation angle is based on the device's own coordinate system.
本申请实施例中,可以将第二位置共享至计算系统中的各个终端设备,以便计算系统中的各个终端设备知晓与第一终端设备之间的相对位置。In this embodiment of the present application, the second position may be shared with each terminal device in the computing system, so that each terminal device in the computing system knows the relative position with the first terminal device.
本申请实施例提供了一种设备定位方法,应用于第一终端设备,所述第一终端设备包括第一传感器和第二传感器,其中,所述第一传感器用于对所述第一终端设备定位,所述 第二传感器采集的数据用于确定所述第一终端设备的位置变化,且所述第一传感器的功率大于所述第二传感器的功率,所述方法包括:获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的;当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,所述第一传感器处于所述第一工作状态的功耗小于处于所述第二工作状态的功耗;获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器在所述第二工作状态采集的第二数据确定的。通过上述方式,只有在基于低功耗的第二传感器采集的第二数据确定所述第一终端设备的位置变化超过阈值时,才开启高功耗的第一传感器,降低了第一终端设备的功耗。An embodiment of the present application provides a device positioning method, which is applied to a first terminal device, where the first terminal device includes a first sensor and a second sensor, wherein the first sensor is used to locate the first terminal device positioning, 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 method includes: acquiring the first The position of the terminal device changes, and the position change is determined according to the 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 the first working state is a second working state, and the power consumption of the first sensor in the first working state is smaller than that in the second working state; acquiring the first location information of the first terminal device, the first The location information is determined according to second data collected by the first sensor in the second working state. In the above manner, the first sensor with high power consumption is turned on only when it is determined based on the second data collected by the second sensor with low power consumption that the position change of the first terminal device exceeds the threshold, which reduces the power consumption of the first terminal device. power consumption.
参照图6,图6为本申请实施例提供的一种设备定位方法的流程示意,本申请实施例提供的设备定位方法可以应用于目标终端设备,所述目标终端设备属于计算系统,所述计算系统包括M个终端设备,所述M个终端设备包括第一终端设备,所述第一终端设备包括第一传感器和第二传感器,其中,所述第一传感器用于对所述第一终端设备定位,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,且所述第一传感器的功率大于所述第二传感器的功率;本申请实施例提供的设备定位方法:Referring to FIG. 6 , FIG. 6 is a schematic flowchart of a device positioning method provided by an embodiment of the present application. The device positioning method provided by the embodiment of the present application can be applied to a target terminal device. The target terminal device belongs to a computing system, and the computing The system includes M terminal devices, the M terminal devices include a first terminal device, and the first terminal device includes a first sensor and a second sensor, wherein the first sensor is used to monitor the first terminal device Positioning, 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 method provided by the embodiment of the present application:
601、获取所述第一终端设备的第二位置信息,其中,所述第二位置信息为根据所述第一传感器在所述第二工作状态采集的第三数据确定的。601. Acquire second location information of the first terminal device, where the second location information is determined according to third data collected by the first sensor in the second working state.
本申请实施例中,可以将第一位置信息共享至计算系统中的各个终端设备,以便计算系统中的各个终端设备知晓与第一终端设备之间的相对位置。In this embodiment of the present application, the first location information may be shared with each terminal device in the computing system, so that each terminal device in the computing system knows the relative position with the first terminal device.
应理解,针对于计算系统中的各个终端设备,都可以基于上述方式获取到自身与计算系统中其他终端设备之间的相对位置。It should be understood that, for each terminal device in the computing system, the relative position between itself and other terminal devices in the computing system can be obtained based on the foregoing manner.
应理解,第一终端设备还可以获取到除了第二位置信息之外的其他位置信息,例如其他终端设备之间的相对位置,本申请并不限定。It should be understood that the first terminal device may also acquire other location information other than the second location information, such as relative locations between other terminal devices, which is not limited in this application.
步骤601的具体描述可以参照步骤301中相关步骤的描述,相似之处,这里不再赘述。For the specific description of step 601, reference may be made to the description of the relevant steps in step 301, and the similarities will not be repeated here.
602、向所述第一终端设备发送用于触发所述第一传感器由第二工作状态改变为第一工作状态的第二指示,以便所述第一终端设备基于所述第二指示触发所述第一传感器由第一工作状态改变为第二工作状态。602. Send, to the first terminal device, a second indication for triggering the first sensor to change from a second working state to a first working state, so that the first terminal device triggers the first working state based on the second indication The first sensor changes from the first working state to the second working state.
以第一工作状态为传感器关闭状态,第二工作状态为传感器开启状态为例,在一种实现中,计算系统的中的目标终端设备可以触发第一终端设备关闭自身的第一传感器。具体的,第一终端设备可以接收所述M个终端设备中的目标终端设备发送的用于关闭所述第一传感器的第一指示,并基于所述第一指示关闭所述第一传感器。Taking the first working state as the sensor off state and the second working state as the sensor on state as an example, in one implementation, the target terminal device in the computing system can trigger the first terminal device to turn off its own first sensor. Specifically, the first terminal device may receive a first instruction for turning off the first sensor sent by a target terminal device among the M terminal devices, and turn off the first sensor based on the first instruction.
步骤602的具体描述可以参照步骤302中相关步骤的描述,相似之处,这里不再赘述。For the specific description of step 602, reference may be made to the description of the relevant steps in step 302, and the similarities are not repeated here.
603、若接收到所述第一终端设备发送的用于指示所述第一终端设备的位置变化超过阈值的第三指示,则向所述第一终端设备发送用于触发所述第一传感器由第一工作状态改变为第二工作状态的第四指示,以便所述第一终端设备基于所述第三指示触发所述第一传感器由第一工作状态改变为第二工作状态。603. If receiving a third indication sent by the first terminal device and used to indicate that the position change of the first terminal device exceeds a threshold, send a message to the first terminal device for triggering the first sensor to be sent by The first working state is changed to the fourth indication of the second 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 third indication.
本申请实施例中,第一传感器可以由目标终端设备来触发开启,具体的,若基于所述第二传感器采集的第一数据,确定所述第一终端设备的位置变化超过阈值,则第一终端设备可以向所述M个终端设备中的目标终端设备发送用于指示所述第一终端设备的位置变化超过阈值的第三指示;之后第二终端设备可以接收所述目标终端设备发送的用于开启所述第一传感器的第四指示,并基于所述第四指示开启所述第一传感器。In this embodiment of the present application, the first sensor may be triggered to be turned on by the target terminal device. Specifically, if it is determined based on the first data collected by the second sensor that the position change of the first terminal device exceeds a threshold, the first sensor The terminal device may send a third indication to the target terminal device among the M terminal devices, which is used to indicate that the position change of the first terminal device exceeds a threshold; then the second terminal device may receive the information sent by the target terminal device. In response to a fourth instruction to turn on the first sensor, the first sensor is turned on based on the fourth instruction.
步骤603的具体描述可以参照步骤303,相似之处,这里不再赘述。The specific description of step 603 can refer to step 303, and the similarities are not repeated here.
604、获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器采集的第二数据确定的。604. Acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor.
在一种可能的设计中,所述第一传感器采集的数据的数据精度大于所述第二传感器采集的数据的数据精度。In a possible design, the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
在一种可能的设计中,目标终端设备可以向所述第一终端设备以及所述M个终端设备中的N个终端设备发送用于触发所述第一传感器由第一工作状态改变为第二工作状态的第四指示,以便所述第一终端设备以及N个终端设备基于所述第四指示触发所述第一传感器由第一工作状态改变为第二工作状态,所述N小于或等于所述M;In a possible design, the target terminal device may send a message to the first terminal device and N terminal devices among the M terminal devices for triggering the first sensor to change from the first working state to the second The fourth indication of the working state, so that the first terminal device and N terminal devices trigger the first sensor to change from the first working state to the second working state based on the fourth indication, and the N is less than or equal to the said M;
在一种可能的设计中,所述第一位置信息为根据所述第一传感器采集的第二数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的。In a possible design, the first location information is determined according to the second data collected by the first sensor and data collected by the first sensors of N terminal devices among the M terminal devices.
在一种可能的设计中,所述N小于所述M,目标终端设备可以从所述M个终端设备中确定所述N个终端设备,其中,所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备。In a possible design, the N is less than the M, and the target terminal device may determine the N terminal devices from the M terminal devices, where the N terminal devices are the M terminals N terminal devices that are closest to the first terminal device in the device.
在一种可能的设计中,所述第一位置信息和所述第二位置信息用于指示所述第一终端设备与所述M个终端设备中除所述第一终端设备之外的终端设备之间的相对位置。In a possible design, the first location information and the second location information are used to indicate the first terminal device and terminal devices other than the first terminal device among the M terminal devices relative position between.
在一种可能的设计中,所述相对位置包括相对距离和/或相对方位角。In one possible design, the relative positions include relative distances and/or relative azimuths.
接下来以计算系统为智能居家系统为例,结合实际场景对本申请实施例提供的设备定位方法进行描述。Next, taking the computing system as an intelligent home system as an example, the device positioning method provided by the embodiment of the present application will be described in combination with an actual scenario.
参照图7,图7为本申请实施例提供的一种设备定位方法的流程示意,如图7示出的那样,计算系统可以包括目标终端设备、第一终端设备以及至少一个终端设备,本申请实施例提供的设备定位方法包括:Referring to FIG. 7, FIG. 7 is a schematic flowchart of a device positioning method provided by an embodiment of the present application. As shown in FIG. 7, a computing system may include a target terminal device, a first terminal device, and at least one terminal device. The device positioning method provided by the embodiment includes:
701、目标终端设备确定第一终端设备和至少一个终端设备就位。701. The target terminal device determines that the first terminal device and at least one terminal device are in place.
所谓就位,可以指第一终端设备和至少一个终端设备都同时满足以下条件:都处于开机状态;检测到自身停止移动或仅在一定距离范围内,且移动速度以及转动速度都小于一定预设的值,例如移动速度小于0.01m/min,转动速度小于1°/min。The so-called in-position can mean that both the first terminal device and at least one terminal device meet the following conditions at the same time: both are in the power-on state; it is detected that they have stopped moving or are only within a certain distance range, and the moving speed and rotation speed are both less than a certain preset. The value of , for example, the moving speed is less than 0.01m/min, and the rotation speed is less than 1°/min.
702、目标终端设备触发第一终端设备以及至少一个终端设备开启第一传感器。702. The target terminal device triggers the first terminal device and at least one terminal device to turn on the first sensor.
703、第一终端设备以及至少一个终端设备基于第一传感器采集的数据,获取终端设备之间的相对位置。703. The first terminal device and the at least one terminal device acquire relative positions between the terminal devices based on the data collected by the first sensor.
步骤703的描述可以参照步骤301的描述,相似之处不再赘述。The description of step 703 may refer to the description of step 301, and the similarities will not be repeated.
704、目标终端设备触发第一终端设备以及至少一个终端设备关闭第一传感器。704. The target terminal device triggers the first terminal device and at least one terminal device to turn off the first sensor.
步骤704的描述可以参照步骤302的描述,相似之处不再赘述。The description of step 704 may refer to the description of step 302, and the similarities will not be repeated.
705、第一终端设备基于第二传感器采集的数据,确定位置改变超过阈值。705. The first terminal device determines, based on the data collected by the second sensor, that the position change exceeds a threshold.
706、第一终端设备向目标终端设备发送指示位置改变超过阈值的信息。706. The first terminal device sends information indicating that the position change exceeds a threshold value to the target terminal device.
707、目标终端设备触发第一终端设备以及至少一个终端设备开启第一传感器。707. The target terminal device triggers the first terminal device and at least one terminal device to turn on the first sensor.
708、第一终端设备以及至少一个终端设备基于第一传感器采集的数据,获取终端设备之间的相对位置。708. The first terminal device and at least one terminal device acquire relative positions between the terminal devices based on the data collected by the first sensor.
709、触发关闭第一传感器。709. Trigger to turn off the first sensor.
步骤705至步骤709的描述可以参照步骤303的描述,相似之处不再赘述。The description of step 705 to step 709 may refer to the description of step 303, and the similarities will not be repeated.
参照图8,图8为本申请实施例提供的一种设备定位方法的流程示意,如图8示出的那样,计算系统可以包括目标终端设备、第一终端设备以及至少一个终端设备,本申请实施例提供的设备定位方法包括:Referring to FIG. 8, FIG. 8 is a schematic flowchart of a device positioning method provided by an embodiment of the application. As shown in FIG. 8, a computing system may include a target terminal device, a first terminal device, and at least one terminal device. The device positioning method provided by the embodiment includes:
801、目标终端设备确定至少一个终端设备就位。801. The target terminal device determines that at least one terminal device is in place.
所谓就位,可以指至少一个终端设备满足以下条件:都处于开机状态;检测到自身停止移动或仅在一定距离范围内,且移动速度以及转动速度都小于一定预设的值,例如移动速度小于0.01m/min,转动速度小于1°/min。The so-called in-position can mean that at least one terminal device satisfies the following conditions: it is all powered on; it detects that it has stopped moving or is only within a certain distance range, and the moving speed and rotation speed are both less than a certain preset value, for example, the moving speed is less than 0.01m/min, the rotation speed is less than 1°/min.
802、目标终端设备触发第一终端设备以及至少一个终端设备开启第一传感器。802. The target terminal device triggers the first terminal device and at least one terminal device to turn on the first sensor.
803、至少一个终端设备基于第一传感器采集的数据,获取终端设备之间的相对位置。803. At least one terminal device acquires relative positions between terminal devices based on the data collected by the first sensor.
步骤803的描述可以参照步骤301的描述,相似之处不再赘述。The description of step 803 may refer to the description of step 301, and the similarities will not be repeated.
804、目标终端设备触发至少一个终端设备关闭第一传感器。804. The target terminal device triggers at least one terminal device to turn off the first sensor.
步骤804的描述可以参照步骤302的描述,相似之处不再赘述。The description of step 804 may refer to the description of step 302, and the similarities will not be repeated.
805、目标终端设备确定第一终端设备连接至计算系统。805. The target terminal device determines that the first terminal device is connected to the computing system.
在一种场景中,第一终端设备可以保持第一传感器的关闭状态,直到接收到打开第一传感器的触发或者自身确定应打开第一传感器,例如,第一终端设备可以保持第一传感器的关闭状态,直到第一终端设备与计算系统中的至少一个终端设备建立连接后,可以接收到计算系统中的目标终端设备发送的开启所述第一传感器的指示,第一终端设备可以基于所述第四指示开启所述第一传感器。In one scenario, the first terminal device may keep the first sensor off until it receives a trigger to turn on the first sensor or determines itself that the first sensor should be turned on, for example, the first terminal device may keep the first sensor off until the first terminal device establishes a connection with at least one terminal device in the computing system, it can receive an instruction to turn on the first sensor sent by the target terminal device in the computing system, and the first terminal device can start the first sensor based on the first terminal device. Four indicates that the first sensor is turned on.
806、目标终端设备触发第一终端设备以及至少一个终端设备开启第一传感器。806. The target terminal device triggers the first terminal device and at least one terminal device to turn on the first sensor.
807、第一终端设备以及至少一个终端设备基于第一传感器采集的数据,获取终端设备之间的相对位置。807. The first terminal device and at least one terminal device acquire relative positions between the terminal devices based on the data collected by the first sensor.
808、触发关闭第一传感器。808. Trigger to turn off the first sensor.
步骤805至步骤808的描述可以参照步骤303的描述,相似之处不再赘述。The description of step 805 to step 808 may refer to the description of step 303, and the similarities will not be repeated.
参照图9,图9为本申请实施例提供的一种设备定位装置的结构示意,本申请实施例提供的设备定位装置可以应用于第一终端设备,所述第一终端设备包括第一传感器和第二传感器,其中,所述第一传感器采集的数据用于对所述第一终端设备定位,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,且所述第一传感器的功率大于所述 第二传感器的功率,如图9所示,本申请实施例提供的设备定位装置900可以包括:Referring to FIG. 9, FIG. 9 is a schematic structural diagram of a device positioning apparatus provided by an embodiment of the present application. The device positioning apparatus provided by an embodiment of the present application may be applied to a first terminal device, where the first terminal device includes a first sensor and a A second sensor, wherein the data collected by 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 first sensor The power of one sensor is greater than the power of the second sensor. As shown in FIG. 9 , the device positioning apparatus 900 provided in this embodiment of the present application may include:
获取模块901,用于获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的;an acquisition module 901, configured to acquire a position change of the first terminal device, where the position change is determined according to the first data collected by the second sensor;
获取模块901执行的步骤可以参照步骤301以及对应的实施例中的描述,这里不再赘述。For the steps performed by the obtaining module 901, reference may be made to the description in step 301 and the corresponding embodiments, and details are not repeated here.
传感器状态变化模块902,用于当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,所述第一传感器处于所述第一工作状态的功耗小于处于所述第二工作状态的功耗;A sensor state change module 902, configured 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, and the first sensor is in the first working state The power consumption of the state is less than the power consumption of the second working state;
传感器状态变化模块902执行的步骤可以参照步骤302以及对应的实施例中的描述,这里不再赘述。For the steps performed by the sensor state change module 902, reference may be made to the description in step 302 and the corresponding embodiments, and details are not repeated here.
所述获取模块901,用于获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器在所述第二工作状态采集的第二数据确定的。The acquiring module 901 is configured to acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor in the second working state.
获取模块901执行的步骤可以参照步骤303以及对应的实施例中的描述,这里不再赘述。For the steps performed by the obtaining module 901, reference may be made to the description in step 303 and the corresponding embodiments, and details are not repeated here.
在一种可能的设计中,在一种可能的设计中,所述获取模块,用于在获取所述第一终端设备的位置变化之前,获取所述第一终端设备的第二位置信息,所述第二位置信息为根据所述第一传感器在所述第二工作状态采集的第三数据确定的;In a possible design, in a possible design, the acquiring module is configured to acquire the second location information of the first terminal device before acquiring the location change of the first terminal device, so The second position information is determined according to third data collected by the first sensor in the second working state;
所述传感器状态变化模块,用于触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。The sensor state changing module is configured to trigger the first sensor to change from the second working state to the first working state.
在一种可能的设计中,所述第一传感器采集的数据的数据精度大于所述第二传感器采集的数据的数据精度。In a possible design, the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
在一种可能的设计中,所述传感器状态变化模块,用于:In a possible design, the sensor state change module is used to:
在触发所述第一传感器由第一工作状态改变为第二工作状态后,触发所述第一传感器由第二工作状态改变为第一工作状态。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 to the first working state.
在一种可能的设计中,所述第一位置信息用于指示所述第一终端设备与第二终端设备之间的第一相对位置;In a possible design, the first position information is used to indicate a first relative position between the first terminal device and the second terminal device;
所述第二位置信息用于指示所述第一终端设备与所述第二终端设备之间的第二相对位置;The second position 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.
在一种可能的设计中,所述传感器状态变化模块,用于接收所述第二终端设备发送的用于触发所述第一传感器由所述第二工作状态改变为所述第一工作状态的第二指示,并基于所述第二指示触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。In a possible design, the sensor state change module is configured to receive a message sent by the second terminal device for triggering the first sensor to change from the second working state to the first working state a second indication, and triggering the first sensor to change from the second working state to the first working state based on the second indication.
在一种可能的设计中,所述传感器状态变化模块,用于当所述第一终端设备的位置变化超过阈值,向所述第二终端设备发送用于指示所述第一终端设备的位置变化超过阈值的第三指示;In a possible design, the sensor state change module is configured to, when the position change of the first terminal device exceeds a threshold, send a message indicating the position change of the first terminal device to the second terminal device a third indication that the threshold is exceeded;
接收所述第二终端设备发送的用于触发所述第一传感器由第一工作状态改变为第二工作状态的第四指示,并基于所述第四指示触发所述第一传感器由第一工作状态改变为第二 工作状态。Receive a fourth instruction sent by the second terminal device for triggering the first sensor to change from a first working state to a second working state, and trigger the first sensor to change from the first working state to the first working state based on the fourth instruction The state changes to the second working state.
在一种可能的设计中,所述第二终端设备包括M个终端设备,所述M个终端设备中的每个终端设备包括所述第一传感器;In a possible design, the second terminal device includes M terminal devices, and each terminal device in the M terminal devices includes the first sensor;
所述第一位置信息为根据所述第二数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M;和/或,The first location information is determined according to the second data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M; and/or,
所述第二位置信息为根据所述第三数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M。The second location information is determined according to the third data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M.
在一种可能的设计中,所述N小于所述M,所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备。In a possible design, 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.
在一种可能的设计中,所述第一相对位置和所述第二相对位置包括相对距离和/或相对方位角。In a possible design, the first relative position and the second relative position include relative distances and/or relative azimuths.
在一种可能的设计中,所述传感器状态变化模块,用于在获取所述第一终端设备的第二位置信息之前,指示所述第一传感器由所述第一工作状态改变为所述第二工作状态。In a possible design, the sensor state change module is configured to instruct the first sensor to change from the first working state to the first working state before acquiring the second position information of the first terminal device 2. Working status.
在一种可能的设计中,所述传感器状态变化模块,用于与所述第二终端设备建立连接;In a possible design, the sensor state change module is used to establish a connection with the second terminal device;
接收所述第二终端设备发送的用于触发所述第一传感器由所述第一工作状态改变为所述第二工作状态的第一指示,并基于所述第一指示触发所述第一传感器由所述第一工作状态改变为所述第二工作状态。Receive a first indication sent by the second terminal device for triggering the first sensor to change from the first working state to the second working state, and trigger the first sensor based on the first indication Change from the first working state to the second working state.
在一种可能的设计中,所述获取模块,用于:In a possible design, the acquisition module is used to:
获取所述第一传感器采集的第二数据,并根据所述第二数据确定所述第一终端设备的第一位置信息。Second data collected by the first sensor is acquired, and first location information of the first terminal device is determined according to the second data.
在一种可能的设计中,所述获取模块,用于:In a possible design, the acquisition module is used to:
获取所述第一传感器采集的第二数据以及所述N个终端设备的第一传感器采集的数据,并根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息;或,Acquire second data collected by the first sensor and data collected by the first sensors of the N terminal devices, and determine the the first location information of the first terminal device; or,
获取所述第一传感器采集的第二数据;向所述M个终端设备中的目标终端设备发送所述第二数据,以便所述目标终端设备根据所述第二数据确定所述第一终端设备的第一位置信息,或者以便所述目标终端设备根据所述第二数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第一位置信息;接收所述目标终端设备发送的所述第一位置信息。acquiring 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 terminal device according to the second data the first location information of the first terminal device, or so that the target terminal device can determine the first location information of the first terminal device according to the second data and the data collected by the first sensors of the N terminal devices; receive the target The first location information sent by the terminal device.
在一种可能的设计中,所述获取模块,用于:In a possible design, the acquisition module is used to:
获取所述第一传感器采集的第三数据,并根据所述第三数据确定所述第一终端设备的第二位置信息。The third data collected by the first sensor is acquired, and the second position information of the first terminal device is determined according to the third data.
在一种可能的设计中,所述获取模块,用于:In a possible design, the acquisition module is used to:
获取所述第一传感器采集的第三数据以及所述N个终端设备的第一传感器采集的数据,并根据所述第三数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第二位置信息;或,Acquire third data collected by the first sensor and data collected by the first sensors of the N terminal devices, and determine the second location information of the first terminal device; or,
获取所述第一传感器采集的第三数据;向所述M个终端设备中的目标终端设备发送所述第三数据,以便所述目标终端设备根据所述第三数据确定所述第一终端设备的第二位置信息,或者以便所述目标终端设备根据所述第三数据以及所述N个终端设备的第一传感器采集的数据确定所述第一终端设备的第二位置信息;接收所述目标终端设备发送的所述第二位置信息。acquiring 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 determines the first terminal device according to the third data the second location information of the first terminal device, or so that the target terminal device can determine the second location information of the first terminal device according to the third data and the data collected by the first sensors of the N terminal devices; receive the target the second location information sent by the terminal device.
在一种可能的设计中,所述第一传感器包括如下传感器的至少一种:超宽频UWB传感器、超声波传感器、镭射传感器以及视觉传感器;In a 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;
所述第二传感器包括如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙BLE以及无线保真WIFI。The second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
在一种可能的设计中,所述第一传感器包括如下传感器的至少一种:加速计传感器以及陀螺仪传感器,且所述第一传感器采集的数据的数据精度大于预设值。In a possible design, the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data accuracy of the data collected by the first sensor is greater than a preset value.
参照图10,图10为本申请实施例提供的一种设备定位装置的结构示意,本申请实施例提供的设备定位装置可以应用于目标终端设备,所述目标终端设备属于计算系统,所述计算系统包括M个终端设备,所述M个终端设备包括第一终端设备,所述第一终端设备包括第一传感器和第二传感器,其中,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,且所述第一传感器的功率大于所述第二传感器的功率;本申请实施例提供的一种设备定位装置1000可以包括:Referring to FIG. 10 , FIG. 10 is a schematic structural diagram of a device positioning apparatus provided by an embodiment of the present application. The device positioning apparatus provided by the embodiment of the present application may be applied to a target terminal device, where the target terminal device belongs to a computing system, and the computing The system includes M terminal devices, the M terminal devices include a first terminal device, and the first terminal device includes a first sensor and a second sensor, wherein the data collected by the second sensor is used to determine the first terminal device. The position of a terminal device changes, and the power of the first sensor is greater than the power of the second sensor; a device positioning apparatus 1000 provided by an embodiment of the present application may include:
获取模块1001,用于获取所述第一终端设备的第二位置信息,其中,所述第二位置信息为根据所述第一传感器在所述第二工作状态采集的第三数据确定的。The obtaining module 1001 is configured to obtain second position information of the first terminal device, wherein the second position information is determined according to third data collected by the first sensor in the second working state.
获取模块1001执行的步骤可以参照步骤601、步骤604以及对应的实施例中的描述,这里不再赘述。For the steps performed by the obtaining module 1001, reference may be made to the descriptions in step 601, step 604 and the corresponding embodiments, which will not be repeated here.
发送模块1002,用于向所述第一终端设备发送用于触发所述第一传感器由第二工作状态改变为第一工作状态的第二指示,以便所述第一终端设备基于所述第二指示触发所述第一传感器由第一工作状态改变为第二工作状态。A sending module 1002, configured to send, to the first terminal device, a second indication for triggering the first sensor to change from a second working state to a first working state, so that the first terminal device is based on the second The instruction triggers the first sensor to change from the first working state to the second working state.
若接收到所述第一终端设备发送的用于指示所述第一终端设备的位置变化超过阈值的第三指示,则向所述第一终端设备发送用于触发所述第一传感器由第一工作状态改变为第二工作状态的第四指示,以便所述第一终端设备基于所述第三指示触发所述第一传感器由第一工作状态改变为第二工作状态。If receiving a third indication sent by the first terminal device and used to indicate that the position change of the first terminal device exceeds a threshold, sending a third indication to the first terminal device for triggering the first sensor to be detected by the first terminal device. The working state is changed to the fourth indication of the second 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 third indication.
发送模块1002执行的步骤可以参照步骤602、步骤603以及对应的实施例中的描述,这里不再赘述。For the steps performed by the sending module 1002, reference may be made to the descriptions in step 602, step 603 and corresponding embodiments, and details are not repeated here.
所述获取模块1001,用于获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器采集的第二数据确定的。The acquiring module 1001 is configured to acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor.
在一种可能的设计中,所述第一传感器采集的数据的数据精度大于所述第二传感器采集的数据的数据精度。In a possible design, the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
在一种可能的设计中,目标终端设备可以向所述第一终端设备以及所述M个终端设备中的N个终端设备发送用于触发所述第一传感器由第一工作状态改变为第二工作状态的第 四指示,以便所述第一终端设备以及N个终端设备基于所述第四指示触发所述第一传感器由第一工作状态改变为第二工作状态,所述N小于或等于所述M;In a possible design, the target terminal device may send a message to the first terminal device and N terminal devices among the M terminal devices for triggering the first sensor to change from the first working state to the second The fourth indication of the working state, so that the first terminal device and N terminal devices trigger the first sensor to change from the first working state to the second working state based on the fourth indication, and the N is less than or equal to the said M;
在一种可能的设计中,所述第一位置信息为根据所述第一传感器采集的第二数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的。In a possible design, the first location information is determined according to the second data collected by the first sensor and data collected by the first sensors of N terminal devices among the M terminal devices.
在一种可能的设计中,所述N小于所述M,目标终端设备可以从所述M个终端设备中确定所述N个终端设备,其中,所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备。In a possible design, the N is less than the M, and the target terminal device may determine the N terminal devices from the M terminal devices, where the N terminal devices are the M terminals N terminal devices that are closest to the first terminal device in the device.
在一种可能的设计中,所述第一位置信息和所述第二位置信息用于指示所述第一终端设备与所述M个终端设备中除所述第一终端设备之外的终端设备之间的相对位置。In a possible design, the first location information and the second location information are used to indicate the first terminal device and terminal devices other than the first terminal device among the M terminal devices relative position between.
在一种可能的设计中,所述相对位置包括相对距离和/或相对方位角。In one possible design, the relative positions include relative distances and/or relative azimuths.
在一种可能的设计中,所述第一传感器包括如下传感器的至少一种:超宽频UWB传感器、超声波传感器、镭射传感器以及视觉传感器;In a 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;
所述第二传感器包括如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙BLE以及无线保真WIFI。The second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
在一种可能的设计中,所述第一传感器包括如下传感器的至少一种:加速计传感器以及陀螺仪传感器,且所述第一传感器采集的数据的数据精度大于预设值。In a possible design, the first sensor includes at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data accuracy of the data collected by the first sensor is greater than a preset value.
参照图11,图11为本申请提供的一种终端设备1500的结构示意,终端设备1500可以为上述实施例中图9中描述的设备定位装置900,或者为上述实施例中图10中描述的设备定位装置1000,如图11示出的那样,所述终端设备包括处理器1501和存储器1502,所述处理器1501用于获取所述存储器1502的代码以执行图3、图6对应实施例所描述的设备定位方法。Referring to FIG. 11 , FIG. 11 is a schematic structural diagram of a terminal device 1500 provided by the present application, and the terminal device 1500 may be the device positioning apparatus 900 described in FIG. Device positioning apparatus 1000, as shown in FIG. 11 , the terminal device includes a processor 1501 and a memory 1502, and the processor 1501 is used to obtain the code of the memory 1502 to execute the codes in the corresponding embodiments of FIG. 3 and FIG. 6 . Describes the device location method.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, device and unit described above may refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者其他网络设备等)执行本申请图2实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or other network device, etc.) to execute all or part of the steps of the method described in the embodiment of FIG. 2 of the present application. The aforementioned storage medium includes: U disk, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Claims (25)

  1. 一种设备定位方法,其特征在于,应用于第一终端设备,所述第一终端设备包括第一传感器和第二传感器,其中,所述第一传感器用于对所述第一终端设备定位,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,且所述第一传感器的功率大于所述第二传感器的功率,所述方法包括:A device positioning method, characterized by being applied to a first terminal device, the first terminal device comprising a first sensor and a second sensor, wherein the first sensor is used for positioning 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 method includes:
    获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的;acquiring a position change of the first terminal device, where the position change is determined according to the first data collected by the second sensor;
    当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,所述第一传感器处于所述第一工作状态的功耗小于处于所述第二工作状态的功耗;When the position change of the first terminal device exceeds a 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 smaller than that in the first working state The power consumption of the second working state;
    获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器在所述第二工作状态采集的第二数据确定的。Obtain first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor in the second working state.
  2. 根据权利要求1所述的方法,其特征在于,所述方法还包括:The method according to claim 1, wherein the method further comprises:
    在获取所述第一终端设备的位置变化之前,获取所述第一终端设备的第二位置信息,所述第二位置信息为根据所述第一传感器在所述第二工作状态采集的第三数据确定的;Before acquiring the location change of the first terminal device, acquire second location information of the first terminal device, where the second location information is the third location information collected according to the first sensor in the second working state data determined;
    触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。Triggering the first sensor to change from the second working state to the first working state.
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一传感器采集的数据的数据精度大于所述第二传感器采集的数据的数据精度。The method according to claim 1 or 2, wherein the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
  4. 根据权利要求2或3所述的方法,其特征在于,The method according to claim 2 or 3, characterized in that,
    所述第一位置信息用于指示所述第一终端设备与第二终端设备之间的第一相对位置;The first position information is used to indicate the first relative position between the first terminal device and the second terminal device;
    所述第二位置信息用于指示所述第一终端设备与所述第二终端设备之间的第二相对位置;The second position 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.
  5. 根据权利要求4所述的方法,其特征在于,所述第二终端设备包括M个终端设备,所述M个终端设备中的每个终端设备包括所述第一传感器;The method according to claim 4, wherein the second terminal device includes M terminal devices, and each terminal device in the M terminal devices includes the first sensor;
    所述第一位置信息为根据所述第二数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M;和/或,The first location information is determined according to the second data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M; and/or,
    所述第二位置信息为根据所述第三数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M。The second location information is determined according to the third data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M.
  6. 根据权利要求5所述的方法,其特征在于,所述N小于所述M,所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备。The method according to claim 5, wherein 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. 根据权利要求4至6任一所述的方法,其特征在于,所述第一相对位置和所述第二相对位置包括相对距离和/或相对方位角。The method according to any one of claims 4 to 6, wherein the first relative position and the second relative position comprise relative distances and/or relative azimuths.
  8. 根据权利要求2至7任一所述的方法,其特征在于,所述获取所述第一终端设备的第二位置信息之前,所述方法还包括:The method according to any one of claims 2 to 7, wherein before acquiring the second location information of the first terminal device, the method further comprises:
    指示所述第一传感器由所述第一工作状态改变为所述第二工作状态。Instructing the first sensor to change from the first operating state to the second operating state.
  9. 根据权利要求8所述的方法,其特征在于,所述触发所述第一传感器由所述第一工作状态改变为所述第二工作状态,包括:The method according to claim 8, wherein the triggering the first sensor to change from the first working state to the second working state comprises:
    与所述第二终端设备建立连接;establishing a connection with the second terminal device;
    接收所述第二终端设备发送的用于触发所述第一传感器由所述第一工作状态改变为所述第二工作状态的第一指示,并基于所述第一指示触发所述第一传感器由所述第一工作状态改变为所述第二工作状态。Receive a first indication sent by the second terminal device for triggering the first sensor to change from the first working state to the second working state, and trigger the first sensor based on the first indication Change from the first working state to the second working state.
  10. 根据权利要求1至9任一所述的方法,其特征在于,所述第一传感器包括如下传感器的至少一种:超宽频UWB传感器、超声波传感器、镭射传感器以及视觉传感器;The method according to any one of claims 1 to 9, wherein the first sensor comprises at least one of the following sensors: an ultra-wideband UWB sensor, an ultrasonic sensor, a laser sensor and a visual sensor;
    所述第二传感器包括如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙BLE以及无线保真WIFI。The second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
  11. 根据权利要求1至9任一所述的方法,其特征在于,所述第一传感器包括如下传感器的至少一种:加速计传感器以及陀螺仪传感器,且所述第一传感器采集的数据的数据精度大于预设值。The method according to any one of claims 1 to 9, wherein the first sensor comprises at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data accuracy of the data collected by the first sensor is greater than the preset value.
  12. 一种设备定位装置,其特征在于,应用于第一终端设备,所述第一终端设备包括第一传感器和第二传感器,其中,所述第一传感器采集的数据用于对所述第一终端设备定位,所述第二传感器采集的数据用于确定所述第一终端设备的位置变化,且所述第一传感器的功率大于所述第二传感器的功率,所述装置包括:A device positioning device, characterized in that, it is applied to a first terminal device, the first terminal device includes a first sensor and a second sensor, wherein the data collected by the first sensor is used for the first terminal Device positioning, 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 device includes:
    获取模块,用于获取所述第一终端设备的位置变化,所述位置变化为根据所述第二传感器采集的第一数据确定的;an acquisition module, configured to acquire a position change of the first terminal device, where the position change is determined according to the first data collected by the second sensor;
    传感器状态变化模块,用于当所述第一终端设备的位置变化超过阈值,触发所述第一传感器由第一工作状态改变为第二工作状态,所述第一传感器处于所述第一工作状态的功耗小于处于所述第二工作状态的功耗;A sensor state change module, configured 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, and the first sensor is in the first working state The power consumption is less than the power consumption in the second working state;
    所述获取模块,用于获取所述第一终端设备的第一位置信息,所述第一位置信息为根据所述第一传感器在所述第二工作状态采集的第二数据确定的。The acquiring module is configured to acquire first location information of the first terminal device, where the first location information is determined according to second data collected by the first sensor in the second working state.
  13. 根据权利要求12所述的装置,其特征在于,所述获取模块,用于在获取所述第一终端设备的位置变化之前,获取所述第一终端设备的第二位置信息,所述第二位置信息为根据所述第一传感器在所述第二工作状态采集的第三数据确定的;The apparatus according to claim 12, wherein the acquiring module is configured to acquire the second location information of the first terminal device before acquiring the location change of the first terminal device, the second The location information is determined according to third data collected by the first sensor in the second working state;
    所述传感器状态变化模块,用于触发所述第一传感器由所述第二工作状态改变为所述第一工作状态。The sensor state changing module is configured to trigger the first sensor to change from the second working state to the first working state.
  14. 根据权利要求12或13所述的装置,其特征在于,所述第一传感器采集的数据的数据精度大于所述第二传感器采集的数据的数据精度。The device according to claim 12 or 13, wherein the data accuracy of the data collected by the first sensor is greater than the data accuracy of the data collected by the second sensor.
  15. 根据权利要求13或14所述的装置,其特征在于,所述第一位置信息用于指示所述第一终端设备与第二终端设备之间的第一相对位置;The apparatus according to claim 13 or 14, wherein the first position information is used to indicate a first relative position between the first terminal device and the second terminal device;
    所述第二位置信息用于指示所述第一终端设备与所述第二终端设备之间的第二相对位置;The second position 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.
  16. 根据权利要求15所述的装置,其特征在于,所述第二终端设备包括M个终端设备,所述M个终端设备中的每个终端设备包括所述第一传感器;The apparatus according to claim 15, wherein the second terminal device includes M terminal devices, and each terminal device in the M terminal devices includes the first sensor;
    所述第一位置信息为根据所述第二数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M;和/或,The first location information is determined according to the second data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M; and/or,
    所述第二位置信息为根据所述第三数据以及所述M个终端设备中的N个终端设备的第一传感器采集的数据确定的,所述N小于或等于所述M。The second location information is determined according to the third data and data collected by first sensors of N terminal devices among the M terminal devices, where N is less than or equal to the M.
  17. 根据权利要求16所述的装置,其特征在于,所述N小于所述M,所述N个终端设备为所述M个终端设备中与所述第一终端设备距离最近的N个终端设备。The apparatus according to claim 16, wherein 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. 根据权利要求15至17任一所述的装置,其特征在于,所述第一相对位置和所述第二相对位置包括相对距离和/或相对方位角。The device according to any one of claims 15 to 17, wherein the first relative position and the second relative position comprise relative distances and/or relative azimuths.
  19. 根据权利要求14至18任一所述的装置,其特征在于,所述传感器状态变化模块,用于在获取所述第一终端设备的第二位置信息之前,指示所述第一传感器由所述第一工作状态改变为所述第二工作状态。The apparatus according to any one of claims 14 to 18, wherein the sensor state change module is configured to instruct the first sensor to be controlled by the first terminal before acquiring the second position information of the first terminal device The first working state is changed to the second working state.
  20. 根据权利要求19所述的装置,其特征在于,所述传感器状态变化模块,用于与所述第二终端设备建立连接;The apparatus according to claim 19, wherein the sensor state change module is configured to establish a connection with the second terminal device;
    接收所述第二终端设备发送的用于触发所述第一传感器由所述第一工作状态改变为所述第二工作状态的第一指示,并基于所述第一指示触发所述第一传感器由所述第一工作状态改变为所述第二工作状态。Receive a first indication sent by the second terminal device for triggering the first sensor to change from the first working state to the second working state, and trigger the first sensor based on the first indication Change from the first working state to the second working state.
  21. 根据权利要求12至20任一所述的装置,其特征在于,所述第一传感器包括如下传感器的至少一种:超宽频UWB传感器、超声波传感器、镭射传感器以及视觉传感器;The device according to any one of claims 12 to 20, wherein the first sensor comprises at least one of the following sensors: an ultra-wideband UWB sensor, an ultrasonic sensor, a laser sensor and a visual sensor;
    所述第二传感器包括如下传感器的至少一种:加速计传感器、陀螺仪传感器、磁力计传感器、低功耗蓝牙BLE以及无线保真WIFI。The second sensor includes at least one of the following sensors: an accelerometer sensor, a gyroscope sensor, a magnetometer sensor, a low-power bluetooth BLE, and a wireless fidelity WIFI.
  22. 根据权利要求12至20任一所述的装置,其特征在于,所述第一传感器包括如下传感器的至少一种:加速计传感器以及陀螺仪传感器,且所述第一传感器采集的数据的数据精度大于预设值。The device according to any one of claims 12 to 20, wherein the first sensor comprises at least one of the following sensors: an accelerometer sensor and a gyroscope sensor, and the data accuracy of the data collected by the first sensor is greater than the preset value.
  23. 一种非易失性计算机可读存储介质,其特征在于,所述非易失性可读存储介质包含计算机指令,用于执行权利要求1至11任一所述的设备定位方法。A non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium contains computer instructions for executing the device positioning method according to any one of claims 1 to 11.
  24. 一种终端设备,其特征在于,所述运算设备包括存储器和处理器,所述存储器中存储有代码,所述处理器用于获取所述代码,以执行权利要求1至11任一所述的设备定位方法。A terminal device, characterized in that the computing device includes a memory and a processor, the memory stores a code, and the processor is used to obtain the code to execute the device according to any one of claims 1 to 11 positioning method.
  25. 一种计算机程序产品,其特征在于,所述计算机程序产品包括代码,当所述代码被执行时,用于实现权利要求1至11任一项所述的设备定位方法。A computer program product, characterized in that the computer program product includes codes, which, when executed, are used to implement the device positioning method according to any one of claims 1 to 11 .
PCT/CN2021/110046 2020-08-05 2021-08-02 Device positioning method and related device therefor WO2022028362A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN202010780901 2020-08-05
CN202010780901.2 2020-08-05
CN202011376728.6A CN112637758B (en) 2020-08-05 2020-11-30 Equipment positioning method and related equipment thereof
CN202011376728.6 2020-11-30

Publications (1)

Publication Number Publication Date
WO2022028362A1 true WO2022028362A1 (en) 2022-02-10

Family

ID=75307006

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/110046 WO2022028362A1 (en) 2020-08-05 2021-08-02 Device positioning method and related device therefor

Country Status (2)

Country Link
CN (2) CN116156417A (en)
WO (1) WO2022028362A1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116156417A (en) * 2020-08-05 2023-05-23 华为技术有限公司 Equipment positioning method and related equipment thereof
CN113741634A (en) * 2021-08-30 2021-12-03 海信视像科技股份有限公司 State control method based on wearable device and wearable device
CN114302328B (en) * 2021-12-24 2023-02-17 珠海格力电器股份有限公司 Control method, device and system of intelligent equipment
CN117376830A (en) * 2023-12-04 2024-01-09 荣耀终端有限公司 Geofence matching method, electronic device and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060119508A1 (en) * 2004-11-19 2006-06-08 Miller John D Method and apparatus for conserving power on a mobile device through motion awareness
CN102901975A (en) * 2012-10-18 2013-01-30 中兴通讯股份有限公司 Mobile terminal and method for obtaining position information of mobile terminal
CN104024884A (en) * 2011-12-20 2014-09-03 皇家飞利浦有限公司 A method of controlling a device and a device implementing the same
WO2017088111A1 (en) * 2015-11-24 2017-06-01 华为技术有限公司 Position information acquisition method and system
CN109814138A (en) * 2019-01-18 2019-05-28 成都众云微科技有限公司 A method of it reducing wearable device positioning power consumption and ensures positioning accuracy
CN110599717A (en) * 2019-07-30 2019-12-20 华为技术有限公司 Electronic fence detection method and electronic equipment
CN112637758A (en) * 2020-08-05 2021-04-09 华为技术有限公司 Equipment positioning method and related equipment thereof

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150327012A1 (en) * 2012-05-23 2015-11-12 Honeywell International Inc. Portable electronic devices having a separate location trigger unit for use in controlling an application unit
JP5704180B2 (en) * 2013-01-31 2015-04-22 トヨタ自動車株式会社 Electronic key terminal power consumption suppression system and electronic key terminal power consumption suppression method
CN104296749A (en) * 2014-11-03 2015-01-21 中国科学院深圳先进技术研究院 Motion state perception-based low power consumption positioning method and system
CN105988102B (en) * 2015-02-09 2019-01-18 株式会社理光 Relative bearing calculation method and device and relative positioning method
CN105101083A (en) * 2015-07-15 2015-11-25 魅族科技(中国)有限公司 Method and device for controlling indoor electronic device
CN107396313B (en) * 2017-07-18 2022-03-22 成都佳锂科技有限公司 Positioning triggering method and system
CN108076428B (en) * 2017-12-13 2020-01-14 Oppo广东移动通信有限公司 Control method and device based on positioning module, storage medium and mobile terminal
CN108169775B (en) * 2017-12-13 2020-05-12 Oppo广东移动通信有限公司 Control method and device based on positioning module, storage medium and mobile terminal
CN110411460B (en) * 2018-04-27 2021-08-27 高树安弗(杭州)科技有限公司 Method and system for adaptively controlling tracking device
CN111273317A (en) * 2018-12-05 2020-06-12 四川创一智慧科技有限公司 Low-power-consumption locator positioning detection method
CN111148036B (en) * 2019-04-08 2022-03-01 广东小天才科技有限公司 Mobile equipment searching method and system and related equipment
CN110505568B (en) * 2019-07-29 2021-01-12 广州杰赛科技股份有限公司 Power control method and device of wearable device and wearable device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060119508A1 (en) * 2004-11-19 2006-06-08 Miller John D Method and apparatus for conserving power on a mobile device through motion awareness
CN104024884A (en) * 2011-12-20 2014-09-03 皇家飞利浦有限公司 A method of controlling a device and a device implementing the same
CN102901975A (en) * 2012-10-18 2013-01-30 中兴通讯股份有限公司 Mobile terminal and method for obtaining position information of mobile terminal
WO2017088111A1 (en) * 2015-11-24 2017-06-01 华为技术有限公司 Position information acquisition method and system
CN109814138A (en) * 2019-01-18 2019-05-28 成都众云微科技有限公司 A method of it reducing wearable device positioning power consumption and ensures positioning accuracy
CN110599717A (en) * 2019-07-30 2019-12-20 华为技术有限公司 Electronic fence detection method and electronic equipment
CN112637758A (en) * 2020-08-05 2021-04-09 华为技术有限公司 Equipment positioning method and related equipment thereof

Also Published As

Publication number Publication date
CN112637758B (en) 2022-09-09
CN116156417A (en) 2023-05-23
CN112637758A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
WO2022028362A1 (en) Device positioning method and related device therefor
WO2022170863A1 (en) Ultra-wideband positioning method and system
WO2021013230A1 (en) Robot control method, robot, terminal, server, and control system
WO2021052016A1 (en) Body posture detection method and electronic device
CN114449599B (en) Network link switching method based on electronic equipment position and electronic equipment
WO2022033320A1 (en) Bluetooth communication method, terminal device, and computer-readable storage medium
WO2022127787A1 (en) Image display method and electronic device
WO2022100685A1 (en) Drawing command processing method and related device therefor
WO2022027972A1 (en) Device searching method and electronic device
WO2022088938A1 (en) Sleep monitoring method and apparatus, and electronic device and computer-readable storage medium
WO2022206494A1 (en) Target tracking method and device
WO2022105702A1 (en) Method and electronic device for saving image
CN113780000A (en) Article carrying reminding method and device
WO2023179751A9 (en) Object searching method, system and electronic device
CN110058729B (en) Method and electronic device for adjusting sensitivity of touch detection
WO2022166435A1 (en) Picture sharing method and electronic device
WO2022152174A9 (en) Screen projection method and electronic device
WO2022062902A1 (en) File transfer method and electronic device
WO2022095983A1 (en) Gesture misrecognition prevention method, and electronic device
WO2020233581A1 (en) Height measuring method and electronic device
CN114812381A (en) Electronic equipment positioning method and electronic equipment
CN114384465A (en) Azimuth angle determination method and device
WO2023024873A1 (en) Display method, electronic device, and system
WO2023051274A1 (en) Method for guiding user, and electronic device
CN116232959B (en) Network quality detection method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21854591

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21854591

Country of ref document: EP

Kind code of ref document: A1