A kind of task processing method and device
Technical field
The application relates to intelligent power grid technology field, particularly relates to a kind of task processing method and device.
Background technology
Intelligent power is one of the mainstay and six big links that build strong intelligent grid, is the basis and the physical support that realize strong intelligent grid various functions, is impetus and the foothold of building strong intelligent grid.
Intelligent power is divided into instant process and two kinds of data processing methods of intellectual analysis according to the difference of business scenario and time scale, instant process is devoted to the process to real time data, flow of event, the instantaneity that guarantee processes, it is adaptable to the online event-monitoring in intelligent power field and Real-time Decision business;Intellectual analysis is then paid close attention to the height of mass historical data and is excavated, and owing to it analyzes complexity, generally requiring certain time completes to analyze, it is adaptable to the post-event diagnosis in intelligent power field processes and deep exploitation business.
Also just because of instant process generally supports the on-line checking of complexity in multiple affair flow of information, analysis and instant decision-making, the potential knowledge of historical data can not be made full use of, and intelligent analysis system is when carrying out Business Processing, owing to data volume is big, algorithm is complicated, it is longer that its corresponding analysis processes the time, can not accomplish namely to ask namely to show, cause that both can not carry out effectively scheduling and data interaction, and then cause it cannot be guaranteed that the intelligent power ageing and accuracy in Multiple Time Scales and business scenario processing procedure.
Summary of the invention
In view of this, the embodiment of the present application provides a kind of task processing method and device, to solve in prior art intelligent power process, instant process can not carry out effectively scheduling and data interaction with intellectual analysis, and then causes it cannot be guaranteed that the problem of the intelligent power ageing and accuracy in Multiple Time Scales and business scenario processing procedure.
To achieve these goals, the technical scheme that the embodiment of the present application provides is as follows:
A kind of task processing method, including:
Response task requests signal, the initial data corresponding with described task requests signal is obtained respectively in the first data base and/or the second data base, wherein, described first data base is used for storing real time data, described real time data is the data that the terminal acquisition that instant processing module receives sends in real time, and described second data base is for storing the data processed result in described instant processing module;
Convert described initial data to purpose data, according to the algorithm corresponding with described task requests signal, described purpose data are analyzed controlling described intelligent analysis module, obtain analyzing result, wherein, the algorithm requirement of the algorithm of corresponding task requests signal in described purpose data fit intelligent analysis module;
Using the described analysis result reference value as described instant processing module, return to described instant processing module.
Preferably, pre-setting task configuration file, include at least one task and attribute relevant to each task respectively in described task configuration file, described attribute includes Runtime,
The method also includes:
Judge that whether the Runtime in the attribute of each task in described task configuration file is identical with system current run time one by one;
When the Runtime that there is task is identical with system current run time, send the task requests signal corresponding with described task.
Preferably, described attribute includes task priority,
The method also includes:
When the Runtime that there is at least two task is identical with system current run time, send the task requests signal that the task high with task priority is corresponding.
Preferably, convert described initial data to purpose data, wherein, the algorithm requirement of the algorithm of corresponding task requests signal in described purpose data fit intelligent analysis module, including:
The algorithm requirement of the algorithm according to described task requests signal corresponding in intelligent analysis module, is undertaken described initial data collecting, filtering generation purpose data.
Preferably, the generation process of described first data base is:
Setting a task and the attribute relevant to described task in described task configuration file, described attribute includes the Runtime corresponding with the memory space of instant processing module and task run frequency;
According to described Runtime and task run frequency, obtain the real time data in instant processing module;Described real time data is the data that the terminal acquisition that described instant processing module receives sends in real time;
The described real time data got is stored, generates the first data base.
Preferably, the generation process of described second data base is:
Setting a task and the attribute relevant to described task in described task configuration file, described attribute includes Runtime, task obtains scope and task run frequency,
According to described Runtime and task run frequency, obtain the data processed result obtaining the corresponding instant processing module of scope with described task;
The described data processed result got is stored, generates the second data base.
Preferably, also including: be provided with at least one second data base, described each data base is respectively used to store the data processed result obtaining the corresponding instant processing module of scope from different tasks.
Preferably, described terminal acquisition is for can interrupt terminal acquisition and/or can not interrupt terminal acquisition.
A kind of Task Processing Unit, including: initial data acquisition module, control analysis module and result return module, wherein,
Described initial data acquisition module is used for responding task requests signal, the initial data corresponding with described task requests signal is obtained respectively in the first data base and the second data base, wherein, described first data base is used for storing real time data, described real time data is the data that the terminal acquisition that instant processing module receives sends in real time, and described second data base is for storing the data processed result in described instant processing module;
Described control analysis module is connected with described initial data acquisition module, for converting described initial data to purpose data, according to the algorithm corresponding with described task requests signal, described purpose data are analyzed controlling described intelligent analysis module, obtain analyzing result, wherein, the algorithm requirement of the algorithm of corresponding task requests signal in described purpose data fit intelligent analysis module;
Described result returns module and is connected with described control analysis module, is used for, using the described analysis result reference value as described instant processing module, returning to described instant processing module.
Preferably, being previously provided with task configuration file, include at least one task and attribute relevant to each task respectively in described task configuration file, described attribute includes Runtime,
This device also includes: run time judgment module and task requests signal transmitting module, wherein,
Described operation time judgment module is for judging that whether the Runtime in the attribute of each task in described task configuration file is identical with system current run time one by one;
Described task requests signal transmitting module is connected with described operation time judgment module, for when the Runtime that there is task is identical with system current run time, sending the task requests signal corresponding with described task.
The application provides a kind of task processing method and device, first with the real time data in instant processing module and/or data processed result after data conversion and intelligent analysis module are analyzed, obtain analyzing result, then the analysis obtained result is being returned to instant processing module as the reference value of instant processing module, use when processing data for instant processing module, make instant process and intellectual analysis can carry out efficient scheduling and data interaction, and then ensure that the intelligent power ageing and accuracy in Multiple Time Scales and business scenario processing procedure.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present application or technical scheme of the prior art, the accompanying drawing used required in embodiment or description of the prior art will be briefly described below, apparently, the accompanying drawing that the following describes is only some embodiments recorded in the application, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
A kind of task processing method flow chart that Fig. 1 provides for the embodiment of the present application one;
A kind of Task Processing Unit structural representation that Fig. 2 provides for the embodiment of the present application two.
Detailed description of the invention
In order to make those skilled in the art be more fully understood that the technical scheme in the application, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only some embodiments of the present application, rather than whole embodiments.Based on the embodiment in the application, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, all should belong to the scope of the application protection.
Embodiment one:
A kind of task processing method flow chart that Fig. 1 provides for the embodiment of the present application one.
S101, response task requests signal, obtain the initial data corresponding with task requests signal respectively in the first data base and the second data base.
It is previously provided with the first data base and the second data base in the embodiment of the present application, wherein, first data base is used for storing real time data, real time data is the data that the terminal acquisition that instant processing module receives sends in real time, and the second data base is for storing the data processed result in instant processing module.
In the embodiment of the present application, it is preferred that but it is not limited to terminal acquisition for terminal acquisition can be interrupted and/or can not interrupt terminal acquisition, inventor can arbitrarily arrange terminal data collecting device according to the demand of oneself.
Response task requests signal, the initial data corresponding with task requests signal is obtained respectively in the first data base and the second data base, visible, initial data is the data that the needs according to task requests signal directly obtain respectively in the first data base and/or the second data base.
Preferably, the generation process of the first data base is in the embodiment of the present application: set a task and the attribute relevant to this task in task configuration file, wherein, attribute includes the Runtime corresponding with the memory space of instant processing module and task run frequency.Here the memory space that Runtime is according to instant processing module sets, say, that be that the ability according to instant processing module storage data sets Runtime.
When the Runtime of this task is identical with system current run time, send the task requests signal corresponding with this task, obtain the real time data in instant processing module, the real time data got is stored, generate the first data base, and this real time data is the data that the terminal acquisition that instant processing module receives sends in real time.
In the embodiment of the present application, not only setting the Runtime of this task, also set task run frequency, namely how long this task interval performs once, by performing this task according to the Runtime set and task run frequency.
Preferably, the generation process of the second data base is in the embodiment of the present application: set a task and the attribute relevant to task in task configuration file, and attribute includes Runtime, task obtains scope and task run frequency.
When the Runtime of this task is identical with system current run time, send the task requests signal corresponding with this task, according to Runtime and task run frequency, obtain the data processed result obtaining the corresponding instant processing module of scope with task, and the data processed result got is stored, generate the second data base.
Preferably, in the embodiment of the present application, include at least one second data base, and each data base is respectively used to store the data processed result obtaining the corresponding instant processing module of scope from different tasks.
S102 to, initial data is converted purpose data, according to the algorithm corresponding with task requests signal, purpose data are analyzed controlling intelligent analysis module, obtain analyzing result.
The algorithm requirement of the algorithm according to task requests signal corresponding in intelligent analysis module, undertaken initial data collecting, filtering generation purpose data, and control intelligent analysis module according to the algorithm corresponding with task requests signal, purpose data to be analyzed, obtain analyzing result.
In the embodiment of the present application, the method that initial data carries out collecting, filtering generation purpose data preferably but is not limited to, generate and/or by inputting parameter by directly invoking database statement, then call corresponding database statement to generate, inventor can arbitrarily arrange generating mode according to the demand of oneself, does not repeat them here.
S103, using analyze result as the reference value of instant processing module, return to instant processing module.
In the embodiment of the present application when controlling after purpose data are analyzed obtaining analysis result by intelligent analysis module according to the algorithm corresponding with task requests signal, can using the analysis result that the obtains reference value as instant processing module, return to instant processing module, so that data are processed by instant processing module according to the reference value received.
Further, the task processing method that the embodiment of the present application provides also includes:
In the embodiment of the present application, pre-setting configuration file, include at least one task and attribute relevant to each task respectively in configuration file, attribute includes Runtime.Judge that whether the Runtime in the attribute of each task in task configuration file is identical with system current run time one by one, when the Runtime that there is task is identical with system current run time, send the task requests signal corresponding with task, in order to the task requests signal sent is responded and carries out corresponding task process.
Further, the task processing method that the embodiment of the present application provides also includes:
In the embodiment of the present application, the attribute of task can also include this attribute of task priority, when the Runtime that there is at least two task in task configuration file is identical with system current run time, send the task requests signal that the task high with task priority is corresponding.
Identical with system current run time when the operation time that there is at least two task in task configuration file, and the attribute of this at least two task existed all is not provided with the task priority of task priority or setting identical time, then according to current operating situation, automatically select a tasks carrying.
The embodiment of the present application provides a kind of task processing method, first with the real time data in instant processing module and/or data processed result after data conversion and intelligent analysis module are analyzed, obtain analyzing result, then the analysis obtained result is being returned to instant processing module as the reference value of instant processing module, use when processing data for instant processing module, make instant process and intellectual analysis can carry out efficient scheduling and data interaction, and then ensure that the intelligent power ageing and accuracy in Multiple Time Scales and business scenario processing procedure.
Embodiment two:
A kind of Task Processing Unit structural representation that Fig. 2 provides for the embodiment of the present application two.
As in figure 2 it is shown, this device includes: initial data acquisition module 1, control analysis module 2 and result return module 3, and initial data acquisition module 1, control analysis module 2 and result return module 3 are sequentially connected and connect.
Wherein, initial data acquisition module 1 is used for responding task requests signal, the initial data corresponding with task requests signal is obtained respectively in the first data base and the second data base, wherein, first data base is used for storing real time data, real time data is the data that the terminal acquisition that instant processing module receives sends in real time, and the second data base is for storing the data processed result in instant processing module.
Control analysis module 2 to be connected with initial data acquisition module 1, for initial data being converted to purpose data, according to the algorithm corresponding with task requests signal, purpose data are analyzed controlling intelligent analysis module, obtain analyzing result, wherein, the algorithm requirement of the algorithm of corresponding task requests signal in purpose data fit intelligent analysis module.
Result returns module 3 and is connected with controlling analysis module 2, for using analyzing result as the reference value of instant processing module, returning to instant processing module.
Further, the Task Processing Unit that the embodiment of the present application provides also includes: run time judgment module and task requests signal transmitting module.
Wherein, time judgment module is run for judging that whether the Runtime in the attribute of each task in task configuration file is identical with system current run time one by one.
Task requests signal transmitting module is connected with running time judgment module, for when the Runtime that there is task is identical with system current run time, sending the task requests signal corresponding with task.
The embodiment of the present application provides a kind of Task Processing Unit, including: initial data acquisition module, control analysis module and result returns module, the real time data in instant processing module and/or data processed result is obtained by initial data acquisition module, then pass through control analysis module real time data and/or data processed result are carried out data conversion and control intelligent analysis module to conversion after data be analyzed, obtain analyzing result, and return module using the reference value instant processing module of return as instant processing module of the analysiss result that obtains by result, use when processing data for instant processing module, make instant process and intellectual analysis can carry out efficient scheduling and data interaction, and then ensure that the intelligent power ageing and accuracy in Multiple Time Scales and business scenario processing procedure.
In this specification, each embodiment adopts the mode gone forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually referring to.For device disclosed in embodiment, owing to it corresponds to the method disclosed in Example, so what describe is fairly simple, relevant part illustrates referring to method part.
Below it is only the preferred implementation of the application, makes to skilled artisans appreciate that or realize the application.The multiple amendment of these embodiments be will be apparent to one skilled in the art, and generic principles defined herein when without departing from spirit herein or scope, can realize in other embodiments.Therefore, the application is not intended to be limited to the embodiments shown herein, and is to fit to the widest scope consistent with principles disclosed herein and features of novelty.