Data processing method, electronic equipment, chip system and storage medium
The generation and transmission of key data by electronic devices solves the problem that third-party accessory devices cannot be searched offline, realizes the reporting of location information of offline devices, and reduces development costs and hardware requirements.
Patent Information
- Application Number
- CN202411708370.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-08-05
AI Technical Summary
In the prior art, accessories and equipment produced by third-party manufacturers cannot realize the ability to search offline equipment, which makes it difficult to retrieve when lost. The development and adaptation workload is large and the cost is high, and some accessories and equipment have low computing power and cannot meet the computing power requirements.
With the help of the computing power of electronic devices, offline devices are generated in advance to find the required key data and passed to the accessories equipment. The accessories equipment does not need to adapt to the protocol requirements of the electronic device manufacturer, and the location information is reported based on the key data.
It realizes the offline equipment search capability of third-party accessories equipment, saves development adaptation work, is suitable for accessories equipment with low computing power, and ensures compliance and safety.
Smart Images

Figure CN120434629A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic equipment, and in particular to a data processing method, electronic equipment, a chip system, and a storage medium. Background Art
[0002] Many mobile phone manufacturers now offer accessories such as Bluetooth headsets and smart bracelets that support offline device search. Even if these accessories can't connect to the internet, they can still report their location to nearby internet-connected relay devices (such as smartphones), helping users find their lost accessories.
[0003] However, currently, most mobile phone manufacturers can only support offline device search for self-developed accessory devices. For accessory devices produced by third-party manufacturers (such as OEM partners), which can be called third-party accessory devices or non-self-developed accessory devices, offline device search capabilities cannot be achieved, resulting in difficulty in recovering third-party accessory devices when they are lost. The reason is that if third-party manufacturers' accessory devices want to achieve offline device search capabilities, they need to implement the corresponding password or key algorithm in accordance with the mobile phone manufacturer's protocol requirements to ensure compliance. This not only requires a large workload for development and adaptation, but is also time-consuming and costly. In addition, some low-end accessory devices have low computing power and cannot meet the computing power requirements for adapting passwords or key algorithms, making them unsuitable for this method. Summary of the Invention
[0004] The embodiments of the present application provide a data processing method, electronic device, chip system and storage medium, which can use the computing power of the electronic device to generate the key data required for offline device search in advance and pass it to the accessory device. In this way, the accessory device does not need to adapt to the protocol requirements of the electronic device manufacturer, and can also report location information based on the key data transmitted by the electronic device, that is, realize the ability to search for offline devices.
[0005] In a first aspect, an embodiment of the present application provides a data processing method that can be applied to an electronic device, the method comprising: in response to an operation to start a short-range communication application, displaying an application interface of the short-range communication application, the application interface of the short-range communication application including first identification information of a first accessory device; in response to a selection operation for the first identification information in the application interface, establishing a short-range communication connection with the first accessory device; based on the short-range communication connection, receiving device authentication data from the first accessory device, the device authentication data being used to indicate that the first accessory device is authorized to join a device search network; authenticating the first accessory device based on the device authentication data; in response to the first accessory device being authenticated successfully, generating key data; sending the key data to the first accessory device; the key data being used by the first accessory device to generate a first broadcast message when the communication connection with the electronic device is disconnected, the first broadcast message being used to report the location information of the first accessory device.
[0006] It can be seen that in this technical solution, the key data required for offline device search can be generated in advance with the help of the computing power of the electronic device, and passed to the accessory device, so that the accessory device does not need to adapt to the protocol requirements of the electronic device manufacturer (such as the password or key algorithm required by the protocol), and can also report location information based on the key data transmitted by the electronic device, that is, to achieve the ability to find offline devices. This method allows third-party accessory devices to achieve the ability to find offline devices, and not only saves the development and adaptation work of third-party manufacturers, but is also applicable to accessory devices with low computing power. In addition, only when the accessory device is authenticated, that is, it is determined that the accessory device is authorized to join the search device network, will the key data required for offline device search be generated and passed to the accessory device. In this way, only authorized accessory devices can achieve the ability to find offline devices, ensuring compliance.
[0007] In conjunction with the first aspect, in one possible approach, in response to the first accessory device being authenticated successfully, key data may be generated by: In response to the first accessory device being authenticated successfully, a prompt message is output on a display interface of the electronic device, the prompt message prompting confirmation of adding the first accessory device to the device search network; and in response to detecting a confirmation instruction input in response to the prompt message, key data is generated. Thus, in this technical solution, the key data required for offline device search is generated and transmitted to the accessory device only after it is determined that the accessory device is authorized to join the device search network and has been permitted by the user to join the device search network. This allows only authorized and user-permitted accessory devices to implement offline device search capabilities, ensuring compliance and meeting user needs.
[0008] In conjunction with the first aspect, in one possible approach, key data may be generated by: generating a base key; based on the base key, generating key data comprising M derived keys, where M is a positive integer; wherein the base key is also used to bind to the second identification information of a first accessory device; generating a first broadcast message based on the location information of the first accessory device and a derived key selected from the key data; and indicating that the location information is associated and stored with the second identification information of the first accessory device based on the derived key carried in the first broadcast message. As can be seen, the derived key generated based on the base key can be used to identify the accessory device, which facilitates associating and storing reported location information with the correct accessory device identification information, thereby ensuring the accuracy of the recorded location information of the accessory device. Furthermore, the broadcast message is generated based on a derived key selected from the M derived keys, so the key used to generate the broadcast message is variable, thereby improving the security of location reporting.
[0009] In conjunction with the first aspect, in one possible embodiment, the method further includes: in response to a launch operation for a device search application, displaying an application interface of the device search application, wherein the application interface of the device search application includes third identification information of the first accessory device; in response to a selection operation for the third identification information, obtaining location information of the first accessory device from a server, wherein the location information of the first accessory device is included in a first broadcast message, wherein the first broadcast message is reported to the server via a device search network; and displaying the location information of the first accessory device in the application interface of the device search application. Thus, when it is necessary to search for an accessory device, the location information reported by the accessory device can be obtained from the server, and the obtained location information of the accessory device can be displayed in the application interface, so that the user can intuitively see the location information of the accessory device, thereby helping the user find the accessory device.
[0010] In conjunction with the first aspect, in one possible embodiment, the electronic device is in a device search network, and the method further includes: receiving a second broadcast message broadcast by a second accessory device, the second broadcast message being generated based on key data and location information corresponding to the second accessory device when the second accessory device is disconnected from the communication connection; and reporting the second broadcast message to a server, the second broadcast message being used to indicate that the location information of the second accessory device is associated and stored with the identification information of the second accessory device based on the key associated with the second broadcast message. Thus, the electronic device can receive the broadcast message from the accessory device and report the broadcast message from the accessory device to the server, that is, reporting the location information of the accessory device to the server. This facilitates offline search of the accessory device, that is, helps the user of the accessory device find the accessory device.
[0011] In conjunction with the first aspect, in one possible embodiment, the method further includes: establishing an encrypted channel with the first accessory device based on the short-range communication connection; and sending the key data to the first accessory device may be performed by encrypting and transmitting the key data to the first accessory device via the encrypted channel. Thus, the key data required for offline device search is encrypted and transmitted to the accessory device. This ensures the security of the key data transmission and prevents malicious tampering with the key data, which could result in the accessory device's location information being unable to be successfully reported to the server, thereby preventing the accessory device from being searched.
[0012] In a second aspect, an embodiment of the present application provides another data processing method that can be applied to a first accessory device, the method comprising: in response to detecting that the communication connection between the first accessory device and the electronic device is disconnected, determining the current location information of the first accessory device; generating a first broadcast message based on key data and location information, the key data being received from the electronic device based on the communication connection between the first accessory device and the electronic device, and the key data being generated by the electronic device; broadcasting the first broadcast message, the first broadcast message being used to report the location information of the first accessory device.
[0013] It can be seen that in this technical solution, the key data is generated by the electronic device and transmitted to the accessory device. That is, with the help of the computing power of the electronic device, the key data required for offline device search is generated in advance and transmitted to the accessory device. In this way, the accessory device does not need to adapt to the protocol requirements of the electronic device manufacturer (such as the password or key algorithm required by the protocol), and can also report location information based on the key data transmitted by the electronic device, that is, to achieve the ability to find offline devices. This method allows third-party accessory devices to also achieve the ability to find offline devices, and not only saves the development and adaptation work of third-party manufacturers, but is also applicable to accessory devices with low computing power.
[0014] In conjunction with the second aspect, in one possible embodiment, the method further includes: sending device authentication data to the electronic device based on the communication connection between the first accessory device and the electronic device, where the device authentication data is used by the electronic device to authenticate the first accessory device; wherein the key data is received from the electronic device based on the communication connection between the first accessory device and the electronic device when the first accessory device is successfully authenticated. This indicates that the key data required for offline device search is only received from the electronic device when the accessory device is successfully authenticated. This ensures that only authenticated accessory devices can implement offline device search, thus ensuring compliance.
[0015] In conjunction with the second aspect, in one possible approach, the key data includes M derived keys, each of which is generated based on a base key, where M is a positive integer. Generating the first broadcast message based on the key data and location information may involve: selecting a derived key from the M derived keys included in the key data; and generating the first broadcast message based on the selected derived key and the location information. The base key is used to bind to the second identification information of the first accessory device, and the first broadcast message is used to indicate the derived key associated with the first broadcast message, thereby associating and storing the location information with the second identification information of the first accessory device. As can be seen, the derived key generated based on the base key can be used to identify the accessory device, facilitating the storage of reported location information associated with the correct accessory device's identification information, thereby ensuring the accuracy of the recorded location information of the accessory device. Furthermore, the broadcast message is generated based on a derived key selected from the M derived keys, allowing the key used to generate the broadcast message to be variable, thereby enhancing the security of location reporting.
[0016] In conjunction with the second aspect, in one possible embodiment, the method further includes: receiving a write instruction input by a first object; and writing device authentication data to a first accessory device based on the write instruction; wherein the first object and the second object have established an authorization relationship for the first accessory device, the first object being the manufacturer of the first accessory device, and the second object being the manufacturer of the electronic device. Thus, the accessory device will only write the device authentication data if authorized by the manufacturer of the electronic device. This ensures that only authorized accessory devices can perform offline device search, thus ensuring compliance.
[0017] In a third aspect, the present application provides an electronic device, which includes: one or more processors, a memory and a communication interface; the communication interface is used to interact with other devices, the memory is coupled to the one or more processors, and the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute: in response to an operation to start a short-range communication application, display an application interface of the short-range communication application, the application interface of the short-range communication application includes first identification information of a first accessory device; in response to a selection operation for the first identification information, establish a short-range communication connection with the first accessory device; based on the short-range communication connection, receive device authentication data from the first accessory device; the device authentication data is used to indicate that the first accessory device is authorized to join the device search network; based on the device authentication data, authenticate the first accessory device; in response to the first accessory device passing the authentication, generate key data; send the key data to the first accessory device; the key data is used for the first accessory device to generate a first broadcast message when the communication connection with the electronic device is disconnected, and the first broadcast message is used to report the location information of the first accessory device.
[0018] In combination with the third aspect, in one possible manner, the one or more processors call the computer instructions to enable the electronic device to execute: in response to the first accessory device being authenticated, outputting a prompt message on the display interface, the prompt message being used to prompt whether to confirm adding the first accessory device to the search device network; in response to detecting a confirmation instruction input for the prompt message, generating key data.
[0019] In combination with the third aspect, in one possible manner, the one or more processors call the computer instructions to enable the electronic device to execute: generate a basic key; based on the basic key, generate key data; the key data includes M derived keys, M is a positive integer; wherein the basic key is also used to bind with the second identification information of the first accessory device; the first broadcast message is generated based on the location information of the first accessory device and the derived key selected from the key data; the first broadcast message is used to indicate the derived key associated with the first broadcast message, and the location information is associated with the second identification information of the first accessory device and stored.
[0020] In combination with the third aspect, in one possible manner, the one or more processors call the computer instructions to cause the electronic device to execute: in response to an operation to open a search device application, display an application interface of the search device application, the application interface of the search device application including third identification information of the first accessory device; in response to a selection operation for the third identification information, obtain the location information of the first accessory device from the server, the location information of the first accessory device is carried in a first broadcast message, and the first broadcast message is reported to the server via the search device network; and display the location information of the first accessory device in the application interface of the search device application.
[0021] In combination with the third aspect, in one possible manner, the one or more processors call the computer instructions to enable the electronic device to execute: receiving a second broadcast message broadcast by a second accessory device, the second broadcast message being generated by the second accessory device based on the key data and location information corresponding to the second accessory device when the communication connection is disconnected; reporting the second broadcast message to the server; the second broadcast message is used to indicate that the location information of the second accessory device is associated with the identification information of the second accessory device and stored based on the key associated with the second broadcast message.
[0022] In combination with the third aspect, in one possible manner, the one or more processors call the computer instructions to enable the electronic device to execute: establishing an encrypted channel with the first accessory device based on a short-range communication connection; and encrypting and transmitting key data to the first accessory device through the encrypted channel.
[0023] In a fourth aspect, the present application provides another electronic device, which includes: one or more processors, a memory and a communication interface; the communication interface is used to interact with other devices for information exchange, the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to execute: in response to detecting that the communication connection between the first accessory device and the electronic device is disconnected, determine the current location information of the first accessory device; generate a first broadcast message based on key data and location information, the key data is received from the electronic device based on the communication connection between the first accessory device and the electronic device, and the key data is generated by the electronic device; broadcast the first broadcast message, the first broadcast message is used to report the location information of the first accessory device.
[0024] In combination with the fourth aspect, in one possible manner, the one or more processors call the computer instructions to enable the electronic device to execute: sending device authentication data to the electronic device based on the communication connection between the first accessory device and the electronic device; the device authentication data is used by the electronic device to authenticate the first accessory device; wherein, the key data is received from the electronic device based on the communication connection between the first accessory device and the electronic device when the first accessory device is authenticated.
[0025] In combination with the fourth aspect, in one possible manner, the key data includes M derived keys, the M derived keys are generated based on the basic key, M is a positive integer, and the one or more processors call the computer instructions to enable the electronic device to execute: select a derived key from the M derived keys included in the key data; generate a first broadcast message based on the selected derived key and location information; wherein the basic key is used to bind to the second identification information of the first accessory device, and the first broadcast message is used to indicate the derived key associated with the first broadcast message, and the location information is associated with the second identification information of the first accessory device and stored.
[0026] In combination with the fourth aspect, in one possible manner, the one or more processors call the computer instructions to cause the electronic device to execute: receiving a write instruction input by the first object; writing device authentication data to an accessory device based on the write instruction; wherein the first object and the second object have established an authorization relationship for the first accessory device, the first object is a production object of the first accessory device, and the second object is a production object of the electronic device.
[0027] In a fifth aspect, the present application provides a chip system, which includes one or more processors, a memory and an interface circuit, wherein the memory, the interface circuit and the one or more processors are interconnected by lines, and the memory stores program instructions; when the program instructions are executed by the processor, the chip system implements the method described in the first aspect above, or implements the method described in the second aspect above.
[0028] In a sixth aspect, the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the method described in the first aspect above, or implements the method described in the second aspect above.
[0029] In a seventh aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to implement the method described in the first aspect above, or the method described in the second aspect above. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1 A schematic diagram of the architecture of a data processing system exemplarily provided in an embodiment of the present application;
[0031] Figures 2A-2D A schematic diagram of an interface for manually triggering a communication connection provided as an example in an embodiment of the present application;
[0032] Figure 3A This is an exemplary data interaction process between an electronic device and an accessory device provided in an embodiment of the present application;
[0033] Figure 3B An exemplary process for reporting the location of an accessory device is provided in an embodiment of the present application;
[0034] Figure 4A and Figure 4B A schematic diagram of an application interface for a search device application provided as an example in an embodiment of the present application;
[0035] Figure 5 A flowchart of a data processing method exemplarily provided in an embodiment of the present application;
[0036] Figure 6 This is an exemplary process for obtaining authorization for an accessory device provided in an embodiment of the present application;
[0037] Figure 7 A flowchart of another data processing method provided as an example in an embodiment of the present application;
[0038] Figure 8 A flowchart of another data processing method exemplified in an embodiment of the present application;
[0039] Figure 9 A flowchart of another data processing method exemplified in an embodiment of the present application;
[0040] Figure 10 A schematic diagram of the software structure of an electronic device exemplarily provided in an embodiment of the present application;
[0041] Figure 11 The following is a schematic diagram of the hardware structure of an electronic device exemplified in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0043] The terms "first", "second", "third", etc. in the embodiments of the present application are distinguished from different objects, rather than being used to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a series of steps or units are included, or optionally, steps or units that are not listed are also included, or optionally, other steps or units inherent to these processes, methods, products or devices are also included. The terms "one embodiment" or "some embodiments" etc. mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in the differences in the embodiments of the present application are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in another way.
[0044] In the embodiments of this application, words such as "exemplary," "for example," or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary," "for example," or "for example" in the embodiments of this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary," "for example," or "for example" is intended to present the relevant concepts in a concrete manner.
[0045] In addition, "at least one" means one or more, and "more" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b and c can mean: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.
[0046] The term "accessory device" in the following embodiments of this application may refer to various additional smart devices used to enhance or expand the functionality of electronic devices (such as smartphones). Accessory devices may include wearable devices, which are portable smart devices that can be worn directly on the body or integrated into the user's clothing or accessories. The following are some common accessory devices:
[0047] Bluetooth headphones connect to devices like smartphones, tablets, and computers via Bluetooth technology for wireless audio transmission. They can offer one or more of the following functions: wireless listening to music, answering calls, watching videos, and other multimedia content; as well as noise reduction, touch controls, and voice assistants.
[0048] A smartwatch is a portable, multi-functional smart device typically worn on the wrist. Some smartwatches have independent operating systems and networking capabilities. They can provide one or more of the following functions: displaying notifications (such as text messages, incoming calls, and emails), weather forecasts, and calendar reminders; monitoring health (such as heart rate, steps, and sleep quality); navigation, mobile payments, and music control.
[0049] A smart bracelet is a simplified version of a smartwatch, typically worn on the wrist, and focuses on health and fitness monitoring. It can record fitness data (steps, running trajectory, calories burned, etc.), monitor heart rate and sleep quality, and provide daily functions such as notifications, alarms, and sedentary reminders.
[0050] Smart glasses are wearable devices that integrate augmented reality (AR) or virtual reality (VR) technology, displaying virtual information through a headset or glasses. They can implement one or more of the following functions: augmented reality display, which overlays virtual information on real scenes; head tracking, which adjusts the display content based on the user's line of sight; voice assistant, photo or video shooting, navigation, and other functions.
[0051] Third-party accessories and equipment: usually refers to unofficial products used to replace or supplement the original accessories of electronic equipment. They can be accessories and equipment produced by third-party manufacturers (such as OEM partners), and can also be called non-self-developed accessories and equipment.
[0052] Bluetooth: Also known as Classic Bluetooth, it is a low-cost, low-power, short-range wireless communication technology that allows devices to transmit data and voice without cables. It can connect and communicate wirelessly through a point-to-point network, enabling fast pairing and data transfer between devices.
[0053] BLE (Bluetooth Low Energy): Bluetooth Low Energy is a short-range, low-cost, interoperable wireless technology designed to extend classic Bluetooth technology.
[0054] ZigBee: A low-power, low-cost, low-data-rate, short-range wireless communication technology. ZigBee is a wireless communication protocol based on the IEEE 802.15.4 standard, focusing on low-data-rate, short-range wireless sensor network applications.
[0055] Key: A string or value used to encrypt and decrypt data.
[0056] User interface (UI): It is the media interface for interaction and information exchange between applications or operating systems and users. It realizes the conversion between the internal form of information and the form acceptable to users. The user interface is source code written in a specific computer language such as Java and extensible markup language (XML). The interface source code is parsed and rendered on the electronic device, and ultimately presented as content that the user can recognize. The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operations that is displayed graphically. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, widgets, etc. displayed on the display screen of an electronic device.
[0057] The data processing method provided in the embodiment of the present application can be applied to the scenario of offline search for accessory devices. The data processing method provided in the embodiment of the present application can generate the key data required for offline device search in advance with the help of the computing power of electronic devices (such as smart phones), and pass it to the accessory device, so that the accessory device does not need to adapt to the protocol requirements of the electronic device manufacturer (such as the password or key algorithm required by the protocol), and can also report location information based on the key data transmitted by the electronic device, that is, to achieve the ability to find offline devices. The use of the data processing method provided in the embodiment of the present application can allow third-party accessory devices to also achieve the ability to find offline devices, and not only saves the development and adaptation work of third-party manufacturers, but is also applicable to accessory devices with low computing power.
[0058] First, the system architecture involved in this application is explained.
[0059] The data processing method provided in the embodiment of the present application can be applied to Figure 1 In the data processing system shown. Figure 1 The data processing system shown may include, but is not limited to, a first electronic device 101, one or more first accessory devices 102, a server 103, and a search device network 10, which may include one or more second electronic devices 104 and one or more second accessory devices 105. The first electronic device 101 and the second electronic device 104 may be devices with network connection capabilities, and may establish a communication connection with the server 103 via the network. The first accessory device 102 and the second accessory device 105 may be wearable devices with short-range communication capabilities. For example, the first accessory device 102 and the second accessory device 105 may communicate via Bluetooth. In one possible embodiment, one or more of the first electronic device 101, the first accessory device 102, and the server 103 may also be included in the search device network.
[0060] Figure 1 The number and form of the devices are used for example only and do not constitute a limitation on the embodiments of the present application. Figure 1 The first electronic device 101 and the second electronic device 104 are exemplarily smart phones. In one possible embodiment, the first electronic device 101 and the second electronic device 104 can also be tablet computers, PDAs, laptop computers and other devices that can establish connections with accessory devices, but are not limited thereto. For another example, Figure 1The second accessory device 105 is exemplarily a Bluetooth headset or a smart bracelet. In one possible embodiment, the second accessory device 105, like the first accessory device 102, may also be other wearable devices such as smart glasses, smart watches, head-mounted displays, etc., but is not limited thereto. The server 103 may provide an offline device search service for electronic devices and accessory devices. In one possible embodiment, the server 103 may be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, and other services.
[0061] In one possible implementation, the device search network 10 is a device search network for a second entity (e.g., mobile phone manufacturer X). The first electronic device 101 and the second electronic device 104 are both manufactured by the second entity, meaning that the first electronic device 101 and the second electronic device 104 are manufactured by the same manufacturer. The first accessory device 102 is manufactured by the first entity, but the first and second entities are different, meaning that the first accessory device 102 and the first electronic device 101 are manufactured by different manufacturers. For example, the first accessory device 102 may be a third-party accessory device. The second accessory device 105 in the device search network 10 may be manufactured by the second entity, or it may be an accessory device not generated by the second entity, for example, it may be a third-party accessory device. If the second accessory device 105 is not generated by the second entity, it joins (or accesses) the device search network 10 after obtaining authorization from the second entity. The second accessory device that obtains authorization from the second entity is configured with device authentication data issued by the second entity.
[0062] In another possible implementation, the first accessory device 102 may also be manufactured by the same manufacturer as the first electronic device 101 , that is, the first electronic device 101 and the first accessory device 102 are manufactured by the same manufacturer.
[0063] The following combination Figure 1 The data processing system shown takes the first electronic device 101 as a smart phone and the first accessory device 102 as an example of Bluetooth communication to exemplify the application scenario of the embodiment of the present application and the data processing method provided by the embodiment of the present application.
[0064] like Figure 2AAs shown, the first electronic device 101 can display the interface of the main screen, which includes multiple application icons, such as a live application icon, a gallery application icon, a weather application icon, a stock application icon, a calculator application icon, a settings application icon 21, an email application icon, a Facebook application icon, a browser application icon, a music application icon, a video application icon, an application store icon, etc. A page indicator is also included below the multiple application icons to indicate the positional relationship between the currently displayed page and other pages. The first electronic device 101 can detect the user's selection operation 22 (such as a click operation) for the settings application icon 21. In response to the selection operation 22, the first electronic device 101 can display Figure 2B The Settings app's user interface is shown.
[0065] like Figure 2B As shown, the user interface of the settings application includes multiple interface objects, such as a search box, a "WLAN (Wireless Local Area Network)" option, a "Bluetooth" option 23, a "Mobile Network" option, etc. The first electronic device 101 can detect a user's selection operation 24 (such as a click operation) for the "Bluetooth" option 23. In response to the selection operation 24, the first electronic device 101 can display Figure 2C The Bluetooth application interface shown in the figure is as follows. Figure 2C As shown, the Bluetooth application interface includes multiple interface objects, such as "Bluetooth switch 25", "device name Y1 of the first electronic device 101", etc. When the "Bluetooth switch 25" is in the off state, the first electronic device 101 can detect the user's trigger operation 26 (such as a click operation) on the "Bluetooth switch 25". In response to the trigger operation 26, the first electronic device 101 can turn the "Bluetooth switch 25" on and turn on Bluetooth to search for nearby devices that can be paired with Bluetooth. Based on the search results, the first electronic device 101 can Figure 2C The Bluetooth application interface shown in the figure is updated as follows Figure 2D The Bluetooth application interface shown.
[0066] like Figure 2D As shown, the updated Bluetooth application interface displays the name options of surrounding devices that can be paired with Bluetooth, including, for example, the "Mobile Phone 1" name option, the "Mobile Phone 2" name option, the "Accessory 1" name option 27, the "Accessory 2" name option, etc. In the case where the accessory device corresponding to the name "Accessory 1" is an accessory device that needs to establish a Bluetooth connection with the first electronic device 101 (i.e., the first accessory device 102), the first electronic device 101 can detect the user's selection operation 28 (e.g., a click operation) for the "Accessory 1" name option 27. In response to the selection operation 28, the first electronic device 101 can establish a Bluetooth communication connection with the first accessory device 102 (i.e., the accessory device corresponding to the name "Accessory 1"). Figure 3AAs shown, the first electronic device 101 can receive device authentication data from the first accessory device 102 based on the established Bluetooth communication connection, and the device authentication data is used to indicate that the first accessory device 102 is authorized to join the search device network 10 of the second object. The first electronic device 101 can authenticate the first accessory device 102 based on the device authentication data. In the case where the first accessory device 102 passes the authentication, it can be confirmed that the first accessory device 102 is authorized to join the search device network 10 of the second object, that is, it is confirmed that the method provided in the embodiment of the present application can be used to allow the first accessory device 102 to report its location information based on the search device network 10 to achieve the ability to search for offline devices. At this time, the first electronic device 101 can generate the key data required for offline device search and send the key data to the first accessory device 102. Accordingly, the first accessory device 102 receives the key data from the first electronic device 101 and stores the key data.
[0067] When the Bluetooth communication connection between the first accessory device 102 and the first electronic device 101 is disconnected, Figure 3B As shown, the first accessory device 102 can determine its current location information and generate a first broadcast message based on the key data and the location information. The first accessory device 102 then broadcasts the first broadcast message. Upon receiving the first broadcast message, the second electronic device 104 in the device search network 10 can report the first broadcast message to the server 103. The server 103 records the location information reported by the first accessory device 102 based on the first broadcast message. In one possible implementation, if the second accessory device 105 in the device search network 10 also has network connectivity, the second accessory device 105 can also receive the first broadcast message broadcast by the first accessory device 102 and report the first broadcast message to the server 103.
[0068] It can be seen that in the embodiment of the present application, the key required for offline device search is generated by the electronic device (such as a smart phone). This can better ensure compliance with the protocol implementation of the electronic device manufacturer (such as a mobile phone manufacturer). This does not impose a large burden on the accessory manufacturer, and the hardware requirements for the accessory device are also relatively low.
[0069] In the case where the first accessory device 102 is lost and the user of the first electronic device 101 and the first accessory device 102 needs to find the first accessory device 102, the first electronic device 101 can display a search result in response to the user's operation to open the device search application. Figure 4A The application interface (application interface can also be called user interface) of the search device application is shown. Figure 4AAs shown, the first application interface displays the name options of the devices whose locations can be found, including, for example, the "Y1" name option, the "Accessory 1" name option 41, the "Accessory 2" name option, etc. In the case where the accessory device corresponding to the name "Accessory 1" is the accessory device whose location needs to be found (i.e., the first accessory device 102), the first electronic device 101 can detect the user's selection operation 42 (such as a click operation) for the "Accessory 1" name option 41. In response to the selection operation 42, the first electronic device 101 can obtain the location information of the first accessory device 102 from the server 103. Based on the obtained location information of the first accessory device 102, the first electronic device 101 can Figure 4A The application interface shown is updated as follows Figure 4B The application interface shown in the figure. Figure 4B As shown, the updated application interface may include the location information of the first accessory device 102 displayed in text form, for example, Figure 4B "X1 City X2 District X3 Street X4 Community" shown in 43; it may also include the location information of the first accessory device 102 displayed in a graphical form, for example, Figure 4B The location icon on the electronic map shown in FIG44. The location information of the first accessory device 102 displayed in the application interface of the search device application can help the user successfully locate the location of the first accessory device 102, thereby helping the user find the first accessory device 102.
[0070] In a possible implementation, the first electronic device 101 may also display the following when detecting a user triggering operation on a Bluetooth application icon: Figure 2C For example, if a user presses the Bluetooth application icon in the drop-down menu bar for a long time, the following Bluetooth application interface is displayed: Figure 2C The first electronic device 101 may also detect that the user inputs a voice command for instructing to turn on Bluetooth, turn on Bluetooth to search for devices that can be paired with Bluetooth around, and directly display the Bluetooth application interface based on the search results. Figure 2D The Bluetooth application interface shown. The voice command is, for example, "Turn on Bluetooth."
[0071] In a possible implementation, the first electronic device 101 may display a Figure 4A The first electronic device 101 may display the icon of the search device application in the user interface of the setting application. The first electronic device 101 may also display the icon of the search device application in the case of detecting the user inputting a voice instruction for instructing to search for a device. Figure 4AAlternatively, the location information of the corresponding device is obtained from the server 103 according to the voice command, and the location information is directly displayed based on the obtained location information. Figure 4B The application interface of the Find Device application is shown.
[0072] The data processing method provided in the embodiments of the present application is described in detail below.
[0073] See Figure 5 , Figure 5 A flowchart of a data processing method provided in an embodiment of the present application is provided. The method may include but is not limited to the following steps:
[0074] 501 : In response to an activation operation for a short-distance communication application, the first electronic device displays an application interface of the short-distance communication application, where the application interface of the short-distance communication application includes first identification information of a first accessory device.
[0075] The short-range communication application may be a communication application based on short-range wireless communication technology, and the short-range wireless communication technology may be classic Bluetooth, low-power Bluetooth BLE, ZigBee, etc.
[0076] In some embodiments, the user's operation to start the short-range communication application can be to start the short-range communication function corresponding to the short-range communication application, such as turning on Bluetooth. In response to the start-up operation, the first electronic device can turn on the short-range communication function to search for devices around that can establish a short-range communication connection (such as a Bluetooth connection), and display the application interface of the short-range communication application based on the search results. The application interface can display the identification information of the devices around that can establish a short-range communication connection. The application interface can be, for example, Figure 2D The user interface shown.
[0077] If the device capable of establishing a short-range communication connection includes a first accessory device, the application interface may include first identification information of the first accessory device. In one possible implementation, the first identification information may be a device model, device name, etc. The first accessory device may be an accessory device that needs to establish a short-range communication connection with the first electronic device.
[0078] Optionally, the turning-on operation may be a voice command or a gesture operation. For example, the voice command may be "turn on Bluetooth," and the gesture operation may be a click operation on the Bluetooth switch in the application interface.
[0079] In some embodiments, the first accessory device and the first electronic device may be produced by different manufacturers (or manufacturers). For example, the first accessory device may be a third-party accessory device. Since the first accessory device is different from the production object to which the first electronic device belongs, it is usually impossible for the first accessory device to implement offline device search for the corresponding password or key algorithm according to the protocol requirements of the production object of the first electronic device, and therefore cannot implement the offline device search capability. The data processing method provided in the embodiment of the present application can enable the first accessory device to achieve offline device search capability.
[0080] 502 : The first electronic device establishes a short-range communication connection with the first accessory device in response to a selection operation on the first identification information.
[0081] The first identification information of the first accessory device is displayed in the application interface of the short-range communication application. The first electronic device can detect a user's selection operation of the first identification information and, in response to the selection operation, establish a short-range communication connection with the first accessory device. For example, the first electronic device establishes a Bluetooth Low Energy (BLE) connection with the first accessory device.
[0082] In one possible implementation, the selection operation may be a gesture operation or a voice command. For example, if the first identification information is "Accessory 1," the voice command may be "Pair with Accessory 1," "Connect Accessory 1," etc. The gesture operation may be, for example, a click operation.
[0083] 503 : The first accessory device sends device authentication data to the first electronic device based on the short-range communication connection.
[0084] The first accessory device sends device authentication data to the first electronic device based on the short-range communication connection between the first accessory device and the first electronic device. The device authentication data is used to indicate that the first accessory device is authorized to join the search device network of the second object, for example Figure 1 In the data processing system shown, the second object in the search device network 10 can be a production object of the first electronic device. The device authentication data is also used by the first electronic device to authenticate the first accessory device to determine whether the first accessory device is authorized to join the search device network of the second object. Only after confirming that the first accessory device is authorized to join the search device network of the second object can the method provided in the embodiment of the present application be used to allow the first accessory device to report its location information based on the search device network of the second object to achieve offline device search capabilities.
[0085] In some embodiments, the first accessory device may receive a write instruction from a first object and write device authentication data of the first accessory device into the first accessory device based on the write instruction. The first object and the second object have established an authorization relationship for the first accessory device, the first object is a manufacturer of the first accessory device, and the second object is a manufacturer of the first electronic device.
[0086] In one possible implementation, Figure 6 As shown, the first object may submit an application to the second object to join the device search network. The application may be used to apply to add the first accessory device to the device search network of the second object. Only after the application is passed can the first accessory device subsequently realize the offline device search capability based on the method provided in the embodiment of the present application. When the second object passes the application to join the device search network, that is, authorizes the first accessory device to join the device search network of the second object, the second object may generate device authentication data for the first accessory device and issue the device authentication data to the first object. The first object receives the device authentication data issued by the second object and writes the device authentication data into the first accessory device. The device authentication data may be a key, a digital certificate, etc., and the key may be generated according to the first key algorithm.
[0087] In one possible implementation, the application for joining the device search network may be used to apply to add the first accessory device to the device search network of the second object. In this case, the application for joining the device search network may carry the device type of the first accessory device (such as a Bluetooth headset, smart watch, etc.), the unique identification information of the first accessory device (such as a device serial number), etc. In this way, the device authentication data issued by the second object is only used to indicate that the first accessory device is authorized to join the device search network of the second object. In another possible implementation, the application for joining the device search network may be used to apply to add all accessory devices under the target device model to the device search network of the second object. The target device model is the device model of the first accessory device. In this case, the application for joining the device search network may carry the device type (such as a Bluetooth headset, smart watch, etc.), the target device model, etc. In this way, the device authentication data issued by the second object is used to indicate that all accessory devices under the target device model (including the first accessory device) are authorized to join the device search network of the second object.
[0088] In some embodiments, after the first electronic device successfully establishes a short-range communication connection with the first accessory device, the first electronic device may send a device authentication instruction to the first accessory device based on the communication connection, and the first accessory device responds to the device authentication instruction and sends device authentication data to the first electronic device based on the communication connection.
[0089] 504 : The first electronic device receives device authentication data from the first accessory device based on the short-range communication connection.
[0090] The first electronic device may receive the device authentication data sent by the first accessory device based on the short-range communication connection between the first accessory device and the first electronic device.
[0091] 505 : The first electronic device authenticates the first accessory device based on the device authentication data.
[0092] The first electronic device authenticates the device authentication data. If the device authentication data authentication passes, it is determined that the first accessory device authentication passes, and step 506 and subsequent related steps can be executed; if the device authentication data authentication fails, it is determined that the first accessory device authentication fails, indicating that it cannot be determined whether the first accessory device is authorized to join the device search network, and the process can be directly ended at this time.
[0093] In some embodiments, when the device authentication data is a key generated according to a first key algorithm, the first electronic device can generate a key for the first accessory device according to the corresponding key algorithm. If the key generated by the first electronic device matches the key indicated by the device authentication data, it can be confirmed that the device authentication data has been authenticated, that is, the first accessory device has been authenticated. For example, the key indicated by the device authentication data is based on the device serial number of the first electronic device and is generated according to the first key algorithm. The first electronic device also has the first key algorithm written in it. The first key algorithm can be the key algorithm used by the second object authorization device to join the search device network; the first accessory device can send its device serial number and device authentication data to the first electronic device together. The first electronic device generates a key according to the first key algorithm based on the received device serial number, and compares the key generated by the first electronic device with the key indicated by the device authentication data. If the two are consistent, it can be confirmed that the device authentication data has been authenticated.
[0094] In other embodiments, when the device authentication data is a digital certificate, the digital certificate may include a digital signature of the second object. The digital certificate may be a digital certificate issued by the second object when authorizing the device to join the search device network. The first electronic device may verify the digital signature on the digital certificate. If the digital signature verification succeeds, the device authentication data may be confirmed to have been authenticated, i.e., the first accessory device may have been authenticated.
[0095] 506 : In response to the first accessory device being authenticated successfully, the first electronic device generates key data.
[0096] If the first accessory device passes authentication, i.e., if it is determined that the first accessory device is authorized to join the device search network, key data required for offline device search is generated for the first accessory device. This key data may be generated based on a second key algorithm, which may be implemented based on the protocol requirements of the second object and corresponds to the key algorithm used for offline device search.
[0097] In some embodiments, the first electronic device may generate a basic key, and based on the basic key, generate M derived keys, where the M derived keys are key data, and M is a positive integer.
[0098] In one possible implementation, the base key may be a randomly generated key, and the M derived keys may be iteratively generated based on the base key and a second key algorithm. Optionally, the M derived keys may be iteratively generated based on the base key, time (or clock) information, and a second key algorithm. For example, if the key used by an accessory device to report its location needs to be updated daily, and the battery life of the accessory device can support a maximum of three days of use, then three derived keys may be generated to meet the key update requirements of the accessory device. Assuming that the base key is K and the current time is 2024 / 11 / 1, the base key K and the time 2024 / 11 / 1 can be combined (for example, spliced), and the second key algorithm is used to process the combination result to obtain a first derived key. The first derived key can be the key that the accessory device should use to report its location on 2024 / 11 / 1; the first derived key and the time 2024 / 11 / 2 are combined, and the second key algorithm is used to process the combination result to obtain a second derived key. The second derived key can be the key that the accessory device should use to report its location on 2024 / 11 / 2; the second derived key and the time 2024 / 11 / 3 are combined, and the second key algorithm is used to process the combination result to obtain a third derived key. The third derived key can be the key that the accessory device should use to report its location on 2024 / 11 / 3.
[0099] In one possible implementation, the basic key may be used to bind to the second identification information of the first accessory device. The second identification information may be unique identification information of the first accessory device, such as the device serial number or the device MAC address. The first electronic device may report the basic key to the server, and the server may bind the basic key to the second identification information of the first accessory device so that the server can identify, based on the basic key, that the broadcast message is for reporting the location information of the first accessory device.
[0100] In some embodiments, the key data may include only one key, which may be used to bind the second identification information of the first accessory device. The first electronic device may report the key to the server, and the server may bind the key to the second identification information of the first accessory device so that the server can identify, based on the key, that the broadcast message is used to report the location information of the first accessory device.
[0101] In some embodiments, when the first accessory device is authenticated, the first electronic device can output a prompt message on the display interface (also referred to as a user interface), and the prompt message can be used to prompt the user whether to confirm adding the first accessory device to the search device network of the second object. The first electronic device detects the instruction input by the user in response to the prompt message, and when a confirmation instruction is detected, that is, the user agrees to add the first accessory device to the search device network, it generates the key data required for offline device search and sends the key data to the first accessory device. Conversely, when a cancellation instruction is detected, that is, the user does not agree to add the first accessory device to the search device network, the process can be ended directly. This gives the user the option of choosing whether to allow the first accessory device to implement the offline device search capability.
[0102] Optionally, the prompt information may also be used to prompt the user that the first accessory device is authorized to join the search device network of the second object, so that the user can know the authentication result of the first accessory device.
[0103] 507 : The first electronic device sends key data to the first accessory device.
[0104] The first electronic device may send key data to the first accessory device based on the short-range communication connection between the first accessory device and the first electronic device. The key data is used by the first accessory device to generate a first broadcast message when the communication connection with the first electronic device is disconnected. The first broadcast message is used to report the location information of the first accessory device.
[0105] In some embodiments, if the first accessory device is authenticated, the first electronic device can establish an encrypted channel with the first accessory device based on the established short-range communication connection. After generating key data, the first electronic device can encrypt and transmit the key data to the first accessory device through the encrypted channel, thereby ensuring the security of the key data transmission.
[0106] Accordingly, the first accessory device receives the key data from the first electronic device based on the short-range communication connection between the first accessory device and the first electronic device.
[0107] 508. The first accessory device stores the key data.
[0108] In some embodiments, after the key data is stored, the first accessory device may send feedback information to the first electronic device based on the established short-range communication connection, indicating that the first accessory device has successfully joined the second object's device search network. The first electronic device may receive the feedback information and display it on a display interface to inform the user of the result of the first accessory device joining the device search network.
[0109] Only when the first accessory device successfully joins the second object's search device network can it report its location information through the second object's search device network based on the key data sent by the first electronic device, thereby realizing the offline device search capability.
[0110] 509 : In response to detecting that the communication connection between the first accessory device and the electronic device is disconnected, the first accessory device determines the current location information of the first accessory device.
[0111] In some embodiments, when it is detected that the communication connection between the first accessory device and the electronic device is disconnected, the first accessory device may determine location information of its current location through a configured positioning device.
[0112] 510. The first accessory device generates a first broadcast message based on the key data and the location information. The first broadcast message can be used to report the location information of the first accessory device.
[0113] In some embodiments, the first accessory device may generate a first broadcast message based on the key data and location information in a message format required by the second object, so that only devices generated or authorized by the second object can receive and report the first broadcast message.
[0114] In one possible implementation, as described above, the key data may include M derived keys, each of which is generated based on a base key. The first accessory device may select a derived key from the M derived keys included in the key data and generate a first broadcast message based on the selected derived key and the location information.
[0115] Optionally, when there is no selection requirement for the M derived keys, a derived key can be randomly selected from the M derived keys. When there is a selection requirement for the M derived keys, a derived key that meets the requirement needs to be selected from the M derived keys. For example, it is necessary to select the corresponding derived key according to time. In combination with the example described above, the key data includes the first derived key, the second derived key, and the third derived key, which are the keys that the accessory device should use to report its location on 2024 / 11 / 1, 2024 / 11 / 2, and 2024 / 11 / 3, respectively. Assuming that the time to generate the broadcast message is 2024 / 11 / 3, the third derived key should be selected.
[0116] Optionally, the selected derived key and location information may be used as a data body to generate a first broadcast message in the message format required by the second object. The first broadcast message may be used to indicate that the location information is associated and stored with the second identification information of the first accessory device based on the derived key associated with the first broadcast message, i.e., the derived key in the data body of the first broadcast message.
[0117] In one possible implementation, when the key data includes only one key, the location information can be encrypted using the key to obtain encrypted location information. This encrypted location information is then used as the data body to generate a first broadcast message in the message format required by the second object. This improves the security of the location information and prevents malicious tampering. The first broadcast message can be used to indicate the key associated with the first broadcast message, i.e., the key used to encrypt the location information, and to associate the location information with the second identification information of the first accessory device.
[0118] 511. The first accessory device broadcasts a first broadcast message.
[0119] In some embodiments, the first accessory device can broadcast a first broadcast message to the outside based on its short-range communication function (such as low-power Bluetooth BLE), so that when a device in the search device network receives the first broadcast message, it reports the first broadcast message to the server.
[0120] 512. The second electronic device receives the first broadcast message.
[0121] In some embodiments, the short-range communication function of the second electronic device may be enabled, and the second electronic device may receive the first broadcast message broadcast by the first accessory device based on the short-range communication function without establishing a communication connection (or pairing) with the first accessory device. The second electronic device may be an electronic device that is near the first accessory device in the search device network.
[0122] 513. The second electronic device reports the first broadcast message to the server.
[0123] In some embodiments, the second electronic device may report the first broadcast message to the server through a network.
[0124] Correspondingly, the server receives the first broadcast message reported by the second electronic device.
[0125] In a possible implementation, if the second accessory device in the search device network also has network connection capability, the second accessory device may also receive the first broadcast message broadcast by the first accessory device and report the first broadcast message to the server.
[0126] 514. The server records the location information of the first accessory device based on the first broadcast message.
[0127] In some embodiments, a server obtains information from the data body of a first broadcast message. If the obtained information includes a derived key and location information, the server may process the derived key using a corresponding inverse key algorithm to extract the base key used to generate the derived key. For example, based on the example described above, assuming the derived key obtained from the first broadcast message is a first derived key obtained by combining the base key and the time 2024 / 11 / 2 and processing the combined result using a second key algorithm, the server may then process the first derived key using an inverse key algorithm corresponding to the second key algorithm to obtain the base key and the time 2024 / 11 / 2. If the server has previously bound the base key corresponding to the first accessory device to the second identification information of the first accessory device, the server may, based on the extracted base key, determine that the location information obtained from the first broadcast message is the location information reported by the first accessory device. In this case, the server may associate the location information obtained from the first broadcast message with the second identification information of the first accessory device and store it in association with the second identification information of the first accessory device.
[0128] In some embodiments, when a server obtains information from the data body of a first broadcast message and the obtained information includes encrypted location information, the server may decrypt the encrypted location information using pre-stored keys corresponding to each accessory device until the encrypted location information is successfully decrypted to obtain the location information. If the server has previously bound the key corresponding to the first accessory device to the second identification information of the first accessory device, the server may determine, based on the key that successfully decrypted the encrypted location information, that the decrypted location information is the location information reported by the first accessory device. In this case, the server may associate the decrypted location information with the second identification information of the first accessory device and store it in association with it.
[0129] It can be seen that in the embodiment of the present application, the key data required for offline device search can be generated in advance with the help of the computing power of the electronic device and passed to the accessory device. In this way, the accessory device does not need to adapt to the protocol requirements of the electronic device manufacturer (such as the password or key algorithm required by the protocol), and can also report location information through the search device network based on the key data transmitted by the electronic device, that is, to achieve the ability to search for offline devices. This method allows third-party accessory devices to achieve the ability to search for offline devices, and not only saves the development and adaptation work of third-party manufacturers, but is also applicable to accessory devices with low computing power. In addition, only when the accessory device is authenticated, that is, when it is determined that the accessory device is authorized to join the search device network, will the key data required for offline device search be generated and passed to the accessory device. In this way, only authorized accessory devices can achieve the ability to search for offline devices, ensuring compliance.
[0130] The above describes the process of an electronic device generating key data required for offline device search and the location information reported by an accessory device. The following describes the process of searching for an accessory device.
[0131] See Figure 7 , Figure 7 A flowchart of another data processing method provided in an embodiment of the present application is provided. The method may include but is not limited to the following steps:
[0132] 701 : In response to an opening operation for a search device application, the first electronic device displays an application interface of the search device application, where the application interface of the search device application includes third identification information of the first accessory device.
[0133] In the case where the first accessory device is lost and the first electronic device and the user of the first accessory device need to find the first accessory device, the first electronic device can detect the user's opening operation for the device search application, and in response to the opening operation, display the application interface of the device search application, in which the identification information of the device that can be found is displayed, and the identification information may include the third identification information of the first accessory device. For example, the application interface is Figure 4A The user interface shown, Figure 4A The "Accessory 1" in the user interface is the third identification information of the first accessory device. Optionally, the third identification information of the first accessory device may be the same as or different from the first identification information of the first accessory device described above.
[0134] 702 : In response to a selection operation on the third identification information, the first electronic device sends a device search request for the first electronic device to the server.
[0135] The device search request may be used to request to query the location information of the first accessory device. The device search request may carry the second identification information of the first accessory device, such as the device serial number.
[0136] Correspondingly, the server receives a device search request from the first electronic device.
[0137] 703 : The server queries the location information of the first accessory device in response to the device search request.
[0138] Based on the second identification information of the first accessory device carried in the device search request, the server can query the location information stored in association with the second identification information. This associated location information is the location information of the first accessory device to be obtained. The process for reporting the location information of the first accessory device is described above and is not repeated here.
[0139] 704. The server returns the location information of the first accessory device to the first electronic device.
[0140] Correspondingly, the first electronic device receives the location information of the first accessory device returned by the server.
[0141] 705 , the first electronic device displays the location information of the first accessory device in an application interface of a search device application.
[0142] When the location information of the first accessory device is obtained from the server, the first electronic device can display the location information of the first accessory device in the form of text in the application interface of the search device application, or can display the location information of the first accessory device in the form of graphics (such as a map) in the application interface of the search device application.
[0143] For example, based on the location information of the first accessory device obtained from the server, the first electronic device can Figure 4A The application interface shown is updated as follows Figure 4B The application interface shown in the figure. Figure 4B As shown, the updated application interface may include the location information of the first accessory device displayed in text form, that is, Figure 4B "X1 City X2 District X3 Street X4 Community" shown in 43; it may also include the location information of the first accessory device displayed in a graphical form, that is, Figure 4B The location icon on the electronic map shown in FIG44. The location information of the first accessory device displayed in the application interface of the search device application can help the user successfully locate the location of the first accessory device, thereby helping the user find the first accessory device.
[0144] In some embodiments, the first accessory device may generate a first broadcast message based on key data, location information, and other specific information. Other specific information includes, but is not limited to, power information, location acquisition time information, and the like. In this way, after the first broadcast message is reported to the server through the search device network, the server may store the location information and other specific information (such as power information) of the first accessory device. After receiving the device search request for the first accessory device, the server may return the location information of the first accessory device and other specific information to the first electronic device. The first electronic device may display the location information and other specific information of the first accessory device in the application interface of the search device application. For example, Figure 4B As shown, the application interface may include the power information of the first accessory device displayed in a graphical form, that is, Figure 4B The battery icon shown in 45 may also include the battery information of the first accessory device displayed in text form, that is, the text "60%" next to the battery icon 45.
[0145] Optionally, the application interface of the device search application may also display the location update time of the first accessory device, for example, Figure 4B The location update time "2024 / 10 / 1-12:00" shown in 47 may be returned to the first electronic device along with the location information. The location update time may be the time when the first accessory device reported the location collection, or the time when the server recorded the location information of the first accessory device.
[0146] Optionally, a navigation control (e.g. Figure 4B 46 ), a sound playback control, a notification control, etc. When a trigger operation for the navigation control is detected, the first electronic device can jump to the map application and perform route planning based on the location information of the first accessory device to guide the user to the location of the first accessory device.
[0147] In some embodiments, the first electronic device is in a search device network, that is, the first electronic device is an electronic device in the search device network, and the first electronic device can also implement the function of the above-mentioned second electronic device, that is, report the broadcast message of the accessory device to the server.
[0148] In one possible implementation, a first electronic device receives a second broadcast message broadcast by a second accessory device. The second accessory device may be an accessory device that has successfully joined the search device network of the second object. The second broadcast message is generated by the second accessory device based on the key data and location information corresponding to the second accessory device when the short-range communication connection with the corresponding electronic device (which may be an electronic device produced by the second object) is disconnected. The key data may be generated by the corresponding electronic device and transmitted to the second accessory device. The series of processes involved can refer to the relevant descriptions in steps 501-512 and will not be repeated here. Upon receiving the second broadcast message, the first electronic device reports the second broadcast message to the server. The second broadcast message is used to indicate that the location information of the second accessory device is associated with the identification information of the second accessory device based on the key associated with the second broadcast message, so that subsequent users can find the second accessory device. The series of processes involved can refer to the relevant descriptions in steps 513-514 and steps 701-705 and will not be repeated here.
[0149] Next, a possible process of performing data processing on an electronic device is introduced in combination with the interaction of the internal modules of the electronic device. In some embodiments, the electronic device may be the first electronic device corresponding to the above embodiment. Figure 8 As shown, it may include but is not limited to the following steps:
[0150] 801. A detection module detects a user's activation operation for a short-range communication function.
[0151] The short-range communication function may be implemented based on a short-range wireless communication technology, for example, it may be a Bluetooth communication function.
[0152] Optionally, the turning-on operation may be a voice command or a gesture operation. For example, the voice command may be "turn on Bluetooth," and the gesture operation may be a click operation on the Bluetooth switch in the user interface.
[0153] 802. The detection module sends a first message to the short-range communication module.
[0154] The first message may be used to notify the short-range communication module to perform a device search.
[0155] 803 : The short-range communication module performs a device search in response to the first message.
[0156] The short-range communication module can search for surrounding devices that can establish short-range communication connections, including electronic devices (such as mobile phones, tablets), accessory devices (such as Bluetooth headsets, smart watches), etc.
[0157] 804 , the short-range communication module sends the search results to the display module.
[0158] The search results may include identification information of nearby devices that can establish short-range communication connections, such as device names or device models. If the accessory device that needs to establish a communication connection is within the connection range, the search results may include the target identification information of the accessory device that needs to establish a communication connection.
[0159] 805 , the display module displays content on a user interface based on the search results, and the user interface displays target identification information of the accessory device that needs to establish a communication connection.
[0160] 806 , the detection module detects a selection operation of the user on the target identification information in the user interface.
[0161] Optionally, the selection operation may be a gesture operation or a voice command, etc. For example, if the target identification information is "Accessory 1", the voice command may be "Pair with Accessory 1", "Connect Accessory 1", etc. The gesture operation may be, for example, a click operation.
[0162] 807. The detection module sends a second message to the short-range communication module.
[0163] The second message may be used to notify the short-range communication module to establish a short-range communication connection with the accessory device corresponding to the target identification information.
[0164] 808 : The short-range communication module establishes a short-range communication connection with the accessory device corresponding to the target identification information in response to the second message.
[0165] Optionally, a Bluetooth Low Energy (BLE) connection may be established with an accessory device corresponding to the target identification information.
[0166] 809. The short-range communication module sends a third message to the authentication module.
[0167] After the accessory device corresponding to the target identification information successfully establishes a short-range communication connection, the short-range communication module can send a third message to the authentication module. The third message can be used to indicate that the short-range communication connection is successfully established and can also be used to notify the authentication module to generate a device authentication instruction.
[0168] 810. The authentication module generates a device authentication instruction in response to the third message.
[0169] The device authentication instruction may be used to instruct the accessory device to report device authentication data.
[0170] 811. The authentication module sends a fourth message to the short-range communication module. The fourth message carries a device authentication instruction.
[0171] The fourth message may be used to notify the short-range communication module to send the device authentication instruction to the accessory device based on the short-range communication connection.
[0172] 812 : The short-range communication module sends a device authentication instruction to the accessory device based on the short-range communication connection in response to the fourth message.
[0173] 813 , the short-range communication module receives device authentication data sent by the accessory device based on the short-range communication connection.
[0174] The device authentication data can be used to indicate that the accessory device is authorized to join the search device network of the second object, which can be the production object of the first electronic device. The relevant process of the accessory device obtaining the device authentication data can be referred to the above description and will not be repeated here.
[0175] 814. The short-range communication module sends device authentication data to the authentication module.
[0176] 815, the authentication module authenticates the device authentication data.
[0177] Optionally, the correctness and compliance of the device authentication data can be authenticated.
[0178] 816. The authentication module sends a fifth message to the short-range communication module.
[0179] If the device authentication data is authenticated successfully, the authentication module may send a fifth message to the short-range communication module, which may be used to notify the short-range communication module to establish an encrypted channel with the accessory device based on the short-range communication connection.
[0180] 817 , the short-range communication module establishes an encrypted channel with the accessory device based on the short-range communication connection in response to the fifth message.
[0181] 818. The authentication module sends a sixth message to the display module.
[0182] When the device authentication data is authenticated successfully, the authentication module may send a sixth message to the display module, which may be used to notify the display module to output prompt information on the display interface.
[0183] 819. The display module outputs prompt information on the user interface in response to the sixth message.
[0184] The prompt information may be used to prompt the user that the accessory device may join the device search network, and may be used to inquire whether the user agrees that the accessory device may join the device search network.
[0185] 820. The detection module detects a confirmation instruction input by the user in response to the prompt information in the user interface.
[0186] The confirmation instruction may be used to indicate that the user agrees to the accessory device joining the device discovery network.
[0187] 821. The detection module sends a seventh message to the key processing module.
[0188] When it is detected that the user agrees that the accessory device joins the device search network, the detection module may send a seventh message to the key processing module. The seventh message may be used to notify the key processing module to generate key data.
[0189] 822. The key processing module generates key data in response to the seventh message.
[0190] If the device authentication data is authenticated, that is, it is determined that the accessory device establishing the short-range communication connection is authorized to join the device search network, and the user agrees that the accessory device joins the device search network, key data required for offline device search can be generated for the accessory device.
[0191] In some embodiments, the key data may be generated based on a second key algorithm, which may be implemented based on the protocol requirements of the second object. The offline device searches for the corresponding key algorithm. Optionally, the first electronic device may generate a base key and, based on this base key, generate M derived keys, which are the key data. This base key may be used to bind to the second identification information of the accessory device.
[0192] In a possible implementation, the base key may be a randomly generated key, and the M derived keys may be iteratively generated based on the base key and a second key algorithm.
[0193] 823. The key processing module sends an eighth message to the short-range communication module. The eighth message carries key data.
[0194] The eighth message may be used to notify the short-range communication module to send the key data to the accessory device.
[0195] 824 , the short-range communication module transmits the key data in an encrypted manner to the accessory device through an encryption channel in response to the eighth message.
[0196] Optionally, the short-range communication module may decrypt and encrypt the key data based on an encryption algorithm agreed upon during the encryption channel establishment process, and then transmit the encrypted key data to the accessory device.
[0197] The key data can be used by the accessory device to generate a first broadcast message when the accessory device is disconnected from the first electronic device. The first broadcast message can be used to report the location information of the accessory device. The first broadcast message can be received by a device in the device search network and then reported to the server. The server can record the location information reported by the accessory device based on the first broadcast message. The key data required for offline device search is transmitted to the accessory device in an encrypted manner, which ensures the transmission security of the key data and ensures that the location information of the accessory device can be successfully reported to the server.
[0198] In some embodiments, the detection module detects a user's operation to open a device search application and sends a message to the display module; the display module displays the application interface of the device search application in response to the message, and the application interface of the device search application includes the identification information of the accessory device. The detection module detects a user's selection operation on the representation information and sends a message to the device search module; the device search module generates a device search request in response to the message and sends the device search request to the network communication module. The device search request can be used to request the location information of the accessory device. The network communication module sends the device search request to the server and receives the location information of the accessory device returned by the server in response to the device search request. The network communication module sends the location information of the accessory device to the display module, and the display module displays the location information of the accessory device in the application interface of the device search application.
[0199] In some embodiments, the short-range communication module receives a second broadcast message broadcast by a second accessory device. The second broadcast message may be generated based on the key data and location information corresponding to the second accessory device when the second accessory device disconnects the short-range communication connection with the corresponding electronic device (which may be an electronic device produced by the second object). The key data may be generated by the corresponding electronic device and transmitted to the second accessory device. The short-range communication module sends the second broadcast message to the network communication module, and the network communication module reports the second broadcast message to the server. The second broadcast message can be used to indicate that the location information of the second accessory device is associated with the identification information of the second accessory device based on the key associated with the second broadcast message to store so that subsequent users can find the second accessory device.
[0200] For implementation methods that are not exhaustively described in the above steps, please refer to the relevant description in the previous method embodiment, which will not be repeated here.
[0201] In some embodiments, the electronic device may correspond to the first accessory device in the above embodiment. Figure 9 As shown, it may include but is not limited to the following steps:
[0202] 901. A short-range communication module establishes a short-range communication connection with an electronic device.
[0203] Optionally, a low-power Bluetooth BLE connection may be established with an electronic device.
[0204] 902 : The short-range communication module receives a device authentication instruction from the electronic device based on the short-range communication connection.
[0205] 903. The short-range communication module sends a device authentication instruction to the authentication module.
[0206] 904 , the authentication module obtains device authentication data from the storage module in response to the device authentication instruction.
[0207] The device authentication data can be used to indicate that the accessory device is authorized to join the search device network of the second object, which can be the manufacturer of the electronic device. The process of the first accessory device obtaining the device authentication data can be referred to the above description and will not be repeated here.
[0208] In some embodiments, an input module receives a write instruction input by a first object and sends the write instruction to a data processing module. The write instruction carries device authentication data. The data processing module parses the write instruction, obtains the device authentication data, and sends the device authentication data to a storage module. The storage module stores the device authentication data. The first object and the second object have established an authorization relationship for a first accessory device. The first object may be a manufacturer of the first accessory device. The specific implementation of establishing an authorization relationship between the first object and the second object for the first accessory device can be referred to the relevant description above.
[0209] 905 , the authentication module sends a first notification message to the short-range communication module, where the first notification message carries device authentication data.
[0210] The first notification message may be used to notify the short-range communication module to send device authentication data to the electronic device. The device authentication data may be used by the electronic device to authenticate the first accessory device.
[0211] 906 , the short-range communication module sends device authentication data to the electronic device based on the short-range communication connection.
[0212] 907 , the short-range communication module establishes an encrypted channel with the electronic device based on the short-range communication connection.
[0213] 908. The short-range communication module receives the key data encrypted and transmitted by the electronic device through the encryption channel.
[0214] Among them, the key data may include the key required for offline device search, and the key data can be generated by the electronic device when the device authentication data is authenticated, that is, it is determined that the accessory device establishing the short-range communication connection is authorized to join the device search network, and the user agrees that the accessory device joins the device search network.
[0215] 909. The short-range communication module sends the encrypted key data to the data processing module.
[0216] 910. The data processing module decrypts the encrypted key data to obtain the key data.
[0217] Optionally, the data processing module may decrypt the encrypted key data based on a decryption algorithm agreed upon during the encryption channel establishment process to obtain the key data.
[0218] 911. The data processing module sends key data to the storage module.
[0219] 912. The storage module stores the key data.
[0220] 913 , when the communication connection with the electronic device is disconnected, the positioning module determines the current location information of the first accessory device.
[0221] 914. The positioning module sends the location information to the data processing module.
[0222] 915. The data processing module obtains key data from the storage module.
[0223] When the communication connection with the electronic device is disconnected, the data processing module obtains the key data from the storage module.
[0224] 916. The data processing module generates a broadcast message based on the key data and the location information.
[0225] Optionally, the key data includes M derived keys, each of which is generated based on the base key. The data processing module may select a derived key from the M derived keys included in the key data and generate a broadcast message based on the selected derived key and the location information. The base key may be bound to the identification information of the first accessory device, and the broadcast message may be used to indicate the derived key associated with the broadcast message, with the location information associated with the identification information of the first accessory device and stored.
[0226] 917. The data processing module sends a second notification message to the short-range communication module. The second notification message carries a broadcast message.
[0227] The second notification message may be used to notify the short-range communication module to broadcast the broadcast message.
[0228] 918. The short-range communication module broadcasts the broadcast message.
[0229] The short-range communication module broadcasts the broadcast message to the outside, so that when a device in the device search network receives the first broadcast message, it reports the first broadcast message to the server, and the server records the location information of the first accessory device based on the first broadcast message.
[0230] For implementation methods that are not exhaustively described in the above steps, please refer to the relevant description in the previous method embodiment, which will not be repeated here.
[0231] For example, the software structure of the electronic device in the embodiment of the present application is introduced below. The electronic device may be a device such as the first electronic device or the second electronic device corresponding to the above embodiment, or an accessory device such as the first accessory device or the second accessory device corresponding to the above embodiment.
[0232] Optionally, the software structure of the electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The following describes the software structure of the electronic device using the layered architecture of the Android system as an example.
[0233] like Figure 10 As shown, the layered architecture of electronic devices can divide software into several layers, each with clear roles and divisions of labor. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into the application layer, application framework layer, and kernel layer from top to bottom.
[0234] The application layer may include a series of application packages, and the application packages may include camera, gallery, video playback, system settings, map, call and other applications. In the embodiment of the present application, when the electronic device is a device corresponding to the first electronic device or the second electronic device in the previous embodiment, the application layer may also include a display module, a short-range communication application, a device search application, etc. The display module can be used to control the output content of the user interface, such as outputting the identification information of the device that can establish a short-range communication connection, outputting prompt information, outputting the identification information of the device that can perform device search, etc. The short-range communication application is associated with the short-range communication function and can be used to achieve short-range communication connections with other devices, as well as data interaction based on short-range communication connections, etc. The device search application is associated with the device search function and can be used to interact with the user regarding device search, etc.
[0235] In the embodiment of the present application, when the electronic device is an accessory device such as the first accessory device or the second accessory device in the above embodiment, the application layer may further include a short-range communication application, etc. The short-range communication application is associated with the short-range communication function and can be used to achieve a short-range communication connection with other devices, exchange data based on the short-range communication connection, and broadcast messages to the outside world.
[0236] The application framework layer provides an application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0237] The application framework layer may include a window manager. The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, and more.
[0238] The application framework layer can also include a view system, a notification manager, and so on.
[0239] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0240] The notification manager enables applications to display notification information in the status bar, which can be used to convey informational messages and disappear automatically after a short stay without user interaction.
[0241] In an embodiment of the present application, when the electronic device is a device such as the first electronic device or the second electronic device corresponding to the above embodiments, the application framework layer may further include a detection module, a storage module, an authentication module, a short-range communication module, a key processing module, and the like. Among them, the detection module can be used to detect the activation operation for the short-range communication function, detect the user's selection operation for the device identification information displayed on the user interface, and the like. The storage module can be used to store data, including key algorithms, key data, and the like. The authentication module can be used to authenticate the device authentication data of the accessory device, and the like. The short-range communication module can be used to implement the short-range communication function, which may include: establishing a short-range communication connection with the accessory device, sending data to the accessory device based on the short-range communication connection, receiving data from the accessory device based on the short-range communication connection, and the like. The short-range communication module may be a Bluetooth module. The key processing module can be used to generate key data required to find the device, and the like.
[0242] In the case where the electronic device is an accessory device such as the first accessory device or the second accessory device corresponding to the above embodiment, the application framework layer may further include a storage module, an authentication module, a short-range communication module, a positioning module, a message generation module, and the like. The storage module may be used to store data, including device authentication data, key data, and the like. The authentication module may be used for processing associated with device authentication data, for example, verifying the legitimacy of device authentication data, retrieving device authentication data from the storage module, and the like. The short-range communication module may be used to implement a short-range communication function, which may include: establishing a short-range communication connection with an electronic device, sending data to an electronic device (such as a first electronic device) based on a short-range communication connection, receiving data from an electronic device based on a short-range communication connection, broadcasting messages to the outside, and the like. The short-range communication module may be a Bluetooth module. The positioning module may be used for positioning to determine the location information of the device. The message generation module may be used to generate broadcast messages, and the like, for example, generate broadcast messages based on key data and location information.
[0243] In some embodiments, the application framework layer may further include a network communication module, an internal communication module, etc. In the case where the electronic device corresponds to the first electronic device or the second electronic device in the above embodiments, the network communication module may be used to communicate and interact with the server, such as sending a device search request to the server and receiving the location information of the accessory device sent by the server. The internal communication module may be used to implement information exchange between modules within the electronic device.
[0244] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, storage driver, processor driver, communication driver, etc.
[0245] It should be noted that the various functional modules included in the above software structure are merely exemplary and do not constitute a specific limitation on the software architecture of the electronic device of this application. In other embodiments, the various functional modules included in the above software structure may be more or less, and this application does not impose any limitation on this. Although the embodiments of this application are described using the Android system as an example, the basic principles are also applicable to electronic devices based on operating systems such as iOS or Windows.
[0246] It should be understood that in the embodiments of the present application, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a PDA, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in transportation safety, a wireless terminal in a smart city, a wireless terminal in a smart home, a personal digital assistant (PDA), etc., and the embodiments of the present application are not limited to this.
[0247] For example, the hardware structure of the electronic device in the embodiment of the present application is introduced below. The electronic device can be a device such as the first electronic device or the second electronic device corresponding to the above embodiment, or an accessory device such as the first accessory device or the second accessory device corresponding to the above embodiment.
[0248] like Figure 11 As shown, the electronic device 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, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0249] The processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. In the embodiment of the present application, when the electronic device is a device corresponding to the first electronic device or the second electronic device in the foregoing embodiment, the processor can generate key data, verify device authentication data, etc. When the electronic device is an accessory device corresponding to the first accessory device or the second accessory device in the foregoing embodiment, the processor can generate broadcast messages based on key data and location information, etc.
[0250] The NPU is a neural network computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in electronic devices, such as image recognition, face recognition, speech recognition, and text comprehension.
[0251] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0252] The wireless communication function of the electronic device can be implemented through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor. In the embodiment of the present application, when the electronic device is a device corresponding to the first electronic device or the second electronic device in the above embodiment, it can communicate and interact with the server based on the mobile communication or wireless communication function, such as obtaining the location information of the accessory device from the server, reporting the broadcast information of the accessory device to the server, etc. It can also establish a short-range communication connection with the accessory device based on the short-range communication function (such as Bluetooth) included in the wireless communication function of the electronic device, send data to the accessory device based on the short-range communication connection, receive data from the accessory device based on the short-range communication connection, etc. When the electronic device is an accessory device corresponding to the first accessory device or the second accessory device in the above embodiment, it can establish a short-range communication connection with the electronic device (such as the first electronic device) based on the short-range communication function (such as Bluetooth), send data to the electronic device based on the short-range communication connection, receive data from the electronic device based on the short-range communication connection, etc. Messages can be broadcast based on the short-range communication function (such as Bluetooth) included in the wireless communication function.
[0253] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0254] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0255] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as WiFi networks), Bluetooth (BT), BLE broadcasting, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (IR), ZigBee, etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0256] The electronic device implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0257] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (AMOLED), a flexible light emitting diode (FLED), Miniled, MicroLed, MicrooLed, a quantum dot light emitting diode (QLED), etc. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1. In the embodiment of the present application, when the electronic device is a device such as the first electronic device or the second electronic device corresponding to the previous embodiment, the display screen 194 can be used to display Figures 2A-2D The user interface shown, Figure 4A-4B The user interface shown.
[0258] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 180K can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device, which is different from the position of the display screen 194. In the embodiment of the present application, when the electronic device is a device such as the first electronic device or the second electronic device corresponding to the previous embodiment, the touch sensor 180K can be used to detect the user's activation operation for the short-range communication function, the user's selection operation for the device identification information displayed on the user interface, and so on.
[0259] It should be understood that the structure illustrated in this embodiment does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include more or fewer components than shown, or may combine or separate certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0260] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments may be implemented 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 herein are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated therein. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive).
[0261] It should be noted that for the aforementioned various method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.
[0262] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs.
[0263] The modules in the device of the embodiment of the present application can be merged, divided and deleted according to actual needs.
[0264] A person skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the relevant hardware through a program, and the program can be stored in a computer-readable storage medium, which may include: a flash drive, ROM, RAM, a magnetic disk or an optical disk, etc.
[0265] The above disclosure is only a preferred embodiment of the present application and is only a part of the embodiments of the present application. It cannot be used to limit the scope of rights of the present application.
Claims
1. A data processing method, characterized in that: The method is applied to an electronic device, and includes: In response to an opening operation for the short-range communication application, displaying an application interface of the short-range communication application; the application interface of the short-range communication application includes first identification information of the first accessory device; In response to a selection operation on the first identification information, establishing a short-range communication connection with the first accessory device; receiving device authentication data from the first accessory device based on the short-range communication connection, wherein the device authentication data is used to indicate that the first accessory device is authorized to join the search device network; authenticating the first accessory device based on the device authentication data; In response to the first accessory device passing authentication, generating key data; The key data is sent to the first accessory device; the key data is used by the first accessory device to generate a first broadcast message when the communication connection with the electronic device is disconnected, and the first broadcast message is used to report the location information of the first accessory device.
2. The method according to claim 1, wherein The generating key data in response to the first accessory device passing authentication includes: In response to the first accessory device being authenticated successfully, outputting a prompt message on the display interface; the prompt message is used to prompt whether to confirm adding the first accessory device to the search device network; In response to detecting a confirmation instruction input for the prompt information, key data is generated.
3. The method according to claim 1 or 2, wherein: The generated key data includes: Generate a base key; Based on the basic key, generate key data; the key data includes M derived keys, where M is a positive integer; In which, the basic key is also used to bind with the second identification information of the first accessory device; the first broadcast message is generated based on the location information of the first accessory device and a derived key selected from the key data; the first broadcast message is used to indicate that the location information is associated with the second identification information of the first accessory device based on the derived key associated with the first broadcast message and stored in association with it.
4. The method according to claim 1 or 2, wherein: The method further comprises: In response to an opening operation for a search device application, displaying an application interface of the search device application, wherein the application interface of the search device application includes the third identification information of the first accessory device; In response to a selection operation on the third identification information, obtaining location information of the first accessory device from a server; the location information of the first accessory device is carried in the first broadcast message, and the first broadcast message is reported to the server via the search device network; The location information of the first accessory device is displayed in the application interface of the device search application.
5. The method according to claim 1, wherein The electronic device is in the search device network, and the method further includes: receiving a second broadcast message broadcast by a second accessory device; wherein the second broadcast message is generated by the second accessory device based on key data and location information corresponding to the second accessory device when the communication connection is disconnected; The second broadcast message is reported to the server; the second broadcast message is used to indicate that the location information of the second accessory device and the identification information of the second accessory device are associated and stored based on the key associated with the second broadcast message.
6. The method according to claim 1, wherein The method further comprises: establishing an encrypted channel with the first accessory device based on the short-range communication connection; The sending the key data to the first accessory device includes: The key data is encrypted and transmitted to the first accessory device through the encryption channel.
7. A data processing method, characterized in that: The method is applied to a first accessory device, and includes: In response to detecting that the communication connection between the first accessory device and the electronic device is disconnected, determining current location information of the first accessory device; generating a first broadcast message based on key data and the location information; the key data is received from the electronic device based on a communication connection between the first accessory device and the electronic device; the key data is generated by the electronic device; Broadcast the first broadcast message; the first broadcast message is used to report the location information of the first accessory device.
8. The method according to claim 7, wherein The method further comprises: Sending device authentication data to the electronic device based on the communication connection between the first accessory device and the electronic device; the device authentication data is used by the electronic device to authenticate the first accessory device; The key data is received from the electronic device based on the communication connection between the first accessory device and the electronic device when the first accessory device is authenticated.
9. The method according to claim 7 or 8, wherein The key data includes M derived keys, where the M derived keys are generated based on the basic key, and M is a positive integer; The generating a first broadcast message based on the key data and the location information includes: Selecting a derived key from the M derived keys included in the key data; generating a first broadcast message based on the selected derived key and the location information; The basic key is used to bind with the second identification information of the first accessory device, and the first broadcast message is used to instruct to store the location information in association with the second identification information of the first accessory device based on the derived key associated with the first broadcast message.
10. The method according to claim 7 or 8, characterized in that The method further comprises: receiving a write instruction input by a first object; The device authentication data is written into the first accessory device based on the write instruction; wherein, the first object and the second object have established an authorization relationship for the first accessory device, the first object is the production object of the first accessory device, and the second object is the production object of the electronic device.
11. An electronic device, characterized in that: The electronic device includes: one or more processors, a memory, and a communication interface; the communication interface is used to exchange information with other devices, and the memory is used to store program code; the processor is used to run the program code, so that the electronic device implements the method according to any one of claims 1 to 6, or implements the method according to any one of claims 7 to 10.
12. A chip system, characterized in that: The chip system includes one or more processors, a memory and an interface circuit, the memory, the interface circuit and the one or more processors are interconnected by lines, and program instructions are stored in the memory; when the program instructions are executed by the processor, the chip system implements the method as described in any one of claims 1 to 6, or implements the method as described in any one of claims 7 to 10.
13. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 6, or implements the method according to any one of claims 7 to 10.
Citation Information
Patent Citations
Communication method based on derived key and electronic equipment
CN114040394A
Contact tracking method and related equipment
CN115278617A
Earphone anti-lost method, earphone and storage medium
CN115499782A
Equipment searching method, electronic equipment and system
CN115914985A
Bluetooth pairing method and device, electronic equipment and storage medium
CN116614806A