Indoor positioning method, electronic equipment and storage medium

Through ultra-wideband UWB wireless communication and inertial sensor technology, combined with polar coordinate system calculation, the accuracy problem of existing indoor positioning technology in long distances and occlusion situations is solved, and the precise positioning of the positioning equipment is realized, the positioning steps are simplified and the improvement of the improvement of the positioning steps is improved. Positioning speed and accuracy.

CN119012341APending Publication Date: 2024-11-22HONOR DEVICE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310590478.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-18
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The existing indoor positioning technology has poor positioning accuracy under long distances and occlusions, especially the Bluetooth positioning technology has weak anti-interference ability, making it difficult to achieve accurate object positioning.

Method used

Ultra-wideband UWB wireless communication combined with inertial sensor technology is used to gradually determine the position of the device to be positioned to improve positioning accuracy and speed through calculation of the movement parameters and polar coordinate system of the positioning device.

Benefits of technology

When the user carries the positioning device and moves it twice, accurate positioning of the positioning device is achieved, simplifies the positioning steps, shortens the time to find the positioning device, and improves positioning accuracy and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119012341A_ABST
    Figure CN119012341A_ABST
Patent Text Reader

Abstract

The invention provides an indoor positioning method, electronic equipment and a storage medium, and relates to the technical field of communication. The method comprises the following steps: acquiring an initial relative distance between positioning equipment and to-be-positioned equipment; recording a first displacement parameter when the positioning equipment moves to the first position and a first relative distance between the positioning equipment and the to-be-positioned equipment; determining a first polar coordinate of the to-be-positioned device relative to the positioning device according to the initial relative distance, the first displacement parameter and the first relative distance; recording a second displacement parameter when the positioning equipment moves to a second position and a second relative distance between the positioning equipment and the to-be-positioned equipment; determining a second polar coordinate of the to-be-positioned device according to the second displacement parameter and the first polar coordinate; and determining a target position of the to-be-positioned device relative to the positioning device according to the second relative distance and the second polar coordinate. According to the embodiment of the invention, the precision and speed of searching the to-be-positioned device can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to an indoor positioning method, electronic equipment and storage medium. Background Art

[0002] Indoor positioning technology has been increasingly used in many industries in the past few years and plays an increasingly important role in our daily lives. In the past three decades, the global satellite navigation system represented by the Global Positioning System (GPS) has reshaped human life and has become an important technological milestone in modern society. However, GPS cannot provide reliable location data under indoor conditions. Therefore, indoor positioning technology is becoming a hot area for academic research and industry applications.

[0003] At present, the most commonly used indoor positioning technology is based on Bluetooth signal positioning. Bluetooth positioning technology estimates the distance between the device to be positioned and the positioning device through the received signal strength (RSS), and then calculates the position of the target. However, RSS is affected by multipath, occlusion, etc. at long distances, and its positioning accuracy is relatively poor. Therefore, how to improve the positioning accuracy of indoor positioning technology is an urgent problem to be solved. Summary of the invention

[0004] In view of the above, it is necessary to provide an indoor positioning method, an electronic device and a storage medium, which can quickly and accurately find a device to be positioned.

[0005] In a first aspect, the present application provides an indoor positioning method, which is applied to a positioning device, and the method includes: obtaining an initial relative distance between the positioning device and a device to be positioned; recording a first displacement parameter when the positioning device moves to a first position; obtaining a first relative distance between the positioning device at the first position and the device to be positioned; determining a first polar coordinate of the device to be positioned relative to the positioning device in a polar coordinate system based on the initial relative distance, the first displacement parameter and the first relative distance; recording a second displacement parameter when the positioning device moves to a second position; obtaining a second relative distance between the positioning device at the second position and the device to be positioned; determining a second polar coordinate of the device to be positioned relative to the positioning device in the polar coordinate system based on the second displacement parameter and the first polar coordinate; and determining a target position of the device to be positioned relative to the positioning device based on the second relative distance and the second polar coordinate.

[0006] By adopting the indoor positioning method provided by the present application, when the positioning device moves to the second position, the target position of the device to be positioned relative to the positioning device can be determined, so that the device to be positioned can be accurately positioned when the user moves the positioning device twice, thereby simplifying the positioning steps; and by determining the polar coordinates of the device to be positioned relative to the positioning device in a polar coordinate system, the distance and direction of the device to be positioned relative to the positioning device can be obtained, thereby shortening the time for finding the device to be positioned.

[0007] In a possible implementation, the first displacement parameter includes a first displacement distance and a first displacement direction, and the second displacement parameter includes a second displacement distance and a second displacement direction. Through the above technical solution, the distance and direction of the device to be located compared to the positioning device can be determined by the displacement parameters of the positioning device, which is convenient for shortening the time of finding the device to be located.

[0008] In a possible implementation, the first polar coordinate is (ρ 1 ,θ 1 ), ρ 1 represents the first distance between the device to be positioned and the positioning device after the positioning device moves to the first position, θ 1 represents the first angle of the device to be positioned relative to the positioning device after the positioning device moves to the first position, where ρ 1 and θ 1 Calculated according to the following formula:

[0009]

[0010] Among them, R 1 is the first relative distance, R 0 is the initial relative distance, l 1 is the first displacement distance, β 1 is the direction angle corresponding to the first displacement direction. Through the above technical solution, after the positioning device moves to the first position, two fuzzy positions of the device to be positioned compared to the positioning device can be determined according to the first polar coordinates, thereby narrowing the range of searching for the device to be positioned.

[0011] In a possible implementation, the second polar coordinate is (ρ 2 ,θ 2 ), ρ 2 represents the second distance between the device to be positioned and the positioning device after the positioning device moves to the second position, θ 2 represents the second angle of the device to be positioned compared to the positioning device after the positioning device moves to the second position, where ρ 2 and θ 2 The calculation formula includes:

[0012]

[0013] Among them, l 2 is the second displacement distance, β 2 By means of the above technical solution, after the positioning device moves to the second position, the second distance and the second angle of the device to be positioned compared with the positioning device can be determined according to the second polar coordinates to preliminarily determine the position of the device to be positioned.

[0014] In a possible implementation, the determination of the target position of the device to be located relative to the positioning device according to the second relative distance and the second polar coordinates includes: if the first value in the second distance is less than the second relative distance, determining the target position of the device to be located relative to the positioning device as the coordinates corresponding to the first value; if the second value in the second distance is less than the second relative distance, determining the target position of the device to be located relative to the positioning device as the coordinates corresponding to the second value. Through the above technical solution, after the positioning device moves to the second position, the target position of the device to be located can be determined according to the first value and the second value of the second distance in the second polar coordinates, so as to achieve the effect of accurately positioning the device to be located when the positioning device moves twice.

[0015] In a possible implementation, before obtaining the initial relative distance between the positioning device and the device to be positioned, the method further includes: establishing an ultra-wideband UWB wireless communication connection between the positioning device and the device to be positioned. Through the above technical solution, the positioning device determines the relative distance with the device to be positioned through the UWB indoor positioning technology during the movement, thereby improving the positioning accuracy.

[0016] In a possible implementation, the method further includes: the positioning device receives a message for starting the positioning function, and the message for starting the positioning function is used to trigger the positioning device to locate the device to be located. Through the above technical solution, the positioning function can be executed only after the positioning device receives the message for starting the positioning function, thereby saving system resources.

[0017] In a possible implementation, the method further includes: determining the relative position coordinates of the device to be located relative to the positioning device according to the target position; and updating the coordinates corresponding to the target position according to the relative position coordinates during each movement of the positioning device. Through the above technical solution, the distance and direction between the device to be located and the positioning device can be updated in real time, thereby improving the speed and accuracy of finding the device to be located.

[0018] In a second aspect, the present application provides an electronic device, comprising a memory and a processor; the memory is used to store program instructions; the processor is used to read the program instructions stored in the memory to implement the above-mentioned indoor positioning method.

[0019] In a third aspect, the present application provides a computer-readable storage medium, in which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the above-mentioned indoor positioning method is implemented.

[0020] In addition, the technical effects brought about by the second to third aspects can be found in the descriptions related to the methods of each design in the above method part, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of an application scenario of an indoor positioning method provided in an embodiment of the present application.

[0022] Figure 2 A schematic diagram of the structure of an ultra-wideband (UWB) chip provided in an embodiment of the present application.

[0023] Figure 3 A flowchart of an indoor positioning method provided in an embodiment of the present application.

[0024] Figure 4A A schematic diagram of a positioning startup interface provided in an embodiment of the present application.

[0025] Figure 4B A schematic diagram of a positioning determination interface provided in an embodiment of the present application.

[0026] Figure 4C A schematic diagram of a device selection interface to be located provided in an embodiment of the present application.

[0027] Figure 5 A schematic diagram of coordinates of a positioning device during movement provided in an embodiment of the present application.

[0028] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0029] Figure 7 A software structure block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary", "or", "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary", "or", "for example" is intended to present related concepts in a concrete way.

[0031] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field of the present application. The terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. It should be understood that, unless otherwise specified in the present application, " / " means or. For example, A / B can represent A or B. "And / or" in the present application is only a kind of association relationship describing associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations. It should be understood that the order of the steps shown in the flowchart of this article can be changed, and some can also be omitted.

[0032] The technical solution involved in the embodiments of the present application is mainly applied to indoor positioning scenarios, for example, scenarios where the positioning device is relied on to locate the device to be positioned. For example, using a mobile phone to find a remote control and a wireless headset, using a mobile phone to find other mobile phones, using a mobile phone to find a target vehicle in a parking lot or garage, etc. Specifically, the positioning of indoor objects is achieved through wireless positioning technology to find the device to be positioned.

[0033] At present, the common indoor wireless positioning technologies at home and abroad mainly include infrared positioning technology, ultrasonic positioning technology, Bluetooth positioning technology, Wi-Fi positioning technology, ultra-wideband (Ultra-Wide Band, UWB) positioning technology, radio frequency identification positioning technology, inertial sensor positioning technology, etc.

[0034] Infrared positioning technology mainly relies on laying out multiple infrared sensors indoors in advance, and using the infrared sensors to measure the distance or angle to the infrared tag to calculate the location of the infrared tag. The infrared positioning technology has high positioning accuracy, but the infrared rays emitted by the infrared sensor are easily blocked by obstacles, and the transmission distance of the infrared rays is not long. Therefore, more infrared sensors need to be installed indoors to achieve accurate positioning, which makes the hardware and construction costs of infrared positioning technology high. In addition, infrared rays are easily interfered by heat sources, lights, etc. during transmission, resulting in a decrease in the positioning accuracy and precision of infrared positioning technology.

[0035] Ultrasonic positioning technology is mainly implemented by an ultrasonic positioning system, which includes a main rangefinder and several receivers. The main rangefinder is placed on the target to be measured, and the receiver is fixed in an indoor environment. During positioning, the main rangefinder transmits a signal of the same frequency (i.e., the transmission wave) to the receiver, and the receiver reflects and transmits the signal (i.e., the echo) to the main rangefinder after receiving the signal. The main rangefinder calculates the distance based on the time difference between the echo and the transmission wave, thereby determining the position of the target to be measured. Since the ultrasonic frequency is very high, the energy is large and the penetration ability is strong, and the positioning accuracy of ultrasonic positioning technology is relatively high. However, when ultrasonic waves are transmitted in the air, they will experience a large attenuation, which affects the positioning accuracy, and the equipment cost required for ultrasonic positioning technology is relatively high, so it cannot be universally applied.

[0036] Bluetooth positioning technology calculates the distance and realizes the positioning function by identifying the strength of the Bluetooth signal received by the receiver. Although the power consumption is low, the transmission distance of the Bluetooth signal is too short and the anti-interference ability is relatively weak. Bluetooth positioning technology has the problem of low positioning accuracy.

[0037] Wi-Fi positioning technology can achieve large-scale positioning in indoor environments with multiple obstacles and is convenient for networking. However, it consumes more power and has poor signal anti-interference ability. It will be affected by interference from the same frequency, resulting in very low positioning accuracy.

[0038] UWB positioning technology generally uses a distance-based positioning algorithm. UWB ranging is based on the signal arrival time method (Time Of Arrival, TOA) to achieve, arrival time refers to the time UWB signal transmission between the positioning device and the device to be positioned, by multiplying the transmission time by the propagation speed of the UWB signal, the distance between the positioning device and the device to be positioned can be obtained. The carrier signal of UWB positioning technology in the ranging process has the advantages of high transmission rate, low power consumption, strong anti-interference, and the positioning accuracy can be accurate to the centimeter level.

[0039] The principle of RFID positioning technology is to deploy readers and wireless RFID (Radio Frequency Identification) tags in indoor environments, and realize data communication between readers and tags through radio frequency signals. The principle of RFID positioning is similar to GPS positioning. After receiving signals from multiple readers distributed indoors, RFID tags calculate the signal strength value and then reversely infer their coordinates based on the signal strength value. The advantages of RFID positioning technology are short positioning time and high accuracy, but it has the disadvantage of short range.

[0040] There are two main types of positioning technologies based on inertial sensors: one is the traditional inertial sensor positioning method, and the other is the pedestrian dead reckoning (PDR) method. Both methods use the sensor device carried by the positioning tag to collect motion data and obtain the location information of the positioning tag based on the motion data.

[0041] The current indoor object search technology is mainly based on Bluetooth positioning technology, which can locate objects within ten meters of the user, but cannot accurately locate objects at a longer distance. At the same time, due to the weak anti-interference ability of Bluetooth signals, the accuracy of object search is relatively low. In order to solve the problems existing in the above-mentioned indoor wireless positioning technology, the indoor positioning method provided in the embodiment of the present application can conveniently and accurately obtain the location of the object to be found by combining UWB positioning technology and PDR technology.

[0042] The solution provided in the embodiments of the present application is described in detail below with reference to the accompanying drawings.

[0043] See also Figure 1 , Figure 1 It is a schematic diagram of the positioning system architecture provided by an embodiment of the present application. In a positioning system, a positioning device 10 and a device to be positioned 20 may be included. Wireless communication can be performed between the positioning device 10 and the device to be positioned 20. Specifically, a UWB chip 200 is deployed on the positioning device 10, and a UWB tag 300 is deployed on the device to be positioned 20. For example, the UWB chip 200 may be a chip integrated inside the positioning device 10. Alternatively, the UWB chip 200 may also be a separate electronic device, which is not limited here. The UWB tag 300 may be a chip integrated inside the device to be positioned 20. Alternatively, the UWB tag 300 may also be a separate electronic device, which is not limited here. The positioning device 10 can wirelessly communicate with the UWB tag 300 in the device to be positioned 20 through the UWB chip 200.

[0044] In one application scenario, it is assumed that user A needs to operate a TV set through remote control B. However, if user A does not know the specific location of remote control B in the room, user A can carry the positioning device 10 to call the indoor positioning method provided in the embodiment of the present application to obtain the location information of remote control B relative to user A, so as to accurately find remote control B. For example, the distance and angle information of remote control B relative to user A is determined, so as to facilitate user A to find remote control B according to the distance and angle information.

[0045] In one embodiment, the positioning device 10 may include user equipment (UE), a mobile station, a mobile device, a user terminal, a wireless communication device, etc. For example, the positioning device may be a cellular phone, a cordless phone, a session initiation protocol (SIP) phone, a personal digital assistant (PDA), a tablet computer, a wearable device, etc., and the present application does not limit this. For the convenience of illustrating the embodiments of the present application, the positioning device will be described using a mobile phone as an example in the subsequent description. The devices to be positioned may include TV remote controls, air conditioner remote controls, smart headphones, other mobile phones, vehicle-mounted wireless transceivers, wearable electronic devices with wireless communication functions (such as smart watches, smart bracelets, smart rings, smart glasses), and other devices.

[0046] For example, Figure 2 This is a schematic diagram of the structure of the UWB chip provided in the embodiment of the present application. Figure 2 As shown, the UWB chip 200 may include a wireless communication module 210 , a UWB module 220 , a processor 230 , a sensor module 240 , an internal memory 250 , a power management module 260 , a battery 270 , and a charging management module 280 .

[0047] The wireless communication module 210 can provide solutions including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) networks), Bluetooth (BT), ZigBee networks, etc., applied to the UWB chip 200. The wireless communication module 210 can be one or more devices integrating at least one communication processing module.

[0048] The UWB module 220 is used to provide communication and / or ranging functions. For example, the UWB module 220 can provide communication and ranging functions for the positioning device. Among them, the communication function includes establishing wireless communication between the UWB chip 200 and the UWB tag 300. The ranging function includes measuring the distance between the UWB chip 200 and the UWB tag 300.

[0049] The processor 230 may include one or more processing units. The processor 230 is generally used to process the communication or ranging information output by the UWB module 220. Exemplarily, the processor 230 may be used to calculate the positioning result of the UWB chip 200. The positioning result includes the relative distance between the UWB tag 300 and the UWB chip 200.

[0050] The sensor module 240 may include a gyroscope sensor, an acceleration sensor, a geomagnetic sensor, etc. In the embodiment of the present application, the sensor module 240 may also output information such as the azimuth angle, the pitch angle, and the roll angle of the UWB chip 200 .

[0051] The internal memory 250 may be used to store one or more computer programs. One or more computer programs include instructions. The processor 230 may execute the instructions stored in the internal memory so that the UWB chip 200 performs the indoor positioning method provided in the embodiment of the present application, as well as various applications and data processing. The internal memory 250 may include a code storage area and a data storage area.

[0052] The power management module 260 is used to connect the battery 270, the processor 230, and the charging management module 280. The power management module 260 receives input from the battery 270 and / or the charging management module 280 to supply power to the processor 230, the internal memory 250, the wireless communication module 210, and the like.

[0053] The charging management module 280 is used to receive charging input from a charger to charge the battery 270. The charger may be a wireless charger or a wired charger.

[0054] It is understandable that the above Figure 2 The components shown do not constitute a specific limitation on the structure of the UWB chip. In other embodiments of the present application, the UWB chip 200 may also include Figure 2 More or fewer components may be shown, or some components may be combined or separated, or the components may be arranged differently. Figure 2 The components shown may be implemented in hardware, software or a combination of software and hardware.

[0055] In the embodiment of the present application, the UWB tag set on the device to be located may include: Figure 2 All structures of the UWB chip shown are not described in detail here. The embodiment of the present application does not limit the specific product form of the UWB tag.

[0056] Figure 3A flowchart of an indoor positioning method provided in an embodiment of the present application. In this embodiment, by using the UWB chip in the positioning device and the UWB tag in the device to be positioned, the initial relative distance between the positioning device and the device to be positioned can be calculated. During the movement of the positioning device, the displacement parameters of the positioning device are calculated by PDR technology, and the position of the device to be positioned relative to the positioning device is calculated based on the displacement parameters and the initial relative distance. Specifically, the indoor positioning method includes the following steps:

[0057] S101: Establish a UWB communication connection between a positioning device and a device to be positioned.

[0058] In this embodiment, the positioning device can be a mobile phone, and the device to be positioned can be any device to be found indoors, such as a remote control. The positioning device includes a UWB chip, and the device to be positioned includes a UWB tag. A UWB wireless communication connection is established between the UWB chip in the positioning device and the UWB tag in the device to be positioned.

[0059] Specifically, after receiving a message to start the positioning function, the positioning device can trigger the UWB chip to enter a working state and start positioning the device to be positioned. In one embodiment, the positioning device can display a positioning function startup interface, and the user can click a startup button in the positioning function startup interface to trigger the positioning device to start the positioning function and locate the device to be positioned. Figure 4A and Figure 4B As shown, the positioning device displays a positioning function start interface, which includes a confirmation button. In response to the user clicking the confirmation button, the positioning device starts to start the positioning function to locate the device to be positioned.

[0060] In another embodiment, when there are multiple devices to be located, it is necessary to first confirm the target device to be located among the multiple devices to be located, and then locate the target device to be located. Figure 4A Start the positioning function in the positioning function startup interface, first start the positioning function, search for potential devices to be located, and then Figure 4C The target device to be located is confirmed in the confirmation interface. For example, in response to the user's Figure 4A Click the OK button in the navigation bar, and the positioning device starts the positioning function. After searching for potential devices to be positioned, the following information is displayed: Figure 4C The confirmation interface shown includes a target device selection button. In response to the user clicking the selection button corresponding to the target device (such as a TV remote control), the positioning device determines that the target device to be positioned is a TV remote control.

[0061] S102: The positioning device obtains an initial relative distance R between the positioning device and the device to be positioned. 0.

[0062] In this embodiment, since the user is completely unaware of the specific location of the device to be located indoors, in order to find the device to be located more quickly, the UWB positioning technology can be used to preliminarily determine the location range of the device to be located compared to the positioning device. Figure 5 As shown, a polar coordinate system is established with the location A of the positioning device as the center. That is, the initial position coordinates of the positioning device are A(0,0). After the communication connection is established between the positioning device and the device to be positioned, the initial relative distance R between the positioning device and the device to be positioned is obtained through the UWB chip in the positioning device. 0 Since the position of the device to be positioned is unknown, the position coordinates of the device to be positioned in the polar coordinate system are set to B(ρ 0 ,θ 0 ). Then, we can preliminarily determine that the device to be positioned is located at A(0,0) with a radius of ρ 0 On the circle, where ρ 0 =R 0 By establishing a polar coordinate system and expressing the position coordinates of the device to be located in the form of polar coordinates, the user can more intuitively obtain the distance and direction of the device to be located compared to the positioning device, making it easier for the user to quickly find the device to be located based on the distance and direction.

[0063] S103: The positioning device records a first displacement parameter when the positioning device moves to a first position, where the first displacement parameter includes a first displacement direction and a first displacement distance.

[0064] In this embodiment, after a communication connection is established between the positioning device and the device to be positioned, the user may be prompted to move the positioning device in a customized or randomly selected direction, distance, time, etc. When the user carries the positioning device to perform the first movement, the first displacement parameter of the positioning device when it reaches the first position after the first movement can be calculated by the pedestrian dead reckoning PDR method, and the first displacement parameter includes the first displacement direction and the first displacement distance. For example, when the user carries the positioning device and takes a step to the left and reaches the first position, the first displacement parameter of the positioning device at the first position can be calculated by the PDR method. Specifically, the first displacement parameter after the first movement is accurately calculated by the corresponding hardware devices (related sensors) deployed in the positioning device. For example, an accelerometer is deployed in the positioning device, so that the moving speed and moving direction of the positioning device can be obtained; a gyroscope is deployed in the positioning device, so that the rotation direction of the positioning device can be obtained; a magnetic field sensor or an electronic compass can also be deployed in the positioning device to obtain the geographic direction or relative movement direction. Based on the deployed related hardware, the positioning device can accurately obtain the direction and distance of its own displacement. Among them, the first displacement distance is l 1 , the direction angle corresponding to the first displacement direction is β1 , where the direction angle can be the angle between the location of the positioning device and the north direction. The above is only an exemplary description and is not limited to this in actual applications.

[0065] S104: Determine a first relative distance between the positioning device at the first position and the device to be positioned.

[0066] In this embodiment, after the user carries the positioning device to perform the first movement, the user reaches the first position A′ (eg Figure 5 As shown), it is necessary to determine a first relative distance between the positioning device at the first position and the device to be positioned, so as to subsequently calculate a first polar coordinate of the device to be positioned relative to the positioning device according to the first relative distance.

[0067] For example, Figure 5 As shown, after the user carries the positioning device to perform the first movement and reaches the first position A′, the first relative distance R between the positioning device and the device to be positioned after the first movement can be calculated based on the first displacement parameter and the initial relative distance. 1 That is, the relative distance between the first position A′ and the position B. Specifically, after the user carries the positioning device to perform the first movement and reaches the first position A′, the first displacement distance between the position A and the first position A′ can be determined as l according to the first displacement parameter. 1 And the direction angle corresponding to the first displacement direction is β 1 , according to the initial relative distance, the first displacement distance l 1 The direction angle β corresponding to the first displacement direction 1 Determine a first relative distance R between the positioning device at the first position and the device to be positioned 1 .

[0068] In one embodiment, it is possible to determine whether the direction of the user's first movement is accurate based on the first relative distance and the initial relative distance. If the first relative distance is greater than or equal to the initial relative distance, it is determined that the user is carrying a positioning device and moving in a direction away from the device to be located, prompting the user to move again; if the first relative distance is less than the initial relative distance, it is determined that the user is carrying a positioning device and moving in a direction close to the device to be located, which can narrow the range of searching for the device to be located, making it easier to determine the target position of the device to be located after the user carries the positioning device and moves for the second time.

[0069] S105: Determine a first polar coordinate of the device to be positioned relative to the positioning device according to the initial relative distance, the first displacement parameter and the first relative distance.

[0070] In this embodiment, if Figure 5As shown, after the first movement, the positioning device moves from the initial position coordinate A(0,0) to the first position A′, and the first polar coordinate of the device to be positioned relative to the positioning device can be determined as B according to the initial relative distance, the first displacement parameter and the first relative distance. 1 (ρ 1 ,θ 1 ), where ρ 1 It represents the first distance between the device to be positioned and the positioning device after the positioning device moves to the first position, θ 1 represents the first angle of the device to be positioned relative to the positioning device after the positioning device moves to the first position, where ρ 1 and θ 1 Satisfies the following equations:

[0071]

[0072] Among them, R 1 is the first relative distance, R 0 is the initial relative distance, l 1 is the first displacement distance, β 1 is the direction angle corresponding to the first displacement direction. The equation shown in formula (1) indicates that after the positioning device moves to the first position, the position of the device to be positioned is compared with the circle where the positioning device may be located, with the current first position A′ of the positioning device as the center; formula (2) indicates that after the positioning device moves to the first position, the first angle of the device to be positioned relative to the positioning device is calculated based on the first position parameter, the initial relative distance and the first relative distance.

[0073] In this embodiment, solving the above coordinate equations can obtain that after the positioning device moves to the first position for the first time, it is determined that the device to be positioned has two fuzzy positions relative to the positioning device, and the two fuzzy positions respectively include the first polar coordinates B ′ 1 and the first polar coordinates

[0074] S106. The positioning device records a second displacement parameter of the positioning device after the second movement, where the second displacement parameter includes a second displacement direction and a second displacement distance.

[0075] After the positioning device moves for the first time, it is impossible to determine whether the direction of the first movement is correct, that is, it is impossible to determine which of the two first polar coordinates is the accurate position of the device to be positioned relative to the positioning device, so it is necessary to move again to determine the accurate position of the device to be positioned relative to the positioning device. When the user carries the positioning device to perform the second movement and reaches the second position, the second displacement parameter of the positioning device at the second position can be calculated by the pedestrian dead reckoning PDR method. The second displacement parameter includes the second displacement direction and the second displacement distance. Among them, the second displacement distance is l 2 , the direction angle corresponding to the second displacement direction is β 2 , where the direction angle can be the angle between the location of the positioning device and the true north direction. The above is only an exemplary description and is not limited to this in actual applications. For example, when the user takes a step to the left with the positioning device and reaches the first position, the first displacement parameter of the positioning device at the first position is calculated by the PDR method. Since the device to be positioned has two fuzzy positions relative to the positioning device, the exact position of the device to be positioned cannot be determined. Therefore, the user takes another step to the right with the positioning device and reaches the second position (such as Figure 5 Position A″ shown).

[0076] S107: Determine a second relative distance R between the positioning device at the second position and the device to be positioned. In this embodiment, after the user carries the positioning device to perform a second movement, it is necessary to determine a second relative distance R between the positioning device and the device to be positioned after the second movement. 2 , so as to facilitate the subsequent calculation of the second polar coordinates of the device to be positioned relative to the positioning device according to the second relative distance.

[0077] For example, Figure 5 As shown, after the user carries the positioning device to perform a second movement and reaches a second position A", the second relative distance R between the positioning device and the device to be positioned after the second movement can be calculated based on the second displacement parameter and the first relative distance. 2 . That is, the relative distance between the second position A″ and position B.

[0078] S108: Calculate the second polar coordinates of the device to be positioned relative to the positioning device according to the second displacement parameter and the first polar coordinates.

[0079] In this embodiment, after the second movement, the positioning device moves from the first position A′ to the second position A″, and the second polar coordinates B of the device to be positioned relative to the positioning device can be calculated according to the second displacement parameter and the first polar coordinates. 2 (ρ 2 ,θ 2 ), where ρ 2 It represents the second distance between the device to be positioned and the positioning device after the positioning device moves to the second position, θ2 represents the second angle of the device to be positioned relative to the positioning device after the positioning device moves to the second position, where ρ 2 and θ 2 Satisfies the following equations:

[0080]

[0081] Among them, ρ 1 is the first distance between the device to be positioned and the positioning device after the positioning device moves to the first position, θ 1 is the first angle of the device to be positioned relative to the positioning device after the positioning device moves to the first position, l 2 is the second displacement distance, β 2 is the direction angle corresponding to the second displacement direction.

[0082] In this embodiment, since it is determined that the device to be positioned has two fuzzy positions relative to the positioning device after the positioning device moves to the first position for the first time, solving the above coordinate equations can obtain that after the positioning device moves to the second position for the second time, the device to be positioned also has two fuzzy positions relative to the positioning device, and the two fuzzy positions include the second polar coordinate B′ 2 (ρ′ 2 ,θ 2 ) and the second polar coordinate B″ 2 (ρ″ 2 ,θ 2 ). That is, the second distance includes the first value ρ′ 2 and the second value ρ″ 2 .

[0083] Specifically, after substituting formula (2) into formula (3), the second polar coordinate B′ can be obtained: 2 (ρ′ 2 ,θ 2 ), where the first value ρ′ 2 and θ 2 Satisfies the following equations:

[0084]

[0085] After substituting formula (2) into formula (3), we can get the second polar coordinate B″ 2 (ρ″ 2 ,θ 2 ), where the second value ρ″ 2 and θ 2 Satisfies the following equations:

[0086]

[0087] S109: Determine the target position of the device to be located according to the second polar coordinates and the second relative distance.

[0088] In this embodiment, by comparing the second polar coordinates B′ 2 (ρ′ 2 ,θ 2 ) in the first value ρ′ 2 and the second polar coordinate S′ 2 (ρ″ 2 ,θ 2 ) in the second value ρ″ 2 The second relative distance R 2 The size of ρ′ determines the target position of the device to be located. 2 Less than the second relative distance R 2 , it is determined that after the user carries the positioning device and reaches the second position for the second time, the distance between the positioning device and the device to be positioned is closer, and the coordinates corresponding to the target position of the device to be positioned are determined to be the second polar coordinates B′ 2 (ρ′ 2 ,θ 2 ); if the second value ρ″ 2 Less than the second relative distance R 2 , it is determined that after the positioning device carried by the user moves to the second position for the second time, the distance between the positioning device and the device to be positioned is closer, and the coordinates corresponding to the target position of the device to be positioned are determined to be the second polar coordinates S″ 2 (ρ″ 2 ,θ 2 ).

[0089] In this embodiment, the indoor positioning method provided by the embodiment of the present application uses UWB positioning technology to obtain the initial relative distance between the positioning device and the device to be positioned, and then the positioning device performs the first movement, and the first displacement parameter of the positioning device during the first movement is recorded by PDR technology. According to the first displacement parameter and the initial relative distance, the first polar coordinates of the device to be positioned can be obtained, wherein the first polar coordinates include two position coordinates. In order to obtain the accurate coordinates of the device to be positioned, the positioning device performs a second movement, and records the second displacement parameter of the positioning device during the second movement, and records the second relative distance between the positioning device and the device to be positioned after the second movement. The second polar coordinates of the device to be positioned relative to the positioning device are determined according to the second displacement parameter and the first polar coordinates, and the target position of the device to be positioned relative to the positioning device is determined according to the second relative distance and the second polar coordinates. By combining UWB positioning technology and PDR technology, when the user carries the positioning device and moves it twice, the precise positioning of the device to be positioned can be achieved, the positioning steps are simplified, and it is convenient for promotion and use in real scenes.

[0090] In another embodiment of the present application, the indoor positioning method further includes: determining the relative position coordinates of the device to be positioned relative to the positioning device according to the target position; and updating the coordinates corresponding to the target position according to the relative position coordinates during each subsequent movement of the positioning device.

[0091] In this embodiment, after the user moves the positioning device twice, the target position of the device to be positioned relative to the positioning device can be determined, and the relative position coordinates of the device to be positioned relative to the positioning device are determined according to the target position, wherein the relative position coordinates satisfy the following equation group:

[0092]

[0093] Among them, ρ n is the distance between the device to be positioned and the positioning device after the positioning device moves for the nth time, θ n is the angle of the device to be positioned relative to the positioning device after the positioning device moves for the nth time, l n is the displacement distance of the positioning device after the nth movement, β n is the direction angle corresponding to the displacement direction of the positioning device after the nth movement, ρ n-1 is the distance between the device to be positioned and the positioning device after the positioning device moves for the n-1th time, θ n-1 is the angle of the device to be positioned relative to the positioning device after the positioning device moves for the n-1th time, l n-1 is the displacement distance of the positioning device after the n-1th movement, β n-1 It is the direction angle corresponding to the displacement direction of the positioning device after the n-1th movement.

[0094] In one embodiment, if the difference between the direction angle of the nth movement of the positioning device carried by the user and the direction angle of the n-1th movement is within plus or minus 5 degrees, it can be considered that the user is walking in a straight line, and the direction angle of the positioning device at the nth movement can be predicted and adjusted based on the direction angle of the n-1th movement.

[0095] In this embodiment, after the target position of the device to be located is determined through the above steps S101 to S109, the user can find the device to be located according to the distance and direction shown by the target position. In the process of the user looking for the device to be located, the distance and direction between the device to be located and the positioning device can be updated in real time through the above formulas (9) and (10), so that the user can quickly and accurately find the device to be located through the updated distance and direction. That is, the coordinates of the target position can be continuously adjusted according to the movement of the user, so that the user can clearly know the coordinates of the device to be located relative to the positioning device after each movement, which is convenient for finding the device to be located more quickly.

[0096] Figure 6 This is a schematic diagram of the structure of an electronic device 100 provided in an embodiment of the present application. Figure 6 The electronic 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 120, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, 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, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0097] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0098] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. In some embodiments of the present application, the processor 110 may include a processor, which is used to control the intelligent service module to detect the desktop card on the display interface, and based on the card detection result of the intelligent service module, determine whether to send a display instruction for displaying the guide information to the intelligent service module. The display instruction is used to instruct the intelligent service module to generate and display the guide information. The guide information is used to instruct the user to add a desktop card (travel service card) on the display interface of the electronic device.

[0099] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

[0101] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). The I2S interface can be used for audio communication.

[0102] The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface.

[0103] The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.

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

[0105] 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 can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0106] The USB interface 130 is an interface that complies with the USB standard specification, and can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices 100, such as AR devices, etc.

[0107] It is understandable 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 on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0108] The charging management module 140 is used to receive charging input from a charger, where the charger can be a wireless charger or a wired charger.

[0109] The power management module 141 is used to connect 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 number, and battery health status (leakage, impedance).

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

[0111] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0112] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. 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 convert it into electromagnetic waves for radiation through the antenna 1.

[0113] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0114] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0115] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor that serves abnormality reminders and connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0116] The display screen 194 is used to display images, videos, etc. The 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 (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc.

[0117] In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1. The electronic device 100 may implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0118] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can 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 passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0119] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0120] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in a variety of coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0121] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0122] The internal memory 121 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). In the embodiment of the present application, the internal memory 121 may also be referred to as a memory.

[0123] The external memory interface 120 can be used to connect to an external non-volatile memory to expand the storage capacity of the electronic device 100. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external non-volatile memory.

[0124] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0125] The audio module 170 is used to convert digital audio information into analog audio signal output, and also used to convert analog audio input into digital audio signal. The audio module 170 can also be used to encode and decode audio signals.

[0126] The speaker 170A, also called a "speaker", is used to convert an audio electrical signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A.

[0127] The receiver 170B, also called a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be received by placing the receiver 170B close to the human ear.

[0128] 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 speak by putting their mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, realize directional recording function, etc.

[0129] The earphone interface 170D is used to connect a wired earphone and can be a USB interface 130 or a 3.5 mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0130] The pressure sensor 180A is used to sense pressure signals and can convert pressure signals into electrical signals. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 100 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch based on the detection signal of the pressure sensor 180A. In some embodiments of the present application, the touch position can be calculated based on the user's Figure 4A Click on the startup interface shown to confirm the execution of the positioning function.

[0131] The gyro sensor 180B may be used to determine the motion posture of the electronic device 100. In some embodiments, the displacement parameters after the positioning device moves may be calculated based on the positioning of the gyro sensor 180B.

[0132] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0133] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover can be automatically unlocked.

[0134] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device 100 and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0135] The distance sensor 180F is used to measure the distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure the distance to achieve fast focusing.

[0136] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100.

[0137] The ambient light sensor 180L is used to sense the ambient light brightness. The electronic 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 electronic device 100 is in a pocket to prevent accidental touches.

[0138] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0139] The temperature sensor 180J is used to detect the temperature.

[0140] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting 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 the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0141] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone block of the vocal part of the human body. The bone conduction sensor 180M can also contact the human pulse to receive a blood pressure beat signal. In some embodiments, the bone conduction sensor 180M can also be set in an earphone and combined into a bone conduction earphone. The audio module 170 can parse out a voice signal based on the vibration signal of the vibrating bone block of the vocal part obtained by the bone conduction sensor 180M to realize a voice function. The application processor can parse the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M to realize a heart rate detection function.

[0142] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0143] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0144] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0145] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195. The electronic device 100 can 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 cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can 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 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0146] This embodiment further provides a computer storage medium, in which computer instructions are stored. When the computer instructions are executed on the electronic device 100, the electronic device 100 executes the above-mentioned related method steps to implement the indoor positioning method in the above-mentioned embodiment.

[0147] This embodiment also provides a computer program product. When the computer program product runs on a computer, the computer executes the above-mentioned related steps to implement the service abnormality reminder method in the above-mentioned embodiment.

[0148] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory so that the chip executes the indoor positioning method in the above-mentioned method embodiments.

[0149] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.

[0150] Figure 7 It is a software structure block diagram of an electronic device 100 provided in an embodiment of the present application.

[0151] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. Taking the Android system as an example, in some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the application framework layer, the system library, and the kernel layer.

[0152] The application layer may include a series of application packages. In the embodiment of the present application, the application package may include applications related to fingerprint recognition, such as fingerprint recognition, for example, fingerprint unlocking, access to application locks, fingerprint photography, fingerprint answering calls, etc. Figure 7 As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.

[0153] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 2 As shown, the application framework layer may also include: a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like.

[0154] The system library may include multiple functional modules, such as a surface manager, a media library, a 3D graphics processing library (such as OpenGL ES), a 2D graphics engine (such as SGL), an image processing library, etc.

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

[0156] In an embodiment of the present application, the hardware layer may include hardware modules such as a display screen, and the display screen includes a display controller, which is used to control and manage the output of the display screen.

[0157] Understandably, Figure 7 The layers in the software structure shown and the components contained in each layer do not constitute a specific limitation on the electronic device. In other embodiments of the present application, the electronic device may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.

[0158] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0159] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0160] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0161] 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 separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0162] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), disk or optical disk and other media that can store program code.

[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present application and are not intended to limit it. Although the present application has been described in detail with reference to the preferred embodiments, a person of ordinary skill in the art should understand that the technical solution of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present application.

Claims

1. An indoor positioning method, applied to a positioning device, It is characterized in that The method comprises: Acquiring an initial relative distance between the positioning device and the device to be positioned; Recording a first displacement parameter when the positioning device moves to a first position; Acquire a first relative distance between the positioning device at the first position and the device to be positioned; Determine a first polar coordinate of the device to be positioned relative to the positioning device in a polar coordinate system according to the initial relative distance, the first displacement parameter and the first relative distance; Recording a second displacement parameter when the positioning device moves to a second position; Acquire a second relative distance between the positioning device at the second position and the device to be positioned; determining a second polar coordinate of the device to be positioned relative to the positioning device in the polar coordinate system according to the second displacement parameter and the first polar coordinate; and The target position of the device to be positioned relative to the positioning device is determined according to the second relative distance and the second polar coordinates.

2. The method according to claim 1, It is characterized in that The first displacement parameter includes a first displacement distance and a first displacement direction, and the second displacement parameter includes a second displacement distance and a second displacement direction.

3. The method according to claim 2, It is characterized in that The first polar coordinate in the polar coordinate system is (ρ 1 ,θ 1 ), ρ 1 represents the first distance between the device to be positioned and the positioning device after the positioning device moves to the first position, θ 1 represents the first angle of the device to be positioned relative to the positioning device after the positioning device moves to the first position, where ρ 1 and θ 1 Calculated according to the following formula: Among them, R 1 is the first relative distance, R 0 is the initial relative distance, l 1 is the first displacement distance, β 1 is the direction angle corresponding to the first displacement direction.

4. The method according to claim 3, It is characterized in that The second polar coordinate in the polar coordinate system is (ρ 2 ,θ 2 ), ρ 2 represents the second distance between the device to be positioned and the positioning device after the positioning device moves to the second position, θ 2 represents the second angle of the device to be positioned compared to the positioning device after the positioning device moves to the second position, where ρ 2 and θ 2 The calculation formula includes: Among them, l 2 is the second displacement distance, β 2 is the direction angle corresponding to the second displacement direction.

5. The method according to claim 4, It is characterized in that Determining the target position of the device to be positioned relative to the positioning device according to the second relative distance and the second polar coordinates includes: If a first value in the second distance is smaller than the second relative distance, determining that the target position of the device to be positioned relative to the positioning device is the coordinate corresponding to the first value; If a second value in the second distance is smaller than the second relative distance, it is determined that the target position of the device to be positioned relative to the positioning device is the coordinate corresponding to the second value.

6. The method according to claim 1, It is characterized in that Before acquiring the initial relative distance between the positioning device and the device to be positioned, the method further includes: An ultra-wideband (UWB) wireless communication connection is established between the positioning device and the device to be positioned.

7. The method according to claim 6, It is characterized in that The method further comprises: The positioning device receives a message for starting a positioning function, where the message for starting a positioning function is used to trigger the positioning device to locate the device to be located.

8. The method according to claim 1, It is characterized in that The method further comprises: Determine the relative position coordinates of the device to be positioned relative to the positioning device according to the target position; During each movement of the positioning device, the coordinates corresponding to the target position are updated according to the relative position coordinates.

9. An electronic device, It is characterized in that The electronic device comprises a memory and a processor; The memory is used to store program instructions; The processor is used to read the program instructions stored in the memory to implement the indoor positioning method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the indoor positioning method according to any one of claims 1 to 8 is implemented.