CN110083086B - Method and device for storing operation data of process control device - Google Patents

Method and device for storing operation data of process control device Download PDF

Info

Publication number
CN110083086B
CN110083086B CN201910227438.6A CN201910227438A CN110083086B CN 110083086 B CN110083086 B CN 110083086B CN 201910227438 A CN201910227438 A CN 201910227438A CN 110083086 B CN110083086 B CN 110083086B
Authority
CN
China
Prior art keywords
data
process control
control device
current
equipment
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.)
Active
Application number
CN201910227438.6A
Other languages
Chinese (zh)
Other versions
CN110083086A (en
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.)
719th Research Institute of CSIC
Original Assignee
719th Research Institute of CSIC
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 719th Research Institute of CSIC filed Critical 719th Research Institute of CSIC
Priority to CN201910227438.6A priority Critical patent/CN110083086B/en
Publication of CN110083086A publication Critical patent/CN110083086A/en
Application granted granted Critical
Publication of CN110083086B publication Critical patent/CN110083086B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/04Programme control other than numerical control, i.e. in sequence controllers or logic controllers
    • G05B19/042Programme control other than numerical control, i.e. in sequence controllers or logic controllers using digital processors
    • G05B19/0423Input/output
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/23Pc programming
    • G05B2219/23051Remote control, enter program remote, detachable programmer

Abstract

The embodiment of the invention provides a method and a device for storing running data of a process control device, wherein the method comprises the following steps: acquiring current operation data of each device in the process control device; and if the current running state of the first equipment is judged to be different from the running state of the first equipment in the last acquisition cycle, packaging the current running data of the first equipment into a data packet according to a preset data packet structure, and storing the data packet into a first partition in the storage medium. According to the method and the device for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless and reversible, the data reading and management are convenient, more kinds of device operation data can be stored, and the storage time of the operation data of the process control device is prolonged.

Description

Method and device for storing operation data of process control device
Technical Field
The embodiment of the invention relates to the technical field of data storage, in particular to a method and a device for storing running data of a process control device.
Background
The operation parameter storage device of the process control device is a key device for implementing integrated management of the integrated control system of the process control device. The operation parameter storage device of the process control device can automatically store important operation data timely and accurately. The stored data can be used for operational analysis of the process control device and for analysis of the accident situation.
In the prior art, methods for data compression are mostly used for data compression of multimedia information, especially digital video and audio signals, and meanwhile, the data compression in the communication field is also widely applied. Common compression methods include redundancy compression, which is to say, some data may occur repeatedly, some data may occur more frequently than others, some data may occur at predictable positions, and these redundant parts may be removed or reduced in data encoding; correlation compression, that is, correlation between data, can be removed by mathematical methods such as fourier transform and laplace transform, but these transforms bring unrecoverable loss and errors, and are irreversible. For the storage method of the operation data of the process control device, a real-time complete data storage mode is mostly adopted, namely, the process data collected in real time are stored in a medium according to the time sequence without processing, and for the storage of the switching value, 8 parameter states are mostly adopted to form a byte for storage.
However, the proportion of the switching value in the operation parameters of the process control device is large, and with the improvement of the intelligence level of the process control device, the switching values such as state monitoring, equipment on-off state, switch contact signals and the like are greatly improved. Meanwhile, in the storage method in the prior art, the compression ratio of data is limited, and under the condition of the capacity limitation of a storage medium, more process parameters are difficult to store, or the data storage time is difficult to prolong, so that the running time of the process control device is influenced.
Disclosure of Invention
It is an aim of embodiments of the present invention to provide a process control device operational data storage method and apparatus that overcomes, or at least partially solves, the above mentioned problems.
In order to solve the foregoing technical problems, in one aspect, an embodiment of the present invention provides a method for storing operation data of a process control device, including:
acquiring current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device;
and if the current running state of the first equipment is judged to be different from the running state of the first equipment in the last acquisition period, packaging the current running data of the first equipment into a data packet according to a preset data packet structure, and storing the data packet into a first partition in a storage medium.
In another aspect, an embodiment of the present invention provides a process control device operation data storage device, including:
the acquisition module is used for acquiring current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device;
and the storage module is used for packaging the current running data of the first equipment into a data packet according to a preset data packet structure and storing the data packet into a first partition in a storage medium if the current running state of the first equipment is judged to be different from the running state of the first equipment in the last acquisition cycle.
In another aspect, an embodiment of the present invention provides an electronic device, including:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, which when called by the processor are capable of performing the methods described above.
In yet another aspect, the present invention provides a non-transitory computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the above-mentioned method.
According to the method and the device for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless and reversible, the data reading and management are convenient, the operation data of more types of devices can be stored, and the storage time of the operation data of the process control device is prolonged.
Drawings
FIG. 1 is a schematic diagram of a process control device operational data storage method according to an embodiment of the present disclosure;
fig. 2 is a schematic diagram of a default data packet structure according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a process control device operational data storage device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic diagram of a method for storing operation data of a process control device according to an embodiment of the present invention, and as shown in fig. 1, the embodiment of the present invention provides a method for storing operation data of a process control device, the method including:
step S101, obtaining current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device;
step S102, if the current running state of the first equipment is judged to be different from the running state of the first equipment in the last acquisition cycle, packaging the current running data of the first equipment into a data packet according to a preset data packet structure, and storing the data packet into a first partition in a storage medium.
Specifically, a process control device is a key device in a control system, and includes a plurality of devices (components) such as a transmission device, a switching device, a regulating device, and an execution device.
The lifetime of the entire process control device is generally long, for example, 10 years or 15 years, and the single operation period of the process control device is also relatively long, for example, 1 year, and the acquisition period of the operation data in the process control device is generally short, for example, 1 second or 100 milliseconds, compared to the single operation period of the process control device, and therefore, a large amount of operation data is generated in the single operation period of the process control device.
The method for storing the operation data of the process control device, provided by the embodiment of the invention, comprises the steps of firstly, obtaining the current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device.
For example, the process control apparatus includes A, B two devices (components), and when acquiring data, the process control apparatus acquires A, B operation data of the two devices, where the current operation state data of the device a includes the current operation state of the device a, and the current operation state data of the device B includes the current operation state of the device B.
And then, judging whether the current running state of the first equipment in the process control device is the same as the running state of the first equipment in the last acquisition cycle, if the current running state of the first equipment is different from the running state of the first equipment in the last acquisition cycle, packaging the current running data of the first equipment into a data packet according to a preset data packet structure, and storing the data packet into a first partition in a storage medium.
And if the current running state of the first equipment is the same as the running state of the first equipment in the last acquisition period, discarding the current running data of the first equipment.
For example, the process control apparatus includes A, B two devices (components), and when acquiring data, the process control apparatus acquires A, B operation data of the two devices, where the current operation state data of the device a includes the current operation state of the device a, and the current operation state data of the device B includes the current operation state of the device B.
If the running state of the device A at least comprises an opening state and a closing state, the current running state of the device A is opening, the running state of the device A in the last acquisition cycle is closing, the current running state of the device A is different from the running state of the device A in the last acquisition cycle, and at the moment, the current running data of the device A is packaged into a data packet according to a preset data packet structure and stored into a first partition in a storage medium.
If the current running state of the device A is started and the running state of the device A in the last acquisition cycle is also started, the current running state of the device A is the same as the running state of the device A in the last acquisition cycle, and at the moment, the current running data of the device A is discarded.
Because the running state of the equipment in the process control device changes slowly, the running state changes after long-time running, and the jumping time points of the running state are few, the running data of the jumping time points of the running state only need to be stored for the target equipment, and the storage space is greatly saved.
According to the method for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless, the reversibility is realized, the data reading and management are convenient, more types of device operation data can be stored, and the storage time of the operation data of the process control device is prolonged.
On the basis of the above embodiment, further, the current operating state of the target device includes a first state and a second state.
In particular, the operation of the devices in the process control apparatus is mostly switching value data, i.e., the operation states of the devices in the process control apparatus are mostly only two states, which can be represented by binary digits 0 and 1, for example, 0 represents a first state and 1 represents a second state.
For example, the process control apparatus includes A, B two devices (components), and when acquiring data, the process control apparatus acquires A, B operation data of the two devices, where the current operation state data of the device a includes the current operation state of the device a, and the current operation state data of the device B includes the current operation state of the device B.
If the operation state of the A device comprises two states of opening and closing, 0 represents that the operation state of the A device is closing, and 1 represents that the operation state of the A device is opening. And at the moment, packaging the current operating data of the device A into a data packet according to a preset data packet structure, and storing the data packet into a first partition in a storage medium.
According to the method for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless, the reversibility is realized, the data reading and management are convenient, more types of device operation data can be stored, and the storage time of the operation data of the process control device is prolonged.
On the basis of the above embodiments, further, the current operation data of the target device includes a current timestamp, a target device number, and a current operation state of the target device.
Specifically, the current operation data of the target device to be stored may include a current timestamp, a number of the target device, and a current operation state of the target device.
For example, the process control apparatus includes A, B two devices (components), and when acquiring data, the process control apparatus acquires A, B operation data of the two devices, where the current operation state data of the a device may include a current timestamp, a number of the a device, and a current operation state of the a device. The current timestamp refers to the time for acquiring the current operation data of the device a, for example, 18 hours, 20 minutes and 15 seconds, the number of the device a refers to the number of the device a entered into the system at the time of system initialization, and may be SB-101, for example, and the current operation state of the device a may be off or on, for example.
According to the method for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless, the reversibility is realized, the data reading and management are convenient, more types of device operation data can be stored, and the storage time of the operation data of the process control device is prolonged.
On the basis of the foregoing embodiments, further, the current operation data of the target device includes a current timestamp, a target device number, a current operation state of the target device, and a state change identifier, where the state change identifier is used to indicate whether the current operation state of the target device is the same as an operation state of a previous acquisition cycle of the target device.
Specifically, the current operation data of the target device to be stored may include a current timestamp, a target device number, a current operation state of the target device, and a state change identifier, where the state change identifier is used to indicate whether the current operation state of the target device is the same as an operation state of a last acquisition cycle of the target device.
For example, the process control apparatus includes A, B two devices (components), and when acquiring data, the process control apparatus acquires A, B operation data of the two devices, where the current operation state data of the device a may include a current timestamp, a number of the device a, a current operation state of the device a, and a state change identifier. The current timestamp refers to the time for acquiring the current operating data of the device a, for example, 18 hours, 20 minutes and 15 seconds, the number of the device a refers to the number of the device a entered into the system at the time of system initialization, and may be SB-101, for example, and the current operating state of the device a may be off, for example. The state change flag is used to indicate whether the current operating state of the target device is the same as the operating state of the target device in the previous acquisition cycle, for example, if the current operating state of the device a is off and the operating state of the device a in the previous acquisition cycle is on, the state change flag may be 0, and if the state change flag is 0, the state change flag indicates negative jump, that is, the current operating state of the device is off and the operating state of the previous acquisition cycle is on. If the current running state of the device a is on and the running state of the device a in the previous acquisition cycle is off, the state change flag may be 1, and the state change flag is 1, which indicates a forward jump, that is, the current running state of the device is on and the running state of the device a in the previous acquisition cycle is off. When the current running state of the device A is the same as the running state of the previous acquisition cycle, the running data is not stored.
According to the method for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless, the reversibility is realized, the data reading and management are convenient, the operation data of more types of devices can be stored, and the storage time of the operation data of the process control device is prolonged.
On the basis of the above embodiments, further, the preset data packet structure includes a first data block, a second data block, and a third data block;
the first data block, the second data block, and the third data block each include a number of data bits;
the first data block represents the running state of the target equipment;
the second data block represents a target device number;
the third data block represents a time stamp when the run data was acquired.
Specifically, fig. 2 is a schematic diagram of a preset data packet structure according to an embodiment of the present invention, and as shown in fig. 2, the preset data packet structure according to the embodiment of the present invention includes a first data block, a second data block, and a third data block.
The first data block, the second data block and the third data block all comprise a plurality of data bits.
The first data block represents an operational state of the target device.
The second data block represents a target device number.
The third data block represents a time stamp when the run data was acquired.
Suppose that the single-time operation time length of the process control device is d, the operation data information acquisition period of the ith device is s, the number of data bits required by the timestamp is represented as f (d, s), and the number of data bits required by the device number is represented as BnumThe number of data bits required for the run state is denoted CnumWhen the running data includes the status change flag, the number of data bits required by the running status and the status change flag can also be represented as Cnum
Defining the number of data bits required for a single acquisition of operating data for the ith device as a single storage capacity QiThen Q isiCan be expressed by the following formula:
Qi=f(d,s)+Bnum+Cnum
as shown in FIG. 2, the 0 th to ith data bits represent the operation status or represent the operation status and status change flag, and the total number of data bits is CnumI.e. the size of the first data block is Cnum(ii) a The (i + 1) th to the (j) th data bits represent equipment numbers, and the total number of the data bits is BnumI.e. the size of the second data block is BnumThe j +1 th to nth data bits represent a time stamp, and the number of data bits is f (d, s), that is, the size of the third data block is f (d, s).
The number of data bits f (d, s) required for a timestamp may be understood as the total number of data bits representing the timestamp in binary, which may represent any point in time within a single runtime of the process control device. The value of f (d, s) is based on the single operating duration d of the process control device and the number of operating devicesAnd calculating according to the information acquisition period s. For example, when 2n≥d/s>2n -1When f (d, s) is n.
The data packets of the operation data of the same equipment are fixed-length bytes, namely, the byte length of each data packet is fixed, the fixed-length characteristic of the data packets is convenient for computer processing, data combination and data reading can be conveniently carried out, and data management is convenient.
According to the method for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless, the reversibility is realized, the data reading and management are convenient, the operation data of more types of devices can be stored, and the storage time of the operation data of the process control device is prolonged.
On the basis of the foregoing embodiments, further, before acquiring current operation data of each device in the process control apparatus, the method further includes:
calculating a data capacity allocation value of the first partition according to the operation life of the process control device, the single operation time of the process control device, the operation life of the first equipment, the acquisition period of the operation data of the first equipment and the historical operation data of the first equipment;
creating the first partition in the storage medium according to the data capacity allocation value of the first partition, the first partition being dedicated to storing the operational data of the first device.
Specifically, before acquiring current operation data of each device in the process control device, the method further comprises the following steps: and (5) initializing.
In the initialization step, a data capacity allocation value of the first partition is calculated according to the operation life of the process control device, the single operation duration of the process control device, the operation life of the first equipment, the acquisition period of the operation data of the first equipment and the historical operation data of the first equipment.
The operation life of the process control device is M, the single operation time length of the process control device is d, and the estimation of the action response times of the ith equipment in the single continuous operation period of the process control device is BiThe lifetime of the i-th device is WiIf the device can work normally in the whole life cycle of the process control device, the above parameters satisfy the following conditions:
Bi<M/d*Wi
in the whole life cycle of the process control device, normal operation of the ith device must be ensured, so that the response times of the ith device in a single operation break do not exceed the action response average value of the single operation according to the calculation of an average principle.
The historical operation data is obtained by adopting a mathematical statistical method to obtain the average value C of the operation state mutation times of the target equipment in each single operation period of the process control devicemeanMinimum number of mutations CminAnd maximum number of mutations Cmax
And according to a preset algorithm model, calculating a data capacity allocation value of the target partition according to the operation life of the process control device, the single operation time of the process control device, the operation life of the target equipment, the acquisition period of the operation data of the target equipment and the historical operation data of the target equipment. The preset algorithm model is as follows:
Si=F(Qi,Bi,Ci(Cmin.Cmean.Cmax))
wherein S isiA data capacity allocation value, F (Q), representing a partition for storing operation data of the i-th devicei,Bi,Ci(Cmin.Cmean.Cmax) Is Q)i、BiAnd Ci(Cmin.Cmean.Cmax) As a function of (c). QiIndicating the storage capacity required to store a single run of data for the ith device. B isiAn estimate is indicative of the number of action responses of the ith plant during a single continuous run of the process control unit. CiIndicating the ith deviceThe historical operating data of (1), wherein the historical operating data comprises the average value C of the number of sudden changes of the operating state of the ith device in each single operating cycle of the process control devicemeanMinimum number of mutations CminAnd maximum number of mutations Cmax
For example, F (. cndot.) can be expressed by the following equation:
Figure BDA0002005643700000091
wherein S isiA data capacity allocation value, k, representing a partition for storing operation data of the i-th devicei1、Ai1、ki2、Ai2Are all preset constants, QiIndicating the storage capacity required to store a single run of data for the ith device, BiAn estimate representing the number of action responses of the ith plant during a single continuous run of the process control unit, CmaxIndicating the maximum mutation times of the operation state of the ith device in each single operation period of the process control device, M indicating the operation life of the process control device, d indicating the single operation time length of the process control device, WiIndicating the lifetime of the ith device.
When the data capacity allocation value of the target partition is calculated, the data storage capacity of the target partition is set to have larger redundancy, so that abnormal operation of equipment or components is prevented and the maximum number of times of historical use is far exceeded.
And after the data capacity allocation value of the target partition is calculated, the target partition is created in the storage medium according to the data capacity allocation value of the target partition, and the target partition is specially used for storing the running data of the target equipment.
For example, the created first partition is specially used for storing the operation data of the first device, the created second partition is specially used for storing the operation data of the second device, and the storage positions of different operation data of different devices are relatively fixed, so that the data processing difficulty of the computer is further reduced, the stored parameter history data can be directly read and called according to the storage positions, and the data management is facilitated.
According to the method for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless, the reversibility is realized, the data reading and management are convenient, more types of device operation data can be stored, and the storage time of the operation data of the process control device is prolonged.
On the basis of the foregoing embodiments, further, after acquiring current operation data of each device in the process control apparatus, the method further includes:
and if the current running state of the second equipment is judged to be different from the running state of the second equipment in the last acquisition cycle, packaging the current running data of the second equipment into a data packet according to a preset data packet structure, and storing the data packet into a second partition in the storage medium.
Specifically, a process control device is a key device in a control system, and includes a plurality of devices (components) such as a transmission device, a switching device, a regulating device, and an execution device.
After acquiring the current operation data of each device in the process control device, the method further comprises the following steps:
and judging whether the current running state of the second equipment in the process control device is the same as the running state of the second equipment in the last acquisition cycle, if so, packaging the current running data of the second equipment into a data packet according to a preset data packet structure, and storing the data packet into a second partition in the storage medium. And if the current running state of the second equipment is the same as the running state of the second equipment in the last acquisition cycle, discarding the current running data of the second equipment.
For example, the process control apparatus includes A, B two devices (components), and when acquiring data, the process control apparatus acquires A, B operation data of the two devices, where the current operation state data of the device a includes the current operation state of the device a, and the current operation state data of the device B includes the current operation state of the device B.
If the running state of the device A at least comprises an opening state and a closing state, the current running state of the device A is opening, the running state of the device A in the last acquisition cycle is closing, the current running state of the device A is different from the running state of the device A in the last acquisition cycle, and at the moment, the current running data of the device A is packaged into a data packet according to a preset data packet structure and stored into a first partition in a storage medium.
If the current running state of the device A is started and the running state of the device A in the last acquisition cycle is also started, the current running state of the device A is the same as the running state of the device A in the last acquisition cycle, and at the moment, the current running data of the device A is discarded.
If the running state of the B device at least comprises an opening state and a closing state, the current running state of the B device is opened, the running state of the B device in the last acquisition cycle is closed, and the current running state of the B device is different from the running state of the B device in the last acquisition cycle, at the moment, the current running data of the B device is packaged into a data packet according to a preset data packet structure and stored into a first partition in a storage medium.
And if the current running state of the B equipment is started, the running state of the B equipment in the last acquisition cycle is also started, and the current running state of the B equipment is the same as the running state of the B equipment in the last acquisition cycle, and at the moment, the current running data of the B equipment is discarded.
According to the method for storing the operation data of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless, the reversibility is realized, the data reading and management are convenient, the operation data of more types of devices can be stored, and the storage time of the operation data of the process control device is prolonged.
Fig. 3 is a schematic diagram of a process control device operation data storage device according to an embodiment of the present invention, and as shown in fig. 3, an embodiment of the present invention provides a process control device operation data storage device for executing a method described in any one of the above embodiments, and specifically includes an obtaining module 301 and a storing module 302, where:
the obtaining module 301 is configured to obtain current operation data of each device in the process control apparatus, where the current operation data of a target device includes a current operation state of the target device; the storage module 302 is configured to, if it is determined that the current operation state of the first device is different from the operation state of the first device in the previous acquisition cycle, encapsulate the current operation data of the first device into a data packet according to a preset data packet structure, and store the data packet in a first partition in a storage medium.
Specifically, a process control device is a key device in a control system, and includes a plurality of devices (components) such as a transmission device, a switching device, a regulating device, and an execution device.
The lifetime of the entire process control device is generally long, for example, 10 years or 15 years, and the single operation period of the process control device is also relatively long, for example, 1 year, and the acquisition period of the operation data in the process control device is generally short, for example, 1 second or 100 milliseconds, compared to the single operation period of the process control device, and therefore, a large amount of operation data is generated in the single operation period of the process control device.
First, the current operation data of each device in the process control device is acquired through the acquisition module, and the current operation data of the target device includes the current operation state of the target device.
Then, the storage module 302 determines whether the current operating state of the first device in the process control apparatus is the same as the operating state of the first device in the previous acquisition cycle, and if the current operating state of the first device is different from the operating state of the first device in the previous acquisition cycle, the current operating data of the first device is encapsulated into a data packet according to a preset data packet structure and stored in the first partition in the storage medium.
And if the current running state of the first equipment is the same as the running state of the first equipment in the last acquisition period, discarding the current running data of the first equipment.
Because the running state of the equipment in the process control device changes slowly, the running state changes after long-time running, and the jumping time points of the running state are few, the running data of the jumping time points of the running state only need to be stored for the target equipment, and the storage space is greatly saved.
According to the operation data storage device of the process control device, the storage partition corresponding to each device in the process control device is created in the storage medium according to the operation characteristics of each device in the process control device, only the operation data when the operation state is changed is compressed and stored according to the preset data packet structure, the data compression is lossless, the reversibility is realized, the data reading and management are convenient, the operation data of more types of devices can be stored, and the storage time of the operation data of the process control device is prolonged.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 4, the electronic device includes: a processor (processor)401, a memory (memory)402, and a bus 403;
wherein, the processor 401 and the memory 402 complete the communication with each other through the bus 403;
processor 401 is configured to call program instructions in memory 402 to perform the methods provided by the various method embodiments described above, including, for example:
acquiring current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device;
and if the current running state of the first equipment is judged to be different from the running state of the first equipment in the last acquisition period, packaging the current running data of the first equipment into a data packet according to a preset data packet structure, and storing the data packet into a first partition in a storage medium.
In addition, the logic instructions in the memory may be implemented in the form of software functional units and may be stored in a computer readable storage medium when sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Embodiments of the present invention provide a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions that, when executed by a computer, enable the computer to perform the methods provided by the above-mentioned method embodiments, for example, including:
acquiring current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device;
and if the current running state of the first equipment is judged to be different from the running state of the first equipment in the last acquisition period, packaging the current running data of the first equipment into a data packet according to a preset data packet structure, and storing the data packet into a first partition in a storage medium.
Embodiments of the present invention provide a non-transitory computer-readable storage medium, which stores computer instructions, where the computer instructions cause the computer to perform the methods provided by the above method embodiments, for example, the methods include:
acquiring current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device;
and if the current running state of the first equipment is judged to be different from the running state of the first equipment in the last acquisition period, packaging the current running data of the first equipment into a data packet according to a preset data packet structure, and storing the data packet into a first partition in a storage medium.
The above-described embodiments of the apparatuses and devices are merely illustrative, where the units described as separate parts may or may not be physically separate, and the parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A method of storing operational data for a process control device, comprising:
acquiring current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device;
if the current running state of the first equipment is judged to be different from the running state of the first equipment in the last acquisition period, packaging the current running data of the first equipment into a data packet according to a preset data packet structure, and storing the data packet into a first partition in a storage medium;
before acquiring current operation data of each device in the process control device, the method further includes:
calculating a data capacity allocation value of the first partition according to the operation life of the process control device, the single operation time of the process control device, the operation life of the first equipment, the acquisition period of the operation data of the first equipment and the historical operation data of the first equipment; the data capacity allocation value is used for measuring the size of partition capacity;
creating the first partition in the storage medium according to the data capacity allocation value of the first partition, the first partition being dedicated to storing operational data of the first device;
the specific formula for calculating the data capacity allocation value of the first partition is as follows:
Figure FDA0002730963360000011
wherein S isiA data capacity allocation value, k, representing a partition for storing operation data of the i-th devicei1、Ai1、ki2、Ai2Are all preset constants, QiIndicating the storage capacity required to store a single run of data for the ith device, BiAn estimate representing the number of action responses of the ith plant during a single continuous run of the process control unit, CmaxIndicating that the ith plant is within each single operating cycle of the process control unitMaximum number of sudden changes in the operating state, M representing the operating life of the process control device, d representing the single operating duration of the process control device, WiIndicating the lifetime of the ith device.
2. The method of claim 1, wherein the current operating state of the target device comprises a first state and a second state.
3. The method of claim 1, wherein the current operating data of the target device comprises a current timestamp, a target device number, and a current operating status of the target device.
4. The method of claim 1, wherein the current operation data of the target device comprises a current timestamp, a target device number, a current operation state of the target device, and a state change identifier, and the state change identifier is used to indicate whether the current operation state of the target device is the same as an operation state of a previous acquisition cycle of the target device.
5. The method of claim 1, wherein the predetermined packet structure comprises a first data block, a second data block, and a third data block;
the first data block, the second data block, and the third data block each include a number of data bits;
the first data block represents the running state of the target equipment;
the second data block represents a target device number;
the third data block represents a time stamp when the run data was acquired.
6. The method of claim 1, wherein after obtaining current operating data for each device in the process control apparatus, further comprising:
and if the current running state of the second equipment is judged to be different from the running state of the second equipment in the last acquisition cycle, packaging the current running data of the second equipment into a data packet according to a preset data packet structure, and storing the data packet into a second partition in the storage medium.
7. A process control device operational data storage device, comprising:
the acquisition module is used for acquiring current operation data of each device in the process control device, wherein the current operation data of the target device comprises the current operation state of the target device;
the storage module is used for packaging the current running data of the first equipment into a data packet according to a preset data packet structure and storing the data packet into a first partition in a storage medium if the current running state of the first equipment is judged to be different from the running state of the first equipment in a previous acquisition cycle;
the acquisition module is further configured to:
calculating a data capacity allocation value of the first partition according to the operation life of the process control device, the single operation time of the process control device, the operation life of the first equipment, the acquisition period of the operation data of the first equipment and the historical operation data of the first equipment; the data capacity allocation value is used for measuring the size of partition capacity; creating the first partition in the storage medium according to the data capacity allocation value of the first partition, the first partition being dedicated to storing operational data of the first device;
the specific formula for calculating the data capacity allocation value of the first partition is as follows:
Figure FDA0002730963360000021
wherein S isiA data capacity allocation value, k, representing a partition for storing operation data of the i-th devicei1、Ai1、ki2、Ai2Are all preset constants, QiPresentation of a sheet storing the ith deviceStorage capacity required for sub-operational data, BiAn estimate representing the number of action responses of the ith plant during a single continuous run of the process control unit, CmaxIndicating the maximum mutation times of the operation state of the ith device in each single operation period of the process control device, M indicating the operation life of the process control device, d indicating the single operation time length of the process control device, WiIndicating the lifetime of the ith device.
8. An electronic device, comprising:
the processor and the memory are communicated with each other through a bus; the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
9. A non-transitory computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the method of any one of claims 1 to 6.
CN201910227438.6A 2019-03-25 2019-03-25 Method and device for storing operation data of process control device Active CN110083086B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910227438.6A CN110083086B (en) 2019-03-25 2019-03-25 Method and device for storing operation data of process control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910227438.6A CN110083086B (en) 2019-03-25 2019-03-25 Method and device for storing operation data of process control device

Publications (2)

Publication Number Publication Date
CN110083086A CN110083086A (en) 2019-08-02
CN110083086B true CN110083086B (en) 2021-03-19

Family

ID=67413540

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910227438.6A Active CN110083086B (en) 2019-03-25 2019-03-25 Method and device for storing operation data of process control device

Country Status (1)

Country Link
CN (1) CN110083086B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857029B (en) * 2020-06-30 2022-08-12 广州明珞汽车装备有限公司 Data acquisition method, system, device, terminal equipment and medium
CN112558867B (en) * 2020-12-10 2024-04-09 中国航空工业集团公司沈阳飞机设计研究所 Method for efficiently using storage space of recorder

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201605107U (en) * 2009-11-25 2010-10-13 钟长征 Elevator remote monitoring system based on Ethernet
CN102047228A (en) * 2008-05-28 2011-05-04 松下电器产业株式会社 Device emulation support device, device emulation support method, device emulation support circuit, and information processor
CN103294713A (en) * 2012-02-29 2013-09-11 鸿富锦精密工业(深圳)有限公司 Monitoring data memory system and method
CN103425675A (en) * 2012-05-17 2013-12-04 南京中兴力维软件有限公司 Monitoring data storage method and device used for centralized monitoring management system
CN104008637A (en) * 2014-05-20 2014-08-27 福建工程学院 Remote machine tool fault acquisition communication method
CN206322306U (en) * 2016-11-15 2017-07-11 无锡必创传感科技有限公司 A kind of accumulating seal box status monitor device and accumulating seal box condition monitoring system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2434691B1 (en) * 2010-09-28 2014-11-26 Yamaha Corporation Remote control system and communication system
US10090017B2 (en) * 2015-03-08 2018-10-02 Delphi Memory Technologies, Inc. Apparatus and method for dynamic multiple actuator drive data access

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102047228A (en) * 2008-05-28 2011-05-04 松下电器产业株式会社 Device emulation support device, device emulation support method, device emulation support circuit, and information processor
CN201605107U (en) * 2009-11-25 2010-10-13 钟长征 Elevator remote monitoring system based on Ethernet
CN103294713A (en) * 2012-02-29 2013-09-11 鸿富锦精密工业(深圳)有限公司 Monitoring data memory system and method
CN103425675A (en) * 2012-05-17 2013-12-04 南京中兴力维软件有限公司 Monitoring data storage method and device used for centralized monitoring management system
CN104008637A (en) * 2014-05-20 2014-08-27 福建工程学院 Remote machine tool fault acquisition communication method
CN206322306U (en) * 2016-11-15 2017-07-11 无锡必创传感科技有限公司 A kind of accumulating seal box status monitor device and accumulating seal box condition monitoring system

Also Published As

Publication number Publication date
CN110083086A (en) 2019-08-02

Similar Documents

Publication Publication Date Title
CN110083086B (en) Method and device for storing operation data of process control device
CN109992473B (en) Application system monitoring method, device, equipment and storage medium
CN110955586A (en) System fault prediction method, device and equipment based on log
CN112324693A (en) Monitoring method, monitoring device, monitoring equipment and storage medium for fan rotating speed
CN110751045B (en) Fault recording method, system and terminal equipment
CN114202238A (en) Power supply equipment health degree evaluation method, operation and maintenance method, device and server
CN109272599A (en) A kind of data processing method and relevant device
EP1978465A1 (en) Unauthorized access monitor program, unauthorized monitor method, and unauthorized monitor system
CN111367471B (en) Speed limiting method, device, equipment and medium for write-in cache
CN113123955B (en) Plunger pump abnormity detection method and device, storage medium and electronic equipment
CN112383116A (en) Method, system and device for determining state of charging equipment
CN109284908B (en) Industrial equipment risk analysis method and system and related equipment
CN111258854A (en) Model training method, alarm method based on prediction model and related device
CN114666210B (en) Alarm method and device based on big data log analysis
CN116155767A (en) Abnormality detection method and device for vehicle-mounted CAN bus, storage medium and electronic equipment
CN112346939A (en) Alarm method, device, equipment and storage medium
CN111289036A (en) Equipment fault early warning method, device, equipment and system
CN113312758B (en) Health state evaluation method and device for wind generating set
CN114389938B (en) Alarm method, alarm device and storage medium
CN111124285B (en) Solid state disk data holding method, device, equipment and medium
CN115509876A (en) Method, device, server and medium for processing log
CN104995605A (en) Monitoring method and computer device
CN114996092A (en) Alarm method, device, equipment and medium
US10630701B2 (en) System and method for identifying application layer behavior
CN116225828A (en) Alarm method, device, equipment, medium and product based on interface call volume

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
GR01 Patent grant
GR01 Patent grant