A nuclear power information system server main and standby redundant framework management system and method

By using hot standby redundancy technology and Redis communication in the nuclear power plant information system, automatic switching between redundant management processes is realized, which solves the problems of server process reliability and data collection service stability, and ensures that the system operates without interruption in the event of a failure. , improving the reliability and stability of the system.

CN115202939BActive Publication Date: 2024-09-10CHINA NUCLEAR POWER OPERATION TECH CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210553050.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-20
Publication Date
2024-09-10
Estimated Expiration
2042-05-20

AI Technical Summary

Technical Problem

In the three-tier information system of a nuclear power plant, existing technology cannot effectively ensure the reliability of the server process and the stability of the data collection gateway and real-time computing services. Especially in the case of downtime or power outage, the business logic cannot work normally.

Method used

Hot standby redundancy technology is used to communicate with Redis through two redundant management processes to realize status reporting and control of client business logic. The heartbeat and lease mechanisms are used to determine the active and standby status to ensure that the system automatically switches when a failure occurs to avoid downtime. machine phenomenon.

Benefits of technology

It effectively ensures the stability and reliability of the nuclear power information system, ensures that the system can automatically switch in case of failure, avoids interruption of business logic, and improves the working reliability and stability of the entire system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115202939B
    Figure CN115202939B
Patent Text Reader

Abstract

The present invention belongs to the field of nuclear power plant control technology, and specifically relates to a nuclear power information system server main-standby redundant framework management system and method. It includes two redundant management processes, and the redundant management processes are configured with the same redundant management object. Each redundant management object is respectively connected to the redundant management process through a corresponding thread to realize the working status message reporting and control between each business logic of the client and the redundant management process, and is used to specify the control and management of multiple business logics of the client. The two redundant management processes are respectively connected through heartbeat and Redis communication to exchange information and determine whether to switch based on the main and standby status information of the server. Its beneficial effect is that when making a switching judgment, through a double comparison between the health value of the main and standby work queues and the threshold, and between the health values ​​of the main and standby work queues, it is determined that the current main and standby processes are indeed inappropriate, and then the switching work is performed to ensure that the entire system is always under the best main and standby queue control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of nuclear power plant control, and in particular relates to a nuclear power information system server main-standby redundant framework management system and method. Background Art

[0002] In order to ensure the operation of information systems, active-standby redundancy technology is often used. At present, active-standby redundancy technology is generally only applied in the control network. The three-layer information system of nuclear power plants generally uses cluster technology to ensure the reliability of services. Clusters require at least three nodes to complete the construction, which has high requirements for resources. It is more appropriate to use hot standby redundancy solutions for services such as data acquisition gateways and real-time computing in the three-layer information system of nuclear power plants.

[0003] The present invention is mainly used in the three-layer information system network of a nuclear power plant. In order to ensure the stable operation of the information system, the present invention adopts a hot standby redundancy technology to ensure the reliability of key servers (such as data acquisition servers, computing servers) in the information system and the processes running on the servers. The present invention is implemented in pure software, requiring only ordinary services and Ethernet, and does not require any special hardware support. Summary of the invention

[0004] The purpose of the present invention is to provide a server active-standby redundant framework management system and method in a nuclear power information system network, which is used to manage the health status of all processes on the server, is responsible for the active-standby machine switching, and realizes the working status maintenance of the client business logic.

[0005] The technical solution of the present invention is as follows: a nuclear power information system server active-standby redundant framework management system, including two redundant management processes, the redundant management processes are configured with the same redundant management objects, and the redundant management objects are respectively connected to the redundant management processes via corresponding threads to realize the working status message reporting and control between the client's business logic and the redundant management process, and is used to specify the control and management of multiple business logics of the client. The two redundant management processes are respectively connected through heartbeat and Redis communication to exchange information and determine whether to switch according to the active-standby status information of the server.

[0006] It also includes a client, which includes a redundant management process and multiple business logics. The redundant management process is used to manage the business logics in the corresponding client, and the business logic of the client is implemented through a callback function.

[0007] The client's business logic includes operations such as registration, cancellation, refresh, renewal, and closing, and implements the following functions:

[0008] (1) Register instance information to the management process;

[0009] (2) Send heartbeat updates and manage process leases;

[0010] (3) When the service is shut down, the lease is canceled from the management process and the service is offline;

[0011] (4) When the health value or status changes, update the instance information registered in the management process.

[0012] When the client is working normally, each business logic reports its own working status to the redundant management process non-periodically, including the health value of the business logic, and the redundant management process periodically reports the working status of the received business logic to Redis through the corresponding process.

[0013] The two redundant management processes are mutually master-slave, the main process is in Master mode, and the backup process is in Slave mode, and are configured with the same redundant management objects and business logic. The data and instruction interaction between them and the client is carried out through Redis. The redundant management process periodically reports each received business logic event to Redis, and Redis stores the relevant data or instructions after receiving them; the two redundant management processes respectively read the status of the business logic in their respective queues in Redis, and monitor each other's working status health value through heartbeats to determine whether switching is needed according to actual conditions. When switching is executed, the backup process converted to the main process can directly read the data and information required for its normal operation from Redis.

[0014] A method for managing a primary and standby redundant framework of a nuclear power information system server comprises the following steps:

[0015] Step 1: Initialization;

[0016] Step 2: Work status monitoring;

[0017] Step 3: Active / standby switchover.

[0018] In the step 1, when starting to work, one of the redundant management processes is used as the main process. After the main process starts working, another redundant management process is started as the backup process, and a connection between the main and backup processes and the client is established. The client starts working, including establishing a heartbeat. At the same time, each redundant management object of the client determines whether to output business interaction information based on the main and backup identifiers. The main process outputs, and the backup process does not output.

[0019] In step 1, when the main process fails to start or there is no main process, if the main process is still not found after several heartbeat cycles when the backup process is started, the backup process automatically switches to work as the main process.

[0020] In step 1, when the business logic hardware needs to be repaired or replaced, the current active-standby process is forcibly switched through external instructions to replace or repair the business logic hardware, and then the process that is passively switched to the active process starts working.

[0021] The step 2 comprises:

[0022] (a) Status monitoring between the master and standby processes: The master and standby processes monitor each other's working status through heartbeat signals, including their current actual health values;

[0023] (b) Client working status monitoring: the main process sends cancel, refresh, renew, close, and freeze instructions to Redis according to needs. The redundant management object periodically reads the status in Redis, responds according to the instructions, and generates callback functions to control its corresponding business logic work.

[0024] When the step 2 is working, each business logic actively and non-periodically reports its actual health value to the corresponding redundant management object, and the redundant management object periodically sends the working status of each business logic to Redis. The primary and standby processes each read the status in Redis, monitor the working status of the client working inside this column, and perform corresponding operations according to the actual situation.

[0025] In step 2, when the main process monitors the working status of the client working in this column, if the working status health value Hs in this column is above the threshold, when the heartbeat of one or more business logics cannot be received, the corresponding client is restarted; if the working status health value Hs in this column is below the preset value, the size of Hs and Hm is further compared. If the current standby health value is lower than that of the host, the host continues to work, and when one or more business logic heartbeats cannot be received, the corresponding client is restarted; if the health value of the standby is higher than that of the host, the host initiates a switching event and turns on the switching module;

[0026] When the standby process monitors the working status of the client working inside this column, it is used to control the corresponding client to restart according to the actual situation, or kill the process and restart; among them, if the process still exists but does not send a heartbeat, and it is still in this state after several cycles, it will be killed and restarted. If the process does not exist, it will be restarted directly. At the same time, it only responds to the host switching event to switch.

[0027] The calculation of Hs and Hm is ∑actual health value*preset weight; the threshold value is ∑default health value*preset weight.

[0028] The step 3 comprises the following steps:

[0029] Step 31: Determine whether the pre-switching preparation work of the current main process is completed, if so, proceed to step 32;

[0030] Step 32: Determine whether the pre-switching preparation work of the current standby process is completed, if so, proceed to step 33;

[0031] Step 33: Determine whether the switching work of the current main process is completed, if so, proceed to step 34;

[0032] Step 34: Determine whether the switching work of the current standby process is completed. When the above four steps are all executed, it is determined that the switching work is completed.

[0033] The step 3 includes a step of determining whether to confirm the switch before the active-standby switch is formally performed: first, determining whether the empty switch parameter is empty; if not, determining that a switch is required; and further determining whether there is an abnormality in the switch parameter; if in a normal state, locking the current state for 5 minutes; if there is no adjustment, notifying the system to start the switch to further improve the reliability and stability of the entire system.

[0034] The beneficial effects of the present invention are as follows: the two redundant management processes serve as the primary and backup for each other, and are configured with the same redundant management object. The data and instruction interaction between the two redundant management processes and the client is performed through Redis. The redundant management process periodically reports each received business logic event to Redis, and Redis stores the relevant data or instructions after receiving them. The two redundant management processes respectively read the status of the business processes in their respective queues in Redis, and monitor each other's working status health values ​​through heartbeats to determine whether switching is required according to actual conditions, thereby avoiding the occurrence of business logic failures due to downtime or power outages, and effectively ensuring the smooth execution of business on the power plant side.

[0035] When making a switching judgment, a double comparison is made between the health value of the primary and backup work queues and the threshold, and between the health values ​​of the primary and backup work queues to determine that the current primary and backup processes are indeed inappropriate. Only then will the switching be performed to ensure that the entire system is always under the optimal primary queue control.

[0036] When switching, first complete the switching preparation work of the primary and standby processes, and then perform the confirmation work of the completion of the switching of the primary and standby processes. When all four states are confirmed, the switching process is confirmed to be completed, which can effectively ensure the smooth progress of the switching work. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a schematic diagram of the overall system architecture;

[0038] Figure 2 It is a process management flow chart;

[0039] Figure 3 It is a schematic diagram of the switching event flow;

[0040] Figure 4 This is a diagram of the business logic workflow. DETAILED DESCRIPTION

[0041] The present invention is further described in detail below with reference to specific embodiments.

[0042] A nuclear power information system server active-standby redundant framework management system provided by the present invention comprises: two redundant management processes (column A and column B) configured with the same redundant management object, each redundant management object is respectively connected to the redundant management process through a corresponding thread to realize the working status message reporting and control between each business logic of the client and the redundant management process, and is used to specify the control and management of multiple business logics of the client, and the two redundant management processes are respectively connected through heartbeat and Redis communication to exchange information and determine whether to switch according to the active-standby status information of the server.

[0043] Among them, each client (all service processes on the server that need to ensure their reliability through hot standby redundancy strategy) includes a redundant management process and multiple business logics. The redundant management process is used to manage the business logics in the corresponding client, which can be implemented through callback functions. The business logic of the client includes registration (active), cancellation, refresh, renewal, and closing (executed after receiving instructions from the redundant server) and other operations to achieve the following functions:

[0044] (1) Register instance information to the management process;

[0045] (2) Send heartbeat updates and manage process leases;

[0046] (3) When the service is shut down, the lease is canceled from the management process and the service is offline;

[0047] (4) When the health value or status changes, update the instance information registered in the management process.

[0048] When the client is working normally, each business logic reports its working status to the redundancy management process aperiodically, including the health value of the business logic. The redundancy management process periodically reports the working status of the received business logic to Redis through the corresponding process.

[0049] The two redundant management processes serve as the main and backup for each other (the main process is in Master mode, and the backup process is in Slave mode), and are configured with the same redundant management objects and business logic. The data and command interactions between them and the client are carried out through Redis. The redundant management process periodically reports the received business logic events to Redis, and Redis stores the relevant data or commands after receiving them. The two redundant management processes read the status of the business logic in their respective queues in Redis respectively, and monitor each other's working status health values ​​through heartbeats to determine whether switching is required based on actual conditions. When switching is executed, the backup process converted to the main process can directly read the data and information required for its normal operation (the working status and working data of each business logic before the conversion) from Redis, effectively avoiding downtime or power outages.

[0050] In addition to Redis, other distributed databases may also be used to implement communication between two redundant management processes and redundant management objects.

[0051] Corresponding to the above structure, a method for managing a primary and standby redundant framework of a nuclear power information system server includes the following steps:

[0052] Step 1: Initialization

[0053] like Figure 2 As shown, when starting to work, one of the redundant management processes is used as the main process (which can be set manually or selected by the system arbitrarily). After the main process starts working, another redundant management process is started as the backup process, and a connection is established between the main and backup processes and the client (a script is established to pull up the various business logics of the client). The client starts to work, including establishing a heartbeat. At the same time, each redundant management object of the client determines whether to output business interaction information based on the main and backup identifiers. The main process outputs, and the backup process does not output.

[0054] In addition, for some special cases, the initialization workflow is:

[0055] (a) When the main process fails to start or there is no main process, and the backup process fails to find the main process after several heartbeat cycles, the backup process automatically switches to the main process to work;

[0056] (b) When the hardware of the business logic needs to be repaired or replaced, the current active and standby processes are forcibly switched through external instructions to replace or repair the hardware of the business logic, and then the process that is passively switched to the active process will work.

[0057] Step 2: Work status monitoring

[0058] (a) Status monitoring between the master and standby processes: The master and standby processes monitor each other's working status through heartbeat signals, including their current actual health values;

[0059] (b) Client working status monitoring

[0060] The main process sends cancel, refresh, renew, close, and freeze instructions to Redis as needed. The redundant management object periodically reads the status in Redis, responds according to the instructions, and generates callback functions to control its corresponding business logic work.

[0061] When working, each business logic actively and non-periodically reports its actual health value to the corresponding redundant management object. The redundant management object periodically (through heartbeat) sends the working status of each business logic to Redis. The primary and standby processes read the status in Redis respectively, monitor the working status of the client working inside this column, and perform corresponding operations according to the actual situation.

[0062] When the main process monitors the working status of the client working inside this column, if the working status health value Hs in this column is above the threshold, when the heartbeat of one or more business logics cannot be received, the corresponding client is restarted (according to the actual situation, the corresponding client is controlled to restart, or the process is killed and then restarted; wherein, if the process still exists but has not sent a heartbeat, and it is still in this state after several cycles, it is killed and restarted, if the process does not exist, it is directly restarted); if the working status health value Hs in this column is below the preset value, Hs and Hm (the health value of the node in the "main" state) are further compared. If the current standby machine health value is lower than the host, the host continues to work, and when one or more business logic heartbeats cannot be received, the corresponding client is restarted (according to the actual situation, the corresponding client is controlled to restart, or the process is killed and then restarted; wherein, if the process still exists but has not sent a heartbeat, and it is still in this state after several cycles, it is killed and restarted, if the process does not exist, it is directly restarted); if the health value of the standby machine is higher than that of the host, the host initiates a switching event and turns on the switching module;

[0063] When the standby process monitors the working status of the client working inside this column, it is used to control the corresponding client to restart according to the actual situation, or kill the process and restart; if the process still exists but does not send heartbeats, and it is still in this state after several cycles, it will be killed and restarted; if the process does not exist, it will be restarted directly. At the same time, it only responds to the host switching event to switch.

[0064] Furthermore, the calculation of the above Hs and Hm is ∑actual health value*preset weight; the threshold value is ∑default health value*preset weight.

[0065] Step 3: Active / standby switch

[0066] like Figure 3 As shown, the active / standby switching includes the following steps:

[0067] Step 31: Determine whether the pre-switching preparation work of the current main process is completed, if yes, proceed to step 32;

[0068] Step 32: Determine whether the pre-switching preparation work of the current standby process is completed, if yes, proceed to step 33;

[0069] Step 33: Determine whether the switching work of the current main process is completed, if so, proceed to step 34;

[0070] Step 34: Determine whether the switching work of the current standby process is completed. When the above four steps are all executed, it is determined that the switching work is completed.

[0071] Before the switch is officially executed, the current main process needs to release permissions. The main process informs the client of the switch event through the callback function. The client can implement the necessary preparations before the switch (for example, releasing resources, data backup, etc.) in the callback function it implements. When all clients complete the call of their callback functions, if all callback functions return normal, the switch preparation is considered normal, and then the actual switch is performed. If the switch preparation is abnormal, the health value of the working status in this column is re-evaluated, and the working status before the switch is returned, and the original main process continues to work;

[0072] When switching is performed, the standby process converted to the main process can directly read the data and information required for its normal operation (the working status and working data of each business logic before the conversion) from Redis.

[0073] Furthermore, before the active-standby switching work is officially carried out, it also includes a step to determine whether to confirm the switching: first, determine whether the switching empty parameter is empty. If not, determine that switching is required, and further determine whether there is an abnormality in the switching parameter. If it is in a normal state, lock the current state for 5 minutes. If there is no adjustment, notify the system to start switching, so as to further improve the working reliability and stability of the entire system.

[0074] Figure 4 The following is a schematic diagram of the business workflow. Taking Client A as an example, when the node on Client A needs to register, it completes its registration work on the active process according to steps 1 / 2 / 3 / 5, and then the system goes to steps 4 / 5 (executing the client working status monitoring in step 2) and steps 6 and 7 (executing the monitoring between the active and standby processes in step 2).

[0075] In step 4, redundancy management service A obtains the status of whether the process of Client A is alive through the heartbeat protocol. If Client A is alive, nothing is done. On the contrary, if the process of Client A is no longer alive, it goes to step 5, that is, automatically restarting the process of Client A.

[0076] If it is determined that active-standby switching is required when executing step 2, the following takes Client B as an example. When executing step 14 to determine that switching is required, execute step 8 in sequence to set the state of the host to be switched, and then each service process in step 9 obtains the switching request through redis. When the switching conditions are met, the callback function is called to save the scene to prepare for the switching, that is, step 10. After all switching transitions are completed on each host, execute 13 to call the callback function to end the switching process, and finally execute step 15 to clean up the cache to complete the corresponding switching.

Claims

1. A nuclear power information system server main and standby redundant framework management system, characterized by: It includes two redundant management processes, the redundant management processes are configured with the same redundant management object, the redundant management objects are respectively connected to the redundant management processes through corresponding threads to realize the reporting and control of working status messages between each business logic of the client and the redundant management process, and is used to specify the control and management of multiple business logics of the client. The two redundant management processes are respectively connected through heartbeat and Redis communication to exchange information and determine whether to switch according to the master-slave status information of the server; The client's business logic includes registration, cancellation, refresh, renewal, and closing; The two redundant management processes are mutually primary and standby, the main process is in Master mode, and the standby process is in Slave mode, and are configured with the same redundant management objects and business logic. The data and instruction interaction between them and the client is carried out through Redis. The redundant management process periodically reports each received business logic event to Redis, and Redis stores the relevant data or instructions after receiving them. The two redundant management processes read the status of the business logic in their respective queues in Redis respectively, and monitor each other's working status health value through heartbeats to determine whether switching is required according to actual conditions. When switching is executed, the standby process converted to the main process can directly read the data and information required for its normal operation from Redis; When the main process monitors the working status of the client working inside the process, if the working status health value Hs in the process is above the threshold, when the heartbeat of one or more business logics cannot be received, the corresponding client is restarted; if the working status health value Hs in the process is below the preset value, the size of Hs and Hm is further compared. If the current standby process health value is lower than the host, the host continues to work. When the heartbeat of one or more business logics cannot be received, the corresponding client is restarted; if the health value of the standby process is higher than that of the host, the host initiates a switching event and turns on the switching module; Hm is the health value of the node in the "standby" state; When the standby process monitors the working status of the client working inside the process, it is used to control the corresponding client to restart according to the actual situation, or kill the process and then restart; among them, if the process still exists but has not sent a heartbeat, and it is still in this state after several cycles, it will be killed and restarted. If the process does not exist, it will be restarted directly. At the same time, it only responds to the host switching event to switch.

2. A nuclear power information system server main-standby redundant framework management system as claimed in claim 1, characterized in that: It also includes a client, which includes a redundant management process and multiple business logics. The redundant management process is used to manage the business logics in the corresponding client, and the business logic of the client is realized through a callback function.

3. A nuclear power information system server main-standby redundant framework management system as claimed in claim 2, characterized in that: The client's business logic includes registration, cancellation, refresh, renewal, and closing, and implements the following functions: (1) Register instance information to the management process; (2) Send heartbeat updates and manage process leases; (3) When the service is shut down, the lease is canceled from the management process and the service is taken offline; (4) When the health value or status changes, update the instance information registered in the management process.

4. A nuclear power information system server main-standby redundant framework management system as claimed in claim 2, characterized in that: When the client is working normally, each business logic reports its own working status to the redundant management process non-periodically, including the health value of the business logic, and the redundant management process periodically reports the working status of the received business logic to Redis through the corresponding process.

5. A method for managing a primary and standby redundant framework of a nuclear power information system server, characterized in that: The following steps are involved: Step 1: Initialization; Step 2: Work status monitoring; Step 3: Active / standby switching; In the step 1, when starting to work, one of the redundant management processes is used as the main process. After the main process works, another redundant management process is started as the backup process, and a connection between the main and backup processes and the client is established. The client starts to work, including establishing a heartbeat. At the same time, each redundant management object of the client determines whether to output business interaction information according to the main and backup identifiers. The main process outputs, and the backup process does not output; In step 1, when the main process fails to start or there is no main process, the backup process cannot find the main process after several heartbeat cycles when it is started, and the backup process automatically switches to the main process to work; In step 1, when the hardware of the business logic needs to be repaired or replaced, the current active and standby processes are forcibly switched through external instructions to replace or repair the hardware of the business logic, and then the process that is passively switched to the active process works; The client's business logic includes registration, cancellation, refresh, renewal, and closing; The step 2 comprises: (a) Status monitoring between the master and standby processes: The master and standby processes monitor each other's working status through heartbeat signals, including their current actual health values; (b) Client working status monitoring: the main process sends cancel, refresh, renew, close, and freeze instructions to Redis according to the needs. The redundant management object reads the status in Redis regularly, responds according to the instructions, and generates callback functions to control its corresponding business logic work; In step 2, when the main process monitors the working status of the client working inside the process, if the working status health value Hs in the process is above the threshold, when the heartbeat of one or more business logics cannot be received, the corresponding client is restarted; if the working status health value Hs in the process is below the preset value, the size of Hs and Hm is further compared. If the current standby process health value is lower than the main process, the main process continues to work, and when the heartbeat of one or more business logics cannot be received, the corresponding client is restarted; if the health value of the standby process is higher than that of the main process, the main process initiates a switching event and turns on the switching module; Hm is the health value of the node in the "standby" state; When the standby process monitors the working status of the client working inside the process, it is used to control the corresponding client to restart according to the actual situation, or kill the process and then restart; among them, if the process still exists but has not sent a heartbeat, and it is still in this state after several cycles, it will be killed and restarted. If the process does not exist, it will be restarted directly. At the same time, it only responds to the host switching event to switch.

6. A method for managing a primary and standby redundant framework of a nuclear power information system server according to claim 5, characterized in that: When the step 2 is working, each business logic actively and non-periodically reports its actual health value to the corresponding redundant management object, and the redundant management object periodically sends the working status of each business logic to Redis. The primary and standby processes each read the status in Redis, monitor the working status of the client that performs internal work, and perform corresponding operations according to the actual situation.

7. A method for managing a primary and standby redundant framework of a nuclear power information system server according to claim 5, characterized in that: The calculation of Hs and Hm is ∑actual health value*preset weight; the threshold value is ∑default health value*preset weight.

8. A method for managing a primary and standby redundant framework of a nuclear power information system server according to claim 5, characterized in that: The step 3 comprises the following steps: Step 31: Determine whether the pre-switching preparation work of the current main process is completed, if so, proceed to step 32; Step 32: Determine whether the pre-switching preparation work of the current standby process is completed, if so, proceed to step 33; Step 33: Determine whether the switching work of the current main process is completed, if so, proceed to step 34; Step 34: Determine whether the switching work of the current standby process is completed. When the above four steps are all executed, it is determined that the switching work is completed.

9. A method for managing a primary and standby redundant framework of a nuclear power information system server according to claim 5, characterized in that: The step 3 includes a step of determining whether to confirm the switch before the active-standby switch is formally performed: first, determining whether the switch parameter is empty; if not, determining that a switch is required; and further determining whether there is an abnormality in the switch parameter; if in a normal state, locking the current state for 5 minutes; if there is no adjustment, notifying the system to start the switch to further improve the reliability and stability of the entire system.