CN117873780A - Data backup and recovery method and system of controller - Google Patents

Data backup and recovery method and system of controller Download PDF

Info

Publication number
CN117873780A
CN117873780A CN202311775432.5A CN202311775432A CN117873780A CN 117873780 A CN117873780 A CN 117873780A CN 202311775432 A CN202311775432 A CN 202311775432A CN 117873780 A CN117873780 A CN 117873780A
Authority
CN
China
Prior art keywords
data
controller
cnt
controllers
network system
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
Application number
CN202311775432.5A
Other languages
Chinese (zh)
Inventor
江劼
柳志林
史维忻
朱晨晟
王靖
戴雪婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Electrical Automation D&r Institute Co ltd
Original Assignee
Shanghai Electrical Automation D&r Institute Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shanghai Electrical Automation D&r Institute Co ltd filed Critical Shanghai Electrical Automation D&r Institute Co ltd
Priority to CN202311775432.5A priority Critical patent/CN117873780A/en
Publication of CN117873780A publication Critical patent/CN117873780A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

The invention is applied to the field of environmental protection, in particular to a data backup and recovery method and system of a controller. The invention is realized by the intelligent algorithm that a plurality of programmable logic controllers in the same network system are used for communication and mutually carrying out data backup and data recovery according to different conditions. The intelligent algorithm has strong real-time performance, continuously runs together with the operation instructions in the programmable logic controller, can continuously monitor related analog quantity data for 24 hours without manual intervention. Meanwhile, the intelligent algorithm has strong stability, intelligent data backup is performed in real time according to the relation between real-time analog data and backup analog data, abnormal analog data is recovered at the first time under abnormal conditions, continuity and accuracy of the data are ensured, and a large amount of manual work is needed for checking and recovering abnormal data when the abnormal data occur.

Description

Data backup and recovery method and system of controller
Technical Field
The invention is applied to the field of environmental protection, in particular to a data backup and recovery method and system of a controller.
Background
Programmable logic controllers are digital operation electronic systems designed specifically for use in an industrial environment. It adopts a programmable memory, in its interior is stored the instruction for executing logic operation, sequence control, timing, counting and arithmetic operation, etc. and utilizes digital or analog input and output to control various mechanical equipments or production processes.
The data within a programmable logic controller is generally divided into digital and analog quantities. The numerical quantities have only two opposite operating states, generally denoted 0 and 1. The analog quantity is a continuously changing physical quantity such as pool level, water flow rate, etc.
Within a network system, there are often multiple programmable logic controllers. A large amount of analog data is stored in each programmable logic controller. Many data need to be recorded continuously and uninterrupted without interruption during recording. For example, the accumulated analog data such as accumulated running time record of the equipment, when the equipment reaches a certain accumulated running time, the equipment needs to be overhauled and maintained, so that the equipment is ensured to be in a good working condition. And meanwhile, the accumulated running time of the related equipment is subjected to zero clearing operation so as to record the accumulated running time of the equipment of a new round.
When the operation instruction in the programmable logic controller needs to be updated, the instruction needs to be downloaded into the programmable logic controller in the programmable logic controller, and meanwhile, analog data in the memory can be covered by offline data, so that analog data such as accumulated running time of equipment is inconsistent with reality; if the programmable logic controller fails, the analog data stored in the memory may be lost completely, which may seriously affect normal production and equipment operation and maintenance.
Disclosure of Invention
Aiming at the defects of the existing programmable logic controller, the invention provides a data backup and recovery method and system of the controller, and solves the problems of incorrect data and data loss of the existing programmable logic controller under the normal use condition.
The invention provides the following technical scheme:
a data backup and recovery method for controllers, a network system is composed of multiple controllers connected by communication, includes the following steps,
step S100: the current real-time Data in the current controller is recorded as Data, the zero clearing times of the current real-time Data in the current controller is recorded as Cnt, and the Data backed up to other controllers in the network system is recorded as Data b The number of times of data zero clearing backed up to other controllers in the network system is recorded as Cnt b
Step S200: if cnt=cnt b Step S300 is entered, otherwise step S400 is entered;
step S300: if Data is>Data b Step S500 is performed if Data<Data b Step S600 is performed;
step S400: if Cnt>Cnt b Step S500 is performed if Cnt<Cnt b Step S600 is performed;
step S500: writing Cnt into Cnt b Writing Data into Data b
Step S600: will Cnt b Data of (1) is restored to Cnt, data is obtained b Is restored to Data.
Preferably, the controller is a programmable logic controller.
Preferably, the data is analog data.
Preferably, the plurality of controllers are connected in an end-to-end manner. The connection mode is reasonable in layout, and the communication efficiency is more efficient and stable.
Preferably, the current controller can be used as a backup controller for data backup and recovery by associating the current controller with its neighboring controllers. The arrangement is convenient to install and debug. If the data needed to be backed up by all the controllers in the network system are backed up in one or several controllers in the network system, when one or several controllers fail, the data backup and recovery functions of all or a part of the controllers are affected. In this example, the backup and recovery of the local controller data is only related to 2 adjacent controllers connected by communication, and the local controller failure only affects the backup and recovery of the data of the 2 adjacent controllers, but not the backup and recovery functions of the data of other controllers in the network system, so that the communication of the whole network system is more efficient, and the backup and recovery functions of the data of all controllers on the whole network system are more stable.
Preferably, the controller has a unique identification ID, and the current controller can be associated with the backup controller for data backup and recovery through the identification ID.
A controller system is composed of a network system consisting of multiple controllers connected by communication, and intelligent backup algorithm module and intelligent recovery algorithm module,
the intelligent backup algorithm module is a module which is operated when the controller in the network system works normally and is used for backing up related data in the current controller to other controllers in the network system;
the intelligent recovery algorithm module is used for recovering the related data which are backed up in real time on other controllers in the network system to the current controller when the current controller fails or the data in the related memory are abnormal.
Preferably, a controller system operates a method of data backup and recovery of a controller as described in any of the preceding.
Compared with the prior art, the invention has the beneficial effects that: the invention is realized by the intelligent algorithm that a plurality of programmable logic controllers in the same network system are used for communication and mutually carrying out data backup and data recovery according to different conditions. The intelligent algorithm consists of an intelligent data backup algorithm module and an intelligent data recovery algorithm module.
(1) The intelligent algorithm has strong real-time performance. The intelligent algorithm runs continuously together with the operation instructions in the programmable logic controller, and can continuously monitor related analog quantity data for 24 hours without manual intervention.
(2) The intelligent algorithm has strong stability. The intelligent algorithm performs intelligent data backup in real time according to the relation between the real-time analog data and the backup analog data, recovers the abnormal analog data at the first time under the abnormal condition, ensures the continuity and the accuracy of the data, and avoids the need of a large amount of manual work for checking and recovering the abnormal data when the abnormal data occurs.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flow chart of the network operation of the intelligent algorithm in an embodiment of the present invention;
FIG. 2 is a flow chart illustrating the operation of the intelligent backup algorithm module in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart illustrating the operation of the intelligent recovery algorithm module in an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Because of the hardware limitation of a single programmable logic controller, the invention is realized by an intelligent algorithm which performs communication among a plurality of programmable logic controllers in the same network system, performs data backup and data recovery according to different conditions. The intelligent algorithm consists of an intelligent data backup algorithm module and an intelligent data recovery algorithm module. The flow chart of the network for the operation of the intelligent algorithm is shown in fig. 1.
1. Intelligent backup algorithm module: and the module is used for backing up related data in the current programmable logic controller to adjacent programmable logic controllers in the network system.
The relevant parameters are current real-time analog quantity Data in the current programmable logic controller and are recorded as Data; the number of zero clearing times of current real-time analog quantity data in the current programmable logic controller is recorded as Cnt; analog Data backed up to other programmable logic controllers in the network system, denoted as Data b The method comprises the steps of carrying out a first treatment on the surface of the The zero clearing times of the analog quantity data backed up to other programmable logic controllers in the network system is recorded as Cnt b
Generally, in the current programmable logic controller, when the zero clearing operation is not performed on the analog data, the analog data will continue to increase, and at this time, the module will compare the related data, i.e. cnt=cnt b ,Data>Data b . In this case, the module will write Cnt into Cnt b Writing Data into Data b . It should be noted here that cnt=cnt is generally performed first b If cnt=cnt b Data is performed>Data b Is determined by the (a).
When the analog Data in the current programmable logic controller is subjected to the over-zero clearing operation, the analog Data in the current programmable logic controller is smaller than the analog Data b Small, but Data is the correct analog Data. At this time, the module compares the related data, namely Cnt>Cnt b ,Data<Data b . In this case, the module will write Cnt into Cnt b Writing Data into Data b . At pair Cnt>Cnt b ,Data<Data b When the condition is judged, only Cnt is judged>Cnt b When it is time, it can write Data into Data b That is, if Cnt is judged>Cnt b No need to carry out Data again<Data b Conditional determination of (2) can be performed to write Data into Data b
If the backup programmable logic controller in the network system fails, the module can still backup the analog data to be backed up in the current programmable logic controller in real time when the failure is recovered. Even if the network system fails, the communication among all the programmable logic controllers is interrupted, and the operation of the module is not influenced. Once the network system is restored to normal, the module still can automatically perform backup operation according to the relation of the related data.
A flowchart of the operation of the intelligent backup algorithm module is shown in fig. 2.
2. And an intelligent recovery algorithm module: when the current programmable logic controller fails or analog data in the related memory is abnormal, the module restores the related data backed up in real time on the adjacent programmable logic controller in the network system to the current programmable logic controller.
When the current programmable logic controller fails, all analog data in the replaced new programmable logic controller are lost, and the module compares the related data at the moment, namely Cnt is less than or equal to Cnt b ,Data<Data b . In this case, the module will Cnt b Data of (1) is restored to Cnt, data is obtained b Is restored to Data.
When the operation instruction in the programmable logic controller is updated, the instruction is downloaded into the programmable logic controller, and analog data in the memory is covered by offline data, and the module compares the related data, namely Cnt is less than or equal to Cnt b ,Data<Data b . In this case, the module will Cnt b Data of (1) is restored to Cnt, data is obtained b Is restored to Data.
It should be noted here that cnt=cnt is generally performed first b If cnt=cnt b Data is performed<Data b If Data is judged<Data b In this case, the module will Cnt b Data of (1) is restored to Cnt, data is obtained b Is restored to Data; if Cnt is not equal to Cnt b Then Cnt is less than Cnt b Is Cnt < Cnt b Then no Data is needed<Data b Is judged by (a)In this case, the module will send Cnt b Data of (1) is restored to Cnt, data is obtained b Is restored to Data.
The flow chart of the operation of the intelligent recovery algorithm module is shown in fig. 3.
When the data in the controller is less, the controller fails or the data is abnormal, the history of the related data can be manually carried out, the nodes with abnormal data are judged according to the history, and then the data is manually recovered. If the data in the controller is very much, once the controller is in fault or abnormal, a great deal of time, manpower and material resources are consumed for recovering the data, and the efficiency is very low. This problem can be solved exactly by using the method. When the situation occurs, the related data is recovered at the first time when the controller is recovered to be normal, so that the problem that a great amount of time, manpower and material resources are consumed for manually recovering the data is avoided, and the accuracy and stability of the data are quickly recovered, so that the whole system is recovered to be normal as soon as possible.
It is noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, 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.
Finally, it should be noted that: the foregoing description is only a preferred embodiment of the present invention, and the present invention is not limited thereto, but it is to be understood that modifications and equivalents of some of the technical features described in the foregoing embodiments may be made by those skilled in the art, although the present invention has been described in detail with reference to the foregoing embodiments. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (8)

1. A data backup and recovery method for controllers, a network system is composed of multiple controllers connected by communication, and features that it includes following steps,
step S100: the current real-time Data in the current controller is recorded as Data, the zero clearing times of the current real-time Data in the current controller is recorded as Cnt, and the Data backed up to other controllers in the network system is recorded as Data b The number of times of data zero clearing backed up to other controllers in the network system is recorded as Cnt b
Step S200: if cnt=cnt b Step S300 is entered, otherwise step S400 is entered;
step S300: if Data is>Data b Step S500 is performed if Data<Data b Step S600 is performed;
step S400: if Cnt>Cnt b Step S500 is performed if Cnt<Cnt b Step S600 is performed;
step S500: writing Cnt into Cnt b Writing Data into Data b
Step S600: will Cnt b Data of (1) is restored to Cnt, data is obtained b Is restored to Data.
2. The method for backing up and recovering data of a controller according to claim 1, wherein the controller is a programmable logic controller.
3. The method for backing up and recovering data of a controller according to claim 1, wherein said data is analog data.
4. The method for backing up and recovering data of a controller according to claim 1, wherein the plurality of controllers are connected end to end in a communication manner.
5. The method for backing up and recovering data of a controller according to claim 4, wherein in the step S100, the other controller is a controller adjacent to the current controller.
6. The method for backing up and recovering data of a controller according to claim 1, wherein said controller has a unique identification ID.
7. A controller system is composed of a network system consisting of multiple controllers, and is characterized by including intelligent backup algorithm module and intelligent recovery algorithm module,
the intelligent backup algorithm module is a module which is operated when the controller in the network system works normally and is used for backing up related data in the current controller to other controllers in the network system;
the intelligent recovery algorithm module is used for recovering the related data which are backed up in real time on other controllers in the network system to the current controller when the current controller fails or the data in the related memory are abnormal.
8. A controller system according to claim 7, wherein a method of backing up and recovering data of a controller according to any one of claims 1 to 6 is performed.
CN202311775432.5A 2023-12-22 2023-12-22 Data backup and recovery method and system of controller Pending CN117873780A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311775432.5A CN117873780A (en) 2023-12-22 2023-12-22 Data backup and recovery method and system of controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311775432.5A CN117873780A (en) 2023-12-22 2023-12-22 Data backup and recovery method and system of controller

Publications (1)

Publication Number Publication Date
CN117873780A true CN117873780A (en) 2024-04-12

Family

ID=90589347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311775432.5A Pending CN117873780A (en) 2023-12-22 2023-12-22 Data backup and recovery method and system of controller

Country Status (1)

Country Link
CN (1) CN117873780A (en)

Similar Documents

Publication Publication Date Title
US6970804B2 (en) Automated self-learning diagnostic system
CA2856308C (en) Program flow control monitoring routines, related methods and systems
US20180267858A1 (en) Baseboard Management Controller To Deconfigure Field Replaceable Units According To Deep Learning Model
Frank et al. Reinforcement learning in the presence of rare events
Dekker et al. Marginal cost criteria for preventive replacement of a group of components
CN114584539B (en) Cloud upgrading method and system for industrial field device
WO2004036349A2 (en) Process for determining competing cause event probability and/or system availability during the simultaneous occurrence of multiple events
KR950022386A (en) Common Control Redundant Switch Method
JP2011138251A (en) Monitoring control network system
CN117873780A (en) Data backup and recovery method and system of controller
US10579558B1 (en) Flexible redundant input/output (I/O) schemes for I/O channels
KR102185017B1 (en) Integrated information management and predictive maintenance system for gas supply facilities
CN117313019B (en) Data anomaly detection method based on deep reinforcement learning
Kareer et al. An S-shaped software reliability growth model with two types of errors
CN103210358B (en) Intelligent visual when monitoring process parameter and/or equipment parameter
CN114341814A (en) Efficient fault analysis by simulating faults in digital twinning
CN1893339A (en) Continuous median failure control system and method
CN114741220A (en) Disk isolation method, system, device and storage medium
Esposito et al. A prescriptive maintenance policy for a gamma deteriorating unit
Kapadia et al. Real world model-based fault management
CN111208386A (en) Power distribution network fault rapid positioning method adaptive to topology change and information error
JP6096397B1 (en) Analysis system and analysis method
CN117387925B (en) Damper performance continuous test method and system
CN116028078B (en) Software remote upgrading method based on VPN technology
CN115374654B (en) Method and system for evaluating elasticity of power system

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