Summary of the invention
To solve the shortcomings of the prior art, the invention discloses fusion operation of power networks environment and facility informations across flat
Platform data acquisition and distributed storage method, the purpose of the present invention are obtaining data with realization from operation system automatically, are realizing
Uniform data access, real time monitoring calculating, distributed storage and the visual presentation of cross-platform information.
To achieve the above object, concrete scheme of the invention is as follows:
A kind of acquisition that merging multi-source heterogeneous electric network data and distributed storage method, comprising the following steps:
Interface protocol is established according to each operation system data characteristics and establishes operation of power networks environment and device data model
Specification;
Configure each operation system data access strategy, configuration data verification rule, thus realize in real time access application and
History access application;
Access using log information, fault message and the warning information generated in the process of running and passes through in real time for monitoring,
For the fault message monitored, data amended record is carried out to the data lost during failure;
It establishes data broadcasting and caches the format specification of grid operation data, online monitoring data, operation number parsing
It is broadcast to and is stored in buffered message queue according to, lightning data and meteorological data, it is distributed by period write-in Hadoop
Storage file or HBase;
The data of access and monitoring data are visualized.
Further, the data model specification of above-mentioned foundation is the data attribute of each operation system, including energy pipe
Manage system model specification, lightning location system model specification and meteorological system model specification;
Lightning location system model specification: it formulates interface protocol and obtains lightning stroke time of origin, position, return stroke times;It establishes
Lightning systems model specification includes: thunder and lightning time of origin, accuracy coordinate, latitude coordinate, current strength and return stroke times;
Meteorological system model specification: it formulates interface protocol and obtains weather data, radar diagram data, cloud atlas data and day
Gas forecast data;Establish meteorological system monitoring information model, radar information model, cloud atlas information model and weather forecast information mould
Type;
Energy Management System model specification: it formulates interface protocol and obtains electric current, voltage, active power, reactive power data;
Establishing EMS system model specification includes measuring id, measuring the time, measure type and measuring value.
Further, the data access strategy for configuring each operation system, including the rule with each operation system interaction data
Then agreement, data source address, interface form, wherein the regular agreement of the operation system interaction data mainly includes real-time number
According to interaction protocol, historical data interaction protocol;
Real-time, interactive agreement mainly describes the explanation and system that system data sends required parameter to system data provider
The explanation for the data content attribute that data providing accordingly returns, description trigger mechanism are the frequency for using real-time data interaction protocol
Rate;Historical data interaction protocol and real-time data interaction protocol request and return identical, but non-periodically triggers;
Data source address mainly describes the address ip and port of system data provider's issuing service;
Interface form mainly describes the mode of the publication data of system data provider.
Further, the data check rule of configuration is used to describe for the pre- of the data that obtain from system data provider
Cleaning rule, including the cleaning based on time series, the cleaning based on clustering algorithm, the cleaning based on SVM, account cleaning rule
Then;
Wherein, access application in real time and history access are using integrated data access strategy and data check rule, according to number
Data access and the parsing of each operation system are realized according to model specification.
Further, the real-time access is the process for accessing application in real time using the log information generated in operational process
Information, record WebService starts access, a reading data action message is completed or completed in WebService access;
Fault message is the malfunction of access application in real time, including network failure, service stopping failure and storage failure;
Warning information is described as accessing the alarm status of application, including access delay or storage delay in real time.
Further, the data amended record describes after the fault recovery of real-time access application, and history run connects
Enter the data lost during application access failure.
Further, the format specification established data broadcasting and cache grid operation data, format specification are intended to root
Meet buffered message queue storage format, the data of differentiated service system and searchable inquiry according to data model norm-setting
The method that the traffic table and function decomposition into analytic function of structure go out each system operation data message.
Further, the data broadcasting is the real time data write-in buffered message queue that will be accessed, as real-time analysis
The data source of processing and application function;
The data of Hadoop distributed storage file storage regular persistence from caching message queue, as distribution
The data source of formula analysis processing.
Further, the data and monitoring number using access are accessed by showing interface in real time in the visual presentation
According to using measuring value in access data as the curve graph of time change is shown;Web service state is intuitively shown in monitoring data
With the showing interface of storage state.
Further, monitoring access application in real time further include: monitoring identification access application exists in the process of running
Network failure, service fault or storage failure, specifically:
It when totally service being requested mistake occur, disappears if mistake is not up to n times, is judged as that interruption stops servicing;
It waits and does not occur for overall request N-1 time wrong then releasing failure;
When totally service being requested mistake occur, if overall request reaches n times or more and mistake continuously occurs, judge at this time
Whether web services ip is communication, is judged as service stopping if communication;It does not communicate, is judged as that external network is obstructed;It waits
Service releases failure after having return;
Service monitoring request and the limitation of response duration are configured, if it exceeds the duration of setting, then be judged as request timed out, such as
The fruit N-1 times duration lower than setting then releases request timed out state;
When storage reports an error, then being judged as can not be written;Waiting releases failure after being successfully written;
Setting write-in duration limitation is judged as write latency if write-in is more than the duration of setting;It waits N-1 times and writing
Enter and then releases delaying state lower than duration limitation;
To the data of gaps and omissions in failure logging table, the data lost during application recovery failure are accessed by history.
Further, when realizing the data parsing of each operation system, the data of acquisition is parsed according to model specification, are wrapped
It includes: according to Energy Management System model specification, obtaining operation data analysis of object Property Name and carried out with the specification of caching
Match, operation data structured set object is packaged into after matching;According to lightning systems model specification, thunder is converted using XML component
Electric system data are XML document object, pack lightning data structured set object according to specification matching;According to meteorological system mould
Type specification is converted to the stream character string of BASE64 coding and is instantiated as object picture for picture file data.
Beneficial effects of the present invention:
1, invention creates operation of power networks environment and facility information data models, establish for integrated power system systematic data modeling
Basis is determined, has laid a good foundation for the data interaction inter-sectional with other of power specialty application, power industry.
2, the present invention describes the process for establishing data access application, mentions for the cross-platform data acquisition of other electric system
Technical basis is supplied, the application of data access monitoring means can offer reference to ensure the integrality of access data from now on.
3, real time data is cached using Distributed Message Queue Kafka, number after message number reaches setting value
According to distributed file system is written into, the condition that provides the foundation is handled for power grid big data distributed analysis.
Specific embodiment:
The present invention is described in detail with reference to the accompanying drawing:
As shown in Figure 1, the cross-platform data of fusion operation of power networks environment and facility information obtains and distributed storage method,
The following steps are included:
Step (1): interface protocol is established according to each operation system data characteristics and establishes data model specification;
Step (2): the access protocol according to each system in step (1) configures each system data access strategy, configuration data
Verification rule, realizes real-time data imputing system function and historical data access function;
Step (3): log information, fault message, the announcement generated in real-time access function operational process in monitoring step (2)
Alert information etc.;
Step (4): the fault message monitored in analytical procedure (3) retransmits request, loses during amended record failure
Data;For warning information, alarm cause is analyzed, excludes hidden danger.
Step (5): the format rule of broadcast and caching grid operation data are established according to the data model specification in step (1)
Model;
Step (6): according to the format specification in step (5), the online monitoring data accessed in step (2), number is run
It is broadcast in buffered message queue according to, lightning data and meteorological data etc., is written to Hadoop distributed storage file by the period
Or HBase;
Step (7): according to the data model specification in step (1), the data of the access of access application in real time in step (2)
It is visualized with the monitoring data in step (3).
Wherein in step (1), operation of power networks environment and device data model specification are established:
Data acquisition is shared using data-interface, data center, the safety under Network Isolation based on Enterprise Service Bus
The modes such as file transmission define relevant interface, the period, call the parameters such as frequency and object, automatically by configuring corresponding strategies
Data are extracted from operation system, solve platform database access, large data files across platform high speed concurrently reads, is cross-platform
Data security transmission with it is synchronous key issues of.Data are mainly derived from the relevant business application system of power grid, including power transmission and transformation
Equipment Condition Monitoring System, production management system PMS, Energy Management System EMS, power grid GIS GIS, weather information
System, lightning location system, intelligent robot cruising inspection system etc..
Data model specification describes the business datum attribute of system, and model specification includes Energy Management System model rule
Model, lightning location system model specification, meteorological system model specification etc..
To ensure to obtain the accuracy and consistency of data, the source system to grid operation data and facility information includes thunder
Electric positioning system, meteorological system, PMS and EMS etc. embark specification with reference to the data cases that itself is described, and as obtaining
The final explanation of the data taken, such as:
Lightning location system specification: formulating interface protocol method, obtains lightning stroke time of origin, position, return stroke times;It establishes
Lightning systems model specification includes: thunder and lightning time of origin, accuracy coordinate, latitude coordinate, current strength, return stroke times.
Meteorological system specification: formulating interface protocol includes: obtaining weather data method, radar map data method, cloud
Diagram data method, data of weather forecast method;Establish meteorological system monitoring information model (monitoring time, monitoring station, monitoring station institute
Belong to city, county where monitoring station, temperature, humidity, wind scale, wind speed, wind angle, extreme wind speed, very big angle, precipitation, energy
Degree of opinion, air pressure, issuing time, wind direction, very big wind wind scale, very big wind wind direction), radar information model (radar map date, latitude
Degree, longitude, radar map filestream data), cloud atlas information model (cloud atlas date, picture file flow data, centre coordinate), weather
(monitoring time, monitors affiliated city to forecast information model, and county where monitoring forecasts time span, the highest temperature, lowest temperature, weather
Situation, wind-force rank, wind direction code).
EMS Energy Management System: formulating interface protocol data capture method, obtains electric current, voltage, active power, idle
The data such as power;Establishing EMS system model specification includes measuring ID, measuring the time, measure type and measuring value.
In addition, the configuration system data access strategy in step (2) describes the rule with each system interaction data
Agreement, data source address, interface form etc., the regular agreement of system interaction mainly include real-time data interaction protocol, history number
According to interaction protocol etc..Real-time, interactive agreement mainly describe system data to system data provider send required parameter explanation and
The explanation for the data content attribute that system data provider accordingly returns, description trigger mechanism use real-time data interaction protocol
Frequency;Historical data interaction protocol and real-time data interaction protocol request and return identical, but non-periodically triggers;Data source
Location mainly describes the address ip and port of system data provider's issuing service;Interface form mainly describes system data provider
Publication data mode, such as webservice mode.
Access strategy describes to obtain the regular agreement of each system data, data source address, interface form etc., such as:
Lightning systems configuration data content: lightning stroke time of origin, position, return stroke times;Frequency: in real time;Source data address:
Lightning data service IP address and port numbers;Interface form: webservice.
Meteorological system configuration data content: weather data, radar map, cloud atlas, weather forecast information;Frequency: in real time;
Source data address: meteorological data service IP address and port numbers;Interface form: webservice.
EMS system configuration data content: electric current, voltage, active power, reactive power;Frequency: in real time;Source data address:
EMS data service IP address and port numbers;Interface form: webservice.
Configuration data verification rule: the data check rule configuration in the step (2) from each system data for providing
The preprocessing rule of the data just obtained, including the cleaning based on time series, the cleaning based on clustering algorithm, based on SVM's
Cleaning, equipment account cleaning etc., such as:
Cleaning rule of the EMS data configuration based on time series;
Meteorological data configures the cleaning based on clustering algorithm;
Lightning data configures the cleaning based on clustering algorithm.
In step (2), creation access data application: Integrated access strategy, data check rule, according in step (1)
Data model specification realizes operation system data access and parsing.
According to each operation system interface protocol, is generated using the wsimport tool of wsdl.jar and be based on webservice
Client, read operation system access strategy configuration, data check rule configuration parameter, such as: lightning location system frequency be 5
Minute;Energy Management System frequency is 1 minute and configures based on time series cleaning rule;Monitoring data frequency in meteorological data
For 10 minutes and configure based on clustering algorithm cleaning rule, radar map data frequency is 5 minutes, cloud atlas data frequency is 1 hour,
Data of weather forecast frequency 24 hours.
The data of acquisition are parsed according to model specification, such as: according to Energy Management System model specification, obtaining operation data pair
It is matched as parsing Property Name and with the specification of caching, operation data structured set object is packaged into after matching;According to
Lightning systems model specification converts lightning systems data using XML component as XML document object, packs thunder according to specification matching
Electric data structured collection object;BASE64 coding is converted to for picture file data according to meteorological system model specification
Stream character string is simultaneously instantiated as object picture.
Monitoring access is applied: network failure, service fault existing for monitoring identification access application in the process of running are deposited
Failure is stored up, method includes:
It when totally service being requested mistake occur, disappears if mistake is not up to n times, is judged as that interruption stops servicing;
It waits and does not occur for overall request N-1 time wrong then releasing failure.
When totally service being requested mistake occur, if overall request reaches n times or more and mistake continuously occurs, judge at this time
Whether web services ip is communication, is judged as service stopping if communication;It does not communicate, is judged as that external network is obstructed;It waits
Service releases failure after having return.
Service monitoring request and the limitation of response duration are configured, if it exceeds the duration of setting, then be judged as request timed out, such as
The fruit N-1 times duration lower than setting then releases request timed out state.
When storage reports an error, then being judged as can not be written;Waiting releases failure after being successfully written.
Setting write-in duration limitation is judged as write latency if write-in is more than the duration of setting;It waits N-1 times and writing
Enter and then releases delaying state lower than duration limitation.
The fault message of monitoring is applied by monitoring agent and is sent to being used for for monitoring server by socket socket
On socket server, and by monitoring server storage to failure logging table
To the data of gaps and omissions in failure logging table, the data lost during application recovery failure are accessed by history.
Log information in step (3) describes the procedural information of the real-time access application in step (2), record
The movements such as WebService starts access, WebService access is completed or completes a reading data.
Fault message describes the malfunction of the real-time access application in step (2), including network failure, service stop
Only failure, storage failure etc..
Warning information describes the alarm status of the real-time access application in step (2), including access delay or storage
Delay etc..
After data amended record in step (4) describes the fault recovery of the real-time access application in step (2), fortune
The data lost during history access application access failure in row step (2).
Format specification in step (5), it is intended to which buffered message is met according to the system model norm-setting in step (1)
The traffic table and function decomposition into analytic function of the data structure of queue storage format, differentiated service system and searchable inquiry go out each system fortune
The design method of row data-message.
Data broadcasting in step (6) is the real time data write-in buffered message queue that will be accessed, at real-time analysis
The data source of reason and application function.
The data of Hadoop distributed storage file storage regular persistence from caching message queue, as distribution point
Analyse the data source of processing.
Specifically, data broadcasting is shared and distributed storage: these three are big using Redis, kafka and Hadoop for this method
Data tool realizes the distribution of high-throughput for power grid environment and operation data broadcast, shared and distributed storage, kafka
News release is subscribed to, and redis realizes that data high-speed caching, Hadoop realize mass data distributed storage, pass through parallel mechanism
Unify Message Processing on line and offline, passes through cluster and consumption in real time is provided.Critical process storing data structure is focused on
It explains and is illustrated below with EMS data:
Real-time data memory format specification:
Key: being identified to measurement, and format is " ed&qy&rid ", wherein " ed " is identified as EMS system data, " qy " mark
For area, " rid " is to measure id;Value: gathering for map, under key identified time;Value identifies measuring value.Show
Example: " ed&bz&212023,201510210914=32.90289057791233 ".
Real-time data broadcast format specification:
Key: being identified to the time, and format is " region & measures the id& time ";Value: it is identified as measuring value.Example:
" bz&212023&201510210914,32.90289057791233 ".
Data distribution formula storage format specification:
Key: being identified to the time, and format is " region & measures the id& time ";Value: it is identified as measuring value.Example:
" bz&212023&201510210914,32.90289057791233 ".
Visual presentation in step (7) describes the data of the access of access application in real time in showing interface step (2)
With the monitoring data in step (3), using access data such as Energy Management System (EMS) in measuring value with time change song
Line chart is shown;Such as intuitive showing interface for showing Web service state and storage state of monitoring data.Monitoring is shown, main to dock
Enter network in application process, storage state shows, including real time monitoring interface and flow are shown.
Visualize: visualization mainly divides initial data displaying and monitoring to show that the present invention is illustrated below:
Initial data is shown, to data creation one intuitive understandable interface of access.EMS competence management system number
Show that interface main presentation measures the variation of point data, the curve that interface changes comprising time change according to middle metric data.
Monitor interface in real time, it is intuitive to show Web service state and storage state, green representative is normal, yellow represents warning,
Red represents catastrophe failure.Two processes of external communication and storage inside of monitoring, external communication include monitoring: service requests, is outer
Portion's network state;The state of storage inside monitoring write-in data.
Flow shows interface, and the data traffic being related to each request of data is monitored, and monitoring content includes completing
Time, request measure number, return measures number, insertion measures number, are finally shown with line chart.
The cross-platform operation system data of effective integration of the present invention, form the multi-source heterogeneous pattern of fusion power transmission and transformation of distributed storage
Device status information resource, solution PMS, EMS, status monitoring, GIS, meteorology, thunder and lightning etc. are multi-platform, apply, more communication protocols more
View, the mass data of more data structures can not be accessed accurately in real time the unified platform the problem of, meet the analysis of data distribution formula, place
Reason and visualizing requires, realize the uniform data access of cross-platform information, real time monitoring calculate, distributed storage and visual
Change and shows.
The present invention using webservice technology, socket socket mechanics of communication, business datum modeling and analytic technique,
Distributed message frame kafka, Hadoop distributed storage technology, provides interface data model specification, data access strategy is matched
It sets, data-interface parameter configuration, data check rule configuration, data access monitoring, data amended record, data distribution formula storage tube
A series of functions such as reason, visual presentation, obtain data by above functions from operation system automatically, realize cross-platform information
Uniform data access, real time monitoring calculate, distributed storage and visual presentation.
The present invention is that base has been established in integrated power system systematic data modeling, power industry and other inter-sectional data interactions
Plinth;Technical basis is provided for the cross-platform data acquisition of other later electric system;Data can be accessed to ensure from now on
Integrality is used for reference;The condition that provides the foundation is handled for power grid big data distributed analysis.
Above-mentioned, although the foregoing specific embodiments of the present invention is described with reference to the accompanying drawings, not protects model to the present invention
The limitation enclosed, those skilled in the art should understand that, based on the technical solutions of the present invention, those skilled in the art are not
Need to make the creative labor the various modifications or changes that can be made still within protection scope of the present invention.