CN117762507A - Method and system for policy ID maintenance of frame type equipment - Google Patents
Method and system for policy ID maintenance of frame type equipment Download PDFInfo
- Publication number
- CN117762507A CN117762507A CN202311797627.XA CN202311797627A CN117762507A CN 117762507 A CN117762507 A CN 117762507A CN 202311797627 A CN202311797627 A CN 202311797627A CN 117762507 A CN117762507 A CN 117762507A
- Authority
- CN
- China
- Prior art keywords
- strategy
- control board
- maximum
- policy
- main control
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 66
- 238000012423 maintenance Methods 0.000 title claims abstract description 32
- 230000001360 synchronised effect Effects 0.000 claims description 26
- 238000010586 diagram Methods 0.000 description 14
- 238000003860 storage Methods 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000013486 operation strategy Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 238000006243 chemical reaction Methods 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000011217 control strategy Methods 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Landscapes
- Hardware Redundancy (AREA)
Abstract
The application discloses a method and a system for policy ID maintenance of frame type equipment, and belongs to the technical field of equipment operation and maintenance. The method comprises the following steps: and acquiring a first maximum strategy ID of the main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board. The method comprises the steps of sending a first maximum strategy ID to a non-master control board, comparing the sizes of the first maximum strategy ID and a second maximum strategy ID of the non-master control board by the non-master control board to obtain a target strategy ID, returning the target strategy ID to the master control board, wherein the second maximum strategy ID is the largest one of the strategy IDs in the non-master control board, and the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID. And receiving a target strategy ID returned by the non-master control board. And finishing strategy ID configuration of the strategy to be configured according to the target strategy ID. The target strategy ID is determined after judging and comparing the strategy IDs of the main control board and the non-main control board, and the strategy ID is configured to the strategy to be configured, so that the consistency of the strategy IDs of the frame type equipment can be maintained.
Description
Technical Field
The application relates to the technical field of equipment operation and maintenance, in particular to a method and a system for policy ID maintenance of machine frame type equipment.
Background
The machine frame type equipment is generally composed of a main service board, a standby service board and a plurality of service boards, in order to keep the uniformity of configuration, equipment function maintenance is mainly carried out through the control service boards, other service boards are maintained in a mode of synchronizing from a control board through an internal management channel, configuration information and management information among the service boards are mutually independent, the control service boards are connected with the service boards through the internal management channel, configuration operation information is issued to the service boards through the internal management channel, and the service boards call corresponding configuration operations to complete configuration change. At present, a common configuration maintenance mode of the machine frame type equipment is that the machine frame type equipment boards are respectively added with configuration to maintain respective board IDs. However, when the policy IDs of the boards of the frame type device are inconsistent, the subsequent policy IDs are accumulated all the time, and the policy ID consistency state cannot be restored. Therefore, the prior art has a problem that it is difficult to maintain the consistent state of policy IDs.
Disclosure of Invention
An objective of the embodiments of the present application is to provide a method and a system for policy ID maintenance of a frame device, which are used for solving the problem in the prior art that policy IDs are difficult to maintain in a consistent state.
To achieve the above object, a first aspect of the embodiments of the present application provides a method for policy ID maintenance of a frame device, applied to a main control board, where the frame device includes a main control board and a non-main control board, the method includes:
acquiring a first maximum strategy ID of a main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board;
the method comprises the steps of sending a first maximum strategy ID to a non-main control board, comparing the sizes of the first maximum strategy ID and a second maximum strategy ID of the non-main control board by the non-main control board to obtain a target strategy ID, and returning the target strategy ID to the main control board, wherein the second maximum strategy ID is the largest one of the strategy IDs in the non-main control board, and the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID;
receiving a target strategy ID returned by a non-main control board;
and finishing strategy ID configuration of the strategy to be configured according to the target strategy ID.
In the embodiment of the application, configuring the policy ID for the target policy according to the target maximum policy ID includes: receiving an addition strategy request; analyzing the strategy adding request to obtain a strategy to be configured; and configuring the strategy ID of the strategy to be configured as the target strategy ID.
In an embodiment of the present application, the method further includes: and sending a strategy ID synchronous request to the non-master control board so that the non-master control board can replace all strategy IDs of the non-master control board with target strategy IDs.
In an embodiment of the present application, the method further includes: in the case that the number of the non-master control boards is a plurality of, the target policy ID is the largest of the first largest policy ID and the second largest policy ID.
A second aspect of the embodiments of the present application provides a method for policy ID maintenance of a frame device, applied to a non-master control board, where the frame device includes the non-master control board and the master control board, and the method includes: receiving a first maximum strategy ID of a main control board sent by the main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board; acquiring a second maximum strategy ID of the non-main control board, wherein the second maximum strategy ID is the largest strategy ID in the non-main control board; comparing the first maximum strategy ID with the second maximum strategy ID in size to obtain a target strategy ID, wherein the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID; and returning the target maximum strategy ID to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID.
In the embodiment of the present application, comparing the sizes of the first maximum policy ID and the second maximum policy ID to obtain the target policy ID includes: determining the second maximum policy ID as the target policy ID in the case that the second maximum policy ID is greater than the first maximum policy ID; in the case that the first maximum policy ID is greater than the second maximum policy ID, the first maximum policy ID is determined as the target policy ID.
In an embodiment of the present application, the method includes: and under the condition that the first maximum strategy ID is the same as the second maximum strategy ID, returning a successful comparison result to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the first maximum strategy ID.
In an embodiment of the present application, the method further includes: receiving a strategy ID synchronous request sent by a main control board; and replacing all the strategy IDs of the non-master control board with target strategy IDs according to the strategy ID synchronous request.
A third aspect of the embodiments of the present application provides a main control board, including: the first maximum strategy ID acquisition module is used for acquiring a first maximum strategy ID of the main control board, wherein the first maximum strategy ID is the maximum one of the strategy IDs in the main control board; the first maximum strategy ID sending module is used for sending the first maximum strategy ID to the non-master control board, comparing the sizes of the first maximum strategy ID and a second maximum strategy ID of the non-master control board by the non-master control board to obtain a target strategy ID, and returning the target strategy ID to the master control board, wherein the second maximum strategy ID is the largest one of the strategy IDs in the non-master control board, and the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID; the target strategy ID receiving module is used for receiving the target strategy ID returned by the non-main control board; and the strategy ID configuration module is used for completing strategy ID configuration of the strategy to be configured according to the target strategy ID.
A fourth aspect of the present application provides a non-main control board, including: the first maximum strategy ID receiving module is used for receiving a first maximum strategy ID of the main control board sent by the main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board; the second maximum strategy ID acquisition module is used for acquiring a second maximum strategy ID of the non-main control board, wherein the second maximum strategy ID is the largest strategy ID in the non-main control board; the target strategy ID acquisition module is used for comparing the first maximum strategy ID with the second maximum strategy ID to obtain a target strategy ID, wherein the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID; and the target strategy ID sending module is used for returning the target maximum strategy ID to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID.
A fifth aspect of the embodiments of the present application provides a main control board configured to perform a method for forwarding data according to the above.
A sixth aspect of the embodiments of the present application provides a non-master control board configured to perform a method for forwarding data according to the above.
A seventh aspect of the embodiments of the present application provides a system for policy ID maintenance of a frame device, including: according to the main control board; according to the non-master control board.
According to the technical scheme, the first maximum strategy ID of the main control board is obtained, the first maximum strategy ID is sent to the non-main control board, the non-main control board compares the first maximum strategy ID with the second maximum strategy ID of the non-main control board to obtain the target strategy ID, and the target strategy ID is returned to the main control board. After receiving the target strategy ID returned by the non-main control board, the main control board completes strategy ID configuration of the strategy to be configured according to the target strategy ID. According to the technical scheme, the target strategy ID is determined after the strategy IDs of the main control board and the non-main control board are judged and compared, and then the strategy ID is configured for the strategy to be configured, so that the consistency of the strategy IDs of the frame type equipment can be maintained.
Additional features and advantages of embodiments of the present application will be set forth in the detailed description that follows.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the present application and are incorporated in and constitute a part of this specification, illustrate embodiments of the present application and together with the description serve to explain, without limitation, the embodiments of the present application. In the drawings:
FIG. 1 schematically illustrates a flow chart of a method for frame device policy ID maintenance according to an embodiment of the present application;
FIG. 2 schematically illustrates a flow chart of a method for frame device policy ID maintenance according to another embodiment of the present application;
FIG. 3 schematically illustrates a service board on-line policy ID maintenance block diagram according to a specific embodiment of the present application;
FIG. 4 schematically illustrates a flowchart of a method for synchronizing a non-master board on-line policy ID according to an embodiment of the present application;
FIG. 5 schematically illustrates a flow chart of a method for frame device policy ID maintenance in accordance with a specific embodiment of the subject application;
fig. 6 schematically shows a block diagram of a main control board according to an embodiment of the present application;
FIG. 7 schematically illustrates a block diagram of a non-master control board according to an embodiment of the application;
fig. 8 schematically illustrates a subrack device policy ID maintenance block diagram according to a specific embodiment of the present application.
Description of the reference numerals
610 first maximum policy ID acquisition module 620 first maximum policy ID sending module
630 target policy ID receiving module 640 policy ID configuring module
710 first maximum policy ID receiving module 720 second maximum policy ID obtaining module
730 target policy ID acquisition module 740 target policy ID sending module
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the specific implementations described herein are only for illustrating and explaining the embodiments of the present application, and are not intended to limit the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that, in the embodiment of the present application, directional indications (such as up, down, left, right, front, and rear … …) are referred to, and the directional indications are merely used to explain the relative positional relationship, movement conditions, and the like between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be regarded as not exist and not within the protection scope of the present application.
Fig. 1 schematically illustrates a flow chart of a method for frame device policy ID maintenance according to an embodiment of the present application. As shown in fig. 1, an embodiment of the present application provides a method for policy ID maintenance of a frame device, which is applied to a main control board, where the frame device includes a main control board and a non-main control board, and the method may include the following steps:
step S101: and acquiring a first maximum strategy ID of the main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board.
Step S102: the method comprises the steps of sending a first maximum strategy ID to a non-master control board, comparing the sizes of the first maximum strategy ID and a second maximum strategy ID of the non-master control board by the non-master control board to obtain a target strategy ID, and returning the target strategy ID to the master control board, wherein the second maximum strategy ID is the largest one of the strategy IDs in the non-master control board, and the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID.
Step S103: and receiving a target strategy ID returned by the non-master control board.
Step S104: and finishing strategy ID configuration of the strategy to be configured according to the target strategy ID.
It will be appreciated that the subrack device, also referred to as an extensible switch, is a network switching device based on a modular design. The system consists of a main control service board, a standby control service board and a plurality of service boards. The main control board is mainly responsible for system management and configuration maintenance; the backup control board is mainly responsible for system management and configuration maintenance; the service board is mainly responsible for network forwarding and security service processing. The smallest processing unit of a frame device is a session. Policy information on the service module of the device, and information such as address, protocol, port, etc. of the message are recorded on the session. The network security equipment guides the processing and forwarding of the message by searching the session, so as to reduce the complexity of the session information record and improve the session processing speed, the policy information stored in the session is usually stored in the form of a policy ID, and the policy ID is in the form of a digital number. And when the network security equipment receives the new message and hits access control and NAT strategy, the strategy ID is recorded on the session. When the subsequent data message arrives at the device, the device preferentially searches the session information, and retrieves the corresponding access control strategy and NAT strategy through the strategy ID recorded on the session, so as to acquire the access control action or NAT conversion information. The policy to be configured refers to a newly added policy to be configured with a policy ID, i.e., a policy requiring policy ID configuration.
Specifically, to ensure the consistency of the policy IDs of each board, the device with inconsistent policy IDs may be used to synchronize the policy and the policy IDs to other boards, so as to keep the consistency of the policy IDs by using the method of policy ID synchronization. The master control board firstly obtains the largest of all the strategy IDs in the master control board, namely the largest of all the strategy ID numbers, namely the first largest strategy ID. And then the first maximum strategy ID is sent to the non-main control board. At the non-master control board end, the non-master control board also has a maximum strategy ID, namely a second maximum strategy ID. The non-main control board compares the first maximum strategy ID with the second maximum strategy ID in size, and takes the larger one as the target strategy ID. And the non-main control board returns the target strategy ID to the main control board after obtaining the target strategy ID. After receiving the target strategy ID returned by the non-main control board, the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID.
According to the technical scheme, the first maximum strategy ID of the main control board is obtained, the first maximum strategy ID is sent to the non-main control board, the non-main control board compares the first maximum strategy ID with the second maximum strategy ID of the non-main control board to obtain the target strategy ID, and the target strategy ID is returned to the main control board. After receiving the target strategy ID returned by the non-main control board, the main control board completes strategy ID configuration of the strategy to be configured according to the target strategy ID. According to the technical scheme, the target strategy ID is determined after the strategy IDs of the main control board and the non-main control board are judged and compared, and then the strategy ID is configured for the strategy to be configured, so that the consistency of the strategy IDs of the frame type equipment can be maintained.
In one embodiment, configuring the policy ID according to the target maximum policy ID includes: receiving an addition strategy request; analyzing the strategy adding request to obtain a strategy to be configured; and configuring the strategy ID of the strategy to be configured as the target strategy ID.
Specifically, each board card of the machine frame configures a policy ID for a policy to be configured in an operation state, and the main control board firstly receives a policy adding request and analyzes the policy adding request to obtain the policy to be configured. The policy to be configured refers to a newly added policy to be configured of the policy ID. And configuring the target strategy ID of the strategy to be configured, and completing the configuration of the strategy ID of the strategy to be configured.
In one embodiment, the method further comprises: and sending a strategy ID synchronous request to the non-master control board so that the non-master control board can replace all strategy IDs of the non-master control board with target strategy IDs.
Specifically, when the target policy ID is obtained, it is indicated that there is a non-master control board policy ID inconsistent with the target policy ID. At this time, the master control board transmits a policy ID synchronization request to the non-master control board. After receiving the strategy ID synchronous request, the non-master control board can replace all strategy IDs of the non-master control board with target strategy IDs according to the strategy ID synchronous request so as to ensure the consistency of strategy IDs among the boards.
In one embodiment, the method further comprises: in the case that the number of the non-master control boards is a plurality of, the target policy ID is the largest of the first largest policy ID and the second largest policy ID.
Specifically, if the number of non-master control boards is multiple, each non-master control board will receive the first maximum policy ID sent by the master control board. And each non-master control board has a second maximum policy ID. Each non-master control board compares the second maximum strategy ID with the first maximum strategy ID to obtain a plurality of target strategy IDs. And each non-master control board returns the target strategy ID obtained by each non-master control board to the master control board. And the main control board compares the sizes of the target strategy IDs, and determines the largest target strategy ID as the final target strategy ID.
According to the technical scheme, the first maximum strategy ID of the main control board is obtained, the first maximum strategy ID is sent to the non-main control board, the non-main control board compares the first maximum strategy ID with the second maximum strategy ID of the non-main control board to obtain the target strategy ID, and the target strategy ID is returned to the main control board. After receiving the target strategy ID returned by the non-main control board, the main control board completes strategy ID configuration of the strategy to be configured according to the target strategy ID. According to the technical scheme, the target strategy ID is determined after the strategy IDs of the main control board and the non-main control board are judged and compared, and then the strategy ID is configured to the strategy to be configured, so that the strategy can be added in real time under the running state of each board card of the machine frame, and the strategy IDs of all boards are ensured to be consistent.
Fig. 2 schematically illustrates a flow chart of a method for frame device policy ID maintenance according to another embodiment of the present application. As shown in fig. 2, an embodiment of the present application provides a method for policy ID maintenance of a frame device, applied to a non-master control board, where the frame device includes the non-master control board and the master control board, the method may include the following steps:
step S201: and receiving a first maximum strategy ID of the main control board, which is sent by the main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board.
Step S202: and acquiring a second maximum strategy ID of the non-main control board, wherein the second maximum strategy ID is the largest strategy ID in the non-main control board.
Step S203: and comparing the sizes of the first maximum strategy ID and the second maximum strategy ID to obtain a target strategy ID, wherein the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID.
Step S204: and returning the target maximum strategy ID to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID.
Specifically, the non-master control board may receive the first maximum policy ID sent by the master control board, and obtain the largest one of the policy IDs in the non-master control board, i.e., the second maximum policy ID. After the first maximum policy ID and the second maximum policy ID are obtained, comparing the sizes of the first maximum policy ID and the second maximum policy ID, and determining the larger one as the target policy ID. And returning the target strategy ID to the main control board. After receiving the target strategy ID, the main control board can complete the configuration of the strategy ID according to the strategy to be configured according to the target strategy ID. And when the number of the non-master control boards is multiple, the target strategy ID is the largest of the first largest strategy ID and the second largest strategy ID.
According to the technical scheme, the non-main control board receives the first maximum strategy ID of the main control board sent by the main control board, and acquires the second maximum strategy ID of the non-main control board. And comparing the first maximum strategy ID with the second maximum strategy ID to obtain the target strategy ID. And finally, returning the target maximum strategy ID to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID, and the consistency of the strategy IDs of the frame type equipment can be maintained.
In one embodiment, comparing the first maximum policy ID and the second maximum policy ID to obtain the target policy ID comprises: determining the second maximum policy ID as the target policy ID in the case that the second maximum policy ID is greater than the first maximum policy ID; in the case that the first maximum policy ID is greater than the second maximum policy ID, the first maximum policy ID is determined as the target policy ID.
Specifically, when determining the target policy ID, the first maximum policy ID and the second maximum policy ID are compared in size, and the larger is determined as the target policy ID. For example, in the case where the second maximum policy ID is greater than the first maximum policy ID, the second maximum policy ID may be determined as the target policy ID; in the case where the first maximum policy ID is greater than the second maximum policy ID, the first maximum policy ID may be determined as the target policy ID.
In one embodiment, the method comprises: and under the condition that the first maximum strategy ID is the same as the second maximum strategy ID, returning a successful comparison result to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the first maximum strategy ID.
Specifically, in the case where the first maximum policy ID is the same as the second maximum policy ID, that is, the policy IDs between the boards coincide. And the non-main control board returns a successful comparison result to the main control board. The main control board can complete the configuration of the strategy ID of the configuration strategy directly according to the first maximum strategy ID.
In one embodiment, the method further comprises: receiving a strategy ID synchronous request sent by a main control board; and replacing all the strategy IDs of the non-master control board with target strategy IDs according to the strategy ID synchronous request.
Specifically, when the target policy ID is obtained, it is indicated that there is a non-master control board policy ID inconsistent with the target policy ID. At this time, the master control board transmits a policy ID synchronization request to the non-master control board. After receiving the strategy ID synchronous request, the non-master control board can replace all strategy IDs of the non-master control board with target strategy IDs according to the strategy ID synchronous request so as to ensure the consistency of strategy IDs among the boards.
According to the technical scheme, the non-main control board receives the first maximum strategy ID of the main control board sent by the main control board, and acquires the second maximum strategy ID of the non-main control board. And comparing the first maximum strategy ID with the second maximum strategy ID to obtain the target strategy ID. And finally, returning the target maximum strategy ID to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID, and the consistency of the strategy IDs of the frame type equipment can be maintained.
In one embodiment, the configuration of the synchronized master control board policy is also required when the non-master control board is restarted. Fig. 3 schematically illustrates a service board online policy ID maintenance block diagram according to a specific embodiment of the present application. The control board and the service board communicate through respective message transmission modules. Fig. 4 schematically illustrates a flowchart of a method for synchronizing online policy IDs of a non-master control board according to an embodiment of the present application. As shown in fig. 4, the method may include the steps of:
s401: and starting the service board, and initiating policy synchronization to the main control board.
S402: and the main control board receives the request and stores the current operation strategy and the strategy ID into a configuration file.
S403: and the non-main control board receives the strategy item and analyzes the strategy ID to be configured on the current strategy.
S404: after the non-main control board is on line, the main control board can be maintained based on the strategy ID of the main control board.
Specifically, after the main control board is on line, the configuration information of the memory can be loaded by reading the configuration file of the memory. And analyzing the strategy information of the configuration file to obtain strategy IDs, and configuring the storage strategy IDs into corresponding strategy information.
When the service board restarts on-line, the on-line registration is initiated to the main control board, and the strategy configuration of the main control board is synchronized. The main control board stores the strategy information together with the ID number into the synchronous information and transmits the synchronous information to the non-main control board. The non-main control board loads the strategy ID and the strategy content to be configured correspondingly, so that the consistency of the equipment strategy is ensured. After the service board is started, a registration request is sent to the main control board to request synchronous policy configuration. The main control board stores the operation strategy and strategy ID of the equipment, acquires the maximum strategy ID value under the current system, and transmits the maximum strategy ID value to the online service board. And the online service board receives the synchronous maximum strategy ID value and sets the maximum strategy ID of the board card as the synchronous value. The main control board synchronizes the operation configuration to the online service board, and when the online service board loads the strategy configuration, the current strategy ID is set preferentially, and the strategy information is reconfigured. And after the synchronous configuration of the main control board is completed, informing the online service board that the synchronous configuration is completed. In the online stage of the non-main control board, the main control board isolates the strategy ID configured after the device is added and configured after the device is started by synchronizing the maximum strategy ID, and ensures that the strategy IDs of all boards are consistent.
Fig. 5 schematically illustrates a flow chart of a method for frame device policy ID maintenance according to a specific embodiment of the present application. As shown in fig. 5, an embodiment of the present application provides a method for policy ID maintenance of a frame device, which may include the following steps:
s501: and adding a strategy by the main control board.
S502: and the master control board sends the maximum strategy ID of the board card to the non-master control board.
S503: and the non-main control board receives the strategy ID sent by the main control board, compares the strategy ID with the maximum strategy ID of the card, and enters S504 under the condition that the IDs are consistent, and enters S505 under the condition that the IDs are inconsistent.
S504: and returning the comparison result to the main control board.
S505: and returning a comparison result according to the comparison algorithm.
S506: the main control board executes the strategy and issues the strategy to other boards.
Specifically, policies are added in real time under the running state of each board card of the machine frame, and the policies and the policy IDs are required to be synchronized to other board cards, so that the policy IDs of the boards are ensured to be consistent. When inconsistent conditions occur, the normal configuration state of the equipment is ensured by updating the ID. Firstly, the main control board configuration management module receives a command request and analyzes the command to be synchronized to a non-main control board. And simultaneously, the master control board acquires the maximum strategy ID and synchronizes to the non-master control board card, and waits for the non-master control board to return a comparison result. And the non-main control board receives the maximum strategy ID of the main control board, and a comparison algorithm is called to compare the main control board ID with the maximum strategy ID of the board card. If the comparison result is different, if the strategy ID of the non-main control board is larger, returning the ID of the main control board and the comparison failure result to the main control board. The main control board updates the maximum strategy ID after receiving the returned result of all the boards and notifies all the boards in the machine frame to update the machine frame ID; if the non-main control board strategy ID is smaller, the card updates the main control board strategy maximum ID, and returns a comparison success result. And under the condition that the comparison results are the same, the non-main control board returns a result of successful comparison of the main control board. And after the strategy ID comparison flow is finished, the master control board informs all non-master control boards of the current equipment to update the maximum strategy ID if strategy ID update occurs. And after receiving the strategy ID updating message, the non-main control board updates the local maximum strategy ID. The master control board adds the strategy based on the maximum strategy ID and synchronizes the strategy to the non-master control board for execution. After the non-main control board receives the command, the synchronous strategy is loaded based on the maximum strategy ID, and meanwhile, the maximum strategy IDs of all boards are accumulated and updated.
According to the technical scheme, the master control board synchronizes the maximum strategy ID of the master control board to the non-master control board through the management channel, and the non-master control board synchronizes the strategy maximum ID to separate loading configuration and subsequent running configuration. The non-master control board adds the synchronization configuration based on the current maximum policy ID, and the master control board compares with the non-master control board maximum ID. And the master control board updates and synchronizes the maximum strategy ID to the non-master control board, and the non-master control board updates the strategy ID of the board card after receiving the synchronous maximum strategy ID of the master control board. The policy IDs may be inconsistent, resulting in a problem of inability to manage devices.
Fig. 6 schematically shows a block diagram of a main control board according to an embodiment of the present application. As shown in fig. 6, an embodiment of the present application provides a main control board, which may include:
a first maximum policy ID obtaining module 610, configured to obtain a first maximum policy ID of the main control board, where the first maximum policy ID is a maximum one of the policy IDs in the main control board;
the first maximum policy ID sending module 620 is configured to send a first maximum policy ID to the non-master control board, so that the non-master control board compares the first maximum policy ID with a second maximum policy ID of the non-master control board to obtain a target policy ID, and returns the target policy ID to the master control board, where the second maximum policy ID is a maximum one of the policy IDs in the non-master control board, and the target policy ID is a greater one of the first maximum policy ID and the second maximum policy ID;
the target policy ID receiving module 630 is configured to receive a target policy ID returned by the non-master control board;
the policy ID configuration module 640 is configured to complete policy ID configuration for the policy to be configured according to the target policy ID.
Specifically, the main control board may include a first maximum policy ID acquisition module 610, a first maximum policy ID transmission module 620, a target policy ID reception module 630, and a policy ID configuration module 640. The first maximum policy ID obtaining module 610 may be configured to obtain a first maximum policy ID of the main control board, where the first maximum policy ID is a maximum one of the policy IDs in the main control board. The first maximum policy ID sending module 620 may be configured to send a first maximum policy ID to the non-master board, so that the non-master board compares the first maximum policy ID with a second maximum policy ID of the non-master board to obtain a target policy ID, and returns the target policy ID to the master board, where the second maximum policy ID is a maximum one of the policy IDs in the non-master board, and the target policy ID is a greater one of the first maximum policy ID and the second maximum policy ID. The target policy ID receiving module 630 may be configured to receive a target policy ID returned by the non-master control board. The policy ID configuration module 640 may be configured to complete policy ID configuration for the policy to be configured according to the target policy ID.
According to the technical scheme, the first maximum strategy ID of the main control board is obtained, the first maximum strategy ID is sent to the non-main control board, the non-main control board compares the first maximum strategy ID with the second maximum strategy ID of the non-main control board to obtain the target strategy ID, and the target strategy ID is returned to the main control board. After receiving the target strategy ID returned by the non-main control board, the main control board completes strategy ID configuration of the strategy to be configured according to the target strategy ID. According to the technical scheme, the target strategy ID is determined after the strategy IDs of the main control board and the non-main control board are judged and compared, and then the strategy ID is configured for the strategy to be configured, so that the consistency of the strategy IDs of the frame type equipment can be maintained.
Fig. 7 schematically illustrates a block diagram of a non-master control board according to an embodiment of the application. As shown in fig. 7, an embodiment of the present application provides a non-master control board, which may include:
a first maximum policy ID receiving module 710, configured to receive a first maximum policy ID of a main control board sent by the main control board, where the first maximum policy ID is a maximum one of the policy IDs in the main control board;
a second maximum policy ID obtaining module 720, configured to obtain a second maximum policy ID of the non-master control board, where the second maximum policy ID is a maximum one of the policy IDs in the non-master control board;
the target policy ID obtaining module 730 is configured to compare the first maximum policy ID and the second maximum policy ID to obtain a target policy ID, where the target policy ID is the larger one of the first maximum policy ID and the second maximum policy ID;
the target policy ID sending module 740 is configured to return the target maximum policy ID to the main control board, so that the main control board completes policy ID configuration of the policy to be configured according to the target policy ID.
Specifically, the non-master board may include a first maximum policy ID receiving module 710, a second maximum policy ID obtaining module 720, a target policy ID obtaining module 730, and a target policy ID transmitting module 740. The first maximum policy ID receiving module 710 may be configured to receive a first maximum policy ID of a master control board sent by the master control board, where the first maximum policy ID is a maximum one of the policy IDs in the master control board. The second maximum policy ID obtaining module 720 may be configured to obtain a second maximum policy ID of the non-master control board, where the second maximum policy ID is a maximum one of the policy IDs in the non-master control board. The target policy ID obtaining module 730 may be configured to compare the first maximum policy ID and the second maximum policy ID to obtain a target policy ID, where the target policy ID is the larger of the first maximum policy ID and the second maximum policy ID. The target policy ID sending module 740 may be configured to return the target maximum policy ID to the main control board, so that the main control board completes policy ID configuration for the policy to be configured according to the target policy ID.
According to the technical scheme, the non-main control board receives the first maximum strategy ID of the main control board sent by the main control board, and acquires the second maximum strategy ID of the non-main control board. And comparing the first maximum strategy ID with the second maximum strategy ID to obtain the target strategy ID. And finally, returning the target maximum strategy ID to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID, and the consistency of the strategy IDs of the frame type equipment can be maintained.
Fig. 8 schematically illustrates a subrack device policy ID maintenance block diagram according to a specific embodiment of the present application. As shown in fig. 8, an embodiment of the present application provides a machine frame device, which includes a main control board and a service board. The main control board comprises a configuration module, a strategy ID issuing module, a strategy ID maintenance module and a strategy ID channel module. The service board comprises a strategy ID issuing module, a configuration module and a strategy ID maintenance module. The main control board and the service board are communicated through a strategy ID issuing module.
The embodiment of the application provides a main control board configured to execute the data forwarding method.
The embodiment of the application provides a non-master control board configured to execute the method for forwarding data according to the above.
The embodiment of the application provides a system for maintaining policy ID of a machine frame type device, which comprises the following steps: according to the main control board; according to the non-master control board.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.
Claims (13)
1. A method for policy ID maintenance of a frame device, applied to a main control board, the frame device including the main control board and a non-main control board, the method comprising:
acquiring a first maximum strategy ID of the main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board;
the first maximum strategy ID is sent to the non-master control board, so that the non-master control board compares the first maximum strategy ID with a second maximum strategy ID of the non-master control board to obtain a target strategy ID, and the target strategy ID is returned to the master control board, wherein the second maximum strategy ID is the largest one of the strategy IDs in the non-master control board, and the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID;
receiving the target strategy ID returned by the non-main control board;
and finishing strategy ID configuration of the strategy to be configured according to the target strategy ID.
2. The method of claim 1, wherein configuring the policy IDs for the policies to be configured according to the target maximum policy ID comprises:
receiving an addition strategy request;
analyzing the strategy adding request to obtain the strategy to be configured;
and configuring the strategy ID of the strategy to be configured as the target strategy ID.
3. The method according to claim 1, wherein the method further comprises:
and sending a strategy ID synchronous request to the non-master control board so that the non-master control board can replace all strategy IDs of the non-master control board with the target strategy ID.
4. The method according to claim 1, wherein the method further comprises:
and under the condition that the number of the non-master control boards is a plurality of, the target strategy ID is the largest of the first largest strategy ID and the plurality of second largest strategy IDs.
5. A method for policy ID maintenance of a frame device, applied to a non-master control board, the frame device comprising the non-master control board and a master control board, the method comprising:
receiving a first maximum strategy ID of the main control board, which is sent by the main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board;
acquiring a second maximum strategy ID of the non-main control board, wherein the second maximum strategy ID is the largest strategy ID in the non-main control board;
comparing the first maximum strategy ID with the second maximum strategy ID in size to obtain a target strategy ID, wherein the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID;
and returning the target maximum strategy ID to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID.
6. The method of claim 5, wherein comparing the first maximum policy ID and the second maximum policy ID in size to obtain a target policy ID comprises:
determining the second maximum policy ID as the target policy ID in the case that the second maximum policy ID is greater than the first maximum policy ID;
and determining the first maximum strategy ID as the target strategy ID in the condition that the first maximum strategy ID is larger than the second maximum strategy ID.
7. The method according to claim 5, characterized in that the method comprises:
and under the condition that the first maximum strategy ID is the same as the second maximum strategy ID, returning a comparison success result to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the first maximum strategy ID.
8. The method of claim 5, wherein the method further comprises:
receiving a strategy ID synchronous request sent by the main control board;
and replacing all the strategy IDs of the non-master control board with the target strategy ID according to the strategy ID synchronous request.
9. A master control board, characterized by comprising:
the system comprises a first maximum strategy ID acquisition module, a second maximum strategy ID acquisition module and a second maximum strategy ID acquisition module, wherein the first maximum strategy ID is the largest strategy ID in the main control board;
the first maximum strategy ID sending module is used for sending the first maximum strategy ID to the non-master control board, comparing the sizes of the first maximum strategy ID and a second maximum strategy ID of the non-master control board by the non-master control board to obtain a target strategy ID, and returning the target strategy ID to the master control board, wherein the second maximum strategy ID is the largest one of the strategy IDs in the non-master control board, and the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID;
the target strategy ID receiving module is used for receiving the target strategy ID returned by the non-main control board;
and the strategy ID configuration module is used for completing strategy ID configuration of the strategy to be configured according to the target strategy ID.
10. A non-master control board, characterized by comprising:
the first maximum strategy ID receiving module is used for receiving a first maximum strategy ID of the main control board, which is sent by the main control board, wherein the first maximum strategy ID is the largest strategy ID in the main control board;
a second maximum policy ID obtaining module, configured to obtain a second maximum policy ID of the non-master control board, where the second maximum policy ID is a maximum one of the policy IDs in the non-master control board;
the target strategy ID acquisition module is used for comparing the sizes of the first maximum strategy ID and the second maximum strategy ID to obtain a target strategy ID, wherein the target strategy ID is the larger one of the first maximum strategy ID and the second maximum strategy ID;
and the target strategy ID sending module is used for returning the target maximum strategy ID to the main control board so that the main control board can complete strategy ID configuration of the strategy to be configured according to the target strategy ID.
11. A main control board, characterized by being configured to perform the method of data forwarding according to any of claims 1 to 4.
12. A non-master control board, configured to perform the method of data forwarding according to any of claims 5 to 8.
13. A system for frame device policy ID maintenance, comprising:
the master control board according to claim 11;
the non-master control board according to claim 12.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311797627.XA CN117762507A (en) | 2023-12-25 | 2023-12-25 | Method and system for policy ID maintenance of frame type equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311797627.XA CN117762507A (en) | 2023-12-25 | 2023-12-25 | Method and system for policy ID maintenance of frame type equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117762507A true CN117762507A (en) | 2024-03-26 |
Family
ID=90312249
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311797627.XA Pending CN117762507A (en) | 2023-12-25 | 2023-12-25 | Method and system for policy ID maintenance of frame type equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117762507A (en) |
-
2023
- 2023-12-25 CN CN202311797627.XA patent/CN117762507A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3620905B1 (en) | Method and device for identifying osd sub-health, and data storage system | |
CN106899648B (en) | Data processing method and equipment | |
CN106685691B (en) | The efficient update configuration method of terminal device in Internet of things system | |
US10831612B2 (en) | Primary node-standby node data transmission method, control node, and database system | |
US11271814B2 (en) | Online capacity-expanding and online capacity-reducing methods and apparatuses for distributed consensus system | |
CN106874328B (en) | Data processing method and equipment | |
CN103714097A (en) | Method and device for accessing database | |
CN111880956B (en) | Data synchronization method and device | |
CN111399764B (en) | Data storage method, data reading device, data storage equipment and data storage medium | |
CN108829720B (en) | Data processing method and device | |
CN107729515B (en) | Data synchronization method, device and storage medium | |
CN112015744A (en) | Configuration data access method, device, equipment, configuration center and storage medium | |
CN108694218A (en) | A kind of method and apparatus data write-in and read | |
CN116107828A (en) | Main node selection method, distributed database and storage medium | |
CN108509296B (en) | Method and system for processing equipment fault | |
US11128622B2 (en) | Method for processing data request and system therefor, access device, and storage device | |
CN112000850B (en) | Method, device, system and equipment for processing data | |
CN107623705B (en) | Storage mode upgrading method, device and system based on video cloud storage system | |
CN105323271B (en) | Cloud computing system and processing method and device thereof | |
CN107528703B (en) | Method and equipment for managing node equipment in distributed system | |
CN117762507A (en) | Method and system for policy ID maintenance of frame type equipment | |
CN110113217B (en) | Micro-service management method, device, management platform and storage medium | |
CN110569231B (en) | Data migration method, device, equipment and medium | |
CN115705269A (en) | Data synchronization method, system, server and storage medium | |
CN109947727B (en) | Data processing method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |