ONU Online Management Method, System and Readable Storage Medium
By partitioning the OLT in the ONU online management system and directly allocating the ONU license by the main OLT, the problem that OLT cannot quickly obtain the ONU license when the number of ONU is online is solved, and the effect of ONU is quickly launched is achieved.
Patent Information
- Application Number
- CN202310009101.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-04
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2043-01-04
AI Technical Summary
When there are a large number of ONUs that need to be online, OLT cannot quickly obtain the ONU license sent by the network administrator, resulting in the online process being blocked.
After the network administrator partitions all OLTs, the main OLT corresponding to the ONU that needs to be launched is compared with whether the number of ONUs that need to be launched is less than or equal to the remaining number of ONU licenses in the partition, and directly allocates the ONU license to the OLT to which the ONU that needs to be launched.
This reduces the number of OLT sends ONU license applications to network management, avoids the accumulation of large amounts of applications in the network management queue and waits for processing, and ensures that ONU can be launched quickly.
Smart Images

Figure CN116193301B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technologies, and in particular, to a method and system for ONU online management and a readable storage medium. Background Art
[0002] Currently, when an optical network unit (ONU) needs to go online, the optical line terminal (OLT) first sends an ONU online license (License) application to the network management. After the network management sends the ONU License to the OLT, the ONU can go online. However, when the number of ONUs that need to go online is large, a large number of OLTs will send ONU License applications to the network management. Since a large number of applications accumulate in the network management queue waiting for the network management to process, the OLT cannot quickly obtain the ONU License sent by the network management. Summary of the Invention
[0003] The main objective of the present invention is to provide a method and system for ONU online management and a readable storage medium, aiming to solve the problem that when the number of ONUs that need to go online is large, the OLT cannot quickly obtain the ONU License sent by the network management.
[0004] In a first aspect, the present invention provides a method for ONU online management, and the method for ONU online management includes:
[0005] When an ONU needs to go online, the master OLT corresponding to the ONU that needs to go online compares whether the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONU that needs to go online is located, where the master OLT is any OLT in a partition after the network management partitions all OLTs;
[0006] If the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONU that needs to go online is located, the master OLT allocates the required number of ONU Licenses for the ONUs that need to go online to the OLTs to which the ONUs that need to go online belong.
[0007] Optionally, after the step of the master OLT corresponding to the ONU that needs to go online comparing whether the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONU that needs to go online is located, it includes:
[0008] If the number of ONUs that need to go online is greater than the remaining number of ONU Licenses in the partition where the ONU that needs to go online is located, the master OLT subtracts the remaining number of ONU Licenses in the partition where the ONU that needs to go online is located from the number of ONUs that need to go online to obtain a first difference, and sends the first difference to the network management;
[0009] The network management compares the first difference with the total remaining ONU Licenses.
[0010] If the first difference is less than or equal to the total remaining ONU Licenses, the network management allocates the same number of ONU Licenses as the first difference to the master OLT in the partition where the ONUs to be put online are located.
[0011] Optionally, after the step where the network management compares the first difference with the total remaining ONU Licenses, the following steps are included:
[0012] If the first difference is greater than the total remaining ONU Licenses, the network management subtracts the total remaining ONU Licenses from the first difference to obtain a second difference.
[0013] The second difference is compared with the total remaining ONU Licenses in other partitions.
[0014] If the second difference is less than or equal to the total remaining ONU Licenses in other partitions, the same number of ONU Licenses as the difference is called from other partitions and allocated to the master OLT in the partition where the ONUs to be put online are located.
[0015] If the second difference is greater than the total remaining ONU Licenses in other partitions, the remaining ONU Licenses in other partitions are allocated to the master OLT in the partition where the ONUs to be put online are located, and an alarm prompt is generated.
[0016] Optionally, the ONU online management method includes:
[0017] Step S110, the network management detects whether there are partition entries in the database.
[0018] Step S111, if the detection result is that there are partition entries in the database, the network management obtains all the partition entries in the database and sends the IP list of the partition member OLTs included in each partition entry and the initial partition ONU License quantity to the corresponding master OLT, where each partition entry includes the master OLT, the initial partition ONU License quantity, and the IP list of the partition member OLTs.
[0019] Step S112, the master OLT sends the initial partition ONU License quantity to the first partition member OLT according to the IP list of the partition member OLTs.
[0020] Step S113: The first partition member OLT subtracts the number of ONU Licenses it has already allocated from the initial number of ONU Licenses in the partition to obtain the remaining number of ONU Licenses in the partition.
[0021] Step S114: Check whether the remaining number of ONU Licenses in the partition is greater than or equal to zero. If the remaining number of ONU Licenses in the partition is greater than or equal to zero, execute Step S118; if the remaining number of ONU Licenses in the partition is less than zero, execute Step S115.
[0022] Step S115: Check whether the initial number of ONU Licenses in the partition is greater than zero. If the initial number of ONU Licenses in the partition is greater than zero, execute Step S116; if the initial number of ONU Licenses in the partition is less than or equal to zero, execute Step S117.
[0023] Step S116: Determine the number of ONUs that need to be taken offline under the first partition member OLT based on the remaining number of ONU Licenses in the partition. Take offline the ONUs based on the number of ONUs that need to be taken offline, and update the number of ONU Licenses it has already allocated by the first partition member OLT to the initial number of ONU Licenses in the partition.
[0024] Step S117: Take offline all the ONUs under the first partition member OLT, and update the number of ONU Licenses it has already allocated by the first partition member OLT to zero.
[0025] Step S118: Delete the IP of the first partition member OLT from the IP list of the partition member OLTs to obtain the new IP list of the partition member OLTs. Use the new IP list of the partition member OLTs as the IP list of the partition member OLTs, and use the remaining number of ONU Licenses in the partition as the initial number of ONU Licenses in the partition. Execute the step that the master OLT sends the initial number of ONU Licenses in the partition to the first partition member OLT according to the IP list of the partition member OLTs until the IP list of the partition member OLTs is empty, to obtain the final remaining number of ONU Licenses in the partition and the number of ONU Licenses each partition member has already allocated. Among them, the final remaining number of ONU Licenses in the partition is the remaining number of ONU Licenses in the partition.
[0026] Optionally, after the step of the network management checking whether there is a partition entry in the database, it includes:
[0027] If the detection result is that there is no partition entry in the database, the network management obtains the list of all OLTs from the database.
[0028] The network management partitions all OLTs based on the list of all OLTs. Among them, OLTs in the same network segment are in the same partition.
[0029] Optionally, after the step of obtaining the final remaining number of partitioned ONU Licenses and the already allocated quantity of each partition member until the IP list of partition member OLTs is empty, it includes:
[0030] The master OLT detects whether the final remaining number of partitioned ONU Licenses is negative;
[0031] If it is negative, the master OLT sends an application to the network management for allocating the same quantity of ONU Licenses as the absolute value of the negative number;
[0032] After receiving the application sent by the master OLT, the network management detects whether the total remaining number of ONU Licenses meets the application;
[0033] If it meets the requirement, the network management allocates the same quantity of ONU Licenses as the absolute value of the negative number to the master OLT.
[0034] Optionally, the ONU online management method further includes:
[0035] The network management detects whether there is an OLT going offline or online;
[0036] When an OLT goes online, the newly online OLT sends a request to all master OLTs to apply to join the partition;
[0037] The master OLT that receives the request sends the IP of the newly online OLT to the network management, and the network management and the master OLT add the IP of the newly online OLT to the IP list of partition member OLTs;
[0038] The newly online OLT sends a request to allocate ONU Licenses to the master OLT in the partition where it is located according to the number of ONUs to go online;
[0039] After receiving the request, the master OLT executes the step of comparing whether the number of ONUs to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to go online are located by the master OLT corresponding to the ONUs to go online;
[0040] When an OLT goes offline, the master OLT and the network management delete the offline OLT from the IP list of partition member OLTs.
[0041] In a second aspect, the present invention further provides an ONU online management system. The ONU online management system includes a master OLT, which is used for:
[0042] When ONUs in the partition where the main OLT is located need to go online, compare whether the number of ONUs to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to go online are located. Herein, the main OLT is any OLT in a partition after the network management partitions all the OLTs;
[0043] If the number of ONUs to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to go online are located, allocate the number of ONU Licenses required by the ONUs to go online to the OLT to which the ONUs to go online belong.
[0044] Optionally, the main OLT is further configured to:
[0045] If the number of ONUs to go online is greater than the remaining number of ONU Licenses in the partition where the ONUs to go online are located, subtract the remaining number of ONU Licenses in the partition where the ONUs to go online are located from the number of ONUs to go online to obtain a first difference, and send the first difference to the network management;
[0046] The ONU online management system further includes a network management, which is configured to:
[0047] Receive the first difference sent by the main OLT, and compare the first difference with the total remaining number of ONU Licenses;
[0048] If the first difference is less than or equal to the total remaining number of ONU Licenses, allocate the same number of ONU Licenses as the first difference to the main OLT in the partition where the ONUs to go online are located.
[0049] In a third aspect, the present invention further provides a readable storage medium, on which an ONU online management program is stored. When the ONU online management program is executed by a processor, the steps of the above ONU online management method are implemented.
[0050] In the present invention, when an ONU needs to go online, the master OLT corresponding to the ONU that needs to go online compares whether the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONU that needs to go online is located. Herein, the master OLT is any OLT in a partition after the network management partitions all OLTs; if the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONU that needs to go online is located, then the master OLT allocates the required number of ONU Licenses for the ONUs that need to go online to the OLT to which the ONUs that need to go online belong. Through the present invention, when an ONU needs to go online, the master OLT corresponding to the ONU that needs to go online directly allocates ONU Licenses to the OLT to which the ONUs that need to go online belong, without the network management allocating ONU Licenses to the OLT. Even if there are a large number of ONUs that need to go online, the master OLT corresponding to each ONU that needs to go online allocates ONU Licenses to the OLT to which the ONUs that need to go online belong, reducing the number of ONU License applications sent by the OLT to the network management and avoiding a large number of applications piling up in the network management queue waiting for the network management to process, thus solving the problem that when there are a large number of ONUs that need to go online, the OLT cannot quickly obtain the ONU Licenses sent by the network management. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 It is a schematic flowchart of the first embodiment of the ONU online management method of the present invention;
[0052] Figure 2 It is a schematic flowchart of the second embodiment of the ONU online management method of the present invention;
[0053] Figure 3 It is a schematic flowchart of the third embodiment of the ONU online management method of the present invention;
[0054] Figure 4 It is a schematic flowchart of the fourth embodiment of the ONU online management method of the present invention;
[0055] Figure 5 It is a schematic flowchart of the fifth embodiment of the ONU online management method of the present invention;
[0056] Figure 6 It is a schematic architecture diagram of an embodiment of the ONU online management system of the present invention.
[0057] The realization, functional characteristics and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0058] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0059] In a first aspect, an embodiment of the present invention provides a method for managing the online connection of an ONU.
[0060] In one embodiment, referring to Figure 1 , Figure 1 is a schematic flowchart of the first embodiment of the ONU online connection management method of the present invention. As Figure 1 shown, the ONU online connection management method includes:
[0061] Step S10, when an ONU needs to go online, the main OLT corresponding to the ONU that needs to go online compares whether the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located, where the main OLT is any OLT in a partition after the network management partitions all OLTs;
[0062] In this embodiment, when an ONU needs to go online, first determine the OLT to which the ONU belongs, and then determine the main OLT of the partition where the ONUs that need to go online are located according to the OLT to which the ONU belongs. After determining the main OLT of the partition where the ONUs that need to go online are located, the main OLT corresponding to the ONU that needs to go online compares whether the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located. Among them, the main OLT is any OLT in a partition after the network management partitions all OLTs. It should be noted that multiple ONUs can be connected under one OLT through an optical splitter.
[0063] Step S20, if the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located, the main OLT allocates the required number of ONU Licenses for the ONUs that need to go online to the OLT to which the ONUs that need to go online belong.
[0064] In this embodiment, if the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located, the main OLT of the partition where the ONUs that need to go online are located directly allocates the required number of ONU Licenses for the ONUs that need to go online to the OLT to which the ONUs that need to go online belong. Specifically, if 5 ONUs need to go online and the OLTs to which these 5 ONUs belong are the first member OLTs in the first partition, and the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located is 10, then the main OLT in the first partition directly allocates 5 ONU Licenses to the first member OLT.
[0065] In this embodiment, when an ONU needs to go online, the master OLT corresponding to the ONU that needs to go online compares whether the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located. Herein, the master OLT is any OLT in a partition after the network management partitions all the OLTs. If the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located, the master OLT allocates the number of ONU Licenses required by the ONUs that need to go online to the OLT to which the ONUs that need to go online belong. Through this embodiment, when an ONU needs to go online, the master OLT corresponding to the ONU that needs to go online directly allocates ONU Licenses to the OLT to which the ONUs that need to go online belong, without the network management allocating ONU Licenses to the OLT. Even if there are a large number of ONUs that need to go online, the master OLT corresponding to each ONU that needs to go online allocates ONU Licenses to the OLT to which the ONUs that need to go online belong, reducing the number of ONU License applications sent by the OLT to the network management and avoiding a large number of applications piling up in the network management queue waiting for the network management to process, thus solving the problem that when there are a large number of ONUs that need to go online, the OLT cannot quickly obtain the ONU Licenses sent by the network management.
[0066] Further, in one embodiment, referring to Figure 2 , Figure 2 is a schematic flowchart of the second embodiment of the ONU online management method of the present invention. As Figure 2 shown, after step S10, it includes:
[0067] Step S30, if the number of ONUs that need to go online is greater than the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located, the master OLT subtracts the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located from the number of ONUs that need to go online to obtain a first difference, and sends the first difference to the network management;
[0068] Step S40, the network management compares the first difference with the total remaining number of ONU Licenses;
[0069] Step S50, if the first difference is less than or equal to the total remaining number of ONU Licenses, the network management allocates the same number of ONU Licenses as the first difference to the master OLT in the partition where the ONUs that need to go online are located.
[0070] In this embodiment, if the number of ONUs to be brought online is greater than the remaining number of ONU Licenses in the partition where the ONUs to be brought online are located, it means that the remaining number of ONU Licenses in the partition where the ONUs to be brought online are located is insufficient. Then, the master OLT corresponding to the ONUs to be brought online subtracts the remaining number of ONU Licenses in the partition where the ONUs to be brought online are located from the number of ONUs to be brought online. The obtained difference is denoted as the first difference, and the first difference is the number of ONU Licenses still lacking in the partition where the ONUs to be brought online are located. The master OLT corresponding to the ONUs to be brought online sends the first difference to the network management system to apply for replenishment.
[0071] After receiving the first difference sent by the master OLT corresponding to the ONUs to be brought online, the network management system compares the first difference with the total remaining number of ONU Licenses to determine whether the total remaining number of ONU Licenses at the network management system is sufficient.
[0072] If the first difference is less than or equal to the total remaining number of ONU Licenses, it means that the total remaining number of ONU Licenses at the network management system is sufficient. Then, the network management system allocates the same number of ONU Licenses as the first difference to the master OLT in the partition where the ONUs to be brought online are located.
[0073] Specifically, if the number of ONUs to be brought online is 5, and among them, 2 ONUs to be brought online belong to the second member OLT in the first partition, and the other 3 ONUs to be brought online belong to a member OLT in the second partition. The remaining number of ONU Licenses in the first partition is 0, and the remaining number of ONU Licenses in the second partition is 2. Then, the first difference calculated for the first partition is 2, and the first difference calculated for the second partition is 1. The master OLT in the first partition applies to the network management system for allocating 2 ONU Licenses, and the master OLT in the second partition applies to the network management system for allocating 1 ONU License. If the total remaining number of ONU Licenses at the network management system is 4, the network management system allocates 2 ONU Licenses to the master OLT in the first partition and 1 ONU License to the master OLT in the second partition. It is easy to think that after the network management system allocates the same number of ONU Licenses as the first difference to the master OLT in the partition where the ONUs to be brought online are located, the number of ONUs to be brought online is equal to the remaining number of ONU Licenses in the partition where the ONUs to be brought online are located.
[0074] Further, in one embodiment, referring to Figure 3 , Figure 3 is a schematic flowchart of the third embodiment of the ONU online management method of the present invention. As Figure 3As shown, after step S40, it includes:
[0075] Step S60, if the first difference is greater than the total remaining number of ONU Licenses, the network management uses the first difference minus the total remaining number of ONU Licenses to obtain a second difference;
[0076] Step S70, compare the second difference with the total remaining number of ONU Licenses in other partitions;
[0077] Step S80, if the second difference is less than or equal to the total remaining number of ONU Licenses in other partitions, call the same number of ONU Licenses from other partitions and allocate them to the master OLT in the partition where the ONUs to be brought online are located;
[0078] Step S90, if the second difference is greater than the total remaining number of ONU Licenses in other partitions, allocate the remaining number of ONU Licenses in other partitions to the master OLT in the partition where the ONUs to be brought online are located, and generate an alarm prompt.
[0079] In this embodiment, if the first difference calculated by the first partition is 10 and the total remaining number of ONU Licenses at the network management is 3, it means that the total remaining number of ONU Licenses at the network management is insufficient. Then the network management uses the first difference calculated by the first partition minus the total remaining number of ONU Licenses, and the obtained difference is recorded as the second difference. The second difference is the number of ONU Licenses that the network management still needs to allocate to the master OLT of the first partition when the total remaining number of ONU Licenses at the network management is 0.
[0080] When the total remaining number of ONU Licenses at the network management is insufficient, the network management compares the second difference with the total remaining number of ONU Licenses in other partitions. If the total remaining number of ONU Licenses in other partitions is 9, and the second difference 7 is less than the total remaining number of ONU Licenses in other partitions 9, then the network management calls 7 ONU Licenses from other partitions and allocates them to the master OLT of the first partition. It is easy to think that after the network management calls 7 ONU Licenses from other partitions and allocates them to the master OLT of the first partition, the remaining number of ONU Licenses in the first partition is equal to the number of ONUs to be brought online.
[0081] If the sum of the remaining ONU License quantities in other partitions is 6, and the second difference 7 is greater than the sum of the remaining ONU License quantities in other partitions, which is 6, the network management system will allocate the 6 ONU Licenses in other partitions to the master OLT in the first partition and generate an alarm prompt to remind the user that the total number of ONU Licenses at the network management system is insufficient.
[0082] Further, in one embodiment, referring to Figure 4 , Figure 4 is a schematic flowchart of the fourth embodiment of the ONU online management method of the present invention. As Figure 4 shown, the ONU online management method includes:
[0083] Step S110, the network management system detects whether there is a partition entry in the database;
[0084] Step S111, if the detection result is that there is a partition entry in the database, the network management system obtains all the partition entries in the database and sends the IP list of the partition member OLTs included in each partition entry and the initial partition ONU License quantity to the corresponding master OLT, where each partition entry includes the master OLT, the initial partition ONU License quantity, and the IP list of the partition member OLTs;
[0085] Step S112, the master OLT sends the initial partition ONU License quantity to the first partition member OLT according to the IP list of the partition member OLTs;
[0086] Step S113, the first partition member OLT subtracts its own allocated quantity from the initial partition ONU License quantity to obtain the remaining partition ONU License quantity;
[0087] Step S114, detect whether the remaining partition ONU License quantity is greater than or equal to zero. If the remaining partition ONU License quantity is greater than or equal to zero, execute Step S118. If the remaining partition ONU License quantity is less than zero, execute Step S115;
[0088] Step S115, detect whether the initial partition ONU License quantity is greater than zero. If the initial partition ONU License quantity is greater than zero, execute Step S116. If the initial partition ONU License quantity is less than or equal to zero, execute Step S117;
[0089] Step S116: Determine the number of ONUs to be taken offline under the first partition member OLT based on the remaining quantity of the partition ONU License. Take offline the ONUs based on the number of ONUs to be taken offline, and update the self-allocated quantity of the first partition member OLT to the initial partition ONU License quantity.
[0090] Step S117: Take offline all the ONUs under the first partition member OLT, and update the self-allocated quantity of the first partition member OLT to zero.
[0091] Step S118: Delete the IP of the first partition member OLT from the IP list of the partition member OLTs to obtain a new IP list of the partition member OLTs. Use the new IP list of the partition member OLTs as the IP list of the partition member OLTs, and use the remaining quantity of the partition ONU License as the initial partition ONU License quantity. Execute the step of the master OLT sending the initial partition ONU License quantity to the first partition member OLT according to the IP list of the partition member OLTs until the IP list of the partition member OLTs is empty, to obtain the final remaining quantity of the partition ONU License and the self-allocated quantity of each partition member, where the final remaining quantity of the partition ONU License is the remaining quantity of the ONU License of the partition.
[0092] In this embodiment, the network management checks whether there are partition entries in the database. If the detection result is that there are partition entries in the database, it means that all OLTs have been partitioned. Then the network management obtains all the partition entries in the database and sends the IP list of the partition member OLTs and the initial partition ONU License quantity included in each partition entry to the corresponding master OLT, where each partition entry includes the master OLT, the initial partition ONU License quantity, and the IP list of the partition member OLTs. Specifically, if the network management obtains 3 partition entries from the database, it sends the IP list of the partition member OLTs and the initial partition ONU License quantity included in the first partition entry to the master OLT included in the first partition entry; sends the IP list of the partition member OLTs and the initial partition ONU License quantity included in the second partition entry to the master OLT included in the second partition entry; and sends the IP list of the partition member OLTs and the initial partition ONU License quantity included in the third partition entry to the master OLT included in the third partition entry.
[0093] After the master OLTs of all partitions receive the IP list of the OLTs in the partition members sent by the network management and the initial number of ONU licenses in the partitions, each master OLT sends the initial number of ONU licenses in the partitions to the first OLT in the partition members according to the IP list of its own partition members. Among them, if the initial number of ONU licenses in the first partition obtained by the network management from the database is 15, then the initial number of ONU licenses in the first partition is 15.
[0094] Taking the first partition as an example for illustration, the master OLT in the first partition sends the initial number of ONU licenses in the first partition to the first OLT in the first partition according to the IP list of the OLTs in the first partition members. After the first OLT_1 in the first partition receives the initial number of ONU licenses in the first partition, it subtracts the number of licenses already allocated by itself from the initial number of ONU licenses to obtain the remaining number of ONU licenses in the partition. Specifically, if the initial number of ONU licenses in the first partition is 15 and the number of ONU licenses already allocated by the first OLT_1 is 5, then subtracting the number of licenses already allocated by itself, which is 5, from the initial number of ONU licenses, which is 15, the obtained difference of 10 is the remaining number of ONU licenses in the partition. That is, the remaining number of ONU licenses in the first partition is 10. Among them, the number of licenses already allocated by the first partition member itself is the number of ONU licenses already allocated by the first partition member, and the number of ONU licenses already allocated by the first partition member corresponds one-to-one with the number of ONUs that have gone online under the first partition member.
[0095] Because the remaining number of ONU licenses in the first partition is 10, which is greater than 0, step S118 is executed, that is, the IP of the first OLT_1 in the partition members of the first partition is deleted from the IP list of the OLTs in the partition members of the first partition to obtain a new IP list of the OLTs in the partition members. It is easy to think that after deleting the IP of the first OLT_1, the second OLT_2 in the partition members becomes the first OLT in the partition members. Then, using the new IP list of the OLTs in the partition members as the IP list of the OLTs in the partition members and using the remaining number of ONU licenses in the partition, which is 10, as the initial number of ONU licenses in the partition, the step of the master OLT sending the initial number of ONU licenses in the partition to the first OLT in the partition members according to the IP list of the OLTs in the partition members is executed, that is, return to execute step S112. That is, the master OLT in the first partition sends the initial number of ONU licenses in the first partition, which is 10, to the first OLT_2 in the first partition according to the IP list of the OLTs in the partition members.
[0096] After the first partition member OLT_2 receives the initial partition ONU License quantity of the first partition, it subtracts its own allocated quantity from the initial partition ONU License quantity to obtain the remaining quantity of the partition ONU License. Specifically, if the allocated ONU License quantity of the first partition member OLT_2 is 6, then it subtracts its own allocated quantity 6 from the initial partition ONU License quantity 10, and the obtained difference is the remaining quantity of the partition ONU License. Among them, the remaining quantity of the partition ONU License in the first partition is 4.
[0097] Because the remaining quantity of the partition ONU License in the first partition is 4 at this time, which is greater than 0, step S118 is executed, that is, the IP of the first partition member OLT_2 is deleted from the IP list of the partition members OLT in the first partition to obtain a new IP list of the partition members OLT. It is easy to think that after deleting the IP of the first partition member OLT_2, the third partition member OLT_3 becomes the first partition member. Then, using the new IP list of the partition members OLT as the IP list of the partition members OLT and the remaining quantity 4 of the partition ONU License as the initial partition ONU License quantity, the step of the master OLT sending the initial partition ONU License quantity to the first partition member OLT according to the IP list of the partition members OLT is executed, that is, return to execute step S112. That is, the master OLT in the first partition sends the initial partition ONU License quantity 4 of the first partition to the first partition member OLT_3 in the first partition.
[0098] After the first partition member OLT_3 receives the initial partition ONU License quantity of the first partition, it subtracts its own allocated quantity from the initial partition ONU License quantity to obtain the remaining quantity of the partition ONU License. Specifically, if the allocated ONU License quantity of the first partition member OLT_3 is 5, then it subtracts the own allocated quantity 5 of the first partition member OLT_3 from the initial partition ONU License quantity 4 of the first partition to obtain the remaining quantity of the partition ONU License -1.
[0099] At this time, the remaining quantity of the partition ONU License minus 1 is less than 0, so step S115 is executed to detect whether the initial partition ONU License quantity is greater than zero. Also, since the initial partition ONU License quantity of the first partition is 4 which is greater than zero, step S116 is executed. Based on the remaining quantity of the partition ONU License minus 1, it is determined that 1 ONU needs to be taken offline under the first partition member OLT_3. Then, one of the online ONUs under the first partition member OLT_3 is taken offline, and the self-allocated quantity of the first partition member OLT_3 is updated to 4. Further, after one of the online ONUs under the first partition member OLT_3 is taken offline, when the taken-offline ONU needs to go online again, step S10 is returned for execution.
[0100] After updating the self-allocated quantity of the first partition member OLT_3 to 4, the IP of the first partition member OLT_3 is deleted from the IP list of the partition members OLT of the first partition, and a new IP list of the partition members OLT is obtained. It is easy to think that after deleting the IP of the first partition member OLT_3, the fourth partition member OLT_4 becomes the first partition member. Then, using the new IP list of the partition members OLT as the IP list of the partition members OLT and using the remaining quantity of the partition ONU License minus 1 as the initial partition ONU License quantity, the main OLT executes the step of sending the initial partition ONU License quantity to the first partition member OLT according to the IP list of the partition members OLT, that is, returns to execute step S112. That is, the main OLT in the first partition sends the initial partition ONU License quantity minus 1 of the first partition to the first partition member OLT_4 in the first partition according to the IP list of the partition members OLT.
[0101] After the first partition member OLT_4 receives the initial partition ONU License quantity of the first partition, it subtracts its own allocated quantity from the initial partition ONU License quantity to obtain the remaining quantity of the partition ONU License. Specifically, if the allocated ONU License quantity of the first partition member OLT_4 is 2, then the initial partition ONU License quantity minus 1 of the first partition is subtracted by the self-allocated quantity 2 of the first partition member OLT_4 to obtain the remaining quantity of the partition ONU License minus 3.
[0102] At this time, the remaining quantity of the partition ONU License -3 is less than 0, so step S115 is executed to detect whether the initial partition ONU License quantity is greater than zero. Also, since the initial partition ONU License quantity -1 is less than zero, step S117 is executed to take all the ONUs that have gone online under the first partition member OLT_4 offline, and update the quantity allocated to itself of the first partition member OLT_4 to 0.
[0103] After updating the quantity allocated to itself of the first partition member OLT_4 to 0, delete the IP of the first partition member OLT_4 from the IP list of the OLTs of the partition members in the first partition.
[0104] After deleting the IP of the first partition member OLT_4 from the IP list of the OLTs of the partition members in the first partition, if the IP list of the OLTs of the partition members is empty, obtain the final remaining quantity of the partition ONU License -3 and the quantity allocated to itself of each partition member. Among them, the final remaining quantity of the partition ONU License -3 is the remaining quantity of the ONU License in the first partition. The quantity allocated to itself of the first partition member OLT_1 in the first partition is 5, the quantity allocated to itself of the second partition member OLT_2 is 6, the quantity allocated to itself of the third partition member OLT_3 is 4, and the quantity allocated to itself of the fourth partition member OLT_4 is 0.
[0105] After deleting the IP of the first partition member OLT, i.e., OLT_4, from the IP list of the partition members of the first partition, if the IP list of the partition members of the OLT is not empty, continue to use the new IP list of the partition members of the OLT as the IP list of the partition members of the OLT, and use the remaining quantity of the partition ONU License as the initial quantity of the partition ONU License. Execute the step of the master OLT sending the initial quantity of the partition ONU License to the first partition member OLT according to the IP list of the partition members of the OLT, that is, return to execute step S112 until the IP list of the partition members of the OLT is empty. Preferably, the master OLT is used as the last member OLT. In this way, whether using the initial quantity of the partition ONU License minus the quantity already allocated by the first partition member OLT itself to obtain the remaining quantity of the partition ONU License, or using the quantity already allocated by the first partition member OLT itself minus the initial quantity of the partition ONU License to obtain the remaining quantity of the partition ONU License, since the last partition member OLT is the master OLT, the master OLT can directly know the remaining quantity of the partition ONU License of this partition without the need for other member OLTs to send it again. After the master OLT obtains the ONU License from the network management, the master OLT can directly allocate it to itself, reducing the interaction between OLT devices and improving the efficiency.
[0106] Further, after receiving the initial quantity of the partition ONU License of the first partition, the partition member OLT_1, the partition member OLT_2, the partition member OLT_3, and the partition member OLT_4 will all save the IP of the master OLT for subsequent requests to send the allocated ONU License to the master OLT.
[0107] Further, after the master OLT sends the initial partition ONU License quantity to the first partition member, if the OLT of the first partition member is online, the OLT of the first partition member subtracts its own allocated quantity from the initial partition ONU License quantity to obtain the remaining quantity of the partition ONU License, and then replies the remaining quantity of the partition ONU License to the master OLT. If the master OLT does not receive the remaining quantity of the partition ONU License replied by the OLT of the first partition member, it determines that the OLT of the first partition member is offline. After obtaining the final remaining quantity of the partition ONU License, the master OLT updates the ONU License status table based on the own allocated quantity of each partition member and the IP of the online OLTs of the partition members. The ONU License status table includes the IP list of the OLTs of the partition members and the own allocated quantity of the OLTs of the partition members. That is, the IP of the offline OLT of the partition member is deleted from the IP list of the OLTs of the partition members included in the ONU License status table. And the master OLT sends the remaining quantity of the partition ONU License and the IPs of the online OLTs of the partition members to the network management for the network management to update the partition entries. It should be noted that if the network management does not allocate ONU License to the first partition again, the initial partition ONU License quantity of the first partition remains unchanged.
[0108] Further, in one embodiment, after the step of the network management detecting whether there is a partition entry in the database, it includes:
[0109] If the detection result is that there is no partition entry in the database, the network management obtains the list of all OLTs from the database;
[0110] The network management partitions all OLTs based on the list of all OLTs, where the OLTs in the same network segment are in the same partition.
[0111] In this embodiment, if the network management detects that there is no partition entry in the database, the network management obtains the list of all OLTs from the database. Then, it sends a partition request to any online OLT. This OLT sends a broadcast packet to the network segment where it is located, collects the IP list of OLTs in the network segment, and reports it to the network management. The network management generates a partition entry based on the IP list of OLTs in the same network segment sent by this OLT. This OLT becomes the master OLT of this partition. The content of the partition entry includes the master OLT, the initial number of ONU Licenses in the partition, and the IP list of OLTs in the partition members. The initial value of the initial number of ONU Licenses in the partition is 0, that is, the network management has not allocated ONU Licenses to the partition yet, so the initial value of the initial number of ONU Licenses in the partition is 0. Then, the network management filters out the OLTs corresponding to the IP list of OLTs sent by this OLT from the list of all OLTs, and continues to send a partition request to an online OLT, and so on, until all OLTs are partitioned.
[0112] Further, in one embodiment, after the step of until the IP list of OLTs in the partition members is empty, obtaining the final remaining number of ONU Licenses in the partition and the number of its own allocated licenses for each partition member, it includes:
[0113] The master OLT detects whether the final remaining number of ONU Licenses in the partition is negative;
[0114] If it is negative, the master OLT sends an application to the network management to allocate the same number of ONU Licenses as the absolute value of the negative number;
[0115] After receiving the application sent by the master OLT, the network management detects whether the total remaining number of ONU Licenses meets the application;
[0116] If it meets, the network management allocates the same number of ONU Licenses as the absolute value of the negative number to the master OLT.
[0117] In this embodiment, after obtaining the final remaining number of ONU Licenses in the partition and the number of its own allocated licenses for each partition member, the master OLT detects whether the final remaining number of ONU Licenses in the partition obtained is positive. If it is positive, it means that the number of ONU Licenses in this partition is sufficient, and no processing is performed. If it is negative, it means that the number of ONU Licenses in this partition is insufficient.
[0118] Taking the remaining quantity of the final partition ONU License as -5 as an example, the master OLT sends a request to the network management to allocate 5 ONU Licenses. After the network management receives the application sent by the master OLT, it detects whether the total remaining quantity of ONU Licenses is greater than or equal to 5. If the total remaining quantity of ONU Licenses is greater than or equal to 5, then the total remaining quantity of ONU Licenses meets the application sent by the master OLT, and the network management allocates 5 ONU Licenses to the master OLT. If the total remaining quantity of ONU Licenses is less than 5, then all ONU Licenses are allocated to the master OLT. Specifically, if the total remaining quantity of ONU Licenses is 3, after allocating 3 ONU Licenses to the master OLT, no other processing is performed.
[0119] Further, in one embodiment, referring to Figure 5 , Figure 5 is a schematic flow chart of the fifth embodiment of the ONU online management method of the present invention. As Figure 5 shown, the ONU online management method further includes:
[0120] Step S210, the network management detects whether there is an OLT that goes offline or online;
[0121] Step S211, when an OLT goes online, the newly online OLT sends a request to join the partition to all master OLTs;
[0122] Step S212, the master OLT that receives the request sends the IP of the newly online OLT to the network management, and the network management and the master OLT add the IP of the newly online OLT to the IP list of the partition member OLTs;
[0123] Step S213, the newly online OLT sends a request to allocate ONU Licenses to the master OLT in the partition according to the number of ONUs to be online;
[0124] Step S214, after the master OLT receives the request, it executes the step of comparing whether the number of ONUs to be online by the master OLT corresponding to the ONUs to be online is less than or equal to the remaining quantity of ONU Licenses in the partition where the ONUs to be online are located;
[0125] Step S215, when an OLT goes offline, the master OLT and the network management delete the offline OLT from the IP list of the partition member OLTs.
[0126] In this embodiment, the network management system detects whether there is an OLT going offline or online. If the network management system detects that an OLT goes online, the network management system sends the IP addresses of all the primary OLTs to the newly online OLT. The newly online OLT sends a request to join the partition to all the primary OLTs in a unicast manner, or the newly online OLT sends a request to join the partition to all the primary OLTs in a multicast (groupcast) manner.
[0127] The primary OLTs in a different network segment from the newly online OLT cannot receive the request sent by the new OLT. Therefore, the primary OLTs that receive the request and the newly online OLT are in the same network segment, and the OLTs in the same network segment belong to the same partition. So, the primary OLT that receives the request adds the IP address of the newly online OLT to the IP list of the OLTs in the partition member, and updates the ONU License status table. The ONU License status table includes the IP list of the OLTs in the partition member and the number of ONU Licenses already allocated by the OLTs in the partition member. At the same time, the primary OLT that receives the request also sends the IP address of the newly online OLT to the network management system. The network management system also needs to add the IP address of the newly online OLT to the IP list of the OLTs in the partition member and update the partition entry. The partition entry includes the primary OLT, the initial number of ONU Licenses in the partition, and the IP list of the OLTs in the partition member.
[0128] After the primary OLT that receives the request and the network management system add the IP address of the newly online OLT to the IP list of the OLTs in the partition member, the newly online OLT sends a request to allocate ONU Licenses to the primary OLT in the partition according to the number of ONUs to be online. After receiving the request sent by the new OLT, the primary OLT executes the step of comparing whether the number of ONUs to be online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to be online are located by the primary OLT corresponding to the ONUs to be online, so as to allow the ONUs to be online.
[0129] When an OLT goes offline, the primary OLT deletes the offline OLT from the IP list of the OLTs in the partition member and updates the ONU License status table. The network management system deletes the offline OLT from the IP list of the OLTs in the partition member and updates the partition entry, so that the ONU Licenses allocated to this OLT are in an idle state and can be called, thereby improving the utilization rate of ONU Licenses.
[0130] In a second aspect, the embodiment of the present invention further provides an ONU online management system.
[0131] In one embodiment, refer to Figure 6 , Figure 6 which is a schematic structural diagram of an embodiment of the ONU online management system of the present invention. As Figure 6As shown, the ONU online management system includes: a master OLT, which is used for:
[0132] The master OLT is used to compare whether the number of ONUs to be online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to be online are located when there are ONUs to be online in the partition where the master OLT is located. Here, the master OLT is any OLT in a partition after the network management divides all OLTs into partitions.
[0133] The master OLT is further used to allocate the required number of ONU Licenses for the ONUs to be online to the OLT to which the ONUs to be online belong if the number of ONUs to be online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to be online are located.
[0134] Further, in one embodiment, the master OLT is further used for:
[0135] If the number of ONUs to be online is greater than the remaining number of ONU Licenses in the partition where the ONUs to be online are located, subtract the remaining number of ONU Licenses in the partition where the ONUs to be online are located from the number of ONUs to be online to obtain a first difference, and send the first difference to the network management.
[0136] The ONU online management system further includes a network management, which is used for:
[0137] Receive the first difference sent by the master OLT and compare the first difference with the total remaining number of ONU Licenses.
[0138] If the first difference is less than or equal to the total remaining number of ONU Licenses, allocate the same number of ONU Licenses as the first difference to the master OLT in the partition where the ONUs to be online are located.
[0139] Further, in one embodiment, the network management is used for:
[0140] If the first difference is greater than the total remaining number of ONU Licenses, subtract the total remaining number of ONU Licenses from the first difference to obtain a second difference.
[0141] Compare the second difference with the total remaining number of ONU Licenses in other partitions.
[0142] If the second difference is less than or equal to the total remaining number of ONU Licenses in other partitions, call the same number of ONU Licenses as the difference from other partitions and allocate them to the master OLT in the partition where the ONUs to be online are located.
[0143] If the second difference is greater than the sum of the remaining ONU License quantities in other partitions, then allocate the remaining ONU License quantities in other partitions to the master OLT in the partition where the ONUs to be put online are located, and generate an alarm prompt.
[0144] Further, in an embodiment, the network management is used for:
[0145] Detect whether there are partition entries in the database;
[0146] If the detection result is that there are partition entries in the database, then obtain all the partition entries in the database and send the IP list of the partition member OLTs included in each partition entry and the initial partition ONU License quantity to the corresponding master OLT, where each partition entry includes the master OLT, the initial partition ONU License quantity, and the IP list of the partition member OLTs;
[0147] The master OLT is further used for:
[0148] Send the initial partition ONU License quantity to the first partition member OLT according to the IP list of the partition member OLTs;
[0149] The ONU online management system further includes the first partition member OLT, which is used for:
[0150] Receive the initial partition ONU License quantity sent by the master OLT;
[0151] Subtract its own allocated quantity from the initial partition ONU License quantity to obtain the remaining partition ONU License quantity;
[0152] Detect whether the remaining partition ONU License quantity is greater than or equal to zero;
[0153] If the remaining partition ONU License quantity is greater than or equal to zero, then delete its own IP from the IP list of the partition member OLTs to obtain the new IP list of the partition member OLTs, use the new IP list of the partition member OLTs as the IP list of the partition member OLTs, use the remaining partition ONU License quantity as the initial partition ONU License quantity, and execute the step of receiving the initial partition ONU License quantity sent by the master OLT until the IP list of the partition member OLTs is empty, to obtain the final remaining partition ONU License quantity and the own allocated quantity of each partition member, where the final remaining partition ONU License quantity is the remaining ONU License quantity of the partition;
[0154] If the remaining quantity of the partition ONU License is less than zero, then detect whether the initial quantity of the partition ONU License is greater than zero;
[0155] If the initial quantity of the partition ONU License is greater than zero, then determine the quantity of ONUs to be taken offline based on the remaining quantity of the partition ONU License, take offline the ONUs based on the quantity of ONUs to be taken offline, and update the quantity already allocated by itself to the initial quantity of the partition ONU License;
[0156] If the initial quantity of the partition ONU License is less than or equal to zero, then take offline all the online ONUs and update the quantity already allocated by itself to zero;
[0157] Delete its own IP from the IP list of the partition member OLTs to obtain a new IP list of the partition member OLTs, use the new IP list of the partition member OLTs as the IP list of the partition member OLTs, use the remaining quantity of the partition ONU License as the initial quantity of the partition ONU License, and execute the step of receiving the initial quantity of the partition ONU License sent by the master OLT until the IP list of the partition member OLTs is empty, to obtain the final remaining quantity of the partition ONU License and the quantity already allocated by each partition member, where the final remaining quantity of the partition ONU License is the remaining quantity of the ONU License of the partition.
[0158] Further, in one embodiment, the network management is used for:
[0159] If the detection result is that there is no partition entry in the database, then obtain the list of all OLTs from the database;
[0160] Partition all the OLTs based on the list of all OLTs, where the OLTs in the same network segment are in the same partition.
[0161] Further, in one embodiment, the master OLT is used for:
[0162] Detect whether the final remaining quantity of the partition ONU License is negative;
[0163] If it is negative, then send an application to the network management for allocating the same quantity of ONU License as the absolute value of the negative number;
[0164] The network management is used for, after receiving the application sent by the master OLT, detecting whether the total remaining quantity of the ONU License meets the application;
[0165] If it meets the requirement, then allocate the same quantity of ONU License as the absolute value of the negative number to the master OLT.
[0166] Further, in one embodiment, the network management system is configured to:
[0167] Detect whether there is an OLT going offline or online;
[0168] The ONU online management system further includes a newly online OLT, which is configured to:
[0169] When there is a newly online OLT, send a request to join the partition to all master OLTs;
[0170] The master OLT is configured to, after receiving the request, send the IP of the newly online OLT to the network management system;
[0171] The network management system and the master OLT are configured to add the IP of the newly online OLT to the IP list of the OLTs in the partition members;
[0172] The newly online OLT is configured to send a request for allocating ONU licenses to the master OLT in its partition according to the number of ONUs to be online;
[0173] The master OLT is configured to, after receiving the request, perform the step of comparing whether the number of ONUs to be online is less than or equal to the remaining number of ONU licenses in the partition where the ONUs to be online are located when there are ONUs to be online in the partition where the master OLT is located;
[0174] The network management system and the master OLT are further configured to delete the offline OLT from the IP list of the OLTs in the partition members when an OLT goes offline.
[0175] Among them, the function implementation of each module in the above ONU online management system corresponds to each step in the above ONU online management method embodiment, and its function and implementation process will not be elaborated here one by one.
[0176] In a third aspect, an embodiment of the present invention further provides a readable storage medium.
[0177] An ONU online management program is stored on the readable storage medium of the present invention. When the ONU online management program is executed by a processor, the steps of the ONU online management method as described above are implemented.
[0178] Among them, the method implemented when the ONU online management program is executed can refer to each embodiment of the ONU online management method of the present invention, which will not be elaborated here.
[0179] It should be noted that, in this article, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent in such a process, method, article or system. Without further limitations, an element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or system including that element.
[0180] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0181] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above and includes several instructions for causing a terminal device to execute the methods described in various embodiments of the present invention.
[0182] The above are only the preferred embodiments of the present invention and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be equally included in the patent protection scope of the present invention.
Claims
1. An ONU online management method, characterized in that, the ONU online management method includes: When an ONU needs to go online, the main OLT corresponding to the ONU that needs to go online compares whether the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located. Among them, the main OLT is any OLT in a partition after the network management divides all OLTs into partitions; If the number of ONUs that need to go online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located, the main OLT allocates the number of ONU Licenses required by the ONUs that need to go online to the OLT to which the ONUs that need to go online belong; If the number of ONUs that need to go online is greater than the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located, the main OLT subtracts the remaining number of ONU Licenses in the partition where the ONUs that need to go online are located from the number of ONUs that need to go online to obtain a first difference, and sends the first difference to the network management; The network management compares the first difference with the total remaining number of ONU Licenses; If the first difference is less than or equal to the total remaining number of ONU Licenses, the network management allocates the same number of ONU Licenses as the first difference to the main OLT in the partition where the ONUs that need to go online are located.
2. The ONU online management method according to claim 1, characterized in that, after the step of the network management comparing the first difference with the total remaining number of ONU Licenses, it includes: If the first difference is greater than the total remaining number of ONU Licenses, the network management subtracts the total remaining number of ONU Licenses from the first difference to obtain a second difference; Compare the second difference with the total remaining number of ONU Licenses in other partitions; If the second difference is less than or equal to the total remaining number of ONU Licenses in other partitions, call the same number of ONU Licenses as the second difference from other partitions and allocate them to the main OLT in the partition where the ONUs that need to go online are located; If the second difference is greater than the total remaining number of ONU Licenses in other partitions, allocate the remaining number of ONU Licenses in other partitions to the main OLT in the partition where the ONUs that need to go online are located, and generate an alarm prompt.
3. The ONU online management method according to claim 1, characterized in that, the ONU online management method includes: Step S110, the network management detects whether there is a partition entry in the database; Step S111, if the detection result is that there are partition entries in the database, the network management system obtains all the partition entries in the database and sends the IP list of the OLTs that are partition members included in each partition entry and the initial number of ONU licenses for the partition to the corresponding master OLT, where each partition entry includes the master OLT, the initial number of ONU licenses for the partition, and the IP list of the OLTs that are partition members; Step S112, the master OLT sends the initial number of ONU licenses for the partition to the first OLT that is a partition member according to the IP list of the OLTs that are partition members; Step S113, the first OLT that is a partition member subtracts its own allocated quantity from the initial number of ONU licenses for the partition to obtain the remaining quantity of ONU licenses for the partition; Step S114, detect whether the remaining quantity of ONU licenses for the partition is greater than or equal to zero. If the remaining quantity of ONU licenses for the partition is greater than or equal to zero, execute Step S118. If the remaining quantity of ONU licenses for the partition is less than zero, execute Step S115; Step S115, detect whether the initial number of ONU licenses for the partition is greater than zero. If the initial number of ONU licenses for the partition is greater than zero, execute Step S116. If the initial number of ONU licenses for the partition is less than or equal to zero, execute Step S117; Step S116, determine the number of ONUs that need to be taken offline under the first OLT that is a partition member based on the remaining quantity of ONU licenses for the partition, take offline the ONUs based on the number of ONUs that need to be taken offline, and update its own allocated quantity of the first OLT that is a partition member to the initial number of ONU licenses for the partition; Step S117, take offline all the ONUs under the first OLT that is a partition member, and update its own allocated quantity of the first OLT that is a partition member to zero; Step S118, delete the IP of the first OLT that is a partition member from the IP list of the OLTs that are partition members to obtain a new IP list of the OLTs that are partition members, use the new IP list of the OLTs that are partition members as the IP list of the OLTs that are partition members, use the remaining quantity of ONU licenses for the partition as the initial number of ONU licenses for the partition, and execute the step of the master OLT sending the initial number of ONU licenses for the partition to the first OLT that is a partition member according to the IP list of the OLTs that are partition members until the IP list of the OLTs that are partition members is empty, to obtain the final remaining quantity of ONU licenses for the partition and the own allocated quantity of each partition member, where the final remaining quantity of ONU licenses for the partition is the remaining quantity of ONU licenses for the partition.
4. The ONU online management method according to claim 3, characterized in that, after the step where the network management system detects whether there are partition entries in the database, it includes: if the detection result is that there are no partition entries in the database, the network management system obtains the list of all OLTs from the database; The network management partitions all OLTs based on the list of all OLTs, where OLTs in the same network segment are in the same partition.
5. The ONU online management method according to claim 3, characterized in that, after the step of until the IP list of the OLTs in the partition is empty and obtaining the final remaining number of ONU Licenses in the partition and the number of its own allocated licenses for each partition member, it includes: The master OLT detects whether the final remaining number of ONU Licenses in the partition is negative; If it is negative, the master OLT sends an application to the network management to allocate the same number of ONU Licenses as the absolute value of the negative number; After receiving the application sent by the master OLT, the network management detects whether the total remaining number of ONU Licenses meets the application; If it meets the requirement, the network management allocates the same number of ONU Licenses as the absolute value of the negative number to the master OLT.
6. The ONU online management method according to claim 1, characterized in that, the ONU online management method further includes: The network management detects whether there is an OLT going offline or online; When an OLT goes online, the newly online OLT sends a request to join the partition to all master OLTs; The master OLT that receives the request sends the IP of the newly online OLT to the network management, and the network management and the master OLT add the IP of the newly online OLT to the IP list of the OLTs in the partition member; The newly online OLT sends a request to allocate ONU Licenses to the master OLT in the partition according to the number of ONUs to be online; After receiving the request, the master OLT executes the step of comparing whether the number of ONUs to be online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to be online are located by the master OLT corresponding to the ONUs to be online; When an OLT goes offline, the master OLT and the network management delete the offline OLT from the IP list of the OLTs in the partition member.
7. An ONU online management system, characterized in that, the ONU online management system includes a master OLT, which is used for: When there are ONUs to be online in the partition where the master OLT is located, comparing whether the number of ONUs to be online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to be online are located, where the master OLT is any OLT in a partition after the network management partitions all OLTs; If the number of ONUs to be online is less than or equal to the remaining number of ONU Licenses in the partition where the ONUs to be online are located, allocate the required number of ONU Licenses for the ONUs to be online to the OLT to which the ONUs to be online belong; If the number of ONUs to be online is greater than the remaining number of ONU Licenses in the partition where the ONUs to be online are located, subtract the remaining number of ONU Licenses in the partition where the ONUs to be online are located from the number of ONUs to be online to obtain a first difference, and send the first difference to the network management; The ONU online management system further includes a network management, which is used for: Receive the first difference sent by the master OLT, and compare the first difference with the remaining total ONU Licenses. If the first difference is less than or equal to the remaining total ONU Licenses, allocate the same number of ONU Licenses as the first difference to the master OLT in the partition where the ONUs to be brought online are located.
8. A readable storage medium, characterized in that, an ONU online management program is stored on the readable storage medium, and when the ONU online management program is executed by a processor, the steps of the ONU online management method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method using license to limit ONU access quantity for OLT
CN108092820A