Networking method and electronic equipment

By sending the first broadcast to indicate the connection status, the problem that the electronic device cannot actively connect due to a fault is solved, and timely connection recovery and equipment coordination are achieved in the case of a fault.

CN120475554APending Publication Date: 2025-08-12HONOR DEVICE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411296955.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-08-12

AI Technical Summary

Technical Problem

When an electronic device fails due to a failure, it cannot be connected and disconnected in time, resulting in the equipment coordinated operation.

Method used

The first broadcast is sent through the first electronic device, indicating whether the other electronic devices are disconnected from it, allowing the non-line electronic devices to actively connect and maintain the connection.

Benefits of technology

It realizes timely recovery of connections when electronic equipment fails, ensuring the smooth progress of coordinated equipment operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120475554A_ABST
    Figure CN120475554A_ABST
Patent Text Reader

Abstract

The embodiment of the invention relates to the field of communication, in particular to a networking method and electronic equipment. The first electronic equipment can indicate whether the connection between the electronic equipment such as third electronic equipment and the first electronic equipment is disconnected or not through the first broadcast. The electronic equipment receives the first broadcast, and when the connection between the electronic equipment and the first electronic equipment is disconnected, the first electronic equipment is actively connected, and the connection between the electronic equipment and the first electronic equipment is recovered in time, so that a user can carry out equipment cooperative operation conveniently.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communications, and in particular to a networking method and electronic device. Background Art

[0002] With the widespread use of smart devices and the rapid development of Internet technology, multiple electronic devices can now transfer data to each other, achieving device collaboration. Device collaboration can include various collaborative services such as application continuation, screen sharing, call sharing, notification sharing, keyboard and mouse sharing, camera sharing, and network sharing.

[0003] Before device collaboration, multiple electronic devices can form a network, and multiple electronic devices in the network can communicate with each other. Any electronic device in the network, such as the first electronic device, can proactively connect to the third electronic device in a timely manner when it recognizes that other electronic devices in the network, such as the third electronic device, are disconnected from the first electronic device, so that the first electronic device is connected to the third electronic device. This helps the user initiate device collaboration in the first electronic device. However, when the first electronic device fails, if the connection between the third electronic device and the first electronic device is disconnected, the first electronic device cannot proactively connect to the third electronic device in a timely manner, which is not conducive to the user initiating device collaboration between electronic devices. Summary of the Invention

[0004] Embodiments of the present application provide a networking method and electronic device, wherein a first electronic device can, through a first broadcast, indicate to an electronic device, such as a third electronic device, whether the connection with the first electronic device is disconnected. The electronic device receives the first broadcast and, if the connection with the first electronic device is disconnected, proactively connects to the first electronic device and promptly restores the connection between the electronic device and the first electronic device, thereby facilitating user-interactive device collaboration.

[0005] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0006] In a first aspect, a networking method is provided, applied to a first electronic device. The method includes: establishing a communication connection with at least one second electronic device; sending a first broadcast indicating a third electronic device among the at least one second electronic device that has lost its communication connection with the first electronic device; receiving a connection request from the third electronic device; and reestablishing a communication connection with the third electronic device in response to the connection request.

[0007] In this application, a first electronic device instructs other electronic devices to actively connect to it through a first broadcast. This maintains the connection between the electronic device and the first electronic device, making it easier for users to trigger device collaboration between the electronic devices. In particular, if the first electronic device cannot actively connect to other electronic devices due to a malfunction, the first electronic device can instruct the other electronic device to actively connect to it, thereby maintaining the connection between the electronic device and the first electronic device.

[0008] In a possible implementation of the first aspect, the first broadcast is also used to indicate at least one second electronic device whose communication connection with the first electronic device has not been disconnected. The first broadcast includes at least one bit corresponding to the device identification of at least one second electronic device. The value of the bit is used to indicate whether the communication connection between the second electronic device corresponding to the bit and the first electronic device is disconnected, and the bit corresponding to the third electronic device is used to indicate that the communication connection between the third electronic device and the first electronic device is disconnected. The first electronic device can conveniently notify the second electronic device whether the connection with the first electronic device is disconnected by assigning different values to the bit corresponding to the second electronic device. For example, when the value of the bit is the first value, it indicates that the communication connection between the electronic device corresponding to the bit and the first electronic device has not been disconnected. The first value can be 1. When the value of the bit is the second value, it indicates that the communication connection between the electronic device corresponding to the bit and the first electronic device is disconnected. The first value can be 0.

[0009] In one possible implementation of the first aspect, the first broadcast includes a device identifier of the third electronic device. The device identifier uniquely identifies an electronic device. By including only the device identifier of the third electronic device, not only can the third electronic device be notified to connect to the first electronic device in a timely manner, but the data volume of the first broadcast can also be reduced, thereby reducing power consumption.

[0010] In one possible implementation of the first aspect, the first electronic device and at least one second electronic device are within the same trust ring; the device identifier is a device number; and the device number is used to uniquely identify an electronic device within the trust ring. Mutually trusting electronic devices can be added to the same trust ring, and data transmission between electronic devices within the same trust ring can be more secure.

[0011] In one possible implementation of the first aspect, before sending the first broadcast, the first electronic device identifies whether the communication connection between the first electronic device and at least one second electronic device is disconnected. If the communication connection between the first electronic device and any of the at least one second electronic devices is disconnected, the first broadcast is sent. The first broadcast is sent only if the presence of a third electronic device is identified, thereby reducing the number of first broadcast transmissions and reducing power consumption.

[0012] In one possible implementation of the first aspect, a first electronic device is logged into a first account, and at least one second electronic device, except a fourth electronic device, is logged into the first account. The first electronic device and / or the remaining electronic devices may apply for the fourth electronic device to join the trust ring corresponding to the first account and obtain the device number of the fourth electronic device.

[0013] For example, before sending the first broadcast, the first electronic device sends a first request message to the server, where the first request message is used to request that the fourth electronic device be added to the trust ring corresponding to the first account; receive the device number of the fourth electronic device sent by the server; and receive the device numbers of the electronic devices sent by at least one second electronic device other than the fourth electronic device. In this application, an electronic device that has logged in to an account, such as the first electronic device or the second electronic device, can apply for a device number for an electronic device that has not logged in to an account, such as the fourth electronic device.

[0014] For example, the remaining electronic devices can send a first request message to the server, where the first request message is used to request that the fourth electronic device be added to the trust ring corresponding to the first account; receive the device number of the fourth electronic device sent by the server; and receive the device number of the electronic device sent by other electronic devices in at least one second electronic device except the fourth electronic device.

[0015] In a possible implementation of the first aspect, the first electronic device and / or the remaining electronic devices may send the device number of the fourth electronic device to the fourth electronic device.

[0016] In the case that the remaining electronic devices obtain the device number of the fourth electronic device from the server, before sending the first broadcast, the first electronic device may further receive the device number of the fourth electronic device sent by the fourth electronic device.

[0017] In a second aspect, a networking method is provided, which is applied to a third electronic device. The method further includes: receiving a first broadcast sent by a first electronic device, the first broadcast indicating that at least one second electronic device has a communication connection disconnected with the first electronic device, the electronic device including the third electronic device; and sending a connection request to the first electronic device, the connection request being used to request establishing a communication connection with the first electronic device.

[0018] In this application, a third electronic device can receive a first broadcast sent by a first electronic device. Because the first broadcast indicates that the third electronic device is disconnected from the first electronic device, the third electronic device can actively connect to the first electronic device. This maintains the connection between the electronic device and the first electronic device, making it easier for the user to trigger device collaboration with the electronic device.

[0019] In a possible implementation of the second aspect, the first broadcast is also used to indicate an electronic device among at least one second electronic device whose communication connection with the first electronic device has not been disconnected; the first broadcast includes at least one bit corresponding to the device identification of the at least one second electronic device; the value of the bit is used to indicate whether the communication connection between the second electronic device corresponding to the bit and the first electronic device is disconnected, and the bit corresponding to the third electronic device is used to indicate that the communication connection between the third electronic device and the first electronic device is disconnected.

[0020] In a possible implementation manner of the second aspect, the first broadcast includes a device identification of the third electronic device.

[0021] In a possible implementation of the second aspect, the first electronic device and the at least one second electronic device are electronic devices within the same trust ring; the device identifier is a device number; and the device number is used to uniquely identify an electronic device within the trust ring.

[0022] In a possible implementation of the second aspect, when a third electronic device logs in to the first account, before receiving the first broadcast sent by the first electronic device, a second request message is sent to the server, where the request message is used to request that the third electronic device be added to the trust ring corresponding to the first account; the device number of the third electronic device sent by the server is received; and the device number of the third electronic device is sent to the first electronic device.

[0023] In a possible implementation of the second aspect, when the third electronic device is not logged in to the first account, before receiving the first broadcast sent by the first electronic device, a second broadcast is sent, and the second broadcast is used for the first electronic device and / or the remaining electronic devices except the third electronic device in at least one second electronic device to obtain the device identification of the third electronic device from the server.

[0024] In a third aspect, a networking system is provided, comprising a first electronic device and at least one second electronic device, wherein the first electronic device is used to execute any method of the first aspect; and the at least one second electronic device includes a third electronic device, wherein the third electronic device is used to execute any method of the second aspect.

[0025] In a fourth aspect, an electronic device is provided, comprising: a memory, a wireless communication module, and one or more processors; the wireless communication module receives and sends data according to the control of the processor to realize communication between the electronic device and other electronic devices; the memory is coupled to the processor; wherein the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes a method as described in any one of the first aspect and / or the second aspect.

[0026] In a fifth aspect, a chip system is provided, which can be applied to an electronic device including a memory. The chip system includes one or more interface circuits and one or more processors. The interface circuit and the processor are interconnected via a circuit. The interface circuit is configured to receive a signal from the memory and send the signal to the processor, the signal including computer instructions stored in the memory. When the processor executes the computer instructions, the electronic device performs the method of the first aspect and / or the second aspect, and any possible design thereof.

[0027] In a sixth aspect, a computer-readable storage medium is provided, comprising computer instructions, which, when executed on an electronic device, causes the electronic device to execute a method as described in any one of the first and / or second aspects.

[0028] In a seventh aspect, a computer program product comprises a computer program / instruction, wherein when the computer program / instruction is executed by a processor, the steps of any one of the methods of the first aspect and / or the second aspect are implemented.

[0029] To be understood, the beneficial effects that can be achieved by the networking system of the third aspect, the electronic device of any possible design of the fourth aspect, the chip system of the fifth aspect, the computer-readable storage medium of the sixth aspect, and the computer program product of the seventh aspect can be referred to the beneficial effects in the first and second aspects and any possible design thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 A schematic diagram of a communication network provided in an embodiment of the present application;

[0031] Figure 2 A schematic diagram of a display interface provided in an embodiment of the present application;

[0032] Figure 3 A schematic diagram of an interface for triggering electronic devices to perform device collaboration provided in an embodiment of the present application;

[0033] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

[0034] Figure 5 A schematic diagram of the software architecture of an electronic device provided in an embodiment of the present application;

[0035] Figure 6 A schematic diagram of a method for multiple electronic devices to join a trust ring and form a self-organized network according to an embodiment of the present application;

[0036] Figure 7 A flowchart of a networking method provided in an embodiment of the present application;

[0037] Figure 8 A schematic diagram of the correspondence between bits and device numbers provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] With the popularization of smart devices and the rapid development of Internet technology, different electronic devices can transfer data to each other, realizing device collaboration. Device collaboration can include various collaborative services such as application continuation, screen sharing, call sharing, notification sharing, keyboard and mouse sharing, camera sharing, and network sharing.

[0039] Electronic devices need to establish a connection before performing device collaboration. The connection can be a wired connection or a wireless connection. For example, multiple electronic devices establish a wired connection through a universal serial bus (USB). For another example, when multiple electronic devices turn on the Bluetooth function and the distance between the electronic devices is within a preset distance, multiple electronic devices can establish a Bluetooth connection. For another example, after multiple electronic devices turn on the wireless local area network (WLAN) function and access the same local area network through a wireless access point (AP), multiple electronic devices establish a Wi-Fi connection. Multiple electronic devices can synchronize data through the established connection to achieve device collaboration.

[0040] Optionally, the above-mentioned multiple electronic devices can be electronic devices within the same trust ring. Multiple electronic devices can establish a trust relationship through trusted authentication to form a trust ring. There are many ways for multiple electronic devices to form a trust ring. For example, multiple electronic devices log in to the same account, and multiple electronic devices under the same account trust each other, and these multiple electronic devices form a trust ring. For another example, multiple electronic devices do not log in to the same account, and multiple electronic devices perform trusted authentication through a protocol, establish a trust relationship, and form a trust ring. For example, Figure 1 As shown, mobile phones, smart watches, tablets, smart TVs, and personal computers (PCs) form a trust ring by logging into the same account.

[0041] The electronic device has a device collaboration function. In response to the user's operation, the electronic device can turn on the device collaboration function. Or the device collaboration function of the electronic device can be turned on by default. The following describes this solution using the example of a mobile phone as an electronic device. Figure 2As shown, in response to the user's operation of opening the setting application (application, APP), the mobile phone displays the interface 201 of the setting APP. Interface 201 includes a list of setting items, which includes a setting item for opening the device collaboration function. The name of the setting item may be, for example, smart interconnection. In response to the user clicking on the setting item, the mobile phone displays interface 202. Interface 202 includes control 1, which is used to open the device collaboration function of the mobile phone. In response to the user's operation on control 1, the mobile phone opens the device collaboration function, and the mobile phone can display interface 203. Interface 203 displays the names of multiple collaborative services supported by the electronic device and the activation status of each of the multiple collaborative services.

[0042] After turning on the device collaboration function and wireless communication function, the electronic devices in the trust ring can self-organize the network. For example, the mobile phone can discover the surrounding electronic devices and establish a connection with the electronic devices that are in the same trust ring as the mobile phone among the discovered electronic devices. After the connection is established, the mobile phone can authenticate with the electronic device, and after the authentication is passed, the electronic device is added to the device list of the mobile phone. In addition, the mobile phone can also display the identification of the electronic device on the interface of the device collaboration APP. After mutual authentication is passed, the self-organizing network of the electronic devices in the trust ring is completed. Take the device collaboration APP as an example, if Figure 3 As shown, after the mobile phone establishes a connection with the tablet and PC and passes authentication, the tablet's logo and the PC's logo are displayed in the Trust Ring app's application card 302. In response to the user clicking on application card 302, the mobile phone displays the Trust Ring app's control interface 303. Control interface 303 displays the tablet's logo and the PC's logo. Enabling wireless communication functions on an electronic device means enabling the WLAN function and / or Bluetooth function on the electronic device.

[0043] After the electronic devices in the trust ring form a self-organized network, it is necessary to maintain the online status between the electronic devices (i.e., keep alive). Any electronic device in the network, such as a mobile phone, can periodically identify the status of other electronic devices in the same trust ring. The status includes online and offline. Among them, online can be understood as the electronic device being within the coverage of the mobile phone's communication network, or the electronic device and the mobile phone are in a connected state, and the mobile phone and the electronic device can communicate. Offline can be understood as the electronic device is not within the coverage of the mobile phone's communication network or the electronic device and the mobile phone are in an unconnected state, and the mobile phone and the electronic device cannot communicate.

[0044] The reason why the electronic device is offline may be due to network instability. Among them, network instability includes one or more of the network instability of the mobile phone, the network instability of the electronic device, network congestion, the electronic device being interfered with by the signal, and the mobile phone being interfered with by the signal. Among them, when the electronic device is offline due to network instability, after the mobile phone actively connects to the electronic device, the electronic device can be back online. For example, if the electronic device is offline due to network instability, the network may return to normal after waiting for a period of time, such as 10 seconds. After the mobile phone actively connects to the electronic device, the mobile phone can re-establish the connection with the electronic device so that the electronic device can be back online. Among them, when the electronic device is offline, the interface of the device collaboration APP of the mobile phone may not display the logo of the electronic device. After the electronic device is back online, the mobile phone can redisplay the logo of the electronic device on the interface of the device collaboration APP of the mobile phone, so that the user can trigger device collaboration between electronic devices.

[0045] However, when a mobile phone malfunctions, it cannot actively connect to the electronic device to restore it online. This results in the electronic device being unable to come back online after being offline. Even if the network returns to normal after a period of time, the electronic device cannot be online and cannot cooperate with the mobile phone. The mobile phone malfunction may include, for example, a software failure, a hardware failure, or the number of electronic devices to which the mobile phone is actively connected reaching a preset number, or a combination thereof.

[0046] To this end, an embodiment of the present application provides a networking method. The method is applied to a first electronic device, and the first electronic device and at least one second electronic device establish a connection. The first electronic device can send a first broadcast, and the first broadcast is used to indicate a third electronic device in at least one second electronic device whose communication connection with the first electronic device is disconnected. The third electronic device can receive the first broadcast and actively connect to the first electronic device. In this way, the first electronic device and the third electronic device can re-establish a connection. In this way, when the first electronic device cannot actively connect to the offline third electronic device due to a malfunction, the first electronic device can allow the offline third electronic device to actively connect to the first electronic device, thereby maintaining the connection between the third electronic device and the first electronic device, so that the user can trigger device collaboration between the electronic devices. In an embodiment of the present application, the first electronic device cannot actively connect to other electronic devices due to a malfunction, but the first electronic device has the ability to send a first broadcast, and the first electronic device instructs the offline third electronic device to actively connect to itself through the first broadcast.

[0047] The method provided in the embodiment of the present application can be applied to electronic devices with data processing capabilities, such as the first electronic device mentioned above. Electronic devices such as (the first electronic device and the second electronic device) may include mobile phones, tablet computers, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), handheld computers, netbooks, smart home devices (such as smart TVs, smart screens, large screens, smart speakers, smart air conditioners, etc.), personal digital assistants (PDAs), wearable devices (such as smart watches, smart bracelets, etc.), vehicle-mounted devices, virtual reality devices, etc., and the embodiment of the present application does not impose any restrictions on this. In the embodiment of the present application, the above-mentioned electronic device is an electronic device that can run an operating system and install applications. Optionally, the operating system running on the electronic device can be system, system, System, etc.

[0048] Take the mobile phone as an example. Figure 4 As shown, the electronic device 400 may include: a processor 410, a memory 420, a universal serial bus (USB) interface 430, a power management module 440, antennas such as antenna 1 and antenna 2, a communication module 450, a display screen 460, an audio module 470, a camera 480, a sensor module 490, etc.

[0049] The processor 410 may include one or more processing units, for example: the processor 410 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices or integrated into one or more processors. The controller can be the nerve center and command center of the electronic device 400. The controller can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.

[0050] The memory 420 can be used to store computer executable program codes, which include instructions. The processor 410 executes various functional applications and data processing of the electronic device by running the instructions stored in the memory 420. The memory 420 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an interface display function, etc.). The data storage area can store data created during the use of the electronic device (such as notification messages), etc. In addition, the memory 420 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.

[0051] The power management module 440 is used to connect the battery to the processor 410. The power management module 440 receives battery and / or power input to power the processor 410, memory 420, communication module 450, display 460, camera 480, and the like. The power management module 440 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In other embodiments, the power management module 440 can also be provided within the processor 410.

[0052] The communication module 450 can provide wireless communication solutions for the electronic device 400, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The communication module 450 can be one or more devices that integrate at least one communication processing module. The communication module 450 receives electromagnetic waves via an antenna, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 410. The communication module 450 can also receive signals to be transmitted from the processor 410, frequency modulate them, amplify them, and convert them into electromagnetic waves for radiation through the antenna. In this embodiment of the present application, the wireless communication module 450 can establish one or more connections including Wi-Fi, Bluetooth, and Wi-Fi peer-to-peer (P2P) connections with the wireless communication modules of other electronic devices. The wireless communication module 450 can also send signals to electronic devices with which a connection has been established.

[0053] In some embodiments, the antenna of the electronic device 400 is coupled to the communication module 450 so that the electronic device 400 can communicate with a network and other devices via wireless communication technologies. The wireless communication technologies 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, global navigation satellite system (GNSS), WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), Beidou navigation satellite system (BDS), global navigation satellite system (GLONASS), and / or Galileo satellite navigation system (GALILEO).

[0054] Electronic device 400 implements display functionality through a GPU, display screen 460, and an application processor. The GPU is a microprocessor for image processing that connects display screen 460 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 410 may include one or more GPUs that execute program instructions to generate or modify display information.

[0055] Display screen 460 is used to display images, videos, etc. Display screen 460 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Mini-LED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc.

[0056] The electronic device 400 can implement a shooting function through an ISP, a camera 480, a video codec, a GPU, a display screen 460, and an application processor.

[0057] The audio module 470 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 470 can also be used to encode and decode audio signals. In some embodiments, the audio module 470 can be provided in the processor 410, or some functional modules of the audio module 470 can be provided in the processor 410.

[0058] Camera 480 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then passed to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB or YUV.

[0059] The sensor module 490 may include a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, and a bone conduction sensor, etc.

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

[0061] Take the above electronic device 400 as an example, which is a mobile phone. The software system of the electronic device 400 can adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. Taking the system as an example, the software structure of the electronic device 400 is exemplified.

[0062] Figure 5 It is a software structure block diagram of the electronic device 400 according to an embodiment of the present application.

[0063] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: application layer, application framework layer, system library layer, and kernel layer, from top to bottom.

[0064] The application layer can include a series of application packages. Application packages can include camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, desktop launcher and other applications. Figure 5 As shown, in an embodiment of the present application, the application layer can collaborate with the APP.

[0065] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 5 As shown, the application framework layer may include a Wi-Fi service module, a Bluetooth service module, and an input system.

[0066] The Wi-Fi service module provides a set of interfaces for applications or other software modules to control Wi-Fi. For example, applications or other software modules use these interfaces to call the Wi-Fi service module to perform operations such as discovering devices, connecting to devices, and establishing Wi-Fi connections.

[0067] The Bluetooth service module provides a set of interfaces for applications or other software modules to control Bluetooth. For example, the Bluetooth service module can be called through these interfaces to enable operations such as turning Bluetooth on and off, searching for and pairing with other devices, and establishing Bluetooth connections.

[0068] The input system is used to monitor the user's operation on the touch screen of the electronic device 400, and convert the parameters input by the touch screen driver into usable events, and pass them to the relevant modules in the upper layer. For example, the input system is used to monitor the touch screen of the electronic device 400 through the touch screen driver, and convert the touch parameters generated by the user's touch operation input through the touch screen into usable events, and pass them to the device collaboration app in the upper layer.

[0069] The system library includes the core library and the virtual machine. The Android Runtime is responsible for scheduling and management of the Android system.

[0070] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0071] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0072] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0073] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0074] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

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

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

[0077] The kernel layer is the layer between hardware and software. The kernel layer may include touch screen drivers, display drivers, audio drivers, sensor drivers, etc.

[0078] The following describes a networking method and electronic device provided by an embodiment of the present application in conjunction with specific embodiments and drawings. In an embodiment of the present application, an electronic device logs in to an account, and when the device collaboration function and the wireless communication function are turned on, the electronic device can apply to join the trust ring of the logged-in account. For example, when the device collaboration APP is started for the first time, the electronic device can interact with the server on the cloud side and apply to join the trust ring of the logged-in account. For example, take the electronic device as a mobile phone. The mobile phone logs in to the account, and after the device collaboration function and the wireless communication function are turned on for the first time, the device collaboration APP starts automatically. After the device collaboration APP starts automatically, it applies to the server to join the trust ring corresponding to the account logged in by the mobile phone. Among them, turning on the wireless communication function of the electronic device can be understood as the electronic device turning on the WLAN function and / or Bluetooth function.

[0079] After the wireless communication function is turned on, multiple electronic devices can form a trust ring and form a network. The multiple electronic devices may include a first electronic device and at least one second electronic device. For example, the first electronic device is a mobile phone, and the second electronic device is a tablet computer and a PC. Figure 6 This paper introduces a method for multiple electronic devices to form a trust ring and establish connections. Figure 6 In the example, the mobile phone, tablet computer, and PC all have enabled device collaboration and wireless communication functions. A first electronic device, such as a mobile phone, is logged into a first account, a tablet computer is logged into the first account, and a fourth electronic device, such as a PC, is not logged into the first account.

[0080] S1. The mobile phone turns on the device collaboration function and wireless communication function, and starts the device collaboration APP.

[0081] Figure 2 Shows how to enable device collaboration. Figure 2 Alternatively, the device collaboration function of the mobile phone can be enabled by default without the user having to manually enable it.

[0082] The mobile phone includes a switch for turning on the WLAN function. In response to the user turning on the switch, the mobile phone turns on the WLAN function. The mobile phone also includes a switch for turning on the Bluetooth function. In response to the user turning on the switch, the mobile phone turns on the Bluetooth function.

[0083] S2: The tablet computer turns on the device collaboration function and wireless communication function, and starts the device collaboration APP.

[0084] Figure 2 This shows how to enable the device collaboration function on mobile phones. For tablets, you can refer to Figure 2The device collaboration function is enabled in the manner shown. Optionally, the device collaboration function of the tablet can be enabled by default, without the user having to manually enable it. The method for enabling the wireless communication function of a tablet is similar to that of a mobile phone and will not be repeated here.

[0085] S3: The PC turns on the device collaboration function and wireless communication function, and starts the device collaboration app.

[0086] The device collaboration function of the PC can be enabled by default, without the need for the user to manually enable it. The method of enabling the wireless communication function of the PC is similar to that of the mobile phone and will not be repeated here.

[0087] The device collaboration app on mobile phones and tablets can be the Trust Ring app. The device collaboration app on PCs can be the PC Manager app. After the device collaboration function and wireless communication function are enabled, the device collaboration app can automatically start.

[0088] This application does not limit the execution order of S1, S2, and S3. For example, the execution order may be: the tablet executes S2, the PC executes S3, and the mobile phone executes S1. For another example, the execution order may be: the mobile phone executes S1, the PC executes S3, and the tablet executes S2. The following description uses the sequential execution of S1, S2, and S3 as an example.

[0089] S4: The mobile phone sends broadcast 1, the tablet sends broadcast 2, and the PC sends broadcast 3.

[0090] After an electronic device activates its wireless communication function, it can send a broadcast, such as a mobile phone, tablet, or PC, to discover the device. Each broadcast (Broadcast 1, Broadcast 2, or Broadcast 3) includes a first identifier or a second identifier. The first identifier is used to indicate that the device is logged into an account. The second identifier is used to indicate that the device is not logged into an account. For example, the first identifier can be 11, and the second identifier can be 00. Specifically, Broadcast 1 includes the first identifier, Broadcast 2 includes the first identifier, and Broadcast 3 includes the second identifier. The broadcast may also include basic device information. Basic device information may include one or more of the following: device identity document (ID), device name, device type, and Universally Unique Identifier (UUID). Furthermore, if the electronic device is logged into an account, the basic device information also includes the account information of the account logged into. The account information may include the account name and password. If the WLAN function is enabled on the electronic device, the broadcast may be a Wi-Fi broadcast. If the Bluetooth function is enabled on the electronic device, the broadcast may be a Bluetooth broadcast. If both the WLAN and Bluetooth functions are enabled on the electronic device, the broadcast may be a Wi-Fi broadcast and / or a Bluetooth broadcast. After the mobile phone sends Broadcast 1, the tablet and PC can monitor Broadcast 1. After the tablet sends Broadcast 2, the mobile phone and PC can monitor Broadcast 2. After the PC sends Broadcast 3, the mobile phone and tablet can monitor Broadcast 3. This application does not limit the order in which multiple electronic devices send broadcasts. For example, a mobile phone, tablet, and PC can send broadcasts in sequence.

[0091] S5, the mobile phone sends request 1 to the server.

[0092] Request 1 is used to request to join the trust ring corresponding to the first account. Request 1 includes: the account name and password of the first account logged in by the mobile phone, basic information of the mobile phone, etc.

[0093] S6. In response to request 1, the server adds the mobile phone to the trust ring corresponding to the first account.

[0094] Optionally, the server verifies the account logged in by the mobile phone based on the account name and password in Request 1. After the verification is successful, the server adds the mobile phone to the trust ring corresponding to the account. For example, when a user creates a first account on an electronic device, the electronic device sends the account name and password of the first account created by the user to the server. The server saves the account name and password of the first account. The server can compare the received account name and password with the previously saved account name and password to see if they are consistent. If they are consistent, the server verifies that the account is successful.

[0095] A trust ring can be a data set, and the server adding an electronic device to the trust ring can be understood as the server adding the information of the electronic device to the trust ring data set. The trust ring data set includes the account name, and the device number and basic information of the electronic devices included under the account. The trust ring data set indicates that multiple devices logged into the account are trustworthy and can perform device self-networking based on the trust ring technology. The trust ring data set can be, for example, a data table. Exemplarily, the data table can be as shown in Table 1. The device number is created by the server. The device number is used to uniquely mark an electronic device in the trust ring corresponding to the first account. The device number of an electronic device within a trust ring is unique. Exemplarily, the server receives a request sent by the electronic device to apply to join the trust ring corresponding to the account, and after verification, creates a device number for the electronic device. After creating the device number, the server can add the basic information and device number of the device to the trust ring data set.

[0096] Table 1

[0097]

[0098] Specifically, consider an electronic device, such as a mobile phone, applying to join a trust ring corresponding to a first account. After receiving a request 1 from the mobile phone requesting to join the trust ring corresponding to the first account, the server can first determine whether a trust ring dataset has already been created for the first account. For example, the server can compare the first account with accounts in the already created trust ring datasets. If the accounts in the already created trust ring datasets do not include the first account, the server determines that no trust ring dataset has been created for the first account. For example, consider the case where a mobile phone, tablet, and PC are all launching a device collaboration app for the first time. Since this is the first time the app is launched, the accounts in the already created trust ring datasets do not include the first account. The server can then create a corresponding trust ring dataset for the first account. For example, the server can create a data table as shown in Table 1, where the data column in the data table indicates the first account, and the remaining information is blank. The server then creates a device number for the mobile phone. For example, the device number for the mobile phone can be 001. Finally, the server adds the mobile phone to the trust ring corresponding to the first account. For example, the server adds the basic information and device number of the mobile phone to the trust ring dataset. Taking the trust ring dataset as shown in Table 1 as an example, the server can read the device name and UUID from the basic information of the mobile phone and fill the device name and UUID into the data column of Table 1. The server can also fill the device number of the mobile phone into the data column of Table 1.

[0099] S7, the server sends the device number of the mobile phone to the mobile phone.

[0100] After the server adds the mobile phone to the trust ring corresponding to the first account, the server may send the device number of the mobile phone to the mobile phone.

[0101] S8, the phone receives the device number and saves it.

[0102] S9, the tablet sends request 2 to the server.

[0103] Request 2 is used to request to join the trust ring corresponding to the first account. Request 2 is similar to Request 1 and will not be repeated here.

[0104] S10 , in response to request 2 , the server adds the tablet computer to the trust ring corresponding to the first account.

[0105] Optionally, the server verifies the account logged in by the tablet computer based on the account name and password. After the verification is passed, the server adds the tablet computer to the trust ring corresponding to the account.

[0106] The server can first identify whether a corresponding trust ring dataset has been created for the first account. Since the server has already created a trust ring dataset for the first account in S6, the server can identify that a trust ring dataset corresponding to the first account has been created. The server can create a device number for the tablet computer. This device number can be incremented or decremented from the already created device number. For example, the device number of the tablet computer can be 002. After creating the device number, the server adds the tablet computer to the trust ring dataset corresponding to the first account. The corresponding implementation is similar to the specific implementation of the server adding the mobile phone to the trust ring dataset corresponding to the first account, and will not be repeated here.

[0107] S11, the server sends the device ID of the tablet computer to the tablet computer.

[0108] After the server adds the tablet computer to the trust ring corresponding to the first account, the server may send the device number of the tablet computer to the tablet computer.

[0109] S12, the tablet computer receives and saves the device number.

[0110] In this way, electronic devices such as mobile phones and tablets that log in to the same account can join the same trust circle after the device collaboration APP is started for the first time. Since the fourth electronic device has not logged in to the first account, the second broadcast sent by the fourth electronic device, such as Broadcast 3, includes a second identifier, and the mobile phone and / or tablet can apply for the device number of the fourth electronic device from the server. In response to Broadcast 3, the mobile phone and / or tablet can send a first request message such as Request 3 to the server, and the first request message is used to request to obtain the device number of the fourth electronic device. After the mobile phone and / or tablet receives the device number of the fourth electronic device sent by the server, the mobile phone and / or tablet can send the device number of the fourth electronic device to the fourth electronic device. The embodiment of the present application takes the mobile phone sending Request 3 as an example.

[0111] S13, the mobile phone monitors broadcast 3 and sends request 3 to the server.

[0112] Request 3 includes the account name and password of the first account logged in by the mobile phone, and basic information of the PC.

[0113] Broadcast 3 includes basic information of the PC. The mobile phone directly reads the basic information and carries it in request 3 and sends it to the server.

[0114] S14, in response to request 3, the server adds the PC to the trust ring corresponding to the first account.

[0115] Optionally, the server verifies the account logged in by the mobile phone based on the account name and account password in request 3. After the verification is passed, the server adds the PC to the trust ring corresponding to the account. The server can first identify whether the first account has created a corresponding trust ring data set. Since the server has already created a trust ring data set for the first account in S6, the server can identify that a trust ring data set corresponding to the first account has been created. The server can create a device number for the PC, which can be 003, for example. After creating the device number, the server adds the PC to the trust ring data set corresponding to the first account. The corresponding implementation is similar to the specific implementation of the server adding the mobile phone to the trust ring data set corresponding to the first account, and will not be repeated here.

[0116] S15, the server sends the device ID of the PC to the mobile phone.

[0117] After the server adds the PC to the trust ring corresponding to the first account, the server may send the device number of the PC to the mobile phone.

[0118] S16, the mobile phone receives the device number of the PC and sends the device number of the PC to the PC.

[0119] S17, the PC receives and saves the device number.

[0120] Optionally, the server can send a trust ring dataset to the electronic devices in the trust ring. For example, for a trust ring, each time a new electronic device is added to the trust ring, the server sends an updated trust ring dataset to the existing electronic devices in the trust ring. For another example, after launching the device collaboration app, the electronic device can actively obtain the trust ring dataset corresponding to the trust ring it has joined from the server. In this way, the electronic device can save the basic information and device numbers of the electronic devices in the same trust ring.

[0121] After executing S1-S17, the mobile phone, tablet computer and PC are all within the trust circle corresponding to the first account, and each electronic device within the trust circle includes a corresponding unique device number.

[0122] Figure 6 Taking three electronic devices as an example, a method for electronic devices to join the same trust ring is introduced. In some embodiments, the maximum number of electronic devices allowed to join the same trust ring can be configured by the developer. For example, if the same trust ring includes seven electronic devices, then the device numbers of the electronic devices added to the trust ring can be 001, 002, ..., 007 in sequence. If a three-bit identifier is used, the device numbers can be 000, 010, ..., 111 in sequence. When the total number of requests to join the trust ring is greater than the maximum number, the server may not add the electronic device that sent the request to the trust ring.

[0123] Electronic devices in the same trust ring can also form a self-network when the device collaboration function and wireless communication function are turned on. The process of self-networking may include device discovery, device connection and device authentication. Among them, device discovery refers to the discovery of surrounding devices. Device authentication refers to the device authenticating the discovered peripheral devices. After the connection is established, the device and the connected peripheral device communicate with each other by sending messages, so that the device and the peripheral device always maintain a connection relationship. Before performing device collaboration, the mobile phone, tablet computer and PC need to execute the method shown in S1-S17 to join the trust ring corresponding to the first account, and execute the method described in S18-S23 to connect and authenticate each other. Optionally, the mobile phone, tablet computer and PC may first establish a communication connection, and before mutual authentication, the mobile phone, tablet computer and PC execute the method shown in S1-S17 to join the trust ring corresponding to the first account. That is, before authentication, the electronic device can establish a connection and join the trust ring. This application does not limit the order of establishing the connection and joining the trust ring. Exemplarily, the above method also includes:

[0124] S18: The mobile phone and the tablet computer establish a first connection.

[0125] For example, after the mobile phone monitors the tablet computer's broadcast 2, the mobile phone establishes a first connection with the tablet computer. Alternatively, after the tablet computer monitors the mobile phone's broadcast 1, the tablet computer establishes a first connection with the mobile phone. The first connection can be a Bluetooth connection or a Wi-Fi connection.

[0126] Exemplarily, when a mobile phone monitors broadcast 2 from a tablet computer, it may send a connection request 1 to the tablet computer. Connection request 1 includes the communication method supported by the mobile phone. When a tablet computer monitors broadcast 1 from a mobile phone, it may send a connection request 2 to the mobile phone. Connection request 2 includes the communication method supported by the tablet computer. Among them, the communication method supported by electronic devices such as mobile phones, tablet computers and PCs may be Wi-Fi communication and / or Bluetooth communication. Optionally, when the electronic device is connected to a Wi-Fi network, the connection request may also include the service set identifier (SSID) and password of the Wi-Fi network to which the electronic device is connected.

[0127] When the WLAN function and the Bluetooth function of the electronic device are turned on, the communication methods supported by the electronic device include Wi-Fi communication and Bluetooth communication. When the electronic device only turns on the WLAN function, the communication methods supported by the electronic device include Wi-Fi communication. When the electronic device only turns on the Bluetooth function, the communication methods supported by the electronic device include Bluetooth communication. The mobile phone and the tablet computer can negotiate to establish a first connection based on the communication method of the opposite device. It can be understood that the electronic device can obtain the communication method of the opposite end based on the connection request sent by the opposite end device. Take the example of the communication methods supported by the mobile phone including Wi-Fi communication and Bluetooth communication. When the communication method supported by the tablet computer is Bluetooth communication, the tablet computer establishes a Bluetooth connection with the mobile phone. For another example, when the communication method supported by the tablet computer is Wi-Fi communication and the tablet computer and the mobile phone are connected to the same Wi-Fi network, the tablet computer and the mobile phone have already established a Wi-Fi connection, and the mobile phone and the tablet computer do not need to perform any operations. For another example, if the tablet supports Wi-Fi communication and the tablet and the phone are connected to different Wi-Fi networks, the tablet can obtain the SSID and password of the Wi-Fi network to which the phone is connected, and the tablet can access the Wi-Fi network to which the phone is connected, thus establishing a Wi-Fi connection between the tablet and the phone. For another example, if the tablet supports Wi-Fi communication and the tablet and the phone are connected to different Wi-Fi networks, the tablet and the phone can establish a Bluetooth connection.

[0128] S19, the first authentication of mobile phones and tablets.

[0129] The authentication process may include steps such as same-account authentication and information exchange. Same-account authentication is used to verify whether the devices are logged into the same account. Broadcast 1 and Broadcast 2 both carry the account information of the account logged into by the device. The mobile phone and tablet can verify whether the account information carried in the broadcast of the other device is consistent with the account information of the logged-in account. If they are consistent, the same-account authentication is successful. After the same-account authentication is successful, the mobile phone sends the phone's device number and device information to the tablet, and the tablet sends the tablet's device number and device information to the mobile phone. This process can be called information exchange between devices. Information can include device number and device information.

[0130] Among them, the device information may include: ID, device name, device type, UUID, Media Access Control Address (MAC), account information of the account used to log in to the device, Internet Protocol Address (IP), port information of the device, etc. One or more of the following. In the case where the device has a wireless AP function, the device information may also include: SSID and password of the Wi-Fi hotspot, frequency band of the Wi-Fi hotspot and other information. The device having a wireless AP function means that the device can act as a wireless AP to transmit Wi-Fi signals outward. The wireless AP function may also be called a hotspot function. Among them, the device number of a mobile phone is, for example, 001, and the device number of a tablet is, for example, 002.

[0131] After the authentication is passed and the information sent by the tablet is received, the mobile phone can save the tablet information and add the tablet to the device list. Figure 3 As shown, the mobile phone can display the tablet computer's logo in the application card 302 of the control center, indicating that the tablet computer and the mobile phone are devices within the trust ring and a connection has been established. In addition, the mobile phone can display the tablet computer's logo on the control interface 303 of the trust ring APP, indicating that the mobile phone and the tablet computer are devices within the trust ring and a connection has been established. Similarly, after the authentication is passed and the information sent by the mobile phone is received, the tablet computer can save the mobile phone's information, and the tablet computer can add the mobile phone to the device list. The mobile phone's logo can be displayed on the interface of the tablet computer's device collaboration APP, indicating that the mobile phone and the tablet computer are devices within the trust ring and a connection has been established.

[0132] S20, the mobile phone establishes a second connection with the PC.

[0133] For example, after the mobile phone monitors the PC's broadcast 3, the mobile phone establishes a second connection with the PC. Alternatively, after the PC monitors the mobile phone's broadcast 1, the PC establishes a second connection with the mobile phone. The second connection can be either a Bluetooth connection or a Wi-Fi connection.

[0134] S21, the mobile phone and PC perform the second authentication.

[0135] Similarly, the authentication process may include steps such as same-account authentication and information exchange. In one embodiment, since the PC is not logged into the first account, the broadcast 3 it sends does not include any account information. In this case, the mobile phone and PC can perform same-account authentication based on the trust ring dataset corresponding to the first account. For example, the mobile phone and PC can obtain the trust ring dataset corresponding to the first account from a server. The mobile phone can search the trust ring dataset corresponding to the first account for basic information about the PC, such as the UUID. If the trust ring dataset corresponding to the first account includes the PC's UUID, the mobile phone successfully authenticates the PC. The PC can search the trust ring dataset corresponding to the first account for basic information about the mobile phone, such as the UUID. If the trust ring dataset corresponding to the first account includes the mobile phone's UUID, the PC successfully authenticates the mobile phone. For another example, the mobile phone and PC can exchange device identifiers. For example, after the mobile phone and PC establish a second connection, they can exchange device numbers through the second connection. Subsequently, the mobile phone can search the trust ring dataset corresponding to the first account for the PC's device number. If the trust ring dataset corresponding to the first account includes the PC's device number, the mobile phone successfully authenticates the PC. The PC can search the trust ring dataset corresponding to the first account for the mobile phone's device number. If the trust circle data set corresponding to the first account includes the device number of the mobile phone, the PC successfully authenticates the mobile phone. After the same account authentication is successful, the mobile phone and PC can perform an information exchange process to send their own device information and device number to the other device.

[0136] After the authentication is passed and the information sent by the PC is received, the mobile phone can save the PC information and add the PC to the device list. Figure 3 As shown, the mobile phone can display the PC's logo in the application card 302 of the control center, indicating that the PC and the mobile phone are devices in the trust ring and a connection has been established. In addition, the mobile phone can display the PC's logo on the control interface 303 of the trust ring APP. Similarly, after the authentication is passed and the information sent by the mobile phone is received, the PC can save the device information of the mobile phone and the PC can add the mobile phone to the device list. The mobile phone's logo can be displayed on the interface of the PC's device collaboration APP, indicating that the mobile phone and the PC are devices in the trust ring and a connection has been established.

[0137] S22: The tablet computer establishes a third connection with the PC.

[0138] For example, after the tablet computer monitors broadcast 3 of the PC, the tablet computer establishes a third connection with the PC. Alternatively, after the PC monitors broadcast 2 of the tablet computer, the PC establishes a third connection with the tablet computer.

[0139] The third connection is any one of a Wi-Fi connection or a Bluetooth connection. This embodiment of the application does not make specific limitations on this.

[0140] S23, the tablet computer and PC undergo third authentication.

[0141] The process of establishing a connection and authentication between the tablet computer and the PC can refer to the process of establishing a connection and authentication between the mobile phone and the PC, which will not be repeated here.

[0142] Similarly, after authentication is successful and the information sent by the PC is received, the tablet can save the PC's device information and add the PC to the device list. The PC's ID can be displayed on the device collaboration app interface on the tablet. After authentication is successful and the information sent by the tablet is received, the PC can save the tablet's device information and add the tablet to the device list. The tablet's ID can be displayed on the device collaboration app interface on the PC.

[0143] In this way, the mobile phone, tablet computer, and PC complete trusted authentication and networking. In this embodiment of the present application, an electronic device with a logged-in account, such as a mobile phone or tablet computer, can request from the server to add an electronic device without a logged-in account, such as a PC, to the same trust ring. In this way, electronic devices without logged-in accounts can also be added to the trust ring, making it easier to initiate device collaboration between devices.

[0144] Figure 6 The illustrated embodiment describes the process of establishing a network for the first time between a mobile phone, a tablet, and a PC. When establishing a network again, since the mobile phone, tablet, and PC are already in the trust ring corresponding to the first account, and with wireless communication enabled, the mobile phone and tablet can establish a first connection and perform a first authentication. The mobile phone and PC can then establish a second connection and perform a second authentication. The tablet and PC can then establish a third connection and perform a third authentication.

[0145] The foregoing describes a method for a first electronic device and at least one second electronic device to join a trust ring and establish a trusted connection. After the first electronic device and at least one second electronic device join a trust ring and establish a trusted connection, a networking method provided in an embodiment of the present application can be interactively implemented.

[0146] In some embodiments, the first electronic device and at least one second electronic device do not need to join a trust ring. After the first electronic device establishes a connection with the at least one second electronic device, the networking is completed, and the first electronic device and at least one second electronic device can interact to implement an application collaboration method provided in an embodiment of the present application.

[0147] After networking, the mobile phone can send a first broadcast, which is used to indicate a third electronic device in at least one second electronic device that has disconnected from the first electronic device. The third electronic device can be any electronic device in at least one second electronic device that has disconnected from the first electronic device. For example, the third electronic device can be a tablet computer, or the third electronic device can be a fourth electronic device such as a PC. The number of third electronic devices can be one or more. In other words, the third electronic device is part or all of the electronic devices in at least one second electronic device. After networking, the mobile phone establishes communication connections with both the PC and the tablet computer.

[0148] The first broadcast can be any one of Bluetooth broadcast and Wi-Fi broadcast. Figure 7 For example, Figure 7 The methods shown include:

[0149] S701, the mobile phone sends a first broadcast.

[0150] The first broadcast is used to indicate a third electronic device among at least one second electronic device whose communication connection with the first electronic device is disconnected.

[0151] As an example, the first broadcast includes the device identification of a third electronic device whose communication connection with the first electronic device is disconnected. The device identification is used to uniquely identify an electronic device. The device identification can be any one or more of an ID, a UUID, and a device number. When the first electronic device and at least one second electronic device are in the same trust ring, the device identification can be a device number. When the first electronic device and at least one second electronic device are not in the same trust ring, the device identification can be an ID and / or a UUID.

[0152] As another example, the first broadcast includes the device identifier and status identifier of each of the at least one second electronic device. The status identifier is used to mark the status of the electronic device. For example, if the status of an electronic device is online, the status identifier is 11. If the status of an electronic device is offline, the status identifier is 00. For example, if the PC is offline but the tablet is online, the first broadcast may include the PC's device number 003 and status identifier 00, and the tablet's device number 002 and status identifier 11. The PC's device number 003 corresponds to the status identifier 00, and the tablet's device number 002 corresponds to the status identifier 11. If both the PC and the tablet are offline, the first broadcast may include the PC's device number 003 and status identifier 00, and the tablet's device number 002 and status identifier 00. The PC's device number 003 corresponds to the status identifier 00, and the tablet's device number 002 corresponds to the status identifier 00. For another example, if the PC is offline but the tablet is online, the first broadcast may include the PC's UUID and status identifier 00, and the tablet's UUID and status identifier 11. The UUID of the PC corresponds to the status identifier 00, and the UUID of the tablet corresponds to the status identifier 11.

[0153] As another example, the first broadcast may include only the device identifier and status identifier of the third electronic device in the at least one second electronic device. For example, if the PC is offline but the tablet is online, the first broadcast may include the PC's UUID and status identifier. For another example, if the PC is offline but the tablet is online, the first broadcast may include the PC's device number 003 and status identifier.

[0154] As another example, the first broadcast is also used to indicate electronic devices in at least one second electronic device whose communication connection with the first electronic device is not disconnected. The first broadcast includes at least one bit, and the at least one bit is used to indicate the status of each second electronic device in the at least one second electronic device and the first electronic device. The at least one bit corresponds to at least one second electronic device. The value of the bit is used to indicate whether the communication connection between the second electronic device corresponding to the bit and the first electronic device is disconnected. The value of each bit can be 0 or 1. 1 indicates that the connection is not disconnected, and 0 indicates that the connection is disconnected. The bit corresponding to the third electronic device is used to indicate that the communication connection between the third electronic device and the first electronic device is disconnected.

[0155] For example, at least one bit corresponds one-to-one with at least one second electronic device. For example, a mobile phone is connected to eight second electronic devices, and the first broadcast includes eight bits, each of which indicates the status of each of the eight second electronic devices. In another example, the first broadcast includes at least one bit and bits corresponding to the first electronic devices. The at least one bit corresponds one-to-one with the device identifier of the at least one second electronic device. For example, if the device identifier is a device number, the first broadcast includes a first bit corresponding to the device number of the electronic devices that can be included in the trust ring corresponding to the first account. The first bit includes bits corresponding to the at least one bit and bits corresponding to the mobile phone. The mobile phone can then obtain the maximum number of electronic devices allowed to join the trust ring in which the mobile phone is located from the server and use this maximum number as the number of bits in the first bit. For example, if the maximum number is eight electronic devices, the number of bits in the first bit is eight. The first bit includes eight bits, each of which corresponds one-to-one with the device numbers in the trust ring. The first bit includes at least one bit corresponding one-to-one with the at least one second electronic device and bits corresponding to the mobile phone. Starting from the left or right of the first bit, the sequence number of each bit corresponds one-to-one with the device number. Taking the example from the left, the first bit corresponds to the electronic device with device number 001, the second bit corresponds to the electronic device with device number 002, the third bit corresponds to the electronic device with device number 003, the fourth bit corresponds to the electronic device with device number 004, the fifth bit corresponds to the electronic device with device number 005, the sixth bit corresponds to the electronic device with device number 006, the seventh bit corresponds to the electronic device with device number 007, and the eighth bit corresponds to the electronic device with device number 008. The different values of each bit represent the status of the electronic device corresponding to that bit. For example, 1 represents that the electronic device is online, and 0 represents that the electronic device is offline. For example, the byte 00000010 indicates that the electronic device with device number 002 in the trust ring is online, and the other electronic devices are offline. For another example, the byte 11111100 indicates that the electronic device with device number 001 in the trust ring is offline, the electronic device with device number 002 is offline, and the other electronic devices are online.

[0156] In this way, after receiving the first broadcast, the second electronic device can read the value of the device number bit from the left or right side of the byte to know whether it is disconnected from the first electronic device. For example, the device number of the tablet is 002. After receiving the first broadcast, the tablet reads the value of the device number bit from the left or right side of the byte. Figure 8The value of the second bit (002) from the left of the byte shown is read. If this value is 1, the tablet computer recognizes that the tablet computer is connected to the mobile phone. If this value is 0, the tablet computer recognizes that the connection with the mobile phone is disconnected. Since the device number of the mobile phone is 001, the first bit from the left in this byte corresponds to the mobile phone. Therefore, the value of the bit corresponding to the mobile phone in the first broadcast sent by the mobile phone can be a preset value, such as 0 or 1.

[0157] In some embodiments, the mobile phone may send the first broadcast after acquiring the status of the second electronic device.

[0158] As an example, a mobile phone and a second electronic device can send a heartbeat broadcast every fixed interval, such as 30 seconds. In this case, the mobile phone can receive a heartbeat broadcast every 30 seconds. The mobile phone confirms the status of the second electronic device based on whether it receives the heartbeat broadcast from the second electronic device. Specifically, if the mobile phone receives the heartbeat broadcast from the second electronic device, the mobile phone identifies the second electronic device as online. If the mobile phone does not receive the heartbeat broadcast from the second electronic device, the mobile phone identifies the second electronic device as offline. For example, a mobile phone, a PC, and a tablet computer send a heartbeat broadcast at the 30th second. The mobile phone receives the heartbeat broadcasts from the PC and the tablet computer, and the mobile phone identifies the PC and the tablet computer as online. The mobile phone sends a first broadcast, indicating that both the PC and the tablet computer are online. At the 60th second, the mobile phone and the PC send a heartbeat broadcast. The mobile phone receives the heartbeat broadcast from the PC, but does not receive the heartbeat broadcast from the tablet computer. The mobile phone identifies that the PC is online and the tablet computer is offline. The mobile phone sends a first broadcast, indicating that the tablet computer is offline. In other words, the mobile phone can send the first broadcast at a 30-second interval.

[0159] As another example, if a mobile phone does not receive a heartbeat broadcast from a second electronic device within a preset time period, it can send an inquiry broadcast to inquire about the status of the second electronic device. If no reply broadcast from the second electronic device is heard within a preset duration 1, such as 10 seconds, the mobile phone identifies the second electronic device as offline. If a reply broadcast from the second electronic device is heard within the preset duration 1, the mobile phone identifies the second electronic device as online. After identifying the status of each second electronic device, the mobile phone can send a first broadcast.

[0160] In other embodiments, the mobile phone may send the first broadcast when it identifies a third electronic device that has lost its communication connection with the first electronic device. This can conserve mobile phone resources. For example, the mobile phone may identify the status of various electronic devices based on the above example and send the first broadcast when the third electronic device is identified and lost its communication connection with the first electronic device.

[0161] In the above example, the first broadcast and the heartbeat broadcast of the mobile phone are two separate broadcasts. In some embodiments, the first broadcast can be the heartbeat broadcast of the mobile phone. In other words, the heartbeat broadcast of the mobile phone is also used to indicate that a third electronic device, among at least one second electronic device, has lost its communication connection with the first electronic device.

[0162] For example, the first heartbeat broadcast of the mobile phone does not include the status of the PC and tablet. Or, the first heartbeat broadcast of the mobile phone indicates that the PC and tablet are both online. Afterwards, the mobile phone obtains the heartbeat broadcast of the second electronic device, identifies the status of the second electronic device, and sends the next heartbeat broadcast of the mobile phone based on the status of the second electronic device. In this way, one less broadcast can be sent, saving the resources of the mobile phone. Please refer to the above text for the method for the mobile phone to identify the status of the second electronic device based on the heartbeat broadcast of the second electronic device. In this embodiment, when the mobile phone recognizes that there is a third electronic device that has disconnected the communication connection with the first electronic device, the mobile phone can directly send the first broadcast, which can save time.

[0163] In some embodiments, the mobile phone can periodically inquire about the status of the second electronic device. For example, the mobile phone sends an inquiry broadcast at preset intervals, such as 20 seconds, to inquire about the status of the second electronic device (such as a tablet computer and a PC). The tablet computer and the PC can send a reply broadcast after listening to the inquiry broadcast to reply to their own status. Taking the tablet computer as an example, if the mobile phone does not receive a reply broadcast from the tablet computer within a preset time length of 1, the mobile phone recognizes that the tablet computer is offline. If the mobile phone receives a reply broadcast from the tablet computer within a preset time length of 1, the mobile phone recognizes that the tablet computer is online. Optionally, if the mobile phone does not receive a reply broadcast from the tablet computer, the mobile phone can continue to send one or more inquiry broadcasts to determine the status of the tablet computer.

[0164] The third electronic device may receive the first broadcast sent by the first electronic device and actively send a connection request to the first electronic device. The connection request is the first connection request and the second connection request below, which are used to request to re-establish a communication connection with the first electronic device.

[0165] When a third electronic device logs in to a first account, the third electronic device, such as a tablet, can send a second request message, such as Request 2 described above, to the server. This second request message is used to request that the third electronic device be added to the trust ring corresponding to the first account. The third electronic device receives the device number of the third electronic device from the server. During the connection and / or authentication process with the first electronic device, the third electronic device can send the device number of the third electronic device to the first electronic device, such as a mobile phone.

[0166] When the third electronic device is not logged into the first account, the third electronic device such as a PC can send a second broadcast such as Broadcast 3 mentioned above. The second broadcast is used for the first electronic device such as a mobile phone and / or tablet to obtain the device number of the third electronic device from the server.

[0167] The following is an introduction using the third electronic device being a PC and a tablet as an example. Figure 7 The illustrated method further includes:

[0168] S702: The tablet computer receives a first broadcast.

[0169] S703: The tablet computer sends a first connection request to the mobile phone.

[0170] After receiving the first broadcast, the tablet computer recognizes that it is currently offline, or that a connection with the mobile phone has not been established. The tablet computer may proactively connect to the mobile phone. For example, the tablet computer may proactively send a first connection request to the mobile phone to request reestablishing a connection with the mobile phone. The first connection request may, for example, include a communication method supported by the tablet computer. The communication method supported by the tablet computer may be Wi-Fi communication and / or Bluetooth communication.

[0171] S704: The tablet computer establishes a first connection with the mobile phone.

[0172] The mobile phone may receive a first connection request. After receiving the first connection request, the mobile phone and the tablet computer may negotiate to establish a first connection, where the first connection may be any one of a Wi-Fi connection, a Bluetooth connection, and a Wi-Fi P2P connection. Once the tablet computer and the mobile phone have established a first connection, the mobile phone and the tablet computer also have established a first connection.

[0173] Optionally, from the moment the mobile phone recognizes that the tablet is offline to the preset time length 2, such as 60 seconds, if the mobile phone does not receive the first connection request from the tablet, the mobile phone can make the tablet offline. The mobile phone making the tablet offline means that the mobile phone does not display the tablet logo in the interface of the device collaboration APP. For example, the mobile phone is offline. Figure 3 The application card 302 shown does not display the tablet computer logo. Figure 3 The control interface 303 shown does not display the tablet computer's logo. After the tablet computer's logo is not displayed, the mobile phone receives the first connection request and can display the tablet computer's logo again on the device collaboration app interface. From the moment the mobile phone recognizes that the tablet computer is offline until the preset time duration 2, the mobile phone receives the tablet computer's first connection request and can keep the tablet computer online, that is, the mobile phone will not cause the tablet computer to go offline.

[0174] S705: The PC receives the first broadcast.

[0175] S706: The PC sends a second connection request to the mobile phone.

[0176] After receiving the first broadcast, the PC recognizes that it is not currently online, or that a connection with the mobile phone has not been established. The PC can proactively connect to the mobile phone. For example, the PC can proactively send a second connection request to the mobile phone to request a connection. The second connection request can, for example, include a communication method supported by the PC. The communication method supported by the PC can include Wi-Fi communication and / or Bluetooth communication.

[0177] S707: The PC establishes a second connection with the mobile phone.

[0178] The mobile phone may receive a second connection request. After receiving the second connection request, the mobile phone and the PC may negotiate to establish a second connection. The second connection may be any one of a Wi-Fi connection, a Bluetooth connection, and a Wi-Fi peer-to-peer (P2P) connection. Once the PC and the mobile phone have established a second connection, the mobile phone and the PC have also established a second connection.

[0179] Optionally, from the moment the mobile phone recognizes that the PC is offline to the preset time length 2, such as 60 seconds, if the mobile phone does not receive the first connection request from the PC, the mobile phone can make the PC offline. Among them, the mobile phone makes the PC offline means that the mobile phone does not display the PC logo in the interface of the device collaboration APP. For example, the mobile phone is offline. Figure 3 The application card 302 shown does not display the PC logo. Figure 3 The control interface 303 shown does not display the PC's logo. After the PC's logo is not displayed, if the mobile phone receives the first connection request, the mobile phone can display the PC's logo again on the device collaboration app interface. From the moment the mobile phone recognizes that the PC is offline until the preset duration 2, if the mobile phone receives the PC's first connection request, the mobile phone can keep the PC online, that is, the mobile phone will not cause the PC to go offline.

[0180] It should be understood that the first electronic device such as a mobile phone and at least one second electronic device are in the same trust ring. After the connection is established and authenticated, the identification of the at least one second electronic device can be displayed on the interface of the device collaboration APP of the first electronic device such as a mobile phone. Optionally, as long as the first electronic device such as a mobile phone and at least one second electronic device are connected, the identification of the at least one second electronic device can be displayed on the interface of the device collaboration APP of the first electronic device such as a mobile phone. The first electronic device such as a mobile phone and at least one second electronic device may not be in the same trust ring.

[0181] The "connection" in this application refers to a wireless communication connection, also referred to as a communication connection.

[0182] An embodiment of the present application provides a networking system, including a first electronic device and at least one second electronic device, wherein the first electronic device establishes a connection with the at least one second electronic device; the first electronic device and the at least one second electronic device can execute the various functions or steps executed by the mobile phone in the above method embodiment.

[0183] The present application embodiment provides an electronic device, which includes: a memory, a display screen, and one or more processors. The display screen is coupled to the processor. The memory is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device can perform the various functions or steps performed by the mobile phone in the above method embodiment. The structure of the electronic device can refer to Figure 4 The structure of the electronic device 400 is shown.

[0184] The embodiment of the present application further provides a computer storage medium, which includes computer instructions. When the computer instructions are in the above electronic device (such as Figure 4 When the method is executed on the electronic device 400 shown in the figure, the electronic device executes each function or step in the above method embodiment.

[0185] The embodiment of the present application further provides a computer program product, which, when executed on a computer, enables the computer to execute the functions or steps in the above method embodiment.

[0186] An embodiment of the present application further provides a chip system, which includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected via lines. For example, the interface circuit can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit can be used to send signals to other devices (such as a processor). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instruction is executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.

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

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

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

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

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

[0192] The above content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.

Claims

1. A networking method, characterized in that: Applied to a first electronic device, the method includes: establishing a communication connection with at least one second electronic device; Sending a first broadcast, where the first broadcast is used to indicate a third electronic device among the at least one second electronic device whose communication connection with the first electronic device is disconnected; receiving a connection request from the third electronic device; In response to the connection request, a communication connection is re-established with the third electronic device.

2. The method according to claim 1, characterized in that The first broadcast is further used to indicate an electronic device among the at least one second electronic device whose communication connection with the first electronic device is not disconnected; The first broadcast includes at least one bit corresponding to the device identification of the at least one second electronic device; The value of the bit is used to indicate whether the communication connection between the second electronic device corresponding to the bit and the first electronic device is disconnected, and the bit corresponding to the third electronic device is used to indicate that the communication connection between the third electronic device and the first electronic device is disconnected.

3. The method according to claim 1, characterized in that The first broadcast includes the device identification of the third electronic device.

4. The method according to claim 2 or 3, characterized in that The first electronic device and the at least one second electronic device are electronic devices within the same trust ring; The device identifier is a device number; the device number is used to uniquely mark an electronic device within the trust ring.

5. The method according to any one of claims 1 to 4, characterized in that Before sending the first broadcast, the method further includes: Identifying whether the communication connection between the first electronic device and the at least one second electronic device is disconnected; The sending of the first broadcast includes: In a case where the communication connection between one of the at least one second electronic device and the first electronic device is disconnected, the first broadcast is sent.

6. The method according to claim 4, characterized in that The first electronic device logs in to a first account, and the remaining electronic devices of the at least one second electronic device except the fourth electronic device log in to the first account; Before sending the first broadcast, the method further includes: Sending a first request message to the server, where the first request message is used to request that the fourth electronic device be added to the trust ring corresponding to the first account; receiving a device number of the fourth electronic device sent by the server; Receive the device number of the electronic device sent by other electronic devices among the at least one second electronic device except the fourth electronic device.

7. The method according to claim 6, characterized in that The method further comprises: The device number of the fourth electronic device is sent to the fourth electronic device.

8. A networking method, characterized in that: Applied to a third electronic device, the method includes: receiving a first broadcast sent by a first electronic device, where the first broadcast is used to indicate an electronic device among at least one second electronic device whose communication connection with the first electronic device is disconnected, the electronic device including the third electronic device; A connection request is sent to the first electronic device; the connection request is used to request to establish a communication connection with the first electronic device.

9. The method according to claim 8, characterized in that The first broadcast is further used to indicate an electronic device among the at least one second electronic device whose communication connection with the first electronic device is not disconnected; The first broadcast includes at least one bit corresponding to the device identification of the at least one second electronic device; The value of the bit is used to indicate whether the communication connection between the second electronic device corresponding to the bit and the first electronic device is disconnected, and the bit corresponding to the third electronic device is used to indicate that the communication connection between the third electronic device and the first electronic device is disconnected.

10. The method according to claim 8, characterized in that The first broadcast includes the device identification of the third electronic device.

11. The method according to claim 9 or 10, characterized in that The first electronic device and the at least one second electronic device are electronic devices within the same trust ring; The device identifier is a device number; the device number is used to uniquely mark an electronic device within the trust ring.

12. The method according to claim 11, characterized in that In a case where the third electronic device logs in to the first account, before receiving the first broadcast sent by the first electronic device, the method further includes: Sending a second request message to the server, where the second request message is used to request that the third electronic device be added to the trust ring corresponding to the first account; receiving a device number of the third electronic device sent by the server; The device number of the third electronic device is sent to the first electronic device.

13. The method according to claim 11, characterized in that In a case where the third electronic device is not logged into the first account, before receiving the first broadcast sent by the first electronic device, the method further includes: A second broadcast is sent, where the second broadcast is used for the first electronic device to obtain the device number of the third electronic device from the server.

14. A networking system, characterized in that: It includes a first electronic device and at least one second electronic device; the first electronic device is used to execute the method according to any one of claims 1 to 7; the at least one second electronic device includes a third electronic device, and the third electronic device is used to execute the method according to any one of claims 8 to 13.

15. An electronic device, characterized in that: The electronic device includes: a memory, a wireless communication module, and one or more processors; the wireless communication module receives and sends data according to the control of the processor to realize communication between the electronic device and other electronic devices; the memory is coupled to the processor; wherein the memory is used to store computer program code, and the computer program code includes computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method according to any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method according to any one of claims 1 to 13.

17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 13 are implemented.

Citation Information

Patent Citations

  • Method achieving bluetooth automatic return connection in Android system

    CN104967971A

  • Equipment connection method and device, equipment and storage medium

    CN114390500A

  • Network connection repairing method and system, computer equipment and storage medium

    CN114641023A

  • Bluetooth module, display device and Bluetooth abnormity recovery method

    CN115190648A

  • Equipment networking method, electronic equipment and storage medium

    CN115250544A