Method for identifying position and electronic equipment

By automatically identifying the relative position relationship between electronic devices, the problem of manually setting the device position in the prior art is solved, the cross-device operation process is simplified, and the operation convenience is improved.

CN120447775APending Publication Date: 2025-08-08HUAWEI DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510519583.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2021-11-22
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

In the prior art, cross-device operations such as cross-device movement cursor, cross-device copying, pasting or dragging operations require the user to manually set the relative positional relationship of multiple electronic devices, and the operation is not simple enough.

Method used

The first electronic device instructs at least two second electronic devices to turn on the recording function and instructs the third electronic device to send an ultrasonic signal. The second electronic device detects the ultrasonic signal according to the recording function to determine the relative position relationship with the third electronic device. The first electronic device summarizes and determines the relative position relationship between the multiple devices without manual settings from the user.

Benefits of technology

It realizes the relative positional relationship between multiple devices without the need for users to manually set up, simplifies the cross-device operation process and improves operation convenience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120447775A_ABST
    Figure CN120447775A_ABST
Patent Text Reader

Abstract

The invention provides a position identification method and an electronic device, a third electronic device instructs at least two second electronic devices to start respective recording functions and send ultrasonic signals, and after the at least two second electronic devices start the recording functions, according to the ultrasonic signals detected through the respective recording functions, the third electronic device identifies positions of the at least two second electronic devices according to the ultrasonic signals detected through the respective recording functions. Determining the relative position relation between the first electronic device and the third electronic device, and then sending the relative position relation between the first electronic device and the third electronic device to the third electronic device; the third electronic device sends the relative position relation between the at least two second electronic devices and every two of the third electronic devices to the at least two second electronic devices, or the relative position relation between every two of the multiple electronic devices is determined according to the relative position relation between the at least two second electronic devices and the third electronic devices, and the relative position relation between every two of the multiple electronic devices is determined according to the relative position relation between the at least two second electronic devices and the third electronic devices. According to the method, a user does not need to manually set the relative position relation between every two devices in the multiple devices, and operation is easy and convenient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminal technology, and more particularly, to a method for identifying a location and an electronic device. Background Art

[0002] As the pace of office work quickens, if office workers can move the cursor across multiple electronic devices, copy, paste or drag across devices, etc., office efficiency can be greatly improved.

[0003] In the prior art, to implement operations such as moving a cursor across multiple electronic devices, copying, pasting, or dragging across multiple devices, users are required to manually set the relative positional relationships between the multiple electronic devices, which makes the operation inconvenient. Summary of the Invention

[0004] The embodiments of the present application provide a method and electronic device for identifying positions. The method can automatically identify the relative position relationship between two of multiple devices without the need for the user to manually set the relative position relationship between two of the multiple devices, and the operation is simple.

[0005] In a first aspect, a method for identifying a position is provided, which is applied to a first electronic device, including: the first electronic device sends a first indication message to at least two second electronic devices, the first indication message instructing the corresponding second electronic devices to turn on a recording function, and the first electronic device sends a second indication message to a third electronic device, the second indication message instructing the third electronic device to send an ultrasonic signal, the ultrasonic signal being used for the at least two second electronic devices to determine the relative position relationship between each of them and the third electronic device, after which the first electronic device receives the relative position relationship between each of them and the third electronic device sent by the at least two second electronic devices, and finally, the first electronic device sends the relative position relationship between each of the at least two second electronic devices and the third electronic device to the at least two second electronic devices and the third electronic device, or the first electronic device determines the relative position relationship between each of the at least two second electronic devices based on the relative position relationship between each of the at least two second electronic devices and the third electronic device.

[0006] Based on the above technical solution, the first electronic device instructs at least two second electronic devices to turn on their respective recording functions, and instructs the third electronic device to send an ultrasonic signal. After turning on the recording function, the at least two second electronic devices determine the relative position relationship between each of them and the third electronic device based on the ultrasonic signals detected by their respective recording functions, and then send the relative position relationship between each of them and the third electronic device to the first electronic device. Finally, after the first electronic device determines the relative position relationship between at least two second electronic devices and the third electronic device based on the relative position relationship between at least two second electronic devices and the third electronic device, it sends the relative position relationship between at least two second electronic devices and the third electronic device to at least two second electronic devices and the third electronic device, thereby realizing cross-device cursor movement, cross-device copying, pasting or dragging and other operations between the two second electronic devices and the third electronic device. This method does not require the user to manually set the relative position relationship between multiple devices, and is easy to operate.

[0007] The method of determining the relative position relationship between the two second electronic devices will be described below using the example of at least two second electronic devices including two second electronic devices in different situations.

[0008] In case 1, the two second electronic devices are located on opposite sides of the third electronic device.

[0009] Exemplarily, the relative position relationship indication sent by one of the two second electronic devices to the first electronic device indicates that one of the two second electronic devices is located on the first side of the third electronic device, and the relative position relationship indication sent by the other of the two second electronic devices to the first electronic device indicates that the other of the two second electronic devices is located on the second side of the third electronic device, wherein the first side is opposite to the second side, and the first side is the left side or the right side.

[0010] In this case, the first electronic device can determine that the two second electronic devices are located on opposite sides of the third electronic device, for example, one of the two second electronic devices is located on the left side of the third electronic device, and the other of the two second electronic devices is located on the right side of the third electronic device, or one of the two second electronic devices is located on the right side of the third electronic device, and the other of the two second electronic devices is located on the left side of the third electronic device.

[0011] Case 2: The two second electronic devices are located on the same side of the third electronic device.

[0012] Exemplarily, the relative position relationships sent by the two second electronic devices to the first electronic device both indicate that the two second electronic devices are located on the same side of the third electronic device, for example, both indicate that the two second electronic devices are located on the left or right side of the third electronic device.

[0013] In this case, the first electronic device can send first indication information to one of the two second electronic devices to instruct one of the two second electronic devices to turn on the recording function, and send second indication information to the other of the two second electronic devices to instruct the other of the two second electronic devices to send an ultrasonic signal. One of the second electronic devices determines the relative position relationship between the two second electronic devices based on the detected ultrasonic signal from the other second electronic device, and sends the relative position relationship between the two second electronic devices to the first electronic device.

[0014] Based on the above technical solution, when two second electronic devices are located on the same side of a third electronic device, by enabling the recording function of one of the two second electronic devices and enabling the other of the two second electronic devices to send an ultrasonic signal, one of the two second electronic devices can determine the relative position relationship between itself and the other second electronic device based on the ultrasonic signal.

[0015] In combination with the first aspect, in certain implementations of the first aspect, before sending the second indication information to another second electronic device among the two second electronic devices, the method also includes: the first electronic device receives a confirmation message for the first indication information sent by one of the two second electronic devices, and the confirmation message for the first indication information indicates that one of the two second electronic devices has turned on the recording function.

[0016] Based on the above technical solution, by causing one of the two second electronic devices to send confirmation information to the first electronic device in response to the received first indication information, the first electronic device can determine, based on the confirmation information, that the recording function of one of the second electronic devices has been activated. In this case, the first electronic device then instructs the other of the two second electronic devices to send an ultrasonic signal. After ensuring that the recording function of one of the two second electronic devices has been activated, the first electronic device then instructs the other of the two second electronic devices to send an ultrasonic signal. This allows the second electronic device to receive at least one set of ultrasonic signals from the left and right speakers of the other second electronic device. Only when receiving at least one set of ultrasonic signals from the left and right speakers of the electronic device that sent the ultrasonic signal can the second electronic device determine the relative positional relationship between itself and the other of the two second electronic devices. In addition, instructing the other of the two second electronic devices to send an ultrasonic signal after ensuring that the recording function of one of the two second electronic devices has been activated can also reduce the possibility of the second electronic device of the two second electronic devices receiving invalid signals and reduce the difficulty of processing the received signals.

[0017] In combination with the first aspect and the above-mentioned implementation methods, in some implementation methods of the first aspect, before sending the second indication information to the third electronic device, the method also includes: the first electronic device receives confirmation messages for the first indication information sent by at least two second electronic devices, and the confirmation message indicates that the corresponding second electronic device has turned on the recording function.

[0018] Based on the above technical solution, by enabling at least two second electronic devices to send confirmation information to the first electronic device in response to the received first indication information, the first electronic device can determine, based on the confirmation information, that at least two second electronic devices have turned on the recording function. In this case, the first electronic device then instructs the third electronic device to send an ultrasonic signal, and after ensuring that at least two second electronic devices have turned on the recording function, instructs the third electronic device to send an ultrasonic signal. This allows the at least two second electronic devices to receive at least one group of ultrasonic signals from the left speaker and the right speaker of the third electronic device. Only when receiving at least one group of ultrasonic signals from the left speaker and the right speaker of the third electronic device can the at least two second electronic devices determine the relative position relationship between themselves and the third electronic device. In addition, instructing the third electronic device to send an ultrasonic signal after ensuring that at least two second electronic devices have turned on the recording function can also reduce the possibility of at least two second electronic devices receiving invalid signals and reduce the difficulty of processing the received signals.

[0019] In a second aspect, a method for identifying a position is provided, which is applied to a second electronic device, and the method includes: the second electronic device receives first indication information from a first electronic device, and the first indication information instructs the second electronic device to turn on a recording function. The second electronic device turns on the recording function according to the first indication information. Afterwards, the second electronic device determines the relative position relationship between the second electronic device and the third electronic device based on an ultrasonic signal from the third electronic device detected based on the recording function. Afterwards, the second electronic device sends the relative position relationship between the second electronic device and the third electronic device to the first electronic device. Finally, the second electronic device receives the relative position relationship between at least two second electronic devices including the second electronic device and the third electronic device sent by the first electronic device.

[0020] Based on the above technical solution, the first electronic device instructs at least two second electronic devices (the above second electronic device is one of the at least two second electronic devices) to turn on their respective recording functions, and instructs the third electronic device to send an ultrasonic signal. After turning on the recording function, the at least two second electronic devices determine the relative position relationship between each of them and the third electronic device based on the ultrasonic signals detected by their respective recording functions, and then send the relative position relationship between each of them and the third electronic device to the first electronic device. Finally, after the first electronic device determines the relative position relationship between at least two second electronic devices and the third electronic device based on the relative position relationship between at least two second electronic devices and the third electronic device, it sends the relative position relationship between at least two second electronic devices and the third electronic device to at least two second electronic devices and the third electronic device, thereby realizing cross-device cursor movement, cross-device copying, pasting or dragging and other operations between the two second electronic devices and the third electronic device. This method does not require the user to manually set the relative position relationship between multiple devices, and is easy to operate.

[0021] In combination with the second aspect, in certain implementations of the second aspect, the second electronic device is one of the two second electronic devices, and the relative position relationship between the second electronic device and the third electronic device includes: the second electronic device is located on a first side of the third electronic device, the first side is opposite to the second side, and the second side is the relative position relationship between the other second electronic device of the two second electronic devices and the third electronic device, wherein the first side is the left side or the right side.

[0022] In combination with the second aspect and the above-mentioned implementation methods, in some implementation methods of the second aspect, the second electronic device is one of two second electronic devices, and the method also includes: the second electronic device receives the first indication information sent by the first electronic device, the second electronic device turns on the recording function according to the first indication information, the second electronic device determines the relative position relationship between the second electronic device and the other second electronic device based on the ultrasonic signal from the other second electronic device of the two second electronic devices detected based on the recording function, and the second electronic device sends the relative position relationship between the second electronic device and the other second electronic device to the first electronic device.

[0023] Based on the above technical solution, when two second electronic devices are located on the same side of a third electronic device, by enabling the recording function of one of the two second electronic devices and enabling the other of the two second electronic devices to send an ultrasonic signal, one of the two second electronic devices can determine the relative position relationship between itself and the other second electronic device based on the ultrasonic signal.

[0024] In combination with the second aspect and the above-mentioned implementation methods, in some implementation methods of the second aspect, the second electronic device is one of two second electronic devices, and the method also includes: receiving second indication information sent by the first electronic device, the second indication information instructing the second electronic device to play an ultrasonic signal, and the second electronic device plays the ultrasonic signal according to the second indication information, and the ultrasonic signal is used to determine the relative position relationship between the two second electronic devices.

[0025] In combination with the second aspect and the above-mentioned implementation methods, in some implementation methods of the second aspect, after the second electronic device turns on the recording function, the method also includes: the second electronic device sends a confirmation message for the first indication information to the first electronic device, and the confirmation message for the first indication information indicates that the second electronic device has turned on the recording function.

[0026] Based on the above technical solution, by enabling the second electronic device to send confirmation information to the first electronic device in response to the received first indication information, the first electronic device can determine, based on the confirmation information, that the second electronic device has turned on the recording function. In this case, the first electronic device then instructs the electronic device that sends the ultrasonic signal to send the ultrasonic signal. After ensuring that the second electronic device has turned on the recording function, the first electronic device instructs the electronic device that sends the ultrasonic signal to send the ultrasonic signal. This allows the second electronic device to receive at least one group of ultrasonic signals from the left speaker and the right speaker of the electronic device that sends the ultrasonic signal. Only when it receives at least one group of ultrasonic signals from the left speaker and the right speaker of the electronic device that sends the ultrasonic signal can the second electronic device determine the relative position relationship between itself and the electronic device that sends the ultrasonic signal. In addition, instructing the electronic device that sends the ultrasonic signal to send the ultrasonic signal after ensuring that the second electronic device has turned on the recording function can also reduce the possibility of the second electronic device receiving invalid signals and reduce the difficulty of processing the received signals.

[0027] According to a third aspect, a method for identifying a position is provided, which is applied to a third electronic device. The method includes: the third electronic device sends a first indication message to at least two second electronic devices, the first indication message instructs the corresponding second electronic devices to turn on a recording function, the third electronic device plays an ultrasonic signal, the ultrasonic signal is used to determine the relative position relationship between the third electronic device and the at least two second electronic devices, the third electronic device receives the relative position relationship between each of the at least two second electronic devices and the third electronic device sent by the at least two second electronic devices, and finally, the third electronic device sends the relative position relationship between each of the at least two second electronic devices and the third electronic device to the at least two second electronic devices, or the third electronic device determines the relative position relationship between each of the at least two second electronic devices based on the relative position relationship between each of the at least two second electronic devices and the third electronic device.

[0028] Based on the above technical solution, the third electronic device instructs at least two second electronic devices to turn on their respective recording functions and send ultrasonic signals. After turning on the recording function, the at least two second electronic devices determine the relative position relationship between each of them and the third electronic device based on the ultrasonic signals detected by their respective recording functions, and then send the relative position relationship between each of them and the third electronic device to the third electronic device. Finally, after the third electronic device determines the relative position relationship between at least two second electronic devices and the third electronic device based on the relative position relationship between at least two second electronic devices and the third electronic device, it sends the relative position relationship between at least two second electronic devices and the third electronic device to at least two second electronic devices, thereby realizing cross-device cursor movement, cross-device copying, pasting or dragging and other operations between the two second electronic devices and the third electronic device. This method does not require the user to manually set the relative position relationship between multiple devices, and is easy to operate.

[0029] The method of determining the relative position relationship between the two second electronic devices will be described below using the example of at least two second electronic devices including two second electronic devices in different situations.

[0030] In case 1, the two second electronic devices are located on opposite sides of the third electronic device.

[0031] Exemplarily, the relative position relationship indication sent by one of the two second electronic devices to the third electronic device indicates that one of the two second electronic devices is located on the first side of the third electronic device, and the relative position relationship indication sent by the other of the two second electronic devices to the third electronic device indicates that the other of the two second electronic devices is located on the second side of the third electronic device, wherein the first side is opposite to the second side, and the first side is the left side or the right side.

[0032] In this case, the third electronic device can determine that the two second electronic devices are located on opposite sides of the third electronic device, for example, one of the two second electronic devices is located on the left side of the third electronic device, and the other of the two second electronic devices is located on the right side of the third electronic device, or one of the two second electronic devices is located on the right side of the third electronic device, and the other of the two second electronic devices is located on the left side of the third electronic device.

[0033] Case 2: The two second electronic devices are located on the same side of the third electronic device.

[0034] Exemplarily, the relative position relationships sent by the two second electronic devices to the third electronic device both indicate that the two second electronic devices are located on the same side of the third electronic device, for example, both indicate that the two second electronic devices are located on the left or right side of the third electronic device.

[0035] In this case, the third electronic device can send a first indication message to one of the two second electronic devices to instruct one of the two second electronic devices to turn on the recording function, and send a second indication message to the other of the two second electronic devices to instruct the other of the two second electronic devices to send an ultrasonic signal. One of the second electronic devices determines the relative position relationship between the two second electronic devices based on the detected ultrasonic signal from the other second electronic device, and sends the relative position relationship between the two second electronic devices to the third electronic device.

[0036] Based on the above technical solution, when two second electronic devices are located on the same side of a third electronic device, by enabling the recording function of one of the two second electronic devices and enabling the other of the two second electronic devices to send an ultrasonic signal, one of the two second electronic devices can determine the relative position relationship between itself and the other second electronic device based on the ultrasonic signal.

[0037] In combination with the third aspect, in certain implementations of the third aspect, before sending the second indication information to another second electronic device among the two second electronic devices, the method also includes: the third electronic device receives a confirmation message for the first indication information sent by one of the two second electronic devices, and the confirmation message for the first indication information indicates that one of the two second electronic devices has turned on the recording function.

[0038] Based on the above technical solution, by causing one of the two second electronic devices to send confirmation information to the third electronic device in response to the received first indication information, the third electronic device can determine, based on the confirmation information, that one of the second electronic devices has activated the recording function. In this case, the third electronic device then instructs the other of the two second electronic devices to send an ultrasonic signal. After ensuring that one of the two second electronic devices has activated the recording function, the third electronic device instructs the other of the two second electronic devices to send an ultrasonic signal. This allows one of the second electronic devices to receive at least one set of ultrasonic signals from the left and right speakers of the other second electronic device. Only when receiving at least one set of ultrasonic signals from the left and right speakers of the electronic device that sent the ultrasonic signal can the second electronic device determine the relative positional relationship between itself and the other of the two second electronic devices. In addition, instructing the other of the two second electronic devices to send an ultrasonic signal after ensuring that one of the two second electronic devices has activated the recording function can also reduce the possibility of one of the two second electronic devices receiving an invalid signal and reduce the difficulty of processing the received signal.

[0039] In combination with the third aspect and the above-mentioned implementation methods, in some implementation methods of the third aspect, before the third electronic device plays the ultrasonic signal, the method also includes: the third electronic device receives a confirmation message for the first indication information sent by at least two second electronic devices, and the confirmation message indicates that the corresponding second electronic device has turned on the recording function.

[0040] Based on the above technical solution, by enabling at least two second electronic devices to send confirmation information to the third electronic device in response to the received first indication information, the third electronic device can determine, based on the confirmation information, that at least two second electronic devices have turned on the recording function. In this case, the third electronic device sends an ultrasonic signal again, which can enable at least two second electronic devices to receive at least one group of ultrasonic signals from the left speaker and the right speaker of the third electronic device. Only when at least one group of ultrasonic signals from the left speaker and the right speaker of the third electronic device are received can the at least two second electronic devices determine the relative position relationship between themselves and the third electronic device. In addition, the third electronic device sends an ultrasonic signal only after ensuring that at least two second electronic devices have turned on the recording function, which can also reduce the possibility of at least two second electronic devices receiving invalid signals and reduce the difficulty of processing the received signals.

[0041] In a fourth aspect, a method for identifying a position is provided, which is applied to a second electronic device, the method comprising: the second electronic device receives first indication information from a third electronic device, the first indication information instructing the second electronic device to turn on a recording function, the second electronic device turns on the recording function according to the first indication information, and then the second electronic device determines the relative position relationship between the second electronic device and the third electronic device based on an ultrasonic signal from the third electronic device detected based on the recording function, and then the second electronic device sends the relative position relationship between the second electronic device and the third electronic device to the third electronic device, and finally, the second electronic device receives the relative position relationship between at least two second electronic devices including the second electronic device and the third electronic device sent by the third electronic device.

[0042] Based on the above technical solution, the third electronic device instructs at least two second electronic devices (the above second electronic device is one of the at least two second electronic devices) to turn on their respective recording functions and send ultrasonic signals. After turning on the recording function, the at least two second electronic devices determine the relative position relationship between each of them and the third electronic device based on the ultrasonic signals detected by their respective recording functions, and then send the relative position relationship between each of them and the third electronic device to the third electronic device. Finally, after the third electronic device determines the relative position relationship between at least two second electronic devices and the third electronic device based on the relative position relationship between at least two second electronic devices and the third electronic device, it sends the relative position relationship between at least two second electronic devices and the third electronic device to at least two second electronic devices, thereby realizing cross-device cursor movement, cross-device copying, pasting or dragging and other operations between the two second electronic devices and the third electronic device. This method does not require the user to manually set the relative position relationship between multiple devices, and is easy to operate.

[0043] In combination with the fourth aspect, in certain implementations of the fourth aspect, the second electronic device is one of the two second electronic devices, and the relative position relationship between the second electronic device and the third electronic device includes: the second electronic device is located on a first side of the third electronic device, the first side is opposite to the second side, and the second side is the relative position relationship between the other second electronic device of the two second electronic devices and the third electronic device, wherein the first side is the left side or the right side.

[0044] In combination with the fourth aspect and the above-mentioned implementation methods, in some implementation methods of the fourth aspect, the second electronic device is one of the two second electronic devices, and the method also includes: the second electronic device receives the first indication information sent by the third electronic device, the second electronic device turns on the recording function according to the first indication information, the second electronic device determines the relative position relationship between the second electronic device and the other second electronic device based on the ultrasonic signal from the other second electronic device of the two second electronic devices detected based on the recording function, and the second electronic device sends the relative position relationship between the second electronic device and the other second electronic device to the third electronic device.

[0045] Based on the above technical solution, when two second electronic devices are located on the same side of a third electronic device, by enabling the recording function of one of the two second electronic devices and enabling the other of the two second electronic devices to send an ultrasonic signal, one of the two second electronic devices can determine the relative position relationship between itself and the other second electronic device based on the ultrasonic signal.

[0046] In combination with the fourth aspect and the above-mentioned implementation methods, in some implementation methods of the fourth aspect, the second electronic device is one of two second electronic devices, and the method also includes: the second electronic device receives second indication information sent by the third electronic device, the second indication information instructs the second electronic device to play an ultrasonic signal, and the second electronic device plays the ultrasonic signal according to the second indication information, and the ultrasonic signal is used to determine the relative position relationship between the two second electronic devices.

[0047] In combination with the fourth aspect and the above-mentioned implementation methods, in some implementation methods of the fourth aspect, after the second electronic device turns on the recording function, the method also includes: the second electronic device sends a confirmation message for the first indication information to the third electronic device, and the confirmation message for the first indication information indicates that the second electronic device has turned on the recording function.

[0048] Based on the above technical solution, by enabling the second electronic device to send confirmation information to the third electronic device in response to the received first indication information, the third electronic device can determine, based on the confirmation information, that the second electronic device has turned on the recording function. In this case, the third electronic device sends an ultrasonic signal again. The third electronic device sends the ultrasonic signal only after ensuring that the second electronic device has turned on the recording function, so that the second electronic device can receive at least one group of ultrasonic signals from the left speaker and the right speaker of the third electronic device. Only when the second electronic device receives at least one group of ultrasonic signals from the left speaker and the right speaker of the third electronic device can it determine the relative position relationship between itself and the third electronic device. In addition, the third electronic device sends the ultrasonic signal only after ensuring that the second electronic device has turned on the recording function, which can also reduce the possibility of the second electronic device receiving invalid signals and reduce the difficulty of processing the received signals.

[0049] In a fifth aspect, the present application provides a device, which is included in an electronic device and has the function of implementing the electronic device behavior in the above aspects and possible implementations of the above aspects. The function can be implemented by hardware or by hardware executing corresponding software implementation.

[0050] Optionally, the device may be the first electronic device, the second electronic device, or the third electronic device mentioned above.

[0051] In a sixth aspect, the present application provides an electronic device comprising: one or more processors; a memory; a plurality of application programs; and one or more computer programs. The one or more computer programs are stored in the memory, and the one or more computer programs include instructions. When the instructions are executed by the electronic device, the electronic device performs the location identification method of any possible implementation of any of the above aspects.

[0052] Optionally, the electronic device may be the first electronic device, the second electronic device, or the third electronic device mentioned above.

[0053] In a seventh aspect, the present application provides an electronic device comprising one or more processors and one or more memories. The one or more memories are coupled to the one or more processors, and the one or more memories are used to store computer program code, wherein the computer program code comprises computer instructions. When the one or more processors execute the computer instructions, the electronic device performs the method for identifying a location in any possible implementation of any of the above aspects.

[0054] In the eighth aspect, a system is provided, which includes at least a first electronic device, at least two second electronic devices and a third electronic device, the first electronic device is used to execute the location identification method in any possible implementation of the above-mentioned first aspect, the second electronic device is used to execute the location identification method in any possible implementation of the above-mentioned second aspect or fourth aspect, and the third electronic device is used to execute the location identification method in any possible implementation of the above-mentioned third aspect.

[0055] In a ninth aspect, the present application provides a computer-readable storage medium comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute any possible location identification method according to any of the above aspects.

[0056] In a tenth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute any possible location identification method according to any of the above aspects. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] Figure 1 This is a schematic diagram of the structure of an electronic device provided by this application;

[0058] Figure 2 is a structural diagram of another electronic device provided in an embodiment of the present application;

[0059] Figure 3 This is a schematic diagram of a scenario provided in an embodiment of the present application;

[0060] Figure 4 This is an interactive flow chart of a method for identifying a location provided in an embodiment of the present application;

[0061] Figure 5 Schematic diagram of the distribution of left and right speakers on an electronic device provided by an embodiment of the present application;

[0062] Figure 6 is an interactive flow chart of another method for identifying a location provided in an embodiment of the present application;

[0063] Figure 7 is a schematic diagram of an example display interface during the process of identifying a position provided by an embodiment of the present application;

[0064] Figure 8 is a schematic diagram of another scenario provided in an embodiment of the present application;

[0065] Figure 9 This is an interactive flow chart of another method for identifying a location provided in an embodiment of the present application;

[0066] Figure 10This is an interactive flow chart of another method for identifying a location provided in an embodiment of the present application;

[0067] Figure 11 is a schematic diagram of another scenario provided in an embodiment of the present application;

[0068] Figure 12 This is an interactive flow chart of another method for identifying a location provided in an embodiment of the present application;

[0069] Figure 13 This is an interactive flow chart of another method for identifying a location provided in an embodiment of the present application;

[0070] Figure 14 is a schematic diagram of another scenario provided in an embodiment of the present application;

[0071] Figure 15 This is an interactive flow chart of another method for identifying a location provided in an embodiment of the present application;

[0072] Figure 16 This is an interactive flow chart of another method for identifying a location provided in an embodiment of the present application;

[0073] Figure 17 This is an interactive flowchart of another example of a method for identifying a location provided in an embodiment of the present application. DETAILED DESCRIPTION

[0074] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0075] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of such features, such as the "first indication information" and "second indication information" described in the embodiments of this application.

[0076] The location identification method provided in the embodiment of the present application can be applied to electronic devices such as desktop computers, laptop computers, and mice. The embodiment of the present application does not impose any restrictions on the specific type of device.

[0077] Figure 1A structural diagram of an electronic device 100 provided in an embodiment of the present application is shown. The electronic device 100 may be a desktop computer, a laptop computer, etc. with a display function.

[0078] The electronic device 100 may include a processor 110 , an ultrasonic signal generating module 120 , an audio module 130 , a recording module 140 , a position identification module 150 , an internal memory 160 , an external memory interface 170 , a communication module 180 , and a display module 190 .

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

[0080] Processor 110 may be provided with a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces processor 110 latency, and thus improves system efficiency.

[0081] The ultrasonic signal generating module 120 may be configured to generate an ultrasonic signal.

[0082] The audio module 130 can be used to play ultrasonic signals externally.

[0083] The recording module 140 can be used to receive ultrasonic signals.

[0084] The position identification module 150 can be used to determine the relative position relationship between multiple electronic devices based on the ultrasonic signal.

[0085] The internal memory 160 can be used to store computer executable program codes, which include instructions. The internal memory 160 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, text, etc.), etc. In addition, the internal memory 160 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 160 and / or instructions stored in a memory provided in the processor.

[0086] The external memory interface 170 can be used to connect an external storage device, such as a USB flash drive, to expand the storage capacity of the electronic device 100. The USB flash drive communicates with the processor 110 via the external memory interface 170 to implement data storage functions. For example, files such as music and videos can be stored in the USB flash drive.

[0087] The communication module 180 can be used to receive and send instructions or information.

[0088] The display module 190 can be used to display images, videos, etc.

[0089] Figure 2 A structural diagram of an electronic device 200 provided in an embodiment of the present application is shown. The electronic device 200 may be an electronic device such as a mouse that does not have a display function.

[0090] The electronic device 200 may include a processor 210 , a receiver 220 , and a transmitter 230 .

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

[0092] For an introduction to the processor 210 , please refer to the above description of the processor 110 , which will not be repeated here for the sake of brevity.

[0093] When the electronic device 200 is in communication connection with the electronic device 100 , the receiver 220 may be used to receive instructions from the electronic device 100 , and the transmitter 230 may be used to send instructions to the electronic device 100 .

[0094] The following combination Figures 3 to 14 The method for identifying a location provided in an embodiment of the present application is described in detail.

[0095] Figure 3 An application scenario of the method for identifying a location provided by an embodiment of the present application is shown. Figure 3 Three electronic devices are shown in the figure. For the convenience of description, these three electronic devices are respectively recorded as electronic device 1, electronic device 2 and electronic device 3. In order to implement operations such as moving the cursor across devices between electronic device 1, electronic device 2 and electronic device 3, it is first necessary to determine the relative position relationship between each of electronic device 1, electronic device 2 and electronic device 3. In one implementation, the relative position relationship between each of electronic device 1, electronic device 2 and electronic device 3 can be determined by the mouse provided in an embodiment of the present application. In this case, the mouse needs to have a communication connection with electronic device 1, electronic device 2 and electronic device 3, for example, a short-range communication connection, so as to communicate with electronic device 1, electronic device 2 and electronic device 3 in the process of determining the relative position relationship.

[0096] In another implementation, one of electronic devices 1, 2, and 3 can determine the relative positional relationship between any two of electronic devices 1, 2, and 3. In this case, a communication connection, such as a short-range communication connection, is required between any two of electronic devices 1, 2, and 3 to facilitate communication during the determination of the relative positional relationship. In the following description, it is assumed that a communication connection exists between the mouse and each electronic device, or that multiple electronic devices are connected to each other.

[0097] In the embodiment of the present application, the relative position relationship between the two electronic devices can be understood as: one electronic device is located on the left or right side of the other electronic device, for example, Figure 3 In the figure, the relative position relationship between electronic device 1 and electronic device 2 is that electronic device 1 is located on the right side of electronic device 2, and the relative position relationship between electronic device 2 and electronic device 1 is that electronic device 2 is located on the left side of electronic device 1.

[0098] It should be understood that Figure 3 The number of electronic devices with display functions included in the scenarios shown below, the relative positional relationship between the electronic devices, and the types of electronic devices do not constitute a limitation on the embodiments of the present application. In specific implementations, more or fewer electronic devices may be included than in each scenario, and other relative positional relationships may exist between the electronic devices other than in the scenario, and the electronic devices may also be of other types other than in the scenario.

[0099] The following combination Figure 3 In the scenario shown, a method for identifying a position provided by an embodiment of the present application is introduced by taking the relative position relationship between electronic device 1, electronic device 2, and electronic device 3 as an example of determining the relative position relationship between electronic device 1, electronic device 2, and electronic device 3 by a mouse. Figure 4 An exemplary interactive flow chart of the location identification method 400 is shown. It is worth mentioning that in the method 400, the mouse corresponds to the first electronic device, the electronic device 1 corresponds to the third electronic device, and the electronic devices 2 and 3 correspond to the two second electronic devices one-to-one.

[0100] In step 401 , the mouse sends first instruction information to the electronic device 2 and the electronic device 3 respectively, so as to instruct the electronic device 2 and the electronic device 3 to activate their respective recording functions.

[0101] For example, the user may trigger the mouse to execute the position recognition process.

[0102] For example, a physical button can be embedded in the mouse. When the physical button is pressed, the mouse starts to execute the position identification process. For example, after the physical button is pressed, the transmitter in the mouse is triggered to send instructions indicating the start of the position identification process to electronic device 1, electronic device 2, and electronic device 3 based on the short-range communication connection established between the electronic device 1, electronic device 2, and electronic device 3. After receiving the instructions indicating the start of the position identification process, electronic device 1, electronic device 2, and electronic device 3 return confirmation (Ack) messages to the mouse based on the short-range communication connection established with the mouse, indicating that they agree to start the position identification process. After receiving the confirmation messages from electronic device 1, electronic device 2, and electronic device 3, the mouse can start the position identification process.

[0103] After the location recognition process starts, the mouse sends a first indication message to electronic device 2 and electronic device 3 respectively to instruct electronic device 2 and electronic device 3 to turn on their respective recording functions. For example, the mouse sends a first indication message to electronic device 2 and electronic device 3 respectively based on the short-range communication connection established between the mouse and electronic device 2 and electronic device 3.

[0104] In step 402, electronic device 2 and electronic device 3 activate their respective recording functions according to the first instruction information they receive.

[0105] After the mouse sends the first indication information to electronic device 2 and electronic device 3, in one implementation, the mouse can directly execute step 404 after sending the first indication information to electronic device 2 and electronic device 3: the mouse sends the second indication information to electronic device 1 to instruct electronic device 1 to play an ultrasonic signal. For example, the mouse sends the second indication information to electronic device 1 based on the short-range communication connection established between the mouse and electronic device 1.

[0106] In another implementation, after the mouse sends the first indication information to electronic device 2 and electronic device 3, if the mouse receives a confirmation message from electronic device 2 and electronic device 3, for example, an Ack message, the mouse executes step 404, wherein the confirmation message from electronic device 2 and electronic device 3 is the response of electronic device 2 and electronic device 3 to the first indication information respectively. In this case, method 400 may further include step 403 before step 404: after electronic device 2 and electronic device 3 turn on their own recording functions, they send a confirmation message to the mouse to inform the mouse that the recording functions of electronic device 2 and electronic device 3 have been turned on.

[0107] After receiving the second instruction information, the electronic device 1 executes step 405: playing the ultrasonic signal.

[0108] Since electronic device 2 and electronic device 3 have their respective recording functions turned on, when electronic device 1 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2 and electronic device 3. Then electronic device 2 and electronic device 3 can execute step 406, and electronic device 2 and electronic device 3 each determine the relative position relationship between themselves and electronic device 1 based on the received ultrasonic signal.

[0109] For example, the electronic device 1 plays the ultrasonic signal through the left speaker and the right speaker. The distribution state of the left speaker and the right speaker on the electronic device 1 can be as follows: Figure 5 As shown, the electronic device 2 and the electronic device 3 can determine the relative position relationship between themselves and the electronic device 1 according to the difference in the time when the two ultrasonic signals are received.

[0110] In order to enable a device receiving an ultrasonic signal to distinguish whether the ultrasonic signal comes from the left speaker or the right speaker based on the received ultrasonic signal, the device playing the ultrasonic signal can play the ultrasonic signal alternately through the left speaker and the right speaker, and can distinguish the ultrasonic signal from the left speaker from the ultrasonic signal from the right speaker by signal characteristics. For example, the device playing the ultrasonic signal can send an ultrasonic signal with a decreasing frequency through the left speaker and an ultrasonic signal with an increasing frequency through the right speaker, so that the device receiving the ultrasonic signal can distinguish the ultrasonic signal from the left speaker from the ultrasonic signal from the right speaker from the two received ultrasonic signals. The following describes a method for determining the relative position relationship between electronic device 2 and electronic device 1 based on the two received ultrasonic signals, taking electronic device 2 as an example.

[0111] For example, the electronic device 1 first plays an ultrasonic signal s1 with decreasing frequency through the left speaker within the time length T1 corresponding to time t1 to time t2, and then plays an ultrasonic signal s2 with increasing frequency through the right speaker within the time length T3 corresponding to time t3 to time t4 from time t2 after an interval of time length T2.

[0112] After electronic device 2 receives the ultrasonic signal s1 from the left speaker of electronic device 1 and the ultrasonic signal s2 from the right speaker of electronic device 1, it determines the time difference between the arrival times, i.e., t6-t5-(T1+T2), based on the time t5 when the ultrasonic signal s1 played by the left speaker of electronic device 1 arrives at the recording module of electronic device 2, and the time t6 when the ultrasonic signal s2 played by the right speaker of electronic device 1 arrives at the recording module of electronic device 2.

[0113] If t6-t5-(T1+T2) is greater than 0, it means that the ultrasonic signal s1 from the left speaker of electronic device 1 reaches the recording module of electronic device 2 earlier, which means that electronic device 2 is located on the left side of electronic device 1, or, if t6-t5-(T1+T2) is less than 0, it means that the ultrasonic signal s2 from the right speaker of electronic device 1 reaches the recording module of electronic device 2 earlier, which means that electronic device 2 is located on the right side of electronic device 1.

[0114] exist Figure 3 In the illustrated scenario, the electronic device 2 determines that t6 − t5 − ( T1 + T2 ) is greater than 0, and thus the electronic device 2 can determine that it is located on the left side of the electronic device 1 .

[0115] Accordingly, the electronic device 3 can determine that it is located on the right side of the electronic device 1. For the method of determining the relative position relationship between the electronic device 3 and the electronic device 1, please refer to the above description. For the sake of brevity, it will not be repeated here. It is worth mentioning that for the electronic device with display function provided in the embodiment of the present application, the distribution status of the left speaker and the right speaker thereon can be as follows: Figure 5 As shown, for the sake of brevity, the distribution status of the left speaker and the right speaker on the electronic device with a display function will not be described below.

[0116] It is worth mentioning that, regarding the value of t6-t5-(T1+T2), in addition to the two cases mentioned above of being greater than 0 or less than 0, there may also be a case where it is equal to 0. When the electronic device 2 determines that t6-t5-(T1+T2) is equal to 0, it means that the electronic device 2 is located directly in front of or directly behind the electronic device 1. In this case, the electronic device 2 can prompt the user to adjust the placement position, so that the user can adjust the placement position of the relevant electronic device according to the prompt of the electronic device 2 to adjust the front and back relative position relationship to the left and right relative position relationship.

[0117] It should be understood that the ultrasonic signal is merely an example and does not constitute a limitation on the embodiments of the present application. For example, in a specific implementation, any audio signal that exceeds the range of human hearing should fall within the protection scope of the embodiments of the present application.

[0118] After electronic device 2 and electronic device 3 determine the relative position relationship between themselves and electronic device 1 , step 407 may be executed: electronic device 2 and electronic device 3 send the relative position relationship between themselves and electronic device 1 to the mouse.

[0119] In step 408 , the mouse determines that electronic device 2 is located on the left side of electronic device 1 and that electronic device 3 is located on the right side of electronic device 1 based on the relative positional relationships between electronic device 2 and electronic device 3 and electronic device 1 .

[0120] After determining that electronic device 2 is located on the left side of electronic device 1 and electronic device 3 is located on the right side of electronic device 1, the mouse obtains the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3. In this case, in order to enable the cursor to switch freely between electronic devices 1, electronic device 2, and electronic device 3, the mouse also needs to inform each device of the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3. In this case, method 400 also includes step 409: the mouse sends the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3 to electronic device 1, electronic device 2, and electronic device 3 respectively. For example, the mouse sends to electronic devices 1, electronic device 2, and electronic device 3 respectively that electronic device 2 is located on the left side of electronic device 1 and electronic device 3 is located on the right side of electronic device 1.

[0121] After obtaining the relative positional relationship between any two of electronic devices 1 , 2 , 3 , electronic devices 1 , 2 , 3 can support free switching of the mouse among electronic devices 1 , 2 , 3 .

[0122] For example, assuming that the mouse cursor is currently located on electronic device 1, when the user needs to make the cursor appear on electronic device 2, the user can control the cursor to move in the direction close to electronic device 2 through the mouse, that is, control the cursor to move to the left border of the display interface of electronic device 1 through the mouse. When the cursor moves to the left border of electronic device 1, if the user controls the cursor to continue to move to the left through the mouse, the cursor will appear on electronic device 2; when the user needs to make the cursor appear on electronic device 3, the user can control the cursor to move in the direction close to electronic device 3 through the mouse, that is, control the cursor to move to the right border of the display interface of electronic device 1 through the mouse. When the cursor moves to the right border of electronic device 1, if the user controls the cursor to continue to move to the right through the mouse, the cursor will appear on electronic device 3.

[0123] It is worth mentioning that in method 400, only electronic device 1 is used as a device for playing ultrasonic signals, and electronic devices 2 and 3 are used as devices for receiving ultrasonic signals to illustrate the method for identifying position provided in the embodiment of the present application. However, this does not constitute a limitation on the embodiment of the present application. For example, in a specific implementation, any one of electronic devices 1, 2, and 3 can be used as a device for playing ultrasonic signals, and the other two devices can be used as devices for receiving ultrasonic signals. The embodiment of the present application does not limit this. For example, the device that plays ultrasonic signals can be the device that first establishes a short-range communication connection with the mouse.

[0124] It is worth mentioning that in method 400, the recording function of electronic device 2 and electronic device 3 is only used as an example to be turned on based on the first indication information, but this does not constitute a limitation on the embodiments of the present application. For example, in a specific implementation, the recording function of electronic device 2 and electronic device 3 can always be in the turned-on state. In this case, the mouse may not execute steps 401 and 402 in method 400.

[0125] Next, continue to combine Figure 3 In the scenario shown, taking the relative position relationship between electronic device 1, electronic device 2, and electronic device 3 as an example, another example of a method for identifying a position provided by an embodiment of the present application is introduced. Figure 6 An exemplary interactive flow chart of the location identification method 600 is shown. It is worth mentioning that in the method 600, the electronic device 1 corresponds to the third electronic device, and the electronic devices 2 and 3 correspond to the two second electronic devices respectively.

[0126] The electronic device used to determine the relative position relationship between each of electronic device 1, electronic device 2, and electronic device 3 can be selected by the user from electronic device 1, electronic device 2, and electronic device 3. In other words, any one of electronic device 1, electronic device 2, and electronic device 3 may be selected by the user as the electronic device used to determine the relative position relationship between each of electronic device 1, electronic device 2, and electronic device 3.

[0127] For example, an application with a location recognition function can be installed on electronic device 1, electronic device 2, and electronic device 3. The user can start the application on electronic device 1, electronic device 2, and electronic device 3 respectively. For example, the user can start the application by clicking on the application icon. After the application is started, electronic device 1 enters the state of Figure 7 The display interface 701 shown in FIG. (a) and the electronic device 2 enter the Figure 7 The display interface 702 shown in FIG. 1 (b) and the electronic device 3 enter the Figure 7 In the display interface 703 shown in Figure (c), the user can operate the display interface 701, display interface 702, and display interface 703 provided by electronic device 1, electronic device 2, and electronic device 3 to achieve the purpose of selecting an electronic device for determining the relative position relationship between electronic device 1, electronic device 2, and electronic device 3.

[0128] For example, when the user chooses to have electronic device 1 determine the relative positional relationship between any two of electronic devices 1, 2, and 3, the user can select Set Target Electronic Device option 7011 in display interface 701; when the user chooses to have electronic device 2 determine the relative positional relationship between any two of electronic devices 1, 2, and 3, the user can select Set Target Electronic Device option 7021 in display interface 702; and when the user chooses to have electronic device 3 determine the relative positional relationship between any two of electronic devices 1, 2, and 3, the user can select Set Target Electronic Device option 7031 in display interface 703. It is worth mentioning that the target electronic device is: among electronic devices 1, 2, and 3, the electronic device used to determine the relative positional relationship between any two of electronic devices 1, 2, and 3.

[0129] After selecting an electronic device for determining the relative position relationship between any two of electronic device 1 , electronic device 2 , and electronic device 3 , the user may trigger the start of a position recognition process.

[0130] Assume that the user selects electronic device 1 as the electronic device used to determine the relative position relationship between each of electronic devices 1, electronic device 2, and electronic device 3. For example, the user selects the set target electronic device option 7011 in the display interface 701 of electronic device 1. Electronic device 1 determines itself as the electronic device used to determine the relative position relationship between each of electronic devices 1, electronic device 2, and electronic device 3 based on the operation of detecting that the set target electronic device option 7011 in the display interface 701 is selected.

[0131] After electronic device 1 is used as the electronic device for determining the relative positional relationship between electronic devices 1, 2, and 3, the user can select position identification option 7012 on display interface 701 of electronic device 1, thereby triggering the start of the position identification process. Accordingly, electronic device 1 starts the position identification process based on the operation of detecting that position identification option 7012 has been selected.

[0132] After the location identification process begins, the electronic device 1 may perform the following steps:

[0133] In step 601, electronic device 1 sends first instruction information to electronic device 2 and electronic device 3 respectively, to instruct electronic device 2 and electronic device 3 to activate their respective recording functions.

[0134] Electronic device 1 can send first indication information to electronic device 2 and electronic device 3 respectively to instruct electronic device 2 and electronic device 3 to turn on their respective recording functions. For example, electronic device 1 sends first indication information to electronic device 2 and electronic device 3 respectively based on the short-range communication connection established between electronic device 1 and electronic device 2 and electronic device 3.

[0135] In step 602, electronic device 2 and electronic device 3 activate their respective recording functions according to the first instruction information they receive.

[0136] After electronic device 1 sends the first instruction information to electronic devices 2 and 3, in one implementation, electronic device 1 may directly execute step 604: electronic device 1 plays an ultrasonic signal. For a detailed description of the ultrasonic signal, please refer to the relevant description in method 400; for the sake of brevity, it will not be repeated here.

[0137] In another implementation, after electronic device 1 sends first indication information to electronic device 2 and electronic device 3, if electronic device 1 receives a confirmation message from electronic device 2 and electronic device 3, electronic device 1 executes step 604, wherein the confirmation message from electronic device 2 and electronic device 3 is the response of electronic device 2 and electronic device 3 to the first indication information respectively. In this case, method 600 may further include step 603 before step 604: after electronic device 2 and electronic device 3 turn on their own recording function, they send a confirmation message to electronic device 1 to inform electronic device 1 that the recording function of electronic device 2 and electronic device 3 has been turned on.

[0138] Because electronic devices 2 and 3 have their respective recording functions enabled, when electronic device 1 plays the ultrasonic signal, the ultrasonic signal is received by electronic devices 2 and 3. Electronic devices 2 and 3 can then execute step 605, where each electronic device 2 and 3 determines its relative position relative to electronic device 1 based on the received ultrasonic signal. For the specific method by which each electronic device 2 and 3 determines its relative position relative to electronic device 1 based on the received ultrasonic signal, please refer to the relevant description in method 400; for the sake of brevity, this description is not repeated here.

[0139] After electronic device 2 and electronic device 3 determine the relative position relationship between themselves and electronic device 1 , step 606 may be executed: electronic device 2 and electronic device 3 send the relative position relationship between themselves and electronic device 1 to electronic device 1 .

[0140] In step 607 , electronic device 1 determines that electronic device 2 is located on the left side of electronic device 1 and that electronic device 3 is located on the right side of electronic device 1 based on the relative positional relationships between electronic device 2 and electronic device 3 and electronic device 1 .

[0141] After determining that electronic device 2 is located on the left side of electronic device 1 and electronic device 3 is located on the right side of electronic device 1, electronic device 1 obtains the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3. In this case, in order to enable the cursor to switch freely between electronic devices 1, electronic device 2, and electronic device 3, electronic device 1 also needs to inform electronic devices 2 and electronic device 3 of the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3. In this case, method 600 also includes step 608: electronic device 1 sends the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3 to electronic device 2 and electronic device 3 respectively. For example, electronic device 1 sends to electronic device 2 and electronic device 3 respectively that electronic device 2 is located on the left side of electronic device 1 and electronic device 3 is located on the right side of electronic device 1.

[0142] After obtaining the relative positional relationship between each of electronic devices 1, 2, and 3, electronic devices 1, 2, and 3 can support free cursor switching between electronic devices 1, 2, and 3. For an example of free cursor switching between electronic devices 1, 2, and 3, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0143] Figure 8 Another application scenario of the method for identifying a location provided by an embodiment of the present application is shown. Figure 8 , three electronic devices are shown. For ease of description, these three electronic devices are respectively referred to as electronic device 1, electronic device 2, and electronic device 3. In one implementation, the relative positional relationship between any two of electronic devices 1, 2, and 3 can be determined by a mouse provided in an embodiment of the present application. In another implementation, the relative positional relationship between any two of electronic devices 1, 2, and 3 can be determined by one of electronic devices 1, 2, and 3.

[0144] The following combination Figure 8 In the scenario shown, taking the relative position relationship between electronic device 1, electronic device 2, and electronic device 3 as an example, a method for identifying a position provided by an embodiment of the present application is introduced. Figure 9 An exemplary interactive flow chart of the location identification method 900 is shown. It is worth mentioning that in the method 900, the mouse corresponds to the first electronic device, the electronic device 1 corresponds to the third electronic device, and the electronic devices 2 and 3 correspond to the two second electronic devices respectively.

[0145] In step 901, the mouse sends first instruction information to electronic device 2 and electronic device 3 respectively, instructing electronic device 2 and electronic device 3 to activate their respective recording functions. For the specific implementation of step 901, please refer to the relevant description in step 401, which will not be repeated here for the sake of brevity.

[0146] In step 902 , electronic device 2 and electronic device 3 activate their respective recording functions according to the first instruction information they receive.

[0147] In step 903 , after turning on their respective recording functions, electronic device 2 and electronic device 3 send a confirmation message to the mouse to indicate that the recording functions of electronic device 2 and electronic device 3 have been turned on.

[0148] Step 904: The mouse sends second instruction information to electronic device 1 to instruct electronic device 1 to play the ultrasonic signal. For example, the mouse sends the first instruction information to electronic device 1 based on the short-range communication connection established between the mouse and electronic device 1. For the specific implementation of steps 902 to 904, please refer to the relevant description of steps 402 to 404. For the sake of brevity, it is not repeated here.

[0149] After receiving the second instruction information, the electronic device 1 executes step 905 to play the ultrasonic signal. For the specific implementation of step 905, please refer to the relevant description in step 405, which will not be repeated here for the sake of brevity.

[0150] In step 906 , electronic device 2 and electronic device 3 each determine a relative position relationship between themselves and electronic device 1 based on the received ultrasonic signal.

[0151] Combine Figure 8 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 3 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 3 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 3. Based on this, electronic device 3 can determine that it is located to the right of electronic device 1. For the specific method for electronic devices 2 and 3 to determine their relative positional relationship with electronic device 1, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0152] After electronic device 2 and electronic device 3 determine the relative position relationship between themselves and electronic device 1, step 907 may be executed: electronic device 2 and electronic device 3 send the relative position relationship between themselves and electronic device 1 to the mouse.

[0153] In step 908 , the mouse determines that electronic device 2 and electronic device 3 are both located on the same side of electronic device 1 , for example, both located on the right side of electronic device 1 , based on the relative positional relationships between electronic device 2 and electronic device 3 and electronic device 1 .

[0154] Since electronic device 2 and electronic device 3 are both located on the right side of electronic device 1, in order to obtain the relative positional relationship between electronic device 1, electronic device 2, and electronic device 3, the mouse needs to further determine the relative positional relationship between electronic device 2 and electronic device 3. In this case, method 900 may further include the following steps:

[0155] Step 909 : The mouse sends first instruction information to the electronic device 2 , where the first instruction information instructs the electronic device 2 to start the recording function.

[0156] In step 910 , the electronic device 2 starts the recording function according to the first instruction information.

[0157] In one implementation, after sending the first indication information to the electronic device 2, the mouse can execute step 912: the mouse sends the second indication information to the electronic device 3 to instruct the electronic device 3 to play the ultrasonic signal. For example, the mouse sends the second indication information to the electronic device 3 based on the short-range communication connection established between the mouse and the electronic device 3.

[0158] In another implementation, after the mouse sends the first indication information to the electronic device 2, if the mouse receives a confirmation message from the electronic device 2, the mouse executes step 912. The confirmation message from the electronic device 2 is a response of the electronic device 2 to the first indication information. In this case, the method 900 may further include step 911 before step 912: after the electronic device 2 turns on its own recording function, the electronic device 2 sends a confirmation message to the mouse to inform the mouse that the recording function of the electronic device 2 has been turned on.

[0159] After receiving the second instruction information, the electronic device 3 executes step 913: playing the ultrasonic signal.

[0160] Since the recording function is turned on in electronic device 2, when electronic device 3 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2. Then electronic device 2 can execute step 914, and electronic device 2 determines the relative position relationship between electronic device 2 and electronic device 3 based on the received ultrasonic signal.

[0161] Combine Figure 8 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the left speaker of electronic device 3 arrives at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrive at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located on the left side of electronic device 3.

[0162] After the electronic device 2 determines the relative position relationship between itself and the electronic device 3 , step 915 may be executed: the electronic device 2 sends the relative position relationship between itself and the electronic device 3 to the mouse.

[0163] Step 916 : The mouse determines that electronic device 2 is located on the left side of electronic device 3 based on the relative position relationship between electronic device 2 and electronic device 3 and electronic device 1 , which are sent by electronic device 2 and electronic device 3 .

[0164] After determining that electronic device 2 is located on the left side of electronic device 3, combined with step 908, the mouse can determine that electronic device 2 is located on the right side of electronic device 1 and electronic device 2 is located on the left side of electronic device 3. In this case, in order to enable the cursor to switch freely between electronic device 1, electronic device 2, and electronic device 3, the mouse also needs to inform each device of the relative position relationship between each of electronic device 1, electronic device 2, and electronic device 3. In this case, method 900 also includes step 917: the mouse sends the relative position relationship between each of electronic device 1, electronic device 2, and electronic device 3 to electronic device 1, electronic device 2, and electronic device 3 respectively. For example, the mouse sends to electronic device 1, electronic device 2, and electronic device 3 respectively that electronic device 2 is located on the right side of electronic device 1 and electronic device 2 is located on the left side of electronic device 3.

[0165] After obtaining the relative positional relationship between each of electronic devices 1, 2, and 3, electronic devices 1, 2, and 3 can support free cursor switching between electronic devices 1, 2, and 3. For an example of free cursor switching between electronic devices 1, 2, and 3, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0166] It should be understood that the above only uses the example of electronic device 2 turning on the recording function and electronic device 3 playing the ultrasonic signal to illustrate the method of determining the relative position relationship between electronic device 2 and electronic device 3, but this does not constitute a limitation on the embodiments of the present application. For example, in a specific implementation, the mouse can instruct electronic device 3 to turn on the recording function and instruct electronic device 2 to play the ultrasonic signal.

[0167] Next, continue to combine Figure 8 In the illustrated scenario, taking the determination of the relative position relationship between electronic device 1, electronic device 2, and electronic device 3 by one of electronic device 1, electronic device 2, and electronic device 3 as an example, another example of a method for identifying a position provided by an embodiment of the present application is introduced. Figure 10An exemplary interactive flow chart of a method 1000 for identifying a location is shown. It is worth mentioning that in the method 1000, electronic device 1 corresponds to the third electronic device, and electronic devices 2 and 3 correspond to the two second electronic devices, respectively.

[0168] The electronic device used to determine the relative position relationship between each of electronic device 1, electronic device 2, and electronic device 3 can be selected by the user from electronic device 1, electronic device 2, and electronic device 3. In other words, any one of electronic device 1, electronic device 2, and electronic device 3 may be selected by the user as the electronic device used to determine the relative position relationship between each of electronic device 1, electronic device 2, and electronic device 3.

[0169] Assume that the user selects electronic device 1 as the electronic device for determining the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3. After selecting the electronic device for determining the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3, and after establishing a short-range communication connection between any one of electronic device 1, electronic device 2, and electronic device 3 and the other two devices, the user can trigger the start of the location identification process. For the specific implementation of the user selecting the electronic device for determining the relative position relationship between electronic devices 1, electronic device 2, and electronic device 3, the specific implementation of establishing a short-range communication connection between any one of electronic device 1, electronic device 2, and electronic device 3 and the other two devices, and the specific implementation of the user triggering the start of the location identification process, please refer to the relevant description in method 600. For the sake of brevity, it will not be repeated here.

[0170] After the location identification process begins, the electronic device 1 may perform the following steps:

[0171] In step 1001, electronic device 1 sends first instruction information to electronic device 2 and electronic device 3 respectively, instructing electronic device 2 and electronic device 3 to activate their respective recording functions. For the specific implementation of step 1001, please refer to the relevant description in step 601, which will not be repeated here for the sake of brevity.

[0172] In step 1002 , electronic device 2 and electronic device 3 activate their respective recording functions according to the first instruction information they receive.

[0173] In step 1003 , after turning on their own recording functions, electronic device 2 and electronic device 3 send a confirmation message to electronic device 1 to inform electronic device 1 that the recording functions of electronic device 2 and electronic device 3 have been turned on.

[0174] Step 1004: The electronic device 1 plays the ultrasonic signal. For the specific implementation of steps 1002 to 1004, please refer to the relevant descriptions in steps 602 to 604, which will not be repeated here for the sake of brevity.

[0175] Since electronic device 2 and electronic device 3 have their respective recording functions turned on, when electronic device 1 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2 and electronic device 3. Then electronic device 2 and electronic device 3 can execute step 1005, and electronic device 2 and electronic device 3 each determine the relative position relationship between themselves and electronic device 1 based on the received ultrasonic signal.

[0176] Combine Figure 8 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 3 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 3 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 3. Based on this, electronic device 3 can determine that it is located to the right of electronic device 1. For the specific method for electronic devices 2 and 3 to determine their relative positional relationship with electronic device 1, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0177] After electronic device 2 and electronic device 3 determine the relative position relationship between themselves and electronic device 1 , step 1006 may be executed: electronic device 2 and electronic device 3 send the relative position relationship between themselves and electronic device 1 to electronic device 1 .

[0178] In step 1007 , electronic device 1 determines that electronic device 2 and electronic device 3 are both located on the same side of electronic device 1 , for example, both located on the right side of electronic device 1 , based on the relative positional relationships between electronic device 2 and electronic device 3 and electronic device 1 .

[0179] Since electronic device 2 and electronic device 3 are both located on the right side of electronic device 1, in order to obtain the relative positional relationship between electronic device 1, electronic device 2, and electronic device 3, electronic device 1 needs to further determine the relative positional relationship between electronic device 2 and electronic device 3. In this case, method 1000 may further include the following steps:

[0180] In step 1008 , electronic device 1 sends first instruction information to electronic device 2 , where the first instruction information instructs electronic device 2 to enable a recording function.

[0181] Step 1009: The electronic device 2 starts the recording function according to the first instruction information.

[0182] In one implementation, after sending the first indication information to the electronic device 2, the electronic device 1 may execute step 1011: the electronic device 1 sends the second indication information to the electronic device 3 to instruct the electronic device 3 to play the ultrasonic signal. For example, the electronic device 1 sends the second indication information to the electronic device 3 based on the short-range communication connection established between the electronic device 1 and the electronic device 3.

[0183] In another implementation, after electronic device 1 sends the first indication information to electronic device 2, if electronic device 1 receives a confirmation message from electronic device 2, electronic device 1 executes step 1011. The confirmation message from electronic device 2 is a response made by electronic device 2 to the first indication information. In this case, method 1000 may further include step 1010 before step 1011: after electronic device 2 turns on its own recording function, it sends a confirmation message to electronic device 1 to inform electronic device 1 that the recording function of electronic device 2 has been turned on.

[0184] After receiving the second instruction information, the electronic device 3 executes step 1012: playing the ultrasonic signal.

[0185] Since the recording function is turned on in electronic device 2, when electronic device 3 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2. Then electronic device 2 can execute step 1013, and electronic device 2 determines the relative position relationship between electronic device 2 and electronic device 3 based on the received ultrasonic signal.

[0186] Combine Figure 8 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the left speaker of electronic device 3 arrives at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrive at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located on the left side of electronic device 3.

[0187] After electronic device 2 determines the relative position relationship between itself and electronic device 3 , it may execute step 1014 : electronic device 2 sends the relative position relationship between itself and electronic device 3 to electronic device 1 .

[0188] In step 1015 , electronic device 1 determines that electronic device 2 is located on the left side of electronic device 3 based on the relative position relationship between electronic device 2 and electronic device 3 sent by electronic device 2 .

[0189] After determining that electronic device 2 is located on the left side of electronic device 3, combined with step 1007, electronic device 1 can determine that electronic device 2 is located on the right side of electronic device 1 and electronic device 2 is located on the left side of electronic device 3. In this case, in order to enable the cursor to switch freely between electronic device 1, electronic device 2, and electronic device 3, electronic device 1 also needs to inform electronic device 2 and electronic device 3 of the relative position relationship between each of electronic device 1, electronic device 2, and electronic device 3. In this case, method 1000 also includes step 1016: electronic device 1 sends the relative position relationship between each of electronic device 1, electronic device 2, and electronic device 3 to electronic device 2 and electronic device 3 respectively. For example, electronic device 1 sends to electronic device 2 and electronic device 3 respectively that electronic device 2 is located on the right side of electronic device 1 and electronic device 2 is located on the left side of electronic device 3.

[0190] After obtaining the relative positional relationship between each of electronic devices 1, 2, and 3, electronic devices 1, 2, and 3 can support free cursor switching between electronic devices 1, 2, and 3. For an example of free cursor switching between electronic devices 1, 2, and 3, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0191] Figure 11 Another application scenario of the method for identifying a location provided in an embodiment of the present application is shown. Figure 11 Four electronic devices are shown in the figure. For ease of description, these four electronic devices are respectively referred to as electronic device 1, electronic device 2, electronic device 3, and electronic device 4. In one implementation, the relative positional relationship between any two of electronic devices 1, 2, 3, and 4 can be determined by a mouse provided in an embodiment of the present application. In another implementation, the relative positional relationship between any two of electronic devices 1, 2, 3, and 4 can be determined by one of electronic devices 1, 2, 3, and 4.

[0192] The following combination Figure 11 In the illustrated scenario, taking the relative position relationship between electronic device 1, electronic device 2, electronic device 3, and electronic device 4 as an example, another example of a method for identifying a position provided by an embodiment of the present application is introduced. Figure 12 An exemplary interactive flow chart of a method 1200 for identifying a location is shown. It is worth noting that in method 1200 , the mouse corresponds to the first electronic device, electronic device 1 corresponds to the third electronic device, and electronic devices 2, 3, and 4 correspond to the three second electronic devices, respectively.

[0193] In step 1201 , the mouse sends first instruction information to electronic device 2 , electronic device 3 , and electronic device 4 respectively, to instruct electronic device 2 , electronic device 3 , and electronic device 4 to respectively activate their respective recording functions.

[0194] Before determining the relative position relationship between electronic devices 1, electronic device 2, electronic device 3, and electronic device 4, the mouse needs to establish a short-range communication connection with electronic device 1, electronic device 2, electronic device 3, and electronic device 4 respectively, for example, establish a Bluetooth connection, so as to facilitate communication with electronic devices 1, electronic device 2, electronic device 3, and electronic device 4 in the process of determining the relative position relationship between electronic devices 1, electronic device 2, electronic device 3, and electronic device 4.

[0195] After the mouse establishes short-range communication connections with electronic devices 1, 2, 3, and 4, the mouse can be triggered to execute the position recognition process. For the specific method of triggering the mouse to execute the recognition process, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0196] After the position recognition process starts, the mouse can send first indication information to electronic device 2, electronic device 3, and electronic device 4 respectively based on the short-range communication connection established between the mouse and electronic device 2, electronic device 3, and electronic device 4 to instruct electronic device 2, electronic device 3, and electronic device 4 to turn on their respective recording functions.

[0197] In step 1202 , electronic device 2 , electronic device 3 , and electronic device 4 activate their respective recording functions according to the first instruction information they receive.

[0198] After the mouse sends the first indication information to electronic device 2, electronic device 3, and electronic device 4, in one implementation, the mouse can directly execute step 1204 after sending the first indication information to electronic device 2, electronic device 3, and electronic device 4: the mouse sends the second indication information to electronic device 1 to instruct electronic device 1 to play an ultrasonic signal, for example: the second indication information is sent to electronic device 1 based on the short-range communication connection established between the mouse and electronic device 1.

[0199] In another implementation, after the mouse sends the first indication information to electronic devices 2, 3, and 4, if the mouse receives a confirmation message from electronic devices 2, 3, and 4, the mouse executes step 1204. The confirmation messages from electronic devices 2, 3, and 4 are responses from electronic devices 2, 3, and 4 to the first indication information, respectively. In this case, method 1200 may further include step 1203 before step 1204: after electronic devices 2, 3, and 4 have activated their own recording functions, they send a confirmation message to the mouse to inform the mouse that the recording functions of electronic devices 2, 3, and 4 have been activated.

[0200] After receiving the second instruction information, the electronic device 1 executes step 1205: playing the ultrasonic signal.

[0201] Since electronic devices 2, 3, and 4 have their respective recording functions turned on, when electronic device 1 plays the ultrasonic signal, the ultrasonic signal will be received by electronic devices 2, 3, and 4. Then, electronic devices 2, 3, and 4 can execute step 1206, and electronic devices 2, 3, and 4 each determine their relative position relationship with electronic device 1 based on the received ultrasonic signal.

[0202] Combine Figure 11 As can be seen from the illustrated scenario, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 3 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 3 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 3. Based on this, electronic device 3 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 4 can determine that the ultrasonic signal output by the left speaker of electronic device 1 arrived at the recording module of electronic device 4 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 4. Based on this, electronic device 4 can determine that it is located to the left of electronic device 1. For the specific methods for electronic devices 2, 3, and 4 to determine their relative positional relationships with electronic device 1, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0203] After electronic device 2 , electronic device 3 , and electronic device 4 determine their relative positional relationships with electronic device 1 , they may execute step 1207 : electronic device 2 , electronic device 3 , and electronic device 4 send their relative positional relationships with electronic device 1 to the mouse.

[0204] In step 1208 , the mouse determines that electronic devices 2 and 3 are both located on the right side of electronic device 1 and electronic device 4 is located on the left side of electronic device 1 based on the relative positional relationships between electronic devices 2 , 3 , and 4 and electronic device 1 .

[0205] Since electronic device 2 and electronic device 3 are both located on the right side of electronic device 1, in order to obtain the relative positional relationship between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, the mouse needs to further determine the relative positional relationship between electronic device 2 and electronic device 3. In this case, method 1200 may further include the following steps:

[0206] Step 1209 : The mouse sends first instruction information to the electronic device 2 , where the first instruction information instructs the electronic device 2 to start the recording function.

[0207] In step 1210 , the electronic device 2 starts the recording function according to the first instruction information.

[0208] In one implementation, after sending the first indication information to the electronic device 2, the mouse can execute step 1212: the mouse sends the second indication information to the electronic device 3 to instruct the electronic device 3 to play the ultrasonic signal. For example, the mouse sends the second indication information to the electronic device 3 based on the short-range communication connection established between the mouse and the electronic device 3.

[0209] In another implementation, after the mouse sends the first indication information to the electronic device 2, if the mouse receives a confirmation message from the electronic device 2, the mouse executes step 1212. The confirmation message from the electronic device 2 is a response of the electronic device 2 to the first indication information. In this case, the method 1200 may further include step 1211 before step 1212: after the electronic device 2 turns on its own recording function, the electronic device 2 sends a confirmation message to the mouse to inform the mouse that the recording function of the electronic device 2 is turned on.

[0210] After receiving the second instruction information, the electronic device 3 executes step 1213: playing the ultrasonic signal.

[0211] Since the recording function is turned on in electronic device 2, when electronic device 3 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2. Then electronic device 2 can execute step 1214, and electronic device 2 determines the relative position relationship between electronic device 2 and electronic device 3 based on the received ultrasonic signal.

[0212] Combine Figure 11 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the left speaker of electronic device 3 arrives at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrive at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located on the left side of electronic device 3.

[0213] After the electronic device 2 determines the relative position relationship between itself and the electronic device 3 , step 1215 may be executed: the electronic device 2 sends the relative position relationship between itself and the electronic device 3 to the mouse.

[0214] Step 1216 : The mouse determines that electronic device 2 is located on the left side of electronic device 3 based on the relative position relationship between electronic device 2 and electronic device 3 sent by electronic device 2 .

[0215] After determining that electronic device 2 is located on the left side of electronic device 3, combined with step 1208, the mouse can determine that electronic device 4 is located on the left side of electronic device 1, electronic device 2 is located on the right side of electronic device 1, and electronic device 2 is located on the left side of electronic device 3. In this case, in order to enable the cursor to switch freely between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, the mouse also needs to inform each device of the relative position relationship between electronic device 1, electronic device 2, electronic device 3 and electronic device 4. In this case, method 1200 also includes step 1217: the mouse sends the relative position relationship between electronic device 1, electronic device 2, electronic device 3 and electronic device 4 to electronic device 1, electronic device 2, electronic device 3, and electronic device 4 respectively. For example, the mouse sends to electronic device 1, electronic device 2, electronic device 3 and electronic device 4 respectively that electronic device 4 is located on the left side of electronic device 1, electronic device 2 is located on the right side of electronic device 1, and electronic device 2 is located on the left side of electronic device 3.

[0216] After obtaining the relative positional relationships between each of electronic devices 1, 2, 3, and 4, electronic devices 1, 2, 3, and 4 can support free cursor switching between electronic devices 1, 2, 3, and 4. For an example of free cursor switching between electronic devices 1, 2, 3, and 4, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0217] Next, continue to combine Figure 11 In the illustrated scenario, taking the determination of the relative position relationship between electronic devices 1, 2, 3, and 4 by one of electronic devices 1, 2, 3, and 4 as an example, another example of a method for identifying a position provided in an embodiment of the present application is introduced. Figure 13 An exemplary interactive flow chart of a method 1300 for identifying a location is shown. It is worth noting that in method 1300, electronic device 1 corresponds to the third electronic device, and electronic devices 2, 3, and 4 correspond one-to-one to the three second electronic devices, respectively.

[0218] The electronic device used to determine the relative position relationship between each of electronic device 1, electronic device 2, electronic device 3 and electronic device 4 can be selected by the user from electronic device 1, electronic device 2, electronic device 3 and electronic device 4. In other words, any one of electronic device 1, electronic device 2, electronic device 3 and electronic device 4 may be selected by the user as the electronic device used to determine the relative position relationship between each of electronic device 1, electronic device 2, electronic device 3 and electronic device 4.

[0219] Assume that the user selects electronic device 1 as the electronic device for determining the relative position relationship between any two of electronic devices 1, electronic device 2, electronic device 3, and electronic device 4. After selecting the electronic device for determining the relative position relationship between any two of electronic devices 1, electronic device 2, electronic device 3, and electronic device 4, and after establishing a short-range communication connection between any one of electronic device 1, electronic device 2, electronic device 3, and electronic device 4 and the other two devices, the user can trigger the start of the location identification process. For the specific implementation of the user selecting the electronic device for determining the relative position relationship between any two of electronic devices 1, electronic device 2, electronic device 3, and electronic device 4, the specific implementation of establishing a short-range communication connection between any one of electronic device 1, electronic device 2, electronic device 3, and electronic device 4 and the other two devices, and the specific implementation of the user triggering the start of the location identification process, please refer to the relevant description in method 600. For the sake of brevity, it will not be repeated here.

[0220] After the location identification process begins, the electronic device 1 may perform the following steps:

[0221] In step 1301, electronic device 1 sends first instruction information to electronic device 2, electronic device 3, and electronic device 4 respectively, to instruct electronic device 2, electronic device 3, and electronic device 4 to activate their respective recording functions.

[0222] Electronic device 1 can send first indication information to electronic device 2, electronic device 3, and electronic device 4 respectively based on the short-range communication connection established between electronic device 2, electronic device 3, and electronic device 4 to instruct electronic device 2, electronic device 3, and electronic device 4 to respectively turn on their respective recording functions.

[0223] In step 1302 , electronic device 2 , electronic device 3 , and electronic device 4 activate their respective recording functions according to the first instruction information they receive.

[0224] After electronic device 1 sends the first instruction information to electronic devices 2, 3, and 4, in one implementation, electronic device 1 may directly execute step 1304 after sending the first instruction information: electronic device 1 plays an ultrasonic signal. For a detailed description of the ultrasonic signal, please refer to the relevant description in method 400; for the sake of brevity, it is not repeated here.

[0225] In another implementation, after electronic device 1 sends the first indication information to electronic devices 2, 3, and 4, if electronic device 1 receives confirmation messages from electronic devices 2, 3, and 4, electronic device 1 executes step 1304. The confirmation messages from electronic devices 2, 3, and 4 are responses made by electronic devices 2, 3, and 4, respectively, to the first indication information. In this case, method 1300 may further include, before step 1304, step 1303: after electronic devices 2, 3, and 4 have activated their own recording functions, they send confirmation messages to electronic device 1 to inform electronic device 1 that the recording functions of electronic devices 2, 3, and 4 have been activated.

[0226] Since electronic devices 2, 3, and 4 have their respective recording functions turned on, when electronic device 1 plays the ultrasonic signal, the ultrasonic signal will be received by electronic devices 2, 3, and 4. Then, electronic devices 2, 3, and 4 can execute step 1305, and electronic devices 2, 3, and 4 each determine their relative position relationship with electronic device 1 based on the received ultrasonic signal.

[0227] Combine Figure 11As can be seen from the illustrated scenario, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 3 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 3 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 3. Based on this, electronic device 3 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 4 can determine that the ultrasonic signal output by the left speaker of electronic device 1 arrived at the recording module of electronic device 4 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 4. Based on this, electronic device 4 can determine that it is located to the left of electronic device 1. For the specific methods for electronic devices 2, 3, and 4 to determine their relative positional relationships with electronic device 1, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0228] After electronic device 2 , electronic device 3 , and electronic device 4 determine their relative positional relationships with electronic device 1 , they may execute step 1306 : electronic device 2 , electronic device 3 , and electronic device 4 send their relative positional relationships with electronic device 1 to electronic device 1 .

[0229] In step 1307, electronic device 1 determines that electronic device 2 is on the right side of electronic device 1, electronic device 3 is on the right side of electronic device 1, and electronic device 4 is on the left side of electronic device 1 based on the relative position relationships between electronic device 2, electronic device 3, and electronic device 4 and electronic device 1.

[0230] Since electronic device 2 and electronic device 3 are both located on the right side of electronic device 1, in order to obtain the relative positional relationship between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, electronic device 1 needs to further determine the relative positional relationship between electronic device 2 and electronic device 3. In this case, method 1300 may further include the following steps:

[0231] In step 1308 , electronic device 1 sends first instruction information to electronic device 2 , where the first instruction information instructs electronic device 2 to enable a recording function.

[0232] Step 1309: Electronic device 2 starts the recording function according to the first instruction information.

[0233] After electronic device 1 sends the first indication information to electronic device 2, in one implementation, electronic device 1 can directly execute step 1311 after sending the first indication information to electronic device 2: electronic device 1 sends the second indication information to electronic device 3 to instruct electronic device 3 to play an ultrasonic signal. For example, electronic device 1 sends the second indication information to electronic device 3 based on the short-range communication connection established between electronic device 1 and electronic device 3.

[0234] In another implementation, after electronic device 1 sends the first indication information to electronic device 2, if electronic device 1 receives a confirmation message from electronic device 2, electronic device 1 executes step 1311. The confirmation message from electronic device 2 is a response made by electronic device 2 to the first indication information. In this case, method 1300 may further include step 1310 before step 1311: after electronic device 2 turns on its own recording function, it sends a confirmation message to electronic device 1 to inform electronic device 1 that the recording function of electronic device 2 has been turned on.

[0235] After receiving the second instruction information, the electronic device 3 executes step 1312: playing the ultrasonic signal.

[0236] Since the recording function is turned on in electronic device 2, when electronic device 3 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2. Then electronic device 2 can execute step 1313, and electronic device 2 determines the relative position relationship between electronic device 2 and electronic device 3 based on the received ultrasonic signal.

[0237] Combine Figure 11 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the left speaker of electronic device 3 arrives at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrive at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located on the left side of electronic device 3.

[0238] After electronic device 2 determines the relative position relationship between itself and electronic device 3 , it may execute step 1314 : electronic device 2 sends the relative position relationship between itself and electronic device 3 to electronic device 1 .

[0239] In step 1315 , electronic device 1 determines that electronic device 2 is located on the left side of electronic device 3 based on the relative position relationship between electronic device 2 and electronic device 3 sent by electronic device 2 .

[0240] After determining that electronic device 2 is located on the left side of electronic device 3, combined with step 1307, electronic device 1 can determine that electronic device 4 is located on the left side of electronic device 1, electronic device 2 is located on the right side of electronic device 1, and is located on the left side of electronic device 3. In this case, in order to enable the cursor to switch freely between electronic devices 1, electronic device 2, electronic device 3, and electronic device 4, electronic device 1 also needs to inform electronic devices 2, electronic device 3, and electronic device 4 of the relative position relationship between each of electronic devices 1, electronic device 2, electronic device 3, and electronic device 4. In this case, method 1300 also includes step 1316: electronic device 1 sends the relative position relationship between each of electronic devices 1, electronic device 2, electronic device 3, and electronic device 4 to electronic device 2, electronic device 3, and electronic device 4. For example, electronic device 1 sends to electronic devices 2, electronic device 3, and electronic device 4 respectively that electronic device 4 is located on the left side of electronic device 1, electronic device 2 is located on the right side of electronic device 1, and electronic device 2 is located on the left side of electronic device 3.

[0241] After obtaining the relative positional relationships between any two of electronic devices 1, 2, 3, and 4, electronic devices 1, 2, 3, and 4 can support free cursor switching between electronic devices 1, 2, 3, and 4. For an example of free cursor switching between electronic devices 1, 2, 3, and 4, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0242] Figure 14 Another application scenario of the method for identifying a location provided in an embodiment of the present application is shown. Figure 14 Four electronic devices are shown in the figure. For ease of description, these four electronic devices are respectively referred to as electronic device 1, electronic device 2, electronic device 3, and electronic device 4. In one implementation, the relative positional relationship between any two of electronic devices 1, 2, 3, and 4 can be determined by a mouse provided in an embodiment of the present application. In another implementation, the relative positional relationship between any two of electronic devices 1, 2, 3, and 4 can be determined by one of electronic devices 1, 2, 3, and 4.

[0243] The following combination Figure 14 In the illustrated scenario, taking the relative position relationship between electronic device 1, electronic device 2, electronic device 3, and electronic device 4 as an example, another example of a method for identifying a position provided by an embodiment of the present application is introduced. Figure 15An exemplary interactive flow chart of a method 1500 for identifying a location is shown. It is worth noting that in method 1500, the mouse corresponds to the first electronic device, electronic device 1 corresponds to the third electronic device, and electronic devices 2, 3, and 4 correspond to the three second electronic devices, respectively.

[0244] In step 1501 , the mouse sends first instruction information to electronic device 2 , electronic device 3 , and electronic device 4 respectively, to instruct electronic device 2 , electronic device 3 , and electronic device 4 to respectively activate their respective recording functions.

[0245] In step 1502 , electronic device 2 , electronic device 3 , and electronic device 4 activate their respective recording functions according to the first instruction information they receive.

[0246] In step 1503 , after turning on their own recording functions, electronic device 2 , electronic device 3 , and electronic device 4 send a confirmation message to the mouse to inform the mouse that the recording functions of electronic device 2 , electronic device 3 , and electronic device 4 have been turned on.

[0247] Step 1504 : The mouse sends second instruction information to the electronic device 1 to instruct the electronic device 1 to play the ultrasonic signal. For example, the mouse sends the second instruction information to the electronic device 1 based on the short-range communication connection established with the electronic device 1 .

[0248] In step 1505, the electronic device 1 plays the ultrasonic signal. For detailed descriptions of steps 1501 to 1505, please refer to the relevant descriptions of steps 1201 to 1205 in method 1200. For the sake of brevity, they will not be repeated here.

[0249] Since electronic devices 2, 3, and 4 have their respective recording functions turned on, when electronic device 1 plays the ultrasonic signal, the ultrasonic signal will be received by electronic devices 2, 3, and 4. Then, electronic devices 2, 3, and 4 can execute step 1506, and electronic devices 2, 3, and 4 each determine their relative position relationship with electronic device 1 based on the received ultrasonic signal.

[0250] Combine Figure 14As can be seen from the illustrated scenario, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 3 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 3 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 3. Based on this, electronic device 3 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 4 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 4 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 4. Based on this, electronic device 4 can determine that it is located to the right of electronic device 1. For the specific methods for electronic devices 2, 3, and 4 to determine their relative positional relationships with electronic device 1, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0251] After electronic device 2, electronic device 3, and electronic device 4 determine the relative position relationship between themselves and electronic device 1, step 1507 can be executed, where electronic device 2, electronic device 3, and electronic device 4 send the relative position relationship between themselves and electronic device 1 to the mouse.

[0252] In step 1508 , the mouse determines that electronic devices 2 , 3 , and 4 are all located to the right of electronic device 1 based on the relative positional relationships between electronic devices 2 , 3 , and 4 and electronic device 1 .

[0253] Since electronic device 2, electronic device 3, and electronic device 4 are all located on the right side of electronic device 1, in order to obtain the relative positional relationship between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, the mouse needs to further determine the relative positional relationship between electronic device 2, electronic device 3, and electronic device 4. In this case, method 1500 may further include the following steps:

[0254] In step 1509 , the mouse sends first instruction information to electronic device 2 and electronic device 3 respectively, to instruct electronic device 2 and electronic device 3 to activate their respective recording functions.

[0255] In step 1510 , electronic device 2 and electronic device 3 activate their respective recording functions according to the first instruction information they receive.

[0256] After the mouse sends the first indication information to electronic device 2 and electronic device 3, in one implementation, the mouse can directly execute step 1512 after sending the first indication information to electronic device 2 and electronic device 3: the mouse sends the second indication information to electronic device 4 to instruct electronic device 4 to play an ultrasonic signal. For example, the mouse sends the second indication information to electronic device 4 based on the short-range communication connection established between the mouse and electronic device 4.

[0257] In another implementation, after the mouse sends the first indication information to electronic device 2 and electronic device 3, if the mouse receives a confirmation message from electronic device 2 and electronic device 3, for example, an Ack message, the mouse executes step 1512, wherein the confirmation message from electronic device 2 and electronic device 3 is the response of electronic device 2 and electronic device 3 to the first indication information respectively. In this case, method 1500 may further include step 1511 before step 1512: after electronic device 2 and electronic device 3 turn on their own recording functions, they send a confirmation message to the mouse to inform the mouse that the recording functions of electronic device 2 and electronic device 3 have been turned on.

[0258] After receiving the second instruction information, the electronic device 4 executes step 1513: playing the ultrasonic signal.

[0259] Since electronic device 2 and electronic device 3 have their respective recording functions turned on, when electronic device 4 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2 and electronic device 3. Then electronic device 2 and electronic device 3 can execute step 1514, and electronic device 2 and electronic device 3 each determine the relative position relationship between themselves and electronic device 4 based on the received ultrasonic signal.

[0260] Combine Figure 14 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the left speaker of electronic device 4 arrived at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located to the left of electronic device 4. Correspondingly, after receiving two ultrasonic signals, electronic device 3 can determine that the ultrasonic signal output by the left speaker of electronic device 4 arrived at the recording module of electronic device 3 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 3. Based on this, electronic device 3 can determine that it is located to the left of electronic device 4. For the specific method for electronic devices 2 and 3 to determine the relative positional relationship between each electronic device 2 and electronic device 3 and electronic device 4, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0261] After electronic device 2 and electronic device 3 determine the relative position relationship between themselves and electronic device 4, step 1515 may be executed: electronic device 2 and electronic device 3 send the relative position relationship between themselves and electronic device 4 to the mouse.

[0262] In step 1516 , the mouse determines that both electronic device 2 and electronic device 3 are located on the left side of electronic device 4 based on the relative positional relationships between electronic device 2 and electronic device 3 and electronic device 4 .

[0263] Since electronic device 2 and electronic device 3 are both located on the right side of electronic device 4, in order to obtain the relative positional relationship between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, the mouse needs to further determine the relative positional relationship between electronic device 2 and electronic device 3. In this case, method 1500 may further include the following steps:

[0264] Step 1517: The mouse sends first instruction information to the electronic device 2, where the first instruction information instructs the electronic device 2 to start the recording function.

[0265] Step 1518: Electronic device 2 turns on the recording function according to the first instruction information.

[0266] In one implementation, after sending the first indication information to the electronic device 2, the mouse can execute step 1520: the mouse sends the second indication information to the electronic device 3 to instruct the electronic device 3 to play the ultrasonic signal. For example, the mouse sends the second indication information to the electronic device 3 based on the short-range communication connection established between the mouse and the electronic device 3.

[0267] In another implementation, after the mouse sends the first indication information to the electronic device 2, if the mouse receives a confirmation message from the electronic device 2, the mouse executes step 1520. The confirmation message from the electronic device 2 is a response of the electronic device 2 to the first indication information. In this case, the method 1500 may further include step 1519 before step 1520: after the electronic device 2 turns on its own recording function, the electronic device 2 sends a confirmation message to the mouse to inform the mouse that the recording function of the electronic device 2 is turned on.

[0268] After receiving the second instruction information, the electronic device 3 executes step 1521: playing the ultrasonic signal.

[0269] Since the recording function is turned on in electronic device 2, when electronic device 3 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2. Then electronic device 2 can execute step 1522, and electronic device 2 determines the relative position relationship between electronic device 2 and electronic device 3 based on the received ultrasonic signal.

[0270] Combine Figure 14 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the left speaker of electronic device 3 arrives at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrive at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located on the left side of electronic device 3.

[0271] After the electronic device 2 determines the relative position relationship between itself and the electronic device 3 , step 1523 may be executed: the electronic device 2 sends the relative position relationship between itself and the electronic device 3 to the mouse.

[0272] In step 1524 , the mouse determines that electronic device 2 is located on the left side of electronic device 3 based on the relative position relationship between electronic device 2 and electronic device 3 sent by electronic device 2 .

[0273] After determining that electronic device 2 is located on the left side of electronic device 3, combined with steps 1508, 1516 and 1524, the mouse can determine that electronic device 2 is located on the right side of electronic device 1, electronic device 3 is located on the right side of electronic device 2, and electronic device 4 is located on the right side of electronic device 3. In this case, in order to enable the cursor to switch freely between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, the mouse also needs to inform each device of the relative position relationship between electronic device 1, electronic device 2, electronic device 3 and electronic device 4. In this case, method 1500 also includes step 1525: the mouse sends the relative position relationship between electronic device 1, electronic device 2, electronic device 3 and electronic device 4 to electronic device 1, electronic device 2, electronic device 3 and electronic device 4 respectively. For example, the mouse sends to electronic device 1, electronic device 2, electronic device 3 and electronic device 4 respectively that electronic device 2 is located on the right side of electronic device 1, electronic device 3 is located on the right side of electronic device 2, and electronic device 4 is located on the right side of electronic device 3.

[0274] After obtaining the relative positional relationships between each of electronic devices 1, 2, 3, and 4, electronic devices 1, 2, 3, and 4 can support free cursor switching between electronic devices 1, 2, 3, and 4. For an example of free cursor switching between electronic devices 1, 2, 3, and 4, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0275] Next, continue to combine Figure 14In the illustrated scenario, taking the determination of the relative position relationship between electronic devices 1, 2, 3, and 4 by one of electronic devices 1, 2, 3, and 4 as an example, another example of a method for identifying a position provided in an embodiment of the present application is introduced. Figure 16 An exemplary interactive flow chart of a method 1600 for identifying a location is shown. It is worth mentioning that in method 1600, electronic device 1 corresponds to the third electronic device, and electronic devices 2, 3, and 4 correspond to the three second electronic devices, respectively.

[0276] The electronic device used to determine the relative position relationship between each of electronic device 1, electronic device 2, electronic device 3 and electronic device 4 can be selected by the user from electronic device 1, electronic device 2, electronic device 3 and electronic device 4. In other words, any one of electronic device 1, electronic device 2, electronic device 3 and electronic device 4 may be selected by the user as the electronic device used to determine the relative position relationship between each of electronic device 1, electronic device 2, electronic device 3 and electronic device 4.

[0277] Assume that the user selects electronic device 1 as the electronic device for determining the relative position relationship between any two of electronic devices 1, electronic device 2, electronic device 3, and electronic device 4. After selecting the electronic device for determining the relative position relationship between any two of electronic devices 1, electronic device 2, electronic device 3, and electronic device 4, and after establishing a short-range communication connection between any one of electronic device 1, electronic device 2, electronic device 3, and electronic device 4 and the other two devices, the user can trigger the start of the location identification process. For the specific implementation of the user selecting the electronic device for determining the relative position relationship between any two of electronic devices 1, electronic device 2, electronic device 3, and electronic device 4, the specific implementation of establishing a short-range communication connection between any one of electronic device 1, electronic device 2, electronic device 3, and electronic device 4 and the other two devices, and the specific implementation of the user triggering the start of the location identification process, please refer to the relevant description in method 600. For the sake of brevity, it will not be repeated here.

[0278] After the location identification process begins, the electronic device 1 may perform the following steps:

[0279] In step 1601, electronic device 1 sends first instruction information to electronic device 2, electronic device 3, and electronic device 4 respectively, to instruct electronic device 2, electronic device 3, and electronic device 4 to respectively enable their respective recording functions.

[0280] In step 1602 , electronic device 2 , electronic device 3 , and electronic device 4 activate their respective recording functions according to the first instruction information they receive.

[0281] In step 1603 , after turning on their own recording functions, electronic device 2 , electronic device 3 , and electronic device 4 send a confirmation message to electronic device 1 to inform electronic device 1 that the recording functions of electronic device 2 , electronic device 3 , and electronic device 4 have been turned on.

[0282] In step 1604, the electronic device 1 plays the ultrasonic signal. For detailed descriptions of steps 1601 to 1604, please refer to the relevant descriptions of steps 1301 to 1304 in method 1300. For the sake of brevity, they will not be repeated here.

[0283] Since electronic devices 2, 3, and 4 have their respective recording functions turned on, when electronic device 1 plays the ultrasonic signal, the ultrasonic signal will be received by electronic devices 2, 3, and 4. Then, electronic devices 2, 3, and 4 can execute step 1605, and electronic devices 2, 3, and 4 each determine their relative position relationship with electronic device 1 based on the received ultrasonic signal.

[0284] Combine Figure 14 As can be seen from the illustrated scenario, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 3 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 3 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 3. Based on this, electronic device 3 can determine that it is located to the right of electronic device 1. Correspondingly, after receiving two ultrasonic signals, electronic device 4 can determine that the ultrasonic signal output by the right speaker of electronic device 1 arrived at the recording module of electronic device 4 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 4. Based on this, electronic device 4 can determine that it is located to the right of electronic device 1. For the specific methods for electronic devices 2, 3, and 4 to determine their relative positional relationships with electronic device 1, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0285] After electronic device 2 , electronic device 3 , and electronic device 4 determine the relative position relationship between themselves and electronic device 1 , they may execute step 1606 : electronic device 2 , electronic device 3 , and electronic device 4 send the relative position relationship between themselves and electronic device 1 to electronic device 1 .

[0286] In step 1607 , electronic device 1 determines that electronic device 2 , electronic device 3 , and electronic device 4 are all located on the right side of electronic device 1 based on the relative position relationships between electronic device 2 , electronic device 3 , and electronic device 4 and electronic device 1 .

[0287] Since electronic device 2, electronic device 3, and electronic device 4 are all located on the right side of electronic device 1, in order to obtain the relative positional relationship between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, electronic device 1 needs to further determine the relative positional relationship between electronic device 2, electronic device 3, and electronic device 4. In this case, method 1600 may further include the following steps:

[0288] In step 1608, electronic device 1 sends first instruction information to electronic device 2 and electronic device 3 respectively, to instruct electronic device 2 and electronic device 3 to activate their respective recording functions.

[0289] In step 1609 , electronic device 2 and electronic device 3 activate their respective recording functions according to the first instruction information they receive.

[0290] After electronic device 1 sends the first indication information to electronic device 2 and electronic device 3, in one implementation, electronic device 1 can directly execute step 1611 after sending the first indication information to electronic device 2 and electronic device 3: electronic device 1 sends the second indication information to electronic device 4 to instruct electronic device 4 to play an ultrasonic signal. For example, electronic device 1 sends the second indication information to electronic device 4 based on the short-range communication connection established between electronic device 1 and electronic device 4.

[0291] In another implementation, after electronic device 1 sends the first indication information to electronic device 2 and electronic device 3, if electronic device 1 receives a confirmation message from electronic device 2 and electronic device 3, for example, an Ack message, electronic device 1 executes step 1611, wherein the confirmation message from electronic device 2 and electronic device 3 is the response of electronic device 2 and electronic device 3 to the first indication information respectively. In this case, method 1600 may further include step 1610 before step 1611: after electronic device 2 and electronic device 3 turn on their own recording function, they send a confirmation message to electronic device 1 to inform electronic device 1 that the recording function of electronic device 2 and electronic device 3 has been turned on.

[0292] After receiving the second instruction information, the electronic device 4 executes step 1612: playing the ultrasonic signal.

[0293] Since electronic device 2 and electronic device 3 have turned on their respective recording functions, when electronic device 4 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2 and electronic device 3. After that, electronic device 2 and electronic device 3 can execute step 1613, and electronic device 2 and electronic device 3 each determine the relative position relationship between themselves and electronic device 4 based on the received ultrasonic signal.

[0294] Combine Figure 14 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the left speaker of electronic device 4 arrived at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located to the left of electronic device 4. Correspondingly, after receiving two ultrasonic signals, electronic device 3 can determine that the ultrasonic signal output by the left speaker of electronic device 4 arrived at the recording module of electronic device 3 earlier based on the difference between the times when the two ultrasonic signals arrived at the recording module of electronic device 3. Based on this, electronic device 3 can determine that it is located to the left of electronic device 4. For the specific method for electronic devices 2 and 3 to determine the relative positional relationship between each electronic device 2 and electronic device 3 and electronic device 4, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0295] After electronic device 2 and electronic device 3 determine the relative position relationship between themselves and electronic device 4 , step 1614 may be executed: electronic device 2 and electronic device 3 send the relative position relationship between themselves and electronic device 4 to electronic device 1 .

[0296] In step 1615 , electronic device 1 determines that electronic device 2 and electronic device 3 are both located on the left side of electronic device 4 based on the relative positional relationships between electronic device 2 and electronic device 3 and electronic device 4 , as sent by electronic device 2 and electronic device 3 .

[0297] Since electronic device 2 and electronic device 3 are both located on the right side of electronic device 4, in order to obtain the relative positional relationship between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, electronic device 1 needs to further determine the relative positional relationship between electronic device 2 and electronic device 3. In this case, method 1600 may further include the following steps:

[0298] Step 1616: Electronic device 1 sends first instruction information to electronic device 2, where the first instruction information instructs electronic device 2 to enable the recording function.

[0299] Step 1617: Electronic device 2 starts the recording function according to the first instruction information.

[0300] In one implementation, after sending the first indication information to the electronic device 2, the electronic device 1 may execute step 1619: the electronic device 1 sends the second indication information to the electronic device 3 to instruct the electronic device 3 to play the ultrasonic signal. For example, the electronic device 1 sends the second indication information to the electronic device 3 based on the short-range communication connection established between the electronic device 1 and the electronic device 3.

[0301] In another implementation, after electronic device 1 sends the first indication information to electronic device 2, if electronic device 1 receives a confirmation message from electronic device 2, electronic device 1 executes step 1619. The confirmation message from electronic device 2 is a response from electronic device 2 to the first indication information. In this case, method 1600 may further include step 1618 before step 1619: after electronic device 2 turns on its own recording function, it sends a confirmation message to electronic device 1 to inform electronic device 1 that the recording function of electronic device 2 has been turned on.

[0302] After receiving the second instruction information, the electronic device 3 executes step 1620: playing the ultrasonic signal.

[0303] Since the recording function is turned on in electronic device 2, when electronic device 3 plays the ultrasonic signal, the ultrasonic signal will be received by electronic device 2. Then electronic device 2 can execute step 1621, and electronic device 2 determines the relative position relationship between electronic device 2 and electronic device 3 based on the received ultrasonic signal.

[0304] Combine Figure 14 As can be seen from the scenario shown, after receiving two ultrasonic signals, electronic device 2 can determine that the ultrasonic signal output by the left speaker of electronic device 3 arrives at the recording module of electronic device 2 earlier based on the difference between the times when the two ultrasonic signals arrive at the recording module of electronic device 2. Based on this, electronic device 2 can determine that it is located on the left side of electronic device 3.

[0305] After electronic device 2 determines the relative position relationship between itself and electronic device 3 , step 1622 may be executed, where electronic device 2 sends the relative position relationship between itself and electronic device 3 to electronic device 1 .

[0306] In step 1623 , electronic device 1 determines that electronic device 2 is located on the left side of electronic device 3 based on the relative position relationship between electronic device 1 and electronic device 3 sent by electronic device 2 .

[0307] After determining that electronic device 2 is located on the left side of electronic device 3, combined with step 1607, step 1615 and step 1623, electronic device 1 can determine that electronic device 2 is located on the right side of electronic device 1, electronic device 3 is located on the right side of electronic device 2, and electronic device 4 is located on the right side of electronic device 3. In this case, in order to enable the cursor to switch freely between electronic device 1, electronic device 2, electronic device 3, and electronic device 4, electronic device 1 also needs to inform each device of the relative position relationship between each of electronic device 1, electronic device 2, electronic device 3 and electronic device 4. In this case, method 1600 also includes step 1624: electronic device 1 sends the relative position relationship between each of electronic device 1, electronic device 2, electronic device 3 and electronic device 4 to electronic device 1, electronic device 2, electronic device 3, and electronic device 4 respectively. For example, electronic device 1 sends to electronic device 1, electronic device 2, electronic device 3 and electronic device 4 respectively that electronic device 2 is located on the right side of electronic device 1, electronic device 3 is located on the right side of electronic device 2, and electronic device 4 is located on the right side of electronic device 3.

[0308] After obtaining the relative positional relationships between each of electronic devices 1, 2, 3, and 4, electronic devices 1, 2, 3, and 4 can support free cursor switching between electronic devices 1, 2, 3, and 4. For an example of free cursor switching between electronic devices 1, 2, 3, and 4, please refer to the relevant description in method 400, which will not be repeated here for the sake of brevity.

[0309] It should be noted that, when determining the relative positional relationship between two of a plurality of electronic devices, the functions of the mouse described in the above method are merely exemplary and do not limit the embodiments of the present application. In the embodiments of the present application, when determining the relative positional relationship between two of a plurality of electronic devices, the functions of the mouse may be implemented in the following manner:

[0310] When determining the relative position relationship between two of multiple electronic devices, after receiving the relative position relationship between each of the other electronic devices and the electronic device 1, the mouse may not perform the step of determining the relative position relationship between two of the multiple electronic devices, but may send the relative position relationship between each of the other devices and the electronic device 1 to the electronic device 1, and the electronic device 1 determines the relative position relationship between two of the multiple devices. After that, the electronic device 1 sends the relative position relationship between two of the multiple electronic devices to the mouse. Finally, the mouse sends the relative position relationship between two of the multiple electronic devices to each electronic device. Based on this, the following Figure 3Taking the illustrated scenario as an example, the method 1700 for identifying a location provided by an embodiment of the present application is introduced. Figure 17 An exemplary interactive flow chart of a method 1700 for identifying a location is shown. The method 1700 includes at least the following steps.

[0311] In step 1701, the mouse sends first instruction information to electronic device 2 and electronic device 3 respectively, instructing electronic device 2 and electronic device 3 to activate their respective recording functions. For the specific implementation of step 1701, please refer to the relevant description in step 401, which will not be repeated here for the sake of brevity.

[0312] In step 1702 , electronic device 2 and electronic device 3 activate their respective recording functions according to the first instruction information they receive.

[0313] In step 1703 , after turning on their respective recording functions, electronic device 2 and electronic device 3 send a confirmation message to the mouse to indicate that the recording functions of electronic device 2 and electronic device 3 have been turned on.

[0314] In step 1704, the mouse sends second instruction information to electronic device 1 to instruct electronic device 1 to play the ultrasonic signal. For example, the mouse sends the second instruction information to electronic device 1 based on the short-range communication connection established between the mouse and electronic device 1. For the specific implementation of steps 1702 to 1704, please refer to the relevant description in steps 402 to 404. For the sake of brevity, it is not repeated here.

[0315] After receiving the second instruction information, the electronic device 1 executes step 1705: playing the ultrasonic signal. For the specific implementation of step 1705, please refer to the relevant description in step 405, which will not be repeated here for the sake of brevity.

[0316] Because electronic devices 2 and 3 have their respective recording functions enabled, when electronic device 1 plays the ultrasonic signal, the ultrasonic signal is received by electronic devices 2 and 3. Electronic devices 2 and 3 can then execute step 1706, where each electronic device 2 and 3 determines its relative position relative to electronic device 1 based on the received ultrasonic signal. For the specific implementation of step 1706, please refer to the relevant description in step 406; for the sake of brevity, it will not be repeated here.

[0317] After electronic devices 2 and 3 determine their relative positional relationships with electronic device 1, step 1707 may be executed: electronic devices 2 and 3 send the relative positional relationships between themselves and electronic device 1 to the mouse. For the specific implementation of step 1707, please refer to the relevant description in step 407, which will not be repeated here for the sake of brevity.

[0318] In step 1708 , the mouse sends the relative position relationship between electronic device 2 , electronic device 3 and electronic device 1 to electronic device 1 .

[0319] After the mouse receives the relative position relationship between electronic device 2 and electronic device 1 sent by electronic device 2, and the relative position relationship between electronic device 3 and electronic device 1 sent by electronic device 3, the relative position relationship between electronic device 2 and electronic device 1, and the relative position relationship between electronic device 3 and electronic device 1 can be sent to electronic device 1.

[0320] It is worth mentioning that in step 1708, the mouse can also send the relative position relationship between electronic device 2, electronic device 3 and electronic device 1 to electronic device 2 or electronic device 3: in one implementation, the mouse can send the relative position relationship between electronic device 3 and electronic device 1 to electronic device 2, so that electronic device 2 can determine the relative position relationship between electronic device 1, electronic device 2, and electronic device 3 based on the relative position relationship between electronic device 2 and electronic device 1 and the relative position relationship between electronic device 3 and electronic device 1; in another implementation, the mouse can send the relative position relationship between electronic device 2 and electronic device 1 to electronic device 3, so that electronic device 3 can determine the relative position relationship between electronic device 1, electronic device 2, and electronic device 3 based on the relative position relationship between electronic device 2 and electronic device 1 and the relative position relationship between electronic device 3 and electronic device 1. In addition, the mouse can also send the relative position relationship between electronic device 2 and electronic device 1, and the relative position relationship between electronic device 3 and electronic device 1 to electronic device 2, or send the relative position relationship between electronic device 2 and electronic device 1, and the relative position relationship between electronic device 3 and electronic device 1 to electronic device 3, which is not limited in this embodiment of the present application.

[0321] In step 1709 , electronic device 1 determines that electronic device 2 is located on the left side of electronic device 1 and that electronic device 3 is located on the right side of electronic device 1 based on the relative position relationship between electronic device 2 and electronic device 1 and the relative position relationship between electronic device 3 and electronic device 1 sent by the mouse.

[0322] After determining that electronic device 2 is located on the left side of electronic device 1 and electronic device 3 is located on the right side of electronic device 1, electronic device 1 obtains the relative position relationship between electronic device 1, electronic device 2, and electronic device 3. After that, electronic device 1 can execute step 1710: electronic device 1 sends the relative position relationship between electronic device 1, electronic device 2, and electronic device 3 to the mouse.

[0323] After the mouse receives the relative position relationship between each of electronic devices 1, electronic device 2, and electronic device 3 sent by electronic device 1, in order to enable the cursor to switch freely between electronic devices 1, electronic device 2, and electronic device 3, the mouse also needs to inform each device of the relative position relationship between each of electronic devices 1, electronic device 2, and electronic device 3. In this case, method 1700 also includes step 1711: the mouse sends the relative position relationship between each of electronic devices 1, electronic device 2, and electronic device 3 to electronic device 1, electronic device 2, and electronic device 3 respectively. For example, the mouse sends to electronic device 1, electronic device 2, and electronic device 3 respectively that electronic device 2 is located on the left side of electronic device 1 and electronic device 3 is located on the right side of electronic device 1.

[0324] After obtaining the relative positional relationship between any two of electronic devices 1 , 2 , 3 , electronic devices 1 , 2 , 3 can support free switching of the mouse among electronic devices 1 , 2 , 3 .

[0325] For an example of freely switching the cursor between electronic device 1, electronic device 2, and electronic device 3, please refer to the relevant description in method 400. For the sake of brevity, it will not be repeated here.

[0326] It is worth mentioning that in method 1700, only electronic device 1 is used as a device for playing ultrasonic signals, and electronic device 2 and electronic device 3 are used as devices for receiving ultrasonic signals to illustrate the method for identifying positions provided in the embodiment of the present application. However, this does not constitute a limitation on the embodiment of the present application. For example, in a specific implementation, any one of electronic device 1, electronic device 2, and electronic device 3 can be used as a device for playing ultrasonic signals, and the other two devices can be used as devices for receiving ultrasonic signals. The embodiment of the present application does not limit this. Exemplarily, the device that plays ultrasonic signals can be the first device to establish a short-range communication connection with the mouse. It should be understood that the changes made by method 1700 relative to method 400 to the functions of the mouse in determining the relative position relationship between two of a plurality of electronic devices are also applicable to other scenarios in the embodiment of the present application, namely Figure 8 The scene shown, Figure 11 The scene shown and Figure 14 The scene shown.

[0327] It should be understood that the embodiment of the present application only introduces the method of identifying the position by taking the example of turning on the recording function first and then playing the ultrasonic signal, but this does not constitute a limitation of the embodiment of the present application. In specific implementation, the ultrasonic signal can also be played first and the recording function can be turned on later, as long as it can be ensured that the electronic device with the recording function turned on can receive at least one set of ultrasonic signals from the left speaker and the right speaker of the device that plays the ultrasonic signal.

[0328] For example, before or at the same time as instructing to start the recording function, an instruction can be given to play an ultrasonic signal, and at the same time as instructing to play the ultrasonic signal, an instruction can be given for how long the electronic device will play the ultrasonic signal, wherein at least one group of ultrasonic signals from the left speaker and the right speaker of the device that plays the ultrasonic signal can be understood as: in method 400, the ultrasonic signal s1 played by the electronic device 1 through the left speaker within the time length T1 and the ultrasonic signal s2 played through the right speaker within the time length T3 are a group of ultrasonic signals from the left speaker and the right speaker of the electronic device 1.

[0329] It is worth mentioning that in the embodiments of the present application, the same side has the same meaning as the same side, and the opposite side has the same meaning as the different sides.

[0330] In the method for identifying position provided by an embodiment of the present application, a first electronic device instructs at least two second electronic devices to turn on their respective recording functions, and instructs a third electronic device to send an ultrasonic signal. After turning on the recording function, the at least two second electronic devices determine the relative position relationship between themselves and the third electronic device based on the ultrasonic signals detected by their respective recording functions, and then send the relative position relationship between themselves and the third electronic device to the first electronic device. Finally, the first electronic device determines the relative position relationship between any two of the multiple electronic devices based on the relative position relationship between themselves and the third electronic device sent by the at least two second electronic devices, thereby automatically identifying the relative position relationship between any two of the multiple electronic devices. This method does not require the user to manually set the relative position relationship between any two of the multiple devices, and is easy to operate.

[0331] It is understandable that, in order to implement the above functions, the electronic device includes hardware and / or software modules that perform the corresponding functions. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of this application.

[0332] In this embodiment, the electronic device can be divided into functional modules according to the above-mentioned method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into a single processing module. The above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the module division in this embodiment is illustrative and is only a logical functional division. In actual implementation, other division methods may be used.

[0333] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0334] The electronic device provided in this embodiment is used to execute the above-mentioned method for identifying a location, and thus can achieve the same effect as the above-mentioned implementation method.

[0335] When integrated, the electronic device may also include a processing module, a storage module, and a communication module. The processing module may be used to control and manage the operation of the electronic device. The storage module may be used to support the execution of program code and data stored in the electronic device. The communication module may be used to support communication between the electronic device and other devices.

[0336] The processing module may be a processor or a controller. It may implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and so on. The storage module may be a memory. The communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, or a Wi-Fi chip.

[0337] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment may be a Figure 1 The device of the structure shown or Figure 2 The structure of the device is shown.

[0338] This embodiment further provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes the above-mentioned related method steps to implement the location identification method in the above-mentioned embodiment.

[0339] This embodiment further provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement the method for identifying a location in the above-mentioned embodiment.

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

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

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

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

[0344] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0345] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0346] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0347] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for identifying a location, characterized in that: Applied to a third electronic device, the method includes: Sending first instruction information to at least two second electronic devices, wherein the first instruction information instructs the corresponding second electronic devices to enable a recording function; Playing an ultrasonic signal, where the ultrasonic signal is used to determine a relative position relationship between the third electronic device and the at least two second electronic devices; receiving relative position relationships between the at least two second electronic devices and the third electronic device, sent by the at least two second electronic devices; Sending to the at least two second electronic devices the relative positional relationship between each of the at least two second electronic devices and the third electronic device; or, The relative positional relationship between any two of the at least two second electronic devices is determined based on the relative positional relationship between each of the at least two second electronic devices and the third electronic device.

2. The method according to claim 1, characterized in that The at least two second electronic devices include two second electronic devices, and the relative positional relationship between each of the at least two second electronic devices and the third electronic device includes: one of the two second electronic devices is located on a first side of the third electronic device, and the other of the two second electronic devices is located on a second side of the third electronic device, wherein the first side is the left side or the right side, and the second side is opposite to the first side.

3. The method according to claim 1, characterized in that The at least two second electronic devices include two second electronic devices, the second electronic devices include one second electronic device and another second electronic device, the relative positional relationship between each of the at least two second electronic devices and the third electronic device includes: the two second electronic devices are both located on the left side or the right side of the third electronic device, and determining the relative positional relationship between each of the at least two second electronic devices based on the relative positional relationship between each of the at least two second electronic devices and the third electronic device includes: Sending second instruction information to the other second electronic device, wherein the second instruction information instructs the other second electronic device to play an ultrasonic signal, where the ultrasonic signal is used to determine a relative positional relationship between the two second electronic devices; The relative position relationship between the two second electronic devices is received and sent by the other second electronic device.

4. The method according to claim 3, characterized in that Before sending the second indication information to the other second electronic device, the method further includes: A confirmation message for the first indication information sent by the second electronic device is received, where the confirmation message for the first indication information indicates that the second electronic device has enabled a recording function.

5. The method according to any one of claims 1 to 4, characterized in that Before playing the ultrasonic signal, the method further includes: Receive confirmation messages for the first indication information sent by the at least two second electronic devices, where the confirmation messages indicate that the corresponding second electronic devices have enabled a recording function.

6. A method for identifying a location, characterized in that: Applied to a second electronic device, the method includes: receiving first instruction information from a third electronic device, wherein the first instruction information instructs the second electronic device to enable a recording function; According to the first instruction information, start the recording function; determining a relative positional relationship between the second electronic device and the third electronic device based on the ultrasonic signal from the third electronic device detected by the recording function; sending a relative position relationship between the second electronic device and the third electronic device to the third electronic device; Relative position relationships between at least two second electronic devices including the second electronic device and the third electronic device are received from the third electronic device.

7. The method according to claim 6, characterized in that The second electronic device is one of two second electronic devices, and the relative positional relationship between the second electronic device and the third electronic device includes: the second electronic device is located on a first side of the third electronic device, the first side is opposite to the second side, and the second side is the relative positional relationship between the other second electronic device of the two second electronic devices and the third electronic device, wherein the first side is the left side or the right side.

8. The method according to claim 6, characterized in that The second electronic device is one of two second electronic devices, and the method further includes: determining a relative positional relationship between the second electronic device and the other second electronic device according to an ultrasonic signal from the other second electronic device detected by the recording function; The relative position relationship between the second electronic device and the another second electronic device is sent to the third electronic device.

9. The method according to claim 6, characterized in that The second electronic device is one of two second electronic devices, and the method further includes: receiving second instruction information sent by the third electronic device, where the second instruction information instructs the second electronic device to play an ultrasonic signal; An ultrasonic signal is played according to the second indication information, where the ultrasonic signal is used to determine the relative position relationship between the two second electronic devices.

10. The method according to any one of claims 7 to 9, characterized in that After the recording function is enabled, the method further includes: A confirmation message for the first indication information is sent to the third electronic device, where the confirmation message for the first indication information indicates that the second electronic device has enabled the recording function.

11. An electronic device, characterized in that: include: one or more processors; Memory; and one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs are executed by the processor, the electronic device performs the method as claimed in any one of claims 1 to 5.

12. An electronic device, characterized in that: include: one or more processors; Memory; and one or more programs, wherein the one or more programs are stored in the memory, and when the one or more programs are executed by the processor, the electronic device performs the method as claimed in any one of claims 6 to 10.

13. A computer storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, enable the electronic device to execute the method for identifying a location according to any one of claims 1 to 5, or 6 to 10.

14. A computer program product, characterized in that When the computer program product is run on a computer, The computer is caused to execute the method for identifying a location according to any one of claims 1 to 5, or 6 to 10.

Citation Information

Patent Citations

  • Mapping positions of devices using audio

    CN105960596A

  • Detecting the location of a phone using RF wireless and ultrasonic signals

    CN107850667A

  • Position measurement system for mobile device

    KR101040181B1

  • "a method and system for determining an orientation of a user"

    WO2020077389A1

  • Method and apparatus for determining relative position between two terminal devices

    WO2020103066A1