Networking method and device, computer readable storage medium and computer program product

By using open access points to automatically determine device roles and cancel the WPS process in WiFi Mesh networking, the inflexibility and complexity caused by fixed device roles in traditional networking solutions are solved, achieving a more efficient networking process.

CN121645241APending Publication Date: 2026-03-10ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411261921.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Traditional WiFi Mesh networking solutions require pre-determining the roles of devices, resulting in an inflexible and complex networking process that is prone to failure.

Method used

During the networking process, the device automatically discovers roles through the open access point, uses beacon frames and probe response frames to carry role information, dynamically determines roles based on the external network connection status, and establishes a connection through the open access point, eliminating the traditional WPS process.

Benefits of technology

It improves the flexibility and success rate of the networking process, simplifies the operation process, avoids overlap in the WPS process, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121645241A_ABST
    Figure CN121645241A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a networking method, networking equipment, a computer readable storage medium and a computer program product, the method can be applied to first equipment, and the method comprises the following steps: after the first equipment is started and WiFi is started, sending first information carrying target information of the first equipment through an open access point of the first equipment, the target information comprises role information; detecting whether the first equipment is connected to an external network, and if so, updating role information of the first equipment carried in the first information; monitoring second information sent by at least one second device through the open access point through the own open access point, adding the first device and the second device into a white list after monitoring, and correspondingly recording target information of the first device and the second device in the white list; and performing networking according to the role information of each device in the white list. According to the method, the role of the equipment does not need to be fixed in advance, and the role is automatically determined in the networking process, so that the flexibility in the networking process can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present document relates to the terminal field, and in particular to a networking method, device, computer readable storage medium and computer program product. BACKGROUND

[0002] A conventional Wireless Fidelity (WiFi) EasyMesh networking solution requires manual operation of a WiFi Protected Setup (WPS) button on a controller and an agent, and the WPS button is used to interactively return a backhaul access point (Backhaul AP) key and connect to the backhaul access point through a WPS process.

[0003] To avoid excessive manual operation, related technologies propose an automatic networking solution, but these solutions need to fix the identities of networking devices in advance, that is, it is necessary to confirm in advance which device is a controller and which device is an agent, resulting in an inconvenient and inflexible networking process. SUMMARY

[0004] Embodiments of the present application provide a networking method, device, computer readable storage medium and computer program product, which are used to solve the problem of the inconvenient and inflexible WiFi Mesh networking solution proposed by related technologies.

[0005] To solve the above technical problems, embodiments of the present application are implemented as follows:

[0006] In a first aspect, a networking method is provided, applied to a first device, and the method comprises:

[0007] After the first device is powered on and starts WiFi, the first device sends first information through an open access point, wherein the first information carries target information of the first device, and the target information includes role information, and the role information includes one of an agent and a controller;

[0008] Detecting whether the first device is connected to an external network, and if yes, updating the role information of the first device carried in the first information according to the detection result;

[0009] The first device listens to second information sent by at least one second device through the open access point, and after the second information is listened to, the first device and the second device are added to a white list, and the target information of the first device and the second device is recorded in the white list, wherein the second information carries the target information of the second device;

[0010] The network is formed based on the role information of each device in the whitelist.

[0011] Secondly, a networking device is provided for use with a first device, the device comprising:

[0012] The first sending module is configured to send first information through its own open access point after the first device is powered on and WiFi is started. The first information carries target information of the first device, and the target information includes role information, which includes one of a sub-device and a master device.

[0013] The external network detection module is used to detect whether the first device is connected to the external network. If it is, the role information of the first device carried in the first information is updated according to the detection result.

[0014] The first receiving module is configured to listen to second information sent by at least one second device through its own open access point, and after listening to the second information, add the first device and the second device to a whitelist, and record the target information of the first device and the second device in the whitelist accordingly, wherein the second information carries the target information of the second device;

[0015] The self-organizing network module is used to form a network based on the role information of each device in the whitelist.

[0016] Thirdly, an electronic device is provided, comprising:

[0017] processor;

[0018] Memory used to store the processor's executable instructions;

[0019] The processor is configured to execute the instructions to implement the method as described in the first aspect.

[0020] Fourthly, a computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the method described in the first aspect.

[0021] Fifthly, a computer program product including instructions is provided, wherein when a computer executes the instructions of the computer program product, the computer performs the method as described in the first aspect.

[0022] In this embodiment of the application, since the first device and at least one second device do not need to fix the device roles in advance when forming a network, but automatically determine the roles based on the collected whitelist during the networking process, the flexibility of the networking process can be improved. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a schematic diagram of the WiFi interface framework of the main device in a Mesh network, which is related to the technology.

[0025] Figure 2 This is a schematic diagram of the WiFi interface framework of a sub-device in a Mesh network, a related technology.

[0026] Figure 3 This is a schematic diagram of a Mesh network Wi-Fi interface framework provided in one embodiment of this application.

[0027] Figure 4 This is a flowchart illustrating a networking method provided in one embodiment of this application.

[0028] Figure 5 This is a flowchart illustrating a networking method provided in another embodiment of this application.

[0029] Figure 6 This is a flowchart illustrating a networking method provided in another embodiment of this application.

[0030] Figure 7 This is a flowchart illustrating the self-organizing network process provided in one embodiment of this application.

[0031] Figure 8 This is a schematic diagram of the structure of an electronic device provided in one embodiment of this application.

[0032] Figure 9 This is a schematic diagram of a networking device provided in one embodiment of this application.

[0033] Figure 10 This is a schematic diagram of a networking device provided in another embodiment of this application. Detailed Implementation

[0034] To enable those skilled in the art to better understand the technical solutions in the embodiments of this application, the technical solutions in one or more embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the protection scope of this document.

[0035] The terms "first," "second," etc., used in this application and claims are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in this application and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0036] To address the issue that WiFi Mesh networking solutions proposed in related technologies require prior confirmation of which device will act as the master device and which as the slave device, resulting in an inconvenient and inflexible networking process, this application proposes a networking method that can be applied to, but is not limited to, home WiFi networks.

[0037] To better understand the innovation of the networking method proposed in this application embodiment, a brief introduction to the traditional Mesh networking scheme will be given below.

[0038] Traditional home WiFi networks connect via Access Points (APs) and Clients. With societal and network advancements, a single router cannot provide reliable WiFi coverage over a wide area. EasyMesh networking addresses this by providing a specification to meet users' network needs over extended areas. A Mesh network consists of a controller and agents. The controller provides access to its network for other Mesh-enabled devices, while the APs that support Mesh and can connect to the controller's network are called agents. Controllers and agents can be networked wirelessly or via wired connections to extend overall network coverage. After networking, controllers and agents use the same Service Set Identifier (SSID) and password. By strategically placing controllers and agents indoors, the entire house can be within the coverage area of ​​the same SSID. Utilizing the seamless roaming mechanism of the Mesh protocol, users can seamlessly switch between APs.

[0039] like Figure 1 As shown, the main device 10 has two types of WiFi interfaces. The first type is a fronthaul AP 11, which is broadcast to the outside and can be found and connected to by WiFi client devices (mobile phones, computers, tablets, etc.). The other type is a backhaul AP 12, which is usually hidden and is used by sub-devices within the coverage area of ​​the main device.

[0040] like Figure 2 As shown, the sub-device 20 has three types of WiFi interfaces: Fronthaul AP 21, Backhaul AP 22, and Backhaul Station (or Backhaul STA) 23. The Fronthaul AP 21 functions the same as the main device, broadcasting to allow surrounding WiFi client devices to connect. The Backhaul AP 22 automatically updates after the sub-device connects to the main device or after the backhaul AP information on the main device is updated; this is a basic function provided by Mesh. The backhaul APs on the sub-devices are used by their next-level sub-devices to connect; the backhaul station 23 on the sub-devices connects to the main device or the backhaul AP on its upstream sub-device.

[0041] For Mesh wireless networking, the current mainstream approach involves triggering the WiFi Protected Setup (WPS) button. The master and slave devices must first actively establish a connection via WPS. Specifically, the user simultaneously presses and holds the WPS button on both the master and slave devices to establish a WPS connection. This WPS connection links the backhaul point on the slave device to the front access point on the master device. After synchronizing the backhaul access point information from the master device to the slave device, the connection between the master and slave devices is switched to the backhaul access point. The Mesh then synchronizes the front access point and topology information, completing the remaining networking steps.

[0042] It's easy to see that the traditional Mesh networking solution using WPS buttons requires pre-setting the master and slave devices, which is not flexible enough. In addition, it requires manually pressing the WPS buttons of the master and slave devices at the same time, which is complicated and time-consuming. Furthermore, the WPS process is easily interfered with by other WPS processes, resulting in overlap and network failure.

[0043] To solve at least one of the above problems, such as Figure 3As shown, in the networking method proposed in this application embodiment, the Mesh devices to be networked (the first device and the second device mentioned below) 30 are not distinguished as master devices (also called controllers) and sub-devices (also called agents) before leaving the factory. Regardless of whether they act as sub-devices or master devices during networking, the WiFi interfaces are the same at the factory. All Mesh devices will start an open point 34 at the factory to realize device role discovery. Optionally, a backhaul STA 33, multiple fronthaul APs 31, and a backhaul AP 32 can also be started. Compared with traditional Mesh devices to be networked, the Mesh devices to be networked proposed in this application embodiment can save interface loading time.

[0044] In brief, the networking method provided in this application includes a self-discovery phase and a self-organizing phase. The self-discovery phase involves searching for and determining the roles of the master and slave devices. This phase can be achieved using beacon frames broadcast by WiFi devices or by sending probe request frames, and the entire discovery process takes approximately 200ms. The self-organizing phase utilizes open access points on the master device to transmit back access point information, which can replace the traditional WPS process.

[0045] Optionally, in this embodiment, the open access point has a special feature: the open access point only allows sub-devices discovered during the discovery phase to connect, and other unauthorized devices will be rejected from connecting to the open access point.

[0046] The networking method proposed in this application can be applied to Mesh devices (such as the first device or the second device described below). For example, it can be applied to products such as Customer Premises Equipment (CPE) or UFI (USB version of portable WiFi) that support Mesh functionality. It can significantly improve the networking success rate, shorten the networking time, and significantly improve the user experience.

[0047] The following describes in detail a networking method provided by an embodiment of this application with reference to the accompanying drawings.

[0048] like Figure 4 As shown in the embodiments of this application, a networking method can be applied to a first device, the first device including an open access point, and the method may include:

[0049] Step 401: After the first device is powered on and WiFi is started, it sends first information through its own open access point. The first information carries target information of the first device, and the target information includes role information, which includes one of sub-device and master device.

[0050] The first device mentioned above can be any Mesh device to be networked, and the second device mentioned below is the remaining Mesh devices to be networked. The first and second devices have the same factory settings, and there is no distinction between master and slave devices when they leave the factory.

[0051] In some embodiments, sending the first information via its own open access point may include broadcasting beacon frames at preset time intervals via its own open access point. That is, the first information may be beacon frames broadcast by the first device via its open access point at preset time intervals, the beacon frames carrying target information of the first device. In related technologies, a beacon frame is a management frame periodically broadcast by a WiFi hotspot to notify WiFi clients of the SSID information of the WiFi access point. In this embodiment, the beacon frame is extended to carry target information.

[0052] In other embodiments, sending the first information via its own open access point may include sending a probe response frame in response to a received probe request frame via its own open access point. That is, the first information may be a probe response frame sent by the first device via its open access point in response to a received probe request frame.

[0053] In other embodiments, sending the first information via its own open access point may include sending a probe request frame via its own open access point. That is, the first information may be a probe request frame sent by the first device through its open access point.

[0054] In the target information, role can be a field, and different values ​​of the field represent different roles. For example, when the value of the field is 0, it means that the device is a sub-device, and when the value of the field is 2, it means that the device is a master device.

[0055] Step 402: Detect whether the first device is connected to the external network. If yes, update the role information of the first device carried in the first information according to the detection result.

[0056] In this application, "external network" is used in contrast to "mesh network," and any network outside the mesh network can be called an external network. As a specific example, if the mesh network is a home WiFi network, then the external network can be a wide area network (WAN).

[0057] It is understood that in a home WiFi network, typically only one Mesh device is connected to the external network, and this Mesh device can act as the master device. Therefore, in the first embodiment, whether a Mesh device (such as the first device mentioned above or the second device described below) is connected to the external network can be used as the criterion for determining whether the Mesh device can act as the master device. In this case, step 402 may include: detecting whether the first device is connected to the external network; if yes, updating the role information of the first device carried in the first information to master device; if no, updating the role information of the first device carried in the first information to sub-device. After the update, the first device can inform the second device through the first information newly sent by its own open access point: the current role of the first device is master device or sub-device.

[0058] For example, the first device can check if its WiFi connection can ping the external network. If the WAN connection is OK, it considers itself the master device and modifies the value of the role field in its newly sent first message to 2, indicating that it is the master device. Correspondingly, after receiving such a first message, other devices can modify the value of the role field in their sent second message to 0, indicating that they are slave devices.

[0059] Of course, it's also possible that two or more Mesh devices are connected to the external network. In this case, which Mesh device can act as the master device will be determined based on the external network rating coefficient mentioned below. Therefore, in the second embodiment, the target information also includes the external network rating coefficient, and correspondingly, step 402 may include:

[0060] The external network rating coefficient of the first device is determined based on the test results;

[0061] Based on the external network rating coefficient of the first device, update the role information and external network rating coefficient of the first device carried in the first information.

[0062] The external network rating coefficient is determined based on at least one of the following: external network connection status, access latency, and throughput. Generally, if the first device is connected to the external network, the lower the access latency and the higher the throughput, the higher the external network rating coefficient of the first device.

[0063] Furthermore, in the second embodiment described above, the role information also includes a candidate master device, whose field value can be 1. The step of updating the role information and external network rating coefficient of the first device carried in the first information according to the external network rating coefficient of the first device may include: updating the role information of the first device carried in the first information to a candidate master device when the external network rating coefficient of the first device is greater than a first threshold.

[0064] For example, the first device can detect whether its own WiFi connection can ping the external network. If the WAN connection is OK, the device will also access the external network simultaneously to detect the uplink and downlink communication status, generate an external network rating coefficient, put it into the beacon frame it wants to send, and the role field will also be modified to 1, indicating that the first device has now become the candidate master device.

[0065] Furthermore, in the second embodiment described above, updating the role information and external network rating coefficient of the first device carried in the first information based on the external network rating coefficient of the first device may further include:

[0066] After updating the role information of the first device carried in the first information to the candidate master device, a timer is started. The function of the timer is to detect whether there are other Mesh devices connected to the external network within the time period.

[0067] After the timer expires, if it is determined that the whitelist below contains only one candidate master device, then the candidate master device is determined as the master device.

[0068] After the timer expires, if it is determined that the whitelist includes at least two candidate master devices, then the master device is determined according to the external network rating coefficient of the at least two candidate master devices, and the role information of the candidate master devices other than the master device is updated to sub-device.

[0069] In one implementation, determining the master device based on the external network rating coefficients of the at least two candidate master devices may include: determining the one with the largest external network rating coefficient among the at least two candidate master devices as the master device; further, updating the role information of the one with the largest external network rating coefficient among the at least two candidate master devices as the master device.

[0070] In another implementation, the target information further includes a random code, wherein determining the master device based on the external network rating coefficients of the at least two candidate master devices includes: if the external network rating coefficients of the at least two candidate master devices are the same, determining the master device based on the random codes corresponding to the at least two candidate master devices. For example, the candidate master device with the largest random code can be determined as the master device.

[0071] Specifically, when the master device is the first device, it can broadcast its latest role information through the first information and wait for the sub-device to establish an open access point connection.

[0072] Specifically, if, within the timer's timing period, the first device detects that the external network rating coefficient of another device is greater than its own external network rating coefficient, then it changes its role field from candidate master device to sub-device, and then checks whether the received beacon has a master device. If so, it connects to the open access point on the master device.

[0073] Optionally, Figure 4 The method shown may further include: when the master device is the first device, setting the timer to an error state (false) so that the timer will not be started the next time the first device restarts.

[0074] Optionally, the first device further includes a preset button, which, after the timer is started, Figure 4 The method may further include: if an operation on the preset key is detected during the timer's timing period, the first device is designated as the master device, and the timer is set to an error state, so that the timer will not be started the next time the first device restarts.

[0075] Step 403: Listen to the second information sent by at least one second device through the open access point of the device itself. After listening to the second information, add the first device and the second device to the whitelist and record the target information of the first device and the second device in the whitelist. The second information carries the target information of the second device.

[0076] In some embodiments, the second information may be a beacon frame broadcast by the second device through its own open access point at preset time intervals, the beacon frame carrying the target information of the second device.

[0077] In other embodiments, the second information may be a probe response frame replied by the second device to the received probe request frame.

[0078] In other embodiments, the second information may be a probe request frame sent by the second device through its own open access point.

[0079] Optionally, the target information also includes verification parameters. These verification parameters can be vendor serial numbers that allow networking or other custom identification information, but are not limited to these two. Specifically, after detecting the second information, before adding the first device and the second device to the whitelist, the method further includes:

[0080] The validity of the second information is verified based on the verification parameters of the second device carried in the second information.

[0081] If the validity of the second information passes the verification, the second device will be added to the whitelist.

[0082] In practical applications, the first device enters listening mode immediately upon power-on. This listening mode receives beacon frames, probe request frames, and authentication frames, while simultaneously validating the received messages. Validation checks the verification parameters (such as checksums) in these messages; only messages with supported verification parameters are further processed, otherwise, they are discarded. After the validity check passes, there is another process: if the received message from the second device is second-level information (such as a beacon frame or probe request frame), then the second device is considered a Mesh device, and its target information is recorded to form a whitelist. At this point, the discovery phase ends, and the self-organizing network phase begins.

[0083] Step 404: Configure the network according to the role information of each device in the whitelist.

[0084] It is easy to see that steps 401, 402 and 403 correspond to the self-discovery stage mentioned above, and step 404 corresponds to the self-organizing network stage.

[0085] For the first device, depending on the main device in the whitelist, the networking can be divided into several cases based on the role information of each device in the whitelist.

[0086] 1) In some embodiments, step 404 may include:

[0087] Based on the role information of each device in the whitelist, determine whether there is a master device in the whitelist;

[0088] If a master device exists in the whitelist, and the second device is the master device, and the first device is the slave device, the first device initiates a connection request to the open access point of the second device through its own backhaul station.

[0089] After the backhaul station of the first device successfully connects to the open access point of the second device, the master device information is obtained through the open access point of the second device, wherein the master device information includes the front access point information and backhaul access point information of the second device;

[0090] The first device disconnects its own backhaul station from the open access point of the second device, connects the backhaul station to the backhaul access point of the second device according to the master device information, and modifies its own backhaul access point information to the backhaul access point information of the second device.

[0091] 2) In some other embodiments, step 404 may include:

[0092] Based on the role information of each device in the whitelist, determine whether there is a master device in the whitelist;

[0093] If a master device exists in the whitelist, and the first device is the master device and the second device is the slave device, a connection request from the backhaul station of the second device to connect to the open access point of the first device is received.

[0094] In response to the connection request, a connection is established between the open access point of the first device and the backhaul station of the second device;

[0095] After the open access point of the first device successfully connects to the backhaul station of the second device, the first device sends master device information to the second device through its own open access point. The master device information includes the front access point information and backhaul access point information of the first device. The master device information is used by the second device to connect its own backhaul station to the backhaul access point of the first device and modify its own backhaul access point information to the backhaul access point information of the first device.

[0096] Optionally, the target information further includes device verification information, which includes at least one of verification parameters and device identifier. The connection request carries the device verification information of the second device. As mentioned above, the verification parameters can be a vendor serial number that allows networking or other custom identification information, but are not limited to these two. The device identifier can be at least one of the MAC address of the open access point and the MAC address of the backhaul station, or other serial numbers that can identify the device and verify its validity.

[0097] Accordingly, establishing the connection between the open access point of the first device and the backhaul station of the second device includes: determining at least one of the validity and legality of the connection request based on the device verification information of each device recorded in the whitelist and the device verification information of the second device carried in the connection request; and establishing the connection between the open access point of the first device and the backhaul station of the second device if at least one of the validity verification and legality verification of the connection request passes.

[0098] For example, after the validity check passes, the master device will further check whether the message is a connection request. Connection requests include authentication (auth) messages, association messages, etc. Further, the master device will check the source address in the connection request. If the source address is the same as the device identifier of a valid sub-device stored therein, then the connection request is acceptable; otherwise, it is considered an invalid request.

[0099] The step of sending master device information to the second device through its own open access point includes:

[0100] Receives a first request, encrypted with a first key, from the backhaul station of the second device via its own open access point;

[0101] After successfully decrypting the first request, the device sends a first feedback message encrypted with the second key to the second device through its own open access point. The first feedback message carries the information of the master device.

[0102] As an example, if the target information further includes verification parameters and device identifier, then the first key may include the verification parameters of the second device; the second key may include the verification parameters of the first device and device identifier.

[0103] 3) In some other embodiments, step 404 may include:

[0104] Based on the role information of each device in the whitelist, determine whether there is a master device in the whitelist;

[0105] If there is no primary device in the whitelist, but there are networked sub-devices in the whitelist, and the networked sub-devices do not include the first device, the first device initiates a connection request to the open access point of the networked sub-devices through its own backhaul station.

[0106] After the backhaul station of the first device successfully connects to the open access point of the networked sub-device, the networked sub-device information is obtained through the open access point of the networked sub-device. The networked sub-device information includes the front access point information and backhaul access point information of the networked sub-device.

[0107] The first device disconnects its own backhaul station from the open access point of the networked sub-device, connects the backhaul station to the backhaul access point of the networked sub-device, and modifies its own backhaul access point information to the backhaul access point information of the networked sub-device.

[0108] The target information also includes network information, which includes whether the device is already networked or not. The networked device is determined based on the network information of the second device in the whitelist.

[0109] The networking method proposed in this application improves flexibility during networking because the roles of the first device and at least one second device are automatically determined based on a collected whitelist during the networking process, without requiring pre-defined device roles. Furthermore, no manual intervention is required during either the device discovery or self-networking phases, making the operation simple and user-friendly. Moreover, since networking can be achieved without the WPS process, there is no networking failure caused by overlapping WPS processes, significantly improving the networking success rate, shortening networking time, and enhancing the user experience.

[0110] Of course, the networking method proposed in this application embodiment can also be other networking methods, such as being compatible with WPS networking. Specifically, the first device also includes a WPS button. The networking method proposed in this application embodiment further includes: after detecting an operation on the WPS button, the first device is used as the master device, and networking is performed according to the WPS process.

[0111] The following is in conjunction with the appendix Figure 5 Appendix Figure 6 and appendix Figure 7 The networking method proposed in the embodiments of this application will be described in detail again.

[0112] like Figure 5 As shown, for the first device 51 and at least one second device, a networking method proposed in this application embodiment may generally include:

[0113] Step 501: The open access point 514 of the first device 51 continuously detects external network connections. If it detects that the first device has been connected to the external network, it updates its role information to candidate master device or master device.

[0114] Step 502: The open access point 524 of the second device 52 continuously detects external network connections. If it detects that the first device is not connected to the external network, it updates its role information to that of a sub-device.

[0115] Step 503: Establish a WiFi connection between the backhaul station 523 of the second device 52 and the open access point 514 of the first device 51.

[0116] Step 504: The backhaul station 523 of the second device 52 exchanges access point information (such as front-end access point information and backhaul access point information) with the open access point 514 of the first device 51.

[0117] Step 505: The backhaul station 523 of the second device 52 establishes a connection with the backhaul access point 512 of the first device 51, and the sub-devices in the second device 52 and the first device 51 update their own backhaul access point information to the backhaul access point information of the master device, and the network is successfully formed.

[0118] It should also be noted that, Figure 5 In the first device 51, the backhaul station is 513, and in the second device 52, the backhaul access point is 522.

[0119] Step 506: The front access point 511 of the first device 51 waits for the client to connect.

[0120] Step 507: The front access point 521 of the second device 52 waits for the client to connect.

[0121] Compared with the traditional WPS networking method, the networking method proposed in this application eliminates the WPS process, realizes automatic detection of the master device and the slave device after power-on, and then establishes a WiFi connection through a preset open access point. The access point information is exchanged and transmitted back through an encryption algorithm, so that the two devices establish a Mesh backhaul connection.

[0122] In one specific implementation, the networking method provided in this application embodiment may include three sub-processes for a first device or a second device (hereinafter collectively referred to as Mesh devices):

[0123] 1. Message Broadcasting Process: Through this process, Mesh devices can broadcast their target information.

[0124] II. External Network Access Detection Process: Through this process, the Mesh device will dynamically adjust its role based on the access status.

[0125] III. Message Listening Process.

[0126] There will be message exchange between the three processes. They will all start after boot and run in parallel, without any specific order. The following will combine... Figure 6 Explain each point in detail.

[0127] Step 600: Power on the Mesh device.

[0128] After the Mesh device is powered on and WiFi is enabled, the above three processes are executed in parallel.

[0129] I. Message broadcasting process, including:

[0130] Step 601: The Mesh device broadcasts a beacon frame carrying target information through its own open access point.

[0131] Compared to beacon frames in related technologies, in this embodiment, extended fields are added to the beacon frame to carry target information. Specifically, the target information may include several fields as shown in Table 1 below.

[0132] Table 1 contains the fields of the target information.

[0133] Check parameter Device identification Role External network rating coefficient Random code Whether networked Serial code MAC address combination 0 0 0 0

[0134] In Table 1:

[0135] Verification parameters can be the manufacturer's serial number that allows networking or other custom identification information, but they are not limited to these two.

[0136] Device identifiers can be a combination of the MAC address of the open access point and the MAC address of the backhaul station, or other device identification information, or a serial number used to verify the validity of the device.

[0137] Role 0 represents a sub-device.

[0138] Role 1 represents the candidate master device.

[0139] Role 2 represents the main device.

[0140] The external network rating coefficient is calculated by the Mesh device after it detects a connection to the WAN, based on the WAN connection status, access latency, and throughput information.

[0141] The random code is a numerical information randomly added to the beacon frame by the Mesh device after detecting two or more candidate master devices in the network and having the same external network rating coefficient. Its value can be 1-10 and is used to decide which device will become the master device in the end.

[0142] Whether a network has been established – 0 indicates no network has been established, 1 indicates a network has been established.

[0143] II. External network access detection process, including:

[0144] Step 602: The Mesh device determines whether it has formed a network. If yes, the process ends; otherwise, proceed to step 603.

[0145] Step 603: The Mesh device determines whether it is connected to the external network. If yes, proceed to step 604; otherwise, return to step 602.

[0146] In step 604, the Mesh device updates its role to that of a candidate master device, and then proceeds to steps 601 and 605.

[0147] Step 605: Start the timer on the Mesh device.

[0148] Step 606: The Mesh device determines whether its external network rating coefficient is the maximum. If yes, proceed to step 609; otherwise, proceed to step 607.

[0149] Step 607: The Mesh device updates its role to that of a child device, then proceeds to step 608.

[0150] In step 608, the Mesh device checks and waits for beacon frames from the master device, then returns to execute step 620.

[0151] Step 609: The Mesh device determines whether the timeout period has ended. If yes, proceed to step 610; otherwise, return to step 602.

[0152] Step 610: The Mesh device sets the timer to an error state.

[0153] Step 611: The Mesh device updates its role to that of a candidate master device.

[0154] Step 612: The Mesh device waits for the child devices to connect.

[0155] III. The monitoring process includes:

[0156] Step 613, the Mesh device receives the message.

[0157] The messages may include, but are not limited to, beacon frames, probe request frames, authentication requests, etc.

[0158] Step 614: The Mesh device verifies the validity of the received message. If the verification passes, proceed to step 615; otherwise, discard the message.

[0159] The validity check will examine the checksum in the message. Only if the checksum is supported will the message be processed further; otherwise, the received message will be discarded.

[0160] Step 615: The Mesh device checks whether the received message is a connection request. If yes, proceed to step 616; otherwise, proceed to step 619.

[0161] Step 616: If the whitelist contains a main device or a networked sub-device, and the main device or networked sub-device is the Mesh device, then proceed to step 617.

[0162] It is understandable that the connection request here is a connection request initiated by a sub-device to the master device and to other sub-devices. 1) If the sub-device detects that the master device information is in its whitelist, it will initiate a connection to the master device's open access point; 2) If the sub-device does not detect the master device information, but detects that there is already a networked sub-device, and the network rating parameter in the sub-device information is not zero, then the sub-device to be networked will initiate a connection process to the already networked sub-device through its open access point.

[0163] Step 617: The Mesh device responds to the connection request.

[0164] Step 618: Mesh devices exchange and transmit access point information back.

[0165] Step 619: The Mesh device records the MAC information of the device that sent the connection request.

[0166] Step 620: The Mesh device determines whether it is the master device. If it is, it returns to step 613; otherwise, it proceeds to step 621.

[0167] Step 621: The Mesh device determines whether it has formed a network. If yes, the process ends; otherwise, proceed to step 622.

[0168] Step 622: The Mesh device initiates a connection request to the master device.

[0169] The following is combined with Figure 7 The self-organizing process of the master device (or networked sub-device) and sub-devices after the self-discovery phase is described in detail. The master device (or networked sub-device) can be the first device or the second device mentioned above.

[0170] like Figure 7 As shown, the self-organizing process of the master device (or networked sub-devices) and sub-devices may include:

[0171] Step 701: After the sub-device (non-networked sub-device) 72 determines the master device, the backhaul station 723 of the sub-device 72 initiates a connection request to the open access point 714 of the master device (or the networked sub-device) 71. The connection request can be carried by an authentication request message.

[0172] Step 702: The master device (or the networked sub-device) 71 verifies the validity of the received connection request. After the verification is successful, it returns confirmation information to the sub-device 72. The confirmation information may be carried by an authentication response message. After the verification is successful, the open access point 714 of the master device will respond to the following association request.

[0173] Step 703: The backhaul station 723 of the sub-device 72 initiates an association request to the open access point 714 of the master device (or the sub-device that has been networked).

[0174] Step 704: The master device (or the networked sub-device) 71 returns an association response to the sub-device 72.

[0175] The next step is for the sub-device to obtain the backhaul access point information from the master device:

[0176] Step 705: The backhaul station 723 of the sub-device 72 sends a third request carrying device verification information to the open access point 714 of the master device (or the networked sub-device) 71. The third request is used to request identity verification.

[0177] The device verification information may include a verification message plus a verification serial number.

[0178] Step 706: The master device (or the sub-device that has been networked) 71 verifies the sub-device 72 based on the device verification information carried in the third request and the device verification information of the sub-device 72 recorded in the whitelist. After the verification is successful, the master device (or the sub-device that has been networked) sends a verification confirmation message to the sub-device.

[0179] Step 707: The backhaul station 723 of the sub-device 72 sends a fourth request to the open access point 714 of the master device (or the networked sub-device) 71. The fourth request is used to request the backhaul access point information of the master device (or the networked sub-device) 71. The fourth request carries the device information (such as device identifier) ​​of the sub-device 72.

[0180] Step 708: After receiving the fourth request, the master device (or the sub-device that has been networked) 71 extracts the device information of the sub-device 72 from it, and takes out the verification code from the previously received third request, combines them as a key, encrypts the master device information using a custom or general encryption algorithm, and sends it to the sub-device 72. The master device information includes the backhaul access point information and other information (e.g., front-end access point information).

[0181] Step 709: After receiving the encrypted master device information, the sub-device 72 decrypts it according to its own device information and verification code to obtain the master device information, and then disconnects the connection with the open access point 714 of the master device 71; the backhaul station 723 of the sub-device 72 connects to the backhaul access point 712 on the master device 72; the sub-device 72 synchronizes its own backhaul access point information and front-end access point information with the backhaul access point information and front-end access point information of the master device 71, and the network is completed.

[0182] exist Figure 7 In this configuration, the front access point of the main device 71 is 711, and the backhaul access point is 712.

[0183] The following describes several networking scenarios that a networking method provided in this application may face.

[0184] As shown in Table 2 below, all devices in the whitelist are in an unnetworked state, and devices 2 and 3 are candidate master devices.

[0185] Table 2 Whitelist

[0186] Check parameter Device identification Role External network rating coefficient Random code Whether networked Identification 1 Device 1 0 0 0 0 Identification 1 Device 2 1 10 2 0 Identification 2 Device 3 1 2 6 0

[0187] After comparison, device 2 ultimately changed its role to master device, as shown in Table 3 below.

[0188] Table 3 Whitelist after determining the main device

[0189] Check parameter Device identification Role External network rating coefficient Random code Whether networked Identification 1 Device 1 0 0 0 0 Identification 1 Device 2 2 10 2 0 Identification 2 Device 3 0 0 0 0

[0190] Device 1, as a sub-device, also stores a whitelist as shown in Table 3. If a role as the main device is detected in the whitelist, then a connection to the open access point on Device 2 is initiated based on the device identifier of Device 2 to complete the network formation. After that, the network identifier in the whitelist is updated, and the whitelist becomes as shown in Table 4 below.

[0191] Table 4. Whitelist after updating network identifiers

[0192] Check parameter Device identification Role External network rating coefficient Random code Whether networked Identification 1 Device 1 0 8 5 1 Identification 1 Device 4 2 10 2 1 Check parameter Device identification 0 0 0 0

[0193] If device 4 is within the coverage area of ​​device 1 but not within the coverage area of ​​devices 2 and 3, then after device 4 powers on and starts its WiFi, it will synchronize to a whitelist, as shown in Table 5 below. Device 4 will find that it does not have a master device in its whitelist, but it does have a sub-device that has already formed a network and its network rating coefficient is 8. It will then consider this a device that can form a network and will subsequently initiate a connection request to the open access point on device 1 to establish a network.

[0194] Table 5 shows the whitelist stored on device 4.

[0195] Role External network rating coefficient Random code Whether networked Identification 1 Device 1 Identification 1 Device 4 0 8 5 1 Figure 6 Figure 8 0 0 0 0

[0196] The whitelist after device 4 is networked is shown in Table 6 below.

[0197] Table 6 shows the whitelist stored on device 4.

[0198] Figure 8 Figure 8 Figure 8 Figure 4 Figure 4 Figure 1 Figure 9 Figure 9 0 8 5 1 Figure 9 Figure 9 0 6 1 1

[0199] Optionally, in this embodiment, besides automatically detecting the master device, a device can also be forced to become the master device via a preset button. In this case, after receiving an operation on the preset button, a device can update its role to master, and other candidate master devices will be changed to sub-devices after a timeout. That is, in Figure 4 In the process shown, the following step can be added between step 605 and step 606:

[0200] If an operation on the preset button is detected within the timer's timing period, the first device is designated as the master device, and the timer is set to an error state; if no operation is detected, step 606 is executed.

[0201] Optionally, the networking method provided in this application embodiment can be compatible with other devices supporting the EasyMesh protocol for networking. Firstly, the extended fields added to the beacon frame, probe request frame, or probe response frame (for carrying the aforementioned target information) do not affect the normal parsing of fields by other WiFi devices. Secondly, traditional networking does not use beacon frames, probe request frames, or probe response frames. For example, device A is a Mesh device conforming to this invention, while device B is a device that does not conform to this invention's method but supports EasyMesh. Device A can long-press the WPS button; upon detecting the long press, the device can act as the master device to initiate WPS on the backhaul access point, waiting for WPS messages from device B's backhaul station. Of course, device B needs to be started as a slave device. Both can complete the traditional networking method through WPS. Alternatively, device A can also short-press the button to initiate WPS on the backhaul station as a slave device and connect to device B. Of course, device B needs to be able to act as the master device to initiate WPS on the backhaul access point. It can be understood that backward compatibility with traditional networking devices can effectively achieve flexible networking.

[0202] Another embodiment of this application involves each Mesh device's backhaul station periodically sending probe request frames. Upon receiving these frames, the open access points reply with probe response frames. These response frames carry extended fields (including target information). Through flooding, each device can maintain a whitelist of access points within its coverage area. Then, based on the network information, role information, and external network rating coefficient of each device in the whitelist, connections to the open access points are established.

[0203] The encryption and decryption keys and methods used in the self-organizing network process of this application are not limited to those described above, and other methods that can achieve the same function are also within the scope of protection of this application.

[0204] For users who have already established a Mesh network using the method described in this application, adding a device to a guest bedroom is also quite simple. They only need to power on the sub-device in the guest bedroom. Once the sub-device's WiFi is activated, it will broadcast a custom beacon frame. Simultaneously, the newly added sub-device will also receive beacon frames sent by other devices in the Mesh network. Within a very short time, it can capture surrounding access points and create a whitelist. If the newly added sub-device detects the master device in the whitelist, it will connect to an open access point on the master device. If the master device is not detected, it means the master device is not within coverage area. In this case, it will select an already networked sub-device from the whitelist and connect to an open access point on that sub-device.

[0205] Even in an established Mesh network, one or more devices may experience power outages, such as due to a power failure or user relocation. Because Mesh networking involves synchronizing uplink backhaul access point information, all networked devices use the same SSID and password for their backhaul access points. After a power outage and restart, regardless of whether the device has been moved, the backhaul station will periodically scan for and connect to surrounding backhaul access points. Once a network connection is successful, it will update the network topology to achieve optimal operation.

[0206] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0207] Figure 4 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Please refer to it. Figure 10At the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for other business operations.

[0208] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, ​ The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0209] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0210] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a network at the logical level. The processor executes the program stored in memory and specifically performs the following operations:

[0211] After the first device is powered on and WiFi is started, it sends first information through its own open access point. The first information carries the target information of the first device, and the target information includes role information, which includes one of sub-device and main device.

[0212] Detect whether the first device is connected to the external network. If it is, update the role information of the first device carried in the first information according to the detection result.

[0213] By monitoring at least one second device sending second information through its own open access point, after monitoring the second information, the first device and the second device are added to a whitelist, and the target information of the first device and the second device is recorded in the whitelist accordingly, wherein the second information carries the target information of the second device;

[0214] The network is formed based on the role information of each device in the whitelist.

[0215] The above is as stated in this application. ​ The method executed by the networking device disclosed in the illustrated embodiments can be applied to a processor or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of this application can be directly embodied as being executed by a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0216] The electronic device can also perform ​ The method, and realize the networking device in ​ The functions described in the illustrated embodiments will not be repeated here.

[0217] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0218] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a portable electronic device comprising multiple target applications, enable the portable electronic device to perform...​ The method of the illustrated embodiment is specifically used to perform the following operations:

[0219] After the first device is powered on and WiFi is started, it sends first information through its own open access point. The first information carries the target information of the first device, and the target information includes role information, which includes one of sub-device and main device.

[0220] Detect whether the first device is connected to the external network. If it is, update the role information of the first device carried in the first information according to the detection result.

[0221] By monitoring at least one second device sending second information through its own open access point, after monitoring the second information, the first device and the second device are added to a whitelist, and the target information of the first device and the second device is recorded in the whitelist accordingly, wherein the second information carries the target information of the second device;

[0222] The network is formed based on the role information of each device in the whitelist.

[0223] This application also provides a computer program product including instructions. When a computer executes the instructions of the computer program product, the computer performs the above-described networking method. Specifically, the computer program product can run on the first device or the second device.

[0224] ​ This is a schematic diagram of a networking device 900 provided in one embodiment of this application. Please refer to it. ​ In one software implementation, the networking device 900 can be applied to the first device, and the networking device 900 may include: a first transmitting module 901, an external network detection module 902, a first receiving module 903, and a self-organizing network module 904.

[0225] The first sending module 901 is used to send first information through its own open access point after the first device is powered on and WiFi is started. The first information carries target information of the first device, and the target information includes role information, which includes one of a sub-device and a master device.

[0226] The external network detection module 902 is used to detect whether the first device is connected to the external network. If it is, the role information of the first device carried in the first information is updated according to the detection result.

[0227] In the first embodiment, the external network detection module 902 can be used to: detect whether the first device is connected to the external network; if yes, update the role information of the first device carried in the first information to master device; if no, update the role information of the first device carried in the first information to sub-device.

[0228] In the second embodiment, the target information further includes an external network rating coefficient, and the external network detection module 902 can be used for:

[0229] The external network rating coefficient of the first device is determined based on the test results;

[0230] Based on the external network rating coefficient of the first device, update the role information and external network rating coefficient of the first device carried in the first information.

[0231] The external network rating coefficient is determined based on at least one of the following: external network connection status, access latency, and throughput.

[0232] Furthermore, in the second embodiment described above, the role information also includes a candidate master device, whose field value can be 1. Specifically, the external network detection module 902 can be used to update the role information of the first device carried in the first information to a candidate master device when the external network rating coefficient of the first device is greater than a first threshold.

[0233] Furthermore, in the second embodiment described above, the external network detection module 902 can specifically be used for:

[0234] After updating the role information of the first device carried in the first information to the candidate master device, a timer is started. The function of the timer is to detect whether there are other Mesh devices connected to the external network within the time period.

[0235] After the timer expires, if it is determined that the whitelist below contains only one candidate master device, then the candidate master device is determined as the master device.

[0236] After the timer expires, if it is determined that the whitelist includes at least two candidate master devices, then the master device is determined according to the external network rating coefficient of the at least two candidate master devices, and the role information of the candidate master devices other than the master device is updated to sub-device.

[0237] In one implementation, the external network detection module 902 can determine the device with the highest external network rating coefficient among the at least two candidate main devices as the main device, and further update the role information of the device with the highest external network rating coefficient among the at least two candidate main devices as the main device.

[0238] In another implementation, the target information further includes a random code. When the external network rating coefficients of the at least two candidate master devices are the same, the external network detection module 902 can determine the master device based on the random codes corresponding to the at least two candidate master devices.

[0239] Optionally, ​ The networking device 900 shown may further include: a timer setting module, used to set the timer to an error state (false) when the master device is the first device, so that the timer will not be started the next time the first device restarts.

[0240] Optionally, the first device further includes a preset button, which, after the timer is started, ​ The networking device 900 shown may further include: a timer setting module, used to, within the timer's timing period, if an operation on the preset key is detected, designate the first device as the master device and set the timer to an error state, so that the first device will not start the timer the next time it restarts.

[0241] The first receiving module 903 is configured to listen to second information sent by at least one second device through its own open access point, and after listening to the second information, add the first device and the second device to a whitelist, and record the target information of the first device and the second device in the whitelist, wherein the second information carries the target information of the second device.

[0242] Optionally, the target information also includes verification parameters. The verification parameters may be the manufacturer's serial number that allows networking or other custom identification information, but are not limited to these two. After the first receiving module 903 detects the second information, before adding the first device and the second device to the whitelist, it may also verify the validity of the second information based on the verification parameters of the second device carried in the second information. If the validity verification of the second information passes, the second device will then be added to the whitelist.

[0243] The self-organizing network module 904 is used to form a network based on the role information of each device in the whitelist.

[0244] 1) In some embodiments, the self-organizing network module 904 can be used for:

[0245] Based on the role information of each device in the whitelist, determine whether there is a master device in the whitelist;

[0246] If a master device exists in the whitelist, and the second device is the master device, and the first device is the slave device, the first device initiates a connection request to the open access point of the second device through its own backhaul station.

[0247] After the backhaul station of the first device successfully connects to the open access point of the second device, the master device information is obtained through the open access point of the second device, wherein the master device information includes the front access point information and backhaul access point information of the second device;

[0248] The first device disconnects its own backhaul station from the open access point of the second device, connects the backhaul station to the backhaul access point of the second device according to the master device information, and modifies its own backhaul access point information to the backhaul access point information of the second device.

[0249] 2) In other embodiments, the self-organizing network module 904 can be used for:

[0250] Based on the role information of each device in the whitelist, determine whether there is a master device in the whitelist;

[0251] If a master device exists in the whitelist, and the first device is the master device and the second device is the slave device, a connection request from the backhaul station of the second device to connect to the open access point of the first device is received.

[0252] In response to the connection request, a connection is established between the open access point of the first device and the backhaul station of the second device;

[0253] After the open access point of the first device successfully connects to the backhaul station of the second device, the first device sends master device information to the second device through its own open access point. The master device information includes the front access point information and backhaul access point information of the first device. The master device information is used by the second device to connect its own backhaul station to the backhaul access point of the first device and modify its own backhaul access point information to the backhaul access point information of the first device.

[0254] Optionally, the target information further includes device verification information, which includes at least one of verification parameters and device identifier. The connection request carries the device verification information of the second device. As mentioned above, the verification parameters can be a vendor serial number that allows networking or other custom identification information, but are not limited to these two. The device identifier can be at least one of the MAC address of the open access point and the MAC address of the backhaul station, or other serial numbers that can identify the device and verify its validity.

[0255] Accordingly, establishing the connection between the open access point of the first device and the backhaul station of the second device includes: determining at least one of the validity and legality of the connection request based on the device verification information of each device recorded in the whitelist and the device verification information of the second device carried in the connection request; and establishing the connection between the open access point of the first device and the backhaul station of the second device if at least one of the validity verification and legality verification of the connection request passes.

[0256] For example, after the validity check passes, the master device will further check whether the message is a connection request. Connection requests include authentication (auth) messages, association messages, etc. Further, the master device will check the source address in the connection request. If the source address is the same as the device identifier of a valid sub-device stored therein, then the connection request is acceptable; otherwise, it is considered an invalid request.

[0257] The step of sending master device information to the second device through its own open access point includes:

[0258] Receives a first request, encrypted with a first key, from the backhaul station of the second device via its own open access point;

[0259] After successfully decrypting the first request, the device sends a first feedback message encrypted with the second key to the second device through its own open access point. The first feedback message carries the information of the master device.

[0260] As an example, if the target information further includes verification parameters and device identifier, then the first key may include the verification parameters of the second device; the second key may include the verification parameters of the first device and device identifier.

[0261] 3) In other embodiments, the self-organizing network module 904 can be used for:

[0262] Based on the role information of each device in the whitelist, determine whether there is a master device in the whitelist;

[0263] If there is no primary device in the whitelist, but there are networked sub-devices in the whitelist, and the networked sub-devices do not include the first device, the first device initiates a connection request to the open access point of the networked sub-devices through its own backhaul station.

[0264] After the backhaul station of the first device successfully connects to the open access point of the networked sub-device, the networked sub-device information is obtained through the open access point of the networked sub-device. The networked sub-device information includes the front access point information and backhaul access point information of the networked sub-device.

[0265] The first device disconnects its own backhaul station from the open access point of the networked sub-device, connects the backhaul station to the backhaul access point of the networked sub-device, and modifies its own backhaul access point information to the backhaul access point information of the networked sub-device.

[0266] The target information also includes network information, which includes whether the device is already networked or not. The networked device is determined based on the network information of the second device in the whitelist.

[0267] The networking device 900 proposed in this application improves flexibility during networking because the first device and at least one second device do not need to have their roles fixed in advance. Instead, roles are automatically determined based on a collected whitelist during the networking process. Furthermore, no manual intervention is required during either the device discovery phase or the self-networking phase, making it simple to operate and more user-friendly. Moreover, since networking can be achieved without the WPS process, there is no networking failure caused by overlapping WPS processes, significantly improving the networking success rate, shortening networking time, and significantly enhancing the user experience.

[0268] Of course, the networking device 900 proposed in this application embodiment can also be compatible with WPS networking mode. Specifically, the first device further includes a WPS button. The networking device 900 proposed in this application embodiment also includes a WPS response module, which is used to take the first device as the master device and perform networking according to the WPS process after detecting the operation on the WPS button.

[0269] The networking device 900 provided in this application embodiment can also perform... ​ The method, and implementation ​ The embodiments shown in this application have the same functions and achieve the same technical effects, and will not be described in detail here.

[0270] In one detailed embodiment, such as ​As shown, an embodiment of this application provides a networking device 1000 applicable to Mesh devices, which may include: a management frame sending module 1001, a management frame receiving module 1002, an external network access detection module 1003, a rating coefficient checking module 1004, a validity verification module 1005, an extended field modification module 1006, a whitelist maintenance module 1007, an encrypted message processing module 1008, a Mesh synchronization module 1009, and a topology update module 1010.

[0271] The management frame sending module 1001 is used to send beacon frames with extended fields (including target information) through the open access point, as well as to send authentication frames and association frames during the connection establishment process between the return station and the open access point.

[0272] The management frame receiving module 1002 is used to transmit back the passive scan of the surrounding environment performed by the site. This is a function of the STA device itself. It can also be used to receive management frames for WiFi connection requests from open access points to Mesh sub-devices.

[0273] The external network access detection module 1003 is used to detect whether the Mesh device is connected to the WAN, specifically including the detection of external network rating information such as connection status, bandwidth, upload speed, and download speed. If the Mesh device is detected to be connected to the WAN, the extended field modification module 1006 is notified to modify the external network rating coefficient and role information.

[0274] The rating coefficient check module 1004 is used to check its own external network rating coefficient and the stored external network rating coefficients of candidate master devices within a timer interval. The system will then determine whether it will act as a slave device or a master device based on the check results.

[0275] The validity verification module 1005 is used to verify the verification parameters after the Mesh device receives a beacon frame. Only the extended fields of the beacon frame that successfully verifies the frame will be recorded in the whitelist. It can also be used to verify the validity of received connection requests. Specifically, it first extracts the source address from the request message, and then compares the extracted source address with the MAC address information stored in the whitelist. Only if the comparison is successful will the connection of the access point be allowed.

[0276] The extended field modification module 1006 is used to modify the role value in the extended field of the beacon frame according to the inspection result of the rating coefficient check module 1004, changing its own role from a sub-device to a candidate master device; or from a candidate master device to a master device; or from a candidate master device to a sub-device. Optionally, if the source address is already connected to an open access point, the network information in the extended field identifier will be modified to indicate that a network has been established.

[0277] The whitelist maintenance module 1007 is used to maintain a list of Mesh devices to be networked. Only devices that pass verification according to the verification parameters can be added to the whitelist. The whitelist maintains the role information, MAC address of the backhaul station, and MAC address of the open access point for each device, which facilitates verification during subsequent connections.

[0278] The encrypted message processing module 1008 is used for exchanging access point information after the sub-device and master device establish a WiFi connection under an open access point. The sub-device first encrypts and transmits its request using verification parameters to obtain the access point information. The master device's encrypted message processing module receives the encryption request, decrypts it according to the verification parameters, and after successful decryption, re-encrypts the access point information using the verification parameters and its own device identifier. After receiving the encrypted data from the master device, the sub-device decrypts it according to the verification parameters and the device identifier of the connected device to obtain the access point information.

[0279] Mesh synchronization module 1009 is used to synchronize the front access point information after the backhaul network of the Mesh device is established.

[0280] Topology update module 1010 is used to update the connection information of the entire Mesh network.

[0281] The networking device 1000 provided in this application embodiment can improve the flexibility of networking because Mesh devices do not need to have their roles fixed in advance when networking, but automatically determine their roles based on the collected whitelist during the networking process.

[0282] In summary, the above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

[0283] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0284] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0285] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0286] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

Claims

1. A method of networking, characterized by, Applied to a first device, the first device comprising an open access point, the method comprising: After the first device is powered on and starts WiFi, sending first information through the open access point of the first device, wherein the first information carries target information of the first device, the target information comprising role information, the role information comprising one of a sub-device and a master device; Detecting whether the first device is connected to an external network, and if yes, updating the role information of the first device in the first information according to the detection result; Listening to second information sent by at least one second device through the open access point, after the second information is listened to, adding the first device and the second device to a white list, and recording the target information of the first device and the second device in the white list, wherein the second information carries the target information of the second device; Grouping according to the role information of each device in the white list.

2. The method of claim 1, wherein, The target information further comprises an external network rating coefficient, wherein the updating of the role information of the first device in the first information according to the detection result comprises: Determining the external network rating coefficient of the first device according to the detection result; Updating the role information and the external network rating coefficient of the first device in the first information according to the external network rating coefficient of the first device.

3. The method of claim 2, wherein, The role information further comprises a standby master device, wherein the updating of the role information and the external network rating coefficient of the first device in the first information according to the external network rating coefficient of the first device comprises: In the case that the external network rating coefficient of the first device is greater than a first threshold, updating the role information of the first device in the first information to the standby master device.

4. The method of claim 3, wherein, The updating of the role information and the external network rating coefficient of the first device in the first information according to the external network rating coefficient of the first device further comprises: After the role information of the first device in the first information is updated to the standby master device, starting a timer; After the timing time of the timer ends, if it is determined that the white list only comprises one standby master device, determining the standby master device as the master device; After the timing time of the timer ends, if it is determined that the white list comprises at least two standby master devices, determining the master device according to the external network rating coefficients of the at least two standby master devices, and updating the role information of the standby master devices other than the master device among the at least two standby master devices to the sub-device.

5. The method of claim 4, wherein, The determining of the master device according to the external network rating coefficients of the at least two standby master devices comprises: Determining the standby master device with the maximum external network rating coefficient among the at least two standby master devices as the master device.

6. The method of claim 4, wherein, The target information further comprises a random code, wherein the determining of the master device according to the external network rating coefficients of the at least two standby master devices comprises: In the case that the external network rating coefficients of the at least two standby master devices are the same, determining the master device according to the random codes corresponding to the at least two standby master devices.

7. The method according to claim 5 or 6, characterized in that, The method further comprises: In a case that the master device is the first device, the timer is set to an error state.

8. The method of claim 4, wherein, The first device further comprises a preset button, and after the timer is started, the method further comprises: In a case that an operation on the preset button is detected within the timing time of the timer, the first device is taken as a master device, and the timer is set to an error state.

9. The method according to any one of claims 2-6, 8, characterized in that, The external network rating coefficient is determined according to at least one of an external network connection state, an access delay and a throughput.

10. The method according to any one of claims 1-6, 8, characterized in that, The target information further comprises a check parameter, and after the second information is listened to, before the first device and the second device are added to the white list, the method further comprises: The validity of the second information is checked according to the check parameter of the second device carried in the second information. In a case that the validity of the second information is checked, the second device is added to the white list.

11. The method of claim 1, wherein, The networking according to the role information of each device in the white list comprises: The existence of a master device in the white list is determined according to the role information of each device in the white list. In a case that a master device exists in the white list and the second device is a master device and the first device is a slave device, the first device initiates a connection request to an open access point of the second device through a backhaul site of the first device. After the backhaul site of the first device and the open access point of the second device are connected successfully, master device information is obtained through the open access point of the second device, wherein the master device information comprises front access point information and backhaul access point information of the second device. The first device disconnects the connection between the backhaul site of the first device and the open access point of the second device, connects the backhaul site to the backhaul access point of the second device according to the master device information, and modifies the backhaul access point information of the first device to the backhaul access point information of the second device.

12. The method of claim 1, wherein, The networking according to the role information of each device in the white list comprises: The existence of a master device in the white list is determined according to the role information of each device in the white list. In a case that a master device exists in the white list and the first device is a master device and the second device is a slave device, a connection request is received, in which a backhaul site of the second device is connected to an open access point of the first device. In response to the connection request, a connection between the open access point of the first device and the backhaul site of the second device is established. After the open access point of the first device and the backhaul site of the second device are connected successfully, master device information is sent to the second device through the open access point of the first device, wherein the master device information comprises front access point information and backhaul access point information of the first device, and the master device information is used for the second device to connect a backhaul site of the second device to a backhaul access point of the first device, and modify backhaul access point information of the second device to the backhaul access point information of the first device.

13. The method of claim 12, wherein, The target information further includes device verification information, the device verification information including at least one of a verification parameter and a device identifier, the device verification information of the second device being carried in the connection request, and the establishing of the connection between the open access point of the first device and the backhaul site of the second device including: determining at least one of validity and legality of the connection request according to the device verification information of each device recorded in the white list and the device verification information of the second device carried in the connection request; in a case where at least one of the validity and legality of the connection request is passed, establishing the connection between the open access point of the first device and the backhaul site of the second device.

14. The method according to claim 12 or 13, characterized in that, wherein, the sending of the master device information to the second device through the open access point of the first device includes: receiving, through the open access point of the first device, a first request encrypted according to a first key sent by the backhaul site of the second device; after the first request is successfully decrypted, sending, through the open access point of the first device, first feedback information encrypted according to a second key to the second device, the first feedback information carrying the master device information.

15. The method of claim 14, wherein, The target information further includes a verification parameter and a device identifier, wherein, the first key includes the verification parameter of the second device; the second key includes the verification parameter and the device identifier of the first device.

16. The method of claim 1, wherein, The networking according to the role information of each device in the white list includes: determining whether there is a master device in the white list according to the role information of each device in the white list; in a case where there is no master device in the white list, there is a networked sub-device in the white list, and the networked sub-device does not include the first device, the first device initiates a connection request to the open access point of the networked sub-device through the backhaul site of the first device; after the backhaul site of the first device is successfully connected to the open access point of the networked sub-device, obtaining networked sub-device information through the open access point of the networked sub-device, wherein the networked sub-device information includes front access point information and backhaul access point information of the networked sub-device; the first device disconnects the connection between the backhaul site of the first device and the open access point of the networked sub-device, connects the backhaul site to the backhaul access point of the networked sub-device, and modifies the backhaul access point information of the first device to the backhaul access point information of the networked sub-device.

17. The method of claim 16, wherein, The target information further includes networking information, and the networking information includes networked or not networked, wherein the networked device is determined according to the networking information of the second device in the white list.

18. The method of claim 1, wherein, The first information or the second information includes at least one of: a beacon frame broadcasted at a preset time interval; a probe request frame; a probe response frame replied to the received probe request frame.

19. The method of claim 1, wherein, The first device further includes a WiFi security protection setting (WPS) key, and the method further includes: after detecting an operation on the WPS key, taking the first device as a master device and networking according to a WPS process.

20. An electronic device, comprising: a processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the method of any one of claims 1 to 19.

21. A computer-readable storage medium, which, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to perform the method of any one of claims 1 to 19.

22. A computer program product comprising instructions which, when the instructions are executed by a computer, cause the computer to carry out the method of any one of claims 1 to 19.