Controller election method, controller, and storage medium

Super controllers are elected through the Raft algorithm and BGP-LS is used to build unified topology information of the local network, which solves the problem of being unable to obtain unified topology information between controllers and achieves high efficiency in SRv6 path calculation and service splitting.

CN115529217BActive Publication Date: 2024-09-03CHINA TELECOM CORP LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202211121878.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-15
Publication Date
2024-09-03
Estimated Expiration
2042-09-15

AI Technical Summary

Technical Problem

After the TE service is deployed, the controller cannot obtain unified topology information of the local network and cannot perform SRv6 intelligent path calculation because it can only see the POD topology it is responsible for.

Method used

A controller election scheme based on the Raft algorithm is used to elect a super controller, collect topology and routing information through BGP-LS, build unified topology information of the local network, and perform unified calculation of SRv6 paths. The super controller serves as a unified northbound interface to connect to the northbound system to split and deliver services.

Benefits of technology

It realizes the unified topology information construction and SRv6 path calculation of the local network, solves the problem of non-occupancy of resources between controllers, and improves the efficiency of business splitting and intelligent path calculation capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115529217B
    Figure CN115529217B
Patent Text Reader

Abstract

The present disclosure provides a controller election method, a controller, and a storage medium, and relates to the field of network technology. The controller election method includes: collecting evaluation index information of the controller at a preset period; if the current role of the controller is a follower, after receiving a voting message sent by a candidate node, the election timeout timer is cleared and the election timeout timer is restarted, and the term information and weight information of the candidate node are extracted from the voting message; if the term of the candidate node is greater than the current term of the controller, the weight of the controller is calculated according to the evaluation index information; if the weight of the controller is less than the weight of the candidate node, the candidate node is voted for, the current role of the controller is maintained, and no other candidate nodes are voted for.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of network technology, and in particular to a controller election method, a controller, and a storage medium. Background Art

[0002] The existing metropolitan area network deploys multiple controllers in the same local network, and different controllers are responsible for different PODs (Point of Deployment). When using BE (Best Effort) services, different controllers plan and manage different areas, and manage their designed virtual resources and equipment in a decentralized and domain-based manner. Resources do not occupy each other, and common resources can be uniformly allocated by the resource center. When the service is activated, the northbound system orchestration is responsible for splitting the order, and the equipment configuration tasks of different PODs are split to different controllers for execution. Summary of the invention

[0003] The inventor noticed that in the related art, after deploying TE (Traffic Engineering) services, the controller can only see the topology of the POD it is responsible for and cannot obtain the unified topology information of the local network, so it is impossible to perform SRv6 (Segment Routing IPv6) intelligent path calculation.

[0004] Based on this, the present disclosure provides a controller election scheme based on the Raft algorithm, which elects a controller in the network as a super controller, and the elected super controller collects topology and routing information through BGP (Border Gateway Protocol)-LS (Link State), builds unified topology information of the local network, and performs unified calculation of the SRv6 path of the local network. At the same time, the super controller is used as a northbound unified interface to connect to the northbound system to split and issue services.

[0005] According to a first aspect of an embodiment of the present disclosure, a controller election method is provided, which is executed by a controller and includes: collecting evaluation index information of the controller at a preset period; if the current role of the controller is a follower, after receiving a voting message sent by a candidate node, clearing the election timeout timer and restarting the election timeout timer; extracting the term information and weight information of the candidate node from the voting message; if the term of the candidate node is greater than the current term of the controller, calculating the weight of the controller according to the evaluation index information; if the weight of the controller is less than the weight of the candidate node, voting for the candidate node to maintain the current role of the controller, and no longer voting for other candidate nodes.

[0006] In some embodiments, if the weight of the controller is not less than the weight of the candidate node, the candidate node is rejected for voting.

[0007] In some embodiments, if the term of office of the candidate node is less than the current term of office of the controller, the candidate node is rejected for voting.

[0008] In some embodiments, if no leader node is elected in this round of elections, then after the election timeout timer expires, the current term of the controller is increased by one, and the current role of the controller is converted from a follower to a candidate; and voting messages are sent to other candidate nodes and follower nodes in the network.

[0009] In some embodiments, the evaluation index information includes the number of managed devices, average transmission delay and service request volume.

[0010] In some embodiments, the weight W of the controller is:

[0011] W=w1N+w2T+w3Y

[0012] Wherein N is the number of management devices, T is the average transmission delay, Y is the service request amount, and w1, w2 and w3 are weight coefficients.

[0013] In some embodiments,

[0014] k=1, 2, 3, E1 is the information entropy of the number of management devices, E2 is the information entropy of the average transmission delay, and E3 is the information entropy of the service request amount.

[0015] According to the second aspect of an embodiment of the present disclosure, a controller is provided, comprising: an information acquisition module, configured to collect evaluation index information of the controller at a preset period; an election decision module, configured to, if the current role of the controller is a follower, clear the election timeout timer and restart the election timeout timer after receiving a voting message sent by a candidate node; extract the term information and weight information of the candidate node from the voting message; if the term of the candidate node is greater than the current term of the controller, calculate the weight of the controller according to the evaluation index information; if the weight of the controller is less than the weight of the candidate node, vote for the candidate node to maintain the current role of the controller, and no longer vote for other candidate nodes.

[0016] In some embodiments, the election decision module is further configured to refuse to vote for the candidate node if the weight of the controller is not less than the weight of the candidate node.

[0017] In some embodiments, the election decision module is further configured to refuse to vote for the candidate node if the term of office of the candidate node is less than the current term of office of the controller.

[0018] In some embodiments, the election decision module is also configured to, if no leader node is elected in this round of elections, then after the election timeout timer expires, increase the current term of the controller by one, and convert the current role of the controller from a follower to a candidate; and send voting messages to other candidate nodes and follower nodes in the network.

[0019] In some embodiments, the evaluation index information includes the number of managed devices, average transmission delay and service request volume.

[0020] In some embodiments, the weight W of the controller is:

[0021] W=w1N+w2T+w3Y

[0022] Wherein N is the number of management devices, T is the average transmission delay, Y is the service request amount, and w1, w2 and w3 are weight coefficients.

[0023] In some embodiments,

[0024] k=1, 2, 3, E1 is the information entropy of the number of management devices, E2 is the information entropy of the average transmission delay, and E3 is the information entropy of the service request amount.

[0025] According to a third aspect of an embodiment of the present disclosure, a controller is provided, comprising: a memory configured to store instructions; a processor coupled to the memory, the processor being configured to execute a method as described in any of the above embodiments based on the instructions stored in the memory.

[0026] According to a fourth aspect of an embodiment of the present disclosure, a non-volatile computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method described in any of the above embodiments is implemented.

[0027] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0029] Figure 1 A flowchart of a controller election method according to an embodiment of the present disclosure;

[0030] Figure 2 A schematic diagram of the structure of a controller according to an embodiment of the present disclosure;

[0031] Figure 3 A schematic diagram of the structure of a controller according to another embodiment of the present disclosure;

[0032] Figure 4 A schematic diagram of business management according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is by no means intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0034] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0035] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0036] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.

[0037] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0038] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0039] Figure 1 The flowchart of the controller election method according to one embodiment of the present disclosure is shown in FIG.

[0040] In step 101, evaluation index information of the controller is collected at a preset period.

[0041] In some embodiments, the evaluation index information includes the number of managed devices, average transmission delay, and service request volume.

[0042] For example, multiple controllers in the same local network are represented by C = {C1, C2, ..., C m} indicates that the controller C i Managed equipment Indicates that for controller C i For example:

[0043] Controller C i The number of managed devices is The larger the value, the less overhead there is in electing a controller as a super controller.

[0044] Controller C i The average transmission delay of controller C i The average one-way communication delay between the managed devices, that is,

[0045] Controller C i The business request volume is controller C i The number of configuration requests received by the managed devices, i.e.

[0046] In step 102, if the current role of the controller is a follower, after receiving the voting message sent by the candidate node, the election timeout timer is cleared and restarted.

[0047] In some embodiments, the timing duration of the election timeout timer is randomly set.

[0048] In step 103, the term information and weight information of the candidate node are extracted from the voting message.

[0049] It should be noted that the candidate node is a controller whose current identity is a candidate.

[0050] In step 104, if the term of the candidate node is greater than the current term of the controller, the weight of the controller is calculated based on the evaluation index information.

[0051] In some embodiments, the controller C i For example, its weight W is shown in formula (1).

[0052] W=w1N+w2T+w3Y (1)

[0053] Where N is the number of managed devices, T is the average transmission delay, Y is the number of service requests, and w1, w2, and w3 are weight coefficients.

[0054] In some embodiments, in order to make the weight of the controller more reasonable and avoid the influence of the measurement unit, the evaluation index is first Normalization is performed, k = 1, 2, 3, as shown in formula (2).

[0055]

[0056] It should be noted that when k = 1, Indicates controller C i The number of managed devices. When k = 2, Indicates controller C i The average transmission delay. When k = 3, Indicates controller C i The volume of business requests.

[0057] Next, the information entropy of each evaluation index is calculated, as shown in formula (3).

[0058]

[0059] Next, the weight coefficient of the corresponding evaluation index is determined according to the information entropy, as shown in formula (4).

[0060]

[0061] Among them, E1 is the information entropy of the number of management devices, E2 is the information entropy of the average transmission delay, and E3 is the information entropy of the service request volume.

[0062] In step 105, if the weight of the controller is less than the weight of the candidate node, the candidate node is voted for, the current role of the controller is maintained, and no votes are given to other candidate nodes.

[0063] In some embodiments, if the controller's weight is not less than the candidate node's weight, the candidate node is rejected for voting.

[0064] In some embodiments, if the term of the candidate node is less than the current term of the controller, the candidate node is rejected for voting.

[0065] In some embodiments, if the leader node is not elected in this round of elections, if a voting message sent by other candidate nodes is received before the election timeout timer expires, the above step 102 is repeated. If the election timeout timer expires, the current term of the controller is increased by one, the current role of the controller is changed from follower to candidate, and voting messages are sent to other candidate nodes and follower nodes in the network.

[0066] It should be noted that the leader node is the controller whose current role is the leader.

[0067] In the controller election method provided in the above embodiment of the present disclosure, in a controller election scheme based on the Raft algorithm, the weight of the controller is calculated by utilizing the average indicator information of the controller, and the voting behavior is affected according to the size of the controller's weight, so that the selected leader controller is more in line with business needs.

[0068] Figure 2 FIG. 1 is a schematic diagram of the structure of a controller according to an embodiment of the present disclosure. Figure 2 As shown, the controller includes an information acquisition module 21 and an election decision module 22.

[0069] The information acquisition module 21 is configured to collect evaluation index information of the controller at a preset period.

[0070] In some embodiments, the evaluation index information includes the number of managed devices, average transmission delay, and service request volume.

[0071] The election decision module 22 is configured to, if the current role of the controller is a follower, clear the election timeout timer and restart the election timeout timer after receiving the voting message sent by the candidate node; extract the term information and weight information of the candidate node from the voting message; if the term of the candidate node is greater than the current term of the controller, calculate the weight of the controller according to the evaluation index information; if the weight of the controller is less than the weight of the candidate node, vote for the candidate node to maintain the current role of the controller, and no longer vote for other candidate nodes.

[0072] In some embodiments, the weight W of the controller is a weighted sum of the number of managed devices, the average transmission delay, and the amount of service requests, as shown in the above formula (1).

[0073] In some embodiments, the weight coefficients of the number of management devices, average transmission delay and service request volume are as shown in the above formula (4).

[0074] In some embodiments, the election decision module 22 is further configured to refuse to vote for the candidate node if the weight of the controller is not less than the weight of the candidate node.

[0075] In some embodiments, the election decision module 22 is further configured to refuse to vote for the candidate node if the term of the candidate node is less than the current term of the controller.

[0076] In some embodiments, the election decision module 22 is also configured to, if no leader node is elected in this round of elections, increase the current term of the controller by one after the election timeout timer expires, and convert the current role of the controller from a follower to a candidate; and send voting messages to other candidate nodes and follower nodes in the network.

[0077] Figure 3 FIG. 1 is a schematic diagram of the structure of a controller according to another embodiment of the present disclosure. Figure 3 As shown, the controller includes a memory 31 and a processor 32 .

[0078] The memory 31 is used to store instructions. The processor 32 is coupled to the memory 31. The processor 32 is configured to execute the instructions stored in the memory to implement the following steps: Figure 1 The method of any one of the embodiments.

[0079] like Figure 3 As shown, the controller further includes a communication interface 33 for information exchange with other devices. At the same time, the controller further includes a bus 34, through which the processor 32, the communication interface 33, and the memory 31 communicate with each other.

[0080] The memory 31 may include a high-speed RAM memory, and may also include a non-volatile memory, such as at least one disk memory. The memory 31 may also be a memory array. The memory 31 may also be divided into blocks, and the blocks may be combined into virtual volumes according to certain rules.

[0081] In addition, the processor 32 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present disclosure.

[0082] The present disclosure also relates to a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, which are executed by a processor to implement the following Figure 1 The method of any one of the embodiments.

[0083] The present disclosure is described below by using a specific example.

[0084] like Figure 4 As shown, sub-controllers 1, 2, and 3 respectively manage metropolitan area network POD-A, POD-B, and POD-C, and the metropolitan area network adopts a leaf (leaf node)-spine (needle node) architecture.

[0085] In each sub-controller, the information acquisition module is used to collect evaluation index information of the corresponding controller at a preset period, and the election decision module uses the controller election method provided in the above embodiment of the present disclosure to perform elections.

[0086] If sub-controller 1 is selected as the leader, sub-controller 1 collects the topology and routing information of the entire network through BGP-LS via RR (Route Reflector), builds unified topology information of the local network, and performs SRv6 path calculation.

[0087] After receiving the service configuration instruction issued by the provincial service orchestration, the sub-controller 1 splits the service request and forwards it to different sub-controllers for execution.

[0088] In some embodiments, the functional unit described above can be implemented as a general-purpose processor, a programmable logic controller (PLC), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware component or any appropriate combination thereof for performing the functions described in the present disclosure.

[0089] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0090] The description of the present disclosure is given for the purpose of illustration and description, and is not intended to be exhaustive or to limit the present disclosure to the disclosed form. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical applications of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure and thereby design various embodiments with various modifications suitable for specific uses.

Claims

1. A controller election method, executed by a controller, include: Collecting evaluation index information of the controller at a preset period, wherein the evaluation index information includes the number of managed devices, average transmission delay, and service request volume; If the current role of the controller is a follower, after receiving the voting message sent by the candidate node, the election timeout timer is cleared and restarted; Extracting term information and weight information of the candidate node from the voting message; If the term of the candidate node is greater than the current term of the controller, the weight of the controller is calculated according to the evaluation index information, wherein the weight W of the controller is a weighted sum of the number of management devices, the average transmission delay and the amount of service requests; If the weight of the controller is less than the weight of the candidate node, vote for the candidate node, keep the current role of the controller, and no longer vote for other candidate nodes; Wherein, the weight W of the controller is: in is the number of managed devices, is the average transmission delay, is the business request amount, , and is the weight coefficient, , is the information entropy of the number of managed devices, is the information entropy of the average transmission delay, is the information entropy of the business request volume.

2. The method according to claim 1, further comprising: include: If the weight of the controller is not less than the weight of the candidate node, the candidate node is rejected from voting.

3. The method according to claim 1, further comprising: include: If the term of office of the candidate node is less than the current term of office of the controller, the vote for the candidate node is rejected.

4. The method according to claim 1, further comprising: include: If no leader node is elected in this round of elections, after the election timeout timer expires, the current term of the controller is increased by one, and the current role of the controller is converted from follower to candidate; Send voting messages to other candidate nodes and follower nodes in the network.

5. A controller, include: An information acquisition module is configured to collect evaluation index information of the controller at a preset period, wherein the evaluation index information includes the number of managed devices, average transmission delay, and service request volume; The election decision module is configured to clear the election timeout timer and restart the election timeout timer after receiving the voting message sent by the candidate node if the current role of the controller is a follower; Extract the term information and weight information of the candidate node from the voting message; if the term of the candidate node is greater than the current term of the controller, calculate the weight of the controller according to the evaluation index information; if the weight of the controller is less than the weight of the candidate node, vote for the candidate node, maintain the current role of the controller, and no longer vote for other candidate nodes, wherein the weight W of the controller is the weighted sum of the number of management devices, the average transmission delay and the amount of service requests, wherein the weight W of the controller is: in is the number of managed devices, is the average transmission delay, is the business request amount, , and is the weight coefficient, , is the information entropy of the number of managed devices, is the information entropy of the average transmission delay, is the information entropy of the business request volume.

6. The controller according to claim 5, in, The election decision module is also configured to refuse to vote for the candidate node if the weight of the controller is not less than the weight of the candidate node.

7. The controller according to claim 5, in, The election decision module is also configured to refuse to vote for the candidate node if the term of office of the candidate node is less than the current term of office of the controller.

8. The controller according to claim 5, in, The election decision module is also configured to, if no leader node is elected in this round of election, increase the current term of the controller by one after the election timeout timer expires, and convert the current role of the controller from follower to candidate; and send voting messages to other candidate nodes and follower nodes in the network.

9. A controller, include: a memory configured to store instructions; A processor is coupled to the memory, and the processor is configured to execute the method according to any one of claims 1 to 4 based on instructions stored in the memory.

10. A non-transitory computer-readable storage medium, in, The computer-readable storage medium stores computer instructions, and when the instructions are executed by a processor, the method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • A block chain consensus method and device based on a Raft algorithm

    CN109714404A

  • Data processing method, data processing device and node server

    CN112202834A

  • Leader node election method and system, storage medium and equipment

    CN114189421A

  • Node election method and device, electronic equipment and storage medium

    CN114363154A

  • Raft consensus mechanism improvement method based on node past behavior analysis

    CN115022022A