ONU gateway networking method, device and equipment based on PON network and medium
By utilizing external storage devices to transmit networking information in a PON network, rapid networking of ONU gateways without the need for physical wiring and WPS buttons is achieved, solving the problems of high networking complexity and high cost in existing technologies, and improving the flexibility and scalability of the network.
Patent Information
- Application Number
- CN202511507148.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-21
- Publication Date
- 2026-02-10
AI Technical Summary
The existing PON network suffers from high complexity and high deployment cost of ONU gateways, especially when networking across rooms in multi-story buildings and large apartments, making it difficult to achieve seamless roaming and network coverage.
By detecting whether an external storage device is connected, identifying and reading or writing network information with a preset filename, the sub-ONU gateway can be added to the Mesh network in a plug-and-play manner, avoiding physical wiring and WPS button operation.
It reduces the complexity of network configuration and deployment costs, improves network scalability and adaptability, and is suitable for rapid deployment in various scenarios such as homes and campuses.
Smart Images

Figure CN121509850A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network technology, and in particular to an ONU gateway networking method, ONU gateway networking device, computer equipment, and computer-readable storage medium based on a PON network. Background Technology
[0002] Passive Optical Network (PON) is a telecommunications network that transmits data over optical fiber lines. It is a key technology supporting network access technologies such as Fiber to the Room (FTTR) and Fiber to the Room-Business (FTTR-B). FTTR / FTTR-B extends optical fiber to each room, installing fiber optic terminal equipment in each room to convert optical signals into electrical signals. Optical Network Unit (ONU) gateways, as key user-side devices in fiber optic access networks, are widely used in homes, enterprises, and other scenarios, undertaking core functions such as data transmission and voice calls. Currently, main ONU gateways and sub-ONU gateways, through mesh networking, can achieve seamless roaming across multiple rooms and network coverage expansion. However, related technologies suffer from high networking complexity and deployment costs when implementing mesh networking. Summary of the Invention
[0003] This invention provides an ONU gateway networking method, ONU gateway networking device, computer equipment, and computer-readable storage medium based on a PON network, which can significantly reduce the complexity of network configuration and deployment costs.
[0004] In a first aspect, the present invention provides an ONU gateway networking method based on a PON network and suitable for sub-ONU gateways, comprising: Detect whether an external storage device is currently connected; If an external storage device is detected to be currently connected, the system identifies whether the external storage device contains network information written by the main ONU gateway based on a preset filename. If network information is detected, it is read from the external storage device. Based on the network topology information, join the Mesh network established by the main ONU gateway.
[0005] Secondly, the ONU gateway networking method based on a PON network and suitable for a master ONU gateway provided by the present invention includes: Detect whether an external storage device is currently connected; If an external storage device is detected in the current connection, obtain the networking information required to join the currently established Mesh network; The network information is written to the external storage device according to the preset file name. The network information is used by the sub-ONU gateway to read from the external storage device to join the Mesh network.
[0006] Thirdly, the ONU gateway networking device based on a PON network and suitable for sub-ONU gateways provided by the present invention includes: The first device detection module is used to detect whether an external storage device is currently connected. The information recognition module is used to identify whether the external storage device contains network information written by the main ONU gateway based on a preset file name if an external storage device is detected to be currently connected. The information reading module is used to read network information from an external storage device if network information is detected. The network topology module is used to join the Mesh network established by the main ONU gateway based on the network topology information.
[0007] Fourthly, the ONU gateway networking device based on a PON network and suitable for a main ONU gateway provided by the present invention includes: The second device detection module is used to detect whether an external storage device is currently connected. The information acquisition module is used to acquire the networking information required to join the currently established Mesh network if an external storage device is detected to be connected. The information writing module is used to write network information to an external storage device according to a preset file name. The network information is used by the sub-ONU gateway to read from the external storage device to join the Mesh network.
[0008] Fifthly, the computer device provided by the present invention includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer device is configured with a sub-ONU gateway, the processor executes the computer program to implement the ONU gateway networking method based on a PON network and suitable for a sub-ONU gateway provided by the present invention. Alternatively, when the computer device is configured with a master ONU gateway, the processor executes the computer program to implement the ONU gateway networking method based on a PON network and suitable for a master ONU gateway provided by the present invention.
[0009] In a sixth aspect, the computer-readable storage medium provided by the present invention stores a computer program, which, when executed by a processor, implements the ONU gateway networking method based on a PON network provided by the present invention.
[0010] This invention provides an ONU gateway networking scheme based on a PON network. In this scheme, suitable for sub-ONU gateways, the system detects whether an external storage device is currently connected. If an external storage device is detected, it identifies whether the external storage device contains networking information written by the main ONU gateway based on a preset filename. If the networking information is detected, it reads the information from the external storage device and joins the Mesh network established by the main ONU gateway. This allows for the transmission of networking information via external storage devices, eliminating the need for physical cabling and WPS buttons. This enables plug-and-play, rapid networking of sub-ONU gateways, offering flexibility and convenience, significantly reducing the complexity and deployment cost of network configuration, and improving the scalability and adaptability of network deployment. It is suitable for rapid deployment needs in various scenarios such as homes and campuses. Attached Figure Description
[0011] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 This is a flowchart illustrating an ONU gateway networking method based on a PON network provided in an embodiment of the present invention. Figure 2 This is another flowchart illustrating the ONU gateway networking method based on a PON network provided in this embodiment of the invention; Figure 3 This is a schematic diagram of an ONU gateway networking device based on a PON network provided in an embodiment of the present invention; Figure 4 This is another structural schematic diagram of the ONU gateway networking device based on a PON network provided in this embodiment of the invention; Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation
[0013] To make the technical problems solved, the technical solutions, and the beneficial effects of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0014] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0015] It should also be understood that the term “and / or” as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0016] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."
[0017] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0018] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0019] In related technologies, the mesh networking of the main ONU gateway and the sub-ONU gateway mainly relies on the following two technical solutions: 1. Wired Mesh networking solution: Hardware infrastructure: Both the main ONU gateway and the sub-ONU gateway are equipped with RJ45 Ethernet interfaces and are connected via Cat5e / Category 6 Ethernet cables; Networking logic: After the main ONU gateway is powered on, it transmits the networking information of the Mesh network to the sub-ONU gateway via Ethernet protocol (such as TCP / IP) through the network cable; after receiving the networking information, the sub-ONU gateway automatically matches the Mesh network and completes the network access process. Core dependency: The wired transmission channel of the physical network cable must ensure that the distance between the main ONU gateway and the sub-ONU gateway is within the effective transmission range of Ethernet (usually less than or equal to 100 meters).
[0020] 2. Wireless Mesh Networking Solution: Hardware foundation: Both the main ONU gateway and the sub-ONU gateway are equipped with WPS function modules (including physical buttons or software virtual buttons), supporting WPA / WPA2 / WPA3 wireless encryption protocols; Networking logic: The user first presses the WPS button on the main ONU gateway, and then presses the WPS button on the sub-ONU gateway within 120 seconds. The two devices exchange PIN codes or simplified authentication information through the 2.4GHz / 5GHz wireless frequency band. After obtaining the networking information of the Mesh network established by the main ONU gateway, the sub-ONU gateway joins the Mesh network. Core dependency: The wireless pairing process triggered by the WPS button must complete the two-end operation within a specified time.
[0021] The above-mentioned wired Mesh networking solution relies on the length of the network cable. The signal attenuation becomes severe after 100 meters, making it unsuitable for multi-story buildings and large apartments with cross-room networking. It also requires additional network cable purchases and professional construction in complex environments (such as wall drilling and concealed wiring), increasing time and economic costs. In addition, the deployment location of the main ONU gateway is limited by the network cable interface, making it impossible to flexibly adjust the deployment location according to signal coverage requirements.
[0022] The wireless mesh networking solution relies on the timing of the WPS button. If the user's operation times out or the button is not pressed simultaneously, pairing will fail, resulting in low networking efficiency. In addition, WPS pairing is easily affected by external wireless signal interference (such as other Wi-Fi devices or metal obstacles), which can easily lead to pairing timeouts. Furthermore, physical buttons are prone to malfunction due to mechanical wear or water ingress. Moreover, some older ONU gateways do not support the WPS function or only support low-version WPA encryption, making them unsuitable for the requirements of new mesh networks.
[0023] To address the aforementioned shortcomings of related technologies, this invention aims to provide a PON-based ONU gateway networking method, ONU gateway networking device, computer equipment, and computer-readable storage medium that require no physical wiring and do not rely on WPS buttons. The PON-based ONU gateway networking method can be executed by the PON-based ONU gateway networking device or by a computer equipment integrating the PON-based ONU gateway networking device. When the computer equipment is configured as a sub-ONU gateway, it can detect whether an external storage device is currently connected. If an external storage device is detected, it identifies whether the external storage device stores networking information written by the main ONU gateway based on a preset filename. If the networking information is identified, it reads the networking information from the external storage device and joins the Mesh network established by the main ONU gateway according to the networking information. Alternatively, when the computer device is configured as the main ONU gateway, it can detect whether an external storage device is currently connected. If an external storage device is detected, it obtains the networking information required to join the currently established Mesh network. The networking information is written to the external storage device according to a preset file name. The networking information is used by the sub-ONU gateway to read from the external storage device to join the Mesh network.
[0024] Please refer to Figure 1 This is a flowchart illustrating an ONU gateway networking method based on a PON network, as disclosed in an embodiment of the present invention. This ONU gateway networking method is suitable for sub-ONU gateways, such as... Figure 1 As shown, the process of this ONU gateway networking method based on PON network can be as follows: In S110, it is detected whether an external storage device is currently connected.
[0025] An ONU gateway is a device that enables fiber optic user access. It is primarily used to connect fiber optic cables to homes or businesses, forming a fiber optic broadband access network and providing high-speed internet access. ONU gateways typically work in conjunction with Optical Line Terminals (OLTs). The former receives optical signals and converts them into electrical signals for user terminal equipment, while the latter transmits the data to the fiber optic backbone. ONU gateways support different fiber optic access protocols, such as EPON or GPON.
[0026] The main ONU gateway is directly connected to the optical line terminal, undertaking the functions of receiving optical signals and electrical conversion. It also has routing, switching and user management capabilities. It is a key node in fiber-to-the-home, supporting multiple users to access the Internet at high speed simultaneously, and providing integrated access services such as voice and video according to business needs.
[0027] The sub-ONU gateway is used to extend the access capabilities of the main ONU gateway. By cascading, the number of ports can be increased to meet the connection needs of more users or terminal devices. It is often used in large-area coverage scenarios such as multi-room coverage in homes or small office scenarios. The collaborative work of the main and sub-ONU gateways can effectively improve the flexibility and scalability of network deployment and ensure stable signal transmission.
[0028] The ONU gateway networking method provided in this embodiment of the invention is applicable to sub-ONU gateways, and will be described in detail below from the perspective of sub-ONU gateways.
[0029] After power-on initialization, the sub-ONU gateway detects whether an external storage device is currently connected. This detection can be initiated actively or passively.
[0030] For example, the sub-ONU gateway can be configured with a network triggering component, such as a physical DIP switch or physical button, to trigger Mesh networking. For instance, a user can connect an external storage device with network information already written to it to the sub-ONU gateway, and then trigger the network triggering component configured on the sub-ONU gateway. In response to the triggering of the network triggering component, the sub-ONU gateway performs detection of the external storage device.
[0031] In addition, the management interface provided by the sub-ONU gateway has a network trigger control for triggering Mesh networking. For example, a user can connect an external storage device with network information already written to it to the sub-ONU gateway, and then access the management interface of the sub-ONU gateway through a terminal device and trigger the network trigger control. The sub-ONU gateway responds to the trigger control by performing a detection of the external storage device.
[0032] It should be noted that there are no special restrictions on the type of external storage device used for Mesh networking in this embodiment of the invention, and it can be common storage media such as USB storage devices, mobile hard drives, SD cards, and TF cards.
[0033] For example, taking a USB storage device as an example, after the sub-ONU gateway triggers the detection of external storage devices, it enters a real-time detection state and scans the voltage level changes of the USB port through the USB protocol (such as USB HID) to determine whether a USB storage device is connected. If the expected voltage level change is detected, it is determined that a USB storage device is currently connected.
[0034] In S120, if an external storage device is detected to be currently connected, the system identifies whether the external storage device contains network information written by the main ONU gateway based on a preset filename.
[0035] The networking information includes the relevant information required to join the Mesh network established by the main ONU gateway.
[0036] The preset filename is a predefined specific filename used to identify the network configuration file that stores the network information written by the main ONU gateway. It is not limited here and can be set by the system default or defined by the user. For example, the preset filename is configured as "Host_Backhaul". In addition, the embodiments of the present invention do not limit the file type of the network configuration file, including but not limited to file formats such as .cfg, .txt, .json, and .xml. For example, in the embodiments of the present invention, the file type of the network configuration file is .cfg.
[0037] In this embodiment of the invention, after detecting that an external storage device is currently connected, the sub-ONU gateway immediately performs a file search on the external storage device based on a preset file name to identify whether the external storage device stores the networking information written by the main ONU gateway.
[0038] In addition, to improve the efficiency of network information identification, when the main ONU gateway writes network information, the network configuration file can be placed in a specified directory of the external storage device. There is no restriction on the path of the specified directory. For example, it can be configured to be in the "Mesh_Config" folder under the root directory. When the sub-ONU gateway identifies network information, it will first access the specified directory to find the network configuration file that matches the preset file name. If it is not found, it will traverse the entire external storage device for a deep scan.
[0039] In S130, if network information is detected, the network information is read from the external storage device.
[0040] If a network configuration file matching the preset filename is identified, the sub-ONU gateway reads the network information from the network configuration file so that it can perform network access operations based on the read network information.
[0041] In S140, based on the network topology information, it joins the Mesh network established by the main ONU gateway.
[0042] As shown above, after reading the networking information from the networking configuration file in the external storage device, the sub-ONU gateway then joins the Mesh network established by the main ONU gateway according to the networking information, completes the Mesh networking, and realizes collaborative communication between multiple nodes.
[0043] Optionally, in one embodiment, the network topology information includes the network identifier and channel parameters of the Mesh network. Joining the Mesh network established by the main ONU gateway based on the network topology information includes: Scan the Mesh network on the target channel indicated by the channel parameters according to the network identifier, and join the Mesh network.
[0044] In this embodiment of the invention, the networking information can be divided into two parts: basic information and configuration information. The basic information includes the network identifier of the Mesh network, the MAC address of the main ONU gateway, and the networking key (such as a WPA3 encryption key). The configuration information includes the frequency band information, channel information, bandwidth, and pairing authentication identifier of the Mesh network (such as a 16-bit random code generated based on the MAC address of the main ONU gateway).
[0045] After reading the network information, the sub-ONU gateway first extracts the Mesh network identifier and channel parameters (including frequency band information and channel information). It then scans the target channel specified in the channel information within the designated frequency band to check for a matching Mesh network signal, i.e., the Mesh network established by the main ONU gateway. If a matching signal is found, the sub-ONU gateway sends a Mesh network access authentication request to the main ONU gateway. This request carries the sub-ONU gateway's MAC address, network key, and pairing authentication identifier.
[0046] After receiving a Mesh network access authentication request from a sub-ONU gateway, the main ONU gateway verifies whether the network key and pairing authentication identifier carried in the request match the local record. If the verification is successful, the main ONU gateway sends an authentication success response to the sub-ONU gateway, allowing it to join the Mesh network and allocating node addresses and communication resources. If the verification fails, the main ONU gateway returns an authentication failure response to the sub-ONU gateway, refusing its entry into the Mesh network.
[0047] The embodiments of the present invention can effectively reduce the search overhead of invalid channels and improve networking efficiency and response speed by performing directional scanning of designated channels.
[0048] Optionally, in one embodiment, the network topology information is encrypted network topology information. Based on the network topology information, joining the Mesh network established by the main ONU gateway includes: Decrypt the encrypted network information to obtain the decrypted network information; Based on the decrypted network information, join the Mesh network established by the main ONU gateway.
[0049] In this embodiment of the invention, to prevent network information from being stolen or tampered with during transmission, the main ONU gateway encrypts the network information before writing it to the external storage device.
[0050] Accordingly, the sub-ONU gateway will read the encrypted network information from the external storage device. At this point, the sub-ONU gateway first decrypts the encrypted network information to obtain the decrypted network information, and then joins the Mesh network established by the main ONU gateway based on the decrypted network information. The process of joining the Mesh network based on the decrypted network information can be referred to the relevant descriptions in the above embodiments, and will not be repeated here.
[0051] It should be noted that, in this embodiment of the invention, there are no limitations on the encryption and decryption methods of the main and sub-ONU gateways for network information. Symmetric encryption algorithms or asymmetric encryption algorithms can be used, as long as the main ONU gateway and the sub-ONU gateway share the corresponding decryption key or public-private key pair in advance.
[0052] For example, the master and slave ONU gateways are pre-configured with the same symmetric key at the factory. The master ONU gateway uses this symmetric key to symmetrically encrypt the network information and writes the encrypted network information to an external storage device. After reading the encrypted information, the slave ONU gateway uses the same pre-configured symmetric key to decrypt it, restoring the original network information and thus completing the Mesh network access. The specific implementation method of symmetric encryption is not limited here; it includes, but is not limited to, symmetric algorithms such as AES, DES, or the Chinese national standard SM4, and can be flexibly selected according to actual security requirements and hardware performance.
[0053] Optionally, in one embodiment, the sub-ONU gateway includes an information prompting component, and after joining the Mesh network established by the main ONU gateway according to the network topology information, it further includes: If joining the Mesh network is successful, a network formation success message will be output through the information prompt component; Alternatively, if joining the Mesh network fails, a network failure message will be output via the information prompt component.
[0054] To enhance user experience, the sub-ONU gateway is equipped with an information prompt component to provide intuitive feedback on the network status. It should be noted that this embodiment of the invention does not limit the specific implementation of the information prompt component, which may include hardware units such as indicator lights, displays, or buzzers.
[0055] If the sub-ONU gateway receives a successful authentication response from the main ONU gateway, indicating successful joining of the Mesh network, it outputs a network success message through the information prompt component, informing the user that the sub-ONU gateway has successfully connected to the Mesh network and can communicate and forward data normally. If the sub-ONU gateway receives a failed authentication response from the main ONU gateway, indicating failed joining of the Mesh network, it outputs a network failure message through the information prompt component, informing the user that the sub-ONU gateway failed to connect to the Mesh network.
[0056] For example, taking the information prompt component as an indicator light, the sub-ONU gateway can control the indicator light to be solid blue after successfully joining the Mesh network, indicating that the network has been successfully formed. When joining the Mesh network fails, the indicator light is controlled to be yellow and flash at a fixed frequency, indicating that the network formation has failed.
[0057] In addition to providing intuitive feedback on the network status through information prompts, other statuses during the networking process can also be indicated. For example, the information prompts can indicate the recognition status of network information. Continuing with the indicator light example, after the sub-ONU gateway recognizes and successfully reads the network information, the control indicator light flashes green briefly once to indicate successful reading. If the sub-ONU gateway fails to recognize the network information or the reading fails, the control indicator light flashes red continuously to indicate reading failure, allowing users to promptly detect problems and take appropriate measures. Thus, users can grasp the status changes of the entire device networking process through intuitive visual or audible signals without professional intervention, improving the transparency and controllability of operation.
[0058] Optionally, in one embodiment, after outputting a network failure message through the information prompting component, the method further includes: Re-execute the steps to join the Mesh network established by the main ONU gateway based on the network topology information.
[0059] In this embodiment of the invention, the sub-ONU gateway can automatically trigger a reconnection mechanism after outputting a network failure message, and retry to access the Mesh network based on the acquired network information, without manual intervention from the user. This process can be repeated until the network is successfully established or a preset retry threshold is reached, improving the fault tolerance and automation level of the network.
[0060] As can be seen from the above, when the PON-based ONU gateway networking solution provided by this invention is applied to a sub-ONU gateway, it detects whether an external storage device is currently connected. If an external storage device is detected, it identifies whether the network information written by the main ONU gateway is stored in the external storage device based on a preset filename. If the network information is identified, it reads the network information from the external storage device. Based on the network information, it joins the Mesh network established by the main ONU gateway. Thus, by transmitting network information through an external storage device, no physical wiring or WPS button is required, achieving plug-and-play rapid networking for the sub-ONU gateway. This not only offers flexibility and convenience, significantly reducing the complexity and deployment cost of network configuration, but also improves the scalability and adaptability of network deployment, making it suitable for rapid deployment needs in various scenarios such as homes and campuses.
[0061] Please refer to Figure 2This is another flowchart illustrating a PON network-based ONU gateway networking method disclosed in an embodiment of the present invention. This ONU gateway networking method is suitable for the main ONU gateway, such as... Figure 2 As shown, the process of this ONU gateway networking method based on PON network can be as follows: In S210, it is detected whether an external storage device is currently connected.
[0062] After power-on initialization, the main ONU gateway checks whether an external storage device is currently connected. This detection can be initiated actively or passively.
[0063] For example, the main ONU gateway can be configured with a shared triggering component, such as a physical DIP switch or physical button, to trigger the sharing of network information. For instance, a user can connect an external storage device to the main ONU gateway and then trigger the shared triggering component configured on the main ONU gateway. In response to the triggering of the shared triggering component, the main ONU gateway performs detection of the external storage device.
[0064] In addition, the management interface provided by the main ONU gateway can be configured with a shared trigger control to trigger the sharing of network information. For example, a user can connect an external storage device to the main ONU gateway, and then access the management interface of the main ONU gateway through a terminal device and trigger the shared trigger control. The main ONU gateway responds to the triggering of the shared trigger control by performing a detection of the external storage device.
[0065] It should be noted that there are no special restrictions on the type of external storage device used for Mesh networking in this embodiment of the invention, and it can be common storage media such as USB storage devices, mobile hard drives, SD cards, and TF cards.
[0066] For example, taking a USB storage device as an example, after the main ONU gateway triggers the detection of external storage devices, it enters a real-time detection state and scans the voltage level changes of the USB port through the USB protocol (such as USB HID) to determine whether a USB storage device is connected. If the expected voltage level change is detected, it is determined that a USB storage device is currently connected.
[0067] In S220, if an external storage device is detected to be currently connected, the network information required to join the currently established Mesh network is obtained.
[0068] The network topology information includes relevant information required to join the Mesh network established by the main ONU gateway. For example, the network topology information can be divided into two parts: basic information and configuration information. The basic information includes the network identifier of the Mesh network, the MAC address of the main ONU gateway, and the network topology key (such as a WPA3 encryption key). The configuration information includes the frequency band information, channel information, bandwidth, and pairing authentication identifier of the Mesh network (such as a 16-bit random code generated based on the MAC address of the main ONU gateway).
[0069] In this embodiment of the invention, after detecting that an external storage device is currently connected, the main ONU gateway immediately obtains the networking information required to join the currently established Mesh network.
[0070] In S230, network information is written to an external storage device according to a preset file name. The network information is used by the sub-ONU gateway to read from the external storage device to join the Mesh network.
[0071] The preset filename is a predefined specific filename used to identify the network configuration file that stores the network information written by the main ONU gateway. It is not limited here and can be set by the system default or customized by the user. For example, the preset filename is configured as "Host_Backhaul". In addition, the embodiments of the present invention do not limit the file type of the network configuration file, including but not limited to file formats such as .cfg, .txt, .json, and .xml. For example, in the embodiments of the present invention, the file type of the network configuration file is .cfg.
[0072] In this embodiment of the invention, after obtaining the network information, the main ONU gateway creates a network configuration file with a preset file name and a specified file format in an external storage device, and then writes the obtained network information into the network configuration file. After writing is completed, the main ONU gateway verifies the completeness and correctness of the network configuration file to ensure that the network information is not missing or incorrect.
[0073] When writing network information, the main ONU gateway can place the network configuration file in a specified directory on the external storage device. There is no restriction on the path of the specified directory. For example, it can be configured to be in the "Mesh_Config" folder under the root directory.
[0074] When a sub-ONU gateway connects to the same external storage device, it will automatically identify the network configuration file of the external storage device and parse the network information therein, thereby completing the rapid addition of the Mesh network. For details, please refer to the relevant embodiments suitable for sub-ONU gateways above, which will not be elaborated here.
[0075] In addition, to ensure network information security, the main ONU gateway can encrypt the data before writing the network information. It can use symmetric encryption algorithms or asymmetric encryption algorithms, as long as the main ONU gateway and the sub-ONU gateway share the corresponding decryption key or public-private key pair in advance.
[0076] For example, the master and slave ONU gateways are pre-configured with the same symmetric key at the factory. The master ONU gateway uses this symmetric key to symmetrically encrypt the network information and writes the encrypted network information to an external storage device. After reading the encrypted information, the slave ONU gateway uses the same pre-configured symmetric key to decrypt it, restoring the original network information and thus completing the Mesh network access. The specific implementation method of symmetric encryption is not limited here; it includes, but is not limited to, symmetric algorithms such as AES, DES, or the Chinese national standard SM4, and can be flexibly selected according to actual security requirements and hardware performance.
[0077] In addition, the main ONU gateway is also equipped with an information prompting component to provide intuitive feedback on the writing status of network information. It should be noted that the specific implementation of the information prompting component is not limited in this embodiment of the invention, and it may include hardware units such as indicator lights, displays, or buzzers.
[0078] If writing network information to an external storage device is successful, the main ONU gateway can output a success message through the information prompt component, informing the user that the configuration has been saved and the external storage device can be unplugged. If writing network information to an external storage device fails, the main ONU gateway can output a failure message through the information prompt component, reminding the user to check the connection status of the external storage device or whether the storage space is sufficient.
[0079] For example, taking the information prompt component as an indicator light, the main ONU gateway can control the indicator light to be solid green after successfully writing the network information to the external storage device, and control the indicator light to be flashing red if the writing fails. This allows users to intuitively judge whether the network configuration file has been saved successfully based on the status of the indicator light, and thus decide whether to perform subsequent Mesh networking operations.
[0080] To facilitate better implementation of the above-described ONU gateway networking method based on a PON network and suitable for sub-ONU gateways, this embodiment of the invention also provides a corresponding ONU gateway networking device based on a PON network, which is suitable for sub-ONU gateways. The meanings of the terms used are the same as in the above-described ONU gateway networking method based on a PON network and suitable for sub-ONU gateways; for specific implementation details, please refer to the descriptions in the above method embodiments.
[0081] Please refer to Figure 3The ONU gateway networking device may include a first device detection module 310, an information identification module 320, an information reading module 330, and a network networking module 340. Detailed descriptions of each functional module are as follows: The first device detection module 310 is used to detect whether an external storage device is currently connected. The information recognition module 320 is used to identify whether the external storage device contains network information written by the main ONU gateway based on a preset file name if an external storage device is detected to be currently connected. The information reading module 330 is used to read network information from an external storage device if network information is detected. The network topology module 340 is used to join the Mesh network established by the main ONU gateway based on the topology information.
[0082] Optionally, in one embodiment, the networking information includes the network identifier and channel parameters of the Mesh network. The network networking module 340 is used to scan the Mesh network on the target channel indicated by the channel parameters according to the network identifier and join the Mesh network.
[0083] Optionally, in one embodiment, the networking information is encrypted networking information, and the network networking module 340 is used to decrypt the encrypted networking information to obtain the decrypted networking information; according to the decrypted networking information, it joins the Mesh network established by the main ONU gateway.
[0084] Optionally, in one embodiment, the sub-ONU gateway includes an information prompting component, and the ONU gateway networking device further includes an information prompting module, used to: output a networking success prompt through the information prompting component if joining the Mesh network is successful; or, output a networking failure prompt through the information prompting component if joining the Mesh network fails.
[0085] Optionally, in one embodiment, the network networking module 340 is further configured to re-execute the step of joining the Mesh network established by the main ONU gateway based on the networking information.
[0086] Specific limitations regarding the ONU gateway networking device suitable for sub-ONU gateways can be found in the limitations on the ONU gateway networking method suitable for sub-ONU gateways mentioned above, and will not be repeated here. Each module in the aforementioned ONU gateway networking device suitable for sub-ONU gateways can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0087] To facilitate better implementation of the above-described ONU gateway networking method based on a PON network and suitable for a primary ONU gateway, this embodiment of the invention also provides a corresponding ONU gateway networking device based on a PON network, which is suitable for a primary ONU gateway. The meanings of the terms used are the same as in the above-described ONU gateway networking method based on a PON network and suitable for a primary ONU gateway; for specific implementation details, please refer to the descriptions in the above method embodiments.
[0088] Please refer to Figure 4 The ONU gateway networking device may include a second device detection module 410, an information acquisition module 420, and an information writing module 430. Detailed descriptions of each functional module are as follows: The second device detection module 410 is used to detect whether an external storage device is currently connected. The information acquisition module 420 is used to acquire the networking information required to join the currently established Mesh network if an external storage device is detected to be currently connected. The information writing module 430 is used to write network information into an external storage device according to a preset file name. The network information is used by the sub-ONU gateway to read from the external storage device to join the Mesh network.
[0089] Specific limitations regarding the ONU gateway networking device suitable for the main ONU gateway can be found in the limitations on the ONU gateway networking method suitable for the main ONU gateway mentioned above, and will not be repeated here. Each module in the aforementioned ONU gateway networking device suitable for the main ONU gateway can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0090] In one embodiment, a computer device is provided, the internal structure of which can be as follows: Figure 5As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system, computer programs, and the database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface connects to external wireless clients, providing wireless network access services to the connected wireless clients. When the computer device is configured as a sub-ONU gateway, the computer program is executed by the processor to implement the PON network-based ONU gateway networking method suitable for sub-ONU gateways provided by this invention; or when the computer device is configured as a master ONU gateway, the computer program is executed by the processor to implement the PON network-based ONU gateway networking method suitable for master ONU gateways provided by this invention.
[0091] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the ONU gateway networking method based on a PON network as described above.
[0092] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0093] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0094] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A networking method for ONU gateways based on PON networks, applicable to sub-ONU gateways, characterized in that, include: Detect whether an external storage device is currently connected; If an external storage device is detected to be currently connected, the system identifies whether the external storage device stores networking information written by the main ONU gateway based on a preset filename. If the network information is detected, the network information is read from the external storage device; Based on the network topology information, join the Mesh network established by the main ONU gateway.
2. The ONU gateway networking method according to claim 1, characterized in that, The networking information includes the network identifier and channel parameters of the Mesh network. Joining the Mesh network established by the main ONU gateway based on the networking information includes: According to the network identifier, scan the Mesh network on the target channel indicated by the channel parameters and join the Mesh network.
3. The ONU gateway networking method according to claim 1, characterized in that, The network topology information is encrypted. The step of joining the Mesh network established by the main ONU gateway based on the network topology information includes: The encrypted network information is decrypted to obtain the decrypted network information. Based on the decrypted networking information, join the Mesh network established by the main ONU gateway.
4. The ONU gateway networking method according to any one of claims 1-3, characterized in that, The sub-ONU gateway includes an information prompting component. After joining the Mesh network established by the main ONU gateway according to the network topology information, it further includes: If joining the Mesh network is successful, a network formation success message will be output through the information prompt component; Alternatively, if joining the Mesh network fails, a network failure message will be output through the information prompt component.
5. The ONU gateway networking method according to claim 4, characterized in that, After outputting a network failure message through the information prompt component, the method further includes: Re-execute the step of joining the Mesh network established by the main ONU gateway based on the network information.
6. A networking method for ONU gateways based on PON networks, applicable to main ONU gateways, characterized in that, include: Detect whether an external storage device is currently connected; If an external storage device is detected in the current connection, obtain the networking information required to join the currently established Mesh network; The network information is written to the external storage device according to the preset file name. The network information is used by the sub-ONU gateway to read from the external storage device to join the Mesh network.
7. A networking device for ONU gateways based on a PON network, applicable to sub-ONU gateways, characterized in that, include: The first device detection module is used to detect whether an external storage device is currently connected. The information identification module is used to identify, based on a preset filename, whether the external storage device contains network information written by the main ONU gateway if an external storage device is detected to be currently connected. An information reading module is used to read the network information from the external storage device if the network information is detected. The network topology module is used to join the Mesh network established by the main ONU gateway based on the network topology information.
8. An ONU gateway networking device based on a PON network, suitable for a main ONU gateway, characterized in that, include: The second device detection module is used to detect whether an external storage device is currently connected. The information acquisition module is used to acquire the networking information required to join the currently established Mesh network if an external storage device is detected to be connected. The information writing module is used to write the network information into the external storage device according to a preset file name. The network information is used by the sub-ONU gateway to read from the external storage device to join the Mesh network.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the computer device is configured with a sub-ONU gateway, the processor executes the computer program to implement the ONU gateway networking method based on a PON network as described in any one of claims 1 to 5; or when the computer device is configured with a main ONU gateway, the processor executes the computer program to implement the ONU gateway networking method based on a PON network as described in claim 6.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the ONU gateway networking method based on the PON network as described in any one of claims 1 to 7.