Positioning method, device, electronic device and storage medium

By acquiring sensor data of terminal equipment and auxiliary positioning equipment, and identifying motion states and fusion positioning, the problem of low positioning accuracy of terminal equipment is solved, and higher positioning accuracy and stability are achieved.

CN115388885BActive Publication Date: 2025-04-18伟光有限公司(CN)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211032144.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-26
Publication Date
2025-04-18
Estimated Expiration
2042-08-26

AI Technical Summary

Technical Problem

When the terminal device is positioned, due to the unfixed user usage method, there is a random deviation between the terminal posture information and the user's real posture information, which affects the positioning accuracy.

Method used

By acquiring sensor data of the terminal equipment and auxiliary positioning equipment, the motion state is identified, the target equipment that meets the positioning requirements is determined, and the integrated positioning is performed.

Benefits of technology

It improves the accuracy of positioning results, reduces random deviations, and enhances the stability of positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115388885B_ABST
    Figure CN115388885B_ABST
Patent Text Reader

Abstract

The present application discloses a positioning method, device, electronic device and storage medium, and relates to the field of positioning technology. The method includes: obtaining first sensor data of a terminal device, and second sensor data of an auxiliary positioning device, a data communication connection is established between the auxiliary positioning device and the terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object, based on the first sensor data and the second sensor data, the motion state of the terminal device and the auxiliary positioning device are respectively identified, based on the motion state of the terminal device and the auxiliary positioning device, a target device that meets the positioning requirements is determined from the terminal device and the auxiliary positioning device, and fusion positioning is performed based on the target sensor data of the target device and the initial position data of the terminal device. The embodiment of the present application improves the positioning accuracy of the terminal device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of positioning technology, and in particular to a positioning method, device, electronic device and storage medium. Background Art

[0002] As people's daily travel range becomes larger and larger, most mobile terminals are equipped with positioning functions to assist and facilitate users' travel.

[0003] In related technologies, terminal devices often only use the sensors they carry to perform real-time positioning and posture detection. However, in actual applications, users usually use the terminals in different ways, which leads to random deviations between the calculated terminal posture information and the user's actual posture information, affecting the positioning accuracy. Summary of the invention

[0004] The embodiments of the present application provide a positioning method, device, electronic device and storage medium. The technical solution is as follows:

[0005] On the one hand, an embodiment of the present application provides a positioning method, which is used for a terminal device, and the method includes:

[0006] Acquire first sensor data of a terminal device and second sensor data of an auxiliary positioning device, wherein a data communication connection is established between the auxiliary positioning device and the terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object;

[0007] Based on the first sensor data and the second sensor data, respectively, identifying the motion states of the terminal device and the auxiliary positioning device;

[0008] Based on the motion states of the terminal device and the auxiliary positioning device, determining a target device that meets the positioning requirements from the terminal device and the auxiliary positioning device;

[0009] Fusion positioning is performed based on the target sensor data of the target device and the initial position data of the terminal device.

[0010] On the other hand, an embodiment of the present application provides a positioning method, which is used to assist in positioning a device, and the method includes:

[0011] Establishing a data communication connection with a terminal device, wherein both the auxiliary positioning device and the terminal device are worn by the positioning object;

[0012] The second sensor data is transmitted to the terminal device through the data communication connection, so that the terminal device identifies the motion status of the terminal device and the auxiliary positioning device based on the first sensor data and the second sensor data, respectively, and based on the motion status of the terminal device and the auxiliary positioning device, determines the target device that meets the positioning requirements from the terminal device and the auxiliary positioning device, and performs fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device.

[0013] On the other hand, an embodiment of the present application provides a positioning device, which is used in a terminal device, and includes:

[0014] an acquisition module, configured to acquire first sensor data of a terminal device and second sensor data of an auxiliary positioning device, wherein a data communication connection is established between the auxiliary positioning device and the terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object;

[0015] an identification module, configured to identify the motion states of the terminal device and the auxiliary positioning device respectively based on the first sensor data and the second sensor data;

[0016] A determination module, configured to determine a target device that meets the positioning requirement from among the terminal device and the auxiliary positioning device based on the motion states of the terminal device and the auxiliary positioning device;

[0017] The fusion positioning module is used to perform fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device.

[0018] On the other hand, an embodiment of the present application provides a positioning device, the device is used to assist in positioning equipment, the device includes:

[0019] A communication module, used to establish a data communication connection with a terminal device, wherein both the auxiliary positioning device and the terminal device are worn by the positioning object;

[0020] A transmission module is used to transmit the second sensor data to the terminal device through the data communication connection, so that the terminal device can identify the motion state of the terminal device and the auxiliary positioning device based on the first sensor data and the second sensor data respectively, and based on the motion state of the terminal device and the auxiliary positioning device, determine the target device that meets the positioning requirements from the terminal device and the auxiliary positioning device, and perform fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device.

[0021] On the other hand, an embodiment of the present application provides an electronic device, which includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the positioning method described in the above aspect.

[0022] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one program code is stored, and the program code is loaded and executed by a processor to implement the positioning method as described in the above aspects.

[0023] On the other hand, an embodiment of the present application provides a computer program product, which includes computer instructions, which are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the positioning method provided in various optional implementations of the above aspects.

[0024] In an embodiment of the present application, in order to improve the accuracy of positioning, the terminal device not only obtains its own sensor data, but also obtains the sensor data of the auxiliary positioning device. Based on the two-way sensor data, the terminal device identifies the motion state of itself and the auxiliary positioning device, and determines the motion state of each of the two devices. Based on the motion state of the device, the terminal device determines the target device whose motion state meets the positioning conditions, so as to determine the target sensor data that can accurately characterize the motion state of the positioning object, and then fuse the positioning with the initial position data of the terminal device; in an embodiment of the present application, by making full use of the sensor data of the auxiliary positioning device, the data source of the fusion positioning is enriched, and the terminal device determines the accuracy of the motion state of the positioning object represented by the multi-way sensor data through motion state identification, and then fuses the sensor data with higher accuracy with the initial position data for positioning, thereby improving the accuracy of the positioning result without increasing the hardware cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;

[0027] Figure 2 A flowchart of a positioning method provided by an exemplary embodiment of the present application is shown;

[0028] Figure 3 A schematic diagram of a fusion positioning calculation method provided by an exemplary embodiment of the present application is shown;

[0029] Figure 4 A flow chart of a fusion positioning method provided by an exemplary embodiment of the present application is shown;

[0030] Figure 5 A flow chart of a fusion positioning method provided by another exemplary embodiment of the present application is shown;

[0031] Figure 6 A flow chart of a fusion positioning method provided by another exemplary embodiment of the present application is shown;

[0032] Figure 7 A flow chart of a fusion positioning method provided by another exemplary embodiment of the present application is shown;

[0033] Figure 8 A flowchart of a positioning method provided by an exemplary embodiment of the present application is shown;

[0034] Fig. 9 A structural block diagram of a positioning device provided by an exemplary embodiment of the present application is shown;

[0035] Fig.10 A structural block diagram of a positioning device provided by another exemplary embodiment of the present application is shown;

[0036] Fig.11 A structural block diagram of an electronic device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION

[0037] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0038] For ease of understanding, the nouns involved in the embodiments of the present application are explained below.

[0039] GNSS (Global Navigation Satellite System): refers to all satellite navigation systems, including global, regional and enhanced satellite navigation systems, such as the United States' GPS (Global Positioning System), Russia's GLONASS (Global Navigation Satellite System), Europe's Galileo satellite navigation system, China's BeiDou satellite navigation system, and related augmentation systems, such as the United States' WAAS (Wide Area Augmentation System), Europe's EGNOS (European Geostationary Navigation Overlay Service) and Japan's MSAS (Multi-Functional Satellite Augmentation System), etc., and also covers other satellite navigation systems that are under construction or to be built in the future. The international GNSS system is a complex combination of multiple systems, multiple levels and multiple modes.

[0040] IMU (Inertial Measurement Unit): It is a sensor that determines the direction and position of a carrier through inertial devices. It is composed of a quartz flexible accelerometer (accelerometer) and a gyroscope. The accelerometer measures the acceleration signal of the carrier, and the fiber optic gyroscope measures the angular rate signal of the carrier. The inertial measurement unit can measure the angular velocity and acceleration of an object in three-dimensional space without relying on external information, and use this to calculate the posture of the object. IMU is a core component of inertial navigation. It is suitable for shield guidance and coal mine tunnel guidance, and can also serve as a supplement to GPS satellite signals. In related applications, common sensors also include Mag (Magnetometer) for measuring the current magnetic field size and direction, and Bar (Barometer) for measuring the gas pressure at the current position.

[0041] PDR (Pedestrian Dead Reckoning) measures and counts the number of steps, stride length, and direction of pedestrians, and calculates the pedestrian's walking trajectory, location, and other information. In an environment without beacons, an inertial measurement unit is used to sense the acceleration, angular velocity, magnetism, and pressure of a person in motion, and these data are used to calculate the stride length and direction of the person, thereby achieving the purpose of positioning and tracking the person. The main processes involved are gait detection, stride length, and direction calculation.

[0042] PDR / GNSS fusion positioning technology: a positioning method that combines PDR and GNSS information. PDR based on terminal devices is limited by the low performance of MEMS (Micro-Electro-Mechanical Systems) devices, and its heading and step length estimation will produce significant accumulated errors over time, thus limiting the practical application of PDR. In outdoor applications, the GNSS of terminal equipment can provide absolute position information. In addition, GNSS technology is susceptible to external interference or shielding during signal reception, and has the defect of weak dynamic signal reception capability. When the carrier speed changes drastically, or the carrier is severely blocked by mountains, high-rise buildings, or trees, the carrier's ability to receive GNSS satellite signals is weakened. Inertial sensors such as IMU output through their own systems and are not easily affected by external interference. The carrier movement and surrounding environment have little effect on their accuracy. Therefore, the fusion calculation of GNSS data and IMU data can improve the accuracy of position signals. On the other hand, inertial navigation systems such as IMU have errors that accumulate over time when acquiring heading information, while the output of GNSS signals in each time period is independent of each other. Therefore, the real-time fusion of PDR and GNSS information can improve the superiority of positioning functions in terms of yaw rate, anti-interference, and noise performance.

[0043] Positioning function is a common function in terminals. In related technologies, terminals mostly determine their current location through fusion positioning technology. The terminal first performs PDR positioning through its own IMU, Mag, Bar and other sensors that can characterize the carrier's attitude or position, and then uses fusion filtering algorithms such as Kalman filtering to perform fusion positioning calculations on PDR information and GNSS data to obtain the current heading, step length and other attitude information and specific location information of the user holding the terminal. However, in related technologies, the terminal still relies solely on its own position sensor data. Since the way users use the terminal is usually not fixed, and the heading and other information calculated by the terminal sensor only reflects the terminal's own motion characteristics, when the terminal and the user's motion state are not synchronized, the terminal sensor information has random changes in the deviation when characterizing the user's motion state, affecting the accuracy of positioning. In related technologies that solve the above problems through machine learning, there is a problem that the learning method is not universal, and it is difficult to generally improve the accuracy of pedestrian navigation.

[0044] In order to improve the accuracy of the positioning results, an embodiment of the present application provides a cross-device fusion positioning method. While the terminal device obtains location information through its own sensors, it uses wearable electronic devices such as smart headphones as auxiliary positioning devices to obtain sensor data of the auxiliary positioning devices. The terminal device then determines the target device through motion state recognition, and fuses the more accurate sensor data provided by the target device with the initial position data for positioning. Without increasing hardware costs, the accuracy of terminal device positioning is improved by making full use of the sensors carried by the auxiliary positioning devices.

[0045] Figure 1 The schematic diagram of an implementation environment provided by an exemplary embodiment of the present application is shown. The implementation environment includes a terminal device 101 and an auxiliary positioning device 102 .

[0046] The terminal device 101 is an electronic device with a positioning function. The positioning function may be a native application in the electronic device, or a function of a third-party application; the auxiliary positioning device 102 is an electronic device with a positioning function, which may be a small electronic device that is easy to wear and the wearing position is usually relatively fixed, for example, the auxiliary positioning device may be a smart headset, a smart watch, a bracelet, AR glasses, etc. Figure 1 In the present invention, the terminal device 101 is a smart phone and the auxiliary positioning device 102 is a wireless headset as an example for explanation, but this is not a limitation.

[0047] In a possible implementation, the terminal device 101 and the auxiliary positioning device 102 may establish a Bluetooth link or perform sensor data transmission via Wi-Fi or the like.

[0048] In addition, the terminal device 101 can simultaneously perform cross-device fusion positioning with multiple auxiliary positioning devices 102 with positioning functions. The embodiment of the present application only uses the terminal device 101 combined with an auxiliary positioning device 102 as an example for schematic illustration, but does not constitute a limitation to this.

[0049] Please refer to Figure 2 , which shows a flowchart of a positioning method provided by an exemplary embodiment of the present application. The present application embodiment uses this method for Figure 1 Taking the implementation environment shown as an example, the method may include the following steps.

[0050] Step 201: An auxiliary positioning device establishes a data communication connection with a terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object.

[0051] The auxiliary positioning device may be a smart wearable device, and accordingly, the movement direction of the auxiliary positioning device and the movement direction of the positioning object have a high degree of overlap. Compared with positioning only through the terminal device, determining the movement direction of the positioning object in combination with the auxiliary positioning device can improve the positioning accuracy.

[0052] In order to combine and analyze the positioning data of the terminal device and the auxiliary positioning device, in a possible implementation, when the auxiliary positioning device and the terminal device are both turned on and the terminal device has an auxiliary positioning requirement, the auxiliary positioning device can establish a data connection with the terminal device via a Bluetooth link. Optionally, the auxiliary positioning device can establish a data connection with the terminal device via Wi-Fi or other methods.

[0053] Step 202: The auxiliary positioning device transmits the second sensor data to the terminal device through the data communication connection, so that the terminal device identifies the motion state of the terminal device and the auxiliary positioning device based on the first sensor data and the second sensor data, respectively, and based on the motion state of the terminal device and the auxiliary positioning device, determines the target device that meets the positioning requirements from the terminal device and the auxiliary positioning device, and performs fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device.

[0054] When a communication connection is established between the auxiliary positioning device and the terminal device, and when the data synchronization conditions are met, the auxiliary positioning device transmits the second sensor data to the terminal device so that the terminal device can combine and analyze its own sensor data and the second sensor data to determine a more accurate positioning result, thereby improving the positioning accuracy through fusion positioning.

[0055] Step 203: The terminal device obtains its own first sensor data and the second sensor data of the auxiliary positioning device. A data communication connection is established between the auxiliary positioning device and the terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object.

[0056] Since in actual applications, the way pedestrians use terminal devices when walking is not fixed, and based on the different ways pedestrians hold terminal devices, there is a random deviation between the motion state of the terminal device and the walking state of the positioning object, which affects the accuracy of the terminal device positioning results. For example, when the positioning object holds the terminal device and swings its arm at the same time, the heading angle of the terminal device changes with the swinging movement and does not indicate the forward direction of the positioning object. Therefore, the terminal device uses a single terminal device sensor data for positioning, which limits the accuracy of fusion positioning. In an embodiment of the present application, the terminal device can obtain sensor data of an auxiliary positioning device to expand the data source. An auxiliary positioning device refers to an intelligent device equipped with a sensor, such as TWS (True Wireless Stereo) headphones, smart glasses, smart bracelets, and smart necklaces. The above-mentioned sensor refers to a sensor that can measure the motion posture of the carrier, that is, the auxiliary positioning device can output sensor data that characterizes the carrier posture.

[0057] Optionally, the sensor used to obtain the device posture information can be a combination of one or more sensors such as IMU, Mag, Bar, etc., and at least includes IMU. That is, the first sensor data and the second sensor data both contain at least inertial sensor data. Among them, the IMU is composed of a three-axis accelerometer and a three-axis gyroscope. The IMU measures and obtains the three-axis acceleration signal of the terminal device in the geocentric inertial coordinate system through the three-axis accelerometer, and measures the three-axis angular velocity signal of the terminal device relative to the geocentric inertial coordinate system through the three-axis gyroscope. The above three-axis acceleration signal and three-axis angular velocity signal are the inertial sensor data.

[0058] Optionally, the auxiliary positioning device may transmit sensor data to the terminal device via Bluetooth, or via Wi-Fi or other methods, which is not limited in this application.

[0059] Optionally, the auxiliary positioning device may transmit the second sensor data to the terminal device in real time, or may transmit the second sensor data to the terminal device at a scheduled time based on a transmission cycle.

[0060] Step 204: The terminal device identifies the motion state of itself and the auxiliary positioning device based on the first sensor data and the second sensor data.

[0061] Both the first sensor data and the second sensor data contain data characterizing the motion posture of the corresponding device. For example, when the first sensor data is IMU data, the first sensor data contains the heading angle data and step length data of the terminal device, which can characterize the motion direction and distance of the terminal device. Therefore, the first sensor data can characterize the motion state of the terminal device. Correspondingly, the second sensor data can characterize the motion state of the auxiliary positioning device. The terminal device can determine the motion states of the two devices respectively by identifying the motion states of the first sensor data and the second sensor data.

[0062] In one possible implementation, the terminal device can set a certain motion state, and establish a mapping relationship between each motion state and characteristic sensor data, and then based on the mapping relationship, the terminal device can determine the current motion mode of the terminal device according to the sensor data. For example, the terminal device can set a handheld state, a swinging arm state, a random state, etc., wherein, when the sensor data indicates that the terminal device's heading changes little within a certain period of time and there is only an allowable error, the terminal device can determine that it is currently in a handheld state, when the sensor data indicates that the terminal device's heading changes regularly within a certain range, the terminal device can determine that it is currently in a swinging arm state, and when the sensor data indicates that the terminal device's heading changes irregularly, the terminal device can determine that it is currently in a random state.

[0063] In an illustrative example, a terminal device obtains its own inertial sensor data as first sensor data, and obtains inertial sensor data of an auxiliary positioning device, i.e., second sensor data, wherein the auxiliary positioning device is a TWS headset. Based on the fact that the gyroscope data in the first sensor data does not change much within a certain period of time, and the modulus data of the three-axis acceleration is stable in a certain range, the terminal device can determine that the terminal device is currently in a walking handheld state, i.e., the first sensor data can accurately represent the walking state of the positioned object; based on the fact that the heading angle data in the second sensor data changes greatly and irregularly within a certain period of time, the terminal device can determine that the current positioned object may be in a shaking head state, and there is a large gap between the motion state of the TWS headset and the walking state of the positioned object, i.e., the second sensor data cannot accurately represent the walking state of the positioned object, and then the terminal device determines that the auxiliary positioning device is in a random state.

[0064] Step 205: Based on the motion states of the terminal device and the auxiliary positioning device, the terminal device determines a target device that meets the positioning requirements from itself and the auxiliary positioning device.

[0065] Among them, meeting the positioning requirements means that the movement state of the device has a high stability and is basically consistent with the walking state of the positioning object. The terminal device can select a device with a movement state similar to the walking state of the positioning object as the target device, thereby ensuring the accuracy of the positioning result.

[0066] In one possible implementation, the terminal device may set multiple motion states based on feature sensor data, such as a walking state, a swinging arm state, a random state, etc., and determine a motion state indicating that the sensor data is relatively stable as a motion state that meets the positioning requirements. For example, the terminal device determines that the current motion state is a walking state based on the fact that the change amplitude of the heading angle data is within the allowable error. The walking state indicates that the motion state of the device is similar to the walking state of the positioned object, and thus the terminal device can determine that the positioning condition is met in the walking state. Alternatively, the terminal device determines that the current motion state is a swinging arm state based on the regular change of the heading angle data within a certain range. In this motion state, the sensor data is relatively stable, and the motion state is slightly different from the walking state of the pedestrian. Thus, the terminal device can determine that the terminal device meets the positioning condition when it is in the swinging arm state.

[0067] Optionally, the target device may be a device with a higher stability in current motion state between the terminal device and the auxiliary positioning device. When both devices meet the positioning conditions, the terminal device may determine that both devices are target devices.

[0068] Step 206: The terminal device performs fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device.

[0069] Based on step 201, it can be known that the first sensor data and the second sensor data can be data output by sensors such as IMU and Mag. The above sensor data represent the motion state of the positioning object. For example, in the PDR data calculated based on the IMU data, the heading angle data represents the forward direction of the pedestrian while walking, and the step length data represents the distance the pedestrian has moved forward. Relying only on the sensor data, the terminal device can only determine the movement route of the pedestrian. In order to determine the actual position of the pedestrian, the terminal device needs to combine the movement route with the actual position information, that is, it needs to be fused with the initial position data for positioning.

[0070] Optionally, the initial position data and the target sensor data are fused in any of the following ways: loose coupling, tight coupling, and deep coupling.

[0071] In a possible implementation, Figure 3As shown, the terminal device can perform fusion positioning in a loosely coupled manner. In the fusion positioning process, the terminal device first performs pedestrian dead reckoning based on the IMU data to obtain PDR data 301. The PDR data 301 is usually represented by the geocentric inertial coordinate system (Inertial Frame). Correspondingly, the initial position data 302 is usually represented by latitude, longitude, and altitude. In the fusion positioning process, the terminal device synchronizes the PDR data 301 with the attitude data represented by the northeast sky coordinate system, and performs coordinate system transformation calculation on the GNSS data 302 to obtain the position data represented by the northeast sky coordinate system, and then subtracts the navigation data in the PDR data 301 from the navigation data in the GNSS data 302 to obtain the residual 303, and the residual 303 and the two-way data are sent to the Kalman filter 304 for correction, and the correction amount 305 is returned to the PDR data to obtain the fusion positioning result. It should be noted that this schematic diagram only represents the calculation process when the terminal device adopts a loosely coupled fusion calculation method. In the related technology, the terminal device can adopt other algorithms that fuse GNSS data and PDR data. To summarize, based on the communication connection, the terminal device obtains the first sensor data output by itself, and obtains the second sensor data output by the auxiliary positioning device, and then the terminal device determines the motion states of the terminal device and the auxiliary positioning device based on the first sensor data and the second sensor data, respectively, and then based on the motion state satisfying the positioning condition, the terminal device determines the target device for fusion positioning. Through the embodiments of the present application, the terminal device utilizes the auxiliary positioning device to enrich the source of sensor data without increasing the hardware cost, and the terminal device determines the target device whose motion state satisfies the positioning condition through motion recognition, thereby improving the accuracy of the positioning data and thereby improving the accuracy of the positioning result.

[0072] In the pedestrian navigation scenario, based on the walking posture of pedestrians and the uncertainty of the device wearing position, there is a random deviation between the motion state of the terminal device and the auxiliary positioning device worn by the positioning object and the motion state of the positioning object. In the embodiment of the present application, based on the first sensor data and the second sensor data, the terminal device determines the motion state of the terminal device and the auxiliary positioning device through motion recognition analysis, and then the terminal device determines the target device, wherein the motion state of the target device is closer to the walking state of the positioning object, that is, the sensor data output by the target device can more accurately characterize the motion state of the positioning object. Regarding the method of determining the target device and obtaining the fused positioning result based on the target sensor data, based on the different motion states of the terminal device and the auxiliary positioning device, it can be any of the following methods:

[0073] 1. When the motion state of the terminal device is a first motion state and the motion state of the auxiliary positioning device is a second motion state, at least one of the terminal device and the auxiliary positioning device is determined as a target device.

[0074] Among them, in the first motion state, the heading of the terminal device is consistent with the heading of the positioning object; in the second motion state, the heading of the auxiliary positioning device is consistent with the heading of the positioning object.

[0075] In a possible implementation, when the change value of the heading angle data is within the allowable error, the heading angle can be considered to be consistent with the heading angle of the positioning object. From the above embodiments, it can be seen that the terminal device can set multiple motion states based on characteristic sensor data. For the first sensor data, the terminal device can determine that the motion state indicating that the sensor heading angle data changes little within a certain period of time is the first motion state, such as the walking state. Correspondingly, for the second sensor data, the terminal device can determine that the motion state indicating that the sensor heading angle data changes little within a certain period of time is the second motion state.

[0076] Based on different target devices, the terminal device can use any of the following methods to perform fusion positioning based on sensor data and initial location data:

[0077] (1) When the terminal device is determined to be the target device, the terminal device performs fusion positioning based on the first sensor data and the initial position data, such as Figure 4 As shown, the method may include the following steps:

[0078] Step 411: determine first heading data based on first sensor data.

[0079] In a possible implementation, the terminal device can calculate the first heading data based on the IMU data in the first sensor data. The inertial sensor data contains a three-axis acceleration signal and a three-axis angular velocity signal. The terminal device can obtain the pedestrian's heading angle data and step length data, that is, the first heading data, through pedestrian dead reckoning based on the above acceleration signal and angular velocity signal. Based on the inertial sensor data, the terminal device can calculate the heading data based on the following formula:

[0080]

[0081]

[0082] Among them, (E0, N0) is the initial position of the IMU carrier, (E k , N k ) is the current position of the IMU carrier, d is the step data, θ is the heading angle data, and n is a positive integer.

[0083] Step 412: Perform fusion positioning based on the first heading data and the initial position data of the terminal device.

[0084] The initial location data of the terminal device.

[0085] The method of fusion positioning is the same as step 204 in the above embodiment, and will not be repeated here.

[0086] (2) When the auxiliary positioning device is determined to be the target device, the terminal device performs fusion positioning based on the second sensor data and the initial position data, such as Figure 4 As shown, the method may include the following steps:

[0087] Step 421, determining second heading data based on second sensor data.

[0088] In a possible implementation, the terminal device can obtain the three-axis acceleration signal and the three-axis angular velocity signal of the auxiliary positioning device in the geocentric inertial coordinate system based on the IMU in the second sensor data, and then the terminal device performs pedestrian dead reckoning according to the above data to obtain the heading angle data and step length data of the auxiliary positioning device, that is, obtain the second heading data.

[0089] Step 422: Perform fusion positioning based on the second heading data and the initial position data of the terminal device.

[0090] The method of fusion positioning is the same as step 204 in the above embodiment, and will not be repeated here.

[0091] (3) When it is determined that the terminal device and the auxiliary positioning device are both target devices, the terminal device performs fusion positioning according to the first sensor data, the second sensor data and the initial position data, such as Figure 4 As shown, the method may include the following steps:

[0092] Step 431 : determining first heading data based on the first sensor data, and determining second heading data based on the second sensor data.

[0093] This step is the same as step 411 and step 421 and will not be repeated here.

[0094] Step 432: fusing the first heading data and the second heading data to obtain target heading data.

[0095] In an embodiment of the present application, the terminal device and the auxiliary positioning device are both target devices that meet the positioning conditions, that is, the first heading data and the second heading data can accurately characterize the motion state of the positioning object. In a possible implementation, the terminal device can take the average of the first heading data and the second heading data to obtain the target heading data.

[0096] Step 433, performing fusion positioning based on the target heading data and the initial position data of the terminal device.

[0097] The method of fusion positioning is the same as step 204 in the above embodiment, and will not be repeated here.

[0098] Optionally, the terminal device may directly perform fusion positioning calculation on the first heading data and the second heading data with the initial position data.

[0099] 2. When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the second motion state, at least one of the terminal device and the auxiliary positioning device is determined as the target device.

[0100] Among them, in the third motion state, the heading of the terminal device is stable and different from the heading of the positioning object; similar to the above, in the second motion state, the heading of the auxiliary positioning device is consistent with the heading of the positioning object.

[0101] In one possible implementation, the heading angle data in the IMU data changes regularly within a certain range, and due to the change in the heading angle, the above heading angle data is different from the heading angle of the positioning object. From the above embodiments, it can be seen that the terminal device can set multiple motion states based on characteristic sensor data. For the first sensor data, the terminal device can determine that the motion state indicating the regular change of the sensor heading angle data is the third motion state, such as the swing arm state.

[0102] Based on different target devices, the terminal device can use any of the following methods to perform fusion positioning based on sensor data and initial location data:

[0103] (1) When the auxiliary positioning device is determined to be the target device, the terminal device performs fusion positioning based on the second sensor data and the initial position data, such as Figure 5 As shown, the method may include the following steps:

[0104] Step 511, determining second heading data based on second sensor data.

[0105] This step is the same as step 421 and will not be repeated here.

[0106] Step 512: Perform fusion positioning based on the second heading data and the initial position data of the terminal device.

[0107] This step is the same as step 422 and will not be repeated here.

[0108] (2) When the terminal device is determined to be the target device, the terminal device performs fusion positioning based on the first sensor data and the initial position data, such as Figure 5 As shown, the method may include the following steps:

[0109] Step 521, determining first heading data based on first sensor data.

[0110] This step is the same as step 411 and will not be repeated here.

[0111] Step 522: Correct the first heading data based on the heading deviation angle to obtain corrected first heading data. The heading deviation angle is used to characterize the heading deviation between the terminal device and the positioning object in the third motion state.

[0112] When the auxiliary positioning device is in the second motion state, the second heading data can more accurately characterize the motion state of the positioning object, such as the heading and step length; and when the terminal device is in the first motion state, there is a regular deviation between the first heading data and the motion state of the positioning object. At this time, the terminal device can obtain the heading deviation angle by subtracting the mean of the first heading data based on the second heading data. Based on the heading deviation angle, the terminal corrects the heading angle of the first heading data.

[0113] Step 523, performing fusion positioning based on the corrected first heading data and the initial position data of the terminal device.

[0114] The method of fusion positioning is the same as step 204 in the above embodiment, and will not be repeated here.

[0115] (3) When it is determined that the terminal device and the auxiliary positioning device are both target devices, the terminal device performs fusion positioning according to the first sensor data, the second sensor data and the initial position data, such as Figure 5 As shown, the method may include the following steps:

[0116] Step 531 : determining first heading data based on the first sensor data, and determining second heading data based on the second sensor data.

[0117] This step is the same as step 411 and step 421 and will not be described in detail here.

[0118] Step 532: correct the first heading data based on the heading deviation angle to obtain corrected first heading data.

[0119] This step is the same as step 522 and will not be described again here.

[0120] Step 533: Perform fusion positioning based on the corrected first heading data, the second heading data, and the initial position data of the terminal device.

[0121] The method of fusion positioning is the same as step 204 in the above embodiment, and will not be repeated here.

[0122] It should be noted that in the embodiment of the present application, the auxiliary positioning device is in the second motion state, that is, the second heading data can accurately characterize the motion state of the positioning object. When the terminal device performs fusion positioning based on the corrected first heading data, the second heading data and the initial position data of the terminal device, the corrected first heading data is a redundant data.

[0123] 3. When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the fourth motion state, the terminal device is determined as the target device.

[0124] Among them, similar to the above, in the third motion state, the heading of the terminal device is stable and different from the heading of the positioning object; in the fourth motion state, the heading of the auxiliary positioning device is different from the heading of the positioning object.

[0125] Among them, the fourth motion state can be a shaking state, etc. In this motion state, the heading angle data of the auxiliary positioning device is different from the actual heading angle of the positioning object when walking. Therefore, the second sensor data output by the auxiliary positioning device cannot accurately represent the walking state of the positioning object. If it participates in the fusion positioning calculation, it will affect the accuracy of the fusion positioning result. And when the terminal device is in the third motion state, the terminal device can correct the first heading data to obtain heading data close to the walking state data of the positioning object. Therefore, determining that the terminal device is the target device can improve the positioning accuracy.

[0126] In the above case, based on determining that the terminal device is the target device, the terminal device performs fusion positioning according to the first sensor data and the initial position data, such as Figure 6 As shown, the fusion positioning method may include the following steps:

[0127] Step 601: determine first heading data based on first sensor data.

[0128] This step is the same as step 401 and will not be described again here.

[0129] Step 602: Correct the first heading data based on the heading deviation angle to obtain corrected first heading data. The heading deviation angle is used to characterize the heading deviation between the terminal device and the positioning object in the third motion state.

[0130] When the terminal device is in the third motion state, there is a regular deviation between the first sensor data output by the terminal device and the walking state of the positioning object.

[0131] In an illustrative example, the auxiliary positioning device is a smart headset, and the pedestrian holds the terminal device and is in a swinging state. When the pedestrian is in a normal swinging walking state, the terminal device determines that the terminal device is in a third motion state and the auxiliary positioning device is in a second motion state, and then calculates the heading deviation angle based on the first sensor data and the second sensor data. Then, when the pedestrian turns his head to chat with his companion, the heading angle data in the second sensor data changes greatly and the change is irregular. The terminal device determines that the current auxiliary positioning device is in a fourth motion state. At this time, since the terminal device calculates the heading deviation angle in the aforementioned process, the first heading data can be corrected, and then the first sensor data has a difference with the second sensor data. Then the terminal device corrects the first heading data according to the aforementioned heading deviation angle to obtain the corrected first heading data.

[0132] Step 603: Perform fusion positioning based on the corrected first heading data and the initial position data of the terminal device.

[0133] This step is the same as step 523 and will not be repeated here.

[0134] 4. When the motion state of the terminal device is the fifth motion state and the motion state of the auxiliary positioning device is the second motion state, the auxiliary positioning device is determined as the target device.

[0135] Among them, the heading of the terminal device in the fifth motion state is unstable and different from the heading of the positioning object; similar to the above, the heading of the auxiliary positioning device in the second motion state is consistent with the heading of the positioning object.

[0136] In one possible implementation, the heading angle data in the IMU data output by the terminal device has irregular changes. At this time, the heading angle data is different from the heading angle of the positioning object. It can be seen from the above embodiments that the terminal device can set multiple motion states based on the characteristic sensor data. For the first sensor data, the terminal device can determine that the motion state indicating the irregular changes in the sensor heading angle data is the fifth motion state, such as a random state.

[0137] In the above case, there is an irregular random deviation between the motion state of the terminal device and the motion state of the positioning object. Therefore, the first sensor data has no auxiliary significance for the positioning process of pedestrian walking navigation. The terminal device determines that the auxiliary positioning device is the target device, and performs fusion positioning based on the second sensor data and the initial position data. Figure 7 As shown, the fusion positioning method may include the following steps:

[0138] Step 701: Determine second heading data based on second sensor data.

[0139] This step is the same as step 421 and will not be repeated here.

[0140] Step 702: Perform fusion positioning based on the second heading data and the initial position data of the terminal device.

[0141] This step is the same as step 422 and will not be repeated here.

[0142] In summary, based on the motion state of the terminal device and the auxiliary positioning device, the terminal device determines the target device, and calculates the pedestrian dead reckoning data according to the target sensor data corresponding to the target device, and then fuses the data with the initial position data to improve the accuracy of positioning.

[0143] Please refer to Figure 8 , which shows a flowchart of a positioning method provided by an exemplary embodiment of the present application. The present application embodiment uses this method for Figure 1 Taking the terminal device shown as an example, the method may include the following steps.

[0144] Step 801, when the positioning function is turned on and the first sensor data identifies that the terminal device is in walking mode, proceed to step 802.

[0145] When the positioning function is turned on, the terminal device obtains the first sensor data based on its own onboard sensor, and then the terminal device identifies the motion state of the first sensor data. When the terminal device is in a walking state, the terminal device determines that the current positioning object is in a walking state, that is, it is currently in a pedestrian walking navigation scene. In order to improve the accuracy of pedestrian walking navigation, the terminal device can obtain sensor data from auxiliary positioning devices to enrich the source of sensor data.

[0146] Step 802: Acquire the device status of the auxiliary positioning device, where the device status includes a wearing state and a non-wearing state.

[0147] In a possible implementation, based on the terminal device being in a walking state, the terminal device sends a device status request to the auxiliary positioning device, thereby obtaining the device status of the auxiliary positioning device. When the auxiliary positioning device is in a worn state, the motion state and the positioning object can be determined. Thus, by obtaining the device status of the auxiliary positioning device, the terminal device can determine whether to obtain the sensor data of the device.

[0148] Step 803: When the auxiliary positioning device is in a worn state, a data reporting instruction is sent to the auxiliary positioning device.

[0149] When the auxiliary positioning device is in the wearing state, the auxiliary positioning device is located at a fixed position on the body of the positioning object, and the motion state of the device is consistent with the motion state of the above-mentioned body position of the positioning object. At this time, the sensor data output by the device can represent the motion posture of the positioning object. For example, the auxiliary positioning device is a smart headset. When the headset is in the ear, the current headset position is fixed, so the sensor in the headset can obtain the posture information that accurately reflects the user's heading and step length.

[0150] Optionally, the terminal device may directly send a data reporting instruction to the auxiliary positioning device according to the current walking state, and according to the received data reporting instruction, the auxiliary positioning device responds to the data reporting instruction when it is in the wearing state.

[0151] Step 804, obtaining first sensor data of the terminal device and second sensor data of the auxiliary positioning device, wherein a data communication connection is established between the auxiliary positioning device and the terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object.

[0152] Optionally, the auxiliary positioning device may also first calculate heading data through a processor based on the sensor data, and then transmit the obtained heading data to the terminal device.

[0153] Step 805: time-align the first sensor data and the second sensor data.

[0154] After acquiring the first sensor data and the second sensor data, the terminal device determines the first sensor data and the second sensor data at the same time by aligning the two sensor data in time.

[0155] Step 806: Based on the first sensor data and the second sensor data, the motion states of the terminal device and the auxiliary positioning device are respectively identified.

[0156] This step is the same as step 202 and will not be described again here.

[0157] Step 807: When the motion state of the terminal device is the fifth motion state and the motion state of the auxiliary positioning device is the second motion state, determine the auxiliary positioning device as the target device.

[0158] Step 808 , determining second heading data based on the second sensor data.

[0159] This step is the same as step 421 and will not be repeated here.

[0160] Step 809: Perform fusion positioning based on the second heading data and the initial position data of the terminal device.

[0161] This step is the same as step 422 and will not be repeated here.

[0162] Step 810: When the positioning function is turned off and / or it is identified based on the first sensor data that the user is not in walking mode, a data stop instruction is sent to the auxiliary positioning device so that the auxiliary positioning device stops sending the second sensor data.

[0163] When the positioning function is turned off, or when the terminal device determines based on the first sensor data that it is not currently in a walking state, the terminal device determines that pedestrian walking navigation is not currently required, and thus, it can stop acquiring sensor data. At this time, the terminal device can send a data stop instruction to the auxiliary positioning device to stop acquiring the second sensor data.

[0164] Please refer to Fig. 9 , which shows a structural block diagram of a positioning device provided by an exemplary embodiment of the present application, the device is used in a terminal device, and the device includes:

[0165] An acquisition module 901 is used to acquire first sensor data of a terminal device and second sensor data of an auxiliary positioning device, wherein a data communication connection is established between the auxiliary positioning device and the terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object;

[0166] An identification module 902, configured to identify the motion states of the terminal device and the auxiliary positioning device based on the first sensor data and the second sensor data;

[0167] A determination module 903, configured to determine a target device that meets the positioning requirement from among the terminal device and the auxiliary positioning device based on the motion states of the terminal device and the auxiliary positioning device;

[0168] The fusion positioning module 904 is used to perform fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device.

[0169] Optionally, the determining module 903 is used to:

[0170] When the motion state of the terminal device is a first motion state and the motion state of the auxiliary positioning device is a second motion state, determining at least one of the terminal device and the auxiliary positioning device as the target device;

[0171] When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the second motion state, determining at least one of the terminal device and the auxiliary positioning device as the target device;

[0172] When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the fourth motion state, determining the terminal device as the target device;

[0173] When the motion state of the terminal device is the fifth motion state and the motion state of the auxiliary positioning device is the second motion state, determining the auxiliary positioning device as the target device;

[0174] Among them, in the first motion state, the heading of the terminal device is consistent with the heading of the positioning object; in the second motion state, the heading of the auxiliary positioning device is consistent with the heading of the positioning object; in the third motion state, the heading of the terminal device is stable and different from the heading of the positioning object; in the fourth motion state, the heading of the auxiliary positioning device is different from the heading of the positioning object; in the fifth motion state, the heading of the terminal device is unstable and different from the heading of the positioning object.

[0175] Optionally, when the motion state of the terminal device is the first motion state, and the motion state of the auxiliary positioning device is the second motion state, the fusion positioning module 904 is configured to:

[0176] Determine first heading data based on the first sensor data; perform fusion positioning based on the first heading data and the initial position data of the terminal device; or,

[0177] Determine second heading data based on the second sensor data; perform fusion positioning based on the second heading data and the initial position data of the terminal device; or,

[0178] Determine first heading data based on the first sensor data, and determine second heading data based on the second sensor data; perform data fusion on the first heading data and the second heading data to obtain target heading data; and perform fusion positioning based on the target heading data and the initial position data of the terminal device.

[0179] Optionally, when the motion state of the terminal device is the third motion state, and the motion state of the auxiliary positioning device is the second motion state, the fusion positioning module 904 is configured to:

[0180] Determine second heading data based on the second sensor data; perform fusion positioning based on the second heading data and the initial position data of the terminal device; or,

[0181] Determine first heading data based on the first sensor data; correct the first heading data based on the heading deviation angle to obtain corrected first heading data, wherein the heading deviation angle is used to characterize the heading deviation between the terminal device and the positioning object in the third motion state; perform fusion positioning based on the corrected first heading data and the initial position data of the terminal device; or,

[0182] Determine first heading data based on the first sensor data, and determine second heading data based on the second sensor data; correct the first heading data based on the heading deviation angle to obtain corrected first heading data; and perform fusion positioning based on the corrected first heading data, the second heading data and the initial position data of the terminal device.

[0183] Optionally, when the motion state of the terminal device is the third motion state, and the motion state of the auxiliary positioning device is the fourth motion state, the fusion positioning module 904 is configured to:

[0184] determining first heading data based on the first sensor data;

[0185] Correcting the first heading data based on a heading deviation angle to obtain corrected first heading data, wherein the heading deviation angle is used to characterize a heading deviation between the terminal device and the positioning object in the third motion state;

[0186] Fused positioning is performed based on the corrected first heading data and the initial position data of the terminal device.

[0187] Optionally, the fusion positioning module 904 is further used for:

[0188] When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the second motion state, determining the first heading data based on the first sensor data, and determining the second heading data based on the second sensor data;

[0189] The first heading data is corrected based on the second heading data to obtain the heading deviation angle.

[0190] Optionally, when the motion state of the terminal device is the fifth motion state, and the motion state of the auxiliary positioning device is the second motion state, the fusion positioning module 904 is configured to:

[0191] determining second heading data based on the second sensor data;

[0192] Fused positioning is performed based on the second heading data and the initial position data of the terminal device.

[0193] Optionally, the acquisition module 901 is used to:

[0194] When the positioning function is turned on and the walking mode is identified based on the first sensor data, a data reporting instruction is sent to the auxiliary positioning device so that the auxiliary positioning device sends the second sensor data to the terminal device;

[0195] Acquire the device state of the auxiliary positioning device, where the device state includes a wearing state and a non-wearing state;

[0196] When the auxiliary positioning device is in the wearing state, the data reporting instruction is sent to the auxiliary positioning device.

[0197] Optionally, the acquisition module 901 is used to:

[0198] When the positioning function is turned off and / or, based on the first sensor data, it is identified that the user is not in the walking mode, a data stop instruction is sent to the auxiliary positioning device so that the auxiliary positioning device stops sending the second sensor data.

[0199] Optionally, the fusion positioning module 904 is used to:

[0200] The first sensor data and the second sensor data are time-aligned.

[0201] To summarize, in the embodiment of the present application, the terminal device acquires the first sensor data and the second sensor data through the acquisition module, and then performs motion recognition on the two data through the identification module. Based on the motion recognition result, the determination module determines the target device that meets the positioning requirements in the terminal device and the auxiliary positioning device, and fuses the target sensor data output by the target device with the initial position data through the fusion positioning module. In the embodiment of the present application, the terminal device not only acquires the first sensor data output by itself, but also acquires the second sensor data output by the auxiliary positioning device accordingly, enriching the source of sensor data, and, based on the device motion state represented by the sensor data, the terminal device selects the target device that meets the positioning conditions from the two devices, thereby improving the accuracy of the sensor data, and thereby improving the accuracy of the positioning result of the terminal device.

[0202] Please refer to Fig.10 , which shows a structural block diagram of a positioning device provided by an exemplary embodiment of the present application, the device is used to assist the positioning device, and the device includes:

[0203] The communication module 1001 is used to establish a data communication connection with a terminal device, wherein both the auxiliary positioning device and the terminal device are worn by the positioning object;

[0204] The transmission module 1002 is used to transmit the second sensor data to the terminal device through the data communication connection, so that the terminal device can identify the motion state of the terminal device and the auxiliary positioning device based on the first sensor data and the second sensor data respectively, and based on the motion state of the terminal device and the auxiliary positioning device, determine the target device that meets the positioning requirements from the terminal device and the auxiliary positioning device, and perform fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device.

[0205] See also Fig.11 , Fig.11 is a structural block diagram of an electronic device provided by an exemplary embodiment of the present application, such as Fig.11 As shown, the electronic device 1100 includes a processor 1110, a memory 1120, a communication component 1130 and a sensor 1140. The memory 1120 stores at least one instruction, which is loaded and executed by the processor 1110 to implement the positioning method as described in the various method embodiments of the present application.

[0206] In the present application, the electronic device 1100 is an electronic device with a positioning function. The electronic device 1100 obtains the sensor data output by the sensor 1140 and determines its own posture information based on the sensor data. The electronic device 1100 can be implemented as a terminal device or an auxiliary positioning device in the above embodiments.

[0207] The processor 1110 may include one or more processing cores. The processor 1110 uses various interfaces and lines to connect various parts of the entire terminal device 1100, and executes various functions and processes data of the terminal device 1100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1120, and calling data stored in the memory 1120. Optionally, the processor 1110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1110, but may be implemented separately through a chip. Optionally, when the electronic device 1100 is a smart wearable device such as headphones, the processor 1101 may include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, which may be a microcontroller unit (MCU); the coprocessor is a low-power processor for processing data in a standby state.

[0208] The memory 1120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1120 includes a non-transitory computer-readable storage medium. The memory 1120 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 1120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, an instruction sending function, a positioning function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc.

[0209] The communication component 1130 is used to establish a communication connection with other devices through a specified communication protocol, including WiFi, Bluetooth, ZigBee and other communication protocols, and the present application embodiment does not limit the communication protocol. The communication component 1130 of the electronic device 1100 can be used to establish a communication connection with multiple devices at the same time.

[0210] The sensor 1140 is used to measure the motion state of the electronic device 1100, including an acceleration sensor 1141 and a gyroscope sensor 1142 in an inertial measurement unit (IMU). Optionally, the sensor 1140 may also include a magnetic field sensor 1143 in a magnetometer (Mag, Magnetometer), a pressure sensor 1144 in a barometer (Bar, Barometer), etc. It can be understood that the sensor 1140 may also include sensors for realizing other functions, such as optical sensors and fingerprint sensors, which are not limited in the embodiments of the present application.

[0211] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one program, and the at least one program is used to be executed by a processor to implement the positioning method as described in the above embodiment.

[0212] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the positioning method provided in the above embodiment.

[0213] Those skilled in the art should be aware that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented with hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein the communication media include any media that facilitates the transmission of a computer program from one place to another. The storage medium can be any available medium that a general or special-purpose computer can access.

[0214] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A positioning method, characterized in that: The method is used for a terminal device, and the method comprises: Acquire first sensor data of a terminal device and second sensor data of an auxiliary positioning device, wherein a data communication connection is established between the auxiliary positioning device and the terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object; Based on the first sensor data and the second sensor data, respectively, identifying the motion states of the terminal device and the auxiliary positioning device; When the motion state of the terminal device is a first motion state and the motion state of the auxiliary positioning device is a second motion state, determining at least one of the terminal device and the auxiliary positioning device as a target device; When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the second motion state, determining at least one of the terminal device and the auxiliary positioning device as a target device; When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the fourth motion state, determining the terminal device as a target device; When the motion state of the terminal device is the fifth motion state and the motion state of the auxiliary positioning device is the second motion state, determining the auxiliary positioning device as a target device; Performing fusion positioning based on target sensor data of the target device and initial position data of the terminal device; Among them, in the first motion state, the heading of the terminal device is consistent with the heading of the positioning object; in the second motion state, the heading of the auxiliary positioning device is consistent with the heading of the positioning object; in the third motion state, the heading of the terminal device is stable and different from the heading of the positioning object; in the fourth motion state, the heading of the auxiliary positioning device is different from the heading of the positioning object; in the fifth motion state, the heading of the terminal device is unstable and different from the heading of the positioning object.

2. The method according to claim 1, characterized in that When the motion state of the terminal device is the first motion state, and the motion state of the auxiliary positioning device is the second motion state; The performing fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device includes: Determine first heading data based on the first sensor data; perform fusion positioning based on the first heading data and the initial position data of the terminal device; or, Determine second heading data based on the second sensor data; perform fusion positioning based on the second heading data and the initial position data of the terminal device; or, Determine first heading data based on the first sensor data, and determine second heading data based on the second sensor data; perform data fusion on the first heading data and the second heading data to obtain target heading data; and perform fusion positioning based on the target heading data and the initial position data of the terminal device.

3. The method according to claim 1, characterized in that When the motion state of the terminal device is the third motion state, and the motion state of the auxiliary positioning device is the second motion state; The performing fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device includes: Determine second heading data based on the second sensor data; perform fusion positioning based on the second heading data and the initial position data of the terminal device; or, Determine first heading data based on the first sensor data; correct the first heading data based on the heading deviation angle to obtain corrected first heading data, wherein the heading deviation angle is used to characterize the heading deviation between the terminal device and the positioning object in the third motion state; perform fusion positioning based on the corrected first heading data and the initial position data of the terminal device; or, Determine first heading data based on the first sensor data, and determine second heading data based on the second sensor data; correct the first heading data based on a heading deviation angle to obtain corrected first heading data, wherein the heading deviation angle is used to characterize the heading deviation between the terminal device and the positioning object in the third motion state; perform fusion positioning based on the corrected first heading data, the second heading data and the initial position data of the terminal device.

4. The method according to claim 1, characterized in that When the motion state of the terminal device is the third motion state, and the motion state of the auxiliary positioning device is the fourth motion state; The performing fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device includes: determining first heading data based on the first sensor data; Correcting the first heading data based on a heading deviation angle to obtain corrected first heading data, wherein the heading deviation angle is used to characterize a heading deviation between the terminal device and the positioning object in the third motion state; Fusion positioning is performed based on the corrected first heading data and the initial position data of the terminal device.

5. The method according to claim 3 or 4, characterized in that: The method further comprises: When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the second motion state, determining the first heading data based on the first sensor data, and determining the second heading data based on the second sensor data; The first heading data is corrected based on the second heading data to obtain the heading deviation angle.

6. The method according to claim 1, characterized in that When the motion state of the terminal device is the fifth motion state, and the motion state of the auxiliary positioning device is the second motion state; The performing fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device includes: determining second heading data based on the second sensor data; Fused positioning is performed based on the second heading data and the initial position data of the terminal device.

7. The method according to claim 1, characterized in that The method further comprises: When the positioning function is turned on and the walking mode is identified based on the first sensor data, a data reporting instruction is sent to the auxiliary positioning device so that the auxiliary positioning device sends the second sensor data to the terminal device.

8. The method according to claim 7, characterized in that The sending of a data reporting instruction to the auxiliary positioning device includes: Acquire the device state of the auxiliary positioning device, where the device state includes a wearing state and a non-wearing state; When the auxiliary positioning device is in the wearing state, the data reporting instruction is sent to the auxiliary positioning device.

9. The method according to claim 7, characterized in that: The method further comprises: When the positioning function is turned off and / or, based on the first sensor data, it is identified that the user is not in the walking mode, a data stop instruction is sent to the auxiliary positioning device so that the auxiliary positioning device stops sending the second sensor data.

10. The method according to claim 1, characterized in that The method further comprises: The first sensor data and the second sensor data are time-aligned.

11. A positioning method, characterized in that: The method is used to assist in positioning a device, and the method comprises: Establishing a data communication connection with a terminal device, wherein both the auxiliary positioning device and the terminal device are worn by the positioning object; Transmitting the second sensor data to the terminal device through the data communication connection, so that the terminal device recognizes the motion states of the terminal device and the auxiliary positioning device based on the first sensor data and the second sensor data, and determines a target device that meets the positioning requirements from the terminal device and the auxiliary positioning device based on the motion states of the terminal device and the auxiliary positioning device, and performs fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device; Wherein, when the motion state of the terminal device is the first motion state, and the motion state of the auxiliary positioning device is the second motion state, the target device is at least one of the terminal device and the auxiliary positioning device; When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the second motion state, the target device is at least one of the terminal device and the auxiliary positioning device; When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the fourth motion state, the target device is the terminal device; When the motion state of the terminal device is the fifth motion state and the motion state of the auxiliary positioning device is the second motion state, the target device is the auxiliary positioning device; In the first motion state, the heading of the terminal device is consistent with the heading of the positioning object; in the second motion state, the heading of the auxiliary positioning device is consistent with the heading of the positioning object; in the third motion state, the heading of the terminal device is stable and different from the heading of the positioning object; in the fourth motion state, the heading of the auxiliary positioning device is different from the heading of the positioning object; in the fifth motion state, the heading of the terminal device is unstable and different from the heading of the positioning object.

12. A positioning device, characterized in that: The device is used for a terminal device, and the device comprises: an acquisition module, configured to acquire first sensor data of a terminal device and second sensor data of an auxiliary positioning device, wherein a data communication connection is established between the auxiliary positioning device and the terminal device, and both the auxiliary positioning device and the terminal device are worn by the positioning object; an identification module, configured to identify the motion states of the terminal device and the auxiliary positioning device respectively based on the first sensor data and the second sensor data; a determination module, configured to determine at least one of the terminal device and the auxiliary positioning device as a target device when the motion state of the terminal device is a first motion state and the motion state of the auxiliary positioning device is a second motion state; When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the second motion state, determining at least one of the terminal device and the auxiliary positioning device as a target device; When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the fourth motion state, determining the terminal device as a target device; When the motion state of the terminal device is the fifth motion state and the motion state of the auxiliary positioning device is the second motion state, determining the auxiliary positioning device as a target device; A fusion positioning module, used for performing fusion positioning based on target sensor data of the target device and initial position data of the terminal device; Among them, in the first motion state, the heading of the terminal device is consistent with the heading of the positioning object; in the second motion state, the heading of the auxiliary positioning device is consistent with the heading of the positioning object; in the third motion state, the heading of the terminal device is stable and different from the heading of the positioning object; in the fourth motion state, the heading of the auxiliary positioning device is different from the heading of the positioning object; in the fifth motion state, the heading of the terminal device is unstable and different from the heading of the positioning object.

13. A positioning device, characterized in that: The device is used for assisting positioning equipment, and the device comprises: A communication module, used to establish a data communication connection with a terminal device, wherein both the auxiliary positioning device and the terminal device are worn by the positioning object; a transmission module, configured to transmit the second sensor data to the terminal device through the data communication connection, so that the terminal device identifies the motion states of the terminal device and the auxiliary positioning device based on the first sensor data and the second sensor data, and determines a target device that meets the positioning requirements from the terminal device and the auxiliary positioning device based on the motion states of the terminal device and the auxiliary positioning device, and performs fusion positioning based on the target sensor data of the target device and the initial position data of the terminal device; Wherein, when the motion state of the terminal device is the first motion state, and the motion state of the auxiliary positioning device is the second motion state, the target device is at least one of the terminal device and the auxiliary positioning device; When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the second motion state, the target device is at least one of the terminal device and the auxiliary positioning device; When the motion state of the terminal device is the third motion state and the motion state of the auxiliary positioning device is the fourth motion state, the target device is the terminal device; When the motion state of the terminal device is the fifth motion state and the motion state of the auxiliary positioning device is the second motion state, the target device is the auxiliary positioning device; In the first motion state, the heading of the terminal device is consistent with the heading of the positioning object; in the second motion state, the heading of the auxiliary positioning device is consistent with the heading of the positioning object; in the third motion state, the heading of the terminal device is stable and different from the heading of the positioning object; in the fourth motion state, the heading of the auxiliary positioning device is different from the heading of the positioning object; in the fifth motion state, the heading of the terminal device is unstable and different from the heading of the positioning object.

14. An electronic device, characterized in that: The electronic device includes a processor and a memory, wherein the memory stores at least one program, and the at least one program is loaded and executed by the processor to implement the positioning method according to any one of claims 1 to 10, or to implement the positioning method according to claim 11.

15. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program, and the at least one program is loaded and executed by a processor to implement the positioning method according to any one of claims 1 to 10, or to implement the positioning method according to claim 11.

16. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the positioning method as described in any one of claims 1 to 10, or implements the positioning method as described in claim 11.

Citation Information

Patent Citations

  • Techniques for determining movements based on sensor measurements from a plurality of mobile devices co-located with a person

    CN106662449A