Equipment networking method and related device

By introducing routing nodes into the device network, the problem of network failure caused by inconsistent online status between devices is solved, achieving a higher network success rate and stability, and ensuring smooth business data interaction.

CN121967348APending Publication Date: 2026-05-01HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2024-10-18
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

During the device networking process, inconsistencies in the online status of devices can prevent some devices from forming a network directly, affecting service support capabilities, such as the inability to perform services like screen sharing.

Method used

By using networked devices as routing nodes, routing authentication and networking between devices that are not directly networked can be achieved. The specific steps include device information exchange, routing authentication message forwarding, and routing method networking.

Benefits of technology

It improved the success rate and stability of networking between devices, ensured smooth business data interaction, and enhanced the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121967348A_ABST
    Figure CN121967348A_ABST
Patent Text Reader

Abstract

The invention provides a device networking method and a related device, and relates to the technical field of wireless connection, in a scene that a first device is respectively networked with a second device and a third device, and the second device and the third device are not networked, the first device sends device information of the third device to the second device, and sends device information of the second device to the third device. And after the second equipment recognizes that the third equipment is not online, the first equipment is used as a routing node to perform routing authentication with the third equipment, namely, an authentication message of the second equipment is forwarded to the third equipment through the first equipment. The second device and the third device are networked after successful routing authentication, that is, indirect communication between the second device and the third device is realized by taking the first device as a routing node, so that the networking success rate between the devices is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of wireless connectivity technology, and in particular to a device networking method and related apparatus. Background Technology

[0002] In daily life or office scenarios, multiple terminal devices within a certain area can network together to communicate and enable their business capabilities, such as screen sharing, file sharing, digital media projection, and call migration. However, the construction of these business capabilities is based on the premise that the terminal devices discover each other, that is, the terminal devices must know each other's necessary information, including business capabilities, network communication capabilities, and identity identification information.

[0003] In related technologies, the online status of devices is inconsistent in certain scenarios, which will affect the ability to provide service support. For example, in a scenario including device A, device B and device C, device A is networked with device B, and device A is networked with device C, but device B and device C cannot be networked, resulting in the inability to carry out related services between device B and C, such as screen sharing services. Summary of the Invention

[0004] In view of this, this application provides a device networking method and related apparatus to solve at least some of the above-mentioned problems, and the disclosed technical solution is as follows:

[0005] In a first aspect, this application provides a device networking method using a second electronic device. The method includes: the second electronic device networking with a first electronic device, the first device recording the device information of the second device, and the first device networking with a third device and recording the device information of the third device; the second electronic device receiving a first notification message sent by the first electronic device, the first notification message including the device information of the electronic device networking with the first electronic device; the second device determining that the third device is not online based on the device information of the third device, and sending a first routing authentication message including the authentication information of the second device and first routing information to the first device, the first routing information being used to enable the first device to forward the first routing authentication message to the third device for identity authentication of the second device; the second device receiving a second routing authentication message forwarded by the first device, and authenticating the third device based on the second routing message, the second routing authentication message being sent by the third device to the first device after determining that the second device is not online based on the device information sent by the first device, the second routing authentication message including the authentication information of the third device and the second routing information, the second routing information being used to enable the first device to send the second routing authentication message to the second device; the second device and the third device successfully authenticating through routing, and the second device and the third device networking with the first device as the forwarding node. In this way, in scenarios where the first device is networked with the second and third devices respectively, but the second device is not networked with the third device, the first device is used as a routing node between the second and third devices, thereby enabling the second and third devices to network in a routing manner, which improves the success rate of networking between devices.

[0006] In one possible implementation of the first aspect, the second device determines that the third device is not online based on the device information of the third device, and sends a first routing authentication message including the authentication information of the second device and the first routing information to the first device. This includes: after determining that the third device is not online based on the device information of the third device, the second device determines whether there is a physical connection link between the second device and the third device; if it is determined that there is no physical connection link between the second device and the third device, the second device sends a first routing authentication message including the authentication information of the second device and the first routing information to the first device. In this way, before the second device performs routing authentication with the third device, it first determines whether there is a physical connection link between the two devices. If there is no physical connection link, the two devices perform routing authentication, avoiding direct routing authentication even when there is a physical connection link between the two devices, which helps improve the stability of the two-device network.

[0007] In another possible implementation of the first aspect, the second device determines that the third device is not online based on the device information of the third device, and sends a first routing authentication message including the authentication information and first routing information of the second device to the first device. This includes: after determining that the third device is not online based on the device information of the third device, the second device determines whether there is a physical connection link between the second device and the third device; if a physical connection link is determined to exist between the second device and the third device, the second device performs direct authentication with the third device; if the authentication between the second device and the third device fails, the second device sends a first routing authentication message including the authentication information and first routing information to the first device. It is evident that when there is a physical connection link between the second and third devices, direct authentication is prioritized. If the direct authentication is successful, the two devices directly form a network via WiFi and / or Bluetooth, which can improve the stability of the two-device network. If direct authentication fails, routing authentication is then performed, avoiding direct routing authentication even when there is a physical connection link between the two devices, which is beneficial for improving the stability of the two-device network.

[0008] In another possible implementation of the first aspect, after the second and third devices form a network using the first device as a forwarding node, the method further includes: the second device scans the third device, and after determining that the time elapsed since the last direct authentication is greater than or equal to a preset time elapsed, the second device and the third device perform direct authentication. Thus, after the two devices successfully form a network via routing, upon scanning the peer device again, direct authentication between the two devices is not performed immediately. Instead, it is performed only after the time elapsed since the last direct authentication reaches the preset time elapsed. This reduces the number of times the two devices frequently initiate direct authentication, thereby saving power consumption associated with initiating direct authentication and thus reducing device power consumption.

[0009] In another possible implementation of the first aspect, after the second and third devices form a network with the first device as the forwarding node, the method further includes: the second device scanning for the third device and performing direct authentication with the third device. Once the two devices transition from a link without physical connection to one with physical connection—that is, from being unable to scan for the other device to being able to scan for it—direct authentication between the two devices is immediately initiated, allowing them to directly network via WiFi and / or Bluetooth, which improves network stability.

[0010] In another possible implementation of the first aspect, determining whether there is a physical connection link between the second device and the third device includes: the second device performing a device scan; if the third device is detected, it is determined that there is a physical connection link between the second device and the third device; if the third device is not detected, it is determined that there is no physical connection link between the second device and the third device.

[0011] In another possible implementation of the first aspect, after the second and third devices form a network with the first device as the forwarding node, the method further includes: the second device recording the networking mode between the second and third devices as a routing network and third routing information; the second device sending a second notification message to the first device, the second notification message including the routing network mode between the second and third devices and the third routing information, so that the first device records the networking mode between the second and third devices and the third routing information. Thus, after receiving a routing message from the second or third device, the first device forwards it to the peer device based on the recorded routing information, realizing the interaction of service data between the two devices.

[0012] In another possible implementation of the first aspect, the method further includes: in response to a shared service operation with a third device, the second device identifies that the second device and the third device are in a routing network, and determines the first device as a forwarding node based on the routing path between the second device and the third device; sends first service data to the first device, the first service data including fourth routing information, the fourth routing information being used to enable the first device to forward the first service data to the third device; and receives second service data returned by the third device after being forwarded by the first device.

[0013] In another possible implementation of the first aspect, after the second and third devices form a network with the first device as the forwarding node, the method further includes displaying the icon of the third device on the interface of the second device used to display online devices. For example, after the two devices form a network via routing, the trust ring interface of the devices will display the icons of the routing online devices, so that users can intuitively see all the online devices and improve the user experience.

[0014] In another possible implementation of the first aspect, after the second and third devices form a network with the first device as the forwarding node, the method further includes: the second device receiving a disconnection notification message from the first device and identifying the first device as the forwarding node for both the second and third devices, and disconnecting both the first and third devices. In this way, when the routing node between the two devices goes offline, the device corresponding to the routing node and another device in the routing network will also go offline simultaneously. This avoids inconsistencies between the online / offline status of the routing network devices and the actual status due to the failure to synchronize the disconnection of the routing node with the disconnected peer device in the routing network.

[0015] Secondly, this application also provides a device networking method applied to a first device. The method includes: the first device networking with a second device and recording the device information of the second device; the first device networking with a third device and recording the device information of the third device; the first device determining that multiple devices are online, sending a first notification message to the second device, and sending a second notification message to the third device, the first notification message including the device information of the third device, and the second notification message including the device information of the second device; the first device receiving a first routing authentication message sent by the second device, the first routing message including the authentication information of the second device and first routing information, generated by the second device after determining that the third device is not online based on the device information of the third device in the first notification message; the first device sending the first routing authentication message to the third device based on the first routing information, so that the third device authenticates the second device; the first device receiving a third notification message sent by the second device, the third notification message including whether the second device and the third device are networked via routing, and second routing information from the second device to the third device; and the first device recording the networking method and second routing information of the second device and the third device. In this way, after determining that multiple devices are currently online, the first device sends the device information of the other online devices to the first device, so that other devices can connect to each other. If other devices cannot connect directly, the first device is used as a routing node so that other devices can indirectly form a network through this routing node, thereby improving the success rate of networking between devices.

[0016] In one possible implementation of the second aspect, after the first device records the networking method and second routing information of the second and third devices, the method further includes: receiving first service data sent by the second device, the first service data including third routing information; sending the first service data to the third device based on the third routing information; receiving second service data sent by the third device, the second service data message including fourth routing information; and sending the second service data to the second device based on the fourth routing information.

[0017] In another possible implementation of the second aspect, after the first device records the networking method and second routing information of the second and third devices, the method further includes: when the first device goes offline, sending a disconnection notification message to the second device. The disconnection notification message is used to enable the second device to identify that the first device is a forwarding node of the second device and then disconnect the first device and the third device at the same time.

[0018] Thirdly, this application also provides an electronic device, which includes: one or more processors, a memory, and a touch screen; the memory is used to store program code; the processor is used to run the program code, so that the electronic device implements the device networking method of any of the first aspects or the device networking method of any of the second aspects.

[0019] Fourthly, this application also provides a computer-readable storage medium having instructions stored thereon, which, when executed on an electronic device, cause the electronic device to perform a device networking method as described in any of the first aspects or any of the second aspects.

[0020] Fifthly, this application also provides a chip system, including: at least one processor and an interface, the interface being used to receive code instructions and transmit them to the at least one processor; the at least one processor executes the code instructions to implement the device networking method of any one of the first aspects or the device networking method of any one of the second aspects.

[0021] Sixthly, this application also provides a computer program product having instructions stored thereon, which, when the computer program product is run on an electronic device, cause the electronic device to implement the device networking method of any one of the first aspects or the device networking method of any one of the second aspects. Attached Figure Description

[0022] Figure 1 This is a schematic diagram of the terminal devices to which the device networking method provided in this application is applicable;

[0023] Figure 2 This is a schematic diagram illustrating a scenario where a terminal device fails to go online, as provided in an embodiment of this application.

[0024] Figure 3 This is provided by the embodiments of this application. Figure 2 A schematic diagram of the trust ring interface in the scenario shown.

[0025] Figure 4 This is a schematic diagram illustrating another scenario of terminal device failing to go online, provided in an embodiment of this application.

[0026] Figure 5 This is provided by the embodiments of this application. Figure 4 A schematic diagram of the trust ring interface in the scenario shown.

[0027] Figure 6 This is a schematic diagram illustrating another scenario where a terminal device fails to go online, as provided in an embodiment of this application.

[0028] Figure 7 This is a flowchart of a device networking method provided in an embodiment of this application;

[0029] Figure 8 This is a schematic diagram of a trust ring interface provided in an embodiment of this application;

[0030] Figure 9 This is a flowchart of another device networking method provided in the embodiments of this application;

[0031] Figure 10This is a flowchart of another device networking method provided in the embodiments of this application;

[0032] Figure 11 This is a flowchart of another device networking method provided in the embodiments of this application;

[0033] Figure 12 This is a flowchart illustrating a networking method applied to device A, as provided in an embodiment of this application.

[0034] Figure 13 This is a flowchart illustrating a networking method applied to device B, as provided in an embodiment of this application.

[0035] Figure 14 This is a schematic diagram of the hardware structure of a terminal device provided in an embodiment of this application;

[0036] Figure 15 This is a schematic diagram of the software architecture of a terminal device provided in an embodiment of this application. Detailed Implementation

[0037] The terms "first," "second," and "third," etc., used in this application specification, claims, and drawings are used to distinguish different objects, not to limit a specific order.

[0038] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0039] To ensure clarity and conciseness in the description of the following embodiments, a brief introduction to the related technologies is given first:

[0040] COAP: Constrained Application Protocol, is an application-layer communication protocol designed specifically for Internet of Things (IoT) devices and resource-constrained networks.

[0041] Device discovery: By scanning broadcast messages sent by peer devices via Bluetooth or WiFi scanning capabilities, peer devices can be discovered.

[0042] Device go-live: After the device is discovered, a connection link between the devices needs to be established and the devices need to be mutually authenticated before the device can go-live.

[0043] Device offline: A device is considered offline if it no longer meets the online conditions, such as turning off the Bluetooth switch, turning off the WiFi switch, or moving the device too far away from the scanning distance.

[0044] Network setup: Once the device is successfully online, maintaining the online status of the device constitutes network setup.

[0045] A device identifier is a unique identifier for a terminal device, which can uniquely identify the terminal device. It facilitates the identification of the device by other devices during the device discovery process.

[0046] Communication capabilities characterize the communication methods and addresses available to a terminal device. For example, a terminal device may currently use Bluetooth communication and its Bluetooth address, or WiFi communication and its WiFi address. During device discovery, this facilitates other devices establishing corresponding communication connections based on the device's communication capabilities, thereby enabling data transmission through those connections.

[0047] Service capabilities characterize the business functions that a terminal device supports for interaction with other terminal devices, such as file sharing, screen sharing, digital media projection, and call migration. After other devices discover this device, they can record its service capabilities to perform corresponding business operations.

[0048] Multiple terminal devices logged into the same account can form a network. Networking methods include single Bluetooth networking, single WiFi networking, and hybrid networking. Single Bluetooth networking means that two terminal devices need to have both WiFi and Bluetooth turned on, but are not connected to the same local area network (LAN). They can discover each other and form a network through Bluetooth broadcasting and scanning capabilities. Single WiFi networking means that two terminal devices are connected to the same LAN, but neither has Bluetooth turned on. They can discover each other and form a network through WiFi broadcasting and scanning capabilities. Hybrid networking means that two terminal devices are both connected to the same LAN and both have Bluetooth turned on. They can use the broadcasting and scanning capabilities of both Bluetooth and WiFi to form a network.

[0049] For example, the types of networkable terminal devices can be such as Figure 1 The mobile phones, tablets, laptops, smart screens, etc. shown are not specifically limited in this application.

[0050] The following will combine Figures 2-6 We will introduce three scenarios where deployment failures occur:

[0051] Scenario 1: Device A is connected to LAN1 and Bluetooth is turned on; Device B is connected to LAN1 but Bluetooth is not turned on; Device C is not connected to LAN1 but Bluetooth is turned on.

[0052] In this scenario, such as Figure 2As shown, devices A and B are connected via a single Wi-Fi network, while devices A and C are connected via a single Bluetooth network. Devices B and C can connect to each other on device A, and device A can connect to each other on device B. However, devices B and C cannot connect to each other.

[0053] In this scenario, such as Figure 3 As shown in (1), the bottom of the interface 100 of the control center of device A displays a trust ring 101, which is used to display other terminal devices that are online on this device. For example, in this example, the trust ring 101 of device A displays the icon 102 of this device, as well as the icon 103 of device B and the icon 104 of device C that are online in the network.

[0054] For device B, since the trust ring interface currently requires both Bluetooth and WiFi to be enabled, the capability layer can support single WiFi connection. However, device B does not have Bluetooth enabled, such as... Figure 3 As shown in (2), no device icon is displayed in the trust ring 201 of the control center interface 200 of device B.

[0055] For device C, such as Figure 3 As shown in (3), the icon of this device C and the icon of device A that is online to device C are displayed in the trust ring 301 at the bottom of the interface 300 of the control center of device C.

[0056] Scenario 2: Device A is connected to LAN1 and Bluetooth is enabled. Devices B and C both have WiFi and Bluetooth enabled, but are not connected to the LAN.

[0057] In this scenario, such as Figure 4 As shown, Device A and Device B are in a single Bluetooth network setup, as are Device A and Device C. Device A is positioned between Device B and Device C, while Device B and Device C are too far apart to form a network via Bluetooth.

[0058] In this scenario, such as Figure 5 As shown in (1), the content displayed on the trust ring 101 of device A is the same as in scenario one. Figure 5 As shown in (2), the trust ring 202 of device B displays the icon 203 of this device and the icon 204 of the online device (i.e., device C). Figure 5 As shown in (3), the trust ring 302 interface of device C displays the icon of this device and the icon of the online device (i.e. device A).

[0059] Scenario 3: Devices A, B, and C all have their WiFi and Bluetooth switches turned on, but are not connected to the same local area network.

[0060] In this scenario, such as Figure 6As shown, Device A and Device B are in a single Bluetooth network, and Device A and Device C are also in a single Bluetooth network. The failure to establish a connection link or the failure of authentication between Device B and Device C prevents them from going online together, that is, Device B and Device C cannot go online together.

[0061] In this scenario, the content displayed on the trust ring interface of devices A, B, and C is the same as that of the corresponding devices in scenario two, and will not be repeated here.

[0062] In all three scenarios described above, there is inconsistency in the online status display between the networked devices. The root cause is that devices B and C cannot go online directly, which affects the ability to provide service support to the network. For example, screen sharing between devices B and C cannot be performed.

[0063] To address the aforementioned issues, this application provides a device networking method. This method supports the re-networking of smart interconnected devices in the event of a failure to go online, whether there is a physical connection link or not. For example, in the three scenarios mentioned above, device B and device C can use device A as a routing node to form a routing network, that is, the two devices can be interconnected through routing forwarding via a third device.

[0064] The following will explain the two scenarios: those with physical connection links between devices and those without physical connection links.

[0065] 1. There is no physical connection link between the two devices.

[0066] As mentioned earlier, there is no physical connection link between device B and device C in scenarios one and two above. Device B and device C cannot be networked through any of the following methods: single Bluetooth networking, single WiFi networking, and hybrid networking.

[0067] Please see Figure 7 The diagram shows a flowchart of a device networking method provided in an embodiment of this application.

[0068] This embodiment uses a network of three devices, A, B, and C, as an example for illustration. The three devices can be completely different types, such as a mobile phone, a tablet computer, and a laptop computer; or they can be partially or completely the same, such as all three devices being mobile phones. This application does not impose any special restrictions on the types of the three devices.

[0069] This embodiment uses scenario one as an example for illustration. Of course, this method is also applicable to scenario two. The difference between scenario one and scenario two is that the networking method between device A and device B is different. In scenario one, device A and device B are networked using a single WiFi network, while in scenario two, device A and device B are networked using a single Bluetooth network.

[0070] like Figure 7As shown, the device networking method provided in this embodiment may include the following steps:

[0071] S101, Device A and Device B exchange information via local area network broadcast (COAP broadcast).

[0072] In this example, device A and device B interact via broadcast packets within the WiFi local area network to discover and form a self-organizing network.

[0073] Device A (or Device B) on the same local area network automatically sends a COAP broadcast. After receiving the broadcast, Device B (or Device A) on the same local area network will perform device discovery with the broadcasting device.

[0074] S102, Device A and Device B establish a WiFi connection link.

[0075] S103, Device A and Device B have successfully authenticated.

[0076] Device A sends its device information to Device B via the WiFi connection between Device A and Device B. This device information includes at least the device's currently logged-in account. Device B authenticates Device A; this authentication confirms whether the two devices are logged into the same account, such as the same Honor account. In addition, the device information sent by Device A may also include information such as the device's unique identifier, communication capabilities, and service capabilities.

[0077] At the same time, device B can also send its device information to device A through the connection link between the two devices, so that device A can authenticate device B.

[0078] In this example, device B's Bluetooth switch is not turned on. Therefore, after device A and device B establish and authenticate a connection link through the local area network, they can go online via a single WiFi network.

[0079] In other scenarios, if device A and device B are connected to the same local area network and both have Bluetooth enabled, they can establish both Bluetooth and Wi-Fi connections. In this scenario, if Wi-Fi authentication succeeds first, the Bluetooth connection can proceed without authentication. Conversely, if Bluetooth authentication succeeds first, the Wi-Fi connection can proceed without authentication. In other words, in this scenario, once either Bluetooth or Wi-Fi authentication is successful, the two devices can form a hybrid network.

[0080] S104, Device A records the device information of Device B.

[0081] In some embodiments, device information may include device identification, communication capabilities (Bluetooth communication capabilities, WiFi communication capabilities), inter-device networking methods, and may also include the device's service capabilities. Device A records the device information of device B that has connected online, so that when multiple devices are connected to device A, the device information of device B can be sent to the other connected devices.

[0082] S105, the networking module of device A notifies the service layer device B to come online.

[0083] In an exemplary embodiment, the networking module of device A notifies the upper-layer trust ring service that device B is online, thereby displaying the icon of device B in the trust ring interface of device A.

[0084] In some embodiments, the networking module may be a discovery and connection module (MagicLink) within the terminal device, used to realize the device discovery and connection process between this device and other devices. Furthermore, the MagicLink module may also include a device discovery module, etc., which will not be detailed here.

[0085] S106, Device B records the device information of Device A.

[0086] Similarly, device B will also record device information of device A so that when multiple devices are connected to the network, device B can notify other connected devices of device A's device information.

[0087] S107, the networking module of device B notifies the service layer device A that it is online.

[0088] This step is the same as the implementation process of S105 described above, and will not be repeated here.

[0089] S108, Device A and Device C communicate via Bluetooth broadcast.

[0090] In this example, it could be Bluetooth Low Energy (BLE) broadcasting; in other examples, it could be Bluetooth (BT) broadcasting.

[0091] S109, a Bluetooth connection link is established between device A and device C.

[0092] S110, Device A and Device C successfully completed Bluetooth authentication.

[0093] Device A and Device C exchange device information via a Bluetooth connection link. Specifically, Device A sends its device information to Device C through the Bluetooth connection link so that Device C can authenticate Device A. Simultaneously, Device C sends its device information to Device A through the same Bluetooth connection link so that Device A can authenticate Device C. Once both devices successfully authenticate each other, they can form a network.

[0094] In this example, after device A and device C establish and authenticate a link via Bluetooth, they can go online via Bluetooth.

[0095] S111, Device A records the device information of Device C.

[0096] S112, the networking module of device A notifies the service layer device C that it is online.

[0097] The implementation process of S111 to S112 is the same as that of S104 to S105 above, and will not be repeated here.

[0098] S113, Device C records the device information of Device A.

[0099] After establishing a communication connection with device A, device C records device information of device A, such as device A's device identification, communication capabilities, service capabilities, and the networking method of the two devices.

[0100] S114, the networking module of device C notifies the service layer device A that it is online.

[0101] S115, Device A determines whether multiple devices are online. If so, it executes S116 to S117; otherwise, it does not perform any processing.

[0102] Device A records information for each device that comes online. By querying the recorded information of the online devices, it can be determined whether multiple devices have come online.

[0103] S116, Device A sends an online device notification message to Device B. The notification message (i.e., the first notification message) includes Device A's online device B and Device C, and carries the device information of Device C.

[0104] S117, Device A sends an online device notification message to Device C. The notification message includes Device A's online device B and Device C, and carries the device information of Device B.

[0105] S116~S117 are when device A determines that multiple devices are online, it notifies other devices in the network of the devices currently online and the device information of other online devices besides the notified device. For example, when device A connects devices B and C, it notifies device B, and device A connects devices B and C and carries the device information of device C.

[0106] The contents described in S101 to S117 above are the device discovery and networking process between device A and devices B and C. Among them, device A and device B network via WiFi, and device A and device C network via Bluetooth.

[0107] S118, Device B determines whether Device C is among the online devices on this device; if not, proceed to S119; if yes, the current process ends.

[0108] In some embodiments, after receiving the online device notification message sent by device A, device B can check whether the device identity identifier of device C carried in the received online device notification message is included in the device identity identifier of the online devices recorded by this device. If it is included, it indicates that device C is an online device of device B; if it is not included, it indicates that device C is not an online device of device B.

[0109] S119, Device B performs a device scan. If Device C is not detected, it is determined that there is no physical connection link between Device B and Device C.

[0110] Device B scans for broadcast messages sent by peer devices, such as COAP broadcasts and / or BLE broadcasts. If it can receive broadcast messages sent by peer devices, it has scanned and discovered the device.

[0111] S120, Device C determines whether Device B is among its online devices; if not, it executes S121.

[0112] S121, Device C performs a device scan. If Device B is not detected, it is determined that there is no physical connection link between Device C and Device B.

[0113] Similarly, after receiving the online device notification message sent by device A, device C determines whether device B is included in the online devices list. If not, it performs a device scan to determine whether there is a physical connection between device B and device C.

[0114] S122, Device B sends a routing authentication message to Device A. The routing authentication message includes the device information of Device B and the destination routing node is Device C.

[0115] After determining that there is no physical connection link between device B and device C, device B uses device A as a routing node to perform identity authentication with device C. That is, device B uses device A to forward the routing authentication message to device C.

[0116] The routing authentication message includes device information for device B and the destination routing node, i.e., device C. In other embodiments, the routing authentication message may also carry the routing path, i.e., device B → device A → device C.

[0117] S123, after device A recognizes that device B sent a routing authentication message, it forwards the routing authentication message to device C.

[0118] The routing authentication message carries routing information, such as the destination routing node or routing path. Device A can identify the message as a routing message based on this routing information and then forward the message to the next hop node, i.e., device C.

[0119] Then, device A forwards the routing authentication message to device C, thereby achieving identity authentication between device B and device C.

[0120] S124, Device C sends a routing authentication message to Device A. The routing authentication message includes the device information of Device C and the destination routing node is Device B.

[0121] S125, after device A recognizes that device C sent a routing authentication message, it forwards the routing authentication message to device B.

[0122] S124 to S125 is the process by which device C, after determining that there is no physical connection link between itself and device B, forwards the authentication message to device B through device A. This process is the same as the process described in S122 to S123 above, and will not be repeated here.

[0123] S122-S123 and S124-S125 can be performed simultaneously. This embodiment does not limit the execution order of the above two sets of steps.

[0124] S126, Device B and Device C successfully authenticated via routing.

[0125] After receiving the routing authentication message forwarded by device A, device C authenticates device B. The authentication process is the same as in S103 and will not be described again here. Devices B and C then authenticate the peer device after receiving the authentication message forwarded by device A. After both devices successfully authenticate the peer device, they connect the peer device online and record the peer device's device information, which is the subsequent S127 to S130.

[0126] S127, Device C records the routing information between Device C and Device B.

[0127] After successful authentication between device C and device B, device B is connected to the network on device C, and the routing information between the two devices is recorded, such as the routing path from device C to device B, so that device C can communicate with device B based on the recorded routing path.

[0128] S128, the networking module of device C notifies the service layer that the route of device B is online and carries the routing information from device C to device B.

[0129] After receiving the notification message from the networking module, the service layer records the networking mode between device C and device B, i.e., the routing networking, and the routing path from device C to device B.

[0130] S129, Device B records the routing information from Device B to Device C.

[0131] S130, the networking module of device B notifies the service layer that device C goes online via routing and carries the routing information from device B to device C.

[0132] S131, Device B sends a first notification message to Device A. The message includes information about whether Device B and Device C are in a routing network and the routing information from Device B to Device C.

[0133] S132, Device C sends a second notification message to Device A. The message includes information about whether Device C and Device B are in a routing network and the routing information from Device C to Device B.

[0134] S133, Device A records the routing information between Device B and Device C.

[0135] After device B and device C form a routing network, they respectively notify device A of the routing information of the two devices, namely the routing path from device B to device C, and the routing path from device C to device B.

[0136] As can be seen, the steps described in S118 to S133 above enable two devices that cannot directly connect to the network to communicate indirectly using a shared device as a forwarding node, or in other words, to connect via routing. This achieves indirect communication networking between device B and device C, and the device connected via routing is displayed on the device's trust ring interface. For example, as... Figure 8 As shown, after device B and device C form a network through routing, device C can be displayed in the trust ring interface of device B, and similarly, device B can be displayed in the trust ring interface of device C.

[0137] Furthermore, after device B and device C are networked together, they can exchange service data. For example, device B and device C can exchange services such as screen sharing and file sharing. The service data exchange process between the two devices is shown in steps S134 to S138 below:

[0138] S134, Device B responds to the screen sharing operation with Device C and determines the networking mode between Device B and Device C.

[0139] In one exemplary embodiment, after receiving a user's screen sharing operation, device B determines the networking mode between device B and device C, and device B queries the recorded device information of online devices, including the networking mode with the device.

[0140] S135, after determining that device B and device C are in a routing network, send a routing message including screen sharing information to device A.

[0141] S136, Device A forwards the received routing message to Device C.

[0142] S137, Device C sends a response message to Device A, which includes the target routing node, namely Device B.

[0143] S138, after device A recognizes that the response message is a routing message, it forwards the response message to device B.

[0144] Communication messages between device B and device C are forwarded to the peer device through device A. That is, device A acts as a forwarding node to enable indirect communication between device B and device C.

[0145] Subsequently, if device A, which serves as a forwarding node for both device B and device C, goes offline, devices B and C, recognizing device A as a forwarding node, will simultaneously take device A and any devices that came online via device A offline. The specific process is described in steps S139 to S143 below:

[0146] S139, Equipment A is offline.

[0147] In one scenario, device A and device B are connected via a single WiFi network. When device A turns off its WiFi or is not connected to the local area network where device B is located, device A goes offline in its network connection with device B.

[0148] In another scenario, device A and device C form a single Bluetooth network. When device A turns off its Bluetooth switch or the distance between device A and device C exceeds the Bluetooth communication distance, device A will go offline in its network with device C.

[0149] S140, Device A notifies Device B that Device A is offline.

[0150] S141, after device B identifies device A as a forwarding node for both device B and device C, it takes both device A and device C offline.

[0151] S142, Device A notifies Device C that Device A is offline.

[0152] S143, after device C identifies device A as a forwarding node between device C and device B, it takes device A and device B offline.

[0153] If device A goes offline, notify other devices in the network to also go offline.

[0154] Meanwhile, after receiving the notification that device A is offline, other devices (such as device B and device C) determine whether they have a routing network device with device A as a forwarding node. For example, after receiving the notification that device A is offline, device B checks whether its online devices include a routing network device. If so, it further determines whether the forwarding node between device B and the routing network is device A. If so, device B simultaneously takes both device A and device C offline. Other devices that receive the notification that device A is offline perform the same operation, which will not be detailed here.

[0155] The device networking method provided in this embodiment, after device A is networked with other devices, if it is determined that multiple devices are online in the current network, the device information of the currently online device is sent to other devices in the network. This allows other devices to determine, through device scanning, whether there is a physical connection link between themselves and the offline devices. Taking a scenario where device A is networked with both device B and device C, but device B and device C are not networked together, as an example, if device B determines that there is no physical connection link between itself and device C, it performs route authentication with device A and device C. If the authentication is successful, device C is routed online. That is, device A acts as a forwarding node between device B and device C, realizing indirect communication networking between device B and device C. In this way, device B and device C can achieve business interaction through device A, thereby improving the success rate of networking between devices.

[0156] Furthermore, when device A goes offline, devices B and C will determine whether device A is a forwarding node. If so, they will simultaneously take device A and the devices that are networked through device A's routing. For example, device B will take both device A and device C offline at the same time, thereby updating the status of the connected devices in a timely manner.

[0157] In another scenario, after two devices form a network via a router, if both devices can detect the other device, they clear the routing network configuration and reconnect to the other device via the local area network or Bluetooth. For example, after device B and device C form a network via a router, if device B can detect device C's COAP broadcast or Bluetooth broadcast, device B clears the routing network configuration between itself and device C, and device C reconnects via the local area network or Bluetooth. The following will combine... Figure 9 The above scenario will be described.

[0158] like Figure 9 The diagram illustrates a flowchart of another device networking method provided in this application embodiment. This method is applied to a terminal device. This embodiment... Figure 1 The process shown can be followed by the following steps after S133:

[0159] S201, If ​​device B (or device C) scans the peer device, establish a connection link between the two devices.

[0160] After device B scans for broadcast messages from device C (such as COAP broadcasts or Bluetooth broadcasts), it establishes a connection link between device B and device C, namely a WiFi connection link or a Bluetooth connection link.

[0161] S202, the two devices perform identity authentication.

[0162] S203 After successful authentication between Device B and Device C, clear the routing network configuration and routing information of Device B and Device C.

[0163] S204, Device B's networking module notifies the service layer that Device C will go online via WiFi or Bluetooth.

[0164] S205 After successful authentication between device C and device B, clear the routing network mode and routing information of device C and device B.

[0165] S206, the networking module of device C notifies the service layer that device B will go online via WiFi or Bluetooth.

[0166] After successful authentication between Device B and Device C, Device B connects to the peer device and updates the peer device's connection method, such as changing from routing connection to WiFi connection or Bluetooth connection. At the same time, both Device B and Device C clear the recorded routing information of the peer device, i.e., the routing path from their respective devices to the peer device.

[0167] S207, after receiving the service operation initiated by device B, device B sends data packets related to the screen sharing service to device C through the connection link between device B and device C.

[0168] S208, after receiving the data packet related to screen sharing service sent by device B, device C sends the data packet related to screen sharing service to device B through the connection link between device C and device B.

[0169] For example, if a user initiates a screen sharing operation between device B and device C, in this scenario, the screen sharing-related service data packets are transmitted through the connection link between device B and device C.

[0170] The device networking method provided in this embodiment allows two devices to network via routing. If the other device is detected again, the two devices will re-network via LAN or Bluetooth. At the same time, the recorded networking mode of the two devices will be updated from routing to WiFi or Bluetooth, and the routing path between the two devices will be cleared. This ensures that the two devices can smoothly switch from routing to WiFi or Bluetooth networking, thus improving the stability of the network.

[0171] 2. There is a physical connection link between the two devices.

[0172] This embodiment uses scenario three above as an example for illustration, where device A and device B can be in a single Bluetooth network, and device A and device C can also be in a single Bluetooth network. Device B and device C cannot connect to each other due to link establishment failure or authentication failure. The following will combine... Figure 10 Explain the device networking process in this scenario:

[0173] like Figure 10 As shown, S301 to S317 describe how device A forms separate networks with devices B and C, respectively. For example, device A and device B form a WiFi network, and device A and device C form a Bluetooth network. Furthermore, after device A identifies multiple devices online, it notifies other devices in the network of the device information of the online devices. This process is similar to... Figure 7 The processes shown in S208 to S217 are the same, and will not be repeated here.

[0174] S318, Device B determines whether Device C is among the online devices; if not, proceed to S319.

[0175] S319, Device B performs a device scan. If Device C is detected, it is determined that there is a physical connection link between Device B and Device C.

[0176] After receiving the online device notification message from device A, device B determines whether device C is among its online devices based on the device information of device C carried in the notification message. If not, device B can scan the devices to determine whether a physical connection exists between device B and device C. If device B can scan and find device C, then a physical connection is confirmed between the two devices.

[0177] S320, Device C determines whether Device B is among the online devices; if not, it executes S321.

[0178] S321, Device C performs a device scan. If Device B is detected, it is determined that there is a physical connection link between Device C and Device B.

[0179] S322, Device B and Device C re-authenticate each other.

[0180] In this embodiment, when device B detects device C, it first initiates direct authentication with device C, meaning either device B or device C directly sends an authentication message to the peer device. If direct authentication between device B and C fails, it then initiates routed authentication, i.e., device B executes step S323 and device C executes step S325, performing device authentication via routing. In other words, if it is determined that device B and device C have a physical connection link, direct authentication is prioritized; if direct authentication fails, device authentication is then performed via a routed authentication method.

[0181] If device B and device C successfully authenticate directly, then device B connects to device C, and device C connects to device B. Furthermore, the networking modules of devices B and C respectively notify the service layer so that the trust ring interfaces of devices B and C can display the peer devices.

[0182] S323, If device B fails to authenticate directly with device C, then device B sends a routing authentication message to device A. This routing authentication message includes authentication information and routing information.

[0183] For example, routing information can be destination routing node information or routing path information.

[0184] S324, Device A forwards the routing authentication message sent by Device B to Device C.

[0185] If device B fails to authenticate device C, it initiates route authentication. That is, device A acts as a forwarding node between device B and device C, and the authentication message sent by device B is forwarded to device C via device A.

[0186] S325, if device C fails to authenticate directly with device B, then device C sends a routing authentication message to device A. This routing authentication message includes device C's authentication information and routing information.

[0187] S326, Device A forwards the routing authentication message sent by Device C to Device B.

[0188] Similarly, if direct authentication of device B initiated by device C fails, a routing authentication will be initiated, meaning that the authentication message sent by device C will be forwarded to device B via device A.

[0189] S323 to S326 describe the routing authentication process between device B and device C. Figure 7 The routing authentication process is the same as in other systems, so it will not be described again here.

[0190] Furthermore, S327 to S333 in this embodiment describe the online networking process after device B and device C successfully authenticate through routing. (See also...) Figure 7 The relevant content of S126 to S133 will not be repeated here.

[0191] like Figure 10 As shown, after receiving the operation of user's device B and device C to perform service interaction, device A responds by executing S334 to S336:

[0192] S334, Device A determines whether Device B and Device C are in a routing network based on the recorded routing information; if so, it executes S335 and S336. If not, no action is taken.

[0193] S335, Device A sends service-related data packets from Device C to Device B.

[0194] S336, Device A sends service-related data packets of Device B to Device C.

[0195] Device B and Device C are networked through Device A. Device A receives service-related data sent by Device B and forwards it to Device C. At the same time, Device A receives service-related data sent by Device C and forwards it to Device B, thereby realizing service interaction between Device B and Device C.

[0196] like Figure 10 As shown, S337 to S341 describe the processing procedures after a device that serves as a forwarding node between device B and device C goes offline. This process can be found in [reference needed]. Figure 7 The relevant content of S139 to S143 will not be repeated here.

[0197] The device networking method provided in this embodiment, when a device determines that it is currently networking with multiple other devices, sends the device information of the other online devices to the other devices in the network. For example, if device A is networking with both device B and device C, device A sends the device information of device C to device B, and the device information of device B to device C. In this way, device B and device C can further determine whether there is a physical connection link between the two devices. If a physical connection link exists, the two devices first perform direct authentication. If authentication fails, they then perform authentication through routing. After successful routing authentication, device B and device C network through routing, thereby improving the success rate of networking between the two devices.

[0198] In another scenario, after devices B and C form a routing network using device A as a forwarding node, if either device B or device C scans the peer device again, they will initiate direct authentication between the two devices again after the time elapsed since the last direct authentication exceeds a preset time. For example... Figure 11 As shown, the device networking method in this scenario may include the following steps:

[0199] S401, Device B or Device C scans the peer device again.

[0200] S402, Device B determines whether the time elapsed since the last direct authentication with Device C exceeds a preset time; otherwise, it waits until the time elapsed since the last direct authentication exceeds the preset time before re-initiating direct authentication between the two devices, i.e., executing S404.

[0201] S403, Device C determines whether the time elapsed since the last direct authentication with Device B exceeds a preset time; otherwise, it waits until the time elapsed since the last direct authentication exceeds the preset time before re-initiating direct authentication between the two devices, i.e., executing S404.

[0202] S404, Device B and Device C are directly certified.

[0203] like Figure 11 As shown, S405 to S408 in this embodiment describe the processing flow after the two devices successfully perform direct authentication again. This flow can be found in [reference needed]. Figure 9 The relevant content in S203 to S206 will not be repeated here.

[0204] also, Figure 11 S409 to S410 show the relevant procedures for service interaction between two devices after switching from routing networking to WiFi networking or Bluetooth networking. This process can be found in [reference needed]. Figure 9 The relevant content of S207 to S208 will not be repeated here.

[0205] The device networking method provided in this embodiment allows two devices networked via routing to initiate direct authentication again only if they scan for the other device again, provided that the time elapsed since the last direct authentication exceeds a preset duration. In other words, when two devices are already networked via routing, the number of direct authentication attempts is reduced, thereby saving the power consumed by direct authentication and reducing device power consumption.

[0206] Please see Figure 12 The diagram illustrates a networking method according to an embodiment of this application, which is applied to device A in any of the above embodiments. Figure 12 As shown, the method may include the following steps:

[0207] S501, Device A and Device B can form a network via LAN or Bluetooth.

[0208] This step may include Figure 7 The process described in S101 to S105, or the process described in S108 to S112.

[0209] S502, determine if there are multiple online devices; otherwise, execute S503.

[0210] In this example, device A connects to device B before connecting to device C. Therefore, after connecting to device B, the result of this step will determine whether or not the process will continue to execute S503.

[0211] S503, Device A and Device C can form a network via LAN or Bluetooth.

[0212] This step may include Figure 7 The process described in S101 to S105, or the process described in S108 to S112.

[0213] S504: Determine if there are multiple online devices; if so, execute S505.

[0214] This step and Figure 7 The implementation process of S115 is the same, so it will not be repeated here.

[0215] After device A connects to device C, the devices connected to device A include device B and device C. That is, device A has multiple connected devices. Therefore, the result of this step is "yes" and S505 continues.

[0216] S505, Device A notifies the online devices of the device information of the currently online devices.

[0217] Device A notifies Device B that Device B and Device C are online, and sends Device C's device information to Device B. Similarly, Device A notifies Device C that Device B and Device C are online on this device, and sends Device B's device information to Device C.

[0218] This step and Figure 7 The implementation process of S116 and S117 is the same, and will not be repeated here.

[0219] Please see Figure 13 This diagram illustrates a flowchart of another device networking method provided in an embodiment of this application. This method is applied to device B or device C in any of the above embodiments. The processing logic for device B and device C is the same; this embodiment uses device B as an example for illustration. Figure 13 As shown, the method may include the following steps:

[0220] S601, Device B receives device information sent by Device A.

[0221] Device B receives an online device notification message sent by Device A. This message includes the identifiers of all devices that have come online from Device A, as well as device information for other online devices besides Device B. In this example, it is the device information for Device C.

[0222] S602, Device B determines whether Device C is online; if not, proceed to S603; if yes, end the current process.

[0223] Device B checks whether its online devices include the device identifier of Device C. If it does, it confirms that Device B has connected Device C online; otherwise, it confirms that Device B has not connected Device C online.

[0224] This step and Figure 7 The implementation process of S118 in the illustrated embodiment is the same, and will not be repeated here.

[0225] S603, determine whether there is a physical connection link between device B and device C; if not, execute S604; if yes, execute S607.

[0226] This step and Figure 7 The implementation process of S119 in the illustrated embodiment is the same, and will not be repeated here.

[0227] S604, Device B initiates authentication via routing.

[0228] Device A acts as a forwarding node between Device B and Device C. Device B sends an authentication message to Device A. After Device A recognizes that the message is a routing message, it forwards the authentication message to Device C.

[0229] S605: Check if the routing authentication between device B and device C was successful; if the routing authentication was successful, proceed to S606; if the routing authentication failed, end the current process.

[0230] S606, Device B and Device C form a network via routing.

[0231] At this point, the routing network setup process between Device B and Device C is complete. Device B and Device C can then notify their respective service layers of the routing network setup with the peer device, causing the trusted ring interfaces of Device B and Device C to display the devices that have been routed online. Furthermore, after the routing network setup is complete, Device B and Device C can exchange service data.

[0232] S607, Device B directly initiates authentication to Device C.

[0233] If there is a physical connection link between device B and device C, then device B can initiate direct authentication to device C.

[0234] S608 determines whether direct authentication between the two devices is successful; if direct authentication between the two devices is successful, proceed to S614; if direct authentication fails, proceed to S609 to S611.

[0235] The implementation process of S609 to S611 is the same as that of S604 to S606 mentioned above, and will not be repeated here.

[0236] S612, Device B determines whether Device C has been scanned; if Device C is scanned, then S613 is executed; if Device C is not scanned, no action is taken, and the routing network with Device C is maintained.

[0237] S613, Device B determines whether the time elapsed since the last direct authentication exceeds a preset time; if so, it executes S607; otherwise, it does not perform any processing and maintains the routing network state with the device.

[0238] In scenarios where there is a physical connection link between device B and device C, after device B and device C form a network through routing, both devices will still perform device scanning. If device C is detected, direct authentication will not be initiated immediately. Instead, it will determine whether the time elapsed since the last direct authentication exceeds a preset time. If not, no action will be taken to maintain the routing network state with the device until the time elapsed since the last direct authentication exceeds the preset time, at which point direct authentication between the two devices will be performed.

[0239] The following will combine Figure 14 The internal structure of the terminal device provided in the embodiments of this application is described.

[0240] like Figure 14 The diagram shows a possible structural schematic of the terminal device provided in this application.

[0241] Terminal devices may include a processor, external memory interface, internal memory, universal serial bus (USB) interface, charging management module, power management module, battery, antenna 1, antenna 2, mobile communication module, wireless communication module, audio module, speaker, receiver, microphone, headphone jack, sensor module, buttons, motor, indicator, camera, display screen, and subscriber identification module (SIM) card interface, etc. The sensor module may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, proximity sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.

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

[0243] The processor may include one or more processing units, which may be independent devices or integrated into one or more processors. In this application, the processor in the terminal device acting as the central node can periodically perform device discovery within the group, obtain device information of other terminal devices in the group, and send it to the other terminal devices in the group.

[0244] Wireless communication modules can provide solutions for wireless communication applications on terminal devices, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth, global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. A wireless communication module can be one or more devices integrating at least one communication processing module.

[0245] Display screens are used to display text, images, videos, etc.

[0246] The memory can store executable program code, which includes instructions. The processor executes the instructions stored in the memory to perform various functional applications and data processing of the terminal device. For example, in this embodiment, the processor can implement the device networking method of this application by executing the instructions stored in the memory.

[0247] In addition, a smart operating system runs on top of the aforementioned components. For example, the iOS operating system. Open-source operating systems, such as Windows. Applications can be installed and run on smart operating systems.

[0248] The operating system of a terminal device can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application's embodiments use... Figure 4 The software architecture shown is used as an example to illustrate the software structure of a terminal device.

[0249] A layered architecture divides software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, such as... Figure 4 As shown, the intelligent operating system can be divided into four layers, from top to bottom: the application layer, the application framework layer, the system library, and the kernel layer.

[0250] The application layer can include a series of application packages. For example, it can include applications such as camera, gallery, calendar, calling, map, navigation, WLAN, Bluetooth, video, and SMS.

[0251] For example, in this embodiment of the application, the application package may also include Honor Share, Screen Share, etc.

[0252] Honor Share allows you to share resources from this device to other devices with Honor Share functionality. For mobile phones, after enabling the share to computer function, the phone can be accessed by a connected computer.

[0253] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications within the application layer. The application framework layer includes predefined functions. For example, it may include a window manager, content provider, view system, phone manager, resource manager, notification manager, etc. In this embodiment, the application framework layer may also include the aforementioned discovery and connection module.

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

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

[0256] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments. The aforementioned storage medium includes various media capable of storing program code, such as flash memory, portable hard disk, read-only memory, random access memory, magnetic disk, or optical disk.

[0257] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A device networking method, characterized in that, The method, which employs a second electronic device, includes: The second electronic device is networked with the first electronic device, the first device records the device information of the second device, and the first device is networked with the third device and records the device information of the third device; The second electronic device receives a first notification message sent by the first electronic device, the first notification message including device information of the electronic device that is networked with the first electronic device; The second device determines that the third device is not online based on the device information of the third device, and sends a first routing authentication message to the first device, including the authentication information of the second device and the first routing information. The first routing information is used to enable the first device to forward the first routing authentication message to the third device to authenticate the identity of the second device. The second device receives the second routing authentication message forwarded by the first device, and performs identity authentication on the third device based on the second routing message. The second routing authentication message is sent by the third device to the first device after determining that the second device is not online based on the device information sent by the first device. The second routing authentication message includes the authentication information and second routing information of the third device. The second routing information is used to enable the first device to send the second routing authentication message to the second device. The second device and the third device successfully authenticated through routing, and the second device and the third device formed a network with the first device as the forwarding node.

2. The method according to claim 1, characterized in that, The second device determines that the third device is not online based on the device information of the third device, and sends a first routing authentication message to the first device, including the authentication information of the second device and the first routing information, including: After determining that the third device is not online based on the device information of the third device, the second device determines whether there is a physical connection link between the second device and the third device; If it is determined that there is no physical connection link between the second device and the third device, a first routing authentication message including the authentication information of the second device and the first routing information is sent to the first device.

3. The method according to claim 1 or 2, characterized in that, The second device determines that the third device is not online based on the device information of the third device, and sends a first routing authentication message to the first device, including the authentication information of the second device and the first routing information, including: After determining that the third device is not online based on the device information of the third device, the second device determines whether there is a physical connection link between the second device and the third device; If it is determined that there is a physical connection link between the second device and the third device, the second device and the third device perform direct authentication. If the authentication between the second device and the third device fails, a first routing authentication message including the authentication information of the second device and the first routing information is sent to the first device.

4. The method according to claim 3, characterized in that, After the second device and the third device form a network with the first device as the forwarding node, the method further includes: Once the second device scans the third device and determines that the time elapsed since the last direct authentication is greater than or equal to a preset time, the second device performs direct authentication with the third device.

5. The method according to claim 2, characterized in that, After the second device and the third device form a network with the first device as the forwarding node, the method further includes: After the second device scans the third device, it performs direct authentication with the third device.

6. The method according to any one of claims 2 to 5, characterized in that, The step of determining whether a physical connection link exists between the second device and the third device includes: The second device performs a device scan. If the third device is detected, it is determined that there is a physical connection link between the second device and the third device. If the third device is not detected, it is determined that there is no physical connection link between the second device and the third device.

7. The method according to any one of claims 1 to 6, characterized in that, After the second device and the third device form a network with the first device as the forwarding node, the method further includes: The second device records the networking mode between the second device and the third device as a routing network and third routing information; The second device sends a second notification message to the first device. The second notification message includes whether the second device and the third device are in a routing network and the third routing information, so that the first device records the networking method of the second device and the third device and the third routing information.

8. The method according to claim 7, characterized in that, The method further includes: In response to the shared service operation with the third device, the second device identifies that the second device and the third device are in a routing network, and determines the first device as a forwarding node based on the routing path between the second device and the third device; Send first service data to the first device, the first service data including fourth routing information, the fourth routing information being used to enable the first device to forward the first service data to the third device; Receive the second service data returned by the third device and forwarded by the first device.

9. The method according to any one of claims 1 to 8, characterized in that, After the second device and the third device form a network with the first device as the forwarding node, the method further includes: The icon of the third device is displayed on the interface of the second device used to display online devices.

10. The method according to any one of claims 1 to 9, characterized in that, After the second device and the third device form a network with the first device as the forwarding node, the method further includes: The second device receives the offline notification message from the first device and identifies the first device as a forwarding node between the second device and the third device, and then takes the first device and the third device offline.

11. A device networking method, characterized in that, Applied to a first device, the method includes: The first device and the second device form a network and the device information of the second device is recorded; The first device and the third device form a network and the device information of the third device is recorded; The first device determines that multiple devices are online, sends a first notification message to the second device, and sends a second notification message to the third device. The first notification message includes the device information of the third device, and the second notification message includes the device information of the second device. The first device receives a first routing authentication message sent by the second device. The first routing message includes the authentication information of the second device and the first routing information. It is generated by the second device after determining that the third device is not online based on the device information of the third device in the first notification message. The first device sends the first routing authentication message to the third device based on the first routing information, so that the third device authenticates the second device; The first device receives a third notification message sent by the second device, the third notification message including whether the second device and the third device are in a routing network, and second routing information from the second device to the third device; The first device records the networking method of the second device and the third device, as well as the second routing information.

12. The method according to claim 11, characterized in that, After the first device records the networking method and second routing information of the second and third devices, the method further includes: Receive first service data sent by the second device, wherein the first service data includes third routing information; Based on the third routing information, the first service data is sent to the third device; Receive second service data sent by the third device, wherein the second service data message includes fourth routing information; The second service data is sent to the second device based on the fourth routing information.

13. The method according to claim 11 or 12, characterized in that, After the first device records the networking method and second routing information of the second and third devices, the method further includes: When the first device goes offline, it sends a offline notification message to the second device. The offline notification message is used to enable the second device to recognize that the first device is a forwarding node of the second device and simultaneously take the first device and the third device offline.

14. An electronic device, characterized in that, The electronic device includes: one or more processors, a memory, and a touch screen; the memory is used to store program code; the processor is used to run the program code, causing the electronic device to implement the device networking method as described in any one of claims 1 to 10 or the device networking method as described in any one of claims 11 to 13.

15. A computer-readable storage medium, characterized in that, It stores instructions that, when executed on an electronic device, cause the electronic device to perform the device networking method as described in any one of claims 1 to 10 or any one of claims 11 to 13.

16. A chip system, characterized in that, include: At least one processor and an interface, the interface being used to receive code instructions and transmit them to the at least one processor; The at least one processor executes the code instructions to implement the device networking method according to any one of claims 1-10 or the device networking method according to any one of claims 11 to 13.