Summary of the invention
The invention provides a kind of oil and gas pipes cloud treatment system and implementation method, with the technical problem that the reliability solving oil and gas pipes SCADA system in prior art is low.
First aspect, the embodiment of the present invention provides a kind of oil and gas pipes cloud treatment system, it is characterized in that, comprising: field, M station server, primary data center and N number of regional data center, and M, N are positive integer;
Field, described M station server, with M field one_to_one corresponding of standing, for gathering the station field data obtaining field, corresponding station, and obtains request to the real-time task that described primary data center transmission comprises described station field data;
Described primary data center, obtains request for receiving described real-time task, and stores the routing information of described station field data and described station field data; And from described N number of regional data center, select a regional data center to ask the real-time task comprised to process to described real-time task acquisition, and from described N number of regional data center, determine that the multiple servers being positioned at least two regional data centers backs up described station field data;
There is communication between described N number of regional data center, for the control based on described primary data center, described task is processed and described station field data is backed up.
Optionally, each regional data center in described N number of regional data center, specifically for:
After sending heartbeat message to described primary data center, judge the anti-heartbeat message whether receiving the transmission of described primary data center in preset time period;
If do not receive described anti-heartbeat message, then determine self to be in runaway condition.
Optionally, described primary data center, also for:
After detecting that described real-time task obtains tasks carrying failure corresponding to request, call another regional data center and perform described task.
Optionally, described primary data center, specifically for:
The regional data center selecting distance first stop field server nearest from described N number of regional data center processes described station field data, and wherein said first stop field server is specially: gather the server obtaining described station field data.
Optionally, described primary data center, also for:
The point configuration information of all pipelines of described system is divided into fixed packet, and the fixed packet of each some configuration information is stored in not entirely on the multiple servers of the same area data center;
By historical data piecemeal, and each block historical data is stored in respectively not entirely on the multiple servers of the same area data center.
Optionally, described primary data center, also for:
The storing process of described N number of regional data center is managed.
Optionally, each regional data center in described N number of regional data center, specifically for:
Store data in the file system of the server of one's respective area data center; And
Management is to the real time processing tasks of the server-assignment of one's respective area data center.
Optionally, described primary data center and described N number of regional data center adopt distributed master slave architectures.
Optionally, described station field data comprises: at least one data in oil and gas pipes control data, oil and gas pipes alert data and oil and gas pipes configuration data.
Optionally, described primary data center, specifically for: obtain the first pipeline corresponding to request according to described real-time task, determine to obtain to described real-time task the first server asking to process, described first server stores the some configuration information of described first pipeline.
Optionally, described some configuration information is specially: the switch of described first pipeline or the state configuration information of valve.
Second aspect, the embodiment of the present invention provides a kind of implementation method of oil and gas pipes cloud treatment system, described method is applied in oil and gas pipes cloud treatment system, and described system comprises: field, M station server, primary data center and N number of regional data center, and M, N are positive integer; Described method comprises:
First stop field collection of server in the server of field, described M station obtains station field data corresponding to described first stop field server, and sends the real-time task acquisition request comprising described station field data to described primary data center;
Described primary data center receives described real-time task and obtains request, and stores the routing information of described station field data and described station field data;
Described primary data center selects a regional data center to ask the real-time task comprised to process to described real-time task acquisition, and from described N number of regional data center, determine that the multiple servers being positioned at least two regional data centers backs up described station field data;
By described regional data center, the task that described real-time task obtains request corresponding is processed;
The multiple servers being positioned at least two regional data centers determined by described primary data center stores described station field data.
Optionally, described method also comprises:
Described primary data center, after detecting that described real-time task obtains tasks carrying failure corresponding to request, calls another regional data center and performs described task.
Beneficial effect of the present invention is as follows:
In embodiments of the present invention, provide a kind of oil and gas pipes cloud treatment system, comprising: field, M station server, primary data center and regional data center.This oil and gas pipes cloud treatment system is the structure of a kind of multizone, multi-layer, the first order is field, station server, field server of standing can gather the data of our station field, and the multiple servers backed up at least two regional data centers, field server of standing in addition can also store our station field historical data, when if stand, network linking fault appears in field and regional data center, field server of standing can complete this field, station real time data processing, and carries out execute-in-place; The second level is regional data center, each regional data center is sane level, not only mutually back up historical data, and when certain regional data center breaks down, can also by the real time data (also namely: redundancy backup data center each other) in other regional data center handling failure area datas; The third level is primary data center, and primary data center is responsible for the operation monitoring whole cloud SCADA system, dispatching distribution real time processing tasks, preserve data storage path information, and primary data center also can complete real-time task process, and store historical data.Also namely the program has thoroughly broken original SCADA system Martin Fowler, and utilize the memory space of every station server to form distributed storage, every number according to being at least stored on multiple node, and then improves the reliability of system storage and manipulation.
And because multiple regional data center can redundancy backup data center each other, so one can be selected from multiple regional data center suitable to carry out data processing, and then the processing speed of cloud treatment system real-time task can be improved.
Further, new framework adopts new parallel computation frame, thus can not only process large-scale data, and can realize automatically parallelizing, load balancing and machine and to delay machine process etc., meets SCADA system generating date demand and improves the demand of resource utilization.Thus the performance of oil and gas pipes SCADA system can be improved.
Embodiment
The invention provides a kind of oil and gas pipes cloud treatment system and implementation method, with the technical problem that the reliability solving oil and gas pipes SCADA system in prior art is low.
Technical scheme in the embodiment of the present application is solve above-mentioned technical problem, and general thought is as follows:
Provide a kind of oil and gas pipes cloud treatment system, comprising: field, M station server, primary data center and regional data center.This oil and gas pipes cloud treatment system is the structure of a kind of multizone, multi-layer, the first order is field, station server, field server of standing can gather the data of our station field, and the multiple servers backed up at least two regional data centers, field server of standing in addition can also store our station field historical data, when if stand, network linking fault appears in field and regional data center, field server of standing can complete this field, station real time data processing, and carries out execute-in-place; The second level is regional data center, each regional data center is sane level, not only mutually back up historical data, and when certain regional data center breaks down, can also by the real time data (also namely: redundancy backup data center each other) in other regional data center handling failure area datas; The third level is primary data center, and primary data center is responsible for the operation monitoring whole cloud SCADA system, dispatching distribution real time processing tasks, preserve data storage path information, and primary data center also can complete real-time task process, and store historical data.Also namely the program has thoroughly broken original SCADA system Martin Fowler, and utilize the memory space of every station server to form distributed storage, every number according to being at least stored on multiple node, and then improves the reliability of system storage and manipulation.
And because multiple regional data center can redundancy backup data center each other, so one can be selected from multiple regional data center suitable to carry out data processing, and then the processing speed of cloud treatment system real-time task can be improved.
Further, new framework adopts new parallel computation frame, thus can not only process large-scale data, and can realize automatically parallelizing, load balancing and machine and to delay machine process etc., meets SCADA system generating date demand and improves the demand of resource utilization.Thus the performance of oil and gas pipes SCADA system can be improved.
In order to better understand technique scheme, below by accompanying drawing and specific embodiment, technical solution of the present invention is described in detail, the specific features being to be understood that in the embodiment of the present invention and embodiment is the detailed description to technical solution of the present invention, instead of the restriction to technical solution of the present invention, when not conflicting, the technical characteristic in the embodiment of the present invention and embodiment can combine mutually.
First aspect, the embodiment of the present invention provides a kind of oil and gas pipes cloud treatment system, and this oil and gas pipes cloud treatment system is such as: oil and gas pipes cloud SCADA system, please refer to Fig. 1, comprise: field, M station server 10, primary data center 11 and N number of regional data center 12, M, N are positive integer;
Field, M station server 10, with M field one_to_one corresponding of standing, for gathering the station field data obtaining field, corresponding station, and obtains request to the real-time task that primary data center 11 transmission comprises station field data;
Primary data center 11, obtains request for receiving real-time task, and storage sites field data; And from N number of regional data center 12, determine the idle node that real-time task acquisition request is processed, and from N number of regional data center, determine that the multiple servers being positioned at least two regional data centers backs up station field data;
There is communication between N number of regional data center 12, for the control based on primary data center 11, task is processed and station field data is backed up.
Below, will be introduced respectively above-mentioned three-decker.
1) field, M station server 10
Wherein, field, each station server is mainly used in gathering the station field data obtaining field, corresponding station, is then stored in field, station server local; Further, field server of standing also generates corresponding real-time task by station field data and obtains request, then sends it to primary data center 11, selects corresponding regional data center storage sites field data to make primary data center 11 and processes task.
Wherein, if station field server is determined occurred to network linking fault between the station field data of field, station is processed regional data center, then field server of standing also can carry out to station field data enforcements and process and execute-in-place.
For example, the station field data of field collection of server of standing comprises: at least one data in oil and gas pipes control data, oil and gas pipes alert data and oil and gas pipes configuration data.
2) primary data center 11
Primary data center 11 is responsible for the operation of the whole cloud treatment system of monitoring, and dispatching distribution real time processing tasks preserve data storage path information, and primary data center 11 also can complete real-time task process, and store historical data.
As further preferred embodiment, primary data center 11, specifically for:
The regional data center selecting distance first stop field server nearest from N number of regional data center 12 carries out data to station field data, and wherein first stop field server is specially: the server gathering acquisition station field data.
For example, this N number of regional data center 12 may be positioned at different positions, and field, M station server 10 also can be positioned at different positions, in this case, then primary data center 11 is after the real-time task receiving the server transmission of first stop field obtains request, the processing speed of request is obtained in order to improve real-time task, so need the regional data center selected from N number of regional data center 12 from first stop field server is nearest to process station field data, such as: first stop field server is positioned at Hebei, and N number of regional data center 12 is respectively: Beijing, Wuhan, Chengdu, then because Beijing is nearest far from Hebei, so select to be positioned at Pekinese's regional data center to process station field data.
As further preferred embodiment, primary data center 11, also for:
After detecting that real-time task obtains tasks carrying failure corresponding to request, call another regional data center and execute the task.
Due to can redundancy backup data center (namely a data can be stored in the server corresponding to multiple regional data center) each other between multiple regional data center, so after certain regional data center executes the task failure, can call with its each other the regional data center of redundancy backup data center continue to execute the task.
By such scheme, the fault tolerance of oil and gas pipes cloud treatment system can be realized.
As further preferred embodiment, primary data center 11, also for:
The point configuration information of all pipelines of system is divided into fixed packet, and the fixed packet of each some configuration information is stored in not entirely on the multiple servers of the same area data center;
By historical data piecemeal, and each block historical data is stored in respectively not entirely on the multiple servers of the same area data center.
For example, the some configuration information of all pipelines can be divided into fixed packet by primary data center 11, and each some configuration information bag loads the n of the regional data center at corresponding pipeline place respectively
1on the server that platform is different and the n of other regional data centers
2on station server.Need the historical data stored also to be divided into fixed size block, each block historical data is stored in respectively not entirely at the m of same data center
1on station server.After the collected primary data center 11 of real time data, real time data, according to dispatching algorithm, is dispatched to multiple from processing execution server by primary data center 11, adopts major-minor version technique safeguards system reliability, and store historical data on the spot.
As further preferred embodiment, primary data center 11, also for: the storing process of N number of regional data center 12 is managed.
As further preferred embodiment, primary data center 11, specifically for: obtain the first pipeline corresponding to request according to real-time task, determine to obtain to real-time task the first server asking to process, first server stores the some configuration information of the first pipeline.
For example, put configuration information to be specially: the switch of the first pipeline or the state configuration information of valve.
3) N number of regional data center 12
Wherein, cloud treatment system can dispose present situation according to national oil pipeline, multiple regional data center is gone out according to the model partition based on weight coefficient, each regional data center is sane level, not only mutually back up historical data, and when certain regional data center breaks down, can by the real time data of the regional data center of the real-time handling failure of other regional data centers, such as: have at least 3 regional data centers to have the ability of handling failure region real time data (that is multiple regional data center can each other redundancy backup data center).
In specific implementation process, regional data center has several functions, and two kinds of enumerating below are wherein introduced, and certainly, in specific implementation process, is not limited to following two kinds of situations.
1. store data in the file system of the server of one's respective area data center.
For example, primary data center 11 can according to nearby principle to regional data center distribute data, so the data of correspondence, after the data receiving primary data center 11 distribution, just can be stored in the file system of the server of one's respective area data center by regional data center.
2. manage to the real time processing tasks of the server-assignment of one's respective area data center.
For example, for example, primary data center 11 can distribute real time processing tasks according to nearby principle to regional data center, so regional data center is after the real time processing tasks receiving primary data center 11 distribution, just can process real time processing tasks.
As further preferred embodiment, primary data center 11 and N number of regional data center 12 adopt distributed master slave architectures.
As further preferred embodiment, each regional data center in N number of regional data center 12, specifically for:
After sending heartbeat message to primary data center 11, judge the anti-heartbeat message whether receiving primary data center 11 transmission in preset time period;
If do not receive anti-heartbeat message, then determine that self is in runaway condition.
As shown in Figure 2, host node (primary data center 11) i.e. Master node, mainly contains these two functions of NameNode and JobTracker.These two functions of DataNode and TaskTracker are then mainly contained from node (regional data center) i.e. Slave node.NameNode mainly manages all regional data center storing process, comprises the functions such as record metadata.JobTracker is the managing process of real-time task, after JobTracker receives the real-time task process request of field, station server submission, by the ruuning situation according to system, for different Task (task) distributes idle node.When Task runs, JobTracker can not stop the running status monitoring Task, when a discovery Task failure time, can transfer another idle node to take over the node of failure, thus the reliability of the system of guarantee.
DataNode is the process run from node, and primary responsibility stores data in the file system of the server at center, one's respective area.TaskTracker is then mainly used to the real time processing tasks of the server-assignment managing one's respective area data center.TaskTracker periodically can send heartbeat message to JobTracker, when JobTracker can not obtain the heartbeat message of TaskTracker time, then thinks that the task of this node is failed.In addition, we have also been devised reverse heartbeat detection mechanism, on the basis keeping original heart beat configuration, a heartbeat instruction DNA_HEARTBEAT has been increased newly at NameNode end, during the heartbeat message of each feedback DataNode, operation no matter whether to DataNode, all can return this instruction of DNA_HEARTBEAT, using as a reverse heartbeat.DataNode judges the state of oneself by this reverse heartbeat, and when not receiving this reverse heartbeat in certain hour, DataNode will judge oneself to be in runaway condition, and corresponding mechanism then can be taked to carry out ego defense.Idiographic flow is as follows:
(1) after NameNode receives the heartbeat message of DataNode, if need to carry out the operation such as copies data, deleted file block just corresponding instruction is sent to DataNode together with heartbeat instruction DNA_HEARTBEAT.If there is no other operation requirements, then only send DNA_HEARTBEAT instruction;
(2) DataNode receives original instruction and then calls the original corresponding operation of statement execution, receives DNA_HEARTBEAT instruction, just upgrades timing variable.When DataNode does not receive reverse heartbeat for a long time, timing variable time-out, thinks that DataNode is in runaway condition, just takes safeguard measure.
As shown in Figure 3, for the flow chart of oil and gas pipes cloud SCADA system dataflow design, wherein first the station field data of field, station collection of server backs up at field, the station server of correspondence, the regional data center and the primary data center 11 that transfer data to correspondence process simultaneously, and the data after process are then stored as historical data respectively.
As further preferred embodiment, as shown in Figure 4, adopt the method for digital envelope to be encrypted the data that will transmit in oil and gas pipes cloud process A system, and increase the hardware encipher of corresponding encryption device or module implementation algorithm.Public and private key codon pair and session key will be used in this process.Use session key to carry out symmetric cryptography to transmission data, ensure that the speed of encryption and decryption, reduce the consumption of system.Use public and private key codon pair encipherment protection session key, ensure that the confidentiality of session key, also solve cipher key management considerations huge in symmetric cryptography simultaneously.
Second aspect, based on same inventive concept, the embodiment of the present invention provides a kind of implementation method of oil and gas pipes cloud treatment system, method is applied in oil and gas pipes cloud treatment system, system comprises: field, M station server 10, primary data center 11 and N number of regional data center 12, M, N are positive integer, please refer to Fig. 5, and the method comprises:
First stop field collection of server in field, step S501:M station server 10 obtains station field data corresponding to first stop field server, and sends the real-time task acquisition request comprising station field data to primary data center 11;
Step S502: primary data center 11 receives real-time task and obtains request, and the routing information of storage sites field data and station field data;
Step S503: primary data center 11 selects a regional data center to ask the real-time task comprised to process to real-time task acquisition, and from N number of regional data center 12, determine that the multiple servers being positioned at least two regional data centers backs up station field data;
Step S504: the task that real-time task obtains request corresponding is processed by regional data center;
Step S505: the multiple servers storage sites field data being positioned at least two regional data centers determined by primary data center 11.
Optionally, method also comprises:
Primary data center 11, after detecting that real-time task obtains tasks carrying failure corresponding to request, calls another regional data center and executes the task.
One or more embodiment of the present invention, at least has following beneficial effect:
In embodiments of the present invention,
Provide a kind of oil and gas pipes cloud treatment system, comprising: field, M station server, primary data center and regional data center.This oil and gas pipes cloud treatment system is the structure of a kind of multizone, multi-layer, the first order is field, station server, field server of standing can gather the data of our station field, and the multiple servers backed up at least two regional data centers, field server of standing in addition can also store our station field historical data, when if stand, network linking fault appears in field and regional data center, field server of standing can complete this field, station real time data processing, and carries out execute-in-place; The second level is regional data center, each regional data center is sane level, not only mutually back up historical data, and when certain regional data center breaks down, can also by the real time data (also namely: redundancy backup data center each other) in other regional data center handling failure area datas; The third level is primary data center, and primary data center is responsible for the operation monitoring whole cloud SCADA system, dispatching distribution real time processing tasks, preserve data storage path information, and primary data center also can complete real-time task process, and store historical data.Also namely the program has thoroughly broken original SCADA system Martin Fowler, and utilize the memory space of every station server to form distributed storage, every number according to being at least stored on multiple node, and then improves the reliability of system storage and manipulation.
And because multiple regional data center can redundancy backup data center each other, so one can be selected from multiple regional data center suitable to carry out data processing, and then the processing speed of cloud treatment system real-time task can be improved.
Further, new framework adopts new parallel computation frame, thus can not only process large-scale data, and can realize automatically parallelizing, load balancing and machine and to delay machine process etc., meets SCADA system generating date demand and improves the demand of resource utilization.Thus the performance of oil and gas pipes SCADA system can be improved.
Although describe the preferred embodiments of the present invention, those skilled in the art once obtain the basic creative concept of cicada, then can make other change and amendment to these embodiments.So claims are intended to be interpreted as comprising preferred embodiment and falling into all changes and the amendment of the scope of the invention.
Obviously, those skilled in the art can carry out various change and modification to the present invention and not depart from the spirit and scope of the present invention.Like this, if these amendments of the present invention and modification belong within the scope of the claims in the present invention and equivalent technologies thereof, then the present invention is also intended to comprise these change and modification.