Monitoring backstage business customizing method and its system based on plug-in unit
Technical field
The invention belongs to data processing field, more particularly to a kind of monitoring backstage business customizing method based on plug-in unit and its
System.
Background technology
The monitoring backstage of power system carries out the processing of real time data, real time data typically by the way of real-time data base
Storehouse essence is a memory bank, and exactly the data to be managed system read in internal memory, are established in internal memory according to service logic
Corresponding data model, data are handled in real time.Wherein, the data of the monitoring backstage processing of power system include transformer station
The state of interior equipment operation, voltage and current information, the cable running status being connected with transformer station and voltage on cable and
Current information, and other data associated with power system power network.
During the monitoring backstage data processing and management of power system, present real-time data base is carrying out software frame
Data model and service logic design are integrated when structure designs, cause service logic to be coupled with the height of data model,
This method has following shortcoming:(1) multiplexing of code is not utilized, when system monitoring models change, it is necessary to whole mould
Block re-starts exploitation, increases development amount;(2) be unfavorable for the extension of service logic, when systemic-function upgrades, it is necessary to
Whole program is modified, is unfavorable for the secondary development of system;(3) business function cutting can not be carried out, when system is showed
Implement when, functions of modules be for user it is unnecessary, can not basis under conditions of code is not changed using original mode
Onsite user's demand is cut for the business function of module, causes the redundancy of code;(4) it is unfavorable for program version management,
Due to needing that business logic processing method is modified according to onsite user's demand, program version can be increased using original method
Diversity, be unfavorable for the filing management of source code.
The content of the invention
In order to solve the shortcomings that prior art, the present invention provide a kind of monitoring backstage business customizing method based on plug-in unit and
Its system, wherein, this method only need to develop corresponding business processing plug-in unit, for data when for different service applications
This function of the interactive interface of modeling and real-time monitoring module and external module of the model in internal memory, can then without developing again
To improve the reusability of code.
To achieve the above object, the present invention uses following technical scheme:
A kind of monitoring backstage business customizing method based on plug-in unit, the monitoring backstage include being used to handle monitored data
Server, the server for handling monitored data includes advance data acquisition module and real-time monitoring module;Before described
Put data acquisition module and be used for the data that acquisition monitoring backstage is monitored, and be sent to real-time monitoring module;It is described real-time
Monitoring module includes data model and business processing logic;Including:
Step 1:The data model and business processing logic in real-time monitoring module are decoupled, real-time monitoring module is split
For real-time model database and business processing logic plug-in unit;
Step 2:Business processing logic plug-in card configuration file is obtained, business processing logic plug-in card configuration file passes through outside
The mode of configuration realizes the configuration of real-time monitoring module and business processing logic plug-in unit;
Step 3:Start real-time monitoring module, and load the business processing logic plug-in unit with real-time monitoring module phase configuration,
Carry out real time business processing;
Step 4:Real-time model database is stored or issued to service processing result, is finally reached monitoring backstage industry
The purpose of business customization.
The process of real time business processing is carried out in the step 3, including:
Upon actuation, business processing logic plug-in unit is by calling the offer of real-time model database for business processing logic plug-in unit
Function interface is registered to real-time model database;
Business processing logic plug-in unit gets corresponding data model from Real time capable module database, is patrolled according to own service
The demand of collecting generates the data model of corresponding plug-in unit matching;
The data that business processing logic plug-in unit is transmitted in timing acquisition real-time data base simultaneously, carry out service logic calculating;
Business processing logic plug-in unit is write the data after business processing using the function interface that real-time data base provides real
When model database in.
Business processing logic plug-in unit is by calling function interface that real-time model database provides to real-time model database
The content registered includes:Real time data processing interface and the communication interface of real-time model database and external module.
In step 3, the api function provided using operating system loads the business processing logic of monitoring module phase configuration
Plug-in unit.
In the step 4, the service processing result that real-time model database sends business processing logic plug-in unit is according to system
One form stores, and waits other plug-in units to obtain;Or it is distributed to external module.
A kind of monitoring backstage service customization system of the monitoring backstage business customizing method based on plug-in unit, the monitoring backstage
Including the server for handling monitored data, the server for handling monitored data includes advance data acquisition module
And real-time monitoring module;The advance data acquisition module is used for the data that acquisition monitoring backstage is monitored, and is sent to
Real-time monitoring module;The real-time monitoring module includes data model and business processing logic;Including:
Decoupling module, its data model and business processing logic for being used to decouple in real-time monitoring module, it will monitor in real time
Module is split as real-time model database and business processing logic plug-in unit;
Configuration module, it is used to obtain business processing logic plug-in card configuration file, business processing logic plug-in card configuration file
The configuration of real-time monitoring module and business processing logic plug-in unit is realized by way of exterior arrangement;
Loading and Service Processing Module, it is used to start real-time monitoring module, and loads and real-time monitoring module phase configuration
Business processing logic plug-in unit, carry out real time business processing;
Business result treatment module, it is used to service processing result is stored or sent out using real-time model database
Cloth, it is finally reached the purpose of monitoring backstage business customizing.
The loading and Service Processing Module, including:
Registering modules, it is used in business processing logic plug-in unit upon actuation, and business processing logic plug-in unit is real by calling
When model database provide function interface registered to real-time model database;
Data model generation module, it is used to get phase from Real time capable module database using business processing logic plug-in unit
The data model answered, the data model of corresponding plug-in unit matching is generated according to own service logic requirement;
Service logic computing module, it is used for what is transmitted by business processing logic plug-in unit in timing acquisition real-time data base
Data simultaneously, carry out service logic calculating;
Data write. module, it is used for industry by business processing logic plug-in unit from the function interface that real-time data base provides
In data write-in real-time model database after business processing.
Business processing logic plug-in unit is by calling function interface that real-time model database provides to real-time model database
The content registered includes:Real time data processing interface and the communication interface of real-time model database and external module.
In the loading and Service Processing Module, the api function loading monitoring module provided using operating system is matched
The business processing logic plug-in unit put.
In the business result treatment module, at the business that real-time model database sends business processing logic plug-in unit
Manage result to store according to unified form, wait other plug-in units to obtain;Or it is distributed to external module.
Beneficial effects of the present invention are:
(1) present invention decouples data model and business processing logic, is developed beneficial to secondary system, when developer develops
During new business plug-in unit, the standard data interface that is provided using module can by new plug-in registration into real-time monitoring module,
Carry out that other modules will be given by real-time model Database Publishing after handling accordingly, simplify the workload of secondary development, carry
The high autgmentability of system;
(2) business processing logic plug-in unit of the invention can carry out exterior arrangement by configuration file, in actual applications, existing
Field implementation personnel or user can carry out free configuration by changing configuration file according to final demand to existing plug-in unit, should not
Business plug-in unit would not load when module starts, and reduce the redundancy of code;
(3) present invention is advantageous to the customization of onsite user's service logic, when onsite user have to business processing logic it is special
During demand, the new business processing plug-in unit of the business development one can be directed to, then replaces original industry by changing configuration file
Business plug-in unit, so as to reduce the complexity of software maintenance, while reduces the version of program, is advantageous to the version management of software.
Brief description of the drawings
Fig. 1 is the flow chart for the monitoring backstage business customizing method based on plug-in unit invented substantially.
Embodiment
The present invention will be further described with embodiment below in conjunction with the accompanying drawings:
In LGS1000 cross operating system station level software platform for SCADA, a reality is constructed using this method of the present invention
When monitoring backstage module prototype, corresponding industry can be developed according to the specific business demand of intelligent substation on this prototype foundation
Business logic module, reaches the requirement of rapid build system business.
Wherein, the monitoring backstage in the present invention includes being used for the server for handling monitored data, monitored for handling
The server of data includes advance data acquisition module and real-time monitoring module;The advance data acquisition module, which is used to gather, supervises
The data that control backstage is monitored, and it is sent to real-time monitoring module;The real-time monitoring module includes data model and industry
Business processing logic.
As shown in figure 1, the monitoring backstage business customizing method based on plug-in unit of the present invention, including:
Step 1:The data model and business processing logic in real-time monitoring module are decoupled, real-time monitoring module is split
For real-time model database and business processing logic plug-in unit;
Step 2:Business processing logic plug-in card configuration file is obtained, business processing logic plug-in card configuration file passes through outside
The mode of configuration realizes the configuration of real-time monitoring module and business processing logic plug-in unit;
Step 3:Start real-time monitoring module, and load the business processing logic plug-in unit with real-time monitoring module phase configuration,
Carry out real time business processing;
Step 4:Real-time model database is stored or issued to service processing result, is finally reached monitoring backstage industry
The purpose of business customization.
Wherein, the present invention establishes a general real-time model template, the model by the data configuration instrument in system
Possessing self-description information, these templates are read in internal memory by real-time model database when starting, and according to the description of model
Information forms various devices and the data point that system is monitored in internal memory, and for the data letter after storage system processing
Breath, real-time model database possesses the communication interface with other modules, while real-time model database provides business processing plug-in unit
Registration and the interface for obtaining data.
The data message of general real-time model template storage system is used in real-time monitoring module using the above method
Be advantageous to data model storage being separated with service logic, so when for different service applications, need to only develop corresponding
Business processing plug-in unit, for modeling of the data model in internal memory and the interactive interface of real-time monitoring module and external module this
Portion's function then without developing again, improves the reusability of code.
Further, the process of real time business processing is carried out in step 3, including:
Upon actuation, business processing logic plug-in unit is by calling the offer of real-time model database for business processing logic plug-in unit
Function interface is registered to real-time model database;
Business processing logic plug-in unit gets corresponding data model from Real time capable module database, is patrolled according to own service
The demand of collecting generates the data model of corresponding plug-in unit matching;
The data that business processing logic plug-in unit is transmitted in timing acquisition real-time data base simultaneously, carry out service logic calculating;
Business processing logic plug-in unit is write the data after business processing using the function interface that real-time data base provides real
When model database in.
Handled by above-mentioned real time business, business processing logic plug-in unit can be got accordingly from Real time capable module database
Data model, and the data model that corresponding plug-in unit matches can be generated according to own service logic requirement, so carried significantly
The high efficiency of service logic matching treatment.
Wherein, business processing logic plug-in unit is by calling function interface that real-time model database provides to real-time model number
The content registered according to storehouse includes:Real time data processing interface and the communication interface of real-time model database and external module.
In step 3, the api function provided using operating system loads the business processing logic of monitoring module phase configuration
Plug-in unit.
Further, in step 4, service processing result that real-time model database sends business processing logic plug-in unit
Stored according to unified form, wait other plug-in units to obtain;Or it is distributed to external module.
Below for the monitoring backstage service customization system of the monitoring backstage business customizing method of the plug-in unit based on the present invention
It is described:
The monitoring backstage service customization system of the present invention, including:Decoupling module, configuration module, loading and business processing mould
Block and business result treatment module.
Wherein, decoupling module, its data model and business processing logic for being used to decouple in real-time monitoring module will be real-time
Monitoring module is split as real-time model database and business processing logic plug-in unit;
Configuration module, it is used to obtain business processing logic plug-in card configuration file, business processing logic plug-in card configuration file
The configuration of real-time monitoring module and business processing logic plug-in unit is realized by way of exterior arrangement;
Loading and Service Processing Module, it is used to start real-time monitoring module, and loads and real-time monitoring module phase configuration
Business processing logic plug-in unit, carry out real time business processing;
Business result treatment module, it is used to service processing result is stored or sent out using real-time model database
Cloth, it is finally reached the purpose of monitoring backstage business customizing.
Further, loading and Service Processing Module, including:Registering modules, data model generation module, service logic meter
Calculate module and Data write. module.
Wherein, Registering modules, it is used in business processing logic plug-in unit upon actuation, and business processing logic plug-in unit passes through tune
The function interface provided with real-time model database is registered to real-time model database;
Data model generation module, it is used to get phase from Real time capable module database using business processing logic plug-in unit
The data model answered, the data model of corresponding plug-in unit matching is generated according to own service logic requirement;
Service logic computing module, it is used for what is transmitted by business processing logic plug-in unit in timing acquisition real-time data base
Data simultaneously, carry out service logic calculating;
Data write. module, it is used for industry by business processing logic plug-in unit from the function interface that real-time data base provides
In data write-in real-time model database after business processing.
Business processing logic plug-in unit is by calling function interface that real-time model database provides to real-time model database
The content registered includes:Real time data processing interface and the communication interface of real-time model database and external module.
In loading and Service Processing Module, the api function provided using operating system loads monitoring module phase configuration
Business processing logic plug-in unit.
In business result treatment module, business processing knot that real-time model database sends business processing logic plug-in unit
Fruit stores according to unified form, waits other plug-in units to obtain;Or it is distributed to external module.
Although above-mentioned the embodiment of the present invention is described with reference to accompanying drawing, model not is protected to the present invention
The limitation enclosed, one of ordinary skill in the art should be understood that on the basis of technical scheme those skilled in the art are not
Need to pay various modifications or deformation that creative work can make still within protection scope of the present invention.