Method, system and apparatus for spatial position determination
By transmitting analog audio signals through speakers and microphones, the problem of spatial location determination delay caused by electronic device networking authentication in existing technologies is solved, enabling rapid spatial location determination and collaborative operation between devices.
Patent Information
- Application Number
- CN202211393980.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-08
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2042-11-08
AI Technical Summary
In existing technologies, electronic devices need to complete networking and authentication before determining their spatial location, resulting in high latency in spatial location determination.
By transmitting analog audio signals through speakers and microphones, spatial location can be determined directly without networking or authentication. The relative position and distance between devices can be determined by using the analog audio signals to carry preset information.
It enables the rapid determination of the spatial location between electronic devices without network authentication, reducing time delays and improving the efficiency of collaborative operation between devices.
Smart Images

Figure CN118033541B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminals, and more particularly to a method, system and device for determining spatial location. Background Technology
[0002] Currently, ultrasound is a type of sound wave, specifically a sound wave with a frequency higher than 20 kHz that is inaudible to the human ear. Ultrasound has good directionality, can propagate in a specific direction, and can be directionally collected. Therefore, spatial positions such as the distance and angle between two electronic devices can be determined using methods like TOA (Time of Arrival) or TDOA (Time Difference of Arrival). However, before determining spatial positions, the two electronic devices must first complete networking and authentication. Two electronic devices that have not completed networking and authentication cannot have their spatial positions determined. Summary of the Invention
[0003] In view of the above, it is necessary to provide a method, system and device for determining spatial location, which can directly determine spatial location without networking and authentication.
[0004] In a first aspect, one embodiment of this application provides a spatial location determination method applied to a system including a first electronic device and a second electronic device. The method includes: the second electronic device controlling a speaker to play a first analog audio signal, the first analog audio signal indicating that the second electronic device is online; the first electronic device controlling a microphone to collect the first analog audio signal, and in response to the first analog audio signal controlling the speaker to play a second analog audio signal according to pre-stored subscription information, the second analog audio signal requesting the determination of spatial location between the electronic devices; the second electronic device controlling the microphone to collect the second analog audio signal, and determining the spatial location between the second electronic device and the first electronic device based on the second analog audio signal; the second electronic device generating a third analog audio signal based on the spatial location between the second electronic device and the first electronic device, and controlling the speaker to play the third analog audio signal, the third analog audio signal notifying the spatial location between the second electronic device and the first electronic device; and the first electronic device controlling the microphone to collect the third analog audio signal, and obtaining the spatial location between the second electronic device and the first electronic device through the third analog audio signal.
[0005] In a first aspect of this application, a second electronic device plays a first analog audio signal through a speaker, and a first electronic device acquires the first analog audio signal through a microphone. This eliminates the need for prior network authentication between the first and second electronic devices. The first analog audio signal can be directly transmitted from the second electronic device to the first electronic device via the speaker and microphone, and the first electronic device can begin detecting the relative position between the two devices. The first electronic device then plays a second analog audio signal through a speaker, and the second electronic device acquires the second analog audio signal through a microphone. This allows the second electronic device to receive the second analog audio signal and determine the relative position between itself and the first electronic device based on the received signal. Finally, the second electronic device plays a third analog audio signal through a speaker, and the first electronic device acquires the third analog audio signal through a microphone. Again, this eliminates the need for prior network authentication between the first and second electronic devices, and the relative position between them can be directly transmitted from the second electronic device to the first electronic device via the speaker and microphone. Therefore, spatial position determination can be performed directly without network authentication.
[0006] According to some embodiments of this application, the second electronic device controlling the speaker to play a first analog audio signal includes: after the second electronic device goes into sleep mode, if the motion sensor of the second electronic device detects that the motion state of the second electronic device is stopped after movement, the second electronic device controls the speaker to play the first analog audio signal. This application enables the second electronic device to control the speaker to play the first analog audio signal based on the motion state detected by the motion sensor after it has gone into sleep mode, thus achieving the goal of starting playback of the first analog audio signal when the second electronic device is in sleep mode.
[0007] According to some embodiments of this application, the second electronic device controlling the speaker to play a first analog audio signal includes: if the second electronic device detects that the target application is running, the second electronic device controls the speaker to play the first analog audio signal. This application controls the speaker to play the first analog audio signal by running the target application on the second electronic device, enabling the playback of the first analog audio signal to start when the second electronic device is not in sleep mode.
[0008] According to some embodiments of this application, before the second electronic device controls the speaker to play the first analog audio signal, the method further includes: the second electronic device performing binary encoding on preset information, and encoding the encoded binary data into the first analog audio signal, wherein the preset information is used to indicate that the second electronic device is online, and the first analog audio signal includes at least one of a first chirp signal and a second chirp signal, wherein the first chirp signal is used to represent binary code 0, and the second chirp signal is used to represent binary code 1. This application enables the first analog audio signal to carry preset information through the encoding after binary encoding.
[0009] According to some embodiments of this application, the first electronic device includes a first processor, which is in a sleep state. After the first electronic device obtains the spatial position between the second electronic device and the first electronic device through the third analog audio signal, the method further includes: the first electronic device waking up the first processor; and the first electronic device displaying the icon of the second electronic device on a screen-off basis according to the spatial position between the second electronic device and the first electronic device through the first processor. This application enables the first electronic device to determine its spatial position even after the first processor enters a sleep state, allowing for device discovery and information transmission even in a sleep scenario. Simultaneously, waking up the first processor after determining the spatial position to display the icon of the second electronic device on a screen-off basis can prompt the user in a screen-off scenario.
[0010] According to some embodiments of this application, the first electronic device displaying the icon of the second electronic device with its screen off based on the spatial position between the second electronic device and the first electronic device includes: the first electronic device determining a target display position for the icon of the second electronic device based on the spatial position between the second electronic device and the first electronic device; and the first electronic device displaying the icon of the second electronic device with its screen off at the target display position. This application enables different collaborative modes by displaying the icon of the second electronic device at different positions based on the spatial position between the second electronic device and the first electronic device.
[0011] According to some embodiments of this application, before the first electronic device controls a speaker to play a second analog audio signal according to pre-stored subscription information in response to the first analog audio signal, the method further includes: before the first processor goes into sleep mode, a target application or operating system of the first electronic device sends a subscription request to the first processor, the subscription request being used to request a first type of spatial location between the electronic devices; the first electronic device generates the subscription information through the first processor according to the subscription request; and the first electronic device saves the subscription information. This application, by having the target application or operating system subscribe to the spatial location between the electronic devices and store the spatial information between the electronic devices before the first processor goes into sleep mode, can achieve pre-stored subscription information, thereby allowing direct use of the pre-stored subscription information after the first processor goes into sleep mode.
[0012] According to some embodiments of this application, the first analog audio signal is further used to request the determination of a second type of relative position between electronic devices; the first electronic device controlling a speaker to play a second analog audio signal in response to the first analog audio signal according to pre-stored subscription information includes: if the first analog audio signal matches the pre-stored subscription information, the first electronic device controlling the speaker to play the second analog audio signal in response to the first analog audio signal according to the pre-stored subscription information. This application avoids the waste of determining spatial position when there is a mismatch by controlling the speaker to play the second analog audio signal only when the first analog audio signal matches the pre-stored subscription information.
[0013] According to some embodiments of this application, the spatial position between the electronic devices includes both the relative position between the electronic devices and the distance information between them. This application, by including both the relative position and the distance information between the electronic devices in the spatial position type, enables the determination of various spatial positions.
[0014] According to some embodiments of this application, after the first electronic device displays the icon of the second electronic device while its screen is off, the method further includes: the first electronic device cooperating with the second electronic device in response to an operation on the icon of the second electronic device. This application enables cross-device resource sharing and collaborative operation through cooperation between the first and second electronic devices.
[0015] Secondly, an embodiment of this application also provides a spatial location determination method, the method comprising: a first electronic device controlling a microphone to acquire a first analog audio signal, and responding to the first analog audio signal by controlling a speaker to play a second analog audio signal according to pre-stored subscription information, wherein the first analog audio signal is an audio signal played by the speaker of a second electronic device, the first analog audio signal being used to indicate that the second electronic device is online, and the second analog audio signal being used to request the determination of the spatial location between the electronic devices; the first electronic device controlling the microphone to acquire a third analog audio signal, the third analog audio signal being an audio signal played by the speaker of the second electronic device, the third analog audio signal being used to notify the spatial location between the second electronic device and the first electronic device; and the first electronic device obtaining the spatial location between the second electronic device and the first electronic device through the third analog audio signal.
[0016] According to some embodiments of this application, before the first electronic device controls the speaker to play a second analog audio signal according to the pre-stored subscription information in response to the first analog audio signal, the method further includes: the first electronic device decoding the first analog audio signal into binary data and decoding the binary data into preset information, wherein the first analog audio signal includes at least one of a first chirp signal and a second chirp signal, the first chirp signal being used to represent binary code 0, the second chirp signal being used to represent binary code 1, and the preset information being used to indicate that the second electronic device is online.
[0017] According to some embodiments of this application, the first electronic device includes a first processor, which is in a sleep state. After the first electronic device obtains the spatial position between the second electronic device and the first electronic device through the third analog audio signal, the method further includes: the first electronic device waking up the first processor; and the first electronic device displaying the icon of the second electronic device on a screen-off state based on the spatial position between the second electronic device and the first electronic device through the first processor.
[0018] According to some embodiments of this application, the first electronic device displays the icon of the second electronic device when the screen is off based on the spatial position between the second electronic device and the first electronic device, including: the first electronic device determining a target display position for the icon of the second electronic device based on the spatial position between the second electronic device and the first electronic device; and the first electronic device displaying the icon of the second electronic device when the screen is off at the target display position.
[0019] According to some embodiments of this application, before the first electronic device controls the speaker to play a second analog audio signal according to the pre-stored subscription information in response to the first analog audio signal, the method further includes: before the first processor goes to sleep, a target application or operating system of the first electronic device sends a subscription request to the first processor, the subscription request being used to request a first type of spatial location between the subscribing electronic devices; the first electronic device generates the subscription information according to the subscription request through the first processor; and the first electronic device saves the subscription information.
[0020] According to some embodiments of this application, the first analog audio signal is further used to request the determination of a second type of relative position between electronic devices; the first electronic device controlling a speaker to play a second analog audio signal in response to the first analog audio signal according to pre-stored subscription information includes: if the first analog audio signal matches the pre-stored subscription information, the first electronic device controlling the speaker to play the second analog audio signal in response to the first analog audio signal according to the pre-stored subscription information.
[0021] According to some embodiments of this application, the type of spatial position between the electronic devices includes the relative position between the electronic devices and the distance information between the electronic devices.
[0022] According to some embodiments of this application, after the first electronic device displays the icon of the second electronic device while the screen is off, the method further includes: the first electronic device cooperating with the second electronic device in response to an operation on the icon of the second electronic device.
[0023] Thirdly, an embodiment of this application also provides a spatial location determination method applied to a first electronic device. The first electronic device includes a first processor and a second processor, the second processor being connected to the first processor, and the power consumption of the second processor being less than that of the first processor. The method includes: the second processor controlling a microphone to acquire a first analog audio signal, and responding to the first analog audio signal by controlling a speaker to play a second analog audio signal according to pre-stored subscription information. The first analog audio signal is an audio signal played by the speaker of the second electronic device, the first analog audio signal being used to indicate that the second electronic device is online, and the second analog audio signal being used to request the determination of the spatial location between the electronic devices. The pre-stored subscription information includes subscribers; the second processor controlling the microphone to acquire a third analog audio signal, the third analog audio signal being an audio signal played by the speaker of the second electronic device, the third analog audio signal being used to notify the spatial location between the second electronic device and the first electronic device; and the second processor sending the spatial location between the second electronic device and the first electronic device in the third analog audio signal to the subscribers through the first processor.
[0024] According to some embodiments of this application, before the second processor controls the microphone to acquire the first analog audio signal, the method further includes: the first processor entering a sleep state; before the second processor sends the spatial location between the second electronic device and the first electronic device in the third analog audio signal to the subscriber through the first processor, the method further includes: the second processor waking up the first processor.
[0025] According to some embodiments of this application, before the first processor enters a sleep state, the method further includes: the subscriber sending a subscription request to the first processor, the subscription request being used to request a first type of spatial location between electronic devices; the subscriber including a target application or operating system; the first processor generating the subscription information according to the subscription request; and the first processor sending the subscription information to the second processor for storage.
[0026] According to some embodiments of this application, the first processor is an application processor and the second processor is an audio digital signal processor.
[0027] According to some embodiments of this application, before the second processor controls the speaker to play a second analog audio signal according to the pre-stored subscription information in response to the first analog audio signal, the method further includes: the second processor decoding the first analog audio signal into binary data and decoding the binary data into the preset information, wherein the first analog audio signal includes at least one of a first chirp signal and a second chirp signal, the first chirp signal being used to represent binary code 0, the second chirp signal being used to represent binary code 1, and the preset information being used to indicate that the second electronic device is online.
[0028] According to some embodiments of this application, after the second processor sends the spatial location between the second electronic device and the first electronic device in the third analog audio signal to the subscriber via the first processor, the method further includes: the first electronic device cooperating with the second electronic device.
[0029] Fourthly, an embodiment of this application also provides a spatial location determination method, the method comprising: a second electronic device controlling a speaker to play a first analog audio signal, the first analog audio signal being used to indicate that the second electronic device is online; the second electronic device controlling a microphone to collect a second analog audio signal, and determining the spatial location between the second electronic device and the first electronic device based on the second analog audio signal, the second analog audio signal being an audio signal played by the speaker of the first electronic device, the second analog audio signal being used to request the determination of the spatial location between the electronic devices; the second electronic device generating a third analog audio signal based on the spatial location between the second electronic device and the first electronic device, and controlling the speaker to play the third analog audio signal, the third analog audio signal being used to notify the second electronic device of the spatial location between the first electronic device and the second electronic device.
[0030] According to some embodiments of this application, the second electronic device controlling the speaker to play the first analog audio signal includes: after the second electronic device goes into sleep mode, if the motion sensor of the second electronic device detects that the motion state of the second electronic device is motion and then stops, the second electronic device controls the speaker to play the first analog audio signal.
[0031] According to some embodiments of this application, the second electronic device controlling the speaker to play a first analog audio signal includes: if the second electronic device detects that the target application is running, the second electronic device controls the speaker to play the first analog audio signal.
[0032] According to some embodiments of this application, before the second electronic device controls the speaker to play the first analog audio signal, the method further includes: the second electronic device performing binary encoding on preset information and encoding the encoded binary data into the first analog audio signal, wherein the preset information is used to indicate that the second electronic device is online, and the first analog audio signal includes at least one of a first chirp signal and a second chirp signal, wherein the first chirp signal is used to represent binary code 0, and the second chirp signal is used to represent binary code 1.
[0033] Fifthly, an embodiment of this application also provides a spatial location determination system, the system including a first electronic device and a second electronic device, the first electronic device being configured to perform the method described in any possible embodiment of the second aspect above, or the third aspect above, and the second electronic device being configured to perform the method described in any possible embodiment of the fourth aspect above.
[0034] In a sixth aspect, an embodiment of this application also provides an electronic device, the electronic device including at least one processor, a memory, a speaker, and a microphone; the at least one processor is coupled to the memory, the speaker, and the microphone; the memory is used to store instructions, the processor is used to execute the instructions, the speaker is used to play audio signals, and the microphone is used to acquire audio signals; when the instructions are executed by the at least one processor, the at least one processor causes the at least one processor to perform the method described in any one of the possible embodiments of the first, second, third, or fourth aspects above.
[0035] In a seventh aspect, one embodiment of this application also provides a computer-readable storage medium storing a program that causes a computer device to perform the methods described in any one of the possible embodiments of the first, second, third, or fourth aspects above.
[0036] Eighthly, an embodiment of this application also provides a computer program product, the computer program product including computer-executable instructions stored in a computer-readable storage medium; at least one processor of an electronic device can read the computer-executable instructions from the computer-readable storage medium, and the at least one processor executes the computer-executable instructions to cause the electronic device to perform the method described in any one of the possible embodiments of the first, second, third, or fourth aspects above. The beneficial effects of the second to eighth aspects and their various implementations in this application can be referred to the first aspect and its various implementations, as well as the analysis of the beneficial effects in the first aspect, and will not be repeated here. Attached Figure Description
[0037] Figure 1 A schematic diagram illustrating the spatial location determination of existing technologies.
[0038] Figure 2 This is a schematic diagram of a spatial location determination system provided in an embodiment of this application.
[0039] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0040] Figure 4 This is a schematic diagram of the software structure of an electronic device provided in an embodiment of this application.
[0041] Figure 5 This is an architecture diagram of the spatial location determination system provided in the embodiments of this application.
[0042] Figure 6 This is a schematic diagram illustrating the encoding method provided in the embodiments of this application.
[0043] Figure 7 This is a schematic diagram of a spatial location determination method provided in an embodiment of this application.
[0044] Figure 8 This is a schematic diagram of the interface in a scenario where both the first electronic device and the second electronic device are in sleep mode, as provided in an embodiment of this application.
[0045] Figure 9 This is a schematic diagram of the interface for displaying small bubble icons when the screen is off, provided in an embodiment of this application.
[0046] Figure 10 This is a schematic diagram illustrating the collaborative work of a first electronic device and a second electronic device provided in an embodiment of this application.
[0047] Figure 11 This is a schematic diagram of the interface in a scenario where the first electronic device is in sleep mode and the second electronic device is not in sleep mode, as provided in an embodiment of this application.
[0048] Figure 12 This is a schematic diagram of the interface in a scenario where the first electronic device is not in sleep mode and the second electronic device is in sleep mode, as provided in an embodiment of this application.
[0049] Figure 13 This is a schematic diagram of the interface in a scenario where the first electronic device is not in sleep mode and the second electronic device is not in sleep mode, as provided in an embodiment of this application.
[0050] Figure 14 A flowchart of a spatial location determination method provided in an embodiment of this application.
[0051] Figure 15 A flowchart of another spatial location determination method provided in an embodiment of this application. Detailed Implementation
[0052] In the description of the embodiments in this application, the words "exemplary" or "for example" are used to indicate that they are examples, illustrations, or descriptions. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design options. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0053] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in this application's specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. It should be understood that, unless otherwise stated, "a plurality of" in this application means two or more.
[0054] Existing technology provides a spatial position determination method that can determine the relative position between electronic device A and electronic device B, and control the display interface of electronic device B as an extension screen of electronic device A based on the relative position. Specifically: such as Figure 1As shown, electronic device A may include a first speaker and a second speaker, and electronic device B may include a microphone, such as a first microphone and a second microphone. Electronic device A may first send a detection request to electronic device B, requesting both electronic devices A and B to complete discovery and network authentication, and to determine their spatial location. Based on the detection request, electronic devices A and B can complete discovery and network authentication to establish a wireless or wired communication link. Then, electronic device A can transmit ultrasonic signals through the first and second speakers. Electronic device B can receive the ultrasonic signals through the microphone and determine the relative position between electronic devices A and B based on the received ultrasonic signals. It can be understood that before determining the relative position between electronic devices A and B, electronic device A can also transmit a first moment, a second moment, and the distance between the first and second speakers to electronic device B through the wireless or wired communication link; the first moment is the moment when the first speaker of electronic device A transmits the ultrasonic signal; the second moment is the moment when the second speaker of electronic device A transmits the ultrasonic signal, thus allowing electronic device B to determine the relative position between electronic devices A and B based on the received ultrasonic signals, the first moment, the second moment, and the distance. Electronic device B can also transmit the determined relative position between electronic device A and electronic device B to electronic device A via an established wireless or wired communication link, so that electronic device A can extend the content displayed on its display interface to electronic device B. However, existing spatial location determination methods rely on communication units, such as soft buses, which require the discovery and network authentication of electronic devices A and B first. This results in a relatively slow establishment of wireless communication links, leading to high latency in spatial location determination.
[0055] In view of this, this application proposes a spatial location determination method that can directly determine spatial location without the need for networking and authentication.
[0056] Please refer to Figure 2This is a schematic diagram of a spatial location determination system provided in an embodiment of this application. The spatial location determination system 2 may include multiple electronic devices 200. The electronic devices 200 may be, for example, mobile phones, tablets, laptops, digital cameras, personal digital assistants (PDAs), wearable devices, laptops, etc. Each electronic device 200 may include an audio transmitting unit and an audio receiving unit. The audio transmitting unit may transmit analog audio signals, such as ultrasonic signals. The audio transmitting unit may be, for example, a speaker. The audio receiving unit may receive analog audio signals from the outside world, such as ultrasonic signals. The audio receiving unit may be, for example, a microphone. For ease of description, the following description uses a speaker as the audio transmitting unit and a microphone as the audio receiving unit. Each electronic device 200 can transmit analog audio signals through a speaker. Each electronic device 200 can also receive analog audio signals through a microphone. The multiple electronic devices 200 may be a first electronic device 201 and a second electronic device 202, respectively. For ease of description, the following description uses one second electronic device 202 as an example. However, it is understood that the number of second electronic devices 202 may be two or more, and this application does not limit this.
[0057] Both the first electronic device 201 and the second electronic device 202 may be equipped with applications that can utilize spatial location information between electronic devices for multi-device collaboration, such as WPS (Word Processing System) applications, camera applications, etc. Different applications utilize different spatial location information between electronic devices, and different applications can subscribe to different spatial location information between electronic devices. For example, the spatial location information used by the WPS application is the relative position between electronic devices, so the WPS application can subscribe to the relative position between electronic devices; the spatial location information used by the camera application is the distance information between electronic devices, so the camera application can subscribe to the distance information between electronic devices. For ease of description, the following description uses the example of both the first electronic device 201 and the second electronic device 202 having the WPS application installed. It is understood that different applications may also utilize the same spatial location information between electronic devices, and different applications may subscribe to the same spatial location information between electronic devices; this application does not impose any limitations on this.
[0058] In one possible implementation, the second electronic device 202, while in sleep mode, may periodically transmit a first analog audio signal via a speaker if a preset condition is met, such as if the second electronic device 202 stops after detecting movement. In another possible implementation, the second electronic device 202 may periodically transmit a first analog audio signal via a speaker if a preset condition is met while the screen is on, such as if the second electronic device 202 is running a WPS application in the foreground. The first electronic device 201 may receive the first analog audio signal and identify that the second electronic device 202 is online based on the first analog audio signal. The first electronic device 201 also transmits a second analog audio signal via a speaker based on the spatial position information between subscribed electronic devices. The second electronic device 202 may receive the second analog audio signal and determine the relative position between the corresponding electronic devices based on the second analog audio signal, for example, determining that the second electronic device 202 is located to the left of the first electronic device 201. The second electronic device 202 may transmit a third analog audio signal based on the determined relative position between the electronic devices. The first electronic device 201 may receive the third analog audio signal. In one possible implementation, the first electronic device 201 can wake up the first processor, such as an application processor (AP), based on a third analog audio signal while in sleep mode, and then transmit the determined relative positions between the electronic devices to the WPS application for extended display. In another possible implementation, the first electronic device 201 can directly transmit the determined relative positions between the electronic devices to the WPS application via the first processor while the screen is on, for extended display.
[0059] Please refer to Figure 3This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 200 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0060] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0061] Processor 110 may include one or more processing units, such as application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors 110.
[0062] The processor 110 can generate operation control signals based on the instruction opcode and timing signals to control the instruction fetching and execution.
[0063] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 may be a cache memory. This memory can store instructions or data that the processor 110 has used or that are used frequently. If the processor 110 needs to use the instruction or data, it can directly retrieve it from this memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0064] In some embodiments, the processor 110 may include one or more interfaces. These interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc. The processor 110 can connect to modules such as touch sensors, audio modules, wireless communication modules, displays, and cameras through at least one of these interfaces.
[0065] It is understood that the interface connection relationships between the modules illustrated in the embodiments of this application are merely illustrative and do not constitute a structural limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0066] USB 130 is a USB standard compliant interface that can be used to connect display devices and peripheral devices, specifically Mini USB, Micro USB, USB Type-C, etc.
[0067] The charging management module 140 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 receives charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 receives wireless charging input via the wireless charging coil of the electronic device 200. While charging the battery 142, the charging management module 140 can also supply power to the electronic device 200 via the power management module 141.
[0068] The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, providing power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In some other embodiments, the power management module 141 may also be located within the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be located in the same device.
[0069] The wireless communication function of electronic device 200 can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor, and baseband processor.
[0070] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 200 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0071] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 200. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.
[0072] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.
[0073] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 200, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), Bluetooth Low Energy (BLE), ultra-wideband (UWB), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0074] In some embodiments, antenna 1 of electronic device 200 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 200 to communicate with networks and other electronic devices 200 via wireless communication technology. This wireless communication technology may 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), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).
[0075] Electronic device 200 can implement display functions through a GPU, display screen 194, and application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0076] Display screen 194 is used to display images, videos, etc. Display screen 194 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini LED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 200 may include one or more display screens 194.
[0077] Electronic device 200 can realize camera function through camera 193, ISP, video codec, GPU, display screen 194 and application processor AP, neural network processor NPU, etc.
[0078] Camera 193 can be used to acquire color image data and depth data of the subject. An ISP can be used to process the color image data acquired by camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then transmitted to the ISP for processing, transforming it into a visible image. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into camera 193.
[0079] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 200. The external memory card communicates with the processor 110 through the external memory interface 120 to perform data storage functions.
[0080] Internal memory 121 can be used to store computer executable program code, including instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 200 (such as digital audio data, telephone directory, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional methods or data processing of electronic device 200 by running instructions stored in internal memory 121 and / or instructions stored in memory disposed in the processor.
[0081] Electronic device 200 can implement audio functions such as music playback and recording through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.
[0082] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.
[0083] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 200 can listen to music through the speaker 170A or output audio signals for hands-free calling.
[0084] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 200 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.
[0085] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.
[0086] The 170D headphone jack is used to connect wired headphones. The 170D headphone jack can be a USB 130 interface or a 3.5mm Open Mobile Terminal Platform (OMTP) standard interface, a CTIA (Cellular Telecommunications Industry Association of the USA) standard interface.
[0087] The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0088] Button 190 may include a power button, volume buttons, etc.
[0089] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback.
[0090] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.
[0091] The SIM card interface 195 is used to connect the SIM card.
[0092] Please refer to Figure 4 This is a schematic diagram of the logical structure of the electronic device provided in the embodiments of this application.
[0093] Layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom: the application layer, the application framework layer, the Android runtime (ART) and native C / C++ libraries, the Hardware Abstraction Layer (HAL), and the kernel layer. It is understood that this document uses the Android system as an example; however, the solution described in this application can also be implemented in other operating systems (such as HarmonyOS, iOS, etc.) as long as the functions implemented by each module are similar to those in the embodiments of this application.
[0094] The application layer can include a series of application packages.
[0095] like Figure 4As shown, the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS, WPS application, etc.
[0096] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
[0097] like Figure 4 As shown, the application framework layer may include a window manager, content provider, view system, resource manager, notification manager, activity manager, input manager, etc.
[0098] The window manager provides Window Manager Service (WMS), which can be used for window management, window animation management, surface management, and as a relay station for the input system.
[0099] Content providers store and retrieve data, making that data accessible to applications. This data can include videos, images, audio, phone calls made and received, browsing history and bookmarks, phone books, etc.
[0100] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.
[0101] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.
[0102] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.
[0103] The Activity Manager Service (AMS) can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers), as well as manage and schedule application processes.
[0104] The Input Manager Service (IMS) provides input management services, which can be used to manage system inputs such as touchscreen input, keypad input, and sensor input. IMS retrieves events from input device nodes and, through interaction with the WMS (Windows Management System), distributes these events to appropriate windows.
[0105] The Android runtime consists of the core libraries and the Android runtime itself. The Android runtime is responsible for converting source code into machine code. The Android runtime primarily employs ahead-of-time (AOT) compilation and just-in-time (JIT) compilation techniques.
[0106] The core library primarily provides basic Java class library functionalities, such as libraries for fundamental data structures, mathematics, I / O, tools, databases, and networking. It also provides APIs for users to develop Android applications.
[0107] Native C / C++ libraries can include multiple functional modules. Examples include: surface manager, media framework, libc, OpenGL ES, SQLite, Webkit, etc.
[0108] The Surface Manager manages the display subsystem and provides 2D and 3D layer blending for multiple applications. The Media Framework supports playback and recording of various common audio and video formats, as well as still image files. The Media Library supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG. OpenGL ES provides drawing and manipulation of 2D and 3D graphics in applications. SQLite provides a lightweight relational database for electronic device applications.
[0109] The Hardware Abstraction Layer (HAL) runs in user space, encapsulates kernel-level drivers, and provides calling interfaces to the upper layers.
[0110] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.
[0111] Please refer to Figure 5This is an architectural diagram of the spatial location determination system 5 provided in this application embodiment. The spatial location determination system 5 includes multiple electronic devices 500. The electronic devices 500 may be, for example, mobile phones, tablets, laptops, digital cameras, personal digital assistants (PDAs), wearable devices, laptops, etc. Each electronic device 500 may include a speaker 510, a microphone 520, a target application 530, an SDK (software development kit) 540, a first processor 550, and a second processor 560. The number of speakers 510 may be one or more. The speakers 510 are used to transmit analog audio signals, such as ultrasonic signals. The number of microphones 520 may be one or more. The microphones 520 are used to receive analog audio signals, such as ultrasonic signals.
[0112] The target application 530 may be an application that can utilize spatial location information between electronic devices to enable multi-device collaboration. For example, the target application 530 may be a WPS application.
[0113] SDK 540 can be an SDK for applications with spatial location management capabilities. SDK 540 can be packaged into a WPS application and loaded into it, running alongside the WPS application upon startup. The WPS application can call SDK 540 to send subscription requests to applications with spatial location management capabilities. These subscription requests request spatial location information between electronic devices, such as their relative positions. Thus, applications with spatial location management capabilities can identify the WPS application as a target application that has subscribed to the relative positions between electronic devices. When the application with spatial location management capabilities obtains the relative positions between the electronic devices, it will send these positions to the target application. When the user closes the WPS application, SDK 540 will also close. It is understood that SDK 540 can also be loaded into the WPS application while it is running, and this application does not limit this.
[0114] The first processor 550 can be used to implement interaction between the target application 530 and the second processor 560, such as subscribing to spatial location information between electronic devices, transmitting information to the second processor 560, and receiving information transmitted by the second processor 560. The first processor 550 can be an independent application processor (AP). The first processor 550 can be used to run system software, such as operating system software. The operating system software can be, for example, at least one of HarmonyOS, Android, iOS, or Linux; the operating system software may also include other driver software or platform software besides applications, such as open-source system software, middleware, or widgets. The first processor 550 can also store instructions for some applications, such as instructions for applications with spatial location management functions. The first processor 550 can run instructions for applications with spatial location management functions. The first processor 550 can also run applications set outside the first processor 550, such as the target application 530 and SDK 540. These applications can all run on the operating system. Figure 5 The example described uses the scenario where the target application 530 and SDK 540 are located outside the first processor 550. However, it is understood that the target application 530 and SDK 540 can also be integrated into the first processor 550, and this application does not limit this. The first processor 550 can also enter a hibernation state when the electronic device 500 is in hibernation mode, stopping the running of the operating system software and applications both within and outside the first processor. In some embodiments, the first processor 550 may include a subscription management module 551 and a HiFi interaction module 552.
[0115] The subscription management module 551 can be used to receive subscription requests sent by the target application 530 through the SDK 540, such as receiving a subscription request sent by the WPS application through the SDK 540. The subscription management module 551 can also be used to generate subscription information based on the subscription request. It is understood that if multiple different target applications 530 subscribe to the same spatial location information between electronic devices through the SDK 540, the subscription management module 551 can merge multiple subscription requests to generate subscription information; this application does not impose any limitations on this.
[0116] The HIFI interaction module 552 can be used to realize the interaction of data and control information between the first processor 550 and the second processor 560. For example, it can be used to transmit subscription information to the second processor 560, receive wake-up signals sent by the second processor 560, and receive spatial location information between electronic devices sent by the second processor 560.
[0117] The second processor 560 can be used to perform processing related to interaction with other electronic devices, such as encoding and decoding transmitted signals, detecting other electronic devices, and determining spatial location information between them. The second processor 560 can also be used to wake up the first processor 550. The second processor 560 can be a high-fidelity (HIFI) device. The second processor 560 can be a standalone low-power audio processing chip, such as an ADSP (audio digital signal processor). The second processor 560 can operate with low power consumption when the electronic device 500 is in sleep mode, significantly reducing power consumption. The second processor 560 can receive and store subscription information sent by the first processor 550 through the HIFI interaction module 552. Therefore, even if the first processor 550 is in sleep mode, the second processor 560 can control the speaker 510 to play the corresponding analog audio signal according to the stored subscription information.
[0118] The second processor 560 may store some instructions. The second processor 560 may execute the instructions to implement some functions. In some embodiments, the second processor 560 may include a signal encoding / decoding module 561, a device discovery module 562, and a device ranging module 563.
[0119] In some embodiments, the device discovery module 562 may be used to notify the signal encoding and decoding module 561 to convert the first information into a first analog audio signal according to a first preset encoding method when the screen of the electronic device 500 is on and a WPS application is detected running in the foreground of the electronic device 500.
[0120] The device discovery module 562 can also be used to notify the signal encoding and decoding module 561 to convert the first information into a first analog audio signal according to the first preset encoding method when the electronic device 500 is in sleep mode and the movement of the electronic device 500 is detected and then stopped.
[0121] The signal encoding / decoding module 561 can be used to convert the first information into a first analog audio signal according to a first preset encoding method, for playback by the speaker 510. Specifically, as shown... Figure 6As shown, the signal encoding / decoding module 561 can be used to convert first information into a first ultrasonic signal according to a first preset encoding method. The first ultrasonic signal can be, for example, a chirp signal. The first chirp signal can represent binary code 1, and the second chirp signal can represent binary code 0. In some embodiments, the frequency of the first chirp signal can increase linearly with time, and the frequency of the second chirp signal can decrease linearly with time. It is understood that in other embodiments, the frequency of the first chirp signal can decrease linearly with time, and the frequency of the second chirp signal can increase linearly with time; the frequencies of the first and second chirp signals can also increase and decrease non-linearly, and this application does not limit this. The first ultrasonic signal may include multiple time-continuous chirp signals, which can represent a segment of binary data. This binary data can be used to represent one or more hexadecimal numbers. These one or more hexadecimal numbers can represent preset information. Figure 6 In the diagram, the X-axis represents time, and the Y-axis represents frequency. From time t0 to time t8, the ultrasonic signal can include eight time-continuous chirp signals, designated as "chirp 0", "chirp 1", "chirp 2", "chirp 3", "chirp 4", "chirp 5", "chirp 6", and "chirp 7". "Chirp 0", "chirp 1", and "chirp 4" are the first chirp signals, and "chirp 2", "chirp 3", "chirp 5", "chirp 6", and "chirp 7" are the second chirp signals. Figure 6 In this system, each chirp signal has the same duration, and the frequency of each chirp signal varies between a first frequency F0 and a second frequency F1. Figure 6 The ultrasonic signal can be represented by 8 bits of binary data "11001000". Each set of four consecutive bits in this 8-bit binary data represents a hexadecimal number. Figure 6 The ultrasonic signal in the signal can represent the hexadecimal number "C8". In some embodiments, the first ultrasonic signal can also carry a unique identifier of the electronic device 500. The unique identifier of the electronic device 500 can be a unique identifier formed after processing the hardware information of the electronic device 500. The unique identifier of the electronic device 500 can also be some hardware information of the electronic device 500, such as a Bluetooth MAC address, etc. This application does not limit the unique identifier of the electronic device 500. It is understood that every four consecutive bits of binary data in the 8-bit binary data can also represent a decimal number; the preset information can also be other hexadecimal numbers, such as the hexadecimal number "A8", etc.; the encoding method can also be other encoding methods, which are not limited in this application.
[0122] The signal encoding / decoding module 561 can also be used to convert the analog audio signal acquired by the microphone 520 into corresponding information. For example, the signal encoding / decoding module 561 can convert a second analog audio signal acquired by the microphone 520 into second information, which is digital audio information. The second information is used to determine the relative position between electronic devices.
[0123] The signal encoding / decoding module 561 can also be used to convert the third information into a third analog audio signal according to a third preset encoding method, such as converting the relative position between electronic devices into a third ultrasonic signal for playback by the speaker 510. The third preset encoding method may be different from the first preset encoding method. It is understood that the third preset encoding method may also be the same as the first preset encoding method, and this application does not limit this.
[0124] The device ranging module 563 can also be used to determine the relative position between electronic devices based on the second audio signal converted by the signal encoding / decoding module 561.
[0125] In other embodiments, the signal encoding / decoding module 561 can also be used to convert the analog audio signal collected by the microphone 520 into a corresponding signal. For example, the signal encoding / decoding module 561 can convert the first analog audio signal collected by the microphone 520 into preset information and a unique identifier of the electronic device 500; the signal encoding / decoding module 561 can convert the third analog audio signal collected by the microphone 520 into a relative position between electronic devices.
[0126] The signal encoding / decoding module 561 can also be used to convert the second information into a second analog audio signal according to a second preset encoding method, such as converting digital audio information into a second ultrasonic signal for playback by the speaker 510. The second preset encoding method may be different from the first preset encoding method. It is understood that the second preset encoding method may also be the same as the first preset encoding method, and this application does not limit this.
[0127] The device discovery module 562 can be used to discover other online electronic devices based on preset information converted by the signal encoding / decoding module 561. In some embodiments, the device discovery module 562 can be used to discover the corresponding online electronic device based on the preset information converted by the signal encoding / decoding module 561 and the unique identifier of the electronic device 500.
[0128] The device ranging module 563 can be used to play a second analog audio signal through the speaker 510 based on stored subscription information when the device discovery module 562 discovers other electronic devices online. In some embodiments, the spatial location information between electronic devices subscribed to by the WPS application is the relative position between the electronic devices.
[0129] The second processor 560 can also be used to send a wake-up signal to the HIFI interaction module 552 of the first processor 550 when the first processor 550 is in sleep mode, so as to wake up the first processor 550. The second processor 560 can also be used to send the relative positions between electronic devices to the WPS application when the WPS application is running in the foreground.
[0130] It is understood that the signal codec module 561 can also be a separate audio codec chip, and this application does not limit this.
[0131] In some embodiments, the plurality of electronic devices 500 may be a first electronic device 501 and a second electronic device 502. For ease of description, the following description uses a laptop computer as an example and a mobile phone as an example to illustrate this application.
[0132] Please refer to Figure 7 This is a schematic diagram illustrating the spatial location determination method provided in an embodiment of this application. The spatial location determination method can be applied to... Figure 5 The spatial location determination system is shown. The spatial location determination method can be applied to scenarios where both the first and second electronic devices are in sleep mode. In scenarios where both the first and second electronic devices are in sleep mode, such as... Figure 8 As shown, the screens of both the first electronic device 801 and the second electronic device 802 are turned off. When both the first and second electronic devices are in sleep mode, their first processors will also remain in sleep mode and will not run. However, their second processors will not be in sleep mode and will remain running. Figure 7 In this process, step S701 is executed by the first processor of the first electronic device, steps S702 to S717 are executed by the second processor of the first electronic device or the second processor of the second electronic device, and step S718 is executed by the first processor of the first electronic device.
[0133] Methods for determining spatial location include:
[0134] S701: Before the first electronic device goes to sleep, the target application of the first electronic device subscribes to the relative positions between the electronic devices.
[0135] The target application of the first electronic device subscribes to the relative positions between electronic devices via the SDK to the first processor of the first electronic device. The SDK can be packaged and loaded into the target application, and runs within the target application upon startup. The target application can call the SDK to send a subscription request to the first processor, which includes an application with spatial location management capabilities. The subscription request is used to request subscription to the relative positions between electronic devices. The first processor can receive the subscription request sent by the target application via the SDK and generate subscription information based on the subscription request. The first processor can determine the target application as a target application that has subscribed to the relative positions between electronic devices based on the subscription information. Then, when the first processor obtains the relative positions between electronic devices, it will send the relative positions between the electronic devices to the target application. When the user closes the target application, the SDK will close along with the target application. It is understood that the SDK can also be loaded into the target application while it is running, and runs within the target application as it runs; this application does not limit this. In some embodiments, before the first electronic device goes into sleep mode, the first processor of the first electronic device also sends the subscription information to a second processor for storage. Therefore, after the first electronic device goes into hibernation, the first processor of the first electronic device will also go into hibernation and stop running, and the target application and SDK of the first electronic device will also be shut down. However, the second processor of the first electronic device will not go into hibernation and will store the subscription information.
[0136] It is understood that the target application can also unsubscribe from the relative position between the electronic devices to the first processor of the first electronic device, and the first processor of the first electronic device can send deletion information to the second processor to delete the subscription information. This application does not limit this.
[0137] In some embodiments, the steps of generating subscription information and unsubscribing information can be performed by the subscription management module of the first electronic device. The subscription management module of the first electronic device can be... Figure 5 The spatial location shown indicates the subscription management module of the electronic equipment in the system.
[0138] In some embodiments, the steps of sending subscription information and sending deletion information to the second processor can be performed by the HiFi interaction module of the first electronic device. The HiFi interaction module of the first electronic device can be... Figure 5 The spatial location shown indicates the HIFI interactive module of the electronic equipment in the system.
[0139] S702: After the second electronic device goes into sleep mode, the second electronic device detects that the second electronic device meets the preset conditions.
[0140] In some embodiments, the second electronic device may include a motion sensor. The motion sensor can be used to detect the motion state of the second electronic device. The second electronic device can determine whether it meets a preset condition based on the motion state detected by the motion sensor. Specifically, when the motion sensor detects that the motion state of the second electronic device is "movement followed by cessation," the second electronic device detects that it meets the preset condition. Otherwise, the second electronic device detects that it does not meet the preset condition. In some embodiments, the motion state of "movement followed by cessation" can correspond to the following scenario: a user holds a dormant second electronic device, moves the dormant second electronic device to a position close to a dormant first electronic device, and then stops moving the dormant second electronic device. The second electronic device may have a preset detection algorithm for detecting whether a motion state of "movement followed by cessation" has occurred.
[0141] In some embodiments, the motion sensor may be a speed sensor. The speed sensor can be used to detect the motion speed of the second electronic device. When the motion speed of the second electronic device detected by the speed sensor changes from greater than a first preset value to 0, the speed sensor detects that the motion state of the second electronic device has stopped after movement.
[0142] In some embodiments, the motion sensor may be an accelerometer. The accelerometer can be used to detect the magnitude of the acceleration of the second electronic device in various directions (generally three axes). When the magnitude of the acceleration of the second electronic device detected by the accelerometer changes from less than a second preset value to 0, the accelerometer detects that the motion state of the second electronic device has stopped after movement.
[0143] It is understood that the motion sensor may also be other types of sensors, and this application does not limit this.
[0144] In some embodiments, step S702 can be performed by the device discovery module of the second electronic device. The device discovery module of the second electronic device can be... Figure 5 The device discovery module of the electronic equipment in the spatial location determination system is shown.
[0145] S703: The second electronic device converts the first information into a first analog audio signal according to the first preset encoding method.
[0146] In some embodiments, the second electronic device may convert the first information into a first ultrasonic signal according to a first preset encoding method. The first information may include preset information. The preset information may be, for example, a hexadecimal number "C8". The first ultrasonic signal may include multiple time-sequential chirp signals. The frequency of the chirp signals may increase or decrease linearly with time. Multiple time-sequential chirp signals may represent a segment of binary data, which can be used to represent one or more hexadecimal numbers, so that the first ultrasonic signal can represent the preset information. The preset information may be used to indicate that the device is online. In some embodiments, the preset information may also be used to request the determination of the relative position between the electronic devices. It is understood that, depending on the application installed on the second electronic device, or according to the negotiation between the second electronic device and the first electronic device, the preset information may be other information, and different preset information requests different spatial position information between the electronic devices. For example, the hexadecimal number "A8" may be used to request the determination of distance information between the electronic devices, and this application does not limit this.
[0147] In some embodiments, the first information may further include a unique identifier of the second electronic device, and the first ultrasonic signal may also carry the unique identifier of the second electronic device. The unique identifier of the electronic device may also be certain hardware information of the electronic device, such as a Bluetooth MAC address. The unique identification information of the electronic device may be a unique identifier formed after processing the hardware information of the electronic device; this application does not limit the unique identifier of the electronic device. The unique identifier of the second electronic device can be used to identify the second electronic device.
[0148] In some embodiments, step S703 can be performed by the signal encoding / decoding module of the second electronic device. Figure 5 The spatial location shown indicates the signal encoding / decoding module of the electronic device in the system. The signal encoding / decoding module of the second electronic device can also be a separate audio encoding / decoding chip integrated within the second electronic device.
[0149] S704: The second electronic device plays the first analog audio signal through a speaker.
[0150] A first analog audio signal can be used to indicate that a device is online. In some embodiments, the first analog audio signal can be used to indicate that a second electronic device is online. In some embodiments, the first analog audio signal can also be used to request the determination of the relative position between the electronic devices.
[0151] S705: The first electronic device acquires a first analog audio signal via a microphone.
[0152] In some embodiments, the second electronic device plays a first analog audio signal through a speaker, and the first electronic device acquires the first analog audio signal through a microphone, thereby eliminating the need for prior network authentication between the first and second electronic devices. Preset information can be directly transmitted from the second electronic device to the first electronic device through the speaker and microphone, so that the first electronic device can subsequently begin detecting the relative position between the second and first electronic devices.
[0153] S706: The first electronic device converts the first analog audio signal into first information according to the first preset decoding method.
[0154] In some embodiments, the first preset decoding method refers to the decoding method corresponding to the first preset encoding method.
[0155] In some embodiments, a first electronic device may convert a first analog audio signal into first information according to a first preset decoding method. The first information may include preset information. The preset information may be, for example, a hexadecimal number "C8". The preset information may be used to indicate that the device is online. The first information may also include a unique identifier for a second electronic device.
[0156] In some embodiments, preset information may also be used to request the determination of the relative positions between electronic devices.
[0157] In some embodiments, step S706 can be performed by the signal encoding / decoding module of the first electronic device. The signal encoding / decoding module of the first electronic device can be... Figure 5 The spatial location shown indicates the signal encoding / decoding module of the electronic device in the system. The signal encoding / decoding module of the first electronic device can also be a separate audio encoding / decoding chip integrated within the first electronic device.
[0158] S707: The first electronic device determines that the second electronic device is online based on the first information.
[0159] In some embodiments, the first electronic device can determine that the second electronic device is online based on preset information in the first information and the unique identifier of the second electronic device. When the first electronic device subsequently plays analog audio signals, it can simultaneously carry the unique identifier of the second electronic device, so that the second electronic device processes the analog audio signal only after receiving it, while other electronic devices do not process it.
[0160] In some embodiments, step S707 can be performed by the device discovery module of the first electronic device. The device discovery module of the first electronic device can be... Figure 5 The device discovery module of the electronic equipment in the spatial location determination system is shown.
[0161] Once the second electronic device is confirmed to be online, the first electronic device can begin detecting the relative position between the second and first electronic devices.
[0162] S708: If the first information matches the subscription information, the first electronic device converts the second information into a second analog audio signal according to the second preset encoding method.
[0163] In some embodiments, a second processor of the first electronic device pre-stores subscription information. The first electronic device can determine whether the spatial location information between electronic devices requested by the preset information in the first information matches the subscription information. If the spatial location information between electronic devices requested by the preset information in the first information is the same as the subscription information, the first electronic device determines that the first information matches the subscription information. "Same" can include being completely identical or substantially identical. Substantially identical can be determined by preset rules; for example, if the differences in font, simplified / traditional characters, etc., are substantially the same, then the difference can be determined by setting font, simplified / traditional character conversion, etc. If the spatial location information between electronic devices requested by the preset information in the first information is different from the subscription information, the first electronic device determines that the first information does not match the subscription information. It is understood that if the first information does not match the subscription information, the process ends.
[0164] For example, if the preset information in the first information is "C8", and the spatial location information between the electronic devices requested by "C8" is the relative position between the electronic devices, and the subscription information is the relative position between the electronic devices, then the first electronic device determines that the first information matches the subscription information. As another example, if the preset information in the first information is "A8", and the spatial location information between the electronic devices requested by "A8" is the distance information between the electronic devices, and the subscription information is the relative position between the electronic devices, then the first electronic device determines that the first information does not match the subscription information.
[0165] It is understood that in some other embodiments, the first electronic device may omit the matching process and directly encode based on the subscription information, and this application does not limit this.
[0166] In some embodiments, the step of determining whether a match exists can be performed by the device ranging module of the first electronic device. The device ranging module of the first electronic device can be... Figure 5 The spatial location shown indicates the device ranging module of the electronic equipment in the system.
[0167] In some embodiments, the second information may include digital audio information. In some embodiments, the second information may also include a first time point, a second time point, and the distance between the first speaker and the second speaker. The first time point is the moment when the first speaker of electronic device A transmits an ultrasonic signal; the second time point is the moment when the second speaker of electronic device A transmits an ultrasonic signal. In some embodiments, the step of converting the second information into a second analog audio signal may be performed by the signal encoding / decoding module of the first electronic device. The signal encoding / decoding module of the first electronic device may be... Figure 5 The spatial location shown indicates the signal encoding / decoding module of the electronic equipment in the system.
[0168] S709: The first electronic device plays a second analog audio signal through a speaker.
[0169] In some embodiments, the second analog audio signal is used to request the determination of the relative positions between electronic devices.
[0170] S710: The second electronic device acquires a second analog audio signal via a microphone.
[0171] In some embodiments, the first electronic device plays a second analog audio signal through a speaker, and the second electronic device acquires the second analog audio signal through a microphone, so that the second electronic device can receive the second signal and determine the relative position between the second electronic device and the first electronic device based on the received second signal.
[0172] S711: The second electronic device converts the second analog audio signal into second information according to the second preset decoding method.
[0173] In some embodiments, step S711 can be performed by the signal encoding / decoding module of the second electronic device. Figure 5 The spatial location shown indicates the signal encoding / decoding module of the electronic equipment in the system.
[0174] S712: The second electronic device determines the relative position between the second electronic device and the first electronic device based on the second information.
[0175] In some embodiments, the first electronic device may transmit at least two second analog audio signals sequentially at time intervals through two speakers, and the second electronic device may acquire at least two second analog audio signals through a microphone and convert the at least two second analog audio signals into at least two second information. The second electronic device may determine the relative position between the second electronic device and the first electronic device based on the at least two second information.
[0176] In other embodiments, the first electronic device may transmit at least two second analog audio signals sequentially through two speakers at time intervals, and the second electronic device may collect at least two second analog audio signals through a first microphone and a second microphone. The second electronic device may also convert the signals collected by the first microphone and the signals collected by the second microphone into second information and determine the relative position between the second electronic device and the first electronic device based on the second information.
[0177] Therefore, no network authentication is required between the second electronic device and the first electronic device. The first electronic device can send digital audio information, or it can send the first moment, the second moment and the distance to the second electronic device, so that the second electronic device can determine the relative position between the second electronic device and the first electronic device.
[0178] In some embodiments, step S712 can be performed by the device ranging module of the second electronic device. The device ranging module of the second electronic device can be... Figure 5 The spatial location shown indicates the device ranging module of the electronic equipment in the system.
[0179] S713: The second electronic device converts the relative position between the second electronic device and the first electronic device into a third analog audio signal according to a third preset encoding method.
[0180] In some embodiments, the third preset encoding method may be different from the first preset encoding method. It is understood that the third preset encoding method may also be the same as the first preset encoding method, and this application does not impose any limitations on this.
[0181] In some embodiments, the third preset encoding method may be different from the second preset encoding method. It is understood that the third preset encoding method may also be the same as the second preset encoding method, and this application does not impose any limitations on this.
[0182] In some embodiments, step S713 can be performed by the signal encoding / decoding module of the second electronic device. Figure 5 The spatial location shown indicates the signal encoding / decoding module of the electronic equipment in the system.
[0183] S714: The second electronic device plays a third analog audio signal through a speaker.
[0184] In some embodiments, a third analog audio signal may be used to notify the relative position between the second electronic device and the first electronic device.
[0185] S715: The first electronic device acquires a third analog audio signal via a microphone.
[0186] In some embodiments, the second electronic device plays a third analog audio signal through a speaker, and the first electronic device acquires the third analog audio signal through a microphone, thereby eliminating the need for prior network authentication between the first and second electronic devices. The relative position between the second and first electronic devices can be directly transmitted from the second electronic device to the first electronic device through the speaker and microphone, so that the first electronic device can begin collaborative work between the second and first electronic devices.
[0187] S716: The first electronic device converts the third analog audio signal into the relative position between the second electronic device and the first electronic device according to the third preset decoding method.
[0188] In some embodiments, step S716 can be performed by the signal encoding / decoding module of the first electronic device. The signal encoding / decoding module of the first electronic device can be... Figure 5 The spatial location shown indicates the signal encoding / decoding module of the electronic equipment in the system.
[0189] S717: The first electronic device wakes up the first processor of the first electronic device according to the relative position between the second electronic device and the first electronic device.
[0190] In some embodiments, before the first electronic device wakes up its first processor based on the relative position between the second electronic device and the first electronic device, the first electronic device may further determine whether the relative position between the second electronic device and the first electronic device satisfies a preset positional relationship. The preset positional relationship may, for example, be that the second electronic device is located in the left or right region of the first electronic device. When the relative position between the second electronic device and the first electronic device satisfies the preset positional relationship, the first electronic device wakes up its first processor based on the relative position between the second electronic device and the first electronic device.
[0191] In some embodiments, the first electronic device can wake up its first processor via a HiFi interaction module within its first processor. Subsequently, the first processor of the first electronic device can display information, run target applications, perform network authentication with the second electronic device, and send information to the second electronic device via a wireless or wired communication link, etc.
[0192] S718: The first electronic device displays the icon of the second electronic device on its screen when the screen is off.
[0193] In some embodiments, the first electronic device displays a small bubble icon 901 on the screen of the first electronic device 900 when the screen is off, such as... Figure 9 As shown. It is understood that the icon of the second electronic device can also be other icons, such as a mobile phone icon, etc., and this application does not limit this.
[0194] In some embodiments, the first electronic device may determine the target display position of the icon of the second electronic device on the screen based on the relative position between the second electronic device and the first electronic device, and display the icon of the second electronic device at the target display position on the screen. For example, if the relative position between the second electronic device and the first electronic device is that the second electronic device is located to the left of the first electronic device, then the first electronic device may display the icon of the second electronic device at the lower left corner of the screen; if the relative position between the second electronic device and the first electronic device is that the second electronic device is located to the right of the first electronic device, then the first electronic device may display the icon of the second electronic device at the lower right corner of the screen. It is understood that the icon of the second electronic device may also be displayed in other positions, and this application does not limit this.
[0195] Understandably, after step S718, the first electronic device can also respond to the operation of the icon of the second electronic device and run the target application. Since the target application has subscribed to the relative position between the electronic devices from the first processor, the first electronic device can also send the relative position between the second electronic device and the first electronic device to the target application through the first processor and the SDK. The first electronic device can also perform network authentication with the second electronic device, establish a wireless or wired communication link, and notify the second electronic device to wake up the first processor of the second electronic device through the wireless or wired communication link. The first electronic device also sends the preset content to be displayed to the second electronic device through the established wireless communication link according to the relative position between the second electronic device and the first electronic device, so that the first electronic device and the second electronic device can work collaboratively. For example, if the relative position between the second electronic device and the first electronic device is that the second electronic device is to the left of the first electronic device, then the first electronic device can send the preset WPS document annotation interface to the second electronic device through the established wireless communication link. The first electronic device displays the preset WPS document main interface, and the second electronic device displays the preset WPS document annotation interface, so that the first electronic device and the second electronic device can work collaboratively. Figure 10 As shown. In Figure 10 In this process, the first electronic device 1001 and the second electronic device 1002 jointly display a preset WPS document from the first electronic device. It is understandable that... Figure 10This is one example of collaborative work, and this application does not limit it. For example, if the relative position between the second electronic device and the first electronic device is such that the second electronic device is to the right of the first electronic device, then the first electronic device can send the preset WPS document's table of contents to the second electronic device through an established wireless communication link. The first electronic device displays the preset WPS document's main interface, and the second electronic device displays the preset WPS document's table of contents, thus enabling collaborative work between the first and second electronic devices.
[0196] Understandably, after the first electronic device notifies the second electronic device to wake up its first processor via a wireless or wired communication link, the first electronic device can respond to the user's dragging of the first WPS document by extending the content displayed on the first electronic device to be displayed on the second electronic device. For example, if the relative position between the second and first electronic devices is that the second electronic device is to the left of the first electronic device, then the first electronic device can respond to the user's dragging of the first WPS document to the left by extending the content displayed on the first electronic device to be displayed on the second electronic device. Similarly, if the relative position between the second and first electronic devices is that the second electronic device is to the right of the first electronic device, then the first electronic device can respond to the user's dragging of the first WPS document to the right by extending the content displayed on the first electronic device to be displayed on the second electronic device.
[0197] Understandably, after step S718, the first electronic device can also determine whether it has received an operation on the icon of the second electronic device within a preset time. If no operation on the icon of the second electronic device is received within the preset time, the first electronic device stops displaying the icon of the second electronic device. If an operation on the icon of the second electronic device is received within the preset time, the first electronic device can also run the target application in response to the operation on the icon of the second electronic device.
[0198] Understandably, before the first electronic device runs the target application, it also displays a first preset unlock screen. The first preset unlock screen may display at least one of password unlock, face unlock, fingerprint unlock, iris unlock, voice unlock, and sound wave unlock. The password unlock includes at least one of numeric password unlock, pattern unlock, and PIN unlock. The first electronic device also responds to the operation of entering unlock information on the first preset unlock screen. If the entered unlock information matches the preset first unlock information, the screen unlocks and the target application runs. If the entered unlock information does not match the preset first unlock information, the screen remains off, displaying the icon of the second electronic device.
[0199] It is understood that before the first electronic device runs the target application, the first electronic device may omit displaying the first preset unlock screen and directly display the main interface of the first electronic device. The first electronic device also runs the target application in response to the operation of opening the target application on the main interface. It is understood that the first electronic device may also enter other interfaces in response to operations on the main interface, and the target application can be opened after one or more operations; this application does not limit this.
[0200] Understandably, before the second electronic device can collaborate with the first electronic device, the second electronic device displays a second preset unlock screen. The second electronic device also responds to the input of unlock information on the second preset unlock screen. If the input unlock information matches the preset second unlock information, the screen unlocks and the device collaborates with the first electronic device. If the input unlock information does not match the preset second unlock information, the device enters a locked screen state.
[0201] It is understood that step S701 could involve the first electronic device's operating system subscribing to the relative positions between electronic devices before the first electronic device goes to sleep. Therefore, after step S718, the first electronic device can also respond to an operation on the icon of the second electronic device by sending the relative position between the second and first electronic devices to the first processor. The first processor of the first electronic device can determine, based on the relative position between the second and first electronic devices, an application that can utilize the relative position information between the electronic devices for multi-device collaboration, and display the determined application, such as the icon of the WPS application or the icon of a multi-screen collaboration application. The first processor of the first electronic device can also respond to an operation of selecting a target icon, such as selecting the icon of the WPS application, to run the WPS application. Subsequently, the first electronic device can send the relative position between the second and first electronic devices to the WPS application, perform network authentication with the second electronic device, notify the second electronic device to wake up its first processor, and execute collaborative work between the first and second electronic devices.
[0202] It is understood that the application may also be other applications, such as camera applications, and this application does not limit this.
[0203] It is understandable that the analog audio signal broadcast by the loudspeaker may change during propagation due to the multipath effect, and this application does not impose any restrictions on this.
[0204] Understandable Figure 7The spatial location determination method shown can be applied not only to scenarios where both the first and second electronic devices are in sleep mode, but also to scenarios where the first electronic device is in sleep mode and the second electronic device is not. In the scenario where the first electronic device 1101 is in sleep mode and the second electronic device 1102 is not in sleep mode, the second electronic device 1102 runs the target application, such as... Figure 11 As shown. In Figure 11 In this mode, the first electronic device 1101 enters hibernation mode; at this time, the screen of the first electronic device 1101 is turned off, and the operating system and applications stop running. Figure 11 In the middle, the second electronic device 1102 displays a second WPS document. Understandably, Figure 11 This is one example of a scenario where the first electronic device is in sleep mode and the second electronic device is not in sleep mode, and this application does not limit this scenario.
[0205] A spatial location determination method applied to a scenario where the first electronic device is in sleep mode and the second electronic device is not in sleep mode, and a method applied to... Figure 7 The method for determining the spatial location in a scenario where both the first and second electronic devices are in sleep mode is similar, except that in a scenario where the first electronic device is in sleep mode but the second electronic device is not in sleep mode, step S702a is replaced by... Figure 7 Step S702 in the process:
[0206] In step S702a, the second electronic device can determine whether it meets the preset conditions based on the state of the target application. When the second electronic device detects that the target application is running, it is determined that it meets the preset conditions. Otherwise, it is determined that it does not meet the preset conditions.
[0207] In some embodiments, "the target application is in a running state" can correspond to the following scenarios: after the first electronic device goes to sleep, the user opens a second WPS document on the second electronic device, causing the second WPS document to be displayed on the second electronic device; or after the user opens the second WPS document on the second electronic device, the first electronic device automatically or manually goes to sleep, at which time the second electronic device displays the second WPS document. The second electronic device may have a preset detection algorithm for detecting whether the target application is in a running state.
[0208] A spatial location determination method applied to a scenario where the first electronic device is in sleep mode and the second electronic device is not in sleep mode, and a method applied to... Figure 7 The method for determining the spatial location in a scenario where both the first and second electronic devices are in sleep mode differs from the method in that:
[0209] After step S718, and after the first electronic device and the second electronic device have completed network authentication and established a wireless or wired communication link, the first electronic device can omit notifying the second electronic device to wake up its first processor. Instead, it can directly send the preset content to be displayed to the second electronic device via the established wireless communication link based on the relative position between the two devices. The first and second electronic devices then collaborate directly. Figure 10 As shown. The process of the first and second electronic devices working together is similar to the process of the first and second electronic devices working together in the scenario where both the first and second electronic devices are in sleep mode, and will not be described again here. Figure 10 In this embodiment, the first electronic device 1001 and the second electronic device 1002 jointly display a preset WPS document in the first electronic device. It is understood that the second electronic device may also simultaneously display a second WPS document in its own device; this application does not impose any limitations on this.
[0210] It is understandable that in a scenario where the first electronic device is in sleep mode and the second electronic device is not in sleep mode, the second electronic device may not display the second WPS document, but will instead be in a locked screen state. In some embodiments, "in a locked screen state" can correspond to the following scenarios: when the first electronic device is in sleep mode and the second electronic device displays the second WPS document, the user manually locks the screen of the second electronic device, and the second electronic device enters a locked screen state; or when the first electronic device is in sleep mode and the second electronic device displays the second WPS document, the second electronic device automatically locks its screen and enters a locked screen state. In the locked screen state, the second WPS document on the second electronic device is still running, but it is no longer displayed. After step S718, and after the first electronic device and the second electronic device perform network authentication and establish a wireless or wired communication link, the first electronic device notifies the second electronic device to display a second preset unlock interface through the wireless or wired communication link, and determines whether to unlock based on the unlock information entered in the second preset unlock interface. After the second electronic device unlocks, the first electronic device can send the preset content to be displayed to the second electronic device through the established wireless communication link according to the relative position between the two electronic devices, and the first and second electronic devices can directly collaborate.
[0211] Understandable Figure 7 The spatial location determination method shown can be applied not only to scenarios where both the first and second electronic devices are in sleep mode, but also to scenarios where the first electronic device is not in sleep mode and the second electronic device is in sleep mode. In the scenario where the first electronic device 1201 is not in sleep mode and the second electronic device 1202 is in sleep mode, the first electronic device runs the target application, such as... Figure 12 As shown. In Figure 12In this scenario, the first electronic device 1201 displays the first WPS document, while the second electronic device 1202 goes into sleep mode. At this time, the screen of the second electronic device 1101 is off, and both the operating system and applications stop running. This is understandable. Figure 12 This is one example of a scenario where the first electronic device is not in sleep mode and the second electronic device is in sleep mode, but this application does not limit this scenario.
[0212] A spatial location determination method applied to a scenario where the first electronic device is not in sleep mode and the second electronic device is in sleep mode, and a method applied to... Figure 7 The method for determining the spatial location in a scenario where both the first and second electronic devices are in sleep mode is similar, except that in a scenario where the first electronic device is not in sleep mode and the second electronic device is in sleep mode, step S701b is replaced by... Figure 7 Steps S701 and S702b replace... Figure 7 Step S702 in the text is omitted. Figure 7 Steps S717-S718 in the following steps:
[0213] In step S701b, the target application of the first electronic device subscribes to the relative position between the electronic devices. It is understood that step S701b may be interchanged with step S702 or step S703, and this application does not impose any restrictions on this.
[0214] In step S702b, the "stop after movement" movement state can correspond to the following scenario: the user holds the dormant second electronic device, moves the dormant second electronic device to a position close to the first electronic device displaying the first WPS document, and then stops moving the dormant second electronic device.
[0215] A spatial location determination method applied to a scenario where the first electronic device is not in sleep mode and the second electronic device is in sleep mode, and a method applied to... Figure 7 The method for determining the spatial location in a scenario where both the first and second electronic devices are in sleep mode differs from the method in that:
[0216] After step S716, since the first electronic device displays the first WPS document, it can skip running the target application and directly send the relative position between the second and first electronic devices to the target application via the first processor and SDK. Subsequently, the first electronic device can perform network authentication with the second electronic device, establish a wireless or wired communication link, wake up the first processor of the second electronic device, and send the preset content of the first WPS document. The first and second electronic devices can then collaborate. The process of collaboration between the first and second electronic devices is similar to the process described above when both devices are in sleep mode, and will not be repeated here.
[0217] It is understandable that in a scenario where the first electronic device is not in sleep mode and the second electronic device is in sleep mode, the first electronic device may not display the second WPS document, but instead remain in a locked screen state. In some embodiments, "remaining in a locked screen state" can correspond to the following scenarios: when the second electronic device is in sleep mode and the first electronic device displays the first WPS document, the user manually locks the screen of the first electronic device, and the first electronic device enters a locked screen state; or when the second electronic device is in sleep mode and the first electronic device displays the first WPS document, the first electronic device automatically locks its screen and enters a locked screen state. In the locked screen state, the first WPS document on the first electronic device is still running, but it is no longer displayed. After step S716, and before the first electronic device sends the relative position between the second and first electronic devices to the target application via the first processor and SDK, the first electronic device displays the icon of the second electronic device on its screen. The first electronic device may also respond to the operation on the icon of the second electronic device by displaying a first preset unlock interface, and determine whether to unlock based on the unlock information entered in the first preset unlock interface. After unlocking the screen, the first electronic device can run the target application and directly send the relative position between the second and first electronic devices to the target application via the first processor and SDK.
[0218] Understandable Figure 7 The spatial location determination method shown can be applied not only to scenarios where both the first and second electronic devices are in sleep mode, but also to scenarios where neither the first nor the second electronic device is in sleep mode. In the scenario where neither the first nor the second electronic device 1302 is in sleep mode, both the first and second electronic devices 1301 are running the target application, such as... Figure 13 As shown. In Figure 13 In this system, the first electronic device 1301 displays the first WPS document, and the second electronic device 1302 displays the second WPS document. This is understandable. Figure 13 This is one example of a scenario where neither the first electronic device nor the second electronic device sleeps, and this application does not limit this scenario.
[0219] A spatial location determination method applied to scenarios where both the first and second electronic devices are not in sleep mode, and a method applied to... Figure 7 The method for determining the spatial location in a scenario where both the first and second electronic devices are in sleep mode is similar, except that in a scenario where neither the first nor the second electronic device is in sleep mode, step S701c replaces... Figure 7 Steps S701 and S702c replace... Figure 7 Step S702 in the text is omitted. Figure 7 Steps S717-S718 in the following steps:
[0220] In step S701c, the target application of the first electronic device subscribes to the relative position between the electronic devices. It is understood that step S701c may be interchanged with step S702 or step S703, and this application does not impose any restrictions on this.
[0221] In step S702c, the second electronic device can determine whether it meets the preset conditions based on the state of the target application. When the second electronic device detects that the target application is running, it is determined that it meets the preset conditions. Otherwise, it is determined that it does not meet the preset conditions.
[0222] In some embodiments, "the target application is running" can correspond to the following scenarios: after the first electronic device displays the first WPS document, the user opens a second WPS document on the second electronic device, causing the second WPS document to be displayed on the second electronic device; or after the user opens the second WPS document on the second electronic device, the first WPS document on the first electronic device is also opened, thus displaying the first WPS document on the first electronic device and the second WPS document on the second electronic device. In this case, the first and second electronic devices are each running their own WPS documents and have not entered a collaborative work state. The second electronic device may have a pre-set detection algorithm for detecting whether the target application is running.
[0223] A spatial location determination method applied to scenarios where both the first and second electronic devices are not in sleep mode, and a method applied to... Figure 7 The method for determining the spatial location in a scenario where both the first and second electronic devices are in sleep mode differs from the method in that:
[0224] After step S716, since the first electronic device displays the first WPS document, it can skip running the target application and directly send the relative position between the second electronic device and the first electronic device to the target application via the first processor and SDK. Subsequently, the first electronic device can perform network authentication with the second electronic device, establish a wireless or wired communication link, and send the preset content of the first WPS document to the second electronic device via the wireless or wired communication link. The first and second electronic devices can then collaborate on tasks, such as... Figure 10 As shown. The process of the first and second electronic devices working together is similar to the process of the first and second electronic devices working together in the scenario where both the first and second electronic devices are in sleep mode, and will not be described again here. Figure 10In this embodiment, the first electronic device 1001 and the second electronic device 1002 jointly display a first WPS document in the first electronic device. It is understood that the second electronic device may also simultaneously display a second WPS document in itself, and this application does not impose any limitations on this.
[0225] It is understandable that, in scenarios where neither the first nor the second electronic device is in sleep mode, the first electronic device may not display the first WPS document, and the second electronic device may not display the second WPS document; instead, both the first and second electronic devices are in a locked screen state. In some embodiments, "both the first and second electronic devices are in a locked screen state" can correspond to the following scenario: when the first electronic device displays the first WPS document and the second electronic device displays the second WPS document, the user manually locks the screen of the first electronic device or the first electronic device automatically locks the screen, and the user manually locks the screen of the second electronic device or the second electronic device automatically locks the screen, thus both the first and second electronic devices enter a locked screen state. While both the first and second electronic devices are in a locked screen state, the first WPS document on the first electronic device and the second WPS document on the second electronic device remain running, but are no longer displayed. After step S716, and before the first electronic device sends the relative position between the second and first electronic devices to the target application via the first processor and SDK, the first electronic device displays the icon of the second electronic device on its screen. In response to an operation on the icon of the second electronic device, the first electronic device displays a first preset unlock interface and determines whether to unlock based on the unlock information entered in the first preset unlock interface. After the first electronic device unlocks, it sends the relative position between itself and the second electronic device to the target application via the first processor and SDK. The first electronic device can also perform network authentication with the second electronic device, establishing a wireless or wired communication link. Through this link, it notifies the second electronic device to display a second preset unlock interface and determines whether to unlock based on the unlock information entered on the second preset unlock interface. After the second electronic device unlocks, the first electronic device can send preset content to be displayed to the second electronic device via the established wireless communication link, based on their relative position. The first and second electronic devices then collaborate directly.
[0226] It is understood that in a scenario where neither the first electronic device nor the second electronic device is in sleep mode, either the first electronic device or the second electronic device may be in a locked screen state, and this application does not impose any restrictions on this.
[0227] Please refer to Figure 14 This is a flowchart illustrating a spatial location determination method provided in an embodiment of this application. The method includes:
[0228] S1401: The second electronic device controls the speaker to play a first analog audio signal, which is used to indicate that the second electronic device is online.
[0229] S1402: The first electronic device controls the microphone to acquire a first analog audio signal, and in response to the first analog audio signal, controls the speaker to play a second analog audio signal according to the pre-stored subscription information. The second analog audio signal is used to request the determination of the spatial position between the electronic devices.
[0230] S1403: The second electronic device controls the microphone to collect the second analog audio signal and determines the spatial position between the second electronic device and the first electronic device based on the second analog audio signal.
[0231] S1404: The second electronic device generates a third analog audio signal based on the spatial position between the second electronic device and the first electronic device, and controls the speaker to play the third analog audio signal. The third analog audio signal is used to notify the spatial position between the second electronic device and the first electronic device.
[0232] S1405: The first electronic device controls the microphone to collect the third analog audio signal, and obtains the spatial position between the second electronic device and the first electronic device through the third analog audio signal.
[0233] In some embodiments, the second electronic device controlling the speaker to play the first analog audio signal includes: after the second electronic device goes to sleep, if the motion sensor of the second electronic device detects that the motion state of the second electronic device is motion and then stops, the second electronic device controls the speaker to play the first analog audio signal.
[0234] In some embodiments, the second electronic device controlling the speaker to play the first analog audio signal includes: if the second electronic device detects that the target application is running, the second electronic device controls the speaker to play the first analog audio signal.
[0235] In some embodiments, before the second electronic device controls the speaker to play the first analog audio signal, the method further includes: the second electronic device performs binary encoding on preset information and encodes the encoded binary data into a first analog audio signal, the preset information being used to indicate that the second electronic device is online, and the first analog audio signal including at least one of a first chirp signal and a second chirp signal, the first chirp signal being used to represent binary code 0, and the second chirp signal being used to represent binary code 1.
[0236] In some embodiments, the first electronic device includes a first processor, which is in a sleep state. After the first electronic device obtains the spatial position between the second electronic device and the first electronic device through a third analog audio signal, the method further includes: the first electronic device waking up the first processor; and the first electronic device displaying the icon of the second electronic device on a screen-off display based on the spatial position between the second electronic device and the first electronic device through the first processor.
[0237] In some embodiments, the first electronic device turning off the screen to display the icon of the second electronic device based on the spatial position between the second electronic device and the first electronic device includes: the first electronic device determining a target display position for the icon of the second electronic device based on the spatial position between the second electronic device and the first electronic device; and the first electronic device turning off the screen to display the icon of the second electronic device at the target display position.
[0238] In some embodiments, before the first electronic device controls a speaker to play a second analog audio signal according to pre-stored subscription information in response to a first analog audio signal, the method further includes: before the first processor goes to sleep, a target application or operating system of the first electronic device sends a subscription request to the first processor, the subscription request being used to request a first type of spatial location between the subscribing electronic devices; the first electronic device generates subscription information through the first processor according to the subscription request; and the first electronic device saves the subscription information.
[0239] In some embodiments, the first analog audio signal is further used to request the determination of a second type of relative position between electronic devices; the first electronic device controlling a speaker to play a second analog audio signal in response to the first analog audio signal according to pre-stored subscription information includes: if the first analog audio signal matches the pre-stored subscription information, the first electronic device controlling a speaker to play a second analog audio signal in response to the first analog audio signal according to the pre-stored subscription information.
[0240] In some embodiments, the spatial location between electronic devices includes the relative position between electronic devices and the distance information between electronic devices.
[0241] In some embodiments, after the first electronic device displays the icon of the second electronic device while the screen of the second electronic device is off, the method further includes: the first electronic device coordinating with the second electronic device in response to an operation on the icon of the second electronic device.
[0242] Please refer to Figure 15 This is a flowchart illustrating another spatial location determination method provided in an embodiment of this application. The method is applied to a first electronic device. The first electronic device includes a first processor and a second processor, with the second processor connected to the first processor. The power consumption of the second processor is less than that of the first processor. The method includes:
[0243] S1501: The second processor controls the microphone to acquire the first analog audio signal, and in response to the first analog audio signal, controls the speaker to play the second analog audio signal according to the pre-stored subscription information. The first analog audio signal is the audio signal played by the speaker of the second electronic device. The first analog audio signal is used to indicate that the second electronic device is online, and the second analog audio signal is used to request the determination of the spatial position between the electronic devices. The pre-stored subscription information includes subscribers.
[0244] S1502: The second processor controls the microphone to acquire a third analog audio signal. The third analog audio signal is an audio signal played by the speaker of the second electronic device. The third analog audio signal is used to notify the spatial position between the second electronic device and the first electronic device.
[0245] S1503: The second processor sends the spatial location between the second electronic device and the first electronic device in the third analog audio signal to the subscriber via the first processor.
[0246] In some embodiments, before the second processor controls the microphone to acquire the first analog audio signal, the method further includes: the first processor entering a sleep state; before the second processor sends the spatial location between the second electronic device and the first electronic device in the third analog audio signal to the subscriber, the method further includes: the second processor waking up the first processor.
[0247] In some embodiments, before the first processor enters a sleep state, the method further includes: a subscriber sending a subscription request to the first processor, the subscription request being used to request a first type of spatial location between subscribed electronic devices; the subscriber including a target application or an operating system; the first processor generating subscription information based on the subscription request; and the first processor sending the subscription information to a second processor for storage.
[0248] In some embodiments, the first processor is an application processor and the second processor is an audio digital signal processor.
[0249] In some embodiments, before the second processor controls the speaker to play the second analog audio signal according to the pre-stored subscription information in response to the first analog audio signal, the method further includes: the second processor decoding the first analog audio signal into binary data and decoding the binary data into preset information, wherein the first analog audio signal includes at least one of a first chirp signal and a second chirp signal, the first chirp signal being used to represent binary code 0, the second chirp signal being used to represent binary code 1, and the preset information being used to indicate that the second electronic device is online.
[0250] In some embodiments, after the second processor sends the spatial location between the second electronic device and the first electronic device in a third analog audio signal to the subscriber via the first processor, the method further includes: the first electronic device cooperating with the second electronic device.
[0251] In addition to the methods and terminal devices described above, embodiments of this application also provide a computer-readable storage medium storing a program that enables an electronic device to perform... Figure 14 or Figure 15 The method for determining spatial location is shown.
[0252] A computer program product includes computer-executable instructions stored in a computer-readable storage medium; at least one processor of an electronic device can read the computer-executable instructions from the computer-readable storage medium, and the at least one processor executes the computer-executable instructions to cause the electronic device to perform... Figure 14 or Figure 15 The method for determining spatial location is shown.
[0253] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0254] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0255] A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
[0256] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application and are not intended to limit it. Although this application has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of this application without departing from the spirit and scope of the technical solutions of this application.
Claims
1. A method for determining spatial location, applied to a system including a first electronic device and a second electronic device, characterized in that, The method includes: In a scenario where the second electronic device is in sleep mode, if the motion sensor of the second electronic device detects that the second electronic device is in motion and then stops, the second electronic device controls the speaker to play a first analog audio signal, which is used to indicate that the second electronic device is online. In a scenario where the second electronic device is not in sleep mode, if the second electronic device detects that the target application is running, the second electronic device controls the speaker to play the first analog audio signal; The first electronic device controls the microphone to acquire the first analog audio signal, and in response to the first analog audio signal, controls the speaker to play a second analog audio signal according to the pre-stored subscription information. The second analog audio signal is used to request the determination of the spatial position between the electronic devices. The second electronic device controls the microphone to acquire the second analog audio signal, and determines the spatial position between the second electronic device and the first electronic device based on the second analog audio signal; The second electronic device generates a third analog audio signal based on the spatial position between the second electronic device and the first electronic device, and controls the speaker to play the third analog audio signal. The third analog audio signal is used to notify the second electronic device of the spatial position between the second electronic device and the first electronic device. The first electronic device controls the microphone to collect the third analog audio signal, and obtains the spatial position between the second electronic device and the first electronic device through the third analog audio signal.
2. The method as described in claim 1, characterized in that, Before the second electronic device controls the speaker to play the first analog audio signal, the method further includes: The second electronic device performs binary encoding on the preset information and encodes the encoded binary data into the first analog audio signal. The preset information is used to indicate that the second electronic device is online. The first analog audio signal includes at least one of a first chirp signal and a second chirp signal. The first chirp signal is used to represent binary code 0, and the second chirp signal is used to represent binary code 1.
3. The method as described in claim 1 or 2, characterized in that, The first electronic device includes a first processor, which is in a sleep state. After the first electronic device obtains the spatial position between the second electronic device and the first electronic device through the third analog audio signal, the method further includes: The first electronic device wakes up the first processor; The first electronic device displays the icon of the second electronic device when the screen is off, based on the spatial position between the second electronic device and the first electronic device, through the first processor.
4. The method as described in claim 3, characterized in that, The first electronic device displays the icon of the second electronic device when the screen is off, based on the spatial position between the second electronic device and the first electronic device, including: The first electronic device determines the target display position of the icon of the second electronic device based on the spatial position between the second electronic device and the first electronic device; The first electronic device displays the icon of the second electronic device when the screen is off at the target display location.
5. The method as described in claim 3, characterized in that, Before the first electronic device controls the speaker to play a second analog audio signal according to pre-stored subscription information in response to the first analog audio signal, the method further includes: Before the first processor goes to sleep, the target application or operating system of the first electronic device sends a subscription request to the first processor, the subscription request being used to request a first type of spatial location between the electronic devices. The first electronic device generates the subscription information based on the subscription request through the first processor; The first electronic device stores the subscription information.
6. The method as described in claim 5, characterized in that, The first analog audio signal is also used to request the determination of a second type of relative position between electronic devices; The first electronic device, in response to the first analog audio signal, controls a speaker to play a second analog audio signal according to pre-stored subscription information, including: If the first analog audio signal matches the pre-stored subscription information, the first electronic device responds to the first analog audio signal by controlling the speaker to play the second analog audio signal according to the pre-stored subscription information.
7. The method as described in claim 5 or 6, characterized in that, The spatial location types between the electronic devices include the relative positions between the electronic devices and the distance information between the electronic devices.
8. The method as described in claim 3, characterized in that, After the first electronic device displays the icon of the second electronic device while its screen is off, the method further includes: The first electronic device responds to an operation on the icon of the second electronic device and coordinates with the second electronic device.
9. A method for determining spatial location, characterized in that, The method includes: A first electronic device controls a microphone to acquire a first analog audio signal, and in response to the first analog audio signal, controls a speaker to play a second analog audio signal according to pre-stored subscription information. The first analog audio signal is the audio signal played by the speaker of the second electronic device. The first analog audio signal is used to indicate that the second electronic device is online, and the second analog audio signal is used to request the determination of the spatial position between the electronic devices. In the scenario where the second electronic device is in sleep mode, if the motion sensor of the second electronic device detects that the second electronic device is in motion and then stops, the second electronic device controls the speaker to play the first analog audio signal. In the scenario where the second electronic device is not in sleep mode, if the second electronic device detects that the target application is running, the second electronic device controls the speaker to play the first analog audio signal. The first electronic device controls the microphone to collect a third analog audio signal, which is an audio signal played by the speaker of the second electronic device. The third analog audio signal is used to notify the spatial position between the second electronic device and the first electronic device. The first electronic device obtains the spatial position between the second electronic device and the first electronic device through the third analog audio signal.
10. The method as described in claim 9, characterized in that, Before the first electronic device controls the speaker to play a second analog audio signal according to pre-stored subscription information in response to the first analog audio signal, the method further includes: The first electronic device decodes the first analog audio signal into binary data and decodes the binary data into preset information. The first analog audio signal includes at least one of a first chirp signal and a second chirp signal. The first chirp signal is used to represent binary code 0, and the second chirp signal is used to represent binary code 1. The preset information is used to indicate that the second electronic device is online.
11. The method as described in claim 9 or 10, characterized in that, The first electronic device includes a first processor, which is in a sleep state. After the first electronic device obtains the spatial position between the second electronic device and the first electronic device through the third analog audio signal, the method further includes: The first electronic device wakes up the first processor; The first electronic device displays the icon of the second electronic device when the screen is off, based on the spatial position between the second electronic device and the first electronic device, through the first processor.
12. The method as described in claim 11, characterized in that, The first electronic device displays the icon of the second electronic device when the screen is off, based on the spatial position between the second electronic device and the first electronic device, including: The first electronic device determines the target display position of the icon of the second electronic device based on the spatial position between the second electronic device and the first electronic device; The first electronic device displays the icon of the second electronic device when the screen is off at the target display location.
13. The method as described in claim 11, characterized in that, Before the first electronic device controls the speaker to play a second analog audio signal according to pre-stored subscription information in response to the first analog audio signal, the method further includes: Before the first processor goes to sleep, the target application or operating system of the first electronic device sends a subscription request to the first processor, the subscription request being used to request a first type of spatial location between the electronic devices. The first electronic device generates the subscription information based on the subscription request through the first processor; The first electronic device stores the subscription information.
14. The method as described in claim 13, characterized in that, The first analog audio signal is also used to request the determination of a second type of relative position between electronic devices; The first electronic device, in response to the first analog audio signal, controls a speaker to play a second analog audio signal according to pre-stored subscription information, including: If the first analog audio signal matches the pre-stored subscription information, the first electronic device responds to the first analog audio signal by controlling the speaker to play the second analog audio signal according to the pre-stored subscription information.
15. The method as described in claim 13 or 14, characterized in that, The spatial location types between the electronic devices include the relative positions between the electronic devices and the distance information between the electronic devices.
16. The method as described in claim 11, characterized in that, After the first electronic device displays the icon of the second electronic device while its screen is off, the method further includes: The first electronic device responds to an operation on the icon of the second electronic device and coordinates with the second electronic device.
17. A method for determining spatial location, applied to a first electronic device, characterized in that, The first electronic device includes a first processor and a second processor, the second processor being connected to the first processor, and the power consumption of the second processor being less than that of the first processor. The method includes: The second processor controls the microphone to acquire a first analog audio signal, and in response to the first analog audio signal, controls the speaker to play a second analog audio signal according to pre-stored subscription information. The first analog audio signal is the audio signal played by the speaker of the second electronic device. The first analog audio signal is used to indicate that the second electronic device is online, and the second analog audio signal is used to request the determination of the spatial position between electronic devices. The pre-stored subscription information includes subscribers. In the scenario where the second electronic device is in sleep mode, if the motion sensor of the second electronic device detects that the second electronic device is in motion and then stops, the second electronic device controls the speaker to play the first analog audio signal. In the scenario where the second electronic device is not in sleep mode, if the second electronic device detects that the target application is running, the second electronic device controls the speaker to play the first analog audio signal. The second processor controls the microphone to acquire a third analog audio signal, which is an audio signal played by the speaker of the second electronic device. The third analog audio signal is used to notify the spatial position between the second electronic device and the first electronic device. The second processor transmits the spatial location between the second electronic device and the first electronic device in the third analog audio signal to the subscriber via the first processor.
18. The method as described in claim 17, characterized in that, Before the second processor controls the microphone to acquire the first analog audio signal, the method further includes: The first processor enters a sleep state; Before the second processor transmits the spatial location between the second electronic device and the first electronic device in the third analog audio signal to the subscriber via the first processor, the method further includes: The second processor wakes up the first processor.
19. The method as described in claim 18, characterized in that, Before the first processor enters a sleep state, the method further includes: The subscriber sends a subscription request to the first processor, the subscription request being used to request a first type of spatial location between electronic devices; the subscriber includes a target application or operating system. The first processor generates the subscription information based on the subscription request; The first processor sends the subscription information to the second processor for storage.
20. The method according to any one of claims 17 to 19, characterized in that, The first processor is an application processor, and the second processor is an audio digital signal processor.
21. The method according to any one of claims 17 to 19, characterized in that, Before the second processor controls the speaker to play a second analog audio signal according to pre-stored subscription information in response to the first analog audio signal, the method further includes: The second processor decodes the first analog audio signal into binary data and decodes the binary data into preset information. The first analog audio signal includes at least one of a first chirp signal and a second chirp signal. The first chirp signal is used to represent binary code 0, and the second chirp signal is used to represent binary code 1. The preset information is used to indicate that the second electronic device is online.
22. The method according to any one of claims 17 to 19, characterized in that, After the second processor transmits the spatial location between the second electronic device and the first electronic device in the third analog audio signal to the subscriber via the first processor, the method further includes: The first electronic device works in conjunction with the second electronic device.
23. A method for determining spatial location, characterized in that, The method includes: In a scenario where the second electronic device is in sleep mode, if the motion sensor of the second electronic device detects that the second electronic device has stopped moving, the second electronic device controls the speaker to play a first analog audio signal, which is used to indicate that the second electronic device is online; in a scenario where the second electronic device is not in sleep mode, if the second electronic device detects that the target application is running, the second electronic device controls the speaker to play the first analog audio signal. The second electronic device controls the microphone to collect a second analog audio signal and determines the spatial position between the second electronic device and the first electronic device based on the second analog audio signal. The second analog audio signal is an audio signal played by the speaker of the first electronic device. The second analog audio signal is used to request the determination of the spatial position between the electronic devices. The second electronic device generates a third analog audio signal based on the spatial position between the second electronic device and the first electronic device, and controls the speaker to play the third analog audio signal. The third analog audio signal is used to notify the second electronic device of the spatial position between the second electronic device and the first electronic device.
24. The method as described in claim 23, characterized in that, Before the second electronic device controls the speaker to play the first analog audio signal, the method further includes: The second electronic device performs binary encoding on the preset information and encodes the encoded binary data into the first analog audio signal. The preset information is used to indicate that the second electronic device is online. The first analog audio signal includes at least one of a first chirp signal and a second chirp signal. The first chirp signal is used to represent binary code 0, and the second chirp signal is used to represent binary code 1.
25. A spatial location determination system, characterized in that, The system includes a first electronic device and a second electronic device, the first electronic device being configured to perform the method as described in any one of claims 9 to 16 or 17 to 22, and the second electronic device being configured to perform the method as described in claim 23 or 24.
26. An electronic device, characterized in that, The electronic device includes at least one processor, memory, speaker, and microphone; The at least one processor is coupled to the memory, the speaker, and the microphone; The memory is used to store instructions, the processor is used to execute the instructions, the speaker is used to play audio signals, and the microphone is used to collect audio signals. When the instruction is executed by the at least one processor, it causes the at least one processor to perform the method as described in any one of claims 1 to 8, 9 to 16, 17 to 22, or 23 to 24.
27. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program that causes a computer device to perform the method as described in any one of claims 1 to 8, 9 to 16, 17 to 22, or 23 to 24.
28. A computer program product, characterized in that, The computer program product includes computer-executable instructions stored in a computer-readable storage medium; at least one processor of the electronic device can read the computer-executable instructions from the computer-readable storage medium, and the at least one processor executes the computer-executable instructions to cause the electronic device to perform the method as described in any one of claims 1 to 8, 9 to 16, 17 to 22, or 23 to 24.
Citation Information
Patent Citations
Fast service discovery and pairing using ultrasonic communication
CN105830370A
Apparatus and method for measuring wireless range
CN107110962A
