Device positioning method and apparatus
By measuring the plane angle and pitch angle of the measuring device, and combining the distance between the device and the target device, various information is output to guide the user to find the target device. This solves the problem of large angle measurement error in ultrasonic positioning technology and achieves more accurate device positioning.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2026-03-12
AI Technical Summary
In existing ultrasonic positioning technology, there is a large error in measuring the angle between the device and the mobile phone, which makes it impossible to accurately guide users to find lost items.
By measuring the plane angle and pitch angle of the device, and combining this with the distance between the device and the target device, the system outputs various information to guide the user in finding the target device, including three-dimensional coordinates, plane distance, and angle.
It improves the accuracy of device positioning, helping users find lost items more accurately.
Smart Images

Figure CN2025113573_12032026_PF_FP_ABST
Abstract
Description
A device positioning method and apparatus
[0001] The present application claims priority to the Chinese patent application No. 202411249869.X, filed on September 5, 2024, and entitled "A device positioning method and apparatus", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD
[0002] The present application relates to the field of communication technology, and in particular to a device positioning method and apparatus. BACKGROUND
[0003] In daily life, in order to facilitate users to find lost items, a tag device can be placed in the item in advance. After the item is lost, the user can use other electronic devices (such as a mobile phone, a tablet computer, or a computer, etc.) to find the tag device, so as to find the lost item. In some embodiments, the other electronic devices can use ultrasonic positioning technology to position the tag device, so as to find the item. For example, taking the mobile phone as an example. The loudspeaker of the tag device can send ultrasonic signals. The top and bottom microphones of the mobile phone simultaneously receive the ultrasonic signals sent by the loudspeaker of the tag device. The mobile phone measures the included angle between the long side of the mobile phone and the device connecting line based on the time difference of receiving the ultrasonic signals by different microphones, the device connecting line being the connecting line between the tag device and the mobile phone, so as to guide the user to find the tag device based on the included angle. However, the included angle may have a large error, which cannot reflect the real direction of the tag device, so as to cause the user to be unable to accurately find the tag device. SUMMARY
[0004] Embodiments of the present application provide a device positioning method and apparatus, which are beneficial to accurately guide the user to find the device.
[0005] In a first aspect, embodiments of the present application provide a device positioning method. For example, the method can be applied to a first device. For example, the method can be implemented by the first device or a communication module / processing module in the first device, or a circuit or chip responsible for communication / processing function in the first device. The method comprises:
[0006] The first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured, the first plane angle being an included angle between a long side of the first device and a first straight line, the first straight line being a line connecting the first device and the second device; after the first device is rotated up and down, the second plane angle and the second pitch angle of the first device relative to the horizontal plane are measured, the second plane angle being an included angle between the long side of the first device after the first device is rotated up and down and the first straight line; based on the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and a straight line distance between the first device and the second device, a first prompt signal is output, the first prompt signal being used to guide the user to find the second device.
[0007] Based on the method described in the first aspect, the first device can combine a plurality of information to guide the user to find the second device, which is beneficial to more accurately guide the user to find the second device.
[0008] In a possible embodiment, the first prompt signal prompts one or more of the following information: a three-dimensional coordinate of the second device, a plane distance between the first device and the second device on a plane where a screen of the first device is located, a plane distance between the first device and the second device on the horizontal plane, a third plane angle, a fourth plane angle, a third pitch angle of the second device relative to the plane where the screen of the first device is located, a fourth pitch angle of the second device relative to the horizontal plane, and a height of the second device relative to the first device; wherein the third plane angle is an included angle between the long side of the first device and a second straight line, the second straight line being a straight line of the first straight line projected on the plane where the screen of the first device is located, or the third plane angle being an angle of the second plane angle projected on the plane where the screen of the first device is located; wherein the fourth plane angle is an included angle between the long side of the first device and a straight line of the first straight line projected on the horizontal plane, or the fourth plane angle being an angle of the second plane angle projected on the horizontal plane.
[0009] By prompting the three-dimensional coordinate of the second device, the plane distance between the first device and the second device on the plane where the screen of the first device is located, the plane distance between the first device and the second device on the horizontal plane, the third plane angle, the fourth plane angle, the third pitch angle of the second device relative to the plane where the screen of the first device is located, the fourth pitch angle of the second device relative to the horizontal plane, or the height of the second device relative to the first device, the user can determine the real direction of the second device, and the user can find the second device.
[0010] In a possible implementation, the three-dimensional coordinates of the second device are three-dimensional coordinates of the second device in the first coordinate system or the second coordinate system; the first coordinate system is a coordinate system with a long side of the first device as an x-axis, and the second coordinate system is a coordinate system with a projection of the long side of the first device on a horizontal plane as an x-axis. Based on the possible implementation, three-dimensional spatial positioning of the second device can be implemented, which is beneficial to the user to determine the real direction of the second device and facilitate the user to find the second device.
[0011] In a possible implementation, after the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured, before the second plane angle and the second pitch angle of the first device relative to the horizontal plane are measured, if it is detected that the pitch angle of the first device relative to the horizontal plane does not change, a second prompt signal is output, and the second prompt signal is used to prompt the first device to be rotated up and down. Based on the possible implementation, the first device can successfully measure the second plane angle and the second pitch angle after the first device is rotated up and down.
[0012] In a possible implementation, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured, including: in a case where the straight-line distance between the first device and the second device is less than or equal to a first threshold, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured; or in a case where the straight-line distance between the first device and the second device is less than or equal to a first threshold and greater than or equal to a second threshold for a preset time period, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured, the first threshold being greater than the second threshold.
[0013] By combining the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device when the straight-line distance between the first device and the second device is small, the user is guided to find the second device, which is beneficial to more accurately guide the user to find the second device.
[0014] By combining the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device when the straight-line distance between the first device and the second device is less than or equal to the first threshold and greater than or equal to the second threshold for a preset time period, the user is guided to find the second device, which is beneficial to more accurately guide the user to find the second device.
[0015] In a possible implementation, the outputting the first prompt signal based on the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device includes: determining a pitch angle difference, the pitch angle difference being a difference between the first pitch angle and the second pitch angle; and outputting the first prompt signal based on the pitch angle difference, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device.
[0016] Based on the possible implementation, the information prompted by the first prompt signal can be accurately determined.
[0017] In a possible implementation, when the straight-line distance between the first device and the second device is less than the third threshold value, the following information is determined based on the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located or the sixth pitch angle of the second device relative to the horizontal plane: whether the second device is located above or below the first device, the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located, the sixth pitch angle of the second device relative to the horizontal plane, or the height of the second device relative to the first device.
[0018] Based on the possible implementation, the user can be more accurately guided to find the second device.
[0019] In a second aspect, a device positioning apparatus is provided, the apparatus being included in a first device, and the apparatus having a function of implementing the behavior of the first device in the first aspect and the possible implementations of the first aspect. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules or units corresponding to the above functions. For example, a determining module or unit, a transmitting module or unit, and the like.
[0020] Optionally, the apparatus can be the first device described above.
[0021] In a third aspect, a device positioning apparatus is provided, the apparatus including a processor and a memory coupled to the processor, the memory being configured to store computer programs or instructions, and the processor being configured to execute the computer programs or instructions stored in the memory, so that the method in the first aspect and the possible implementations of the first aspect is executed.
[0022] For example, the processor is configured to execute the computer programs or instructions stored in the memory, so that the apparatus executes the method in the first aspect and the possible implementations of the first aspect.
[0023] Optionally, the apparatus includes one or more processors.
[0024] Optionally, the apparatus can further include a memory coupled to the processor.
[0025] Optionally, the apparatus comprises a memory which can be one or more.
[0026] Optionally, the memory can be integrated with the processor or arranged separately.
[0027] Optionally, the apparatus can further comprise a transceiver.
[0028] Optionally, the apparatus can be the first device as described above.
[0029] In a fourth aspect, the present application provides an electronic device, comprising: one or more processors; a memory; a plurality of application programs; and one or more computer programs. Wherein the one or more computer programs are stored in the memory, and the one or more computer programs comprise instructions. When the instructions are executed by the electronic device, the electronic device performs the method in the first aspect or any possible implementation of the first aspect, or the method introduced in any embodiment of the present application.
[0030] In a fifth aspect, the present application provides a computer readable storage medium, which stores computer readable instructions. When the computer program or instructions are executed by the device positioning apparatus, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0031] In a sixth aspect, the present application provides a computer program product, comprising a computer program or instructions. When the computer program or instructions are executed by the device positioning apparatus, the method in the first aspect or any possible implementation of the first aspect is implemented.
[0032] In a seventh aspect, the present application provides a device positioning apparatus, comprising units for performing the method introduced in any embodiment of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0033] FIG. 1 is a schematic diagram of a plane angle β according to an embodiment of the present application;
[0034] FIG. 2 is a schematic diagram of a principle of determining a plane angle β according to an embodiment of the present application;
[0035] FIG. 3 is a schematic diagram of a principle of determining a plane angle β according to an embodiment of the present application;
[0036] FIG. 4 is a schematic diagram of a plane angle β according to an embodiment of the present application;
[0037] FIG. 5 is a schematic diagram of a possible, non-limiting system according to an embodiment of the present application;
[0038] FIG. 6 is a schematic diagram of a structure of an electronic device 100 according to an embodiment of the present application;
[0039] Fig. 7 is a software structure block diagram of an electronic device 100 according to an embodiment of the present application;
[0040] Fig. 8 is a flow diagram of a device positioning method according to an embodiment of the present application;
[0041] Fig. 9 is a diagram of a first plane angle and a first pitch angle according to an embodiment of the present application;
[0042] Fig. 10 is a diagram of rotating a first device up and down according to an embodiment of the present application;
[0043] Fig. 11 is a diagram of a second plane angle and a second pitch angle according to an embodiment of the present application;
[0044] Fig. 12 is a diagram of a three-dimensional coordinate of a second device, a plane distance between the first device and the second device on a plane where a screen of the first device is located, a third plane angle, a third pitch angle of the second device relative to the plane where the screen of the first device is located according to an embodiment of the present application;
[0045] Fig. 13 is a diagram of a three-dimensional coordinate of a second device, a plane distance between the first device and the second device on a horizontal plane, a fourth plane angle, a fourth pitch angle of the second device relative to the horizontal plane, a height of the second device relative to the first device according to an embodiment of the present application;
[0046] Fig. 14 is a diagram of a device positioning apparatus 1400 according to an embodiment of the present application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
[0048] The terms "first" and "second" and the like in the specification of the present application, claims, and drawings are used to distinguish different objects, and are not used to describe a particular order. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device including a series of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed or can optionally include other steps or units inherent to the process, method, product, or device.
[0049] Reference within this document to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another. As used herein, the term "or" is intended to mean an inclusive "or" rather than an exclusive "or". That is, unless specified otherwise, or clear from context, "X employs A or B" is intended to mean any of the natural inclusive permutations. That is, if X employs A; X employs B; or X employs both A and B, then "X employs A or B" is satisfied. In addition, the articles "a" and "an" as used in this application and the appended claims should generally be construed to mean "one or more" unless specified otherwise or clear from context to be directed to a singular form.
[0050] In this application, "at least one", "one or more" means one or more, "multiple" means two or more, "at least two" means two or more, and / or is used to describe the relationship between associated objects, which means that there can be three kinds of relationships, for example, "A and / or B" can mean: only A, only B, and A and B exist at the same time, where A, B can be singular or plural. The character " / " generally represents the relationship between the front and rear associated objects is "or". "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b or c, can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0051] In daily life, in order to facilitate users to find lost items, tag devices can be put in the items in advance. After the items are lost, users can use other electronic devices (such as mobile phones, tablets or computers, etc.) to find the tag devices, so as to find the lost items. In some embodiments, the other electronic devices can use ultrasonic positioning technology to locate the tag devices, so that the items can be found. For example, taking a mobile phone as an example. The tag device has a loudspeaker. The top and bottom of the mobile phone both have microphones. As shown in FIG. 1, A represents the loudspeaker of the tag device. B represents the microphone on the top of the mobile phone, and C represents the microphone on the bottom of the mobile phone. The distance between the two microphones of the mobile phone is D, and the distance between the loudspeaker of the tag device and the two microphones of the mobile phone is D1 and D2 respectively. The loudspeaker of the tag device can send ultrasonic signals. The microphones on the top and bottom of the mobile phone simultaneously receive the ultrasonic signals sent by the loudspeaker of the tag device. The mobile phone measures the plane angle β based on the time difference of receiving the ultrasonic signals by different microphones. The plane angle β is the included angle between the long side of the mobile phone and the device line, and the device line is the line between the tag device and the mobile phone. For example, the plane angle β is the included angle between the long side of the mobile phone and the straight line AB or AC. FIG. 1 takes the included angle between the long side of the mobile phone and the straight line AB as an example. The mobile phone guides the user to find the tag device based on the plane angle β. The following describes one implementation principle of the mobile phone determining the plane angle β based on the time difference of receiving the ultrasonic signals by different microphones:
[0052] As shown in FIG. 1, the tag device can send ultrasonic signals through the loudspeaker of the tag device, the two microphones of the mobile phone can receive the ultrasonic signals sent by the loudspeaker of the tag device, and the mobile phone can measure the plane angle β based on the time difference of the signals received by the two microphones. For example, the time difference of the signals received by the two microphones corresponds to the number of sampling points f s of the tag device, v is the speed of sound. Wherein the speed of sound v can be a fixed value, for example, the speed of sound at 15℃ is 340m / s, which can be stored in the mobile phone. Or, the speed of sound v can also be determined according to the temperature of the current environment, for example: v = 331 + 0.607c m / s, where c is the temperature. The temperature c can be obtained by the mobile phone itself, for example, measured by the temperature sensor on the mobile phone; or, the temperature c can be obtained by the mobile phone from other devices, for example, the tag device can notify the mobile phone after obtaining the temperature. For example, the tag device can notify the mobile phone after measuring the temperature by its own temperature sensor, or the tag device can notify the mobile phone after obtaining the temperature from other ways. The mobile phone can obtain τ * , f s and v. Therefore, the mobile phone can determine the plane angle β according to Determine the plane angle β.
[0053] The implementation principle of determining the plane angle β is introduced below in combination with FIG. 2. D1>D2, AC=D1, AB=D2, EC=D1-D2, AE=D2, that is, the triangle ABE is an isosceles triangle. Therefore, ∠AEB=∠ABE=δ. When D1 and D2 are much greater than D, that is, ω≈0. Therefore, ∠AEB=∠ABE=δ=90°, and β+γ≈90°. According to the three-side relationship of a triangle, it can be known that: Therefore That is, if the loudspeaker of the tag device is on the same straight line as the two microphones of the mobile phone, and the loudspeaker of the tag device is in front of the two microphones of the mobile phone, then D1-D2=D, and β=0.
[0054] The implementation principle of determining the plane angle β is introduced below in combination with FIG. 3. D1<D2, AC=D1, AB=D2, EB=D2-D1, AE=D1. That is, the triangle ACE is an isosceles triangle. Therefore, ∠AEC=∠ACE=δ. When D1 and D2 are much greater than D, that is, ω≈0. Therefore, ∠AEC=∠ACE=δ=90°, and β=γ+90°. According to the three-side relationship of a triangle, it can be known that: Therefore That is, if the loudspeaker of the tag device is on the same straight line as the two microphones of the mobile phone, and the loudspeaker of the tag device is behind the two microphones of the mobile phone, then D1-D2=-D, and β=180°.
[0055] However, the plane angle β is the included angle on the plane formed by the tag device and the two microphones of the mobile phone, and is not the horizontal included angle in the earth coordinate system. When the height difference between the tag device and the mobile phone is large, or the distance between the tag device and the mobile phone is close, the angle error will be large, which affects the experience of the user searching for the tag device. For example, as shown in FIG. 4, the height of the tag device is 2 meters higher than that of the mobile phone. The tag device is in front of the mobile phone. When the height of the tag device is 2 meters higher than that of the mobile phone, the plane angle β measured by the mobile phone is 45°, while for the user holding the mobile phone to search, the tag device should be located in the front of the horizontal direction, rather than in the 45° direction. When the user reaches the vicinity below the tag device, the plane angle β cannot reflect the real direction of the tag device.
[0056] In order to accurately guide the user to search for the device, an apparatus and method for device positioning are provided in the embodiments of the present application. In order to better understand the embodiments of the present application, the system architecture related to the embodiments of the present application is first introduced as follows:
[0057] The embodiments of the present application can be applied to a long term evolution (LTE) system, a 5th generation mobile communication (5G) system, a 6th generation mobile communication (6G) system and other communication systems evolved after 5G, a satellite communication system and a short-range wireless communication system. Among them, the wireless communication system mentioned in the embodiments of the present application includes but is not limited to three application scenarios of the 5G / 6G mobile communication system: enhanced mobile broadband (eMBB), ultra-reliable low latency communication (URLLC) and massive machine type of communication (mMTC), a long range (LoRa) system or a vehicle-to-everything (V2X) system.
[0058] FIG. 5 shows a possible, non-limiting system schematic diagram. As shown in FIG. 5, the communication system includes a first device and a second device. The second device can be a tag device, and the first device can be a device for positioning the tag device, such as a mobile phone, a tablet computer or a computer device. The first device and the second device can be the same type of device or different types of devices. In daily life, in order to facilitate users to find lost items, the second device can be placed in the items in advance. After the items are lost, the user can use the first device to find the second device, so as to find the lost items.
[0059] The hardware structure of the device related to the embodiments of the present application is introduced as follows:
[0060] For example, FIG. 6 is a structural schematic diagram of an electronic device 100 provided by an embodiment of the present application. The electronic device 100 can be the first device or the second device described above. The electronic device 100 can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headset jack 170D, a sensor module 180, a key 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 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric 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 180I, a touch sensor 180J, an ambient light sensor 180K, a bone conduction sensor 180L, etc.
[0061] It can be understood that the structure illustrated by the embodiments of the present application does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 can include more or fewer components than those illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
[0062] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated in one or more processors.
[0063] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of instruction fetching and instruction execution. The processor 110 can 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 can save instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instructions or data again, it can be directly called from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.
[0064] In some embodiments, the processor 110 can include one or more interfaces. The interfaces can 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.
[0065] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 can include multiple sets of I2C buses. The processor 110 can be coupled to the touch sensor 180J, the charger, the flash, the camera 193, etc. through different I2C bus interfaces, respectively. For example, the processor 110 can be coupled to the touch sensor 180J through an I2C interface, so that the processor 110 and the touch sensor 180J communicate through the I2C bus interface, realizing the touch function of the electronic device 100.
[0066] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple sets of I2S buses. The processor 110 can be coupled with the audio module 170 through the I2S buses to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can deliver audio signals to the wireless communication module 160 through the I2S interface to enable the function of answering a phone call through a Bluetooth earphone.
[0067] The PCM interface can also be used for audio communication to sample, quantize, and encode analog signals. In some embodiments, the audio module 170 can be coupled with the wireless communication module 160 through a PCM bus interface. In some embodiments, the audio module 170 can also deliver audio signals to the wireless communication module 160 through the PCM interface to enable the function of playing music through a Bluetooth earphone. Both the I2S interface and the PCM interface can be used for audio communication.
[0068] The UART interface is a universal serial bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is usually 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 enable Bluetooth functionality. In some embodiments, the audio module 170 can deliver audio signals to the wireless communication module 160 through the UART interface to enable the function of playing music through a Bluetooth earphone.
[0069] The MIPI interface can be used to connect the processor 110 and 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), and the like. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to enable the camera function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to enable the display function of the electronic device 100.
[0070] The GPIO interface can be configured through 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 and the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, and the like.
[0071] The USB interface 130 is an interface conforming to 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 transmit data between the electronic device 100 and a peripheral device. It can also be used to connect a headset to play audio through the headset. The interface can also be used to connect other electronic devices, such as an augmented reality (AR) device, etc.
[0072] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 can also use different interface connection methods or combinations of multiple interface connection methods in the above embodiments.
[0073] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 can charge the battery 142 while also supplying power to the electronic device 100 through the power management module 141.
[0074] 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 to supply power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc. In other embodiments, the power management module 141 can also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be provided in the same device.
[0075] The wireless communication function of the electronic device 100 can be realized through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.
[0076] Antennas 1 and 2 are used for transmitting and receiving 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 multiplexed to improve the utilization of antennas. For example, antenna 1 can be multiplexed as a diversity antenna for wireless local area networks. In some other embodiments, antennas can be used in combination with tuning switches.
[0077] Mobile communication module 150 can provide a solution for wireless communication including 2G / 3G / 4G / 5G or 5G and beyond applied on electronic device 100. Mobile communication module 150 can include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. Mobile communication module 150 can receive electromagnetic waves by antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed signals to a modem processor for demodulation. Mobile communication module 150 can also amplify signals modulated by the modem processor, and convert the signals into electromagnetic waves radiated by antenna 1. In some embodiments, at least part of the functional modules of mobile communication module 150 can be disposed in processor 110. In some embodiments, at least part of the functional modules of mobile communication module 150 can be disposed in the same device as at least part of the modules of processor 110.
[0078] The modem processor can include a modulator and a demodulator. The modulator is used to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to a baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to an application processor. The application processor outputs a sound signal through an audio device (not limited to loudspeaker 170A, microphone 170B, etc.), or displays an image or video through display screen 194. In some embodiments, the modem processor can be a separate device. In some other embodiments, the modem processor can be independent of processor 110, and disposed in the same device as mobile communication module 150 or other functional modules.
[0079] The wireless communication module 160 can provide a solution for wireless communication including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc. applied to the electronic device 100. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency-modulates and filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 can also receive signals to be transmitted from the processor 110, frequency-modulate them, amplify them, and radiate them as electromagnetic waves via the antenna 2.
[0080] In some embodiments, the antenna 1 and the mobile communication module 150 of the electronic device 100 are coupled, and the antenna 2 and the wireless communication module 160 are coupled, so that the electronic device 100 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), the 5th generation wireless communication system (5G), etc. thGeneration of wireless communication system), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).
[0081] The electronic device 100 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 can include one or more GPUs that execute program instructions to generate or change display information.
[0082] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 can include 1 or N display screens 194, N being a positive integer greater than 1.
[0083] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor, etc.
[0084] ISP is used to process the data feedback from the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and conversion into a visible image. ISP can also optimize the noise and brightness of the image through algorithm. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be arranged in the camera 193.
[0085] The camera 193 is used to capture still images or videos. Objects generate optical images through lenses and project them onto photosensitive elements. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP for conversion 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 a standard RGB, YUV, etc. format image signal. In some embodiments, the electronic device 100 can include one or N cameras 193, where N is a positive integer greater than 1.
[0086] The digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.
[0087] The video codec is used to compress or decompress digital video. The electronic device 100 can support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.
[0088] NPU is a neural-network (NN) computing processor that simulates the structure of biological neural networks, such as the transmission mode between human brain neurons, to quickly process input information and continuously self-learn. Through NPU, the electronic device 100 can realize intelligent cognition and other applications, such as: image recognition, face recognition, voice recognition, text understanding, etc.
[0089] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to extend the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, videos, and the like are stored in the external memory card.
[0090] The internal memory 121 can be used to store computer-executable program code including instructions. The processor 110 performs various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required for a function (such as a sound play function, an image play function, and the like), and the like. The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phonebook, and the like), and the like. In addition, the internal memory 121 can include a high-speed random access memory, and can further include a non-volatile memory such as at least one of a magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
[0091] The electronic device 100 can implement an audio function through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. For example, music play, recording, and the like.
[0092] The audio module 170 is used to convert digital audio information into an analog audio signal output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode an audio signal. In some embodiments, the audio module 170 can be disposed in the processor 110, or part of the functions of the audio module 170 can be disposed in the processor 110.
[0093] The speaker 170A, also referred to as a "loudspeaker", 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. In some embodiments, the speaker 170A is used to send an ultrasonic signal.
[0094] The receiver 170B, also referred to as a "earpiece", is used to convert an audio electrical signal into a sound signal. When the electronic device 100 listens to a phone call or a voice message, the receiver 170B can be held close to a human ear to listen to the voice.
[0095] Microphone 170C, also called "microphone", "sounder", is used to convert sound signal into electric signal. When making a call or sending voice message, the user can make sound by approaching the microphone 170C with the mouth, and input the sound signal into the 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, in addition to collecting sound signals, noise reduction function can also be realized. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C, realizing the collection of sound signals, noise reduction, and also identifying the source of sound, realizing the function of directional recording, etc. In some embodiments, the two microphones 170C provided by the electronic device 100 can receive ultrasonic signals sent by the loudspeaker of another electronic device. Optionally, the distance between the two microphones 170C of the electronic device 100 is greater than a preset distance, for example, the preset distance is 2cm, 4cm, 6cm or 8cm or 10cm.
[0096] The earphone interface 170D is used to connect the wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, a cellular telecommunications industry association of the USA (CTIA) standard interface.
[0097] The pressure sensor 180A is used to sense pressure signal, and can convert the pressure signal into electric signal. In some embodiments, the pressure sensor 180A can be provided on the display screen 194. There are many kinds of pressure sensors 180A, such as resistance type pressure sensor, inductance type pressure sensor, capacitance type pressure sensor, etc. The capacitance type pressure sensor can include at least two parallel plates with conductive material. When force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change of the capacitance. When there is a touch operation acting on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A.
[0098] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angle of rotation of the electronic device 100 can be detected by the gyroscope sensor 180B. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of shaking of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and lets the lens offset the shaking of the electronic device 100 by reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and motion sensing game scenarios.
[0099] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude, assists in positioning and navigation by using the air pressure value measured by the barometric pressure sensor 180C.
[0100] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can detect the opening and closing of a flip cover with the magnetic sensor 180D. 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. In turn, according to the detected opening and closing state of the cover or the opening and closing state of the flip cover, the electronic device 100 can set features such as automatic unlocking of the flip cover.
[0101] The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 100 in various directions (typically three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. The acceleration sensor 180E can also be used to identify the posture of the electronic device, which can be applied to landscape / portrait switching, pedometers, and other applications.
[0102] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance by infrared or laser. In some embodiments, in a shooting scenario, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.
[0103] The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. The electronic device 100 emits infrared light outwardly through the light emitting diode. The electronic device 100 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that a user is holding the electronic device 100 close to the ear for a call, so as to automatically turn off the screen for the purpose of power saving. The proximity light sensor 180G can also be used for automatic unlocking and locking of the screen in a case mode or a pocket mode.
[0104] The ambient light sensor 180K is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the display screen 194 brightness according to the sensed ambient light brightness. The ambient light sensor 180K can also be used to automatically adjust white balance when taking a picture. The ambient light sensor 180K can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in a pocket to prevent accidental touch.
[0105] The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application lock, fingerprint photographing, fingerprint answering a call, and the like.
[0106] The temperature sensor 180I is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180I to implement a temperature handling strategy. For example, when the temperature reported by the temperature sensor 180I exceeds a threshold value, the electronic device 100 reduces the performance of a processor located near the temperature sensor 180I in order to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold value, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 caused by low temperature. In other embodiments, when the temperature is lower than yet another threshold value, the electronic device 100 performs voltage boosting on the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
[0107] The touch sensor 180J, also referred to as a "touch panel". The touch sensor 180J can be disposed on the display screen 194, and the touch sensor 180J and the display screen 194 together form a touch screen, also referred to as a "touch screen". The touch sensor 180J is used to detect a touch operation acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the touch event type. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180J can also be disposed on the surface of the electronic device 100, which is different from the position where the display screen 194 is located.
[0108] The bone conduction sensor 180L can acquire a vibration signal. In some embodiments, the bone conduction sensor 180L can acquire a vibration signal of a human body sound part vibration bone block. The bone conduction sensor 180L can also contact a human body pulse to receive a blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180L can also be arranged in an earphone to form a bone conduction earphone. The audio module 170 can analyze a voice signal based on the vibration signal of the sound part vibration bone block acquired by the bone conduction sensor 180L to realize a voice function. The application processor can analyze heart rate information based on the blood pressure pulsation signal acquired by the bone conduction sensor 180L to realize a heart rate detection function.
[0109] The key 190 includes a power on key, a volume key, and the like. The key 190 can be a mechanical key. It can also be a touch key. The electronic device 100 can receive a key input to generate a key signal input related to user settings and function control of the electronic device 100.
[0110] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts and also for touch vibration feedback. For example, touch operations for different applications (such as taking pictures, playing audio, and the like) can correspond to different vibration feedback effects. Touch operations on different regions of the display screen 194 can also correspond to different vibration feedback effects of the motor 191. Different application scenarios (such as time reminders, received messages, alarms, games, and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0111] The indicator 192 can be an indicator light that can be used to indicate a charging state, a power change, and can also be used to indicate a message, a missed call, a notification, and the like.
[0112] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 195 to realize contact and separation with the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. The same SIM card interface 195 can simultaneously insert multiple cards. 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 storage cards. The electronic device 100 interacts with a network through a SIM card to realize functions such as calls and data communication. 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.
[0113] It should be noted that the first device or the second device mentioned in the embodiments of the present application can also include more or less modules in the electronic device 100.
[0114] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take the Android system with a layered architecture as an example to exemplarily illustrate the software structure of the electronic device 100.
[0115] The software structure of the device related to the embodiments of the present application is introduced as follows:
[0116] FIG. 7 is a software structure block diagram of the electronic device 100 provided by the embodiments of the present application. The layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and the system library, and the kernel layer. The application layer can include a series of application packages.
[0117] For example, as shown in FIG. 7, the application package can include but is not limited to one or more of the following applications: camera, gallery, calendar, call, map, navigation, WLAN, search, music, video, short message.
[0118] The application framework layer provides the application programming interface (API) and the programming framework for the applications of the application layer. The application framework layer includes some pre-defined functions.
[0119] As shown in FIG. 7, the application framework layer can include but is not limited to one or more of the following: window manager, content provider, view system, phone manager, resource manager, notification manager, etc.
[0120] The window manager is used to manage the window program. For example, the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and intercept the screen, etc.
[0121] The content provider is used to store and obtain data, and make the data accessible to the applications. For example, the data can include video, image, audio, dialed and received calls, browsing history and bookmarks, phonebook, etc.
[0122] The view system includes visual controls, such as controls that display text, controls that display pictures, and the like. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface that includes a short message notification icon can include a view that displays text and a view that displays a picture.
[0123] The telephony manager is used to provide communication functions of the electronic device 100. For example, management of a call state (including call connection, call hang-up, and the like).
[0124] The resource manager provides various resources for an application, such as localized strings, icons, pictures, layout files, video files, and the like.
[0125] The notification manager enables an application to display notification information in a status bar, which can be used to convey a message of an informing type that can automatically disappear after a short stay without user interaction. For example, the notification manager is used to inform of a download completion, a message reminder, and the like. The notification manager can also be a notification that appears in a top status bar of a system in a form of a graph or a scroll bar text, a notification of an application that is running in the background, or a notification that appears on a screen in a form of a dialog window. For example, a text information is prompted in a status bar, a prompt sound is emitted, the electronic device is vibrated, an indicator light blinks, and the like.
[0126] The Android runtime includes a core library and a virtual machine. The Android runtime is responsible for scheduling and management of the Android system.
[0127] The core library includes two parts: one part is a function function that is required to be called by the java language, and the other part is the core library of the Android.
[0128] The application layer and the application framework layer are executed in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer as binary files. For example, the virtual machine is used to perform functions of management of an object life cycle, stack management, thread management, security and exception management, and garbage collection.
[0129] The system library can include a plurality of function modules. For example, one or more of the following can be included, but are not limited to: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a 2D graphics engine (for example: SGL), and the like.
[0130] The surface manager is used to manage a display subsystem and provides fusion of 2D and 3D layers for a plurality of applications.
[0131] The media library supports a variety of commonly used audio, video format playback and recording, and static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0132] The three-dimensional graphics processing library is used to implement three-dimensional graphics drawing, image rendering, synthesis, and layer processing, etc.
[0133] The 2D graphics engine is a drawing engine for 2D drawing.
[0134] The kernel layer is a layer between hardware and software. For example, the kernel layer can include but is not limited to one or more of the following: display driver, camera driver, audio driver, sensor driver.
[0135] The device positioning method and apparatus will be further described below with reference to the accompanying drawings. It can be understood that the first device is taken as an example of the execution subject of the interaction in the present application, but the present application does not limit the execution subject of the interaction. For example, the method executed by the first device in the present application can also be implemented by a communication / processing module in the first device or a circuit or chip responsible for communication / processing functions in the first device, or a logic node, logic module or software capable of implementing all or part of the functions of the first device.
[0136] Please refer to FIG. 8, which is a flowchart of a device positioning method according to an embodiment of the present application. In the method, the first device measures a first plane angle and a first pitch angle of the first device relative to a horizontal plane, the first plane angle being an included angle between a long side of the first device and a first straight line, the first straight line being a line connecting the first device and the second device.
[0137] 801. The first device measures a first plane angle and a first pitch angle of the first device relative to a horizontal plane, the first plane angle being an included angle between a long side of the first device and a first straight line, the first straight line being a line connecting the first device and the second device.
[0138] In the embodiment of the present application, the first device can measure the first pitch angle of the first device relative to the horizontal plane through its own sensor. Alternatively, the first device can measure the first pitch angle of the first device relative to the horizontal plane through other means, which is not limited in the embodiment of the present application.
[0139] In the embodiment of the present application, the first plane angle is an included angle between a long side of the first device and a first straight line, the first straight line being a line connecting the first device and the second device. For example, the first straight line can be a line connecting a top microphone of the first device and a loudspeaker of the second device. Alternatively, the first straight line can be a line connecting a bottom microphone of the first device and the loudspeaker of the second device. Alternatively, the first straight line can be a line connecting any point on the first device and any point on the second device.
[0140] Optionally, the second device can periodically send the ultrasonic signal. The first device can measure the first plane angle by measuring the ultrasonic signal sent by the second device. For example, after the user starts the function of searching for the second device on the first device, the first device can inform the second device to periodically send the ultrasonic signal. The first device receives the ultrasonic signal through two microphones, and measures the first plane angle based on the ultrasonic signal received by the two microphones. The implementation principle of the first device measuring the first plane angle can refer to the implementation principle of the mobile phone determining the plane angle β in the foregoing, which is not described herein again. Alternatively, the first device can also measure the first plane angle through other manners, which is not limited by the embodiments of the present application.
[0141] For example, as shown in FIG. 9, it is assumed that a three-dimensional coordinate system is established with the coordinates of the first device as the origin (0, 0, 0) and the long side (the line connecting the bottom to the top of the first device) of the first device as the X axis. The coordinates of the second device in the current coordinate system are (x1, y1, z1). As shown in FIG. 9, the first device measures the first plane angle β1 and the first pitch angle of the first device relative to the horizontal plane α1. The first device can record the first plane angle and the first pitch angle after measuring the first plane angle and the first pitch angle for subsequent use.
[0142] In a possible embodiment, the implementation of the first device measuring the first plane angle and the first pitch angle of the first device relative to the horizontal plane can include the following two manners:
[0143] 1) In the case that the straight-line distance between the first device and the second device is less than or equal to the first threshold, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured.
[0144] The straight-line distance between the first device and the second device refers to the length of the line connecting the first device and the second device. For example, as shown in FIG. 9, the straight-line distance between the first device and the second device is d1.
[0145] Optionally, the straight-line distance between the first device and the second device can be determined by measuring the ultrasonic signal sent by the second device, or determined through other manners, which is not limited by the embodiments of the present application.
[0146] For example, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured only when the straight-line distance between the first device and the second device is less than or equal to 5 meters. That is, in the case where the straight-line distance between the first device and the second device is less than or equal to the first threshold value, the user is guided to find the second device by performing steps 801-803 of the present application. In the case where the straight-line distance between the first device and the second device is greater than the first threshold value, other ways can be used to guide the user to find the second device, such as guiding the user to find the second device only by the included angle between the long side of the first device and the device connecting line (the connecting line between the first device and the second device).
[0147] When the straight-line distance between the first device and the second device is small, guiding the user to find the second device only by the included angle between the long side of the first device and the device connecting line (the connecting line between the first device and the second device) cannot accurately guide the user to find the second device. By combining the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device when the straight-line distance between the first device and the second device is small, the user is guided to find the second device, which is conducive to more accurately guiding the user to find the second device.
[0148] 2) In the case where the straight-line distance between the first device and the second device is less than or equal to the first threshold value and greater than or equal to the second threshold value for a continuous preset time period, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured, the first threshold value being greater than the second threshold value.
[0149] For example, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured only when the straight-line distance between the first device and the second device is less than or equal to 5 meters and greater than or equal to 3 meters for 5 minutes. That is, the user can linger in a position less than or equal to 5 meters and greater than or equal to 3 meters from the second device for a relatively long period of time. It is possible that the user lingers in a position for a relatively long period of time because the user cannot find the second device. Therefore, by combining the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device in the case where the straight-line distance between the first device and the second device is less than or equal to the first threshold value and greater than or equal to the second threshold value for a continuous preset time period, the user is guided to find the second device, which is conducive to more accurately guiding the user to find the second device.
[0150] In another possible embodiment, the first device can also direct the user to search for the second device by performing steps 801-803 of the present application by default. That is, without determining whether the straight-line distance between the first device and the second device is less than or equal to the first threshold value or the straight-line distance between the first device and the second device is less than or equal to the first threshold value and greater than or equal to the second threshold value for a continuous preset time period, the first device can directly perform steps 801-803 of the present application.
[0151] 802. After the first device is rotated up and down, the first device measures a second plane angle and a second pitch angle of the first device relative to the horizontal plane, the second plane angle being an included angle between the long side of the first device after the first device is rotated up and down and the first straight line.
[0152] In the embodiment of the present application, the user can rotate the first device up and down. For example, taking the first device as a mobile phone as an example. As shown in FIG. 10, the user can rotate the mobile phone around a line perpendicular to the long side of the mobile phone, and the top of the mobile phone and the bottom of the mobile phone swing up and down.
[0153] For example, as shown in FIG. 9, it is assumed that a three-dimensional coordinate system is established with the coordinates of the first device as the origin (0, 0, 0) and the long side (the line connecting the bottom to the top of the first device) of the first device as the X axis. The coordinates of the second device in the current coordinate system are (x1, y1, z1). As shown in FIG. 9, the first device measures a first plane angle β1 and a first pitch angle α1 of the first device relative to the horizontal plane. As shown in FIG. 11, after the first device is rotated up and down, the first device measures a second plane angle β2 and a second pitch angle α2 of the first device relative to the horizontal plane. The coordinates of the second device in the new coordinate system become (x2, y2, z2). The straight-line distance between the first device and the second device is d1.
[0154] In a possible embodiment, if a change in the pitch angle of the first device relative to the horizontal plane is not detected, a second prompt signal is output, the second prompt signal being used to prompt the first device to be rotated up and down. If a change in the pitch angle of the first device relative to the horizontal plane is not detected, it indicates that the user does not rotate the first device up and down, and therefore the user can be prompted to rotate the first device up and down. Based on this possible embodiment, it is beneficial for the first device to successfully measure the second plane angle and the second pitch angle of the first device after the first device is rotated up and down.
[0155] In another possible embodiment, the first device can directly output a second prompt signal after measuring the first plane angle and the second pitch angle, so that the user rotates the first device up and down.
[0156] 803、The first device outputs a first prompt signal based on the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device, the first prompt signal being used to guide the user to find the second device.
[0157] In a possible embodiment, the first prompt signal prompts one or more of the following information: the three-dimensional coordinates of the second device, the planar distance between the first device and the second device on the plane where the screen of the first device is located, the planar distance between the first device and the second device on the horizontal plane, the third plane angle, the fourth plane angle, the third pitch angle of the second device relative to the plane where the screen of the first device is located, the fourth pitch angle of the second device relative to the horizontal plane, and the height of the second device relative to the first device.
[0158] For example, the first device can display one or more of the following information on the screen: the three-dimensional coordinates of the second device, the planar distance between the first device and the second device on the plane where the screen of the first device is located, the planar distance between the first device and the second device on the horizontal plane, the third plane angle, the fourth plane angle, the third pitch angle of the second device relative to the plane where the screen of the first device is located, the fourth pitch angle of the second device relative to the horizontal plane, and the height of the second device relative to the first device. Alternatively, the first device can broadcast one or more of the following information through voice: the three-dimensional coordinates of the second device, the planar distance between the first device and the second device on the plane where the screen of the first device is located, the planar distance between the first device and the second device on the horizontal plane, the third plane angle, the fourth plane angle, the third pitch angle of the second device relative to the plane where the screen of the first device is located, the fourth pitch angle of the second device relative to the horizontal plane, and the height of the second device relative to the first device.
[0159] 1. The three-dimensional coordinates of the second device
[0160] In a possible embodiment, the three-dimensional coordinates of the second device are the three-dimensional coordinates of the second device in a first coordinate system or a second coordinate system; the first coordinate system is a coordinate system with the long side of the first device as the X axis, and the second coordinate system is a coordinate system with the projection of the long side of the first device on the horizontal plane as the X axis.
[0161] For example, FIGS. 11 and 12 are coordinate systems with the long side of the first device as the X axis. The three-dimensional coordinates of the second device in the coordinate system are (x2, y2, z2).
[0162] For another example, FIG. 13 is a coordinate system with the projection of the long side of the first device on the horizontal plane as the X axis. The three-dimensional coordinates of the second device in the coordinate system are (x3, y3, z3).
[0163] 2. The planar distance between the first device and the second device on the plane where the screen of the first device is located
[0164] For example, as shown in FIG. 12, FIG. 12 is a coordinate system with the long side of the first device as the X axis. In this coordinate system, point A is the projection of the second device on the plane of the screen of the first device. The planar distance between the first device and the second device on the plane of the screen of the first device is the distance between the first device and point A, i.e., d2.
[0165] 3. Planar distance between the first device and the second device on the horizontal plane
[0166] For example, as shown in FIG. 13, FIG. 13 is a coordinate system with the projection of the long side of the first device on the horizontal plane as the X axis. In this coordinate system, point A is the projection of the second device on the horizontal plane. The planar distance between the first device and the second device on the horizontal plane is the distance between the first device and point A, i.e., d3.
[0167] 4. Third plane angle
[0168] The third plane angle is the angle between the long side of the first device and the second straight line, which is the straight line obtained by projecting the first straight line on the plane of the screen of the first device, or the third plane angle is the angle obtained by projecting the second plane angle on the plane of the screen of the first device.
[0169] For example, as shown in FIG. 12, FIG. 12 is a coordinate system with the long side of the first device as the X axis. In this coordinate system, point A is the projection of the second device on the plane of the screen of the first device. The straight line obtained by projecting the first straight line on the plane of the screen of the first device is the straight line between the first device and point A, i.e., the second straight line is the straight line between the first device and point A. The third plane angle is the angle between the long side of the first device and the second straight line, i.e., the third plane angle is
[0170] 5. Fourth plane angle
[0171] The fourth plane angle is the angle between the straight line obtained by projecting the long side of the first device on the horizontal plane and the straight line obtained by projecting the first straight line on the horizontal plane, or the fourth plane angle is the angle obtained by projecting the second plane angle on the horizontal plane.
[0172] For example, as shown in FIG. 13, FIG. 13 is a coordinate system with the projection of the long side of the first device on the horizontal plane as the X axis. In this coordinate system, point A is the projection of the second device on the horizontal plane. The straight line obtained by projecting the first straight line on the horizontal plane is the straight line between the first device and point A, i.e., the fourth plane angle is
[0173] 6. Third pitch angle of the second device relative to the plane of the screen of the first device
[0174] For example, as shown in FIG. 12, FIG. 12 is a coordinate system with the long side of the first device as the X axis. In the coordinate system, point A is the projection of the second device on the plane of the screen of the first device. The third pitch angle of the second device relative to the plane of the screen of the first device is a3.
[0175] 7. The fourth pitch angle of the second device relative to the horizontal plane
[0176] For example, as shown in FIG. 13, FIG. 13 is a coordinate system with the projection of the long side of the first device on the horizontal plane as the X axis. In the coordinate system, point A is the projection of the second device on the horizontal plane. The fourth pitch angle of the second device relative to the horizontal plane is a4.
[0177] 8. The height of the second device relative to the first device
[0178] For example, as shown in FIG. 13, FIG. 13 is a coordinate system with the projection of the long side of the first device on the horizontal plane as the X axis. In the coordinate system, point A is the projection of the second device on the horizontal plane. The height of the second device relative to the first device is h, h = z3.
[0179] By prompting the three-dimensional coordinates of the second device, the planar distance between the first device and the second device on the plane of the screen of the first device, the planar distance between the first device and the second device on the horizontal plane, the third plane angle, the fourth plane angle, the third pitch angle of the second device relative to the plane of the screen of the first device, the fourth pitch angle of the second device relative to the horizontal plane, or the height of the second device relative to the first device, it is beneficial for the user to determine the real direction of the second device, and it is convenient for the user to find the second device.
[0180] In another possible embodiment, the first prompt signal can also not directly prompt one or more of the above-mentioned eight information (i.e., the three-dimensional coordinates of the second device, the planar distance between the first device and the second device on the plane of the screen of the first device, the planar distance between the first device and the second device on the horizontal plane, the third plane angle, the fourth plane angle, the third pitch angle of the second device relative to the plane of the screen of the first device, the fourth pitch angle of the second device relative to the horizontal plane, and the height of the second device relative to the first device). For example, after the first device determines one or more of the above-mentioned eight information based on the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device, a navigation map including the position of the second device can be displayed, and the position of the second device in the navigation map is displayed based on one or more of the above-mentioned eight information.
[0181] In a possible embodiment, the outputting the first prompt signal based on the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device includes: determining a pitch angle difference, the pitch angle difference being a difference between the first pitch angle and the second pitch angle; and outputting the first prompt signal based on the pitch angle difference, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device.
[0182] For example, taking FIG. 12 as an example, how to determine the three-dimensional coordinates (x2, y2, z2) of the second device in the coordinate system, the planar distance d2 between the first device and the second device on the plane where the screen of the first device is located, and the third plane angle The implementation principle of the third pitch angle a3 of the second device relative to the plane where the screen of the first device is located is introduced as follows:
[0183] As shown in FIG. 9, FIG. 9 takes the long side of the first device as the X-axis of the coordinate system. The first device measures the straight-line distance d1 between the first device and the second device, and measures the first plane angle b1 and the first pitch angle a1. The coordinates of the second device in the current coordinate system are (x1, y1, z1). Wherein, x1=d1*cos b1, y1=0, and z1=d1*sin b1. 2 2 2 2
[0184] After the first device is rotated upward and downward, as shown in FIG. 12, the first plane angle b2 and the first pitch angle a2 are measured. The coordinates of the second device in the current coordinate system are (x2, y2, z2). Assuming that the pitch angle difference between the first pitch angle and the second pitch angle is q, then q=a2-a1. The rotation matrix is
[0185] In the coordinate system shown in FIG. 12, Therefore, it can be obtained that x2=x1 cos q+z1 sin q=d1 cos b2. y2 2 2 2 2 Wherein,
[0186] The planar distance d2 between the first device and the second device on the plane where the screen of the first device is located
[0187] The third plane angle wherein,
[0188] the third pitch angle a3=tan -1 (z2 / d2).
[0189] For example, as shown in FIG. 13, the following describes how to determine the three-dimensional coordinates (x3, y3, z3) of the second device in the coordinate system, the planar distance d3 between the first device and the second device in the horizontal plane, the fourth planar angle the fourth pitch angle a4 of the second device relative to the horizontal plane, and the height h of the second device relative to the first device:
[0190] As shown in FIG. 9, the coordinates of the second device in the coordinate system with the long side of the first device as the X-axis are (x1, y1, z1). The first pitch angle of the first device is a1, and then the first device is rotated by -a1, so that the coordinates (x3, y3, z3) of the second device in the second coordinate system are obtained, and the second coordinate system is a coordinate system with the projection of the long side of the first device on the horizontal plane as the X-axis. Therefore, Therefore, x3=x1cos-a1+z1sin-a1, y3=y1, z3=-x1sin-a1+z1cos-a1. Wherein, x1=d1*cosb1; z1=(d1cosb2-d1cosb1cosq) / sinq,
[0191] the planar distance d3 between the first device and the second device in the horizontal plane
[0192] the fourth planar angle wherein,
[0193] the fourth pitch angle a4=tan -1 (z3 / d3).
[0194] the height h of the second device relative to the first device is h=z3.
[0195] It can be seen that, based on the pitch angle difference, the first planar angle, the second planar angle, and the straight-line distance between the first device and the second device, the information prompted by the first prompt signal can be accurately determined.
[0196] In a possible implementation, in a case where the straight-line distance between the first device and the second device is less than a third threshold value, the first device determines whether to prompt the first item or the multiple items among the following information based on a fifth pitch angle of the second device relative to the plane on which the screen of the first device is located or a sixth pitch angle of the second device relative to the horizontal plane: that the second device is located above or below the first device, the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located, the sixth pitch angle of the second device relative to the horizontal plane, and the height of the second device relative to the first device.
[0197] In a possible implementation, in a case where the straight-line distance between the first device and the second device is less than a third threshold value, the first device determines whether to prompt the first item or the multiple items among the following information based on a fifth pitch angle of the second device relative to the plane on which the screen of the first device is located or a sixth pitch angle of the second device relative to the horizontal plane: that the second device is located above or below the first device, the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located, the sixth pitch angle of the second device relative to the horizontal plane, and the height of the second device relative to the first device.
[0198] For example, when the straight-line distance between the first device and the second device is less than 2 m, if the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located or the sixth pitch angle of the second device relative to the horizontal plane that is currently measured by the first device is greater than 45°, it is prompted that the second device is located above the first device. If the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located or the sixth pitch angle of the second device relative to the horizontal plane that is currently measured by the first device is less than -45°, it is prompted that the second device is located below the first device.
[0199] For example, when the straight-line distance between the first device and the second device is less than 2 m, if the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located or the sixth pitch angle of the second device relative to the horizontal plane that is currently measured by the first device is greater than 45° or less than 45°, it is prompted that the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located, the sixth pitch angle of the second device relative to the horizontal plane, and the height of the second device relative to the first device.
[0200] When the user is close to the second device, by prompting that the second device is located above or below the first device, the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located, the sixth pitch angle of the second device relative to the horizontal plane, or the height of the second device relative to the first device, the user can accurately find the second device.
[0201] It can be seen that, based on the method described in FIG. 8, the first device can guide the user to find the second device in combination with multiple information, which is conducive to more accurately guiding the user to find the second device.
[0202] The present application provides a device positioning apparatus, which can be used to implement the functions of the first device. The device positioning apparatus can be the first device. The device positioning apparatus includes modules or units corresponding to the methods / operations / steps / actions performed by the first device in the method embodiments, which can be hardware circuits, software, or a combination of hardware circuits and software. Please refer to FIG. 14, which is a structural schematic diagram of a device positioning apparatus 1400 provided by an embodiment of the present application. The device positioning apparatus 1400 can include a measurement unit 1401 and an output unit 1402. Wherein:
[0203] The measurement unit 1401 is configured to measure a first plane angle and a first pitch angle of the first device relative to a horizontal plane, the first plane angle being an included angle between a long side of the first device and a first straight line, the first straight line being a line connecting the first device and the second device;
[0204] The measurement unit 1401 is further configured to measure a second plane angle and a second pitch angle of the first device relative to the horizontal plane after the first device is rotated up and down, the second plane angle being an included angle between the long side of the first device after the first device is rotated up and down and the first straight line;
[0205] The output unit 1402 is configured to output a first prompt signal based on the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and a straight-line distance between the first device and the second device, the first prompt signal being used to guide the user to find the second device.
[0206] In a possible embodiment, the first prompt signal prompts one or more of the following information: a three-dimensional coordinate of the second device, a plane distance between the first device and the second device in a plane where a screen of the first device is located, a plane distance between the first device and the second device in the horizontal plane, a third plane angle, a fourth plane angle, a third pitch angle of the second device relative to the plane where the screen of the first device is located, a fourth pitch angle of the second device relative to the horizontal plane, a height of the second device relative to the first device;
[0207] Wherein, the third plane angle is an included angle between the long side of the first device and a second straight line, the second straight line being a straight line of the first straight line projected on the plane where the screen of the first device is located, or the third plane angle is an angle of the second plane angle projected on the plane where the screen of the first device is located;
[0208] The fourth plane angle is an angle between a straight line of the long side of the first device projected on the horizontal plane and a straight line of the first straight line projected on the horizontal plane, or the fourth plane angle is an angle of the second plane angle projected on the horizontal plane.
[0209] In a possible embodiment, the three-dimensional coordinate of the second device is a three-dimensional coordinate of the second device in the first coordinate system or the second coordinate system; the first coordinate system is a coordinate system with the long side of the first device as the X axis, and the second coordinate system is a coordinate system with the projection of the long side of the first device on the horizontal plane as the X axis.
[0210] In a possible embodiment, the output unit 1402 is configured to output a second prompt signal if no change in the pitch angle of the first device relative to the horizontal plane is detected after measuring the first plane angle and the first pitch angle of the first device relative to the horizontal plane and before measuring the second plane angle and the second pitch angle of the first device relative to the horizontal plane, the second prompt signal being used to prompt the up-down rotation of the first device.
[0211] In a possible embodiment, the measurement unit 1401 measures the first plane angle and the first pitch angle of the first device relative to the horizontal plane, including:
[0212] In a case where the straight-line distance between the first device and the second device is less than or equal to the first threshold, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured; or
[0213] In a case where the straight-line distance between the first device and the second device is less than or equal to the first threshold and greater than or equal to the second threshold for a continuous preset time period, the first plane angle and the first pitch angle of the first device relative to the horizontal plane are measured, the first threshold being greater than the second threshold.
[0214] In a possible embodiment, the output unit 1402 outputs the first prompt signal based on the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device, including:
[0215] The pitch angle difference is determined, the pitch angle difference being a difference between the first pitch angle and the second pitch angle.
[0216] The first prompt signal is output based on the pitch angle difference, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device.
[0217] In a possible implementation, the output unit 1402 is further configured to determine whether to prompt one or more of the following pieces of information: that the second device is above or below the first device, the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located, the sixth pitch angle of the second device relative to the horizontal plane, and the height of the second device relative to the first device, based on the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located or the sixth pitch angle of the second device relative to the horizontal plane, in a case where the straight-line distance between the first device and the second device is less than a third threshold value.
[0218] In each of the embodiments of the present application, the terms and / or descriptions of different embodiments are consistent and can be referred to each other if there is no special description and logical conflict, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationship.
[0219] It can be understood that the various numerical numbers involved in the embodiments of the present application are only for convenient differentiation, and are not used to limit the scope of the embodiments of the present application. The size of the serial numbers of the above processes does not mean the order of execution, and the execution order of the processes should be determined according to their functions and inherent logic.
[0220] The embodiments of the present application also provide a computer readable storage medium, which stores computer execution instructions, when the computer execution instructions are executed, the method executed by the first device in the method embodiments is realized.
[0221] The embodiments of the present application also provide a computer program product, which includes a computer program, when the computer program is executed, the method executed by the first device in the method embodiments is realized.
[0222] The embodiments of the present application also provide a communication system, which includes the first device or the second device. Wherein, the first device is used to execute the method executed by the first device in the method embodiments.
[0223] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the order of the described actions, because according to the present application, certain steps can be performed in other order or at the same time. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily the necessary of the present application.
[0224] The descriptions of the various embodiments provided in the present application can be referred to each other, and the descriptions of the various embodiments are each focused on. The parts not described in detail in a certain embodiment can be referred to the related descriptions of other embodiments. For the convenience and brevity of description, for example, the functions of the various devices and equipment provided in the embodiments of the present application and the steps performed can be referred to the related descriptions of the method embodiments of the present application, and the various method embodiments can also be referred to, combined or cited each other.
[0225] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A device positioning method applied to a first device, comprising: The method comprises: measuring a first plane angle between a long side of the first device and a first straight line and a first tilt angle of the first device relative to a horizontal plane; after rotating the first device up and down, measuring a second plane angle between the long side of the first device after rotating up and down and the first straight line and a second tilt angle of the first device relative to the horizontal plane; based on the first tilt angle, the second tilt angle, the first plane angle, the second plane angle, and a straight-line distance between the first device and the second device, outputting a first prompt signal for guiding a user to find the second device.
2. The method of claim 1, wherein, The first prompt signal prompts one or more of the following information: three-dimensional coordinates of the second device, a plane distance between the first device and the second device in a plane of a screen of the first device, a plane distance between the first device and the second device in a horizontal plane, a third plane angle, a fourth plane angle, a third tilt angle of the second device relative to the plane of the screen of the first device, a fourth tilt angle of the second device relative to the horizontal plane, and a height of the second device relative to the first device; wherein the third plane angle is an angle between the long side of the first device and a second straight line, the second straight line being a straight line of the first straight line projected on the plane of the screen of the first device, or the third plane angle is an angle of the second plane angle projected on the plane of the screen of the first device; wherein the fourth plane angle is an angle between a straight line of the long side of the first device projected on the horizontal plane and a straight line of the first straight line projected on the horizontal plane, or the fourth plane angle is an angle of the second plane angle projected on the horizontal plane.
3. The method of claim 2, wherein, The three-dimensional coordinates of the second device are three-dimensional coordinates of the second device in a first coordinate system or a second coordinate system; the first coordinate system is a coordinate system with the long side of the first device as the X-axis, and the second coordinate system is a coordinate system with a projection of the long side of the first device on the horizontal plane as the X-axis.
4. The method according to any one of claims 1 to 3, characterized in that, After the measurement of the first plane angle and the first tilt angle of the first device relative to the horizontal plane, and before the measurement of the second plane angle and the second tilt angle of the first device relative to the horizontal plane, the method further comprises: if no change in the tilt angle of the first device relative to the horizontal plane is detected, outputting a second prompt signal for prompting the first device to be rotated up and down.
5. The method according to any one of claims 1 to 4, characterized in that, The measurement of the first plane angle and the first tilt angle of the first device relative to the horizontal plane comprises: in a case where the straight-line distance between the first device and the second device is less than or equal to a first threshold, measuring the first plane angle and the first tilt angle of the first device relative to the horizontal plane; or In a case where a straight-line distance between the first device and the second device is less than or equal to a first threshold value and greater than or equal to a second threshold value for a preset time period, a first plane angle and a first pitch angle of the first device relative to a horizontal plane are measured, the first threshold value being greater than the second threshold value.
6. The method according to any one of claims 1 to 5, characterized in that, The first prompt signal is output based on the first pitch angle, the second pitch angle, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device, including: A pitch angle difference is determined, the pitch angle difference being a difference between the first pitch angle and the second pitch angle; The first prompt signal is output based on the pitch angle difference, the first plane angle, the second plane angle, and the straight-line distance between the first device and the second device.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: In a case where the straight-line distance between the first device and the second device is less than a third threshold value, whether to prompt the first item or more of the following information is determined based on a fifth pitch angle of the second device relative to a plane on which a screen of the first device is located or a sixth pitch angle of the second device relative to a horizontal plane: whether the second device is above or below the first device, the fifth pitch angle of the second device relative to the plane on which the screen of the first device is located, the sixth pitch angle of the second device relative to the horizontal plane, or a height of the second device relative to the first device.
8. A device positioning apparatus, characterized by, A device for performing the method of any one of claims 1 to 7 is included.
9. An electronic device, comprising: A processor coupled with a memory is included, and the processor is configured to execute computer programs or instructions stored in the memory to enable the electronic device to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores computer programs or instructions, which, when executed by a device positioning apparatus, implement the method of any one of claims 1 to 7.
11. A computer program product comprising computer programs or instructions, characterized in that, The computer programs or instructions, when executed by a device positioning apparatus, implement the method of any one of claims 1 to 7. The computer programs or instructions, when executed by a device positioning apparatus, implement the method of any one of claims 1 to 7.
Citation Information
Patent Citations
Control system and touch device for portable equipment
CN104238939A
Intelligent equipment positioning method and intelligent equipment
CN112098937A
Device interaction method, position determination method, electronic device and chip system
CN114895244A
Method and electronic device for guiding a user
CN115914988A
Method for measuring directional angle between devices and related device
CN117640816A