Networking method and device of all-optical network

Send detection messages to the all-optical main gateway and select the target network port through the all-optical gateway, solving the problem that users in the FTTR all-optical network need to configure the uplink by themselves, realizing plug-and-play, and simplifying networking operations.

CN119012047APending Publication Date: 2024-11-22ZTE CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310555216.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-05-16
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

In the FTTR all-optical network, users need to configure the uplink from the gateway by themselves, and cannot achieve plug and play.

Method used

全光子网关在组网之前向全光主网关的所有网络端口发送探测报文,接收回复报文,并根据回复报文选择目标网络端口作为上行链路端口进行组网。

Benefits of technology

The uplink selection is not required for users to manually switch, which realizes the technical effect of plug-and-play and simplifies the FTTR full-optical networking operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119012047A_ABST
    Figure CN119012047A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a networking method and device for an all-optical network, and the method comprises the steps: transmitting a first detection message to all network ports of an all-optical gateway before the networking of the all-optical gateway; the all-optical gateway receives a first reply message replied by the all-optical main gateway according to the first detection message; and the all-optical main gateway selects a target network port from all network ports according to the first reply message as an uplink port to carry out networking with the all-optical main gateway. According to the technical scheme provided by the invention, the problem that plug and play cannot be realized because a user needs to configure the uplink from the gateway by himself / herself in the related technology is solved, so that the technical effect of plug and play is realized without manually switching and selecting the uplink.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communications, and more specifically, to a networking method and device for an all-optical network. Background Art

[0002] With the rapid development of network access technology, the access of smart home gateways has developed to the fiber optic laying to the remote node (Fiber to the Room, FTTR), that is, the whole house optical network. In the use scenario of FTTR whole house optical network, two types of equipment are involved: all-optical master gateway and slave gateway. In actual use, some scenarios do not support the laying of optical fiber, making it impossible for the slave gateway to cover such user scenarios using only the passive optical network (Passive Optical Network, PON) uplink. Therefore, the slave gateway needs to open other network ports as uplinks. According to the hardware characteristics of the slave gateway, three types of uplinks can be selected: PON, Local Area Network (LAN), and WiFi.

[0003] In the existing uplink switching solution, users need to log in to the WEB to switch the uplink. How to simplify the operation of FTTR all-optical networking, without the need for users to configure the uplink from the gateway by themselves, and achieve plug-and-play, an effective solution is needed for this. Summary of the invention

[0004] The embodiments of the present application provide a networking method and device for an all-optical network, so as to at least solve the problem in the related art that users are required to configure the uplink from the gateway by themselves and plug-and-play cannot be achieved.

[0005] According to one embodiment of the present application, a networking method for an all-optical network is provided, comprising: before networking, the all-photonic gateway sends a first detection message to all network ports of the all-photonic gateway; the all-photonic gateway receives a first reply message from the all-optical main gateway in response to the first detection message; the all-photonic gateway selects a target network port from all the network ports as an uplink port according to the first reply message to form a network with the all-optical main gateway.

[0006] According to another embodiment of the present application, a networking method for an all-optical network is provided, including: an all-optical main gateway receives a first detection message, wherein the first detection message is sent by the all-photonic gateway to all network ports of the uplink of the all-photonic gateway before networking; the all-optical main gateway sends a first reply message to the all-photonic gateway according to the first detection message, so that the all-photonic gateway selects a target network port from all the network ports as the uplink port according to the first reply message to be networked with the all-optical main gateway.

[0007] According to another embodiment of the present application, a networking device for an all-optical network is provided, including: a first sending module, used to send a first detection message to all network ports of the all-optical sub-gateway before networking; a first receiving module, used to receive a first reply message from the all-optical main gateway in response to the first detection message; a first networking module, used to select a target network port from all the network ports as an uplink port according to the first reply message to be networked with the all-optical main gateway.

[0008] According to another embodiment of the present application, a networking device for an all-optical network is provided, including: a second receiving module, used to receive a first detection message, wherein the first detection message is sent by the all-photonic gateway to all network ports of the all-photonic gateway before networking; a third sending module, used to send a first reply message to the all-photonic gateway according to the first detection message, so that the all-photonic gateway selects a target network port from all network ports as an uplink port according to the first reply message to be networked with the all-optical main gateway.

[0009] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

[0010] According to another embodiment of the present application, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0011] Through this application, a networking method of an all-optical network is provided, in which the all-photonic gateway sends a first detection message to all network ports of the all-photonic gateway before networking; the all-photonic gateway receives a first reply message from the all-optical master gateway according to the first detection message; the all-photonic gateway selects a target network port from all network ports as an uplink port to network with the all-optical master gateway according to the first reply message. The problem that the user needs to configure the uplink from the gateway by himself and cannot achieve plug-and-play in the related technology is solved, and the technical effect of plug-and-play is achieved without manual switching to select the uplink. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] Figure 1 It is a hardware structure block diagram of a mobile terminal of an all-optical network networking method according to an embodiment of the present application;

[0013] Figure 2 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application;

[0014] Figure 3 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application;

[0015] Figure 4 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application;

[0016] Figure 5 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application;

[0017] Figure 6 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application;

[0018] Figure 7 is a structural block diagram of a networking device for an all-optical network according to an embodiment of the present application;

[0019] Figure 8 is a structural block diagram of a networking device for an all-optical network according to an embodiment of the present application;

[0020] Fig. 9 is a structural block diagram of a networking device for an all-optical network according to an embodiment of the present application;

[0021] Fig.10 It is a schematic diagram of the all-optical networking principle according to an embodiment of the scenario of the present application;

[0022] Fig.11 It is a structural block diagram of a detection message monitoring system according to an embodiment of the present application scenario;

[0023] Fig.12 is a structural block diagram of an uplink management system according to an embodiment of the present application scenario;

[0024] Fig.13 It is a schematic diagram of the detection message structure according to an embodiment of the scenario of the present application;

[0025] Fig.14 It is a schematic diagram of the master-slave gateway detection message interaction process according to an embodiment of the scenario of the present application. DETAILED DESCRIPTION

[0026] The embodiments of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0027] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0028] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 1 is a hardware structure block diagram of a mobile terminal of an all-optical network networking method according to an embodiment of the present application. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0029] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the networking method of the all-optical network in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0030] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0031] In this embodiment, a networking method of an all-optical network running on the above mobile terminal is provided. Figure 2 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application, such as Figure 2 As shown, the process includes the following steps:

[0032] Step S202, before networking, the all-photonic gateway sends a first detection message to all network ports of the all-photonic gateway;

[0033] Step S204, the all-photonic gateway receives a first reply message from the all-optical master gateway in response to the first detection message;

[0034] Step S206: The all-photonic gateway selects a target network port from all network ports according to the first reply message as an uplink port to form a network with the all-optical master gateway.

[0035] Through the above steps, a method for networking an all-optical network is provided, including: before networking, the all-photonic gateway sends a first detection message to all network ports of the all-photonic gateway; the all-photonic gateway receives a first reply message from the all-optical master gateway according to the first detection message; the all-photonic gateway selects a target network port from all network ports as an uplink port to network with the all-optical master gateway according to the first reply message. The problem that the user needs to configure the uplink from the gateway by himself and cannot achieve plug-and-play in the related technology is solved, and the technical effect of plug-and-play is achieved without manual switching to select the uplink.

[0036] The execution subject of the above steps may be a base station, a terminal, etc., but is not limited thereto.

[0037] In an exemplary embodiment, after the all-photonic gateway selects a target network port from all network ports as an uplink port to be networked with the all-optical main gateway according to a first reply message, the method further includes: the all-photonic gateway sends a second detection message to the target network port; the all-photonic gateway confirms whether the uplink is connected normally according to whether a second reply message from the all-optical main gateway in response to the second detection message is received from the target network port. Figure 3 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application, such as Figure 3 As shown, the process includes the following steps:

[0038] Step S302, before networking, the all-photonic gateway sends a first detection message to all network ports of the all-photonic gateway;

[0039] Step S304, the all-photonic gateway receives a first reply message from the all-optical master gateway in response to the first detection message;

[0040] Step S306, the all-photonic gateway selects a target network port from all network ports according to the first reply message as an uplink port to form a network with the all-optical master gateway;

[0041] Step S308, the all-photonic gateway sends a second detection message to the target network port;

[0042] Step S310, the all-photonic gateway confirms whether the uplink is connected normally according to whether a second reply message is received from the target network port from the all-optical master gateway in response to the second detection message.

[0043] In the actual implementation process, in step S308, the all-photonic gateway may send the second detection message to the target network port in a timed manner, and the specific time interval may be set according to actual conditions and is not limited here.

[0044] In an exemplary embodiment, the network port includes at least one of the following: a passive optical network (PON) port; a local area network (LAN) port; or a wireless network (WiFi) port.

[0045] In an exemplary embodiment, the all-photonic gateway selects a target network port from all network ports as an uplink port to form a network with the all-optical main gateway according to the first reply message, including: if the all-photonic gateway receives the first reply message through a network port, then the network port is selected as the target network port to form a network with the all-optical main gateway; or if the all-photonic gateway receives the first reply message through multiple network ports, then a network port is selected from the multiple network ports that received the first reply message according to a preset network port priority order as the target network port to form a network with the all-optical main gateway.

[0046] In the actual implementation process, the above preset network port priority order can be specifically set according to the actual situation, and is not limited here. In an exemplary embodiment, the preset network port priority order is: PON port, LAN port, WiFi port.

[0047] In an exemplary embodiment, the types of the first detection message, the first reply message, the second detection message, and the second reply message include at least: IEEE1905 protocol message.

[0048] In an exemplary embodiment, the Message Type field in the IP data packet of the IEEE1905 protocol message carries an Uplink Request message type or an Uplink Reply message type.

[0049] In another embodiment of the present application, a networking method for an all-optical network running on the above mobile terminal is provided. Figure 4 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application, such as Figure 4 As shown, the process includes the following steps:

[0050] Step S402, the all-optical master gateway receives a first detection message, wherein the first detection message is sent by the all-optical gateway to all network ports of the all-optical gateway before networking;

[0051] Step S404: the all-optical master gateway sends a first reply message to the all-photonic gateway according to the first detection message, so that the all-photonic gateway selects a target network port from all network ports as an uplink port to form a network with the all-optical master gateway according to the first reply message.

[0052] In an exemplary embodiment, after the all-optical master gateway receives the first detection message, the method further includes: the all-optical master gateway verifies the first detection message, and sends a first reply message if it is a real detection message; if it is not a real detection message, discards the first detection message. Figure 5 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application, such as Figure 5 As shown, the process includes the following steps:

[0053] Step S502, the all-optical master gateway receives a first detection message, wherein the first detection message is sent by the all-optical gateway to all network ports of the all-optical gateway before networking;

[0054] Step S504, the all-optical master gateway verifies the first detection message, and sends a first reply message if it is a real detection message; if it is not a real detection message, the first detection message is discarded;

[0055] Step S506: the all-optical master gateway sends a first reply message to the all-photonic gateway according to the first detection message, so that the all-photonic gateway selects a target network port from all network ports as an uplink port to form a network with the all-optical master gateway according to the first reply message.

[0056] In an exemplary embodiment, after the all-photonic gateway selects a target network port from all network ports as an uplink port to be networked with the all-optical master gateway according to a first reply message, the method further includes: the all-optical master gateway receives a second detection message, wherein the second detection message is periodically sent by the all-optical gateway to the target network port; the all-optical master gateway replies to the second reply message to the all-photonic gateway according to whether the second detection message is received from the target network port to confirm whether the uplink is connected normally. Figure 6 is a flowchart of a networking method of an all-optical network according to an embodiment of the present application, such as Figure 6 As shown, the process includes the following steps:

[0057] Step S602, the all-optical master gateway receives a first detection message, wherein the first detection message is sent by the all-optical gateway to all network ports of the all-optical gateway before networking;

[0058] Step S604: the all-optical master gateway verifies the first detection message, and sends a first reply message if it is a true detection message; if it is not a true detection message, the first detection message is discarded;

[0059] Step S606, the all-optical master gateway sends a first reply message to the all-optical sub-gateway according to the first detection message, so that the all-optical sub-gateway selects a target network port from all network ports as an uplink port to form a network with the all-optical master gateway according to the first reply message;

[0060] Step S608, the all-optical master gateway receives the second detection message, wherein the second detection message is sent by the all-optical sub-gateway to the target network port;

[0061] Step S610: The all-optical master gateway replies a second reply message to the all-optical sub-gateway according to whether the second detection message is received from the target network port, so as to confirm whether the uplink is connected normally.

[0062] In the actual implementation process, in step S608, the all-photonic gateway may send the second detection message to the target network port in a timed manner, and the specific time interval may be set according to the actual situation and is not limited here.

[0063] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0064] In this embodiment, a networking device for an all-optical network is also provided, which is used to implement the above embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0065] Figure 7 is a structural block diagram of a networking device for an all-optical network according to an embodiment of the present application, such as Figure 7As shown, the networking device 70 includes: a first sending module 710, used to send a first detection message to all network ports of the all-photonic gateway before networking; a first receiving module 720, used to receive a first reply message from the all-optical main gateway in response to the first detection message; a first networking module 730, used to select a target network port from all network ports as an uplink port to be networked with the all-optical main gateway according to the first reply message.

[0066] Figure 8 is a structural block diagram of a networking device for an all-optical network according to an embodiment of the present application, such as Figure 8 As shown, the networking device 80 includes Figure 7 In addition to all the modules shown, it also includes: a second sending module 810, which is used to send a second detection message to the target network port at a regular interval; a detection module 820, which is used to confirm whether the uplink is connected normally according to whether a second reply message from the all-optical main gateway to the second detection message is received from the target network port.

[0067] In another embodiment of the present application, a networking device for an all-optical network is provided. Fig. 9 is a structural block diagram of a networking device for an all-optical network according to an embodiment of the present application, such as Fig. 9 As shown, the networking device 90 includes: a second receiving module 910, used to receive a first detection message, wherein the first detection message is sent by the all-photonic gateway to all network ports of the all-photonic gateway before networking; a third sending module 920, used to send a first reply message to the all-photonic gateway according to the first detection message, so that the all-photonic gateway selects a target network port from all network ports as an uplink port according to the first reply message to be networked with the all-optical main gateway.

[0068] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0069] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0070] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0071] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0072] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0073] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0074] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.

[0075] In order to enable those skilled in the art to better understand the technical solution of the present application, it is described below in conjunction with specific scenario embodiments.

[0076] Scenario Example 1

[0077] The detection message monitoring module in the embodiment of this scenario may correspond to the second receiving module in the above embodiment, and the monitoring message management module may correspond to the third sending module in the above embodiment. The uplink detection module may correspond to the first sending module in the above embodiment, and the uplink management module may correspond to the first networking module in the above embodiment. Specifically, in the actual implementation process, the correspondence between the above modules, the names of the modules, and the functional division of the modules can be adjusted according to the actual situation, as long as the networking method of the all-optical network provided in the embodiment of the present application can be implemented.

[0078] This scenario embodiment proposes a networking method for an all-optical network that can be used as an uplink from a gateway dynamically identifying a port for FTTR all-optical networking scenario. Fig.10 is a schematic diagram of the all-optical networking principle according to the scenario embodiment of the present application, such as Fig.10 As shown, it includes an all-optical main gateway and an all-photonic gateway.

[0079] Fig.11 is a structural block diagram of a detection message monitoring system according to an embodiment of the present application scenario, such as Fig.11 As shown, the detection message monitoring system is set on the all-optical main gateway, where the detection message monitoring module and the message monitoring management module are designed in the main gateway. After the main gateway is started, the message monitoring is turned on, and after receiving the detection message, the message monitoring management module determines whether it is a detection message and responds. Fig.11 As shown, the main gateway designs a detection message monitoring module, which is only used to process the detection messages sent from the gateway. After the main gateway is started, it starts message monitoring and replies after receiving the detection message.

[0080] Fig.12 is a structural block diagram of an uplink management system according to an embodiment of the present application scenario, such as Fig.12 As shown, the uplink management system is arranged on the all-photonic gateway, i.e., the slave gateway, wherein the uplink detection module and the uplink management module are designed on the slave gateway. When the slave gateway accesses the network, the timer is started in the uplink detection module, and detection messages are regularly sent to all network ports; if a port receives a reply message, it is considered that the port of the slave gateway can be used as an uplink, and the uplink management module is notified to select the port as the uplink for networking; if reply messages are received from multiple ports at the same time, the uplink is selected according to the priority of PON>LAN>WiFi; after the networking is completed, the timer is started in the uplink detection module of the slave gateway, and detection messages are regularly sent from the uplink unicast for keeping the uplink alive. If the recovery message for keeping alive is not received, it is considered that the current uplink is disconnected, and it is necessary to resend the detection message to all network ports. As shown Fig.12 As shown in the figure, the slave gateway sends detection messages to the network port at regular intervals to identify whether the network port can be used as an uplink port. For the slave gateway, it only needs to connect the network port of the slave gateway to the main gateway to complete the networking. There is no need to configure the uplink separately. It only needs to connect the PON / LAN / WiFi port to the main gateway. Plug and play is realized.

[0081] The all-optical network networking method provided in this scenario embodiment can simplify the FTTR all-optical networking process. If the default uplink is not used, there is no need to manually switch to select the uplink, thus achieving plug-and-play.

[0082] Fig.13 is a schematic diagram of the detection message structure according to the embodiment of the present application scenario, such as Fig.13 As shown, in the embodiment of the present application, IEEE1905 messages can be used as an example. In actual implementation, it is not limited to the use of IEEE1905 messages, and this function can be implemented based on Ethernet custom frames.

[0083] As shown in Table 1, the detection message of the present application adopts the IEEE1905 protocol message, and two new message types, Uplink Request and Uplink Reply, are added to the Message Type field in the IP data message of the message to determine the FTTR all-optical networking detection scenario.

[0084] Table 1 Example of messages defined in 1905.1 message

[0085]

[0086] Fig.14 : is a schematic diagram of the master-slave gateway detection message interaction process according to the embodiment of the present application scenario, such as Fig.14 As shown, the following steps are included:

[0087] Step S1402, before networking, the slave gateway sends a detection message carrying Messagetype Uplink Request to all network ports in the form of broadcast to determine whether the link is connected and the gateway is connected to the master gateway. When networking is not established, the message is broadcast for detection;

[0088] Step S1404: After receiving the message, the primary gateway unicasts and sends a message with Message type Uplink Reply to reply to the request;

[0089] Step S1406: After the networking is successful, the sub-gateway sends a message carrying the Message type UplinkRequest in a unicast form as a heartbeat message to keep the uplink alive;

[0090] Step S1408, the primary gateway unicasts a heartbeat reply message carrying the Message type Uplink Reply.

[0091] After the network is disconnected, the gateway broadcasts an IEEE1905 protocol message with the message type Uplink Request to all network ports to re-initiate the network.

[0092] Through the above method steps, the selection of the uplink is automatically processed, and the user does not need to manually configure the uplink. It is plug-and-play between PON and LAN. If PON and LAN are not used, WiFi is automatically used as the uplink for networking.

[0093] In the scenario embodiment of the present application, a heartbeat message is sent to confirm whether the uplink is kept alive, wherein the all-photonic gateway performs heartbeat verification by sending a heartbeat message (which may also be called a second detection message in the aforementioned embodiment) to verify whether the uplink is connected normally, that is, whether the uplink is kept alive. If a reply heartbeat message (or a reply message or a second reply message in the aforementioned embodiment) is received from the all-optical main gateway, the uplink can be confirmed to be kept alive.

[0094] Scenario Example 2

[0095] In this scenario, the slave gateway and the master gateway are connected only by optical fiber, and the main networking process is as follows:

[0096] Step 1: The gateway uplink detection module periodically sends detection messages to all network ports and waits for reply messages;

[0097] Step 2: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message. If it is a detection message, a reply message is constructed and sent; if it is not a detection message sent from the gateway, it is discarded;

[0098] Step 3: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the PON port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the PON port at regular intervals to keep the uplink of the slave gateway alive;

[0099] Note: If the gateway receives reply messages from both the PON port and the WiFi port at the same time, the PON port is used as the uplink; if the WiFi port receives the reply message before the LAN port, the WiFi port is used as the uplink. After the PON port receives the reply message, the PON port unicasts a detection message, and after receiving the reply message from the PON port again, it switches to the PON uplink networking.

[0100] Scenario Example 3

[0101] In this scenario, the slave gateway and the master gateway are connected only by a network cable, and the main networking process is as follows:

[0102] Step 1: The gateway uplink detection module periodically sends detection messages to all network ports and waits for reply messages;

[0103] Step 2: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message. If it is a detection message, a reply message is constructed and sent; if it is not a detection message sent from the gateway, it is discarded;

[0104] Step 3: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the LAN port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the LAN port at regular intervals to keep the uplink of the slave gateway alive;

[0105] Note: If the gateway receives reply messages from both the LAN port and the WiFi port at the same time, the LAN port is used as the uplink; if the WiFi port receives the reply message before the LAN port, the WiFi port is used as the uplink. After the LAN port receives the reply message, the LAN port unicasts the detection message, and after receiving the reply message from the LAN port again, it switches to the LAN uplink networking.

[0106] Scenario Example 4

[0107] In this scenario, there is no network cable or optical fiber connection between the slave gateway and the master gateway, and the main networking process is as follows:

[0108] Step 1: The gateway uplink detection module periodically sends detection messages to all network ports and waits for replies;

[0109] Step 2: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message. If it is a detection message, a reply message is constructed and sent; if it is not a detection message sent from the gateway, it is discarded;

[0110] Step 3: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the WiFi port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the WiFi port at regular intervals to keep the uplink of the slave gateway alive;

[0111] Scenario Example 5

[0112] In this scenario, the slave gateway and the master gateway are connected by both optical fiber and network cable. The main networking process is as follows:

[0113] Step 1: The gateway uplink detection module periodically sends detection messages to all network ports and waits for reply messages;

[0114] Step 2: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message. If it is a detection message, a reply message is constructed and sent; if it is not a detection message sent from the gateway, it is discarded;

[0115] Step 3: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the PON port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the PON port at regular intervals to keep the uplink of the slave gateway alive;

[0116] Note: If the gateway receives reply messages from both the PON port and the LAN port at the same time, the PON port is used as the uplink; if the LAN port receives the reply message before the PON port, the LAN port is used as the uplink. After the PON port receives the reply message, the detection message is unicasted from the PON port. After receiving the reply message from the PON port again, the network is switched to the PON uplink.

[0117] Scenario Example 6

[0118] In this scenario embodiment, when the slave gateway and the master gateway are not connected by a network cable or optical fiber, the network is established through WiFi and then connected by a network cable or optical fiber. The main networking process is as follows:

[0119] Step 1: The gateway uplink detection module periodically sends detection messages to all network ports and waits for reply messages;

[0120] Step 2: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message. If it is a detection message, a reply message is constructed and sent; if it is not a detection message sent from the gateway, it is discarded;

[0121] Step 3: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the WiFi port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the WiFi port at regular intervals to keep the uplink of the slave gateway alive;

[0122] Step 4: Connect the master gateway and the slave gateway with a network cable or optical fiber. The slave gateway management uplink management module will disconnect the WiFi uplink networking and resend the detection message to all networks.

[0123] Step 5: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message and construct a reply message to be sent;

[0124] Step 6: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the LAN / PON port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the LAN / PON port at regular intervals to keep the uplink of the slave gateway alive;

[0125] Scenario Example 7

[0126] In this scenario, the slave gateway and the master gateway are connected only by a network cable and then connected by optical fiber. The main networking process is as follows:

[0127] Step 1: The gateway uplink detection module periodically sends detection messages to all network ports and waits for reply messages;

[0128] Step 2: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message. If it is a detection message, a reply message is constructed and sent; if it is not a detection message sent from the gateway, it is discarded;

[0129] Step 3: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the LAN port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the LAN port at regular intervals to keep the uplink of the slave gateway alive;

[0130] Step 4: Use optical fiber to connect the master gateway and the slave gateway. The slave gateway management uplink management module will disconnect the LAN uplink networking and resend the detection message to all networks.

[0131] Step 5: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message and construct a reply message to be sent;

[0132] Step 6: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the PON port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the PON port regularly for keeping the uplink of the slave gateway alive;

[0133] Scenario Example 8

[0134] In this scenario, the slave gateway and the master gateway are connected only by optical fiber and then by network cables. The main networking process is as follows:

[0135] Step 1: The gateway uplink detection module periodically sends detection messages to all network ports and waits for reply messages;

[0136] Step 2: After receiving the message, the main gateway monitoring module sends the message data to the message monitoring management module to verify the message. If it is a detection message, a reply message is constructed and sent; if it is not a detection message sent from the gateway, it is discarded;

[0137] Step 3: After receiving the reply message sent by the main gateway, the uplink detection module of the slave gateway sends the message data to the uplink management module, and the uplink management module selects the PON port as the uplink to form a network with the main gateway; at the same time, the uplink detection module of the slave gateway starts the timer and sends a detection message to the PON port at regular intervals to keep the uplink of the slave gateway alive;

[0138] Step 4: The optical fiber between the master gateway and the slave gateway is not disconnected, and they are connected using a network cable. The uplink management module managed by the slave gateway will not switch to the LAN uplink networking, and will send detection messages to the PON port according to the timer to keep the uplink alive.

[0139] In summary, the method and device for all-optical networking provided by the embodiment of the present application can be applied to the scenarios in FTTR all-optical network networking, especially the scenario where the default uplink is not used in the process of accessing the all-optical network from the gateway. No user configuration is required, and a certain network port can be used as the uplink to network with the all-optical main gateway based on the actual networking, thus achieving plug-and-play. The technical solution provided by the embodiment of the present application optimizes the operation process of accessing the network from the gateway in the FTTR all-optical networking scenario, that is, there is no need to manually configure the uplink when accessing the network from the gateway, thereby reducing the operation cost of the FTTR all-optical networking.

[0140] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for establishing an all-optical network, characterized in that: include: Before networking, the all-photonic gateway sends a first detection message to all network ports of the all-photonic gateway; The all-photonic gateway receives a first reply message from the all-optical master gateway in response to the first detection message; The all-optical gateway selects a target network port from all the network ports according to the first reply message as an uplink port to form a network with the all-optical main gateway.

2. The method according to claim 1, characterized in that After the all-optical gateway selects a target network port from all the network ports according to the first reply message as an uplink port to form a network with the all-optical main gateway, the method further includes: The all-photonic gateway sends a second detection message to the target network port; The all-photonic gateway confirms whether the uplink is connected normally according to whether a second reply message from the all-optical master gateway in response to the second detection message is received from the target network port.

3. The method according to claim 1, characterized in that The network port includes at least one of the following: Passive optical network PON port; LAN port; Wireless network WiFi port.

4. The method according to claim 1, characterized in that: The all-optical gateway selects a target network port from all the network ports according to the first reply message as an uplink port to form a network with the all-optical main gateway, including: If the all-optical gateway receives the first reply message through one of the network ports, the network port is selected as the target network port to form a network with the all-optical master gateway; or If the all-photonic gateway receives the first reply message through multiple network ports, a network port is selected from the multiple network ports that received the first reply message according to a preset network port priority order as the target network port to form a network with the all-optical main gateway.

5. The method according to claim 4, characterized in that in, The preset network port priority order is: PON port, LAN port, WiFi port.

6. The method according to claim 1, characterized in that The types of the first detection message, the first reply message, the second detection message, and the second reply message include at least: IEEE1905 protocol message.

7. The method according to claim 6, characterized in that in, The Message Type field in the IP data message of the IEEE1905 protocol message carries an Uplink Request message type or an Uplink Reply message type.

8. A method for establishing an all-optical network, characterized in that: include: The all-optical master gateway receives a first detection message, wherein the first detection message is sent by the all-optical gateway to all network ports of the all-optical gateway before networking; The all-optical master gateway sends a first reply message to the all-optical sub-gateway according to the first detection message, so that the all-optical sub-gateway selects a target network port from all the network ports as an uplink port to form a network with the all-optical master gateway according to the first reply message.

9. The method according to claim 8, characterized in that After the all-optical master gateway receives the first detection message, the method further includes: The all-optical main gateway verifies the first detection message, and sends the first reply message if it is a real detection message; if it is not a real detection message, the first detection message is discarded.

10. The method according to claim 8, characterized in that After the all-optical gateway selects a target network port from all the network ports according to the first reply message as an uplink port to form a network with the all-optical main gateway, the method further includes: The all-optical master gateway receives a second detection message, wherein the second detection message is sent by the all-optical sub-gateway to the target network port at a regular interval; The all-optical master gateway replies a second reply message to the all-optical sub-gateway according to whether the second detection message is received from the target network port, so as to confirm whether the uplink is connected normally.

11. A networking device for an all-optical network, characterized in that: include: A first sending module, used for sending a first detection message to all network ports of the all-photonic gateway before networking; A first receiving module, configured to receive a first reply message from the all-optical master gateway in response to the first detection message; The first networking module is used to select a target network port from all the network ports as an uplink port to form a network with the all-optical main gateway according to the first reply message.

12. The device according to claim 11, characterized in that Also includes: A second sending module, used for periodically sending a second detection message to the target network port; The detection module is used to confirm whether the uplink is connected normally according to whether a second reply message is received from the target network port from the all-optical main gateway in response to the second detection message.

13. A networking device for an all-optical network, characterized in that: include: A second receiving module is used to receive a first detection message, wherein the first detection message is sent by the all-photonic gateway to all network ports of the all-photonic gateway before networking; The third sending module is used to send a first reply message to the all-photonic gateway according to the first detection message, so that the all-photonic gateway selects a target network port from all the network ports as an uplink port to form a network with the all-optical main gateway according to the first reply message.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the method described in any one of claims 1 to 10 when executed by a processor.

15. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method described in any one of claims 1 to 10 is implemented.