Disclosure of Invention
The technical problem to be solved by the invention is that the OLT equipment in the prior art cannot sense the migration of the management authority of the ONU equipment by the cloud controller, so that the uplink message forwarding error is caused.
In a first aspect, the present invention provides a method for perceiving management right migration of an ONU device, including:
the method comprises the steps that an OLT device establishes a mapping relation between an ONU device and a corresponding network connection, wherein the corresponding network connection is the network connection between a corresponding cloud controller and the OLT device, and the corresponding cloud controller is a cloud controller with management right of the ONU device;
The OLT equipment guides the forwarding of the uplink message of the ONU equipment according to the mapping relation so as to forward the uplink message to the corresponding cloud controller;
And when the OLT equipment senses that the management authority of the ONU equipment is migrated, updating the mapping relation to guide the forwarding of the uplink message of the ONU equipment according to the updated mapping relation.
Preferably, the OLT device establishes a mapping relationship between an ONU device and a corresponding network connection, and specifically includes:
the OLT equipment receives a downlink message from the cloud controller, wherein the downlink message carries the position information of the target ONU equipment;
And the OLT equipment establishes a mapping relation between the target ONU equipment and the network connection according to the position information and the network connection used when receiving the downlink message.
Preferably, the OLT device directs forwarding of an upstream message of the ONU device according to the mapping relationship, and specifically includes:
the OLT equipment receives an uplink message from the ONU equipment;
And the OLT equipment finds out the network connection corresponding to the ONU equipment according to the mapping relation and forwards the uplink message to a corresponding cloud controller through the network connection.
Preferably, when the OLT device senses that the management authority of the ONU device is migrated, updating the mapping relationship specifically includes:
When the new mapping relation established by the OLT equipment according to the latest received downlink message is different from the old mapping relation, the OLT equipment considers that the management authority of the target ONU equipment is migrated, wherein the target ONU equipment is ONU equipment corresponding to the downlink message;
Updating the old mapping relation into a new mapping relation so as to guide forwarding of uplink messages of the ONU equipment according to the new mapping relation.
In a second aspect, the present invention further provides a method for perceiving the migration of the management right of an ONU device, which is implemented based on the method for perceiving the migration of the management right of an ONU device in the first aspect, where the OLT device includes a master control disc and at least one line card, and the mapping relationship is built on the line card of the OLT device, and specifically includes:
the master control disk receives a downlink message from the cloud controller through the network connection, and analyzes the downlink message to obtain the position information of the target ONU equipment;
the master control disc reassembles the downlink message into a first message, so that the first message carries the mark number of the network connection and the first message is sent to a corresponding target line card;
and the target line card establishes a mapping relation between the target ONU equipment and the network connection on the target line card according to the first message.
Preferably, the mapping relationship between the target ONU device and the network connection is established on the target line card according to the first packet, and specifically includes:
The target line card analyzes the first message, and obtains the mark number of the network connection and the position information of target ONU equipment from the first message;
According to the position information of the target ONU equipment, the equipment number of the target ONU equipment is found;
And establishing a mapping relation between the equipment number of the target ONU equipment and the mark number of the network connection on the target line card.
Preferably, the method further comprises:
The target line card also analyzes the first message to obtain a downlink message issued by the cloud controller;
And according to the position information of the target ONU equipment, a corresponding target PON port is found, and the downlink message is forwarded to the target ONU equipment through the target PON port.
Preferably, the OLT device directs forwarding of an upstream message of the ONU device according to the mapping relationship, and specifically includes:
The line card receives the uplink message, and searches for a mark number corresponding to network connection from the mapping relation according to the ONU equipment;
The line card generates a second message according to the uplink message and the mark number, and forwards the second message to the main control disc;
the master control disk analyzes the second message, acquires the mark number from the second message, and generates an uplink message according to the uplink message in the second message;
And the master control disk forwards the uplink message to the corresponding cloud controller through the network connection corresponding to the mark number.
Preferably, when the OLT device senses that the management authority of the ONU device is migrated, updating the mapping relationship specifically includes:
When a line card is different from an old mapping relation according to a new mapping relation established by a latest received first message, the line card considers that the management authority of target ONU equipment is migrated, wherein the target ONU equipment is ONU equipment corresponding to the downlink message;
And the line card updates the old mapping relation into a new mapping relation so that the OLT equipment guides the forwarding of the uplink message of the ONU equipment according to the new mapping relation.
In a third aspect, the present invention provides a system for sensing ONU device management right migration, where the system is configured to implement the method for sensing ONU device management right migration in the first aspect or the second aspect.
In a fourth aspect, the present invention further provides an apparatus for sensing ONU device management right migration, which is configured to implement the method for sensing ONU device management right migration in the first aspect, where the apparatus includes:
And a memory communicatively coupled to the at least one processor, wherein the memory stores instructions executable by the at least one processor, the instructions executable by the processor for performing the method of perceiving ONU device management right migration according to the first aspect.
In a fourth aspect, the present invention further provides a non-volatile computer storage medium, where computer-executable instructions are stored, where the computer-executable instructions are executed by one or more processors to perform the method for perceiving ONU device management right migration according to the first aspect.
The invention establishes the mapping relation between the ONU equipment and the network connection through the OLT equipment, and updates the mapping relation when the management right of the ONU equipment is perceived to be migrated, so that the ONU equipment can be corresponding to the cloud controller with the management right of the ONU equipment by the OLT equipment, and the ONU equipment can be ensured to forward the uplink message correctly without changing the ONU equipment.
Detailed Description
The present invention will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
In the description of the present invention, terms such as "inner", "outer", "longitudinal", "transverse", "upper", "lower", "top", "bottom", and the like refer to an orientation or positional relationship based on that shown in the drawings, and are merely for convenience in describing the present invention and do not require that the present invention must be constructed and operated in a particular orientation, and thus should not be construed as limiting the present invention.
In addition, the technical features of the embodiments of the present invention described below may be combined with each other as long as they do not collide with each other.
Example 1:
the embodiment 1 of the invention provides a method for sensing the migration of ONU equipment management rights, as shown in figure 1, comprising the following steps:
in step 201, an OLT device establishes a mapping relationship between an ONU device and a corresponding network connection, where the corresponding network connection is a network connection between a corresponding cloud controller and the OLT device, and the corresponding cloud controller is a cloud controller having management rights of the ONU device.
The cloud controller and the OLT device are connected by a network based on a reliable transmission protocol, so that the cloud controller and the OLT device can sense the on-off state of the network connection by the reliable transmission protocol, and an optional implementation mode of the network connection based on the reliable transmission protocol is gRPC (google remote procedure call ) connection based on the TCP protocol.
One cloud controller can manage one or more ONU devices, i.e. one network connection can establish a mapping relationship with a plurality of ONU devices.
In step 202, the OLT device directs forwarding of an upstream message of an ONU device according to the mapping relationship, so as to forward the upstream message to a corresponding cloud controller;
in step 203, when the OLT device senses that the management authority of the ONU device is migrated, the OLT device updates the mapping relationship, so as to guide forwarding of an uplink message of the ONU device according to the updated mapping relationship.
In the embodiment, the mapping relation between the ONU equipment and the network connection is established through the OLT equipment, and when the management right of the ONU equipment is perceived to migrate, the mapping relation is updated, so that the ONU equipment can be corresponding to the cloud controller with the management right of the ONU equipment by the OLT equipment, and the ONU equipment can be ensured to forward the uplink message correctly without changing the ONU equipment.
The embodiment also provides a specific implementation of establishing a mapping relationship, that is, the OLT device establishes a mapping relationship between an ONU device and a corresponding network connection, as shown in fig. 2, which specifically includes:
In step 301, the OLT device receives a downlink packet from the cloud controller, where the downlink packet carries location information of a target ONU device.
In step 302, the OLT apparatus establishes a mapping relationship between the target ONU apparatus and the network connection according to the location information and the network connection used when receiving the downlink packet.
As an optional implementation manner, when the network connection based on the reliable transmission protocol is successfully established between the cloud server and the OLT device, the OLT device senses that the connection is successfully established from the connection protocol server, and allocates a globally unique flag number to the network connection. The flag number may be unique in the OLT apparatus or may be unique in a global environment including all OLT apparatuses. The flag number may be self-defined and allocated according to a preset allocation rule, and at this time, the management may be performed by establishing a mapping table of network connection and the flag number in the OLT device, or may be obtained according to some inherent attributes of the network connection. The mapping relationship may be represented as a mapping relationship between location information of the target ONU device and a flag number of the network connection.
The downlink message is a message that the cloud controller is configured to send a message to the ONU device, where the downlink message is further carried. The location information may be an ID number of the ONU device, through which a corresponding ONU device can be located.
After the mapping relationship is generated, the embodiment further provides a specific implementation for guiding the forwarding of the uplink message of the ONU device, that is, the OLT device guides the forwarding of the uplink message of the ONU device according to the mapping relationship, as shown in fig. 3, specifically including:
In step 401, the OLT apparatus receives an upstream message from the ONU apparatus.
In step 402, the OLT device finds a network connection corresponding to the ONU device according to the mapping relationship, and forwards the uplink message to a corresponding cloud controller through the network connection.
In actual use, there are generally two cases of migration of management rights:
In the first case, when the cloud controller fails and the network fails to cause long-time disconnection, for example, when the cloud management platform detects that the connection state of the cloud controller-1 and the OLT device is abnormal and cannot be recovered, at the moment, another cloud controller-2 can be normally connected with the OLT device, and the taking over condition is met, the cloud management platform re-programs the ONU in the cloud controller-1 to the controller-2 for management, and the controller-2 re-establishes communication with the ONU after obtaining the management authority.
In the second case, because of the management requirement, the old cloud controller needs to be closed, and at this time, the cloud management platform will also migrate all ONUs to the new controller. The cloud management platform is located on the upper layer of the cloud controller in a framework, is a visual platform and is used for managing equipment modules such as the OLT equipment and the cloud controller and planning ONU equipment managed by the cloud controller.
In both cases, the cloud controller newly taking over the ONU device will issue a downlink message to the ONU device. In combination with the foregoing embodiment, there is a preferred implementation manner, where the updating, by the OLT device, the mapping relationship when it is perceived that the management authority of the ONU device is migrated, specifically includes:
When the new mapping relation established by the OLT equipment according to the latest received downlink message is different from the old mapping relation, the OLT equipment considers that the management authority of the target ONU equipment is migrated, wherein the target ONU equipment is the ONU equipment corresponding to the downlink message.
Updating the old mapping relation into a new mapping relation so as to guide forwarding of uplink messages of the ONU equipment according to the new mapping relation.
In an optional implementation manner, a mapping table for storing a mapping relationship is built in the OLT device, and whenever a new mapping relationship is obtained according to a downlink message, it is searched in the mapping table whether an old mapping relationship matched with the new mapping relationship exists, where the matching specifically refers to whether an ONU device in the new mapping relationship is consistent with an ONU device in the old mapping relationship, if the new mapping relationship is found to be the same as the old mapping relationship, and if the new mapping relationship is different from the old mapping relationship, the mapping table is updated, the old mapping relationship is updated to be the new mapping relationship, and if the old mapping relationship matched with the new mapping relationship cannot be found, the new mapping relationship is added to the mapping table (in this case, the mapping relationship is usually built directly when the system is initialized).
Example 2:
in an actual application scenario, there are two types of OLT apparatuses, in the first type of OLT apparatus, the main control panel and the line card are unified, and the two resources are shared, so that it is not necessary to distinguish them, and embodiment 1 is applicable to such an OLT apparatus. In a second OLT apparatus, the OLT apparatus includes a main control disc and at least one line card, and the resources of the main control disc and the resources of the line card are independent of each other, for such OLT apparatus, the present invention further provides a method for sensing ONU apparatus management right migration, which is implemented based on the method for sensing ONU apparatus management right migration described in embodiment 1, and in the method, the mapping relationship is established on the line card of the OLT apparatus, as shown in fig. 4, where the method includes:
In step 501, the master control disc receives a downlink message from the cloud controller through the network connection, and parses the downlink message to obtain location information of the target ONU device.
In step 502, the master control disc reassembles the downlink packet into a first packet, so that the first packet carries the identifier of the network connection, and sends the first packet to a corresponding target line card.
In step 503, the target line card establishes a mapping relationship between the target ONU device and the network connection on the target line card according to the first packet.
Each line card further includes one or more PON ports, where the location information includes at least an ID number of the target ONU device, a line card slot number of the target line card corresponding to the target ONU device, and a port number of the PON port corresponding to the target ONU device. The line card slot number is used for describing which line card the ONU equipment hangs on to distinguish different line cards, the PON port number is used for describing which PON port the ONU equipment hangs on to distinguish the PON port which belongs to the same line card, and the ID number of the ONU equipment is used for distinguishing specific ONU equipment to distinguish the ONU equipment which belongs to the same OLT equipment or the same PON port. And obtaining a corresponding target line card according to the line card slot number.
The purpose of the reassembling is to carry a flag number of the network connection in the first packet for establishing a mapping relationship, so that any assembling mode capable of assembling the flag number into the packet should be included in the protection scope of the present invention, for example, the downlink message in the first packet and the position information of the ONU device are taken out, and the first packet is obtained by assembling the flag number corresponding to the network connection, the position information of the ONU device and the downlink message.
Because the process of sending the first message to the target line card is separated from the protocol of the network connection, the first message contains the mark number of the network connection and the position information of the ONU equipment, and does not need to contain the protocol header of the network connection, and the first message also comprises the downlink message to be issued corresponding to the scene when the downlink message is also used for message issuing.
The mapping relationship may be represented as a correspondence relationship between the sign number of the network connection and the location information of the target ONU device, or may be represented as a correspondence relationship between the sign number and part of the information in the location information, such as a correspondence relationship between the sign number and an ID number of the ONU device.
The ID number of the ONU device should have uniqueness, the ID number of the ONU device hung under each OLT device has global uniqueness, the ID number of the ONU device hung under each line card has global uniqueness, or the ID number of the ONU device hung under each PON port has global uniqueness, and the mapping relationship has different manifestations according to different situations.
For example, in an alternative embodiment, a mapping table is established on each line card, and is used for storing the mapping relationship. Or a plurality of mapping tables are stored in the line card, each PON port corresponds to one mapping table, for example, in the line card, one PON port corresponds to one processing example, and one mapping table is stored in each processing example.
When a mapping table is established on each line card, for each line card, if the ID number of the ONU device hung under each line card has global uniqueness or the ID number of the ONU device hung under each OLT device has global uniqueness, the mapping relationship may be a mapping relationship between the ID number of the ONU device and a flag number of the network connection. For each line card, if the ID number of the ONU device hung under each line card does not have global uniqueness, but the ID number of the ONU device hung under each PON port has global uniqueness, the mapping relationship is a mapping relationship between the PON port number corresponding to the ONU device, the ID number of the ONU device, and the flag number of the network connection.
When each PON port corresponds to a mapping table, the mapping relationship is a mapping relationship between an ID number of the ONU device and a flag number of the network connection.
In other embodiments, the mapping relationship is stored in the master disk.
For each OLT device, if the ID number of the ONU device suspended under each OLT device has global uniqueness (where global is for all ONUs suspended under the OLT device), the mapping relationship is a mapping relationship between the ID number of the ONU device and the flag number of the network connection.
For each OLT device, if the ID number of the ONU device suspended under each OLT device does not have global uniqueness, but the ID number of the ONU device suspended under each line card has global uniqueness, the mapping relationship is a mapping relationship between the line card slot number corresponding to the ONU device, the ID number of the ONU device, and the flag number of the network connection.
For each OLT device, if the ID number of the ONU device suspended under each OLT device does not have global uniqueness, and the ID number of the ONU device suspended under each line card does not have global uniqueness, and the ID number of the ONU device suspended under each PON port has global uniqueness, the mapping relationship is a mapping relationship between the line card slot number corresponding to the ONU device, the PON port number corresponding to the ONU device, the ID number of the ONU device, and the flag number of the network connection.
As an optional implementation manner, the target line card establishes, on the target line card, a mapping relationship between the target ONU device and the network connection according to the first packet, as shown in fig. 5, and specifically includes:
In step 601, the target line card parses the first packet, and obtains the identifier of the network connection and the location information of the target ONU device from the first packet.
In step 602, according to the location information of the target ONU device, the device number of the target ONU device is found.
In step 603, a mapping relationship between the device number of the target ONU device and the flag number of the network connection is established on the target line card.
In practical use, the downstream message further carries a downstream message for being sent to the ONU device, where the downstream message is reassembled and carried into the first message, and in combination with the embodiment of the present invention, as shown in fig. 6, the relevant steps in the embodiment are further fused to perform relatively complete logic display:
In step 604, the target line card further parses the first message to obtain a downlink message sent by the cloud controller.
In step 605, a corresponding target PON port is found according to the location information of the target ONU device, and the downstream message is forwarded to the target ONU device through the target PON port.
In combination with the foregoing embodiment, the present embodiment further defines forwarding of an upstream message, and provides a preferred embodiment, that is, the OLT device directs forwarding of an upstream message of an ONU device according to the mapping relationship, as shown in fig. 7, specifically including:
In step 701, the line card receives the uplink message, and searches for a flag number corresponding to network connection from the mapping relationship according to the ONU device.
In step 702, the line card generates a second message according to the uplink message and the flag number, and forwards the second message to the master control disk.
In step 703, the master control disc parses the second message, obtains the flag from the second message, and generates an uplink message according to the uplink message in the second message.
In step 704, the master control disc forwards the uplink message to the corresponding cloud controller through the network connection corresponding to the flag.
When a mapping table is established on each line card, the mark number can be directly obtained by inquiring the mapping table.
When a plurality of mapping tables are stored in the line card, and each PON port corresponds to one mapping table, the line card receives the uplink message, and searches, according to the ONU device, a flag number corresponding to network connection from the mapping relationship, including:
the line card acquires the position information of the ONU equipment and a PON port used when the uplink message is received.
And finding out the mark number of the network connection corresponding to the ONU equipment in the mapping relation corresponding to the PON port.
Because the OLT device is connected to the cloud controller through a network to perform message transmission, in an optional embodiment, the master control disc includes a connection protocol server and a processing module, where the connection protocol server is configured to perform protocol analysis on a message from the cloud controller or perform protocol encapsulation on a message to be uploaded to the cloud controller, and specifically:
After the cloud controller establishes connection with the OLT equipment, a downlink message is sent to the OLT equipment in a network connection channel, a connection protocol server analyzes the downlink message according to a network protocol to strip an outer layer network protocol, the downlink message after the outer layer network protocol is stripped is processed by a processing module, the processing module can analyze the position information (comprising a line card slot number, a PON port number and an ID of the ONU equipment) of the ONU equipment and the downlink message from the message after receiving the downlink message, a mark number of the network connection is packaged into a message head of the downlink message, the first message is reassembled into a first message, the first message is distributed to a corresponding line card according to the line card slot number and the PON port number, and the first message is sent to a corresponding line card for processing.
The embodiment also provides a specific implementation for updating the mapping relationship in the above embodiment, that is, when the OLT device senses that the management authority of the ONU device is migrated, updating the mapping relationship specifically includes:
When a line card is different from an old mapping relation according to a new mapping relation established by a latest received first message, the line card considers that the management authority of target ONU equipment is migrated, wherein the target ONU equipment is ONU equipment corresponding to the downlink message.
And the line card updates the old mapping relation into a new mapping relation so that the OLT equipment guides the forwarding of the uplink message of the ONU equipment according to the new mapping relation.
In an actual working situation, the network connection between the cloud controller and the OLT device may be interrupted, and for this situation, the invention further provides a processing method for the network connection interruption, which specifically includes:
When the first network connection between the first cloud controller and the OLT device is interrupted, the method further includes:
And selecting a second cloud controller with the least amount of ONU equipment from the plurality of cloud controllers, wherein the second cloud controller establishes second network connection with the OLT equipment.
Updating a first mapping relation between first ONU equipment and first network connection to a second mapping relation between the first ONU equipment and second network connection, wherein the first ONU equipment is managed by the first cloud controller before the first network connection is interrupted.
And the OLT equipment forwards the response message from the first ONU equipment to a second cloud controller through a second network connection according to the second mapping relation.
When the first network connection between the first cloud controller and the OLT device is interrupted, the method further includes:
And when the OLT equipment receives the message of the first ONU equipment before the first network connection is interrupted and the second network connection is not established, discarding the message.
When the cloud controller and the OLT equipment directly have network faults or the cloud controller is actively disconnected, the connection server of the OLT equipment can sense the change of the connection state because the direct connection of the cloud controller and the OLT equipment is based on a reliable communication transmission protocol, and the cloud controller mainly comprises two scenes, namely abnormal connection interruption caused by the network problems and session ending request actively initiated by the cloud controller.
The end result of the two scenarios is that the connection is unavailable and the message cannot be received and sent, after the OLT equipment senses that the connection is disconnected, the OLT equipment notifies the processing module of the master control, the processing module deletes the connection and the fd number (which can be understood as the flag number of the network connection) allocated to the network connection, notifies the fd number to the processing instance in each line card, and the processing instance cleans the responsible fd and ONU mapping table entry, if an uplink message arrives at the processing instance, the processing instance automatically discards the message. The new controller will re-establish connection with ONU, new fd will be refreshed to the list item after the new request message is issued, the uplink message can be normally sent, and the interaction of service message is resumed.
In order to improve the rate of service message interaction recovery when the network connection is interrupted, as a preferred implementation manner, a plurality of ONU devices under the same OLT device are managed by at least two different cloud controllers, and as if 2 ONU devices exist under the same OLT device, the first ONU device is managed by the first cloud controller, and the second ONU device is managed by the second cloud controller, so that when the network connection between the first cloud controller and the OLT device is disconnected, the ONU devices under the OLT device can be quickly switched to the second cloud controller to be managed.
The embodiment also provides a preferred implementation manner, which specifically includes:
Counting the times of network connection disconnection between each cloud controller and the OLT equipment in a preset period, and determining the number of ONU equipment managed by each cloud controller according to the times of network connection disconnection. When the network connection and disconnection times of the cloud controller are excessive, the number of the ONU devices managed by the cloud controller is reduced, and at least one OLT device is connected with one stable cloud controller in a network mode, wherein the stable cloud controller is the cloud controller with the network disconnection times smaller than the preset times in a preset period. Further, the number of the unstable cloud controllers connected with each OLT device is smaller than the preset number, so that when the network connection of the unstable cloud controllers is disconnected, the stable cloud controllers can rapidly manage the ONU devices under the corresponding OLT devices.
The preset period, the preset times and the preset times are obtained by comprehensive analysis of the number of ONU devices, the number of OLT devices and the number of cloud controllers according to experience or the frequency of network connection disconnection in a network by a person skilled in the art.
In the embodiments of the present invention, the first, second, etc. are not meant to be specific sequential meanings, but are merely defined for convenience in describing two or more different objects in the same class and should not be construed to further limit the meaning.
Example 3:
The invention is based on the methods described in embodiment 1 and embodiment 2, and combines specific application scenes, and the implementation process in the characteristic scene of the invention is described by means of technical expression in the relevant scenes.
Fig. 8 shows a PON application scenario, where an OLT apparatus includes a main control panel and at least one line card, where each line card includes at least one PON port.
The OLT equipment is formed by a plurality of line cards and is used for bearing business, each line card is provided with a plurality of PON ports, the PON ports are connected with optical fibers, the other sides of the optical fibers are connected with an optical splitter, the optical splitter splits a plurality of optical fibers, and the optical fibers are connected to the ONU equipment.
The method described in embodiment 1 will be specifically described in this scenario, and when described, the functions implemented by each module will be described with a cut-in view.
The main control disc of the OLT device includes a connection protocol server and a processing module, where the functions implemented by the main control disc are shown in fig. 9, and specifically include:
in step 801, after the cloud controller establishes communication with the OLT apparatus through a reliable network protocol (such as a gRPC connection based on TCP), the processing module senses that the connection is established successfully from the connection protocol server, and assigns a fd number (which may be understood as a unique flag number of the network connection in implementation 2) globally unique to the OLT apparatus to the network connection.
In step 802, after the cloud controller establishes connection with the OLT device, a session procedure with an ONU protocol is started, and a downlink message is sent to the OLT device through network connection, after the connection protocol server receives the downlink message, an outer layer network protocol is stripped according to a network protocol, the stripped message is sent to a processing module for processing, the processing module analyzes position information (including a line card slot number, a PON port number and an ID of the ONU device) of the ONU device and the downlink message from the message, encapsulates fd number into a front part of the message, reassembles the front part into a first message, and sends the first message to a corresponding line card according to the line card slot number in the position information.
In step 803, after the processing module receives the second message sent by the line card, it parses out fd number, ONU location information and downstream message in the message, obtains a corresponding cloud network connection according to the fd number, calls a sending interface of the network connection to transfer data to a connection protocol server, and sends the message to the cloud controller through a connection channel by the connection protocol server.
In order to more intuitively represent the interaction process between the connection protocol server and the processing module in the OLT apparatus, the present embodiment further provides a schematic diagram as shown in fig. 10.
The functions implemented by the line card of the OLT apparatus are shown in fig. 11, and specifically include:
in step 901, a multi-instance processing manner is adopted on the line card, each instance is responsible for a PON port, and after a message distributed by the master control disc reaches a processing instance of the corresponding line card, the processing instance parses a message (which may be understood as a first message in embodiment 1), reads a downstream message, fd number, PON port number and ONU-ID (i.e. ID of ONU device) therein.
In step 902, a mapping table entry (which may be understood as a storage structure of the mapping relationship in embodiment 2) of ONU-id and fd numbers is stored on the PON port in each processing instance, when the first packet arrives at the processing instance, the processing instance records ONU-id and fd numbers in the mapping table entry, and then sends the downstream message to the corresponding ONU device through the driving interface.
In step 903, when the ONU device sends the uplink message by driving, the processing instance reads ONU-id and corresponding PON port number of the ONU, obtains fd number in the mapping table according to ONU-id, and encapsulates the data again according to the internally defined message rule, that is, encapsulates the uplink message into a second message, and may further carry the location information of the ONU device and the fd number in the second message, and send the second message to the processing module of the master control disc.
In order to more intuitively represent the interaction process in the line card in the OLT apparatus, the present embodiment also provides a schematic diagram as shown in fig. 12.
When the cloud controller migrates the management authority of the ONU device, for example, stable connection is established between the ONU-1 and the cloud controller-1, the cloud controller-1 performs service configuration management on the ONU device, and the message is normally received and sent, because the service needs the ONU manager to change from the cloud controller-1 to the cloud controller-2, that is, the cloud controller-1 needs to cancel the management authority of the ONU-1 device, and when the cloud controller-2 increases the management authority of the ONU-2 device, the specific implementation method is as shown in fig. 13, and includes:
In step 1001, the cloud controller-1 no longer manages the ONU-1, and the message sent by the ONU-1 will not be processed.
In step 1002, the cloud controller-2 establishes a session connection with the ONU-1, and if the cloud controller-2 already has a reliable network protocol connection with the OLT device, the connection is not re-connected, otherwise a new connection needs to be established, so that the device side can sense and allocate fd-2 to the connection.
In step 1003, after the network protocol connection is established, the cloud controller-2 initiates a session with the ONU-1 through the network connection, as an optional implementation manner, under the GPON service protocol, a omci protocol session may be selected, and under the EPON service protocol, a session of another protocol, such as a oam protocol session, may be selected. The downlink message of the cloud controller is sent to the OLT equipment through network connection, a processing module of the OLT equipment marks fd-2 after receiving the downlink message to form a first message, the first message is continuously distributed to a corresponding slot line card according to the position information carried in the downlink message, the first message is processed by a processing instance of the corresponding line card, a new fd number (namely fd-2) is refreshed to ONU-id and fd mapping table items after the processing instance receives the message, and therefore updating of the ONU cloud controller belonging to ONU is completed, and meanwhile the downlink message in the downlink message is continuously sent to the ONU-1 equipment.
In step 1004, when the ONU-1 actively transmits the upstream message, the upstream message arrives at the line card through the corresponding PON port, the processing instance corresponding to the PON port on the line card performs processing, the processing instance reads the new fd number according to ONU-id, encapsulates the fd number and the upstream message into a second message, the second message may further carry the location information of the ONU-1, and sends the second message to the master control, so that the network protocol connection of the cloud controller-2 can be found according to the fd number after reaching the master control post-processing module, and the message is transmitted to the cloud controller-2 by the connection protocol server.
Repeating the steps 1001-1004 can complete the interaction of the ONU protocol messages for a plurality of times, so that the protocol session is reestablished between the cloud controller-2 and the ONU-1, and the service of the ONU-1 is managed.
In order to more intuitively represent the rights migration process of the cloud controller, the embodiment further provides a schematic diagram as shown in fig. 14.
Example 4:
After providing a method for sensing ONU device management right migration described in embodiments 1 and 2, an embodiment of the present invention further provides a system for sensing ONU device management right migration, where the system is used to implement any of the methods for sensing ONU device management right migration described in embodiments 1 and 2, as shown in fig. 15, and includes a cloud controller, an OLT device, and an ONU device.
The OLT equipment is used for establishing a mapping relation between the ONU equipment and the corresponding network connection, wherein the corresponding network connection is the network connection between the corresponding cloud controller and the OLT equipment, and the corresponding cloud controller is the cloud controller with the management right of the ONU equipment.
And the OLT equipment guides the forwarding of the uplink message of the ONU equipment according to the mapping relation so as to forward the uplink message to the corresponding cloud controller.
The OLT equipment is also used for updating the mapping relation when the management authority of the ONU equipment is perceived to be migrated, so as to guide the forwarding of the uplink message of the ONU equipment according to the updated mapping relation.
The system is suitable for OLT equipment with unified main control disc and line card resources, and the following preferred embodiments exist for OLT equipment with mutually independent main control disc and line card resources, namely when the OLT equipment further comprises the main control disc and the line card as shown in fig. 16:
the master control disc is used for receiving the downlink message from the cloud controller through the network connection, analyzing the downlink message and obtaining the position information of the target ONU equipment.
The master control disc is used for reassembling the downlink message into a first message, so that the first message carries the mark number of the network connection, and the first message is sent to the corresponding target line card.
And the target line card is used for establishing a mapping relation between the target ONU equipment and the network connection on the target line card according to the first message.
There is also a preferred embodiment in which the master disc includes a connection protocol server and a processing module, and the line card includes a plurality of PON ports, a plurality of driving modules (which may be understood as driving in embodiment 2), and a PON port processing module (which may be understood as a processing example in embodiment 2).
The connection protocol server is used for carrying out protocol analysis on the message from the cloud controller or carrying out protocol encapsulation on the message to be uploaded to the cloud controller, and specifically:
After the cloud controller establishes connection with the OLT equipment, the cloud controller sends a downlink message to the OLT equipment through network connection.
The connection protocol server is used for stripping the outer layer network protocol from the downlink message and transmitting the message stripped from the outer layer network protocol to the processing module.
The processing module is configured to parse the position information (including the line card slot number, the PON port number, and the ID of the ONU device) and the downstream message of the ONU device from the packet of the network protocol stripped from the outer layer, encapsulate the flag number of the network connection to the front part of the packet, reassemble the packet into a first packet, and distribute the first packet to the PON port processing module corresponding to the corresponding line card according to the line card slot number and the PON port number.
The PON port processing module is used for analyzing the first message, reading the position information of the ONU equipment, finding the equipment number of the ONU equipment according to the position information of the ONU equipment, and establishing a mapping relation between the equipment number of the target ONU equipment and the sign number of the network connection.
The PON port processing module is further configured to find a corresponding target PON port according to the location information of the ONU device, and forward the downstream message to the target ONU device through the target PON port.
Example 5:
Fig. 17 is a schematic diagram of an architecture of an apparatus for perceiving ONU device management rights migration according to an embodiment of the present invention. The apparatus for perceiving ONU device management right migration of this embodiment includes one or more processors 21 and a memory 22. In fig. 17, a processor 21 is taken as an example.
The processor 21 and the memory 22 may be connected by a bus or otherwise, which is illustrated in fig. 17 as a bus connection.
The memory 22 is used as a non-volatile computer readable storage medium for storing non-volatile software programs and non-volatile computer executable programs, such as the method of perceiving ONU device management right migration in embodiment 1. The processor 21 performs a method of perceiving ONU device management right migration by running non-volatile software programs and instructions stored in the memory 22.
The memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 22 may optionally include memory located remotely from processor 21, which may be connected to processor 21 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The program instructions/modules are stored in the memory 22, which when executed by the one or more processors 21, perform the methods of perceiving ONU device management right migration in embodiments 1 and 2 described above, for example, performing the steps shown in fig. 1-7, 9, 11 and 13 described above.
It should be noted that, because the content of information interaction and execution process between modules and units in the above-mentioned device and system is based on the same concept as the processing method embodiment of the present invention, specific content may be referred to the description in the method embodiment of the present invention, and will not be repeated here.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, where the storage medium may include a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk or an optical disk, and so on.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.