CN109150596A - A kind of SCADA system real time data dump method and device - Google Patents
A kind of SCADA system real time data dump method and device Download PDFInfo
- Publication number
- CN109150596A CN109150596A CN201810897123.8A CN201810897123A CN109150596A CN 109150596 A CN109150596 A CN 109150596A CN 201810897123 A CN201810897123 A CN 201810897123A CN 109150596 A CN109150596 A CN 109150596A
- Authority
- CN
- China
- Prior art keywords
- dump
- task
- data
- real time
- scada 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0663—Performing the actions predefined by failover planning, e.g. switching to standby network elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/568—Storing data temporarily at an intermediate stage, e.g. caching
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Debugging And Monitoring (AREA)
Abstract
The embodiment of the invention discloses a kind of SCADA system real time data dump method and devices, this method comprises: establishing SCADA system real time data dump task queue, including the first dump task T1 and the second dump task T2;Real time data is acquired respectively by the first dump task T1 and the second dump task T2 is stored in corresponding buffered data file;It is weighed by the first dump task T1 application acquisition data dump and executes normal data dump;When the first dump task T1 breaks down, breakpoint transmission is carried out by the second dump task T2;When the second dump task T2 breaks down, when the failure of the first dump task T1 has excluded, breakpoint transmission is carried out by the first dump task T1, realizes that automatic fault is restored.The example scheme solve to occur in SCADA system real time data dump procedure because of data intermittent problem caused by software fault reason, improve the stability of SCADA system real time data dump.
Description
Technical field
The present embodiments relate to data dump technology, espespecially a kind of SCADA system real time data dump method and device.
Background technique
Field of industrial automation control, it is common to use SCADA (Supervisory Control And Data
The acquisition of Acquisition data is controlled with monitoring) acquisition data and monitoring site running equipment, in-site installation have all kinds of instrument and
Communication apparatus, SCADA system is acquired by communications protocol and obtains data, because of SCADA system itself data with existing store function, because
This can be realized by SCADA system software module and the historical data trend of required monitoring data item checked and analyzed, and because
Upper layer data analysis module need bottom data carry out calculate and analysis obtain the total amounts such as every continuous data, operating index
According to needing to be accessed the data by the real-time dump basic data of SCADA system to relational database by upper application software and counted
Business diagnosis is carried out after calculation.
SCADA system real time data dump running environment generally comprises: SCADA server run SCADA software systems and
Real time data dump program(me), database server operation relevant database, application server run upper layer industrial application software
Deng.
SCADA software systems acquire real time data from field device, and real time data dump program(me) is logical by interface or routine
It interrogates protocol access real-time data base and obtains data, be supplied to the addressable relational database data of upper layer industrial application software.
Currently, the common data dump measure of SCADA system includes:
(1) ADO data processing script
SCADA timing script embeds ADO data processing script, and history library directly is written in real-time SCADA variable data.
ADO (ActiveX Data Objects): a kind of program object, for indicating the data structure in customer data base
With the data for being included, table and inquiry, inspection database or access external data source are created or modified using ADO object.
(2) ODBC data dump component
The mode that ODBC data dump component obtains data is to access internal interface by SCADA producer SDK, will be counted in real time
It is dumped in relational database according to according to certain format timing by ODBC mode.
ODBC (Open Database Connectivity Open Database Connection) is Microsoft's open services architecture
A group in relation to database in (WOSA, Windows Open Services Architecture Windows Open service architecture)
At part, it establishes one group of specification, and provides one group of standard API (application programming interface) to database access.
SDK (Software Development Kit Software Development Tools) is some to be used for by software engineer to be specific
The creation application software such as software package, software frame, hardware platform, operating system developing instrument set, this patent uses
It is the application programming interfaces API that SCADA software vendor provides, SCADA real-time data base is accessed by the interface.
(3) OPC data acquisition and storage software
OPC data acquisition and storage software is disposed, which obtains SCADA real time data by OPC mode, by the software
Simultaneously relational database is written by ODBC mode in timing acquiring real time data.
OPC (the object connection and insertion of OLE for Process Control process control) is public based on Microsoft
Take charge of COM/DCOM (Distributed Component Object Model) technology and DNA (Distributed internet Application distribution
Formula internet application) framework, the specification designed to solve the communication standard between field management layer and process control station,
It provides process management applications and live automatic control system and equipment carries out a kind of standard mechanism of data communication.
However, current SCADA system data dump has the disadvantage in that
(1) ADO data processing script
Because ADO script complexity and maintenance are inconvenient, and operational process will affect SCADA system software operation efficiency,
Using less.
(2) using often there is loss of data in ODBC data dump component or OPC data acquisition and storage software process
Phenomenon:
When ODBC component dump occurs abnormal, data can be interrupted temporarily;
Database access is abnormal, and interim interrupt occur in data;
There is abnormal (failure, Network Abnormal etc. is written in database) in OPC acquisition and storage software storing data, and data can face
When interrupt.
In view of the above-mentioned problems, solution common at present is as follows:
By monitoring process, whether abnormal, detection data stops dump, restarting and activation to Traditional solutions
Software function, the pedestrian that goes forward side by side are maintenance and completion data (inquiry SCADA history library data record, artificial polishing).But current
There are still following problems for these solutions:
(1) there is interrupted, polishing heavy workload for a long time in data;
(2) partial data is not complete, and there are deviations for the result for causing timing data to calculate;
(3) data maintenance is at high cost;
(4) it influences upper layer data and calculates and analyze processing application function.
Summary of the invention
In order to solve the above-mentioned technical problem, the embodiment of the invention provides a kind of acquisitions of data and monitoring control SCADA system
Real time data dump method of uniting and device, can prevent the data occurred after data dumper exception interrupted, failure is avoided to draw
Fault recovery, the polishing historical data behavior of hair, guarantee being sequentially written in for data dump, count in real time to improve SCADA system
According to the stability of dump.
In one embodiment of the present of invention, provide:
(1) a kind of SCADA system real time data dump method may include:
Establish SCADA system real time data dump task queue;It is included at least in the real time data dump task queue:
First dump task T1 and the second dump task T2;
Start the first dump task T1 and the second dump task T2, and passes through the first dump task respectively
T1 and the second dump task T2 uninterrupted sampling real time data are stored in corresponding first buffered data file and the second buffering
Data file;
Data dump power is obtained by the first dump task T1 application, and executes normal data dump, it will be described
Real time data is written in the tables of data of preset relationship library;
When the first dump task T1 breaks down during carrying out data dump, by the second dump task
T2 carries out breakpoint transmission according to the real time data stored in the second buffered data file, realizes that automatic fault is restored;Work as institute
It states the second dump task T2 to break down during carrying out data dump, the failure of the first dump task T1 has excluded
When, breakpoint transmission is carried out according to the real time data stored in the first buffered data file by the first dump task T1,
Realize that automatic fault is restored.
In other numerous embodiments of the invention:
(2) the SCADA system real time data dump method according to (1), wherein described to establish SCADA system real-time
Data dump task queue may include:
Dump task allocation list is set;
The first dump task T1 and the second dump task T2 are configured in the dump task allocation list;
Wherein, the dump task allocation list includes: mission number and acquisition and dump configuration information;Described first turn
The mission number of storage task T1 and the second dump task T2 are different, and the acquisition and dump configuration information are all the same.
(3) the SCADA system real time data dump method according to (2), wherein the acquisition and dump configuration information
May include one or more of: task names, task type, data acquisition and dump program(me) path, data acquire and turn
Store up program name, acquisition tasks number and dump purpose data table name.
(4) the SCADA system real time data dump method according to (1), the method can also include: to establish
After SCADA system real time data dump task queue, it is arranged the first dump task T1's and the second dump task T2
Main and standby relation;
Wherein, the first dump task T1 is main task, and the second dump task T2 is standby task.
(5) the SCADA system real time data dump method according to (1), wherein starting first dump is appointed
Business T1 and the second dump task T2 may include:
Be respectively started the acquisition of corresponding with the first dump task T1 the first data and dump program(me) A1, and with institute
State the corresponding second data acquisition of the second dump task T2 and dump program(me) A2;
Simultaneously by first data acquisition and dump program(me) A1 and second data acquisition and dump program(me) A2 access
Operation information is recorded to preset tasks synchronization table Y1.
(6) the SCADA system real time data dump method according to (5), wherein the tasks synchronization table Y1 can wrap
It includes: task encoding, task status, state change time, data dump time point;
Wherein, the task encoding includes: the second coding M2 for representing the first coding M1 of main task and representing standby task;
The task status includes: operating status X1, malfunction X2, application status X3, resumes state X4 and work shape
State X5.
(7) the SCADA system real time data dump method according to (6), wherein described by the first dump task
T1 application obtains data dump power, and executes normal data dump, and preset relationship library number is written in the real time data
According to may include: in table
By first data acquisition and dump program(me) A1, first dump in the tasks synchronization table Y1 is set
The task status of task T1 is application status X3, to apply for the data dump power;
After obtaining the data dump power, normal data is executed by first data acquisition and dump program(me) A1 and is turned
Collected real time data is written in the tables of data W1 of preset first relationship library storage task process;And by the tasks synchronization
Task status setting in table Y1 is in working condition X5, updates the data dump time point and the state change time.
(8) the SCADA system real time data dump method according to (6), wherein described to work as the first dump task
When T1 breaks down during carrying out data dump, by the second dump task T2 according to the second buffered data file
The real time data of middle storage carries out breakpoint transmission
Judge that first dump is appointed by the task status of the tasks synchronization table Y1 by the second dump task T2
The failure of business T1 simultaneously applies obtaining data dump power;
The first dump task T1 is obtained from the data dump time point of the tasks synchronization table Y1 and state change time
The first data breakpoint B1;
The continuous data queue including the first data breakpoint B1 is extracted from the second buffered data file and is held
Row resumes process, to carry out breakpoint transmission;
The recovery state of preset task failure table Y2 is changed to have restored after completing the breakpoint transmission, and described in update
The data dump time point of tasks synchronization table Y1 and state change time;
It is described to be broken down during carrying out data dump as the second dump task T2, the first dump task
When the failure of T1 has excluded, by the first dump task T1 according to the real time data stored in the first buffered data file
Carrying out breakpoint transmission may include:
Judge that second dump is appointed by the task status of the tasks synchronization table Y1 by the first dump task T1
The failure of business T2 simultaneously applies obtaining data dump power;
The second dump task T2 is obtained from the data dump time point of the tasks synchronization table Y1 and state change time
The second data breakpoint B2;
The continuous data queue including the second data breakpoint B2 is extracted from the first buffered data file and is held
Row resumes process, to carry out breakpoint transmission;
The recovery state of preset task failure table Y2 is changed to have restored after completing the breakpoint transmission, and described in update
The data dump time point of tasks synchronization table Y1 and state change time.
(9) the SCADA system real time data dump method according to (1)-(8) any one, wherein the data turn
Failure during storage may include: dump program(me) faults itself.
In another embodiment of the invention, provide:
(10) a kind of data acquisition and monitoring control SCADA system real time data dump apparatus, comprising: processor and calculating
Machine readable storage medium storing program for executing is stored with instruction in the computer readable storage medium, when described instruction is executed by the processor
When, realize above-mentioned SCADA system real time data dump method.
The embodiment of the present invention includes: establish SCADA system real time data dump task queue;The real time data dump is appointed
It is included at least in business queue: the first dump task T1 and the second dump task T2;Start the first dump task T1 and described
Second dump task T2, and it is real-time by the first dump task T1 and the second dump task T2 uninterrupted sampling respectively
Data are stored in corresponding first buffered data file and the second buffered data file;It is obtained by the first dump task T1 application
It takes data dump to weigh, and executes normal data dump, the real time data is written in the tables of data of preset relationship library;When
When the first dump task T1 breaks down during carrying out data dump, as the second dump task T2 according to
The real time data stored in second buffered data file carries out breakpoint transmission, realizes that automatic fault is restored;When second dump
Task T2 breaks down during carrying out data dump, when the failure of the first dump task T1 has excluded, by described
One dump task T1 carries out breakpoint transmission according to the real time data stored in the first buffered data file, realizes automatic fault
Restore.By the example scheme, solve to occur in SCADA system real time data dump procedure because software fault reason causes
Data intermittent problem, realize that the data for preventing from occurring after data dumper exception are interrupted, avoid the event of failure initiation
Barrier recovery, polishing historical data behavior, ensure that being sequentially written in for data dump, to improve SCADA system real time data
The stability of dump.
The other feature and advantage of the embodiment of the present invention will illustrate in the following description, also, partly from explanation
It is become apparent in book, or understand through the implementation of the invention.The objectives and other advantages of the invention can be by illustrating
Specifically noted structure is achieved and obtained in book, claims and attached drawing.
Detailed description of the invention
Attached drawing is used to provide one for further understanding technical solution of the embodiment of the present invention, and constituting specification
Point, it is used to explain the present invention the technical solution of embodiment together with embodiments herein, does not constitute to the embodiment of the present invention
The limitation of technical solution.
Fig. 1 is data acquisition and the monitoring control SCADA system real time data dump method flow chart of the embodiment of the present invention;
Fig. 2 is the SCADA system real time data dump method structural schematic diagram of the embodiment of the present invention;
Fig. 3 is the method flow diagram of starting the first dump task T1 and the second dump task T2 of the embodiment of the present invention;
Fig. 4 is the embodiment of the present invention by the first dump task T1 application acquisition data dump power, and executes normal number
According to the method flow diagram of dump;
Fig. 5 is the embodiment of the present invention when the first dump task T1 breaks down during carrying out data dump, by
Second dump task T2 carries out the method flow diagram of breakpoint transmission according to the real time data stored in the second buffered data file;
Fig. 6 is that the second dump task T2 that works as of the embodiment of the present invention breaks down during carrying out data dump, first
When the failure of dump task T1 has excluded, by the first dump task T1 according to the real time data stored in the first buffered data file
Carry out the method flow diagram of breakpoint transmission;
Fig. 7 is the SCADA system real time data dump apparatus composition block diagram of the embodiment of the present invention.
Specific embodiment
Understand in order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with attached drawing pair
The embodiment of the present invention is described in detail.It should be noted that in the absence of conflict, embodiment and reality in the application
The feature applied in example can mutual any combination.
Step shown in the flowchart of the accompanying drawings can be in a computer system such as a set of computer executable instructions
It executes.Also, although logical order is shown in flow charts, and it in some cases, can be to be different from herein suitable
Sequence executes shown or described step.
Embodiment one
A kind of SCADA system real time data dump method may include as shown in Figure 1 and Figure 2 S101-S104:
S101, SCADA system real time data dump task queue is established;In the real time data dump task queue at least
It include: the first dump task T1 and the second dump task T2;
S102, starting the first dump task T1 and the second dump task T2, and pass through described first turn respectively
Storage task T1 and the second dump task T2 uninterrupted sampling real time data are stored in corresponding first buffered data file and the
Two buffered data files;
S103, data dump power is obtained by the first dump task T1 application, and execute normal data dump, it will
In the real time data write-in preset relationship library tables of data;
S104, when the first dump task T1 breaks down during carrying out data dump, by described second turn
Storage task T2 carries out breakpoint transmission according to the real time data stored in the second buffered data file, realizes that automatic fault is extensive
It is multiple;When the second dump task T2 breaks down during carrying out data dump, the failure of the first dump task T1
When having excluded, breakpoint is carried out according to the real time data stored in the first buffered data file by the first dump task T1
It resumes, realizes that automatic fault is restored.
In embodiments of the present invention, it in order to solve the problems, such as proposed in background technique, establishes SCADA system and counts in real time
According to dump task queue, multiple data acquisitions and dump program(me) are run parallel, software synchronization operating mechanism is established, online fortune is provided
Failure logging and redundancy processing are realized in row backup functionality, data acquisition or when dump exception, being capable of larger raising SCADA system
The stability of real time data dump.
Embodiment two
The embodiment on the basis of example 1, gives and establishes SCADA system real time data dump task queue
A kind of specific embodiment.
In embodiments of the present invention, described to establish SCADA system real time data dump task queue and may include:
Dump task allocation list is set;
The first dump task T1 and the second dump task T2 are configured in the dump task allocation list;
Wherein, the dump task allocation list includes: mission number and acquisition and dump configuration information;Described first turn
The mission number of storage task T1 and the second dump task T2 are different, and the acquisition and dump configuration information are all the same.
In embodiments of the present invention, dump task allocation list C2 can be set, configure two in dump task allocation list C2
A dump task is respectively the first dump task T1 and the second dump task T2.First dump task T1 and the second dump task T2
Mission number it is different, acquire identical with dump configuration information.
In embodiments of the present invention, the acquisition and dump configuration information may include one or more of: task name
Title, task type, data acquisition and dump program(me) path, data acquisition and dump program(me) title, acquisition tasks are numbered and are turned
Store up purpose data table name.
In embodiments of the present invention, dump task allocation list C2 may include mission number, task names, task type,
Data acquisition and dump program(me) path, data acquisition and dump program(me) title, acquisition tasks number, dump purpose data table name etc.
It is one or more in item of information.
In embodiments of the present invention, the method can also include: to establish SCADA system real time data dump task team
After column, the main and standby relation of the first dump task T1 and the second dump task T2 are set;Wherein, first dump is appointed
Business T1 is main task (M1), and the second dump task T2 is standby task (M2).
In embodiments of the present invention, in dump task allocation list C2, the task class of the first dump task T1 can be set
Type is main task (M1), and the task type of the second dump task T2 of setting is standby task (M2).
In embodiments of the present invention, it before establishing SCADA system real time data dump task queue, can preset
Acquisition data configuration table C1, to execute continual real-time data acquisition task according to acquisition data configuration table C1.
In embodiments of the present invention, acquiring may include in data configuration table C1 will obtain simultaneously dump from SCADA system
Data item information specifically may include following any one or more information: acquisition tasks number, the input and output I O point of acquisition
Title, data item title, frequency acquisition, value mode etc..
Embodiment three
The embodiment gives starting the first dump task T1 and institute on the basis of embodiment one or embodiment two
State a kind of specific embodiment of the second dump task T2.
In embodiments of the present invention, as shown in figure 3, the starting the first dump task T1 and second dump are appointed
Business T2 may include S201-S202:
S201, the first data acquisition corresponding with the first dump task T1 and dump program(me) A1 is respectively started, with
And the second data corresponding with the second dump task T2 acquire and dump program(me) A2;
S202, it is visited by first data acquisition and dump program(me) A1 and second data acquisition and dump program(me) A2
It asks and records operation information to preset tasks synchronization table Y1.
In embodiments of the present invention, the first data acquisition corresponding with the first dump task T1 can be write in advance
With dump program(me) A1, and the second data corresponding with the second dump task T2 acquisition and dump program(me) A2;Restart
When the first dump task T1 and the second dump task T2, the acquisition of the first data and the number of dump program(me) A1 and second can be respectively started
It is accessed according to acquisition and dump program(me) A2, program A1 and program A2 and records operation information to task synchronous meter Y1, and logger task
Task status in synchronous meter Y1 is X1 (operation) state.
In embodiments of the present invention, the tasks synchronization table Y1 may include: task encoding, task status, state change
Time, data dump time point;
Wherein, the task encoding includes: the second coding M2 for representing the first coding M1 of main task and representing standby task;
The task status includes: operating status X1, malfunction X2, application status X3, resumes state X4 and work shape
State X5.
In embodiments of the present invention, task encoding (or task type coding) illustrates: M1 (master): main task;M2 (standby):
Standby task.That is, referring to that corresponding dump task is main task when M1 is arranged in corresponding task encoding column;It is compiled in corresponding task
When code column setting M2, refer to that corresponding dump task is standby task.
In embodiments of the present invention, which can include but is not limited to alphabetical M1 and M2, can also be using except M1
With any number other than M2, letter, character etc..
In embodiments of the present invention, task status illustrates:
X1 (operation): after software starting, the state is written in the task status item of task synchronous meter Y1;
X2 (failure): there is exception in software dump, and the state is written in the task status item of task synchronous meter Y1;
X3 (application): application executes data dump task, when task status is (non-to resume state and inoperative shape not in dump
State) or renewal time failed (record of such as renewal time less than 60 seconds), then task status can be updated to application status;
X4 (is resumed): executing breakpoint transmission work;
X5 (work): real-time dump work is executed.
In embodiments of the present invention, the representation of the task status can include but is not limited to alphabetical X1-X5, can be with
Using any number in addition to X1-X5, letter, character etc..
In embodiments of the present invention, the implementation of data acquisition and dump task program can choose OPC mode or connect
Mouth method of calling.
Example IV
The embodiment gives respectively on the basis of above-mentioned any embodiment through the first dump task T1 and institute
The second dump task T2 uninterrupted sampling real time data is stated, corresponding first buffered data file and the second buffered data text are stored in
A kind of specific embodiment of part.
In embodiments of the present invention, it can be obtained according to pre-set acquisition data configuration table C1 information from SCADA system
Real time data is taken, after data acquisition and dump program(me) starting, which can execute continual real-time data acquisition task.
In embodiments of the present invention, uninterrupted by the first dump task T1 and the second dump task T2 respectively
Real time data is acquired, being stored in corresponding first buffered data file and the second buffered data file can specifically include: uninterrupted
Execute the collection process K1_1 and write-in buffered data process K3_1 of the first dump task T1;And it uninterruptedly executes the second dump and appoints
The collection process K1_2 and write-in buffered data process K3_2 of business T2.
In embodiments of the present invention, the collection process K1_1 and write-in buffered data of the first dump task T1 are uninterruptedly executed
Process K3_1 may include: that the first data of the first dump task T1 are acquired with dump program(me) A1 according to acquisition data configuration table C1
List executes collection process K1_1, obtains real time data from SCADA real-time database;K3_1 process is executed, by real time data write-in the
One buffered data file F1.
In embodiments of the present invention, the collection process K1_2 and write-in buffered data of the second dump task T2 are uninterruptedly executed
Process K3_2 may include: that the second data of the second dump task T2 are acquired with dump program(me) A2 according to acquisition data configuration table C1
List executes collection process K1_2, obtains real time data from SCADA real-time database;K3_2 process is executed, by real time data write-in the
Two buffered data file F2.
Embodiment five
The embodiment gives the first dump task T1 application and obtains data dump on the basis of above-mentioned any embodiment
A kind of specific embodiment of power.
In embodiments of the present invention, as shown in figure 4, obtaining data dump power by the first dump task T1 application, and
Normal data dump is executed, it may include S301-S302 that the real time data, which is written in the tables of data of preset relationship library:
S301, described first be arranged in the tasks synchronization table Y1 by first data acquisition and dump program(me) A1
The task status of dump task T1 is application status X3, to apply for the data dump power;
S302, after obtaining data dump power, executed by first data acquisition and dump program(me) A1 normal
Collected real time data is written in the tables of data W1 of preset first relationship library data dump task process;And described it will appoint
Task status setting in business synchronous meter Y1 is in working condition X5, when updating the data dump time point and the state change
Between.
In embodiments of the present invention, it can be acquired by the first data and dump program(me) A1 executes data dump power and applied
Journey K2_1, so that the first dump task T1 application labeled as main task obtains data dump power.Specifically, can be passed through
The corresponding task state that the first dump task T1 in tasks synchronization table Y1 is arranged in the acquisition of one data and dump program(me) A1 is the (Shen X3
Please) state, with request for data dump power.
In embodiments of the present invention, data dump power can also be executed by the acquisition of the second data and dump program(me) A2 first
Application process K2_2, so that the second dump task T2 application labeled as secondary task obtains data dump power.It specifically can be with
According to practical application scene self-defining, it is not particularly limited herein.
In embodiments of the present invention, after the first dump task T1 obtains data dump power, normal data dump is executed, it will be real
When data relationship library tables of data is written, can specifically include: the acquisition of the first data of the first dump task T1 and dump program(me) A1
Normal data dump task process K5_1 is executed, collected real time data is written in tables of data W1, in tasks synchronization table Y1
The task status of first dump task T1 is set as X5 (work) state, updates data dump time point and state change time.The
One dump task T1 continues uninterrupted executive dumping task process K5_1.
In embodiments of the present invention, can include but is not limited in tables of data W1 following any one or more: IO is (defeated
Enter output) point code, data item title, value and acquisition time etc.
Embodiment six
The embodiment gives the first dump task T1 failure aftermentioned second on the basis of above-mentioned any embodiment
A kind of specific embodiment of dump task T2 progress breakpoint transmission.
In embodiments of the present invention, as shown in figure 5, it is described when the first dump task T1 is carrying out data dump process
When middle failure, carried out by the second dump task T2 according to the real time data stored in the second buffered data file
Breakpoint transmission may include S401-S404:
S401, described first turn is judged by the task status of the tasks synchronization table Y1 by the second dump task T2
The failure of storage task T1 simultaneously applies obtaining data dump power;
S402, first dump times is obtained from the data dump time point of the tasks synchronization table Y1 and state change time
The first data breakpoint B1 of business T1;
S403, the continuous data queue including the first data breakpoint B1 is extracted from the second buffered data file
And execute and resume process, to carry out breakpoint transmission;
S404, the recovery state of preset task failure table Y2 is changed to have restored after completing the breakpoint transmission, and more
The data dump time point of the new tasks synchronization table Y1 and state change time.
In embodiments of the present invention, the first data acquisition of the first dump task T1 and dump program(me) A1 execute data dump
After task process K5_1 breaks down, the failure logging process K4_1 of the first data acquisition and dump program(me) A1 can be by failure
Data time point is recorded in task failure table Y2, and the recovery status items in task failure table Y2 are labeled as not restoring, tasks synchronization
The corresponding task status of the first dump task T1 is set as X2 (failure) state in table Y1, and updates the state change time.
In embodiments of the present invention, the first dump task T1 failure, the second dump task T2 realize failover procedure, tool
Body may include: that the 1, second dump task T2 judges the first dump task T1 failure and applies obtaining data dump power;That is, second
Dump task T2 access tasks synchronization table Y1 judges the first dump task T1 failure, and the second dump task T2 application simultaneously obtains data
Dump is weighed, and the corresponding task status of the second dump task T2 is assigned to X3 (application) state in tasks synchronization table Y1;2, from task
The data breakpoint of the first dump task T1 is obtained in state table Y1, is labeled as the first data breakpoint B1;3, to the first data breakpoint
B1 carries out breakpoint transmission, realizes fault recovery;That is, the acquisition of the second data and dump program(me) A2 are executed and are extracted buffered data process
K3_2 extracts buffered data from the second buffered data file F2, obtains the continuous data queue including the first data breakpoint B1
And it executes and resumes process K5_2 (this resumes the normal data dump task process that process K5_2 is also the second dump task T2);It is complete
After breakpoint transmission, the recovery state of change task failure table Y2 is to have restored, when updating data dump time point and state change
Between.
In embodiments of the present invention, the acquisition of the second data and dump program(me) A2 uninterruptedly execute data dump task process
During K5_2, tables of data W1 is written into collected real time data, the task shape of the second dump task T2 in tasks synchronization table Y1
State is set as X5 (work) state.
In embodiments of the present invention, if executing the normal data dump task process K5_2 phase in the second dump task T2
Between, the failure of the first dump task T1 has excluded, and can continue to execute normal data dump task, then the first dump task T1
It can apply obtaining data dump power again;It is written in tables of data W1 with continuing through the first dump task T1 for real time data.
In embodiments of the present invention, the recovery state in above-mentioned task failure table Y2 can use different status indicators
It indicates, which can include but is not limited to numerical value 01 and 02, wherein 01 can indicate not restore, and 02 can indicate
Restore;It in other embodiments, can also be using any number in addition to 01 and 02, letter, character etc..
Embodiment seven
The embodiment gives the second dump task T2 failure aftermentioned first on the basis of above-mentioned any embodiment
A kind of specific embodiment of dump task T1 progress breakpoint transmission.
In embodiments of the present invention, as shown in fig. 6, it is described when the second dump task T2 is carrying out data dump process
When the failure of middle failure, the first dump task T1 has excluded, by the first dump task T1 according to described first
It may include S501-S504 that the real time data stored in buffered data file, which carries out breakpoint transmission:
S501, described second turn is judged by the task status of the tasks synchronization table Y1 by the first dump task T1
The failure of storage task T2 simultaneously applies obtaining data dump power;
S502, second dump times is obtained from the data dump time point of the tasks synchronization table Y1 and state change time
The second data breakpoint B2 of business T2;
S503, the continuous data queue including the second data breakpoint B2 is extracted from the first buffered data file
And execute and resume process, to carry out breakpoint transmission;
S504, the recovery state of preset task failure table Y2 is changed to have restored after completing the breakpoint transmission, and more
The data dump time point of the new tasks synchronization table Y1 and state change time.
In embodiments of the present invention, the second data acquisition of the second dump task T2 and dump program(me) A2 execute normal number
After breaking down according to dump task process K5_2, the failure logging process K4_2 of the second data acquisition and dump program(me) A2 can be with
Fault data time point is recorded in task failure table Y2, the recovery status items in task failure table Y2 are labeled as not restoring, appoint
The corresponding task status of the second dump task T2 is set as X2 (failure) state in business synchronous meter Y1, and when updating state change
Between.
In embodiments of the present invention, the second dump task T2 failure, the first dump task T1 realize failover procedure, tool
Body may include: that the 1, first dump task T1 judges the second dump task T2 failure and applies obtaining data dump power;That is, first
Dump task T1 access tasks synchronization table Y1 judges the second dump task T2 failure, and the first dump task T1 application simultaneously obtains data
Dump is weighed, and the corresponding task status of the first dump task T1 is assigned to X3 (application) state in tasks synchronization table Y1;2, from task
The data breakpoint of the second dump task T2 is obtained in state table Y1, is labeled as the second data breakpoint B2;3, to the second data breakpoint
B2 carries out breakpoint transmission, realizes fault recovery;That is, the acquisition of the first data and dump program(me) A1 are executed and are extracted buffered data process
K3_1 extracts buffered data from the first buffered data file F1, obtains the continuous data queue including the second data breakpoint B2
And it executes and resumes process K5_1 (this resumes the normal data dump task process that process K5_1 is also the first dump task T1);It is complete
After breakpoint transmission, the recovery state of change task failure table Y2 is to have restored, when updating data dump time point and state change
Between.
In embodiments of the present invention, the acquisition of the first data and dump program(me) A1 uninterruptedly execute data dump task process
During K5_1, tables of data W1 is written into collected real time data, the task shape of the first dump task T1 in tasks synchronization table Y1
State is set as X5 (work) state.
Embodiment eight
The embodiment gives the fault type implementation during data dump on the basis of above-mentioned any embodiment
Example.
In embodiments of the present invention, the failure during the data dump can include but is not limited to: dump program(me) is certainly
It dies barrier.
In embodiments of the present invention, the reason of dump task failure scene (dump program(me) faults itself) may include: journey
Sequence is abnormal, data dump write-in is abnormal.Under the scene, the dump task of failure cannot continue to execute data dump, then
Breakpoint transmission can be carried out by another normal dump task, continue data dump.Pass through the example scheme, solution
Certainly occur in SCADA system real time data dump procedure because of data intermittent problem caused by software fault reason, realize anti-
The data only occurred after data dumper exception are interrupted, avoid fault recovery, the polishing historical data behavior of failure initiation,
It ensure that being sequentially written in for data dump, to improve the stability of SCADA system real time data dump.
Embodiment nine
A kind of acquisition of data and monitoring control SCADA system real time data dump apparatus 1, as shown in fig. 7, may include:
Processor 11 and computer readable storage medium 12 are stored with instruction in the computer readable storage medium 12, when the finger
When enabling by the processor 11 execution, above-mentioned SCADA system real time data dump method is realized.
The embodiment of the present invention includes: establish SCADA system real time data dump task queue;The real time data dump is appointed
It is included at least in business queue: the first dump task T1 and the second dump task T2;Start the first dump task T1 and described
Second dump task T2, and it is real-time by the first dump task T1 and the second dump task T2 uninterrupted sampling respectively
Data are stored in corresponding first buffered data file and the second buffered data file;It is obtained by the first dump task T1 application
It takes data dump to weigh, and executes normal data dump, the real time data is written in the tables of data of preset relationship library;When
When the first dump task T1 breaks down during carrying out data dump, as the second dump task T2 according to
The real time data stored in second buffered data file carries out breakpoint transmission, realizes that automatic fault is restored;When second dump
Task T2 breaks down during carrying out data dump, when the failure of the first dump task T1 has excluded, by described
One dump task T1 carries out breakpoint transmission according to the real time data stored in the first buffered data file, realizes automatic fault
Restore.By the example scheme, solve to occur in SCADA system real time data dump procedure because software fault reason causes
Data intermittent problem, realize that the data for preventing from occurring after data dumper exception are interrupted, avoid the event of failure initiation
Barrier recovery, polishing historical data behavior, ensure that being sequentially written in for data dump, to improve SCADA system real time data
The stability of dump.
It will appreciated by the skilled person that whole or certain steps, system, dress in method disclosed hereinabove
Functional module/unit in setting may be implemented as software, firmware, hardware and its combination appropriate.In hardware embodiment,
Division between the functional module/unit referred in the above description not necessarily corresponds to the division of physical assemblies;For example, one
Physical assemblies can have multiple functions or a function or step and can be executed by several physical assemblies cooperations.Certain groups
Part or all components may be implemented as by processor, such as the software that digital signal processor or microprocessor execute, or by
It is embodied as hardware, or is implemented as integrated circuit, such as specific integrated circuit.Such software can be distributed in computer-readable
On medium, computer-readable medium may include computer storage medium (or non-transitory medium) and communication media (or temporarily
Property medium).As known to a person of ordinary skill in the art, term computer storage medium is included in for storing information (such as
Computer readable instructions, data structure, program module or other data) any method or technique in the volatibility implemented and non-
Volatibility, removable and nonremovable medium.Computer storage medium include but is not limited to RAM, ROM, EEPROM, flash memory or its
His memory technology, CD-ROM, digital versatile disc (DVD) or other optical disc storages, magnetic holder, tape, disk storage or other
Magnetic memory apparatus or any other medium that can be used for storing desired information and can be accessed by a computer.This
Outside, known to a person of ordinary skill in the art to be, communication media generally comprises computer readable instructions, data structure, program mould
Other data in the modulated data signal of block or such as carrier wave or other transmission mechanisms etc, and may include any information
Delivery media.
Claims (10)
1. a kind of data acquisition and monitoring control SCADA system real time data dump method, comprising:
Establish SCADA system real time data dump task queue;It is included at least in the real time data dump task queue: first
Dump task T1 and the second dump task T2;
Start the first dump task T1 and the second dump task T2, and respectively by the first dump task T1 and
The second dump task T2 uninterrupted sampling real time data is stored in corresponding first buffered data file and the second buffered data
File;
Data dump power is obtained by the first dump task T1 application, and executes normal data dump, it will be described real-time
Data are written in the tables of data of preset relationship library;
When the first dump task T1 breaks down during carrying out data dump, by the second dump task T2 root
Breakpoint transmission is carried out according to the real time data stored in the second buffered data file, realizes that automatic fault is restored;When described
Two dump task T2 break down during carrying out data dump, when the failure of the first dump task T1 has excluded, by
The first dump task T1 carries out breakpoint transmission according to the real time data stored in the first buffered data file, realizes certainly
Dynamic fault recovery.
2. SCADA system real time data dump method according to claim 1, which is characterized in that described to establish SCADA system
System real time data dump task queue include:
Dump task allocation list is set;
The first dump task T1 and the second dump task T2 are configured in the dump task allocation list;
Wherein, the dump task allocation list includes: mission number and acquisition and dump configuration information;First dump is appointed
The mission number of business T1 and the second dump task T2 is different, and the acquisition and dump configuration information are all the same.
3. SCADA system real time data dump method according to claim 2, which is characterized in that the acquisition and dump
Configuration information includes one or more of: task names, task type, data acquisition and dump program(me) path, data acquisition
With dump program(me) title, acquisition tasks number and dump purpose data table name.
4. SCADA system real time data dump method according to claim 1, which is characterized in that the method also includes:
After establishing SCADA system real time data dump task queue, the first dump task T1 is set and second dump is appointed
The main and standby relation of business T2;
Wherein, the first dump task T1 is main task, and the second dump task T2 is standby task.
5. SCADA system real time data dump method according to claim 1, which is characterized in that the starting described the
One dump task T1 and the second dump task T2 include:
It is respectively started the acquisition of corresponding with the first dump task T1 the first data and dump program(me) A1, and with described the
The corresponding second data acquisition of two dump task T2 and dump program(me) A2;
It accesses and records by first data acquisition and dump program(me) A1 and second data acquisition and dump program(me) A2
Operation information is to preset tasks synchronization table Y1.
6. SCADA system real time data dump method according to claim 5, which is characterized in that the tasks synchronization table
Y1 includes: task encoding, task status, state change time, data dump time point;
Wherein, the task encoding includes: the second coding M2 for representing the first coding M1 of main task and representing standby task;
The task status includes: operating status X1, malfunction X2, application status X3, resumes state X4 and working condition X5.
7. SCADA system real time data dump method according to claim 6, which is characterized in that described by described first
Dump task T1 application obtains data dump power, and executes normal data dump, the real time data is written preset
Include: in the tables of data of relationship library
By first data acquisition and dump program(me) A1, the first dump task in the tasks synchronization table Y1 is set
The task status of T1 is application status X3, to apply for the data dump power;
After obtaining the data dump power, normal data dump is executed by first data acquisition and dump program(me) A1 and is appointed
Collected real time data is written in the tables of data W1 of preset first relationship library business process;And by the tasks synchronization table Y1
In task status setting be in working condition X5, update the data dump time point and the state change time.
8. SCADA system real time data dump method according to claim 6, which is characterized in that described to work as described first
When dump task T1 breaks down during carrying out data dump, by the second dump task T2 according to second buffering
The real time data stored in data file carries out breakpoint transmission
The first dump task T1 is judged by the task status of the tasks synchronization table Y1 by the second dump task T2
Failure and apply obtain data dump power;
The of the first dump task T1 is obtained from the data dump time point of the tasks synchronization table Y1 and state change time
One data breakpoint B1;
The continuous data queue including the first data breakpoint B1 is extracted from the second buffered data file and is executed continuous
It is transmitted through journey, to carry out breakpoint transmission;
The recovery state of preset task failure table Y2 is changed to have restored after completing the breakpoint transmission, and updates the task
The data dump time point of synchronous meter Y1 and state change time;
It is described to be broken down during carrying out data dump as the second dump task T2, the first dump task T1's
When failure has excluded, carried out by the first dump task T1 according to the real time data stored in the first buffered data file
Breakpoint transmission includes:
The second dump task T2 is judged by the task status of the tasks synchronization table Y1 by the first dump task T1
Failure and apply obtain data dump power;
The of the second dump task T2 is obtained from the data dump time point of the tasks synchronization table Y1 and state change time
Two data breakpoint B2;
The continuous data queue including the second data breakpoint B2 is extracted from the first buffered data file and is executed continuous
It is transmitted through journey, to carry out breakpoint transmission;
The recovery state of preset task failure table Y2 is changed to have restored after completing the breakpoint transmission, and updates the task
The data dump time point of synchronous meter Y1 and state change time.
9. SCADA system real time data dump method according to any one of claims 1 to 8, which is characterized in that described
Failure during data dump includes: dump program(me) faults itself.
10. a kind of data acquisition and monitoring control SCADA system real time data dump apparatus, comprising: processor and computer can
Storage medium is read, is stored with instruction in the computer readable storage medium, which is characterized in that when described instruction is by the processing
When device executes, SCADA system real time data dump method as described in any one of claims 1-9 is realized.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810897123.8A CN109150596B (en) | 2018-08-08 | 2018-08-08 | SCADA system real-time data dump method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810897123.8A CN109150596B (en) | 2018-08-08 | 2018-08-08 | SCADA system real-time data dump method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109150596A true CN109150596A (en) | 2019-01-04 |
CN109150596B CN109150596B (en) | 2021-08-03 |
Family
ID=64792160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810897123.8A Active CN109150596B (en) | 2018-08-08 | 2018-08-08 | SCADA system real-time data dump method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109150596B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113515516A (en) * | 2021-08-09 | 2021-10-19 | 北京字节跳动网络技术有限公司 | Data processing method and device, computer equipment and computer storage medium |
CN116302646A (en) * | 2023-02-24 | 2023-06-23 | 荣耀终端有限公司 | Fault positioning method, system, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102594874A (en) * | 2008-06-20 | 2012-07-18 | 华为技术有限公司 | Synchronization processing method and device |
CN104391764A (en) * | 2014-10-22 | 2015-03-04 | 上海海得控制系统股份有限公司 | Computer fault-tolerant method and computer fault-tolerant system |
US20150082385A1 (en) * | 2011-08-25 | 2015-03-19 | At&T Mobility Ii Llc | Communication Gateway for Facilitating Communications With a Supervisory Control and Data Aquisition System |
CN104699541A (en) * | 2015-03-30 | 2015-06-10 | 北京奇虎科技有限公司 | Method, device, data transmission assembly and system for synchronizing data |
CN107018554A (en) * | 2017-03-07 | 2017-08-04 | 广东欧珀移动通信有限公司 | A kind of data transmission method, device and intelligent terminal |
CN107423303A (en) * | 2016-05-24 | 2017-12-01 | 北京京东尚科信息技术有限公司 | The method and system of data syn-chronization |
CN107967118A (en) * | 2016-10-19 | 2018-04-27 | 南京拓界信息技术有限公司 | A kind of method and apparatus realized hard disc data high speed dump and checked |
-
2018
- 2018-08-08 CN CN201810897123.8A patent/CN109150596B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102594874A (en) * | 2008-06-20 | 2012-07-18 | 华为技术有限公司 | Synchronization processing method and device |
US20150082385A1 (en) * | 2011-08-25 | 2015-03-19 | At&T Mobility Ii Llc | Communication Gateway for Facilitating Communications With a Supervisory Control and Data Aquisition System |
CN104391764A (en) * | 2014-10-22 | 2015-03-04 | 上海海得控制系统股份有限公司 | Computer fault-tolerant method and computer fault-tolerant system |
CN104699541A (en) * | 2015-03-30 | 2015-06-10 | 北京奇虎科技有限公司 | Method, device, data transmission assembly and system for synchronizing data |
CN107423303A (en) * | 2016-05-24 | 2017-12-01 | 北京京东尚科信息技术有限公司 | The method and system of data syn-chronization |
CN107967118A (en) * | 2016-10-19 | 2018-04-27 | 南京拓界信息技术有限公司 | A kind of method and apparatus realized hard disc data high speed dump and checked |
CN107018554A (en) * | 2017-03-07 | 2017-08-04 | 广东欧珀移动通信有限公司 | A kind of data transmission method, device and intelligent terminal |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113515516A (en) * | 2021-08-09 | 2021-10-19 | 北京字节跳动网络技术有限公司 | Data processing method and device, computer equipment and computer storage medium |
CN116302646A (en) * | 2023-02-24 | 2023-06-23 | 荣耀终端有限公司 | Fault positioning method, system, electronic equipment and storage medium |
CN116302646B (en) * | 2023-02-24 | 2024-03-29 | 荣耀终端有限公司 | Fault positioning method, system, electronic equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109150596B (en) | 2021-08-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107423303B (en) | Method and system for data synchronization | |
US10146502B2 (en) | Stream-processing data | |
EP2713231B1 (en) | Method for performing condition based data acquisition in a hierarchically distributed condition based maintenance system | |
CN101196840B (en) | System and method for configuring a data mirror | |
CN100461130C (en) | Method for testing a software application | |
CN102662821A (en) | Method, device and system for auxiliary diagnosis of virtual machine failure | |
CN102129372A (en) | Root cause problem identification through event correlation | |
CN104238493A (en) | Process control apparatus and system and updating method therefor | |
CN103677973A (en) | Distributed multi-task scheduling management system | |
JP2018097663A (en) | Control system, control program, and control method | |
CN111858254B (en) | Data processing method, device, computing equipment and medium | |
JP4918668B2 (en) | Virtualization environment operation support system and virtualization environment operation support program | |
CN105531680A (en) | Remote monitoring system, remote monitoring method, and program | |
CN107864055A (en) | The management method and platform of virtualization system | |
WO2019061364A1 (en) | Failure analyzing method and related device | |
CN109299063A (en) | A kind of platform database moving method and system | |
JP2017207894A (en) | Integrated monitoring operation system and method | |
CN109150596A (en) | A kind of SCADA system real time data dump method and device | |
CN105354102B (en) | A kind of method and apparatus of file system maintenance and reparation | |
GB2524434A (en) | Management system for managing computer system and management method thereof | |
JP5740338B2 (en) | Virtual environment operation support system | |
CN114816820A (en) | Method, device, equipment and storage medium for repairing chproxy cluster fault | |
CN109116818A (en) | Real time data dump method and device when a kind of SCADA system upgrades | |
CN110018932A (en) | A kind of monitoring method and device of container disk | |
CN109241029A (en) | A kind of method and apparatus for realizing SCADA system data library smooth migration |
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 |