Positioning method and related equipment

By obtaining the location information of collaborative devices through a server, the battery life problem caused by long connections in smartwatches is solved, and the battery life is extended in the event of low power or sudden network outage.

CN121645130APending Publication Date: 2026-03-10HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411218924.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

In existing positioning technologies, smartwatches need to maintain a long-term connection with servers, resulting in insufficient battery life and an inability to remain in a low-power state for extended periods.

Method used

The system obtains the location information of devices that meet the preset proximity relationship through the server, such as through Bluetooth or mobile hotspot technology, and establishes a collaborative relationship with the collaborative device. This avoids the smartwatch directly performing the location operation and uses the location information of the collaborative device to replace the smartwatch's location information.

Benefits of technology

It improves the battery life of smartwatches, especially in situations of low battery or sudden network outages, reducing power consumption during location operations and extending device usage time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121645130A_ABST
    Figure CN121645130A_ABST
Patent Text Reader

Abstract

The invention provides a positioning method and related equipment, and the method comprises the steps: receiving a first message sent by first equipment, and enabling the first message to be used for requesting the position information of second equipment; position information of a third device is obtained, the third device is a cooperative device corresponding to the second device, and the second device and the third device are devices meeting a preset close-range relationship; and sending a second message to the first device, wherein the second message comprises the position information of the third device. According to the invention, the cruising ability of the electronic equipment with the positioning function can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a positioning method and related equipment. Background Technology

[0002] With the development of terminal technology, most smartwatches on the market are equipped with location tracking capabilities. When children and parents are in different locations, parents can use a mobile app to view the real-time location of their child wearing the smartwatch, ensuring the child's safety. In existing location tracking technologies, the smartwatch receives a location command from the mobile phone via a server, obtains the location result through the tracking technology, and then sends the result back to the mobile phone via the server. During the location tracking process, the smartwatch needs to perform location operations such as low-power wake-up, activating the location device, processing location logic, connecting to the network, and uploading the result data. Furthermore, to respond in real-time to location commands sent by the mobile phone through the server, the smartwatch needs to maintain a persistent connection with the server.

[0003] Because smartwatches need to maintain a long-term connection with servers and sometimes perform a series of location operations, they cannot remain in a low-power state for extended periods. Therefore, improving the battery life of electronic devices with location functionality is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] This application discloses a positioning method and related equipment, which can improve the battery life of electronic devices with positioning functions.

[0005] In a first aspect, embodiments of this application provide a positioning method applied to a server, the method comprising:

[0006] Receive a first message sent by the first device, wherein the first message is used to request the location information of the second device;

[0007] Obtain the location information of a third device, wherein the third device is a collaborative device corresponding to the second device, and the second device and the third device are devices that satisfy a preset close proximity relationship;

[0008] Send a second message to the first device, the second message including the location information of the third device.

[0009] In the above method, the second device and the third device meet a preset close proximity relationship. The location information of the third device can be equivalent to the location information of the second device. When the first device requests to obtain the location information of the second device and the second device is a cooperating device, the server can send the location information of the third device to the first device, so as to avoid the second device performing a positioning operation and affecting the battery life. This improves the battery life of the second device (i.e., electronic device with positioning function) and is more suitable for scenarios where the second device is in a low power state, suddenly loses network connection or shuts down due to power failure.

[0010] In one possible implementation, the predefined proximity relationship includes one or more of the following relationships:

[0011] Connect via near-field wireless technology, which includes Bluetooth or mobile hotspot technology;

[0012] The distance is not greater than the first preset threshold.

[0013] In one possible implementation, before acquiring the location information of the third device, the method further includes:

[0014] The third device corresponding to the second device is determined according to the collaboration relationship routing table, wherein the collaboration relationship table is used to reflect the correspondence between the collaborative device and the collaboration device.

[0015] In the above method, the server can store and manage the collaboration relationship between the collaborating device and the collaborating device through the collaboration relationship routing table. This is beneficial for the server to accurately and quickly request the location information of the third device when it needs to obtain the location information of the second device, thereby improving the efficiency of obtaining the location information of the third device and ensuring the timeliness of the location information.

[0016] In one possible implementation, the second device corresponds to multiple cooperating devices, the cooperative relationship routing table includes a weight factor, which is used to reflect the priority level of each cooperative device among the multiple cooperative devices, and the third device is the cooperative device with the highest priority among the multiple cooperative devices.

[0017] In the above method, for a scenario where one coordinated device corresponds to multiple coordinated devices, the server can use a weighting factor to measure the priority level of each coordinated device corresponding to the second device. This is beneficial for determining the third device with the highest priority corresponding to the second device based on application requirements, and sending the location information of the third device to the first device.

[0018] In one possible implementation, the priority level of each of the multiple cooperating devices is determined based on one or more of the following conditions:

[0019] The time interval between the generation time of the location information of the collaborative device and the current time;

[0020] The power consumption of the collaborative devices;

[0021] The number of devices being collaborated with corresponding to the collaborating device;

[0022] The time it takes for the collaborative device to establish a correspondence with the second device.

[0023] In the above method, the server can meet at least one or more of the principles such as efficiency priority, load balancing priority, communication cost priority, and information accuracy priority when determining the highest priority collaborative device, thereby flexibly meeting different application needs.

[0024] In one possible implementation, before receiving the first message sent by the first device, the method further includes:

[0025] Receive a third message sent by a second device and / or a third device, wherein the third message is used to characterize the third device as a cooperating device corresponding to the second device;

[0026] Generate a collaborative relationship routing table based on the third message.

[0027] In the above method, the server can receive third information sent by the second device and / or the third device to reflect the collaborative relationship, thereby storing and managing the collaborative relationship.

[0028] In one possible implementation, before receiving the first message sent by the first device, the method further includes:

[0029] Receive a fourth message sent by the second device, wherein the fourth message includes the token of the second device, the battery level of the second device, and the pre-selected device role of the second device;

[0030] The device receives a fifth message sent by the third device, wherein the fifth message includes the token of the third device, the battery level of the third device, and the pre-selected device role of the third device, wherein the pre-selected device role includes a cooperating device or a device being cooperated with, and the token is used to identify the device identity;

[0031] Based on the fourth and fifth messages, it is determined that the third device is a collaborative device corresponding to the second device;

[0032] Generate the aforementioned collaborative relationship routing table.

[0033] In the above method, the server can receive device information (such as token, battery level, and pre-selected device role) sent by the second and third devices to determine the collaboration relationship between the second and third devices, thereby storing and managing the collaboration relationship.

[0034] In one possible implementation, the coordination relationship routing table includes the tokens of the second device and the third device. The token of the second device is marked as the token of the negotiated device, and the token of the third device is marked as the token of the negotiating device. The tokens are used to identify the device identity.

[0035] In one possible implementation, before receiving the first message sent by the first device, the method further includes:

[0036] Send a sixth message to the second device, wherein the sixth message includes the token assigned to the second device;

[0037] Send a seventh message to the third device, wherein the seventh message includes a token assigned to the third device.

[0038] To ensure information security during device-to-device communication, the server in the above method can assign tokens to both the second and third devices. When the second and third devices communicate, they can authenticate each other based on these tokens, avoiding the exchange of device IDs and enhancing communication security. Furthermore, the token settings in this method are quite flexible, which is beneficial for future expansion of token-related services.

[0039] In one possible implementation, before sending the sixth message to the second device, the method further includes:

[0040] Receive the eighth message sent by the second and third devices, wherein the eighth message is used to request the allocation of a token;

[0041] Assign tokens to the second and third devices respectively;

[0042] Generate a token information table, which reflects the correspondence between the identity ID of the second device and the token of the second device, as well as the correspondence between the ID of the third device and the token of the third device. The ID is used to identify the device identity.

[0043] In the above method, the server can store and manage the correspondence between device ID and device token, which is beneficial for subsequently determining the cooperating device corresponding to the second device.

[0044] In one possible implementation, the first message includes the ID of the second device, and the third device corresponding to the second device is determined according to the coordination relationship routing table, including:

[0045] Determine the token of the second device based on the token information table and the ID of the second device;

[0046] The token of the third device is determined based on the collaborative relationship routing table and the token of the second device.

[0047] In one possible implementation, obtaining the location information of the third device includes:

[0048] The location information of a third device is retrieved from the stored historical location information, wherein the time interval between the generation time of the location information of the third device and the current time is not greater than a second preset threshold.

[0049] In the above method, when the time interval between the generation time of the historical location information of the third device and the current time is not greater than the second preset threshold, the historical location information of the third device can be equivalent to the real-time location information of the third device. Therefore, in the scenario where the second device corresponds to multiple collaborative devices, the server can directly send the stored location information of the third device to the first device, avoiding requesting new location information from the third device, thereby improving the efficiency of the first device in obtaining the location information of the third device.

[0050] In one possible implementation, obtaining the location information of the third device includes:

[0051] Send an eighth message to the third device, wherein the eighth message is used to request the location information of the third device;

[0052] Receive a ninth message sent by a third device, wherein the ninth message includes the location information of the third device.

[0053] Secondly, embodiments of this application provide a positioning method applied to a third device, the method comprising:

[0054] The server receives an eighth message, which requests the location information of a third device. The third device is a cooperating device corresponding to the second device, and the second and third devices are devices that satisfy a preset close proximity relationship.

[0055] Send a ninth message to the server, which includes the location information of the third device.

[0056] In the above method, the second and third devices meet a preset close proximity relationship, and the location information of the third device can be equivalent to the location information of the second device. When the third device is a cooperating device of the second device, the third device in the above method can respond to the server's request to obtain the location information of the third device and send the location information of the third device to the server. This is beneficial for the server to send the location information of the third device to devices that need to obtain the location information of the second device, avoiding the second device from performing positioning operations that affect its battery life. This improves the battery life of the device with positioning function and is more suitable for scenarios where the second device is in a low power state, suddenly loses network access, or shuts down due to power failure.

[0057] In one possible implementation, the predefined proximity relationship includes one or more of the following relationships:

[0058] Connect via near-field wireless technology, which includes Bluetooth or mobile hotspot technology;

[0059] The distance is not greater than the first preset threshold.

[0060] In one possible implementation, before receiving the eighth message sent by the server, the method further includes:

[0061] The third device is identified as a collaborative device corresponding to the second device.

[0062] In one possible implementation, determining that the third device is a cooperating device corresponding to the second device includes:

[0063] Receive a fourth message sent by the second device, wherein the fourth message includes the token of the second device, the battery level of the second device, and the pre-selected device role of the second device;

[0064] Based on the fourth message, the token of the third device, the power level of the third device, and the pre-selected device role of the third device, it is determined that the third device is a negotiation device corresponding to the second device.

[0065] In the above method, the second device and the third device meet the preset close proximity relationship, and can establish a collaborative relationship by exchanging their respective device information (such as token, battery level, and pre-selected device role). This is beneficial for the second device to make the third device a collaborative device when the battery level is low.

[0066] In one possible implementation, after determining that the third device is a negotiation device corresponding to the second device based on the fourth message, the token of the third device, the battery level of the third device, and the pre-selected device role of the third device, the method further includes:

[0067] The first interface is displayed, which is used to ask whether to identify the third device as a cooperating device of the second device;

[0068] Receive a selection operation for the first interface, wherein the selection operation is used to confirm that the third device is identified as a cooperative device of the second device.

[0069] In one possible implementation, after determining that the third device is a cooperating device corresponding to the second device, the method further includes:

[0070] A third message is sent to the server, wherein the third message is used to reflect that the third device is a cooperating device corresponding to the second device.

[0071] In the above method, the third device can send the collaboration relationship between the second and third devices to the server, which facilitates the server to store and manage the collaboration relationship between the collaborating device and the collaborating device. This is beneficial for the server to accurately and quickly request the location information of the third device when it needs to obtain the location information of the second device, thereby improving the efficiency of obtaining the location information of the third device and ensuring the timeliness of the location information.

[0072] In one possible implementation, determining that the third device is a cooperating device corresponding to the second device includes:

[0073] Send a fifth message to the server, which includes the third device's token, the third device's battery level, and the third device's pre-selected device role, which may be a cooperating device or a device being cooperated with.

[0074] Receive a third message sent by the server, wherein the third message is used to reflect that the third device is a cooperating device corresponding to the second device.

[0075] In the above method, the third device can send device information (such as token, battery level, and pre-selected device role) to the server, which helps the server determine the collaborative relationship between the second and third devices, thereby storing and managing the collaborative relationship.

[0076] In one possible implementation, the third message includes a token for the second device and a token for the third device. The token for the second device is marked as the token for the negotiated device, and the token for the third device is marked as the token for the negotiating device. The tokens are used to identify the device identity.

[0077] In one possible implementation, after determining that the third device is a cooperating device corresponding to the second device, the method further includes:

[0078] The second interface is displayed, which reflects that the third device has become a collaborative device corresponding to the second device.

[0079] In one possible implementation, after determining that the third device is a cooperating device corresponding to the second device, the method further includes:

[0080] The third interface is displayed, which includes a cancel collaboration control. The cancel collaboration control is used to confirm whether to cancel the collaboration relationship between the second device and the third device.

[0081] Receives the operation to cancel the selection of the collaborative control;

[0082] Cancel the collaboration between the second and third devices.

[0083] In one possible implementation, before determining that the third device is a cooperating device corresponding to the second device, the method further includes:

[0084] Send the tenth message to the server. The tenth message is used to request the allocation of a token and the generation of a token information table. The token information table is used to reflect the correspondence between the identity ID of the third device and the token of the third device. The ID is used to identify the device identity.

[0085] In one possible implementation, before determining that the third device is a cooperating device corresponding to the second device, the method further includes:

[0086] The connection establishment operation receives input, where

[0087] In response to the connection establishment operation, a communication connection is established with the second device.

[0088] In one possible implementation, before determining that the third device is a cooperating device corresponding to the second device, the method further includes:

[0089] Receive the tenth message sent by the second device, wherein the tenth message is used to request the establishment of a connection;

[0090] Establish a communication connection with the second device.

[0091] In one possible implementation, before determining that the third device is a cooperating device corresponding to the second device, the method further includes:

[0092] When the collaboration function is enabled, a fourth interface is displayed. The fourth interface includes role options, which include at least two of the following: the device being collaborated with, the collaborating device, and automatic matching. The collaboration function is the ability for the second and third devices to be either collaborating devices or devices being collaborated with.

[0093] Receive a selection action for one of the character options;

[0094] The pre-selected device role of the third device is determined based on the selected operation.

[0095] Thirdly, embodiments of this application provide a positioning method applied to a second device, the method comprising:

[0096] Receive a fifth message sent by a third device, wherein the fifth message includes the third device's token, the third device's battery level, and the third device's pre-selected device role. The pre-selected device role includes a cooperating device or a device being cooperated with. The token is used to identify the device identity. The second device and the third device are devices that meet the preset close proximity relationship.

[0097] Based on the fifth message, the token of the second device, the power level of the second device, and the pre-selected device role of the second device, the third device is determined to be a negotiation device corresponding to the second device.

[0098] In the above method, the second device and the third device meet the preset close proximity relationship, and can establish a collaborative relationship by exchanging their respective device information (such as token, battery level, and pre-selected device role). This is beneficial for the second device to make the third device a collaborative device when the battery level is low.

[0099] Fourthly, embodiments of this application provide a server, the server including a processor, the processor being configured to perform the method described in the first aspect or any possible implementation thereof.

[0100] Fifthly, embodiments of this application provide an electronic device, which includes a processor, wherein:

[0101] The processor is used to execute the method described in the second aspect or any possible implementation thereof;

[0102] Alternatively, the processor may be used to execute the method described in the third aspect or any possible implementation thereof.

[0103] In a sixth aspect, embodiments of this application provide a positioning device, which may be a server or a device or functional module in a server, wherein the positioning device includes a module for performing the method described in the first aspect or any possible implementation of the first aspect.

[0104] In a seventh aspect, embodiments of this application provide a positioning device, which may be a third device or a device or functional module within a third device, wherein the positioning device includes a module for performing the method described in the second aspect or any possible implementation thereof.

[0105] Eighthly, embodiments of this application provide a positioning device, which may be a second device or a device or functional module in a second device, wherein the positioning device includes a module for performing the method described in the third aspect or any possible implementation of the third aspect.

[0106] Ninthly, embodiments of this application provide a positioning device, characterized in that it includes a logic circuit and an interface, the logic circuit and the interface being coupled; the interface is used for inputting and / or outputting information, wherein:

[0107] This logic circuit is used to execute the method of the first aspect or any possible implementation of the first aspect;

[0108] Alternatively, the logic circuit can be used to perform the method of the second aspect or any possible implementation of the second aspect;

[0109] Alternatively, the logic circuit can be used to execute a third aspect or any possible implementation of the third aspect.

[0110] In a tenth aspect, this application provides a computer storage medium storing a computer program, wherein:

[0111] When the computer program is executed, it is capable of implementing the first aspect or any possible implementation of the first aspect;

[0112] Alternatively, when the computer program is executed, it is capable of implementing the second aspect or any possible implementation of the second aspect;

[0113] Alternatively, when the computer program is executed, it can implement the third aspect or any possible implementation of the third aspect.

[0114] The beneficial effects of the devices and apparatus provided by any possible implementation of any of the fourth to tenth aspects of this application can be referred to the beneficial effects of the technical solutions provided by any of the above aspects and any possible implementations of any of the above aspects, which will not be repeated here. Attached Figure Description

[0115] The accompanying drawings used in the embodiments of this application are described below.

[0116] Figure 1A This is a schematic diagram of the architecture of a positioning system 10 provided in an embodiment of this application;

[0117] Figure 1B This is a schematic diagram of the architecture of another positioning system 10 provided in the embodiments of this application;

[0118] Figure 1CThis is a schematic diagram of the architecture of another positioning system 10 provided in the embodiments of this application;

[0119] Figure 2A This is a schematic diagram of the architecture of a positioning system 20 provided in an embodiment of this application;

[0120] Figure 2B This is an interactive schematic diagram of a positioning system 20 provided in an embodiment of this application;

[0121] Figure 3A This is a schematic diagram of the hardware structure of an electronic device 100 provided in an embodiment of this application;

[0122] Figure 3B This is a schematic diagram of the software architecture of an electronic device 100 provided in an embodiment of this application;

[0123] Figure 4 This is a schematic diagram of the hardware structure of a server 200 provided in an embodiment of this application;

[0124] Figure 5 This is a flowchart illustrating a positioning method provided in an embodiment of this application;

[0125] Figure 6 This is a flowchart illustrating another positioning method provided in an embodiment of this application;

[0126] Figure 7A These are schematic diagrams of interfaces for some application scenarios provided in the embodiments of this application;

[0127] Figure 7B These are interface diagrams illustrating some of the application scenarios provided in the embodiments of this application;

[0128] Figure 8 This is a flowchart illustrating another positioning method provided in an embodiment of this application;

[0129] Figure 9 This is a schematic diagram of a condition priority rule provided in an embodiment of this application;

[0130] Figure 10 This is a flowchart illustrating another positioning method provided in an embodiment of this application;

[0131] Figure 11 These are interface diagrams illustrating some of the application scenarios provided in the embodiments of this application;

[0132] Figure 12 These are interface diagrams illustrating some of the application scenarios provided in the embodiments of this application. Detailed Implementation

[0133] The technical solutions in the embodiments of this application will now be described with reference to the accompanying drawings.

[0134] In the description of the embodiments of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0135] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0136] In a smartwatch positioning scenario, after receiving a positioning command from a mobile phone via a server, the smartwatch obtains the positioning result using positioning technology and then sends the result back to the mobile phone via the server. For example, such as... Figure 1A As shown, mobile phone 11 and smartwatch 33 can each establish a bidirectional communication connection with server 22. To obtain real-time location information from smartwatch 33, smartwatch 33 typically maintains a persistent connection with server 22. For example, as... Figure 1B As shown, server 22 includes a business cloud server 221 and a push cloud server 222. A bidirectional communication connection can be established between mobile phone 11 and business cloud server 221. A communication connection for transmitting downlink data can be established between business cloud server 221 and push cloud server 222. A communication connection for transmitting uplink data can be established between business cloud server 221 and smartwatch 33. A long-term communication connection for transmitting downlink data can be established between push cloud server 222 and smartwatch 33, meaning that after a data transmission, the connection remains open for an extended period. In response to a location refresh command from the mobile phone user, mobile phone 11 can send the location refresh command to business cloud server 221, which in turn can send the command to smartwatch 33 via push cloud server 222. In response to the location refresh command, smartwatch 33 can perform a series of location operations, such as low-power wake-up, activating the positioning device, processing positioning logic, and connecting to the network, thereby obtaining its own location information. Then, the smartwatch 33 can send the location information to the mobile phone 11 via the business cloud server 221. Finally, the mobile phone 11 can display the location information of the smartwatch 33 on its interface.

[0137] It's understandable that smartwatches require a persistent server connection and sometimes need to perform a series of location-related operations, making it impossible for them to remain in a low-power state for extended periods. Currently, smartwatches can send location information to a phone from another smartwatch when their battery is low, thus avoiding location-related operations and improving battery life.

[0138] For example, such as Figure 1C As shown, smartwatch 33 and smartwatch 44 are connected via Bluetooth, and smartwatch 44 establishes a two-way communication connection with server 22. When smartwatch 33 is low on power, it can send an auxiliary positioning message to smartwatch 44. In response to this auxiliary positioning message, smartwatch 44 can perform a positioning operation, obtain its location information, and send this location information to server 22. Then, server 22 can send this location information to mobile phone 11, which can display the location information of smartwatch 44 on its interface. Since Bluetooth is a short-range communication technology, the location information of smartwatch 33 can be considered equivalent to the location information of smartwatch 44. Figure 1C The method shown allows smartwatches to avoid location services when the battery is low, thus saving power and improving battery life. However, Figure 1C In the method shown, when the smartwatch is low on battery, the reporting of the watch's location information is initiated by the smartwatch itself, and the mobile phone passively receives the smartwatch's location information. In other words, the phone cannot actively obtain the smartwatch's real-time location information, which affects the user experience.

[0139] Therefore, embodiments of this application provide a positioning method and related equipment, which can improve the battery life of electronic devices with positioning functions.

[0140] The following describes a positioning system 20 according to an embodiment of this application.

[0141] Figure 2A An exemplary schematic diagram of the architecture of a positioning system 20 is shown.

[0142] like Figure 2A As shown, the positioning system 20 may include electronic device 100, server 200, electronic device 300, and electronic device 400. Electronic device 100 may communicate with server 200, electronic device 300, and electronic device 400 via wired (e.g., universal serial bus, twisted pair, coaxial cable, and fiber optic cable, etc.) and / or wireless (e.g., wireless local area networks (WLAN), Bluetooth, and cellular communication networks, etc.) means.

[0143] Electronic device 100 can be a mobile phone, tablet computer, all-in-one computer, handheld computer, desktop computer, laptop computer, ultra-mobile personal computer (UMPC), netbook, cellular phone, personal digital assistant (PDA), as well as smart home devices such as smart TVs and projectors, wearable devices such as smart bracelets, smartwatches, and smart glasses, extended reality (XR) devices such as augmented reality (AR), virtual reality (VR), and mixed reality (MR), or in-vehicle devices. The descriptions of electronic devices 300 and 400 are consistent with those of electronic device 100. This application does not impose any special limitations on the specific type of electronic device.

[0144] Server 200 may include at least one server. In one optional embodiment, any server may be a hardware server; in another optional embodiment, any server may be a cloud server. In one optional embodiment, any server may be a Linux server, a Windows server, or other server equipment that can provide simultaneous access for multiple devices. In one optional embodiment, server 200 may be a server cluster composed of multiple regions, multiple data centers, and multiple servers.

[0145] In one optional implementation, electronic device 100 can send a first message to server 200, the first message being a request for first location information. Server 200 forwards the first message to electronic device 300. Upon receiving the first message, electronic device 300 performs a positioning operation (such as low-power wake-up, activating the positioning device, processing positioning logic, connecting to the network, etc.) to obtain its own location information (hereinafter referred to as the first location information for ease of description), and sends the first location information to server 200. Then, server 200 sends the first location information to electronic device 100. Electronic device 100 can display the first location information through an interface. It is understood that... Figure 2A The electronic device 100, server 200, and electronic device 300 shown can be respectively Figures 1A to 1C The mobile phone 11, server 22, and smartwatch 33 are shown.

[0146] In one optional implementation, the electronic device 300 can perform a positioning operation at preset time intervals to obtain first location information and send the first location information to the server 200. The server 200 forwards the first location information to the electronic device 100. The electronic device 100 can display the first location information through an interface.

[0147] In one optional implementation, electronic devices 400 and 300 are devices that satisfy a preset proximity relationship. The preset proximity relationship can be a connection via short-range wireless technology, such as Bluetooth or mobile hotspot technology. Alternatively, the preset proximity relationship can be that the distance between electronic devices 400 and 300 is greater than a first preset threshold. Furthermore, electronic device 300 can establish a cooperative relationship with electronic device 400.

[0148] When electronic device 300 is a cooperating device, and electronic device 400 can act as a cooperating device corresponding to electronic device 300, electronic device 100 can send a first message to server 200. The first message requests first location information. In response to the first message, server 200 can obtain the location information of electronic device 400 (for ease of description, the location information of electronic device 400 will be referred to as second location information below) and send the second location information to electronic device 100. Electronic device 100 can display the second location information through an interface.

[0149] Optionally, the positioning system 20 may further include an electronic device 500, the description of which is consistent with that of electronic device 400. Like electronic device 400, electronic device 500 can also serve as a cooperating device with electronic device 300. In response to the first message, server 200 can further determine the higher-priority device among electronic devices 500 and 400 based on device priority and obtain the location information of the higher-priority device. If electronic device 400 has a higher priority, server 200 can obtain second location information and send the second location information to electronic device 100.

[0150] It should be noted that, Figure 2A The number and form of the electronic devices shown are merely examples. In actual implementations, the number may be more or less, and this application does not impose strict limitations on this. For example, the number of cooperating devices (such as electronic devices 400 and 500) corresponding to electronic device 300 may be greater.

[0151] Figure 2B An example diagram illustrating the interaction of a positioning system 20 is shown.

[0152] like Figure 2BAs shown, the electronic device 100 in the positioning system 20 may include a location query application 101 (including a positioning initiation module 1011 and a positioning result display module 1012). The server 200 in the positioning system 20 includes a positioning management module 201, a collaborative routing management module 202, and a collaborative relationship management module 203. The electronic device 300 in the positioning system 20 includes a positioning processing module 301, a collaborative processing module 302, and a Bluetooth module 303. The electronic device 400 in the positioning system 20 includes a positioning processing module 401, a collaborative processing module 402, and a Bluetooth module 403.

[0153] In one optional implementation, the location query application 101 in the electronic device 100 can display an interface to the user, providing functions such as location query and status query for the electronic device 300. The location initiation module 1011 in the location query application 101 can receive a location query operation input by the user, which is used to query first location information. In response to the location query operation, the location initiation module 1011 sends a first message to the location management module 201 of the server 200, requesting the first location information. After receiving the first message, the location management module 201 sends a first message to the location processing module 301 of the electronic device 300. After receiving the first message, the location processing module 301 performs a location operation to obtain the first location information. Then, the location processing module 301 sends the first location information to the location management module 201. After receiving the first location information, the location management module 201 sends the first location information to the location result display module 1012 of the electronic device 100. After receiving the first location information, the location result display module 1012 can display the first location information through the interface.

[0154] In one optional implementation, the positioning processing module 301 of the electronic device 300 can perform a positioning operation at preset time intervals to obtain first location information and send the first location information to the positioning management module 201 of the server 200. After receiving the first location information, the positioning management module 201 sends the first location information to the positioning result display module 1012 of the electronic device 100. After receiving the first location information, the positioning result display module 1012 can display the first location information through the interface.

[0155] In one optional implementation, Bluetooth module 303 of electronic device 300 establishes a communication connection with Bluetooth module 403 of electronic device 400. Bluetooth modules 303 and 403 can transmit status information (such as battery level) of their respective devices to each other. Bluetooth module 303 sends the status information of electronic device 400 to the collaboration processing module 302 of electronic device 300. Collaboration processing module 302 determines a first collaboration relationship (i.e., electronic device 400 is a collaborating device of electronic device 300) based on the status information of electronic device 400 and sends the first collaboration relationship to collaboration relationship management module 203 of server 200. Upon receiving the first collaboration relationship, collaboration relationship management module 203 stores the first collaboration relationship and sends it to collaboration routing management module 202. Upon receiving the first collaboration relationship, collaboration routing management module 202 stores the first collaboration relationship.

[0156] The positioning initiation module 1011 of electronic device 100 sends a first message to the positioning management module 201 of server 200, requesting first location information. Upon receiving the first message, the positioning management module 201 sends a first message to the cooperative routing management module 202. Upon receiving the first message, the cooperative routing management module 202 determines the corresponding cooperative device of electronic device 300 as electronic device 400 based on the cooperative relationship, and sends an eighth message to the positioning management module 201, requesting second location information. Upon receiving the eighth message, the positioning management module 201 sends an eighth message to the positioning processing module 401 of electronic device 400. Upon receiving the eighth message, the positioning processing module 401 performs a positioning operation and obtains the second location information. Then, the positioning processing module 401 sends the second location information to the positioning management module 201. Upon receiving the second location information, the positioning management module 201 sends the second location information to the positioning result display module 1012 of electronic device 100. Upon receiving the second location information, the positioning result display module 1012 can display the second location information through the interface.

[0157] Optionally, the positioning system 20 may further include an electronic device 500, which includes a positioning processing module 501, a collaboration processing module 502, and a Bluetooth module 503. The principle of the positioning processing module 501 is the same as that of the positioning processing module 401, the principle of the collaboration processing module 502 is the same as that of the collaboration processing module 402, and the principle of the Bluetooth module 503 is the same as that of the Bluetooth module 403. It is understood that the collaboration relationship management module 203 may also receive a second collaboration relationship (i.e., electronic device 500 is a collaborating device of electronic device 300), store the second collaboration relationship, and send the second collaboration relationship to the collaboration routing management module 202. The collaboration routing management module 202 may also combine the second collaboration relationship and the first collaboration relationship to determine the priority levels of electronic devices 400 and 500 respectively. After receiving the first message, the collaboration routing management module 202 may also determine, based on the stored collaboration relationship, that both electronic devices 400 and 500 are collaborating devices of electronic device 300, and determine the device with the higher priority between electronic devices 500 and 400 based on device priority. If the electronic device 400 has a higher priority, the cooperative routing management module 202 sends an eighth message to the positioning processing module 401 of the electronic device 400.

[0158] It should be noted that, Figure 2B The positioning system 20 shown may include more or fewer modules. Any module in the positioning system 20 may be a hardware module or a software module. Any module may be a separate module, or at least one module may be integrated together. This application does not limit the scope of the application in this regard. This application does not limit the name of any of the modules mentioned above, and they may also have other names, used to implement the functions corresponding to any of the modules. Figure 2A and Figure 2B In the illustrated embodiment, electronic devices 400 and 500 are both cooperative devices of electronic device 300 for specific explanation. This application does not limit the device roles (cooperative device and cooperative device) of electronic devices 300, 400 and 500.

[0159] The structure of the exemplary electronic device provided in the embodiments of this application will be described below.

[0160] Figure 3A An exemplary schematic diagram of the hardware structure of an electronic device 100 is shown.

[0161] like Figure 3AAs shown, the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0162] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0163] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0164] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0165] The processor 110 may also include a memory for storing instructions and data. In one embodiment, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0166] The charging management module 140 receives charging input from the charger. The power management module 141 connects the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, internal memory 121, display screen 194, camera 193, and wireless communication module 160, etc. The power management module 141 can also monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage current, impedance). In another embodiment, the power management module 141 can also be located in the processor 110. In another embodiment, the power management module 141 and the charging management module 140 can also be located in the same device.

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

[0168] Antennas 1 and 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In another embodiment, the antenna can be used in conjunction with a tuning switch.

[0169] The mobile communication module 150 can provide wireless communication solutions for applications on the electronic device 100, including second-generation (2G), third-generation (3G), fourth-generation (4G), fifth-generation (5G), and sixth-generation (6G) mobile communication technologies. The mobile communication module 150 may include at least one filter, switch, power amplifier, low-noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In one embodiment, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In another embodiment, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0170] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In one embodiment, the modem processor may be a separate device. In another embodiment, the modem processor may be independent of the processor 110 and housed within the same device as the mobile communication module 150 or other functional modules.

[0171] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0172] In one embodiment, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0173] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0174] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In one embodiment, the electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0175] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0176] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise, brightness, and color. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In one implementation, the ISP can be integrated into the camera 193.

[0177] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In one embodiment, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0178] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0179] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.

[0180] Electronic device 100 can implement audio functions through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0181] Audio module 170 is used to convert digital audio information into analog audio signal output, and also to convert analog audio input into digital audio signal. Audio module 170 can also be used for encoding and decoding audio signals.

[0182] The loudspeaker 170A, also known as a "loudspeaker", is used to convert audio electrical signals into sound signals.

[0183] The receiver 170B, also known as the "earpiece", is used to convert audio electrical signals into sound signals.

[0184] The microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals.

[0185] The 170D headphone jack is used to connect wired headphones.

[0186] Pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In one embodiment, pressure sensor 180A can be disposed on display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. A capacitive pressure sensor may include at least two parallel plates with conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the pressure intensity based on the change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the touch position based on the detection signal from pressure sensor 180A. In one embodiment, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation commands.

[0187] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 100. In one embodiment, the angular velocity of the electronic device 100 about three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B.

[0188] The 180C barometric pressure sensor is used to measure barometric pressure.

[0189] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip cover.

[0190] The accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in various directions (generally three axes).

[0191] A distance sensor 180F is used to measure distance. Electronic device 100 can measure distance via infrared or laser. In one embodiment, when shooting a scene, electronic device 100 can utilize the distance sensor 180F to measure distance for rapid focusing.

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

[0193] The 180L ambient light sensor is used to detect ambient light intensity.

[0194] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can utilize the characteristics of the collected fingerprints to achieve fingerprint unlocking, accessing application locks, taking photos with fingerprints, answering calls with fingerprints, etc.

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

[0196] Touch sensor 180K, also known as a "touch device," can be located on display screen 194. The touch sensor 180K and display screen 194 together form a touchscreen, also known as a "touchscreen." Touch sensor 180K detects touch operations applied to or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through display screen 194. In other embodiments, touch sensor 180K may also be located on the surface of electronic device 100, in a different position than display screen 194.

[0197] The bone conduction sensor 180M can acquire vibration signals.

[0198] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0199] Motor 191 can generate vibration alerts. Indicator 192 can be an indicator light, used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. SIM card interface 195 is used to connect a SIM card.

[0200] It should be noted that the hardware structures of electronic devices 300, 400, and 500 in the embodiments of this application can all refer to [reference needed]. Figure 3A The hardware structure of the electronic device 100 is shown. In some cases (e.g., electronic devices 300, 400, and 500 are all smartwatches while electronic device 100 is a mobile phone), the hardware structures of electronic devices 300, 400, and 500 are different from those of other devices. Figure 3A The hardware structure of the electronic device 100 shown is not exactly the same.

[0201] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. For example, a layered architecture software system can be the Android system, the Harmony operating system (OS), or other software systems. This application embodiment uses the layered architecture Android system as an example to illustrate the software structure of electronic device 100.

[0202] Figure 3B An exemplary schematic diagram of the software architecture of an electronic device 100 is shown.

[0203] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In one implementation, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0204] The application layer can include a series of application packages.

[0205] like Figure 3B As shown, the application package may include applications such as camera, gallery, music, calendar, SMS, calling, navigation, Bluetooth, browser, and location lookup.

[0206] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0207] like Figure 3B As shown, the application framework layer may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc.

[0208] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0209] Content providers store and retrieve data, making that data accessible to applications. This data may include videos, images, audio, made and received phone calls, browsing history and bookmarks, phone books, etc.

[0210] A view system includes visual controls, such as controls for displaying text and controls for displaying images. View systems can be used to build applications. A display interface can consist of one or more views. For example, a display interface including a text notification icon could include views for displaying text and views for displaying images.

[0211] The phone manager is used to provide communication functions for electronic device 100. For example, it manages call status (including connection and disconnection).

[0212] The file explorer provides applications with various resources, such as localized strings, icons, images, layout files, video files, and more.

[0213] The notification manager allows applications to display notifications in the status bar. These notifications can be used to deliver informational messages and can disappear automatically after a short pause, requiring no user interaction. For example, the notification manager can be used to notify users of completed downloads or message alerts. The notification manager can also display notifications as icons or scrolling text in the top status bar, such as notifications from background applications, or as dialog boxes on the screen. Examples include displaying text messages in the status bar, emitting sounds, vibrating electronic devices, and flashing indicator lights.

[0214] The Android Runtime consists of core libraries and a virtual machine. The Android runtime is responsible for the scheduling and management of the Android system.

[0215] The core library consists of two parts: one part is the functionalities that need to be called by the Java language, and the other part is the Android core library.

[0216] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0217] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), 2D graphics engines (e.g., SGL), etc.

[0218] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0219] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0220] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0221] A 2D graphics engine is a graphics engine for 2D drawing.

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

[0223] The following example, using an audiobook listening scenario, illustrates the workflow of the software and hardware of electronic device 100.

[0224] When touch sensor 180K receives a touch operation, a corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation, etc.). The raw input event is stored in the kernel layer. The application framework layer retrieves the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking a touch click as an example, where the corresponding control is the icon of the reading application, the reading application calls the interface of the application framework layer to start the reading application, and then calls the kernel layer to control the display driver to display the user interface of the reading application on the display screen 194.

[0225] It should be noted that the software structures of electronic devices 300, 400, and 500 in the embodiments of this application can all refer to [reference needed]. Figure 3B The software architecture of the illustrated electronic device 100 is shown. In some cases (e.g., electronic devices 300, 400, and 500 are all smartwatches while electronic device 100 is a mobile phone), the software architecture of electronic devices 300, 400, and 500 is different from that of other devices. Figure 3A The software architecture of the electronic device 100 shown is not exactly the same.

[0226] The exemplary server 200 provided in the embodiments of this application will be described next.

[0227] Figure 4 An exemplary schematic diagram of the hardware structure of a server 200 is shown.

[0228] like Figure 4As shown, server 200 may include one or more processors 201, communication interface 202, and memory 203, wherein processor 201, communication interface 202, and memory 203 can be connected via a bus or other means. In this embodiment, the connection via bus 204 is taken as an example.

[0229] in:

[0230] The processor 201 may consist of one or more general-purpose processors, such as a CPU. The processor 201 can be used to run the relevant program code for the device control method.

[0231] The communication interface 202 can be a wired interface (e.g., an Ethernet interface) or a wireless interface (e.g., a cellular network interface or a wireless LAN interface) for communicating with other nodes. In this embodiment, the communication interface 202 is specifically used to communicate with the electronic device 100.

[0232] Memory 203 may include volatile memory, such as RAM; it may also include non-volatile memory, such as ROM, flash memory, HDD, or SSD. Memory 203 may also include combinations of the above types of memory. Memory 203 can be used to store a set of program code so that processor 201 can call the program code stored in memory 203 to implement the server-side implementation method of the embodiments of this application. In the embodiments of this application, memory 203 may also be a storage array, etc.

[0233] In one implementation, server 200 may include multiple servers, such as web servers, backend servers, download servers, etc., and the hardware structure of these multiple servers can be referred to [reference needed]. Figure 4 The hardware structure of server 200 is shown.

[0234] It needs to be explained that, Figure 4 The server 200 shown is one implementation of an example embodiment of this application. In actual applications, the server 200 may include more or fewer components, which is not limited here.

[0235] The positioning method provided in the embodiments of this application will be introduced next.

[0236] Please see Figure 5 , Figure 5 This is a flowchart illustrating a positioning method provided in an embodiment of this application. This method can be based on... Figure 2A and Figure 2B The positioning system 20 shown in the diagram can be implemented using other architectures, and the method includes, but is not limited to, the following steps:

[0237] S501: The second device sends a fourth message to the third device.

[0238] The second and third devices are devices that meet a preset proximity relationship, allowing the second device to establish a communication connection with the third device. This preset proximity relationship can be achieved by connecting the second and third devices via short-range wireless technology, such as Bluetooth or mobile hotspot technology. Alternatively, the preset proximity relationship can be that the distance between the second and third devices does not exceed a first preset threshold. This first preset threshold is a length threshold (e.g., 50m), which can be a default value or set according to the actual application scenario. This proximity relationship can also be indirectly reflected by constraints from other parameters. In other words, the third device is a device that is close to the second device and can communicate with it.

[0239] Understandably, the second device could be Figure 2A and Figure 2B The electronic device 300 in the positioning system 20 shown, and the third device may be... Figure 2A and Figure 2B The positioning system 20 shown includes either electronic device 400 or electronic device 500.

[0240] In one optional implementation, when the second and third devices are connected via Bluetooth and both devices have their collaboration function enabled, the second device can send a fourth message to the third device. The collaboration function can be understood as the ability for the second and third devices to act as collaborating devices or being collaborated with each other to assist in location tracking. The fourth message includes the second device's token, battery level, and pre-selected device role. Pre-selected device roles include collaborating devices, being collaborated with, and devices with no specific role. Correspondingly, the third device can send a fifth message to the second device. The fifth message includes the third device's token, battery level, and pre-selected device role. It is understood that by exchanging the fourth and fifth messages, the second and third devices can obtain each other's identities, desired device roles, and battery status, facilitating subsequent determination of device roles and collaborative location tracking based on these information.

[0241] Optionally, the pre-selected device role of the third device can be generated by the third device in response to an input selection operation. For example, the third device can display a fourth interface, then receive a user's selection operation for a role option in the fourth interface (e.g., the selection operation could be a touch operation), and in response to the selection operation, determine the pre-selected device role of the third device. Correspondingly, the pre-selected device role of the second device can be generated by the second device in response to a selection operation. For example, the second device can display a fifth interface, then receive a user's selection operation for a role selection control in the fifth interface, and in response to the selection operation, determine the pre-selected device role of the second device.

[0242] Optionally, the third device can also receive user selections of functional controls on the fourth interface and, in response to these selections, enable the third device's collaborative functionality. Correspondingly, the second device can also receive user selections of functional controls on the fifth interface and, in response to these selections, enable the second device's collaborative functionality.

[0243] Optionally, when the third device has the collaboration function enabled, it can send a tenth message to the server. This tenth message is used to request the allocation of a token. The server can allocate tokens to devices and manage the collaboration relationships between devices. It can be understood that the server can be... Figure 2A and Figure 2B The server 200 in the positioning system 20 shown can also be Figure 4 The server 200 is shown. After receiving the tenth message, the server assigns a token to the third device based on the third device's identity (ID) and sends a seventh message containing the third device's token to the third device. Correspondingly, when the second device is in a state where the collaboration function is enabled, it can also send a tenth message to the server. After receiving the tenth message, the server assigns a token to the second device based on the second device's ID and sends a sixth message containing the second device's token to the second device.

[0244] Furthermore, the server can generate a token information table based on the correspondence between IDs and tokens. This token information table reflects the correspondence between the IDs of the second device and their tokens, as well as the correspondence between the IDs of the third device and their tokens. Optionally, this token information table can also reflect the token generation time.

[0245] For example, the ID, token, and token generation time of the second device are represented as UserID_1, token1, and time1, respectively, and the ID and token of the second device are represented as UserID_2, token2, and time2, respectively. The token information table can be shown in Table 1:

[0246] Table 1 Token Information Table

[0247] token token owner Token generation time token1 UserID_1 time1 token2 UserID_2 time2

[0248] It is understood that both device ID and token can be used to identify a device. In practical applications, the device ID is a unique and fixed identifier for the device. Considering information security when devices communicate with each other, the server in this embodiment can assign tokens to the second and third devices that have enabled the collaboration function. When the second and third devices communicate, they can authenticate each other based on the tokens, avoiding the exchange of device IDs and enhancing communication security. Furthermore, the server in this embodiment can also update the token corresponding to the device based on a preset time, further enhancing communication security. In addition, the token settings in this embodiment are also quite flexible, which is beneficial for subsequent expansion of token-related services.

[0249] Optionally, the third device may initiate an initial Bluetooth pairing with the second device in response to a connection establishment operation. This connection establishment operation can be achieved by shaking the device, or by activating NFC and touching it with another NFC-enabled device. For example, if both the third and second devices are shaking, they can receive Bluetooth broadcast messages from each other and perform authentication (token exchange) to establish a Bluetooth communication connection. Alternatively, the connection establishment operation can be achieved by activating NFC and touching it with another NFC-enabled device. If both the third and second devices have NFC enabled and are touching each other, they can receive Bluetooth broadcast messages from each other and perform authentication to establish a Bluetooth communication connection. This connection establishment operation can also be implemented in other ways, and this embodiment does not impose strict limitations on these methods.

[0250] Optionally, after the third device and the second device have completed their initial Bluetooth pairing, the second device may periodically send Bluetooth broadcast messages to search for the third device, provided its battery level is not higher than a third preset threshold. Upon receiving the Bluetooth broadcast messages from the second device, the third device can directly establish a Bluetooth communication connection with it. The third preset threshold is a battery level threshold, which can be expressed as a percentage; for example, the third preset threshold could be 20%.

[0251] S502: The third device determines that it is a negotiation device corresponding to the second device based on the fourth message.

[0252] Specifically, the third device can determine that it is a negotiation device corresponding to the second device based on the fourth message (i.e., the token of the second device, the battery level of the second device and the pre-selected device role of the second device), the token of the third device, the battery level of the third device and the pre-selected device role of the third device.

[0253] Furthermore, the third device can determine a preliminary cooperative relationship based on the power levels of the third device and the second device, that is, the device with higher power level is a cooperative device of the device with lower power level.

[0254] In one alternative implementation, the power level of the second device is lower than that of the third device, and the third device determines that the initial cooperative relationship is that the third device is a cooperative device of the second device.

[0255] If both the pre-selected device roles of the second device and the pre-selected role of the third device are unrestricted devices, then the third device can determine that the preliminary collaboration relationship is the final collaboration relationship and display the second interface, which is used to show the final collaboration relationship to the user.

[0256] If the pre-selected device role of the second device is the device being collaborated with and the pre-selected device role of the third device is the collaborating device, then after the third device determines that the pre-selected device roles of the second device and the third device are consistent with the preliminary collaboration relationship, it will take the preliminary collaboration relationship as the final collaboration relationship and display the second interface.

[0257] If the pre-selected device role of the second device is a collaborating device and / or the pre-selected device role of the third device is a collaborating device, then after determining that the pre-selected device roles of the second and third devices are inconsistent with the initial collaboration relationship, the third device can display a first interface. The first interface is used to indicate that the initial negotiation result is inconsistent with the pre-selected device roles. The third device can receive the user's selection operation on the "Confirm Collaboration" control in the first interface, and in response to the selection operation, determine to set the device roles of the second device and the third device according to the initial negotiation result.

[0258] In one optional implementation, a third device sends a third message to the server. This third message reflects the collaborative relationship between the third device and the second device, indicating that the third device is a negotiating device of the second device. For example, the third message includes the tokens of the second device and the third device, where the second device's token is marked as the token of the negotiated device, and the third device's token is marked as the token of the negotiating device. Upon receiving the third message, the server stores it and generates a collaborative relationship routing table based on it. This routing table reflects the correspondence between the negotiated device and the cooperating device. For example, the second device's token can be represented as token1, and the third device's token can be represented as token2. The routing table, including the third message, can be as shown in Table 2.

[0259] Table 2. Routing Table of Collaborative Relationships

[0260] Collaborative Relationship Entries Collaborating devices Collaborative devices Weighting factors Time of generation of collaborative relationship Item 1 token1 token2 S1 time01 Item 2 token1 token3 S2 time02

[0261] Optionally, in addition to the third device, the second device may also correspond to one or more other cooperating devices. For example, the fourth device may also be a cooperating device of the second device, and the token of the fourth device may be represented as token3. As shown in Table 2, the cooperative relationship routing table may also include the token of the fourth device. The principle of the fourth device can be referred to the principle of the third device, and will not be repeated here.

[0262] Optionally, the collaboration relationship routing table may also include entries for collaboration relationships to distinguish different collaboration relationships. For example, as shown in Table 2, the collaboration relationship between the second device and the third device is entry 1, and the collaboration relationship between the second device and the fourth device is entry 2.

[0263] Optionally, the collaboration relationship routing table may also include the generation time of the collaboration relationship. For example, as shown in Table 2, the generation time of the collaboration relationship between the second and third devices can be represented as time01, and the generation time of the collaboration relationship between the second and fourth devices can also be represented as time01. The generation time of the collaboration relationship can be related to the priority level of the collaborating devices.

[0264] Optionally, the cooperative routing table can also reflect the priority level of the cooperating devices. For example, as shown in Table 2, each cooperating device in the cooperative routing table corresponds to a weight factor, which reflects the priority level of the cooperating device. The weight factor corresponding to the third device can be represented as S1, and the weight factor corresponding to the fourth device can be represented as S2. The weight factor can be set according to actual application requirements, offering considerable flexibility. The weight factor will be explained in detail later; it will not be elaborated here.

[0265] In one optional implementation, the second device can determine that the third device is a negotiation device corresponding to the second device based on the fifth message. Specifically, the second device can determine that the third device is a negotiation device corresponding to the second device based on the fifth message (i.e., the third device's token, the third device's battery level, and the third device's pre-selected device role), the second device's token, the second device's battery level, and the second device's pre-selected device role. The principle by which the second device determines the cooperation relationship between the second and third devices is the same as the principle by which the third device determines the cooperation relationship between the second and third devices, and will not be repeated here.

[0266] Understandably, the second device can also send a third message to the server. After receiving the third messages from both the second and third devices, the server can verify the third messages and store them if the verification is successful. For example, the server can check whether the specific content of the two third messages is consistent, and it can also check whether the device's token in the third message matches the token assigned to the device by the server.

[0267] In one alternative implementation, after the second device establishes a collaborative relationship with the third device, the second device can disconnect from the server and enter a low-power mode. It is understood that the second device in low-power mode can be considered to be in a disconnected state or a weak connection state (e.g., a state where only some communication functions are available and others are unavailable), which is beneficial for further improving battery life.

[0268] In one optional implementation, after the second device and the third device establish a collaborative relationship, the second device and the third device can cancel the collaborative relationship. For example, the third device can display a third interface to the user, which includes a cancel collaboration control for confirming whether to cancel the collaborative relationship between the second device and the third device. The third device can receive the user's selection operation on the cancel collaboration control to cancel the collaborative relationship between the second device and the third device.

[0269] because Figure 5 The illustrated embodiment involves the interaction of various information between the second device, the third device, and the server. For ease of understanding, the following will describe... Figure 5 The embodiments shown are further elaborated.

[0270] Please see Figure 6 , Figure 6 This is a flowchart illustrating another positioning method provided in the embodiments of this application.

[0271] Step S601: The second device sends the tenth message to the server.

[0272] The tenth message is used to request the allocation of a token.

[0273] Step S602: The server sends the sixth message to the second device.

[0274] The sixth message includes the token for the second device.

[0275] Step S603: The third device sends the tenth message to the server.

[0276] Step S604: The server sends the seventh message to the third device.

[0277] The seventh message includes the token of the third device.

[0278] Step S605: The server generates a token information table based on the sixth and seventh messages.

[0279] Step S606: The second device sends a fourth message to the third device.

[0280] The fourth message includes the token of the second device, the battery level of the second device, and the pre-selected device role of the second device.

[0281] Step S607: The third device determines the second device as a negotiated device corresponding to the third device based on the fourth message.

[0282] Step S608: The third device sends a fifth message to the second device.

[0283] The fifth message includes the third device's token, the third device's battery level, and the third device's pre-selected device role.

[0284] Step S609: The second device determines the third device as a negotiation device corresponding to the second device based on the fifth message.

[0285] Step S610: The second device sends a third message to the server.

[0286] The third message includes the tokens of the second device and the third device. The token of the second device is marked as the token of the negotiated device, and the token of the third device is marked as the token of the negotiating device.

[0287] Step S611: The third device sends a third message to the server.

[0288] Step S612: The server generates a cooperative relationship routing table based on the third message.

[0289] In an optional implementation, after step S605, the server can assist the second and third devices in establishing a collaborative relationship based on relevant information about the second and third devices. For example, the second device can send a fourth message to the server, and the third device can send a fifth message to the server. After receiving the fourth and fifth messages, the server determines the collaborative relationship between the second and third devices based on the fourth and fifth messages, and generates third information reflecting the collaborative relationship and a collaborative relationship routing table. Then, the server sends the third information to both the second and third devices. Both the second and third devices can determine that the third device is a collaborative device of the second device based on the third information.

[0290] For detailed explanations of steps S601 to S612, please refer to [link / reference]. Figure 5 The explanations of the corresponding parts in steps S501 and S502 are not repeated here. It is understood that the order of the steps in steps S601 to S612 can be adjusted. Figure 6 This is for illustrative purposes only and is not intended to limit the scope of the embodiments described in this application. For example, step S603 can be executed simultaneously with step S601, or it can be executed before step S601. As another example, step S608 can be executed simultaneously with step S606, or it can be executed before step S606.

[0291] In summary, the second and third devices in this embodiment meet a preset proximity relationship and can establish a collaborative relationship by exchanging their respective device information (such as tokens, battery levels, and pre-selected device roles). This is beneficial because the third device can become a collaborative device for the second device when its battery is low. Furthermore, the server in this embodiment can receive third information reflecting the collaborative relationship sent by the second and / or third devices, thereby storing and managing the collaborative relationship. This allows the server to accurately and quickly request the location information of the third device when it needs to obtain the location information of the second device, avoiding the second device performing location operations and affecting battery life. In addition, after the second and third devices in this embodiment establish an initial communication connection in response to convenient user operations (such as shaking or touching the device), they can subsequently establish communication connections independently. Therefore, this embodiment can conveniently provide the communication conditions required to establish a collaborative relationship and is more suitable for application scenarios where the second and third devices are children's smartwatches.

[0292] Next, combine Figure 5 and Figure 6 The illustrated embodiments describe the relevant application scenarios and user interface diagrams for those scenarios. The operations, technical terms, and technical logic involved in the scenarios listed below can be found by referring to... Figure 5 and Figure 6The relevant descriptions of the illustrated embodiments will not be repeated in the context of the scenario.

[0293] Scenario 1: When both the second and third devices have the collaboration function enabled, and the second and third devices establish a communication connection for the first time via Bluetooth, the second and third devices can each display device role options for the user to pre-select. See the example below for details. Figure 7A (A) and Figure 7A (B) in the middle.

[0294] like Figure 7A As shown in (A), the second device 700 can display a user interface 701, which includes text content 702, role options 703A, 703B, and 703C. The text content 702 indicates that the second device has received the user's connection establishment operation, is in a state where the collaboration function is enabled, and prompts the user to select a pre-selected device role for the second device. For example, the text content 702 could be the characters "Shake to enable location collaboration, I want to be:". Role options 703A to 703C are used to determine the pre-selected device role of the second device, and may include, for example, role option 703A indicating "collaborated device", role option 703B indicating "collaborating device", and role option 703C indicating "automatic". It is understood that the user interface 701 can be... Figure 5 The fifth interface mentioned in step S501 of the illustrated embodiment.

[0295] In one alternative implementation, the second device 700 may, in response to a selection operation (e.g., a touch operation) of any one of the role options 703A to 703C, select the device role indicated by that option as a pre-selected device role for the second device 700. It is understood that the role option with the instruction name "Auto" is used to indicate a non-limited role device. For example, the second device 700 may receive a user's selection operation for role option 703A, and in response to that selection operation, the second device 700 may determine that the pre-selected device role of the second device is the device being collaborated with.

[0296] In one optional implementation, after the second device 700 displays the user interface 701, if no selection operation is received from the user within a preset time period, the device role indicated by the role option 703C is selected by default as the pre-selected device role of the second device 700, that is, the pre-selected device role of the second device 700 is confirmed to be a device without a limited role.

[0297] In one alternative implementation, after the second device 700 determines the pre-selected device role, it can execute... Figure 6Steps S606 and S609 in the illustrated embodiment. The third device 800 can execute these steps before displaying the user interface 701. Figure 6 Steps S601 and S602 in the illustrated embodiment.

[0298] Similarly, such as Figure 7A As shown in (B), the third device 800 can display a user interface 801, which includes text content 802, role options 803A, role options 803B, and role options 803C. It is understood that the user interface 801 can be... Figure 5 The fourth interface mentioned in step S501 of the illustrated embodiment.

[0299] Text content 802 is used to indicate that the third device has received the user's shaking operation, is in a state of enabled collaboration function, and prompts the user to select a pre-selected device role for the third device. For example, text content 802 could be the characters "Shake to enable location collaboration, I want to be:". Role options 803A to 803C are used to indicate the pre-selected device role of the third device, including, for example: role option 803A indicating "collaborated device", role option 803B indicating "collaborating device", and role option 803C indicating "automatic".

[0300] In an alternative implementation, the third device 800 may, in response to a selection operation (e.g., a touch operation) of any one of the role options 803A to 803C, determine that the device role indicated by that option becomes a pre-selected device role for the third device 800. It is understood that the role option with the instruction name "Auto" is used to indicate a non-limited role device. For example, the third device 800 may receive a user's selection operation for role option 803A, and in response to that selection operation, the third device 800 may determine that the second device's pre-selected device role is the coordinated device.

[0301] In one optional implementation, after the third device 800 displays the user interface 801, if it does not receive a selection operation from the user within a preset time period, it defaults to selecting the device role indicated by the role option 803C as the pre-selected device role of the third device 800, that is, confirming that the pre-selected device role of the third device 800 is a device without a limited role.

[0302] In one alternative implementation, after the third device 800 determines the pre-selected device role, it can execute... Figure 6 Steps S607 and S608 in the illustrated embodiment. The third device 800 can execute these steps before displaying the user interface 801. Figure 6 Steps S603 and S604 in the illustrated embodiment.

[0303] Scenario 2: After the second and third devices have determined that the third device is a negotiation device corresponding to the second device, the result of establishing the collaboration relationship is displayed. See the example below for details. Figure 7A (C) to Figure 7A (F) in the middle.

[0304] like Figure 7A As shown in (C), the second device 700 can display a user interface 704, which includes text content 705 and controls 706. The text content 705 indicates the device role of the second device 700. For example, the text content 705 could be the characters "has become: a collaborating device". The controls 706 indicate the cancellation of the collaborating relationship between the second and third devices. For example, the control 706 could indicate "Cancel Collaboration". It is understood that the user interface can be... Figure 5 The second interface in step S501 of the illustrated embodiment.

[0305] Optionally, the text content 705 may also indicate that the third device is a negotiating device corresponding to the second device. For example, the text content 705 may also include the characters "Location information reported by friend A". It is understood that "friend A" is a name tag set by the user on the second device for the third device.

[0306] Optionally, the text content 705 may also indicate that the second device has entered a low-power state. For example, the text content 705 may also include the characters "Entered low-power mode".

[0307] In one alternative implementation, the second device 700 performs... Figure 6 User interface 704 is displayed after steps S606 and S609 in the illustrated embodiment.

[0308] In one alternative implementation, the second device 700 executes the user interface 704 after displaying it. Figure 6 Step S610 in the illustrated embodiment.

[0309] Similarly, such as Figure 7A As shown in (D), the third device 800 can display a user interface 804, which includes text content 805 and controls 806. The text content 805 indicates the device role of the third device 800. For example, the text content 805 could be the characters "has become: Collaborating device". The controls 806 indicate the cancellation of the collaboration relationship between the third device and the second device. For example, the control 806 could indicate "Cancel Collaboration".

[0310] Optionally, text content 805 may also indicate that the second device is a negotiated device corresponding to the third device. For example, text content 705 may also include the characters "will handle device location transactions for friend B". It is understood that "friend B" is a name tag set by the user on the third device for the second device.

[0311] In one alternative implementation, the third device 800 performs... Figure 6 In the illustrated embodiment, user interface 804 is displayed after steps S607 and S608.

[0312] In an alternative implementation, the third device 800 executes the user interface 804 after displaying it. Figure 6 Step S611 in the illustrated embodiment.

[0313] In one alternative implementation, the second device 700, in response to a user's selection operation on control 706, disconnects its Bluetooth connection with the third device, thereby canceling the collaboration between the second and third devices. Similarly, the third device 800, in response to a user's selection operation on control 806, disconnects its Bluetooth connection with the second device, thereby canceling the collaboration between the second and third devices. It is understood that the user interface 804 can be... Figure 5 The third interface mentioned in step S501 of the illustrated embodiment.

[0314] In one alternative implementation, the user can actively disable the Bluetooth function of the second and / or third devices, thereby disconnecting the Bluetooth connection between the second and third devices and canceling the collaborative relationship between the second and third devices.

[0315] In one alternative implementation, the user can move the second device away from the third device so that the connection distance between the second and third devices does not meet the requirements of Bluetooth technology, thereby canceling the cooperative relationship between the second and third devices.

[0316] In one alternative implementation, after the collaboration relationship between the second device and the third device is canceled, the second device and the third device may each display an interface indicating the cancellation of the collaboration relationship.

[0317] like Figure 7AAs shown in (E), the second device 700 can display a user interface 707, which includes text content 708, controls 709 and 710. The text content 708 indicates that the collaboration between the second device and the third device has been cancelled. For example, the text content 708 could be the characters "Location collaboration cancelled!". Control 709 indicates that the collaboration between the second device and the third device has been cancelled, and control 710 indicates that the collaboration between the second device and the third device can be restarted. For example, control 709 might indicate "OK", and control 710 might indicate "Restart".

[0318] In an alternative implementation, the second device 700 may redisplay the user interface 701 in response to a user's selection operation on the control 710 (e.g., a touch operation).

[0319] Similarly, such as Figure 7A As shown in (F), the third device 800 can display a user interface 807, which includes text content 808, controls 809 and 810. The text content 808 indicates that the collaboration between the second and third devices has been cancelled. For example, the text content 808 could be the text "Location collaboration cancelled!". Control 809 indicates that the collaboration between the second and third devices has been cancelled, and control 810 indicates that the collaboration between the second and third devices should be re-established.

[0320] Scenario 3: When both the second and third devices have enabled the collaboration function, and the second and third devices have established a communication connection via Bluetooth before, the second device can actively request to establish a collaboration relationship with the third device when the battery level is below a preset threshold. The second and third devices can respectively display an interface for requesting to establish a collaboration relationship.

[0321] like Figure 7B As shown in (A), the second device can display a user interface 711, which includes text content 712, controls 713 and 714. The text content 705 prompts the user to confirm whether the second device's device role is a historical collaborative device role. For example, the text content 705 could be the text "Device battery low, requested to establish a collaborative relationship with friend A". Control 713 indicates agreement to the second device and the third device establishing a collaborative relationship, and control 714 indicates disagreement. For example, control 713 could indicate "Agree", and control 714 could indicate "Cancel".

[0322] In an alternative implementation, the second device 700 may redisplay the user interface 704 in response to a user's selection of the control 713.

[0323] Similarly, such as Figure 7B As shown in (B), the third device can display a user interface 811, which includes text content 812, controls 813 and 814. The text content 805 prompts the user to confirm whether the third device's device role is a historical collaborative device role. For example, the text content 805 could be the text "Friend B's device has low battery, requesting to establish a collaborative relationship." Control 813 indicates agreement to the third device establishing a collaborative relationship, and control 814 indicates disagreement. For example, control 813 could indicate "Agree," and control 814 could indicate "Cancel."

[0324] In an alternative implementation, the third device 800 may redisplay the user interface 804 in response to a user's selection of the control 813.

[0325] Please see Figure 8 , Figure 8 This is a flowchart illustrating another positioning method provided in an embodiment of this application. This method can be based on... Figure 2A or Figure 2B The positioning system 20 shown in the diagram can be implemented using other architectures, and the method includes, but is not limited to, the following steps:

[0326] Step S801: The first device sends the first message to the server.

[0327] The first device is a device that can request location information from other devices from the server. It can be understood that the first device can be... Figure 2A and Figure 2B The electronic device 100 in the positioning system 20 shown can also be Figure 3A and / or Figure 3B The electronic device 100 shown. The server can be... Figure 2A and Figure 2B The server 200 in the positioning system 20 shown can also be Figure 4 The server shown is 200.

[0328] The first device sends a first message to the server, requesting the location information of the second device. The second and third devices are devices that meet a preset proximity relationship, and a cooperative relationship has been established between them, with the third device being a cooperative device of the second device. It can be understood that the second device could be... Figure 2A and Figure 2B The electronic device 300 in the positioning system 20 shown, and the third device may be... Figure 2A and Figure 2BThe positioning system 20 shown includes electronic device 400 or electronic device 500. For instructions on establishing a collaborative relationship between the second and third devices, please refer to [link to documentation]. Figure 5 and Figure 6 The descriptions of the corresponding parts in the illustrated embodiments will not be repeated here.

[0329] In one alternative implementation, the first device may display a sixth interface, receive a selection operation for a location request control in the sixth interface, and in response to the selection operation, send a first message to the server.

[0330] In one optional implementation, after receiving the first message, the server can determine the third device corresponding to the second device based on the collaboration relationship routing table. For example, the first message includes the ID of the second device. The server can determine the token of the second device based on the token information table and the ID of the second device. Then, the server determines the token of the third device based on the collaboration relationship routing table and the token of the second device.

[0331] Optionally, the second device may correspond to multiple cooperating devices, and the third device may be a cooperating device randomly selected by the server from among the multiple cooperating devices. For example, the server may determine the tokens of multiple cooperating devices based on the cooperating relationship routing table and the token of the second device, and randomly select one of the cooperating devices' tokens as the token of the third device.

[0332] Optionally, the second device may correspond to multiple collaborating devices, and the third device may be the collaborating device with the highest priority selected by the server from among these collaborating devices. For example, the server can determine the tokens of multiple collaborating devices and the weight factor corresponding to each collaborating device based on the collaborating relationship routing table and the token of the second device. The weight factor reflects the priority level of the collaborating device. The server can then determine the token of the third device based on the weight factor corresponding to the collaborating device with the highest priority.

[0333] For explanations regarding the token information table and the collaboration relationship routing table, please refer to [link / reference]. Figure 5 The description of the corresponding part in the illustrated embodiment will be further explained below regarding the weight factors in the cooperative relationship routing table.

[0334] In one optional embodiment, multiple collaborating devices corresponding to the second device can send device status-related information, such as device battery level and device location information, to the server at preset time intervals. The server can then store the historical battery level and historical location information of each collaborating device at different times.

[0335] The priority level of each collaborative device in a group of collaborative devices can be determined based on one or more of the following four conditions:

[0336] First condition: The time interval between the generation time of the location information of the collaborative device and the current time (for ease of description, it will be referred to as the first time interval below).

[0337] The second condition: the battery level of the cooperating device.

[0338] The third condition: the number of devices being collaborated with corresponding to the collaborating device.

[0339] Fourth condition: The time interval between the time when the cooperating device establishes a correspondence with the second device (i.e., establishes a cooperative relationship) and the current time (for ease of description, it is referred to as the second time interval below).

[0340] Optionally, the priority level of each collaborative device is determined by a first condition. The server can select the collaborative device with the smallest first time interval (less than a second preset threshold) as the device with the highest priority. The second preset threshold is a time threshold, which can be a default value or set according to the actual application scenario. For example, the second preset threshold can be 60 seconds or 100 seconds. The weighting factor can be a first parameter obtained by the server mapping the first time interval according to the first preset mapping rule. It should be noted that the generation time of the location information of the collaborative device in the first condition is the location information closest to the current time in the historical location information of that collaborative device stored by the server.

[0341] For example, the first preset mapping defines mapping a first time interval ranging from 0 to 100 seconds to a first parameter ranging from 0 to 10, where the first parameter is an integer. The second preset threshold is 60 seconds. It can be understood that the smaller the first parameter, the closer the generation time of the location information of the collaborative device stored by the server is to the current time. The server can use the collaborative device with the smallest first parameter (less than 60) as the third device, and the location information of the third device can be considered equivalent to its real-time location information. Therefore, in scenarios where the second device corresponds to multiple collaborative devices, in this embodiment, the server can directly send the stored location information of the third device to the first device, avoiding requesting new location information from the third device, thereby improving the efficiency of the first device obtaining the location information of the third device subsequently.

[0342] Optionally, the weighting factor is determined by the second condition, allowing the server to prioritize the collaborating device with the highest battery level. The weighting factor can be a second parameter obtained by mapping the battery levels of collaborating devices according to a second preset mapping rule. For example, the second preset mapping rule defines mapping device battery levels ranging from 0% to 100% to a second parameter ranging from 0 to 10, where the second parameter is an integer.

[0343] It is understandable that the larger the second parameter is, the higher the battery life of the collaborative device. The server can use the collaborative device with the largest second parameter as the third device. Therefore, in the scenario where the second device corresponds to multiple collaborative devices, the collaborative device with higher battery life in this application embodiment can handle more messages sent by the server to request location information and can perform more positioning operations, thereby reducing the impact on the collaborative device with lower battery life and thus achieving load balancing of multiple collaborative devices.

[0344] Optionally, the weighting factor is determined by a third condition. The server can prioritize the cooperating device with the largest number of corresponding cooperating devices. The weighting factor is the third parameter, which can be equal to the number of corresponding cooperating devices.

[0345] It is understandable that the larger the third parameter is, the more collaborative devices a collaborative device corresponds to. The server will take the collaborative device with the largest third parameter as the third device. Therefore, in scenarios where the third device corresponds to multiple collaborative devices, the server can send the location information of the third device to the device that requests the location information of other collaborative devices corresponding to the third device when sending the location information of the third device to the first device, thereby saving communication costs.

[0346] Optionally, the weighting factor is determined by the fourth condition, and the server can select the cooperating device with the smallest second time interval as the device with the highest priority. The weighting factor can be a fourth parameter obtained by the server mapping the second time interval according to a second preset mapping rule. The second preset mapping rule can be equivalent to the first mapping rule or different from the first mapping rule. This application embodiment does not strictly limit this.

[0347] Understandably, the smaller the fourth parameter, the closer the time when the collaborative device establishes a collaborative relationship with the second device is to the current time. The server will take the collaborative device with the smallest fourth parameter as the third device. Therefore, in scenarios where the second device corresponds to multiple collaborative devices, the server can subsequently send the location information of the third device to the first device first to ensure the accuracy of the location information.

[0348] Optionally, the weighting factors are determined by the first to fourth conditions. For example, the server can determine the priority level of each collaborative device according to a preset condition priority rule using the weighting factors. For ease of understanding, the preset condition priority rule can be found in [link to relevant documentation]. Figure 9 , Figure 9 This is a schematic diagram of a condition priority rule provided in an embodiment of this application. For example... Figure 9 As shown, condition priority rule 90 defines the first, second, third, and fourth conditions as corresponding to the first, second, third, and fourth priority levels, respectively. The priority of the first, second, third, and fourth priority levels decreases sequentially.

[0349] The weighting factor can include a first parameter obtained based on a first condition, a second parameter obtained based on a second condition, a third parameter obtained based on a third condition, and a fourth parameter obtained based on a fourth condition. The following example, where the second device corresponds to two cooperating devices (i.e., the third device and the fourth device), and the third device is the device with the highest priority, will be used for further explanation.

[0350] Reuse Figure 5 In the illustrated embodiment, Table 2 of step S501, the weight factor S1 of the third device in Table 2 can be represented by the following formula:

[0351] S1=(α1,β1,γ1,θ1)

[0352] Where α1 is the first parameter of the third device, β1 is the second parameter of the third device, γ1 is the third parameter of the third device, and θ1 is the fourth parameter of the third device.

[0353] The weighting factor S2 of the fourth device in Table 2 can be expressed by the following formula:

[0354] S2=(α2,β2,γ2,θ2)

[0355] Where α2 is the first parameter of the fourth device, β2 is the second parameter of the fourth device, γ2 is the third parameter of the fourth device, and θ2 is the fourth parameter of the fourth device.

[0356] Since the priority levels of the first, second, third, and fourth priorities decrease sequentially, the server first compares the values ​​of α1 and α2. If α1 is less than α2 and less than the second preset threshold, the server determines that the third device has a higher priority. If α1 equals α2 or α1 is less than α2 but greater than the second preset threshold, the server then compares the values ​​of β1 and β2. If β1 is greater than β2, the server determines that the third device has a higher priority. If β1 equals β2, the server then compares the values ​​of γ1 and γ2. If γ1 is greater than γ2, the server determines that the third device has a higher priority. If γ1 equals γ2, the server then compares the values ​​of θ1 and θ2. If θ1 is less than θ2, the server determines that the third device has a higher priority.

[0357] It is understandable that, in a scenario where one coordinated device corresponds to multiple coordinated devices, the server in this application embodiment can determine the priority level of multiple coordinated devices based on the priority level corresponding to multiple conditions such as the generation time of the location information of the coordinated device, the power consumption, the number of corresponding coordinated devices, and the time of establishing a coordinated relationship with the coordinated device. Thus, when determining the coordinated device with the highest priority, at least one or more of the principles such as efficiency priority, load balancing priority, communication cost priority, and information accuracy priority are satisfied, thereby flexibly meeting different application needs.

[0358] It should be noted that the embodiments of this application do not strictly limit the conditions, number of conditions, and specific judgment logic for the server to determine the priority level of collaborative devices. The above-mentioned implementation methods related to weighting factors are merely examples.

[0359] Step S802: The server obtains the location information of the third device.

[0360] After receiving the first message and identifying the third device corresponding to the second device, the server can obtain the location information of the third device.

[0361] In one optional implementation, the server determines whether there is information in the historical location information of the stored third device whose generation time is no greater than a second preset threshold time interval from the current time.

[0362] If it exists, the server will treat this historical location information as the real-time location information of the third device. For an explanation of the historical location information and the second threshold, please refer to the corresponding description in step S801; it will not be repeated here. That is, the server can query the location information of the third device from the stored historical location information, wherein the time interval between the generation time of the third device's location information and the current time is no greater than the second preset threshold. Optionally, the server can determine the correspondence between the location information of the third device and the ID of the second device based on the ID of the second device in the first message.

[0363] If the location information is not found, the server sends an eighth message to the third device, which requests the location information of the third device. Upon receiving the eighth message, the third device performs a location operation to obtain its location information and then sends a ninth message containing that location information to the server. Optionally, for information security reasons, the eighth message may include the token of the second device. Based on the stored collaboration relationship, the third device's current Bluetooth connection status, and the second device's token, the third device determines that it is in a secure communication environment before sending its location information to the server. Optionally, the ninth message may also include the second device's token. Upon receiving the ninth message, the server queries the token information table for the second device's ID based on that token and determines the correspondence between the third device's location information and the second device's ID.

[0364] Step S803: The server sends a second message to the first device.

[0365] After obtaining the location information of the third device, the server sends a second message to the first device, which includes the location information of the third device.

[0366] In one optional implementation, the first device may send a first message containing the ID of the second device to the server using a polling communication method (i.e., the first device will send a first message to the server at preset time intervals if it does not receive a second message). After obtaining the location information of the third device, the server can determine the correspondence between the location information of the third device and the ID of the second device. In response to the ID of the second device in the first message, the server sends a second message to the first device.

[0367] In one optional implementation, the location information of the third device in the second message is the latitude and longitude information of the third device. After receiving the second message, the first device can perform reverse parsing on the latitude and longitude information of the third device to generate structured address information. For example, the structured address information can be a string of characters reflecting the name of a country, province, city, district / county, town, village, street, house number, building, etc.

[0368] Optionally, the first device may display a sixth interface, which is used to present the location points corresponding to the latitude and longitude information of the third device through a map, and / or to present the structured address information of the third device.

[0369] Optionally, the second message also includes the correspondence between the token of the third device and the location information of the third device. The first device can determine that the location information in the second message belongs to the third device based on the second message, and can display a seventh interface. The first device can present a prompt message through the seventh interface, which is used to reflect that the location information presented on the seventh interface at this time is the address information of the cooperating device corresponding to the second device.

[0370] It is understandable that when the second device becomes a coordinated device, the relationship between the second device and the first device can be regarded as a logical connection relationship. That is, after the first device requests the location information of the second device, the actual location information obtained from the server is the location information of the coordinated device corresponding to the second device.

[0371] In one optional implementation, after the second device and the third device cancel their collaboration relationship, the second device and / or the third device can send a message to the server to reflect the cancellation of their collaboration relationship. This allows the server to update the information in the stored token information table and collaboration relationship routing table in a timely manner, which helps improve the accuracy of the location information obtained by the first device.

[0372] because Figure 8 The illustrated embodiment involves the interaction of information between the first device, the third device, and the server, as well as the server's processing of various types of information. The following section will discuss... Figure 8 The illustrated embodiments are further elaborated. For examples, please refer to [link to example]. Figure 10 , Figure 10 This is a flowchart illustrating another positioning method provided in the embodiments of this application.

[0373] Step S1001: The first device sends the first message to the server.

[0374] The first message is used to request the location information of the second device. The first message includes the ID of the second device.

[0375] Step S1002: The server determines the token of the second device based on the token information table and the ID of the second device.

[0376] Step S1003: The server determines the token of the third device based on the coordination relationship routing table and the token of the second device.

[0377] Step S1004: The server sends the eighth message to the third device.

[0378] The eighth message is used to request the location information of the third device. Optionally, the eighth message includes the token of the second device.

[0379] Step S1005: The third device determines the location information of the third device.

[0380] Step S1006: The third device sends the ninth message to the server.

[0381] The ninth message includes the location information of the third device. Optionally, the ninth message may also include the token of the second device.

[0382] Step S1007: The server determines the correspondence between the location information of the third device and the ID of the second device.

[0383] Step S1008: The server sends a second message to the first device.

[0384] The second message includes the location information of the third device. Optionally, the second message may also include the token of the third device.

[0385] For detailed explanations of steps S1001 to S1008, please refer to [link / reference]. Figure 8 The explanations of the corresponding parts in steps S801 and S803 shown are not repeated here.

[0386] In summary, since the second and third devices meet the preset close proximity relationship, the location information of the third device can be equivalent to the location information of the second device. In this embodiment, the server can request the location information from the third device and send the location information of the third device to the first device when the first device requests the location information of the second device and the second device is a cooperating device. This avoids the second device from performing positioning operations that affect its battery life, thereby improving the battery life of the second device. It is more suitable for scenarios where the second device is in a low power state, suddenly loses network access, or shuts down due to power failure.

[0387] Furthermore, the server in this embodiment can also store and manage the collaborative relationships between the collaborating devices and the collaborating devices (e.g., generate a collaborative relationship routing table). This is beneficial in scenarios where the second device corresponds to multiple collaborating devices, for determining the highest priority third device corresponding to the second device based on actual needs, and sending the location information of the third device to the first device. Moreover, the server in this embodiment can satisfy at least one or more of the principles such as efficiency priority, load balancing priority, communication cost priority, and information accuracy priority when determining the highest priority collaborating device, thereby flexibly meeting different application requirements.

[0388] Understandably, compared to Figure 1C The technology shown in this application does not affect the function of the first device in actively querying the location information of the second device. That is to say, the technology shown in this application can not only improve the battery life of the second device, but also meet the user's core needs for real-time positioning.

[0389] Next, combine Figure 8and Figure 10 The illustrated embodiments describe the relevant application scenarios and user interface diagrams for those scenarios. The operations, technical terms, and technical logic involved in the scenarios listed below can be found by referring to... Figure 8 and Figure 10 The descriptions of the embodiments shown will not be repeated in specific cases.

[0390] Scenario 1: The first device displays the historical location information of the second device.

[0391] like Figure 11 As shown in (A), the first device 600 can display a user interface 601, which can be the interface of a location query application for the first device. The user interface 601 includes windows 602 to 604. Window 602 displays target devices whose location information can be queried by the first device. Window 602 includes one or more query controls, each indicating the location information of a target device. Each query control displays a pre-set image for the target device, facilitating user identification. For example, window 602 includes query control 6021, indicating the location information of a second device. Optionally, window 602 also includes query control 6022, indicating the location information of a device other than the second device. Window 602 also includes management control 6023, indicating the addition or deletion of target devices.

[0392] Window 603 is used to display the device's location information via a map, and window 604 is used to display the device's location information via text content. In an optional implementation, the second device responds to a user's selection operation on the query control 6021, displaying its location information through windows 603 and 604. Specifically, window 603 includes a map 6031 and a location identifier 6032. Map 6031 can display area names and road names on the map, for example, area names include C School, D Playground, and E Community, and road names include F Road, G Road, and H Road. Location identifier 6032 is used to identify the location of the second device on map 6031. Window 604 includes text content 6041 and control 6042. Text content 6041 indicates the area name where the second device is located; for example, text content 6041 may include the characters "within C School". Control 6042 is used to indicate the acquisition of the second device's real-time location information; for example, the indicator name of control 6042 is "Refresh". Optionally, window 604 may also include text content 6043, which indicates the time when the location information of the second device was generated. For example, text content 6043 could be the characters "2 minutes ago".

[0393] In an alternative implementation, the first device 600 may also receive a signal for... Figure 11 The selection operation in window 603 of (A) is displayed as follows: Figure 11 (B) and Figure 11 User interface 605 is shown in (C). Specifically, user interface 605 includes map 6051 and window 606. Map 6031 is subordinate to map 6051, meaning that map 6051 can display more map information than map 6031. Window 606 is used to display the device's location information through text content. Window 606 includes text content 6041 and text content 6061. Text content 6061 is used to display the structured address information corresponding to the area where the second device is located (i.e., the area in text content 6041). For example, text content 6061 may contain the characters "K Province, L City, M District, N Street". Optionally, window 606 may also include text content 6041 and identifier 6062, identifier 6062 being used to indicate the device status of the second device at the time when text content 6041 is displayed. For example, Figure 11 In (B), identifier 6062 is displayed as a WiFi icon, indicating that the second device communicated with the server via WiFi technology 2 minutes ago; Figure 11 The identifier 6062 in (C) is displayed as a mobile signal icon, which reflects that the second device established a communication connection with the server via the mobile network 2 minutes ago.

[0394] Scenario 2: At the current time, the second device is the device being coordinated, and the first device can request the current location information of the second device. See [link to example]. Figure 12 (A) and (B) in the text.

[0395] In one alternative implementation, such as Figure 12 As shown in (A), in response to user requests Figure 11 In step (A), the selection operation of control 6042 changes the text content 6041 in the user interface 601 of the first device 600 to text content 6044, which indicates the area name where the second device is located. For example, text content 6044 could be the characters "within Community E". The location of identifier 6032 in user interface 601 on map 6031 changes from School C to Community E, indicating that the second device is in Community E. Optionally, text content 6043 in user interface 601 changes to text content 6045, which indicates the generation time of the location information of the second device (actually the location information of a cooperating device (such as a third device) corresponding to the second device). For example, text content 6045 includes the characters "current time". It is understood that user interface 601 can be... Figure 8 The sixth interface mentioned in step S803 of the illustrated embodiment.

[0396] In one alternative implementation, such as Figure 12 As shown in (B), in response to user requests Figure 11 When the selection operation of control 6042 in (B) or (C) occurs, the text content 6041 in the user interface 605 of the first device 600 changes to text content 6044, and the location of the identifier 6032 on the map 6031 in the user interface 601 changes from School C to Community E. Optionally, the text content 6043 in the user interface 601 changes to text content 6045. For explanations of text content 6044, identifier 6032, and text content 6045, please refer to the previous section on... Figure 12 The explanation of (A) in the text will not be repeated here.

[0397] And, as Figure 12 In section (B), identifier 6062 is used to indicate the device status of the second device at the time indicated by text content 6044. For example, identifier 6062 is displayed as a cooperative device icon, reflecting that the second device is a cooperative device at the current time, and indicating that the location information of the second device in user window 606 and map 6051 is actually provided by a cooperative device (such as a third device) corresponding to the second device. It can be understood that user interface 605 can be... Figure 8 The seventh interface mentioned in step S803 of the illustrated embodiment.

[0398] In an alternative implementation, the first device 600 may also receive a signal for... Figure 12 The selection operation in window 603 of (A) is displayed as follows: Figure 12 User interface 605 is shown in (B) of the diagram.

[0399] In one alternative implementation, the first device 600 receives a user request... Figure 11 After the selection operation of control 6042 in (A), (B) or (C) is performed, and displayed on the first device 600 Figure 12 Interface 601 in (A) and in the display Figure 12 Before interface 605 in (B) of the first device 600 and the server can execute... Figure 10 All steps in the illustrated embodiment.

[0400] The methods provided in the embodiments of this application can be implemented, in whole or in part, by software, hardware, firmware, or any combination thereof. When implemented in software, they can be implemented, in whole or in part, in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., digital video disc (DWD), or a semiconductor medium (e.g., solid-state drive). (disk, SSD, etc.). The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit it; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A positioning method, characterized by, Applied to a server, the method comprises: receiving a first message sent by a first device, wherein the first message is used to request position information of a second device; obtaining position information of a third device, wherein the third device is a collaborative device corresponding to the second device, and the second device and the third device are devices satisfying a preset close distance relationship; sending a second message to the first device, wherein the second message comprises the position information of the third device.

2. The method of claim 1, wherein, The preset close distance relationship comprises one or more of the following relationships: connected through close distance wireless technology, wherein the close distance wireless technology comprises Bluetooth technology or mobile hotspot technology; a distance not greater than a first preset threshold.

3. The method according to claim 1 or 2, characterized in that, Before the position information of the third device is obtained, the method further comprises: determining the third device corresponding to the second device according to a collaborative relationship routing table, wherein the collaborative relationship table is used to reflect the corresponding relationship between a collaborative device and a collaborative device.

4. The method of claim 3, wherein, The second device corresponds to a plurality of collaborative devices, and the collaborative relationship routing table comprises a weight factor, wherein the weight factor is used to reflect the priority level of each collaborative device in the plurality of collaborative devices, and the third device is the collaborative device with the highest priority level in the plurality of collaborative devices.

5. The method of claim 4, wherein, The priority level of each collaborative device in the plurality of collaborative devices is determined according to one or more of the following conditions: a time interval between the generation time of the position information of the collaborative device and the current time; the power of the collaborative device; the number of collaborative devices corresponding to the second device; the time when the collaborative device establishes a corresponding relationship with the second device.

6. The method according to any one of claims 3-5, characterized in that, Before the first message sent by the first device is received, the method further comprises: receiving a third message sent by the second device and / or the third device, wherein the third message is used to represent that the third device is a collaborative device corresponding to the second device; generating the collaborative relationship routing table according to the third message.

7. The method according to any one of claims 3-5, characterized in that, Before the first message sent by the first device is received, the method further comprises: receiving a fourth message sent by the second device, wherein the fourth message comprises a token of the second device, the power of the second device, and a preselected device role of the second device; receiving a fifth message sent by the third device, wherein the fifth message comprises a token of the third device, the power of the third device, and a preselected device role of the third device, the preselected device role comprising a collaborative device or a collaborative device, and the token is used to identify the identity of the device; determining that the third device is a collaborative device corresponding to the second device according to the fourth message and the fifth message; generating the collaborative relationship routing table.

8. The method according to claim 6 or 7, characterized in that, The collaborative relationship routing table comprises the token of the second device and the token of the third device, the token of the second device is marked as the token of the negotiated device, the token of the third device is marked as the token of the negotiated device, and the token is used to identify the identity of the device.

9. The method of claim 8, wherein, Before the first message sent by the first device is received, the method further comprises: sending a sixth message to the second device, wherein the sixth message comprises a token allocated for the second device; sending a seventh message to the third device, wherein the seventh message comprises a token allocated for the third device.

10. The method of claim 9, wherein, Before the sending the sixth message to the second device, the method further comprises: receiving an eighth message sent by the second device and the third device, wherein the eighth message is used for requesting allocation of a token; allocating tokens for the second device and the third device respectively; generating a token information table, wherein the token information table is used for reflecting a correspondence between an identity ID of the second device and a token of the second device, and a correspondence between an ID of the third device and a token of the third device, the ID being used for identifying a device identity.

11. The method of claim 10, wherein, The first message comprises the ID of the second device, and the determining the third device corresponding to the second device according to the cooperative relationship routing table comprises: determining the token of the second device according to the token information table and the ID of the second device; determining the token of the third device according to the cooperative relationship routing table and the token of the second device.

12. The method according to any one of claims 1 to 11, characterized in that, The obtaining the position information of the third device comprises: querying the position information of the third device from stored historical position information, wherein a time interval between a generation time of the position information of the third device and a current time is not greater than a second preset threshold value.

13. The method according to any one of claims 1 to 11, characterized in that, The obtaining the position information of the third device comprises: sending an eighth message to the third device, wherein the eighth message is used for requesting the position information of the third device; receiving a ninth message sent by the third device, wherein the ninth message comprises the position information of the third device.

14. A positioning method characterized by, Applied to a third device, the method comprises: receiving an eighth message sent by a server, wherein the eighth message is used for requesting position information of the third device, the third device being a cooperative device corresponding to a second device, the second device and the third device being devices satisfying a preset close distance relationship; sending a ninth message to the server, wherein the ninth message comprises the position information of the third device.

15. The method of claim 2, wherein, The preset close distance relationship comprises one or more of the following relationships: connection through close distance wireless technology, wherein the close distance wireless technology comprises Bluetooth technology or mobile hotspot technology; a distance not greater than a first preset threshold value.

16. The method according to claim 14 or 15, characterized in that Before the receiving the eighth message sent by the server, the method further comprises: determining that the third device is a cooperative device corresponding to the second device.

17. The method of claim 16, wherein, The determining that the third device is a cooperative device corresponding to the second device comprises: receiving a fourth message sent by the second device, wherein the fourth message comprises a token of the second device, an electric quantity of the second device and a preselected device role of the second device; According to the fourth message, the token of the third device, the power of the third device and the pre-selected device role of the third device, the third device is determined as a negotiation device corresponding to the second device.

18. The method of claim 17, wherein, After the third device is determined as a negotiation device corresponding to the second device, the method further comprises: displaying a first interface, wherein the first interface is used to inquire whether the third device is determined as a collaborative device of the second device; receiving a selection operation for the first interface, wherein the selection operation is used to confirm that the third device is determined as a collaborative device of the second device.

19. The method according to any one of claims 16-18, characterized by, After the third device is determined as a negotiation device corresponding to the second device, the method further comprises: sending a third message to the server, wherein the third message is used to reflect that the third device is a collaborative device corresponding to the second device.

20. The method of claim 16, wherein, The determination that the third device is a negotiation device corresponding to the second device comprises: sending a fifth message to the server, wherein the fifth message comprises the token of the third device, the power of the third device and the pre-selected device role of the third device, and the pre-selected device role comprises a collaborative device or a collaborative device; receiving a third message sent by the server, wherein the third message is used to reflect that the third device is a collaborative device corresponding to the second device.

21. The method according to claim 19 or 20, characterized in that, The third message comprises the token of the second device and the token of the third device, the token of the second device is marked as the token of the negotiated device, the token of the third device is marked as the token of the negotiation device, and the token is used to identify the identity of the device.

22. The method according to any one of claims 16-21, characterized by, After the third device is determined as a negotiation device corresponding to the second device, the method further comprises: displaying a second interface, wherein the second interface is used to reflect that the third device has become a collaborative device corresponding to the second device.

23. The method according to any one of claims 16-22, characterized by, After the third device is determined as a negotiation device corresponding to the second device, the method further comprises: displaying a third interface, wherein the third interface comprises a cancel collaborative control, and the cancel collaborative control is used to confirm whether to cancel the collaborative relationship between the second device and the third device; receiving a selection operation for the cancel collaborative control; canceling the collaborative relationship between the second device and the third device.

24. The method of any one of claims 16-23, wherein, Before the third device is determined as a negotiation device corresponding to the second device, the method further comprises: sending a tenth message to the server, wherein the tenth message is used to request to assign a token and generate a token information table, the token information table is used to reflect the correspondence between the identity ID of the third device and the token of the third device, and the ID is used to identify the identity of the device.

25. The method of any one of claims 16-24, wherein, Before the determining that the third device is a corresponding collaborative device of the second device, the method further includes: receiving an input connection establishment operation, wherein in response to the connection establishment operation, establishing a communication connection with the second device.

26. The method of any one of claims 16-25, wherein, Before the determining that the third device is a corresponding collaborative device of the second device, the method further includes: displaying a fourth interface in a case that a collaborative function is turned on, wherein the fourth interface includes role options, the role options include at least two of a collaborative device, a coordinated device, and automatic matching, and the collaborative function is a function that the second device and the third device can be collaborative devices or coordinated devices of each other; receiving a selection operation on one of the role options; determining a preselected device role of the third device according to the selection operation.

27. A positioning method, characterized by Applied to a second device, the method includes: receiving a fifth message sent by a third device, wherein the fifth message includes a token of the third device, a power of the third device, and a preselected device role of the third device, the preselected device role includes a collaborative device or a coordinated device, the token is used to identify a device identity, the second device and the third device are devices that meet a preset proximity relationship; determining that the third device is a corresponding negotiation device of the second device according to the fifth message, a token of the second device, a power of the second device, and a preselected device role of the second device.

28. A server, comprising: A device includes a transceiver, a processor, and a memory, the memory is used to store a computer program, and the processor invokes the computer program to execute the method in any one of claims 1-13.

29. An electronic device, comprising: A device includes a transceiver, a processor, and a memory, the memory is used to store a computer program, and the processor invokes the computer program to execute the method in any one of claims 14-27.

30. A computer storage medium, comprising, The computer storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-27.