Router networking method, device, medium, electronic device and program product
By detecting network connections and receiving messages in the router, switching roles independently and automatically performing easymesh networking, the problem of cumbersome and low efficiency of router networking operations in the existing technology is solved, and an efficient and automated networking process is achieved.
Patent Information
- Application Number
- CN202210785616.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-04
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2042-07-04
AI Technical Summary
In easymesh networking, it is difficult for the prior art to simplify the networking operation of routers and improve networking efficiency, especially when the user performs networking operation itself.
By detecting network connections, receiving network discovery messages, switching roles independently, and automatically forming the network through easymesh protocol, determining the network formation is completed based on the received network address, and the role status is automatically saved.
It realizes automation and simplification of router networking, improves networking efficiency, reduces manual operations, and is suitable for scenarios where users can form networking by themselves.
Smart Images

Figure CN115190512B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of easymesh networking technology, and more specifically, to a router networking method, device, medium, electronic device and program product. Background Art
[0002] In easymesh networking, there are two roles: controller and agent. In an easymesh network, there can only be one controller role, but there can be multiple agent roles. The router working in the controller role manages the routers working in the agent role in the network. However, the easymesh protocol does not specify how to determine the role of the router, so when performing easymesh networking, the role of the router needs to be set.
[0003] The general practice is to set the router to the agent or controller role when it is produced, and select it as needed during networking. Or, when networking, professionals modify the working role of the router through the graphical interface. However, both methods are not convenient for users to perform networking operations themselves, and the networking time is long and the networking efficiency is low.
[0004] Based on this, how to effectively simplify router networking operations and improve networking efficiency is a technical problem that needs to be solved urgently. Summary of the invention
[0005] The embodiments of the present application provide a router networking method, device, computer program product or computer program, computer-readable medium and electronic device. The method in the present application can autonomously switch roles and automatically perform networking according to whether the message is received, determine whether the networking is completed according to whether the network address is received, autonomously complete the networking operation, and improve the networking efficiency.
[0006] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0007] According to a first aspect of an embodiment of the present application, a router networking method is provided, which is executed on a router, and the method includes: when detecting that a network connection is established with a network unit, waiting to receive a network discovery message sent by the network unit; if the network discovery message is received within a first preset time, switching from an initialization role to a temporary proxy role, and networking with the network unit through the EasyMesh protocol; if the networking is successful, waiting to receive a network address assigned by the network unit; if the network address is received within a second preset time, switching from the temporary proxy role to the proxy role, and saving it to a flash memory.
[0008] In some embodiments of the present application, based on the above-mentioned solution, the method further includes: if the networking fails, switching from the temporary proxy role to the initialization role.
[0009] In some embodiments of the present application, based on the above-mentioned solution, the method further includes: if the network address is not received within a second preset time, switching from the temporary agent role to the initialization role.
[0010] In some embodiments of the present application, based on the aforementioned scheme, the method also includes: if the network discovery message is not received within a first preset time, switching from the initialization role to the temporary control role; after switching to the temporary control role, waiting to receive the network address assigned by the network unit; if the network address is received within a second preset time, switching from the temporary control role to the control role and saving it to the flash memory.
[0011] In some embodiments of the present application, based on the aforementioned solution, the method further includes: if the network address is not received within a second preset time, switching from the temporary control role to the initialization role.
[0012] According to a second aspect of an embodiment of the present application, a router networking device is provided, which is arranged in a router, and comprises: a first receiving unit, which is used to wait for receiving a network discovery message sent by the network unit when it is detected that a network connection is established with the network unit; a first switching unit, which is used to switch from an initialization role to a temporary proxy role if the network discovery message is received within a first preset time, and to network with the network unit through the EasyMesh protocol; a second receiving unit, which is used to wait for receiving a network address assigned by the network unit if the networking is successful; and a second switching unit, which is used to switch from the temporary proxy role to the proxy role if the network address is received within a second preset time, and save it in a flash memory.
[0013] In some embodiments of the present application, based on the aforementioned scheme, the first switching unit is configured as: if the network discovery message is not received within the first preset time, then switching from the initialization role to the temporary control role; the second receiving unit is configured as: after switching to the temporary control role, waiting to receive the network address assigned by the network unit; the second switching unit is configured as: if the network address is received within the second preset time, then switching from the temporary control role to the control role, and saving it to the flash memory.
[0014] According to a third aspect of an embodiment of the present application, a computer program product or a computer program is provided, wherein the computer program product includes computer instructions, which are stored in a computer-readable storage medium and are suitable for being read and executed by a processor, so that a computer device having the processor executes the router networking method described in the above embodiment.
[0015] According to a fourth aspect of an embodiment of the present application, a computer-readable medium is provided, wherein at least one program code is stored in the computer-readable storage medium, and the at least one program code is loaded and executed by a processor to implement the router networking method as described in the above embodiment.
[0016] According to a fifth aspect of an embodiment of the present application, an electronic device is provided, comprising one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement the operations performed by the router networking method described in the above embodiments.
[0017] In the technical solutions provided by some embodiments of the present application, the method is executed on the router, and when it is detected that a network connection is established with a network unit, it waits to receive a network discovery message sent by the network unit, and switches to a temporary proxy role or a temporary control role according to whether the network discovery message is received within a first preset time; if it is in a temporary proxy role, it can successfully network with the network unit through the easymesh protocol, and after receiving the network address assigned by the network unit within a second preset time, the temporary proxy role is switched to the proxy role, and saved to the flash memory to complete the networking; if it is in a temporary control role, it can receive the network address assigned by the network unit within the second preset time, then the temporary control role is switched to the control role, and saved to the flash memory to complete the networking. The method in the present application can autonomously switch roles and automatically network according to whether the message is received, determine whether the networking is completed according to whether the network address is received, and autonomously complete the networking operation, which greatly simplifies the networking operation of the device, not only reduces the process of manual operation of the device, saves time, but also improves the networking efficiency.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0020] Figure 1 A flowchart of a router networking method according to an embodiment of the present application is shown;
[0021] Figure 2 A block diagram of a router networking device according to an embodiment of the present application is shown;
[0022] Figure 3 A block diagram of a router networking system according to an embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0025] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0027] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the objects used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those shown or described.
[0029] It should be noted that the present application is applied to easymesh networking. Easymesh is a basic standard developed by the Wi-Fi Alliance for interconnection between different APs, and is also a protocol that defines interconnection control between APs from different manufacturers. In the easymesh network, there is an AP in the role of controller to manage the entire network, and other APs in the role of agent are connected to it (including indirect connection). The AP in the role of controller can obtain the channel information supported by the AP in the role of agent through query messages, and then configure the preferred channel, transmission power, etc. on the AP in the role of agent; it can analyze the topology and status information of the current network to decide to send a command to kick off a wireless access terminal (such as a user's mobile phone) to the AP in the role of agent, and the AP in the role of agent kicks off that device to balance the network, or perform client roaming; it can also perform link optimization, and select a good path between the AP in the role of controller and the AP in the role of agent to form a Mesh network. Easymesh networking can interconnect APs through the AP+Client method to form a tree-shaped network topology, expand the network coverage, and make communication between APs more convenient.
[0030] In the technical solution of the present application, the above-mentioned AP can be expressed as a router, the controller role can be expressed as a control role, and the agent role can be expressed as an agent role.
[0031] It should also be noted that the present application is applied to WIFI6 routers, but is not limited to WiFi6 routers. WIFI6 is the sixth generation of wireless access technology based on the IEEE802.11ax protocol. WIFI6 technology realizes multi-user multiplexing of channel resources, can receive more loads and make the load more balanced; it adopts higher-order modulation technology and spatial multiplexing technology, so that the signal coverage range is wider, with the advantages of high transmission rate and low latency. The router adopts WIFI6 technology, which can not only carry a large number of wireless access terminals at the same time, but also has simple networking operation and low network construction cost, which is more conducive to the use of scenarios such as large indoor traffic, wireless office in offices and electronic classrooms.
[0032] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0033] Figure 1 A flowchart of a router networking method according to an embodiment of the present application is shown. The router networking method can be executed by a device with a computing and processing function, and the method can be executed on a router. The method at least includes steps 101 to 104, which are described in detail as follows:
[0034] In step 101, when it is detected that a network connection is established with a network element, a network discovery message sent by the network element is waited for.
[0035] In the present application, the network connection established with the network unit may be established through wired networking or wireless networking; the network unit may be an ONU.
[0036] For example, in one embodiment of the present application, the user can connect the WAN port or LAN port of the router to the LAN port of the ONU for wired networking. When the router detects that the LAN port or WAN port is linked up, it means that the router has successfully established a network connection with the network unit ONU.
[0037] Specifically, in an actual scenario of the present application, the router may have an LED indicator light. When the router detects that the LAN port or WAN port is linked up (i.e., receives a link up event reported by the bottom layer driver), the indicator light is set to a constant light mode, indicating that a network connection has been successfully established between the router and the network unit ONU; when the router does not detect that the LAN port or WAN port is linked up (i.e., does not receive a link up event reported by the bottom layer driver), the indicator light is set to an off mode, indicating that a network connection has not been successfully established between the router and the network unit ONU.
[0038] For example, in another embodiment of the present application, the user can press the WPS buttons of the router and ONU respectively to establish a wireless networking connection. When the router and the ONU complete the pairing, it can indicate that the router and the network unit ONU have successfully established a network connection.
[0039] Specifically, in another practical scenario of the present application, the router may have another LED indicator. When the user presses the WPS button of the router and the ONU respectively, the indicator flashes; when the router and the ONU complete the code pairing, the indicator is set to a constant light mode, indicating that a network connection has been successfully established between the router and the network unit ONU; if the router and the ONU have not completed the code pairing, the indicator is set to an off mode, indicating that a network connection has not been successfully established between the router and the network unit ONU.
[0040] Continue to refer to Figure 1 In step 102, if the network discovery message is received within the first preset time, the initialization role is switched to the temporary agent role, and networking is performed with the network unit through the easymesh protocol.
[0041] In the present application, the first preset time may be 180 seconds; the network discovery message may be an IEEE1905 topology discovery message.
[0042] In an actual scenario of the present application, the router can be set to the initialization role, that is, the auto role, by default when it leaves the factory. The router in the auto role does not support the IEEE 1905 protocol, does not support the detection of the IEEE 1905 protocol, does not support the easymesh networking function, and only supports switching to a temporary control role or a temporary proxy role.
[0043] In one embodiment of the present application, if the IEEE 1905 topologydiscovery message is received within 180 seconds, the initialization role is switched to the temporary agent role, the IEEE 1905 protocol is supported, and networking with the ONU is started through the easymesh protocol.
[0044] It should be noted that the temporary proxy role at this time is not saved in flash and can be switched to the initialization role.
[0045] Specifically, the networking process may include: an import process, a discovery process, and a configuration process. In the import process, the router in the temporary proxy role supports the detection of the IEEE 1905 protocol and is connected to the network; in the discovery process, after the router in the temporary proxy role is connected to the network, it is initialized based on the IEEE 1905 protocol, and the router in the control role and the router in the temporary proxy role in the network will discover each other. At this time, the router in the control role can query the network information, wireless capabilities, etc. of the router in the temporary proxy role connected to the network through the IEEE 1905 protocol and decide how to configure the router in the temporary proxy role; in the configuration process, the easymesh protocol extends the automatic configuration process in the IEEE 1905 protocol, so that the router in the control role can configure the router in the temporary proxy role through the extended protocol, including information such as the configuration of the network topology.
[0046] It should also be noted that when the router in the temporary proxy role completes networking, it will receive an assigned network address.
[0047] Continue to refer to Figure 1 In step 103, if the networking is successful, wait to receive the network address assigned by the network unit.
[0048] Furthermore, if the networking fails, the temporary proxy role is switched to the initialization role.
[0049] In the present application, the network address may be an IP address.
[0050] In one embodiment of the present application, the process of allocating the network address by the network unit can be completed through the DHCP protocol. Specifically, the router starts the DHCP protocol client to obtain the IP address from the server side located at the ONU side or the server side of the router in the control role in the network.
[0051] In another embodiment of the present application, if the networking fails and the IP address cannot be obtained from the server located on the ONU side or the server of the router in the control role in the network, the temporary proxy role is switched to the initialization role.
[0052] Continue to refer to Figure 1 In step 104, if the network address is received within the second preset time, the temporary agent role is switched to the agent role and saved in the flash memory.
[0053] Further, if the network address is not received within a second preset time, the temporary proxy role is switched to the initialization role.
[0054] In the present application, the second preset time may be 120 seconds.
[0055] In one embodiment of the present application, if the router receives an IP address from the server on the ONU side or the server of a router in a control role in the network within 120 seconds, it switches from the temporary proxy role to the proxy role, shuts down the server of the DHCP protocol on the LAN side, and saves it in the flash memory.
[0056] In another embodiment of the present application, if the router does not receive an IP address from the server on the ONU side or the server of the router in the control role in the network within 120 seconds, the temporary proxy role is switched to the initialization role.
[0057] It should be noted that, when the temporary proxy role is switched to the proxy role and saved to the flash memory, the router will be determined as the proxy role and will not switch to the initialization role again. Only after resetting the router and clearing all data can it be switched to the factory default initialization role again.
[0058] Furthermore, if the network discovery message is not received within the first preset time, the initialization role is switched to the temporary control role; after switching to the temporary control role, wait for receiving the network address assigned by the network unit; if the network address is received within the second preset time, the temporary control role is switched to the control role and saved in the flash memory; if the network address is not received within the second preset time, the temporary control role is switched to the initialization role.
[0059] In one embodiment of the present application, if no IEEE 1905 topology discovery message is received within 180 seconds, the initialization role is switched to the temporary control role, and then the DHCP protocol client is started to obtain an IP address from the server on the ONU side.
[0060] It should be noted that the temporary control role at this time is not saved in the flash, and you can also switch to the initialization role.
[0061] Specifically, if the IP address is received within 120 seconds, the temporary control role is switched to the control role and saved in the flash memory; if the IP address is not received within 120 seconds, the temporary control role is switched to the initialization role.
[0062] It should be noted that, when the temporary control role is switched to the control role and saved to the flash memory, the router will be determined as the control role and will not be switched to the initialization role again. Only after resetting the router and clearing all data can it be switched to the factory default initialization role again.
[0063] The method in the present application can autonomously switch roles and automatically form a network according to whether the message is received, and determine whether the network is completed according to whether the network address is received, and autonomously complete the network operation, with high network efficiency. At the same time, there is no need to perform complicated settings through a graphical interface, and there is no need for professional personnel to come to the site for operation. The user can complete the network operation by himself, and the operation is simple, which is convenient for large-scale implementation and application.
[0064] In an actual scenario of this application, the router can be used for indoor wireless networking. Based on WIFI6 and easymesh networking, after a router is powered on, the user only needs to complete the connection operation, connect to the optical modem or other successfully networked routers, and the networking operation can be automatically completed. It not only expands the signal coverage range and carries more wireless access terminals, but also ensures high network quality, which is suitable for use in scenarios such as densely populated indoors and high network demand.
[0065] The following describes an apparatus embodiment of the present application, which can be used to execute the router networking method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the router networking method of the present application.
[0066] Figure 2 A block diagram of a router networking device according to an embodiment of the present application is shown.
[0067] Reference Figure 2 As shown, a router networking device 200 according to an embodiment of the present application includes: a first receiving unit 201 , a first switching unit 202 , a second receiving unit 203 and a second switching unit 204 .
[0068] Among them, the first receiving unit 201 is used to wait for receiving the network discovery message sent by the network unit when it is detected that a network connection is established with the network unit; the first switching unit 202 is used to switch from the initialization role to the temporary agent role if the network discovery message is received within the first preset time, and to network with the network unit through the easymesh protocol; the second receiving unit 203 is used to wait for receiving the network address assigned by the network unit if the networking is successful; the second switching unit 204 is used to switch from the temporary agent role to the agent role and save it to the flash memory if the network address is received within the second preset time.
[0069] Specifically, the configuration of the first switching unit 202 also includes: if the network discovery message is not received within the first preset time, switching from the initialization role to the temporary control role; the second receiving unit 203 is configured as: after switching to the temporary control role, waiting to receive the network address assigned by the network unit; the second switching unit 204 is configured as: if the network address is received within the second preset time, switching from the temporary control role to the control role, and saving it to the flash memory.
[0070] Figure 3 A block diagram of a router networking system according to an embodiment of the present application is shown.
[0071] Reference Figure 3 As shown, the system 300 includes a WAN 310, an OUN 320, a router cluster 330, and a Non-AP-STA cluster 340. The router cluster 330 may include a router A 331, a router B 332, and a router C 333; the Non-AP-STA cluster 340 may include a Non-AP-STA1 341, a Non-AP-STA2 342, and a Non-AP-STA3 343.
[0072] It should be noted that the router cluster 330 includes at least one router, and the Non-AP-STA cluster 340 includes at least one Non-AP-STA.
[0073] The WAN 310 is a wide area network interface, which is used to connect local area networks or metropolitan area networks in different regions for computer communication. In an actual scenario of the present application, it can be a fiber optic interface or a network cable interface.
[0074] The OUN 320 is an optical network unit, which is used to provide a user-side interface for accessing a wide area network. In an actual scenario of the present application, it may be an optical modem.
[0075] The router cluster 330 is used to connect different networks. Specifically, the routers can be configured as follows: Figure 1 The router networking method shown.
[0076] The Non-AP-STA cluster 340 is a wireless access terminal, which may be a mobile phone, a notebook, or an iPad in an actual scenario of the present application.
[0077] The connection between WAN 310 and OUN 320 may be an optical fiber connection, the connection between OUN 320 and router A 331 may be a wired connection or a wireless connection, and the networking method in this application is applied between router A 331, router B 332 and router C 333:
[0078] For example, if router A 331 does not receive the IEEE 1905 topology discovery message within 180 seconds, it switches from the initialization role to the temporary control role, then starts the DHCP protocol client to obtain an IP address from the server on the ONU 320 side, and receives the IP address within 120 seconds, switches from the temporary control role to the control role, saves it in the flash memory, and router A 331 is determined to be the control role. Non-AP-STA1 341 accesses the network.
[0079] Router B 332 receives the IEEE 1905 topology discovery message within 180 seconds, switches from the initialization role to the temporary proxy role, and starts networking with router A 331 through the easymesh protocol. The networking is successful, and within 120 seconds, it receives the IP address issued by router A 331, switches from the temporary proxy role to the proxy role, closes the server of the DHCP protocol on the LAN side, and saves it to the flash memory. Router B 332 is determined to be the proxy role. Non-AP-STA2 342 accesses the network.
[0080] Router C 333 receives the IEEE 1905 topology discovery message within 180 seconds, switches from the initialization role to the temporary proxy role, and starts networking with router A 331 through the easymesh protocol. The networking is successful, and within 120 seconds, it receives the IP address issued by router A 331, switches from the temporary proxy role to the proxy role, closes the server of the DHCP protocol on the LAN side, and saves it to the flash memory. Router C 333 is determined to be the proxy role. Non-AP-STA3343 accesses the network.
[0081] In this application, after the router is networked, it can not only expand the information transmission range and conduct long-distance network communication, but also improve the flexibility of wireless access equipment in switching application scenarios, so that user devices can access the network at different locations and maintain the received signal strength basically unchanged, which is more in line with people's life scenario needs.
[0082] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown.
[0083] It should be noted that Figure 4 The computer system 400 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0084] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 to the random access memory (RAM) 403, such as executing the method described in the above embodiment. In the RAM 403, various programs and data required for system operation are also stored. The CPU 401, ROM 402 and RAM 403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0085] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed so that a computer program read therefrom is installed into the storage section 408 as needed.
[0086] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 409, and / or installed from a removable medium 411. When the computer program is executed by a central processing unit (CPU) 401, various functions defined in the system of the present application are executed.
[0087] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0088] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0089] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0090] As another aspect, the present application also provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the router networking method described in the above embodiment.
[0091] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the router networking method described in the above embodiment.
[0092] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0093] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0094] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0095] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A router networking method, characterized in that: The method is executed on a router, and the method comprises: When detecting that a network connection is established with a network unit, waiting to receive a network discovery message sent by the network unit; If the network discovery message is received within the first preset time, the initialization role is switched to the temporary proxy role, and networking is performed with the network unit through the easymesh protocol; If the networking is successful, waiting to receive the network address assigned by the network unit; If the network address is received within a second preset time, the temporary proxy role is switched to the proxy role and saved in the flash memory; If the network address is not received within a second preset time, switching from the temporary proxy role to the initialization role; If networking fails, the temporary agent role switches to the initialization role.
2. The method according to claim 1, characterized in that The method further comprises: If the network discovery message is not received within the first preset time, switching from the initialization role to the temporary control role; After switching to the temporary control role, waiting to receive a network address assigned by the network unit; If the network address is received within the second preset time, the temporary control role is switched to the control role and saved in the flash memory.
3. The method according to claim 2, characterized in that The method further comprises: If the network address is not received within the second preset time, the temporary control role is switched to the initialization role.
4. A router networking device, characterized in that: The device is arranged on a router, and comprises: A first receiving unit is used to wait for receiving a network discovery message sent by the network unit when detecting that a network connection is established with the network unit; A first switching unit is used to switch from the initialization role to the temporary agent role if the network discovery message is received within a first preset time, and to network with the network unit through the easymesh protocol, and if the networking fails, to switch from the temporary agent role to the initialization role; A second receiving unit is used to wait for receiving a network address assigned by the network unit if the networking is successful; A second switching unit is used to switch from the temporary agent role to the agent role if the network address is received within a second preset time, and save it in the flash memory; If the network address is not received within the second preset time, the temporary agent role is switched to the initialization role.
5. The device according to claim 4, characterized in that The first switching unit is configured to: if the network discovery message is not received within a first preset time, switch from the initialization role to the temporary control role; the second receiving unit is configured to: after switching to the temporary control role, wait to receive the network address assigned by the network unit; the second switching unit is configured to: if the network address is received within a second preset time, switch from the temporary control role to the control role and save it to the flash memory.
6. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium and are suitable for being read and executed by a processor, so that a computer device having the processor executes the router networking method according to any one of claims 1 to 3.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the at least one program code is loaded and executed by a processor to implement the operations performed by the router networking method according to any one of claims 1 to 3.
8. An electronic device, characterized in that: The electronic device includes one or more processors and one or more memories, wherein at least one program code is stored in the one or more memories, and the at least one program code is loaded and executed by the one or more processors to implement the operations performed by the router networking method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Role self-election method and device
CN112543466A
Method of realizing auto netting of family network environment
CN1601983A