Connection method, electronic equipment, product and computer readable medium
By using central node devices in distributed scenarios to obtain discovery function data of surrounding devices, newly added devices can quickly establish device discovery connections, solving the problems of data channel congestion and transmission delay, and improving device discovery rate and user experience.
Patent Information
- Application Number
- CN202311198301.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-15
- Publication Date
- 2025-03-18
AI Technical Summary
In a distributed scenario, when a newly added device establishes a device discovery connection with multiple surrounding devices, data transmission is frequent and repetitive, which may lead to data channel congestion and transmission delay, affecting the user experience.
The newly added electronic devices quickly establish a device discovery connection with the central node device by first establishing a device discovery connection with the central node device, and then obtaining discovery function data of other surrounding devices from the central device.
This method improves the device discovery rate, reduces the number of data channels and repeated synchronous transmissions, and improves the user experience.
Smart Images

Figure CN119653349A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a connection method, electronic equipment, product and computer-readable medium. Background Art
[0002] With the development of distributed technology, users have more and more terminal devices. When each terminal device joins the same distributed scenario, it often goes through the process from device discovery to establishing a connection with the specified device. The current device discovery method is mainly achieved through functions such as Bluetooth or wireless LAN.
[0003] The current device discovery method is usually that after the newly added device turns on the device discovery function, it actively scans the messages broadcast by the surrounding electronic devices (referred to as surrounding devices), and broadcasts information request messages to request the surrounding devices to return device connection information (such as network identification (such as IP address) or device identification, etc.). The newly added device is relative to the existing devices in the original distributed scenario. Based on the device connection information returned by the surrounding devices, the newly added device can generate a request message carrying the target identification and send it to the target device. After the target device receives the request message and agrees to establish a device discovery connection with the newly added device, the two can synchronize connection-related data (such as transmission protocols, etc.) and business-related data (such as hardware specification information, device version information, software version information, etc.) based on the data transmission channel provided by the established device discovery connection. After completing the device discovery, the newly added device can display the icons of the surrounding devices for users to select.
[0004] However, when there are many surrounding devices in the scene to which the newly added device is connected, the newly added device needs to transmit messages, device connection information, and data to each surrounding device separately during the process of establishing the above-mentioned device discovery connection with each surrounding device. At the same time, the surrounding devices will also transmit data to each other due to business needs. This will lead to frequent and repeated data transmission in this scene, and the data transmitted between devices will occupy the data channel, which may eventually cause data channel congestion and transmission delays. This transmission delay may eventually manifest itself as the inability of the newly added device to establish a device discovery connection with the surrounding devices or a longer time to complete device discovery, which will reduce the user experience. Summary of the invention
[0005] The present application provides a connection method, electronic device, product and computer-readable medium, wherein a newly added electronic device first establishes a device discovery connection with a central node device, then obtains the discovery function data of other surrounding devices from the central device, and then quickly establishes a device discovery connection with the surrounding devices. In this way, the newly added electronic device can increase the device discovery rate and expand the device discovery range based on the connection method provided by the present application, and the user experience will also be improved accordingly.
[0006] In a first aspect, the present application provides a connection method, which includes: a first electronic device detects a first operation of a user, and the first operation is used to turn on a device discovery function; the first electronic device receives a broadcast message sent by multiple electronic devices around it, and determines a central device from the broadcast message, wherein the multiple electronic devices include the central device; the first electronic device obtains discovery function data of the multiple electronic devices from the central device; and the first electronic device establishes a connection with a second electronic device among the multiple electronic devices based on the discovery function data of the multiple electronic devices.
[0007] For example, the first electronic device mentioned above may be an electronic device such as a mobile phone that is newly added to the distributed scene. In the distributed scene, there may be multiple electronic devices such as large-screen devices, smart speakers, notebooks, tablet computers or headphones that have established connections with each other. Among them, the notebook and / or tablet computer in the distributed scene can serve as the designated central device among the above-mentioned multiple electronic devices, hereinafter referred to as the central node device. Newly added electronic devices such as mobile phones can obtain the discovery function data of other electronic devices in the distributed scene through the notebook and / or tablet computer as the central device, such as the discovery function data that large-screen devices, smart speakers and headphones need to provide as the above-mentioned second electronic devices, and then the newly added device can quickly establish a communication connection with any of the multiple electronic devices in the distributed scene.
[0008] It can be understood that the connection established between the newly added first electronic device (such as a mobile phone, etc.) and the corresponding electronic device based on the above-mentioned discovery function data can be a device discovery connection established in advance, or it can be a Bluetooth connection or distributed connection established after the device discovery connection. For details, please refer to the relevant description below and will not be elaborated here.
[0009] In this way, in the above-mentioned distributed scenario, the newly added device only needs to establish a connection with the central device first to obtain the discovery function data of all electronic devices in the scenario, without having to exchange device connection information and synchronize discovery function data with each electronic device in the scenario one by one. The connection method provided in the above-mentioned first aspect is conducive to reducing the number of data channels established and maintained between the newly added device and each electronic device in the scenario, and is also conducive to reducing the phenomenon of repeated synchronous transmission of discovery function data between each electronic device, which is conducive to improving the efficiency of establishing device discovery connections between the newly added device and each electronic device, improving the device discovery rate, and thus improving the user experience.
[0010] In a possible implementation of the first aspect above, the above-mentioned determining the central device from the broadcast message includes: a first electronic device identifies a first message containing flag information from the broadcast message, wherein the flag information is used to distinguish the central device from other devices among multiple electronic devices; the first electronic device determines, based on the flag information, that the electronic device sending the first message is the central device.
[0011] For example, the newly added first electronic device can broadcast a message corresponding to an information acquisition request to surrounding devices to request device connection information from each electronic device in the above-mentioned distributed scenario. In response to the received message corresponding to the information acquisition request, the central device in the above-mentioned distributed scenario can carry the above-mentioned flag information in the message containing the device connection information broadcast to indicate its identity as a central node device. Furthermore, the newly added first electronic device can determine the central device based on the flag information in the message and establish a connection with it first, and then obtain the discovery function data of other electronic devices from the central device.
[0012] In a possible implementation of the first aspect above, the flag information includes a flag bit or a label corresponding to the central device.
[0013] In a possible implementation of the first aspect above, the first electronic device obtains discovery function data of multiple electronic devices from a central device, including: the first electronic device sends a first connection request to the central device, and obtains device connection information returned by the central device in response to the first connection request; the first electronic device establishes a first connection with the central device based on the device connection information; the first electronic device receives the discovery function data of multiple electronic devices synchronized by the central device based on the first connection.
[0014] For example, the above-mentioned first connection can be a device discovery connection established based on the device discovery function. The data transmission channel bandwidth provided by the device discovery connection can be relatively small. The above-mentioned first electronic device and the central device can prioritize synchronization of the device connection information, network identification, device identification information, connection authentication information and other connection-related discovery function data with a smaller data volume of other electronic devices through the above-mentioned device discovery connection. Based on this, in a possible implementation of the above-mentioned first aspect, the newly added first electronic device can send a connection request to the central device based on the message returned by the received central device carrying the above-mentioned flag information and device connection information, such as the above-mentioned first connection request, to request the establishment of a device discovery connection. Correspondingly, after the central device confirms the received first connection request and agrees to establish the first connection with the newly added first electronic device, it can obtain the discovery function data of the central device and the discovery function data of other electronic devices that have been synchronized and stored on the central device.
[0015] In a possible implementation of the first aspect above, a first electronic device receives discovery function data of multiple electronic devices synchronized by a central device based on a first connection, including: the first electronic device sends a second connection request to the central device based on the established first connection, wherein the second connection request is used to request the central device to establish a second connection, and a bandwidth of a data transmission channel corresponding to the second connection is greater than a bandwidth of a data transmission channel corresponding to the first connection; the first electronic device receives discovery function data of multiple electronic devices synchronized by the central device based on the second connection.
[0016] For example, the second connection may be a Bluetooth connection or a distributed connection further established between electronic devices that have established a device discovery connection. The Bluetooth connection or the distributed connection, for example, may provide a larger data transmission channel bandwidth based on a Bluetooth transmission protocol or a distributed soft bus. The first electronic device and the central device may synchronize the discovery function data of other electronic devices more quickly through the Bluetooth connection or the distributed connection, including the connection-related data and some business-related data, such as device specification information, device version information, software version information, etc. For details, please refer to the relevant description below, which will not be repeated here.
[0017] This helps improve the efficiency of the newly added first electronic device in acquiring the discovery function data of other electronic devices from the central device, thereby helping to improve the rate at which the first electronic device discovers other electronic devices and establishes a device discovery connection with the corresponding electronic device.
[0018] In a possible implementation of the first aspect above, the central device obtains discovery function data of multiple electronic devices in the following manner: the central device establishes a third connection with a second electronic device among the multiple electronic devices, wherein the third connection is of the same connection type as the first connection or the second connection, and an establishment time of the third connection is earlier than an establishment time of the first connection or the second connection; the central device receives and stores the discovery function data synchronized by the second electronic device based on the third connection.
[0019] For example, the third connection may be a device discovery connection established between the central node device and each electronic device in the corresponding group device, or may be a Bluetooth connection or a distributed connection established between each electronic device, without limitation. It is understood that before the first electronic device joins the distributed scene, each electronic device in the distributed scene may establish a device discovery connection or a Bluetooth connection, etc., so the time for establishing the third connection may be earlier than the time for establishing the first connection or the second connection.
[0020] In a possible implementation of the first aspect above, the central device obtains discovery function data of multiple electronic devices and also includes: the central device receives update data sent by the second electronic device based on a third connection, and the update data includes one or more of the data generated corresponding to the device version upgrade, device specification update and installed business software upgrade of the second electronic device.
[0021] That is, after the first electronic device joins the distributed scene, the update data corresponding to the discovery function data of other electronic devices in the distributed scene can be synchronized to the first electronic device through the central device in the relevant group device, without consuming bandwidth resources for establishing or maintaining Bluetooth connections between the first electronic device and other electronic devices other than the central device.
[0022] In a possible implementation of the first aspect above, the central device receives and stores the discovery function data of the second electronic device based on the synchronization of the third connection, including: the central device stores the discovery function data of multiple electronic devices in a local storage space; or the central device stores the discovery function data of multiple electronic devices in a corresponding logged-in cloud space.
[0023] In a possible implementation of the first aspect above, the multiple electronic devices include a first central device and a second central device, a fourth connection is established between the first central device and the second electronic device, the fourth connection is used to provide a data transmission channel between the first central device and the second central device, and the first electronic device obtains discovery function data of the multiple electronic devices from the central device, including: the first electronic device obtains discovery function data of the multiple electronic devices from the first central device, wherein the discovery function data of the multiple electronic devices includes data transmitted by the second central device to the first central device through the fourth connection.
[0024] For example, the above-mentioned distributed scenario may include two or more central devices, each of which can be used to maintain a group, and each group device can synchronize its own discovery function data to the central device in the corresponding group. Among the central devices, a central device that establishes a connection with the newly added first electronic device can be decided, and the corresponding group device discovery function data obtained by other central devices can be synchronously transmitted to the first electronic device. In this way, it is helpful to expand the device discovery range of the first electronic device. For example, for an electronic device that is far away from the first electronic device, the above-mentioned first electronic device can also discover the electronic device based on the connection method provided in this application.
[0025] In a possible implementation of the first aspect above, the discovery function data of multiple electronic devices includes connection-related data and / or business-related data, wherein the connection-related data includes one or more of a network identifier, a device identifier, a data transmission protocol, and a communication key; and the business-related data includes one or more of device specification information, device version information, and software version information.
[0026] In a second aspect, the present application provides an electronic device, comprising: one or more processors; one or more memories; one or more memories storing one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device executes the connection method provided in the above-mentioned first aspect and various possible implementations of the first aspect.
[0027] In a third aspect, the present application provides a computer-readable medium having instructions stored thereon, which, when executed on a computer, causes the computer to execute the connection method provided in the above-mentioned first aspect and various possible implementations of the first aspect.
[0028] In a fourth aspect, an embodiment of the present application provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the connection method provided in the above-mentioned first aspect and various possible implementations of the first aspect.
[0029] The beneficial effects of the second to fourth aspects mentioned above can be referred to the relevant descriptions in the first aspect mentioned above and various possible implementations of the first aspect, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] Figure 1a A schematic diagram of a distributed scenario is shown.
[0031] Figure 1b Shown Figure 1a Schematic diagram of the device discovery interface in the scenario shown.
[0032] Figure 2a The figure shows a schematic diagram of the device discovery process implemented in an existing distributed scenario.
[0033] Figure 2b Shown Figure 2a The device discovery process shown corresponds to a schematic diagram of a device discovery interface.
[0034] Figure 3 Shown is a schematic diagram of interface changes of a device discovery interface provided in an embodiment of the present application.
[0035] Figure 4 Shown is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0036] Figure 5a Shown is a schematic diagram of a distributed scenario with a central node device provided in Example 1 of the present application.
[0037] Figure 5b Shown Figure 5a A schematic diagram of a device discovery process corresponding to the illustrated scenario.
[0038] Figure 6 Shown is a schematic diagram of the implementation process of a connection method provided in Example 1 of the present application.
[0039] Figure 7a Shown is a schematic diagram of a device discovery interface provided in Example 1 of the present application.
[0040] Figure 7b Shown is a schematic diagram of another device discovery interface provided in Example 1 of the present application.
[0041] Figure 8a Shown is a schematic diagram of a distributed scenario with multiple central node devices provided in Example 2 of the present application.
[0042] Figure 8b Shown Figure 8a A schematic diagram of a device discovery process corresponding to the illustrated scenario.
[0043] Fig. 9 Shown is a schematic diagram of the implementation process of a connection method provided in Example 2 of the present application.
[0044] Fig.10 Shown is a schematic diagram of the software structure of an electronic device.
[0045] Fig.11 Shown is a schematic diagram of the implementation process of another connection method provided in an embodiment of the present application.
[0046] Fig.12 Shown is a schematic diagram of an operating system architecture of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0048] Figure 1a A schematic diagram of a distributed scenario is shown.
[0049] like Figure 1aAs shown, the scene may include electronic devices such as a mobile phone 100, a large screen device 200, a speaker 300, a notebook 400, a tablet computer 500, and a headset 600. Among them, the device discovery process has been completed between the large screen device 200, the speaker 300, the notebook 400, the tablet computer 500, and the headset 600, and the mobile phone 100 is a new electronic device added to the scene. These devices may all have Bluetooth functions or be in the same wireless local area network (WLAN).
[0050] When mobile phone 100 enters as a newly added device Figure 1a In the scenario shown, the device discovery function can be activated to discover surrounding devices based on Bluetooth or wireless LAN, such as obtaining network identification, device identification and other device connection information and connection-related data of surrounding devices. At this time, the mobile phone 100 can scan and listen to the broadcast messages sent by surrounding devices, and send information request messages to surrounding devices for requesting device connection information. It can be understood that the device discovery process can be triggered by user operations, such as the user can Figure 1b In the illustrated mobile phone 100 , a device discovery control 102 is clicked on the hyperterminal window 101 displayed to trigger a device discovery process, which is not limited here.
[0051] Surrounding devices such as the above-mentioned large-screen device 200, speaker 300, notebook 400, tablet computer 500 and headset 600 can return their own network identification and / or device identification to the mobile phone 100 after receiving the information request message sent by the mobile phone 100. Furthermore, based on the device connection information returned by each electronic device, the mobile phone 100 can initiate a connection request to each surrounding electronic device to request to establish a preliminary connection and obtain other data of each surrounding electronic device, including connection-related data, identity authentication data, and hardware specifications related to the functions supported by the device, such as component information, software version information and other business-related data, so as to complete the device discovery process.
[0052] After completing device discovery, in some embodiments, refer to Figure 1b As shown, the hyperterminal window 101 displayed on the mobile phone 100 can display device icons that can establish a communication link (referred to as establishing a link), for example, it can include icons corresponding to some or all of the electronic devices such as the large screen device 200, the speaker 300, the notebook 400, the tablet computer 500 and the headset 600. At this time, the user can use Figure 1bIn operation ①, in the hyperterminal interface 101 displayed on the mobile phone 100, the device icon corresponding to the large-screen device 200 is dragged close to the device icon corresponding to the mobile phone 100, so as to establish a distributed connection between the mobile phone 100 and the large-screen device 200 and perform distributed capacity scheduling. For example, the mobile phone 100 can schedule the display capacity of the large-screen device 200 to play videos, display screen projection, or make video calls, etc., without limitation.
[0053] However, in the above Figure 1a In the scenario shown, when the mobile phone 100 turns on the device discovery function to discover surrounding devices, it needs to network with the large screen device 200, the speaker 300, the notebook 400, the tablet computer 500, the headset 600 and other electronic devices and synchronize some connection-related data or data related to the business capabilities supported by each device. Figure 2a As shown, when the mobile phone 100 is connected, it needs to send broadcast messages and network requests to the surrounding devices to establish a network. Secondly, after the network authentication is completed between the mobile phone 100 and the surrounding devices, a link is further established and data is synchronized. The synchronized data may include the above-mentioned connection-related data, identity authentication data, and component information related to the functions supported by the device, software version information and other business-related data. In addition, continue to refer to Figure 2a As shown, links can also be established and data can be synchronized between devices surrounding the mobile phone 100.
[0054] In this way, the mobile phone 100 will need to repeatedly network with surrounding devices and establish distributed connections during the device discovery process. Multiple networking communication links need to be maintained between electronic devices in the same distributed scenario, and the devices may frequently synchronize data with each other during the device discovery period, resulting in data channel congestion and transmission delays. The failure rate of completing the connection between the mobile phone 100 and surrounding devices is high, and the time to complete device discovery is long, which will reduce the user experience. Figure 2b As shown, at this time, the mobile phone 100 may display a hyperterminal window 210, and the interface 210 may not display surrounding device icons or only display icons corresponding to some surrounding devices.
[0055] In order to solve the above problems, the present application provides a connection method. Specifically, the method can pre-specify one or more rich devices with strong communication capabilities, storage capabilities, etc. as central node devices in a distributed scene, which can also be called central devices or hub devices. The central node device can pre-acquire the network identification, device identification and other connection-related data, business-related data, etc. of other devices in the distributed scene, which can be referred to as discovery function data below. In addition, if the connection-related data such as the network identification on other devices, and the business-related data such as the software version are updated, they can also be updated to the central node device synchronously. In this way, when a newly added electronic device such as a mobile phone enters the distributed scene, it can send a multicast message to the central node device after listening to the broadcast message sent by the central node device, first establish a device discovery connection with the central node device, and then obtain the discovery function data of other surrounding devices from the central node device. Furthermore, newly added electronic devices such as mobile phones can establish a device discovery connection with other surrounding devices by only sending a verification request to other surrounding devices, completing the device discovery process.
[0056] Thus, based on the connection method provided by the present application, the newly added device can increase the device discovery rate, expand the device discovery range, and improve the user experience. For example, when a mobile phone joins a distributed scene, the icons corresponding to the surrounding devices can be displayed on the device interface more quickly, including the icons corresponding to the central node device and the icons corresponding to the electronic devices that have established device discovery connections with the central node device.
[0057] It can be understood that the above-mentioned device discovery connection is, as the name implies, a connection established during the device discovery phase. After the device discovery connection is established, the discovered peer device can be displayed on the device discovery interface between the electronic devices. The data transmission channel bandwidth corresponding to the device discovery connection established between the electronic devices is relatively narrow, and is usually used to transmit messages, protocols, instructions, requests and other data. In the embodiment of the present application, the data transmission channel can also be used to transmit other discovery function data.
[0058] The user selects the peer device on the device discovery interface for further connection operations, such as clicking on the peer device information for Bluetooth pairing or dragging the peer device icon to the icon of the local device, etc., which can establish a distributed connection with a wider bandwidth data channel between electronic devices.
[0059] refer to Figure 3 As shown, when the user performs operation ② on the hyperterminal window 310 displayed on the mobile phone 100 and clicks the device discovery control 311, if there are many devices around, the mobile phone 100 may continue to display the device discovery control 311 for a long period of time. Figure 3The hyperterminal window 310 shown. In other scenarios, the hyperterminal window 310 may also display only some devices at this time, for example, only displaying the device icon 312 corresponding to the notebook with strong communication capability, and failing to display the icons corresponding to other devices.
[0060] Based on the above connection method provided by the present application, after the mobile phone 100 detects that the user performs the above operation ②, it can quickly Figure 3 The hyperterminal window 310 shown switches to a hyperterminal window 320. The hyperterminal window 320 may display multiple discovered device icons, including an icon 321 corresponding to a laptop, an icon 322 corresponding to a tablet, an icon 323 corresponding to a speaker, an icon 324 corresponding to a large-screen device, and an icon 325 corresponding to a headset.
[0061] In other embodiments, the mobile phone 100 can also discover more devices, including electronic devices that are far away, based on the connection method provided by the present application. The mobile phone 100 can obtain the discovery function data of the electronic device at a long distance through the central node device at a closer distance to discover the device. In this way, the connection method provided by the present application can also improve the device discovery capability of electronic devices such as the mobile phone 100, including but not limited to improving the device discovery rate and increasing the coverage of device discovery.
[0062] It can be understood that the above-mentioned method of "pre-designating" the central node device can be achieved by adding the logo information of the central node device to the broadcast message sent by the rich device with strong communication capability, storage capability, etc. The discovery function data of other devices obtained by the central node device can be stored in the local storage space of the device or in the cloud, which is not limited here.
[0063] It can be understood that the connection method provided in the embodiment of the present application can be applicable to electronic devices including but not limited to mobile phones, tablet computers, desktops, laptops, handheld computers, netbooks, and augmented reality (AR) / virtual reality (VR) devices, smart TVs, smart watches and other wearable devices, servers, smart lights, smart switches, smart door locks, treadmills and other smart home devices, car equipment, portable game consoles, portable music players, reader devices, and other electronic devices with one or more processors and memories and capable of accessing the network. Among them, the Internet of Things (IoT) device that can be independently networked and support human-computer interaction can be used as the above-mentioned rich device pre-designated as the central node device, such as a mobile phone, a tablet, a laptop computer, etc. And the IOT device with fewer device resources and unable to independently network and / or support human-computer interaction can be called a light device, such as the above-mentioned smart speaker, treadmill, smart light, smart switch, etc.
[0064] Figure 4 According to an embodiment of the present application, a schematic diagram of the structure of an electronic device that can serve as a central node device is shown. It can be understood that in the embodiment of the present application, the electronic device can be the above-mentioned Figure 1a The notebook 400 in the distributed scenario shown. In other embodiments, the electronic device may also be the above Figure 1a The mobile phone 100 or tablet computer in the distributed scenario shown is not limited here.
[0065] like Figure 4 As shown, the electronic device 10 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 identity module (SIM) card interface 195, etc. The sensor module 180 may 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.
[0066] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may include more or fewer components than those shown in the figure, or combine certain components, or split certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. In addition, the structure of the light device connected to the central node device may also include fewer or more components than those shown in the figure, which is not limited here.
[0067] 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 processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0068] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0069] In an embodiment of the present application, the processor 110 of the electronic device 10 can control the execution of relevant instructions for each step of the implementation process of the connection method provided in the following embodiments in different distributed scenarios through a controller. The specific execution steps will be described in detail below and will not be repeated here.
[0070] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0071] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a SIM card interface, and / or a universal serial bus (USB) interface, etc.
[0072] The USB interface 130 is an interface that complies with the USB standard specification, and specifically can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 10, and can also be used to transfer data between the electronic device 10 and a peripheral device. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices, etc.
[0073] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 10. In other embodiments of the present application, the electronic device 10 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0074] The charging management module 140 is used to receive charging input from the charger. The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
[0075] The wireless communication function of the electronic device 10 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0076] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 10 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of the antennas.
[0077] The mobile communication module 150 can provide wireless communication solutions including 2G / 3G / 4G / 5G etc. applied on the electronic device 10 .
[0078] The wireless communication module 160 can provide wireless communication solutions for application in the electronic device 10, including wireless local area network (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc.
[0079] In some embodiments, the antenna 1 of the electronic device 10 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 10 can communicate with the network and other devices through wireless communication technology. The above wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The above-mentioned GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0080] The electronic device 10 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. Among them, the GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information. The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 10 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0081] The electronic device 10 can realize the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor. Among them, the ISP is used to process the data fed back by the camera 193. In some embodiments, the ISP can be set in the camera 193. The camera 193 is used to capture static images or videos.
[0082] In some embodiments, the electronic device 10 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
[0083] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 10. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0084] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 10 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 10 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0085] In the embodiment of the present application, the electronic device 10 as the central node device can use the storage space provided by the external memory card or the internal memory 121 connected to the external memory interface 120 to store the discovery function data synchronized by other devices in the same distributed scenario, including connection-related data such as network identification, device identification, identity authentication information, etc., and business-related data such as hardware specification information, software version information, device version information, etc. In other embodiments, the above data can also be synchronized by the electronic device 10 to the cloud for storage, which is not limited here.
[0086] The electronic device 10 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0087] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0088] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 10 determines the intensity of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 10 detects the intensity of the touch operation based on the pressure sensor 180A. The electronic device 10 can also calculate the touch position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions.
[0089] The touch sensor 180K is also called a "touch control device". The touch sensor 180K can be set on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor 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 10, which is different from the position of the display screen 194.
[0090] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 10 may receive key input and generate key signal input related to user settings and function control of the electronic device 10.
[0091] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0092] Indicator 192 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0093] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 10 by inserting the SIM card interface 195 or removing the SIM card from the SIM card interface 195 .
[0094] Based on the above Figure 4 The structure of the electronic device 10 that can be used as a central node device is shown, and in combination with different embodiments, a specific implementation process of the connection method provided by the present application in a distributed scenario in which different numbers of central node devices are pre-specified is specifically introduced.
[0095] Example 1
[0096] Figure 5a According to an embodiment of the present application, a schematic diagram of a distributed scenario with a central node device is shown.
[0097] like Figure 5a As shown, the scenario may include a notebook 400, a large screen device 200, and a speaker 300. The notebook 400 may have completed device discovery or established a communication connection with the large screen device 200 and the speaker 300. The notebook 400, as a central node device, may pre-acquire synchronization data of the large screen device 200 and the speaker 300, including discovery function data such as connection-related data and service-related data.
[0098] Continue to refer Figure 5a As shown, the mobile phone 100 can be used as an electronic device newly added to the distributed scenario. At this time, the mobile phone 100 can refer to the following Figure 5b The device discovery process shown completes the device discovery process for the notebook 400, the large-screen device 200 and the speaker 300.
[0099] Figure 5bAccording to an embodiment of the present application, a schematic diagram of a device discovery process is shown. For ease of description, the notebook 400 is described as device C, the large screen device 200 is described as device B, and the speaker 300 is described as device D.
[0100] like Figure 5b As shown, the initial distributed scenario 50 may include device B, device C, and device D, wherein device C may be a pre-designated central node device M. In other embodiments, the pre-designated central node device M in the distributed scenario 50 may also be other electronic devices different from device B, device C, and device D, which is not limited here.
[0101] It can be understood that device C, as the central node device M, can have strong communication capabilities. For example, the device C can support multiple communication methods, including Bluetooth, Wi-Fi, cellular data, and communication capabilities based on distributed soft buses. The device C can also have strong data storage capabilities to store synchronization data and update data obtained from device B, device C, and device D. As mentioned above, in an embodiment of the present application, the device C can be referred to as a rich device, such as a notebook 400. Correspondingly, device B and device D can be light devices, or they can be rich devices with weaker communication capabilities and storage capabilities than device C, such as a large-screen device 200 and a speaker 300. In other embodiments, the device B and device D can also be smart lights, smart switches, smart door locks, treadmills, etc., which are not limited here.
[0102] The above-mentioned method of pre-designating device C as a central node device may be to add flag information corresponding to the central node device in the communication data sent by the device C, such as adding a central node flag or tag, etc., which is not limited here. Among them, the communication data sent by the central node device M may be, for example, a broadcast message sent based on functions such as Bluetooth and Wi-Fi, and the broadcast message may carry the above-mentioned central node flag or tag, etc., which is used to inform other devices of their identity as a central node device during the device discovery process. In addition, the broadcast message may be sent in response to an information request message sent by a newly added device, which is not limited here.
[0103] refer to Figure 5b In the process ① shown, the central node device synchronizes data with the surrounding devices. Figure 5bIn the distributed scenario 50 shown, the central node device M may have established device discovery connections with device B, device C, and device D and completed the device discovery process, or may have established distributed connections or Bluetooth connections and other communication links with one or more of the devices. The transmission channel bandwidth of the communication links such as distributed connections or Bluetooth connections may be larger than the transmission channel bandwidth of the above-mentioned device discovery connection. Therefore, data synchronization can be completed between the central node device M and device B, device C, and device D before the newly added device enters the scenario 50. The data synchronization process may be a process in which device B, device C, and device D uniformly transmit their own discovery function data to the central node device M for storage.
[0104] It should be noted that the following description will be based on the central node device M and device C. The interaction process between the central node device M and device C can be understood as the operation of device C itself, or the interaction between device C and other electronic devices serving as central node devices, which will not be elaborated here.
[0105] Continue to refer Figure 5b In process ② shown, the newly added device A, such as mobile phone 100, can scan and monitor the broadcast messages sent by devices B, C and D, and then determine the central node device based on the central node flag or related tags carried in the monitored broadcast messages.
[0106] Continue to refer Figure 5b In the process ③ shown, device A can send a multicast message with a target identifier to the determined central node device, requesting to establish a device discovery connection with the central node device M. Device A can complete the device discovery process with the central node device M based on the established device discovery connection, and then device A can obtain the discovery function data of devices B, C, and D through the central node device M.
[0107] Furthermore, refer to Figure 5b In process ④ shown, device A can send a verification request to device B, device C and device D based on the above-mentioned synchronization data of device B, device C and device D obtained. The verification request can, for example, request verification of network identification, device identification, communication key, etc., so as to quickly establish a device discovery connection with device B, device C and device D. At this time, the process of establishing a device discovery connection with device B, device C and device D does not need to synchronize the discovery function data of device B, device C and device D separately, which is conducive to reducing the amount of data in the data transmission channel and relieving the pressure of data transmission.
[0108] In this way, after device A turns on the device discovery function, the device discovery rate of surrounding devices can be greatly improved, and there is no need to frequently transmit data between devices, which is also conducive to improving the transmission efficiency of other necessary data transmission processes.
[0109] Specifically, the following Figure 6 The implementation process of the connection method provided in this application is introduced in detail.
[0110] Figure 6 According to the embodiment of the present application, a schematic diagram of the implementation process of a connection method is shown. It can be understood that Figure 6 The illustrated implementation process may involve the interaction between each electronic device and a newly added device in the above-mentioned distributed scenario 50 .
[0111] It should also be stated that the steps in the methods and processes in the embodiments of the present application are numbered for ease of reference, rather than to limit the order of precedence. If there is an order between the steps, the text description shall prevail.
[0112] like Figure 6 As shown, the implementation process may include the following steps:
[0113] 601: The central node device M establishes connections with the devices B, C, and D.
[0114] It can be understood that a device discovery connection can be established between the central node device M and the devices B, C, and D in the same distributed scenario, or a distributed connection that can support capability scheduling can be established, etc., and no limitation is made here.
[0115] In the embodiment of the present application, the central node device M may be the same device as the device C. In other embodiments, the central node device M and the device C may also be different devices.
[0116] 602: Device B, device C, and device D synchronize data with central node device M.
[0117] Exemplarily, device B, device C, and device D can synchronize discovery function data, including connection-related data and service-related data, to the central node device M based on the connection established with the central node device M. As mentioned above, the connection-related data may include transmission protocols, communication keys, etc., and the service-related data may include hardware specification information, device version information, software version information, etc.
[0118] 603: The central node device M stores the discovery function data synchronized by each device.
[0119] 604: Device A detects a user operation of enabling a device discovery function.
[0120] For example, referring to the above Figure 3 As shown, the mobile phone 100 detects that the user clicks the device discovery control 311 on the displayed hyperterminal window 310, that is, Figure 3 Operation shown ②.
[0121] 605: Device A sends an information acquisition request to central node device M, device B, device C, and device D.
[0122] Exemplarily, when device A detects a user operation to enable the device discovery function, it can broadcast an information acquisition request to surrounding devices. The information acquisition request can be used to request surrounding devices to provide device connection information, such as an IP address, etc. In an embodiment of the present application, the information acquisition request can be sent in the form of a broadcast message, and in other embodiments, it can also be sent in other forms, such as sending via a multicast message, etc., which is not limited here.
[0123] 606: The central node device M sends a broadcast message containing flag information to surrounding devices (including device A).
[0124] 607: Device B, device C, and device D send a broadcast message to surrounding devices (including device A).
[0125] Exemplarily, the central node device M, device B, device C, and device D may send a broadcast message containing device connection information to surrounding devices (including device A) in response to an information acquisition request sent by device A via a broadcast message. The broadcast message sent by the central node device M may carry preset flag information, which may be a central node device flag bit or label, etc., for identifying device M as a central node device.
[0126] 608: Device A confirms the central node device based on the flag information in the monitored broadcast message.
[0127] Exemplarily, after monitoring the broadcast message carrying the flag information sent by the central node device M, the device A can determine its identity as the central node device based on the flag information.
[0128] 609: Device A sends a request to the central node device M to establish a device discovery connection.
[0129] Exemplarily, the request to establish a device discovery connection may be sent in the form of a multicast message, that is, device A may add the device identifier or network identifier of the central node device to the message, thereby sending the message to the designated central node device M.
[0130] 610: The central node device M confirms the connection request and establishes a device discovery connection with the device A.
[0131] Exemplarily, after receiving the request for establishing a device discovery connection from device A, central node device M may synchronize its own connection-related data with device A in response to the request and establish a device discovery connection with device A.
[0132] 611: Device A displays an icon corresponding to the discovered central node device.
[0133] As an example, refer to Figure 7a As shown, the mobile phone 100 may first display a hyperterminal window 710, in which an icon 711 corresponding to the central node device may be first displayed. Figure 7a As shown, the device indicated by the icon 711 may be Figure 5a The notebook 400 in the illustrated scene. The notebook 400 corresponds to the above Figure 5a The device C in the shown scenario is also the central node device M.
[0134] 612: The central node device M synchronizes the stored discovery function data of all devices to the device A.
[0135] Exemplarily, after the central node device M establishes a device discovery connection with the device A, it can first send its own service-related data to the device A through the corresponding data transmission channel, and can synchronize the pre-stored discovery function data of the device B, device C, and device D to the device A through the corresponding data transmission channel. As mentioned above, the discovery function data includes connection-related data and service-related data, etc.
[0136] 613: Device A sends a verification request to device B, device C, and device D.
[0137] Exemplarily, device A may send a verification request to device B, device C, and device D based on the connection-related data of device B, device C, and device D synchronously obtained from the central node device M. The verification request may be sent in the form of a multicast message, and may request device B, device C, and device D to perform data verification, identity authentication, etc. on the connection-related data carried in the message sent by device A, including but not limited to consistency verification of network identification or device identification, key authentication, and other processes.
[0138] 614: Devices B, C, and D pass verification and establish a device discovery connection with device A.
[0139] Exemplarily, after device B, device C, and device D perform data verification and identity authentication on the connection-related data carried in the message sent by device A, they can successfully establish a device discovery connection with device A.
[0140] 615: Device A displays icons corresponding to other discovered surrounding devices.
[0141] As an example, refer to the above Figure 7bAs shown, the mobile phone 100 may further display a hyperterminal window 720, in which an icon 722 corresponding to the device B and an icon 723 corresponding to the device D found in the surrounding may be displayed. Figure 5a In the scenario shown, in the embodiment of the present application, the device indicated by the icon 722 may be the speaker 300, and the device indicated by the icon 723 may be the large-screen device 200.
[0142] 616: Device B, device C, and device D detect that service-related data is updated.
[0143] As an example, when device B, device C, and device D detect a device version upgrade, a hardware specification update, a business software upgrade, etc., they may determine that an update to the business-related data has been detected.
[0144] 617: Device B, device C, and device D update data to the central node device M.
[0145] 618: The central node device M stores the updated data.
[0146] 619: The central node device M synchronizes the updated data of each device to the device A.
[0147] It can be understood that after detecting the update of relevant data, device B, device C, and device D can synchronize to device A through the central node device M instead of device discovery connection. In this way, device A only obtains the updated discovery function data of device B, device C, and device D through the central node device M, and will not establish connections with devices B, C, and D to obtain updated data, so that the data transmission channel between devices will not be congested due to data update, which is conducive to improving the stability of device discovery and subsequent establishment of distributed connections based on the transmission connection request of the data transmission channel.
[0148] Based on the above Figure 6 In the implementation process shown, the connection method provided in the embodiment of the present application enables newly added devices to increase the rate of completing the device discovery process, and is beneficial to improving the stability of device discovery and subsequent establishment of distributed connections based on the data transmission channel transmission connection request, and the user experience will also be improved accordingly.
[0149] The following is an introduction to the specific implementation process of the connection method provided by the present application in another distributed scenario in conjunction with another embodiment.
[0150] Example 2
[0151] Figure 8a According to an embodiment of the present application, a schematic diagram of a distributed scenario is shown in which multiple (taking 2 as an example) electronic devices are pre-designated as central node devices.
[0152] like Figure 8a As shown, the scenario may include a notebook 400, a large screen device 200, a speaker 300, a tablet computer 500, and a headset 600. The notebook 400 may have completed device discovery or established a communication connection with the large screen device 200 and the speaker 300. The notebook 400, as a central node device, may pre-acquire the discovery function data synchronized by the large screen device 200 and the speaker 300, including connection-related data and service-related data. Similarly, the tablet computer 500 may also pre-acquire the synchronization data of the headset 600 as a central node device.
[0153] Continue to refer Figure 8a As shown, the mobile phone 100 can be used as an electronic device newly added to the distributed scenario. At this time, the mobile phone 100 can refer to the following Figure 8b The device discovery process shown completes the device discovery process for the notebook 400, the large-screen device 200 and the speaker 300.
[0154] Figure 8b According to an embodiment of the present application, a schematic diagram of a device discovery process is shown. For ease of description, the notebook 400 is described as device C, the large screen device 200 is described as device B, the speaker 300 is described as device D, the earphone 600 is described as device E, and the tablet computer 500 is described as device F.
[0155] like Figure 8b As shown, the initial distributed scenario 80 may include device B, device C, device D, device E, and device F, wherein device C may be a pre-designated central node device M, and device F may be a pre-designated central node device N. In other embodiments, the pre-designated central node devices M and N in the distributed scenario 80 may also be other electronic devices different from device B, device C, device D, device E, and device F, which are not limited here.
[0156] refer to Figure 8b In the process ① shown, the central node device synchronizes data with the surrounding devices. Figure 8b In the distributed scenario 80 shown, the central node device M can complete the device discovery process with the device B, device C and device D, that is, establish a device discovery connection. Therefore, the central node device M can complete data synchronization with the device B, device C and device D before the new device enters the scenario 80. The data synchronization process can be a process in which the device B, device C and device D respectively transmit their own connection-related data, service-related data and other discovery function data to the central node device M for storage.
[0157] Similarly, the central node device N can complete the device discovery process with the device E and the device F respectively, and the central node device N can complete the data synchronization with the device E and the device F before the newly added device enters the scene 80. The device E and the device F respectively transmit their own connection-related data, service-related data and other discovery function data to the central node device N for storage. In some embodiments, the device D can also synchronize data with the central node device N based on the established device discovery connection, which is not limited here.
[0158] In the above embodiment 1 Figure 5b The difference between the distributed scenario 50 shown in the figure is that the central node device M and the central node device N in the embodiment of the present application can execute Figure 8b The process ①′ shown is to synchronize the data stored in each device with the other devices.
[0159] Continue to refer Figure 8b In process ② shown, the newly added device A, such as mobile phone 100, can scan and monitor the broadcast messages sent by devices B, C, D, E and F, and then determine the central node device based on the central node flag or related tags carried in the monitored broadcast messages, for example, determine that there are two central node devices, namely central node device M and central node device N.
[0160] Continue to refer Figure 8b In the process ③ shown, device A can send a multicast message with a target identifier to the determined central node device, requesting to establish a device discovery connection with the central node device M which is closer. After establishing the device discovery connection and completing the device discovery process with the central node device M, device A can obtain the connection-related data, service-related data and other discovery function data of devices B, C, D, E and F through the central node device M. In other embodiments, device A can also obtain the synchronization data of devices B, C, D, E and F through the central node device N, which is not limited here.
[0161] Furthermore, refer to Figure 8b In the process ④ shown, device A can send a verification request to device B, device C, device D, device E and device F based on the above-mentioned synchronization data of device B, device C, device D, device E and device F obtained. The verification request can, for example, request verification of network identification, device identification, communication key, etc., so as to quickly establish a device discovery connection with device B, device C and device D. At this time, the process of establishing a device discovery connection with device B, device C, device D, device E and device F does not need to synchronize the discovery function data of device B, device C, device D, device E and device F respectively, which is conducive to reducing the amount of data in the data transmission channel and relieving the pressure of data transmission.
[0162] In this way, after device A turns on the device discovery function, the device discovery rate of surrounding devices can be greatly improved, and there is no need to frequently transmit data between devices, which is also conducive to improving the transmission efficiency of other necessary data transmission processes.
[0163] Specifically, the following Fig. 9 The implementation process of the connection method provided in this application is introduced in detail.
[0164] Fig. 9 According to the embodiment of the present application, a schematic diagram of the implementation process of a connection method is shown. It can be understood that Fig. 9 The illustrated implementation process may involve the interaction between each electronic device and a newly added device in the above-mentioned distributed scenario 80 .
[0165] It should also be stated that the steps in the methods and processes in the embodiments of the present application are numbered for ease of reference, rather than to limit the order of precedence. If there is an order between the steps, the text description shall prevail.
[0166] like Fig. 9 As shown, the implementation process may include the above embodiment 1 Figure 6 In steps 601 to 619, the difference between step 615' in the embodiment of the present application and step 615 in the above-mentioned embodiment 1 is that the number and content of the electronic device icons displayed are different.
[0167] Specifically, 615′: Device A displays icons corresponding to other discovered surrounding devices. In the embodiment of the present application, the other surrounding devices displayed by device A may be the above-mentioned Figure 8a Device B, device D and device E in the scene shown, and the above Figure 8a Device C and device F in the illustrated scenario may respectively serve as central node device M and central node device N to perform the following related steps. For details, please refer to the description of the related steps below, which is not limited here.
[0168] Continue to refer Fig. 9 As shown, the implementation process also includes the following steps 901 to 913.
[0169] 901: The central node device N establishes a connection with the devices E and F.
[0170] 902: Device E and device F synchronize data with central node device N.
[0171] 903: The central node device N stores the discovery function data synchronized by each device.
[0172] The above steps 901 to 903 can be executed synchronously or asynchronously with the above steps 601 to 603, but they are all executed before the following step 904, which is not limited here.
[0173] 904: The central node device M and the central node device N store data synchronously with each other.
[0174] 905: Device A sends an information acquisition request to central node device N, device E, and device F.
[0175] 906: The central node device N sends a broadcast message containing flag information to surrounding devices (including device A).
[0176] 907: Device E and device F send a broadcast message to surrounding devices (including device A).
[0177] It can be understood that in the embodiment of the present application, when device A executes step 608, it can confirm that there are two central node devices, namely, central node device M and central node device N, based on the flag information in the monitored broadcast message. After that, in the embodiment of the present application, device A can select central node device M to continue to execute the above steps 609 to 612, and obtain the synchronization data of all other devices from central node device M, including the synchronization data of device B, device C, device D, device E and device F.
[0178] In other embodiments, device A may also select central node device N to obtain synchronization data of all other devices, or obtain synchronization data of each device from two central node devices respectively, which is not limited here.
[0179] After acquiring the synchronization data of each device, device A may continue to execute step 908 described below.
[0180] 908: Device A sends a verification request to devices E and F.
[0181] 909: Device E and device F pass the verification and establish a device discovery connection with device A.
[0182] It can be understood that after the above step 909 is executed, device A can execute the above step 615'.
[0183] 910: Device E and device F detect that service-related data is updated.
[0184] 911: Device E and device F update data to the central node device N.
[0185] 912: The central node device N stores the updated data.
[0186] 913: The central node device N synchronizes the update data of each device to the central node device M.
[0187] Thereafter, the central node device M may continue to execute the above step 619 to synchronize the update data of each device to the device A.
[0188] Based on the above Fig. 9 The implementation process shown, the connection method provided by the embodiment of the present application, when there are multiple central node devices in a distributed scene, the newly added device can obtain the synchronization data of other devices in the scene through one of the central node devices, quickly complete the device discovery, and the device discovery process can cover a larger range, covering the connection range corresponding to each central node device. In other words, the connection method provided by the embodiment of the present application can increase the device discovery rate and expand the device discovery range, and the user experience will also be improved accordingly.
[0189] In combination with the specific implementation process of the connection method provided by the present application introduced in the above-mentioned embodiments 1 and 2, it can be understood that in the device discovery stage, electronic devices such as mobile phones with the device discovery function turned on can quickly obtain the discovery function data of surrounding devices through the central node device, etc., to complete device discovery, and the scope covered by device discovery can be wider, which is conducive to improving the user experience of electronic devices such as mobile phones. As for the discovered surrounding devices, each device can manage its own connection-related data, business-related data and other discovery function data through the surrounding central node devices. When the device is upgraded or the software is upgraded, the upgrade data can be synchronized to the central node device, etc., avoiding the process of repeated data synchronization with other devices, and the data transmission channels involved by each device can also avoid congestion and remain unobstructed.
[0190] Fig.10 According to an embodiment of the present application, a schematic diagram of the software structure of an electronic device is shown.
[0191] Understandably, Fig.10 The electronic device 10 shown may be the central node device mentioned above, or may be other devices connected to the central node device and synchronizing data with the central node device, and no limitation is made here.
[0192] like Fig.10 As shown, the electronic device 10 includes a networking communication module 010, a device discovery module 020, a data synchronization module 030, a device combination and distributed scheduling module 040, and a multi-device data management module 050 based on a central node device.
[0193] The networking communication module 010 is used to provide networking communication capabilities, including the communication capabilities provided by the above-mentioned communication technologies such as Bluetooth, wireless local area network, etc. Based on the networking communication module 010, the electronic device 10 can send broadcast messages to other devices to provide network identification, etc., so as to be discovered by the device discovery function of other electronic devices.
[0194] The device discovery module 020 is used to provide a device discovery function. Based on the device discovery module 020, the electronic device 10 can enable the device discovery function and send corresponding broadcast messages such as information acquisition requests to surrounding devices.
[0195] The data synchronization module 030 is used to provide the ability to synchronize data. Based on the data synchronization module 030, the electronic device 10 can initiate a process of synchronizing discovery function data to the central node device. As a central node device, the electronic device 10 can also initiate a synchronization request to the surrounding devices based on the data synchronization module 030, requesting the surrounding devices to synchronize connection-related data, business-related data and other discovery function data. It can be understood that when the synchronized data is updated, the electronic device 10 can also update the data to the central node device based on the above-mentioned data synchronization module 030, or obtain updated discovery function data.
[0196] The device combination and distributed scheduling module 040 is used to provide the ability to establish further communication links (i.e., link building) after the device discovers the connection. For example, after the electronic device 10 establishes a device discovery connection with the surrounding devices, it can request the discovered surrounding devices to establish a higher bandwidth Bluetooth connection, distributed connection, etc. based on the device combination and distributed scheduling module 040, and then schedule the camera or display screen of the connected electronic device to implement the corresponding function.
[0197] The multi-device data management module 050 is used to provide management functions for the discovery function data synchronized during the device discovery connection process. The electronic device 10 can detect whether its own discovery function data is updated based on the multi-device data management module 050, and initiate data synchronization or data update through the data synchronization module 030.
[0198] Fig.11 According to an embodiment of the present application, a schematic diagram of an implementation flow of another connection method is shown.
[0199] Specifically, Fig.11 As shown, the implementation process includes the following steps:
[0200] 1101a: The central node device and the surrounding devices complete the synchronization and storage of data required for device connection in advance.
[0201] It can be understood that the central node device may correspond to the central node device M in the distributed scenario described in the above embodiment 1. The central node device may implement the data synchronization process of steps 601 to 603, and the details are referred to the above related description, which will not be repeated here.
[0202] 1101b: Data synchronization and storage are completed between multiple central node devices and between each central node device and its corresponding group device.
[0203] It can be understood that the central node device may correspond to the central node device M and the central node device N in the distributed scenario introduced in the above embodiment 2. Figure 8a In the scenario shown, device B and device D may be group devices corresponding to the central node device M, and device E may be group devices corresponding to the central node device N.
[0204] The central node device can implement the data synchronization process of steps 601 to 603 and steps 901 to 903. Please refer to the relevant description above for details, which will not be repeated here.
[0205] 1102: When the relevant data of the surrounding devices are updated, including device version upgrade, hardware specification update, business software upgrade, etc., the data update to the central node device is completed.
[0206] 1103: One or more central node devices complete synchronization and storage of updated peripheral device related data.
[0207] It can be understood that the above data update process can refer to the relevant description of steps 616 to 618 in the above embodiment 1 or embodiment 2, and the relevant description of steps 910 to 912 in the above embodiment 2, and will not be repeated here.
[0208] 1104: The newly added device discovers surrounding devices through the device discovery function, and identifies and connects to surrounding central node devices through the device connection information returned by the central node device.
[0209] It can be understood that the above process of identifying the central node device can refer to the relevant description of steps 605 to 611 in the above embodiment 1, or the relevant description of steps 905 to 907 and steps 608 to 611 in embodiment 2, and will not be repeated here.
[0210] 1105: The newly added device synchronizes the discovery function data of all surrounding devices from the central node device at one time.
[0211] It can be understood that the above process of synchronizing the data related to the surrounding devices can refer to the relevant description in step 612 in the above-mentioned embodiment 1 and embodiment 2, and will not be repeated here.
[0212] 1106: The newly added device establishes a device discovery connection with each surrounding device, completing the device discovery process for the surrounding devices.
[0213] It can be understood that the above process of establishing a device discovery connection can refer to the relevant descriptions of steps 613 to 614 in the above embodiment 1, or steps 613 to 614 and steps 908 to 909 in the steps of embodiment 2, and will not be repeated here.
[0214] Based on the above Fig.11 It can be understood from the implementation process shown that in a distributed scenario with one or more central node devices, a newly added device can obtain the discovery function data of all surrounding devices in the scenario based on one of the central node devices, thereby achieving a more complete and faster device discovery process. In other embodiments, in a distributed scenario with multiple central node devices, a newly added device can also synchronously obtain connection-related data and service-related data of surrounding devices based on two or more of the central node devices, which is not limited here.
[0215] Fig.12 Schematic diagram of the operating system architecture of the electronic device 10 according to an embodiment of the present invention.
[0216] It is understood that the software system of the electronic device 10 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present invention takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 10.
[0217] The layered architecture divides the software into several layers, each with a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, Android TM The system is divided into four layers, from top to bottom: application layer, application framework layer, Android TM Runtime (Android TM runtime) and system libraries, as well as the kernel layer.
[0218] like Fig.12 As shown, the application layer may include a series of application packages, which may include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message and other applications.
[0219] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.
[0220] The application framework layer may include a window manager, content provider, view system, telephony manager, resource manager, notification manager, and the like.
[0221] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0222] Content providers are used to store and retrieve data and make it accessible to applications. This data can include video, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.
[0223] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.
[0224] The phone manager is used to provide communication functions for the electronic device 10, such as management of call status (including connecting, hanging up, etc.).
[0225] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.
[0226] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.
[0227] Android TM Runtime includes core libraries and virtual machines. Android TM runtime is responsible for Android TM Scheduling and management of the system.
[0228] The core library consists of two parts: one part is the function that needs to be called by the Java language, and the other part is the Android core library.
[0229] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
[0230] The system library may include multiple functional modules, such as surface manager, media libraries, 3D graphics processing library (such as openGL ES), 2D graphics engine (such as SGL), etc.
[0231] The surface manager is used to manage the display subsystem and provide the fusion of 2D and 3D layers for multiple applications.
[0232] The media library supports playback and recording of a variety of commonly used audio and video formats, as well as static image files, etc. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
[0233] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.
[0234] A 2D graphics engine is a drawing engine for 2D drawings.
[0235] The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
[0236] The following is an example of the workflow of the software and hardware of the electronic device 10 in conjunction with a scenario where the device discovery function is enabled.
[0237] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into raw input events (including touch coordinates, timestamp of the touch operation and other information). The raw input events are stored in the kernel layer. The application framework layer obtains the raw input events from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the device discovery control in the above-mentioned hyperterminal window, the system user interface (SystemUI) calls the interface of the application framework layer to turn on the device discovery function, and then initiates the device discovery process by calling the chip driver of the kernel layer.
[0238] The embodiments of the present application also provide a computer program product for implementing the connection methods provided in the above embodiments.
[0239] The various embodiments of the mechanism disclosed in the present application can be implemented in hardware, software, firmware or a combination of these implementation methods. The embodiments of the present application can be implemented as a computer program module or module code executed on a programmable system, and the programmable system includes at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device and at least one output device.
[0240] A computer program module or module code can be applied to input instructions to perform the functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0241] Module code can be implemented with high-level modular language or object-oriented programming language to communicate with the processing system. When necessary, module code can also be implemented with assembly language or machine language. In fact, the mechanism described in this application is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0242] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, a machine-readable medium may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including, but not limited to, a floppy disk, an optical disk, an optical disk, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic card or an optical card, a flash memory, or a tangible machine-readable memory for transmitting information (e.g., a carrier wave, an infrared signal, a digital signal, etc.) using the Internet in an electrical, optical, acoustic, or other form of propagation signal. Accordingly, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).
[0243] References to "one embodiment" or "an embodiment" in the specification mean that the specific features, structures, or characteristics described in conjunction with the embodiment are included in at least one exemplary implementation or technology disclosed according to the embodiment of the present application. The appearance of the phrase "in one embodiment" in various places in the specification does not necessarily all refer to the same embodiment.
[0244] The disclosure of the embodiment of the present application also relates to an operating device for executing the text. The device can be specially constructed for the required purpose or it can include a general-purpose computer selectively activated or reconfigured by a computer program stored in the computer. Such a computer program can be stored in a computer-readable medium, such as, but not limited to any type of disk, including a floppy disk, an optical disk, a CD-ROM, a magneto-optical disk, a read-only memory (ROM), a random access memory (RAM), an EPROM, an EEPROM, a magnetic or optical card, an application-specific integrated circuit (ASIC) or any type of medium suitable for storing electronic instructions, and each can be coupled to a computer system bus. In addition, the computer mentioned in the specification may include a single processor or may be an architecture involving multiple processors for increased computing power.
[0245] In addition, the language used in this specification has been primarily selected for readability and instructional purposes and may not be selected to describe or limit the disclosed subject matter. Therefore, the present application embodiment disclosure is intended to illustrate rather than limit the scope of the concepts discussed herein.
Claims
1. A connection method, characterized in that: include: The first electronic device detects a first operation of a user, where the first operation is used to enable a device discovery function; The first electronic device receives broadcast messages sent by a plurality of surrounding electronic devices, and determines a central device from the broadcast messages, wherein the plurality of electronic devices include the central device; The first electronic device acquires the discovery function data of the plurality of electronic devices from the central device; The first electronic device establishes a connection with a second electronic device among the multiple electronic devices based on the discovery function data of the multiple electronic devices.
2. The method according to claim 1, characterized in that The determining of the central device from the broadcast message includes: The first electronic device identifies a first message including flag information from the broadcast message, wherein the flag information is used to distinguish the central device from other devices in the plurality of electronic devices; The first electronic device determines, based on the flag information, that the electronic device sending the first message is the central device.
3. The method according to claim 2, characterized in that The flag information includes a flag bit or a label corresponding to the central device.
4. The method according to claim 1, characterized in that The first electronic device acquires the discovery function data of the plurality of electronic devices from the central device, including: The first electronic device sends a first connection request to the central device, and obtains device connection information returned by the central device in response to the first connection request; The first electronic device establishes a first connection with the central device based on the device connection information; The first electronic device receives the discovery function data of the plurality of electronic devices synchronized by the central device based on the first connection.
5. The method according to claim 4, characterized in that The first electronic device receives the discovery function data of the plurality of electronic devices synchronized by the central device based on the first connection, including: The first electronic device sends a second connection request to the central device based on the established first connection, wherein the second connection request is used to request the central device to establish a second connection, and the bandwidth of the data transmission channel corresponding to the second connection is greater than the bandwidth of the data transmission channel corresponding to the first connection; The first electronic device receives the discovery function data of the plurality of electronic devices synchronized by the central device based on the second connection.
6. The method according to claim 5, characterized in that The central device obtains the discovery function data of the multiple electronic devices in the following manner: The central device establishes a third connection with a second electronic device among the multiple electronic devices, wherein the third connection is of the same connection type as the first connection or the second connection, and an establishment time of the third connection is earlier than an establishment time of the first connection or the second connection; The central device receives and stores the discovery function data synchronized by the second electronic device based on the third connection.
7. The method according to claim 6, characterized in that The central device obtaining the discovery function data of the plurality of electronic devices further includes: The central device receives update data sent by the second electronic device based on the third connection, wherein the update data includes one or more of data generated corresponding to a device version upgrade, a device specification update, and an installed business software upgrade of the second electronic device.
8. The method according to claim 6, characterized in that The central device receives and stores the discovery function data synchronized by the second electronic device based on the third connection, including: The central device stores the discovery function data of the multiple electronic devices in a local storage space; or, The central device stores the discovery function data of the multiple electronic devices in the corresponding logged-in cloud space.
9. The method according to claim 1, characterized in that: The plurality of electronic devices include a first central device and a second central device, a fourth connection is established between the first central device and the second electronic device, the fourth connection is used to provide a data transmission channel between the first central device and the second central device, and The first electronic device acquires the discovery function data of the plurality of electronic devices from the central device, including: The first electronic device obtains the discovery function data of the multiple electronic devices from the first central device, wherein the discovery function data of the multiple electronic devices includes data transmitted by the second central device to the first central device through the fourth connection.
10. The method according to any one of claims 1 to 9, characterized in that The discovery function data of the plurality of electronic devices includes connection-related data and / or service-related data, wherein: The connection-related data includes one or more of a network identifier, a device identifier, a data transmission protocol, and a communication key; The service-related data includes one or more of device specification information, device version information, and software version information.
11. An electronic device, characterized in that: include: one or more processors; One or more memories; the one or more memories store one or more programs, and when the one or more programs are executed by the one or more processors, the electronic device executes the connection method described in any one of claims 1 to 10.
12. A computer readable medium, characterized in that The readable medium stores instructions, which, when executed on a computer, enable the computer to execute the connection method according to any one of claims 1 to 10.
13. A computer program product, characterized in that The invention comprises a computer program / instruction, which, when executed by a processor, implements the connection method according to any one of claims 1 to 10.