CN105630581A - Task processing method and device, and computer storage medium - Google Patents

Task processing method and device, and computer storage medium Download PDF

Info

Publication number
CN105630581A
CN105630581A CN201410626094.3A CN201410626094A CN105630581A CN 105630581 A CN105630581 A CN 105630581A CN 201410626094 A CN201410626094 A CN 201410626094A CN 105630581 A CN105630581 A CN 105630581A
Authority
CN
China
Prior art keywords
task
function
configuration file
signal
data structure
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201410626094.3A
Other languages
Chinese (zh)
Inventor
程立
熊慕文
陈宏君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NR Electric Co Ltd
NR Engineering Co Ltd
Original Assignee
NR Electric Co Ltd
NR Engineering Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NR Electric Co Ltd, NR Engineering Co Ltd filed Critical NR Electric Co Ltd
Priority to CN201410626094.3A priority Critical patent/CN105630581A/en
Publication of CN105630581A publication Critical patent/CN105630581A/en
Pending legal-status Critical Current

Links

Landscapes

  • Programmable Controllers (AREA)

Abstract

Embodiments of the invention disclose a task processing method and device, and a computer storage medium. The task processing method comprises: configuring task process information, and generating a task configuration file characterized by a script language according to the task process information; scanning the task configuration file, generating a data structure according to the task configuration file, and generating at least one task based on the data structure; and respectively issuing at least one action signal according to the at least one task, and respectively performing action characterized by the at least one action signal.

Description

A kind of task processing method, equipment and computer-readable storage medium
Technical field
The present invention relates to field of power electronics, be specifically related to a kind of task processing method, equipment and computer-readable storage medium.
Background technology
In recent years, along with the unprecedented growth of power grid construction, drive the quick growth of secondary device in power system. The extensive use of protection measuring and controlling equipment, also builds figure, Script controlling mechanism proposes more extensively, requirement more flexibly. Traditional protection TT&C task adopts the mode of firmware, carries out hard coded according to required function characteristic, when application demand changes; need to recompile firmware; programming procedural difficulties, motility and operability are all poor, and need to expend substantial amounts of human and material resources.
Summary of the invention
For solving the technical problem of existing existence, the embodiment of the present invention provides a kind of task processing method, equipment and computer-readable storage medium, it is possible to the problem solving traditional order Row control hard coded, programming procedural difficulties.
For reaching above-mentioned purpose, the technical scheme of the embodiment of the present invention is achieved in that
Embodiments providing a kind of task processing method, described method includes:
Configuration task procedure information, generates the task configuration file characterized by script according to described flow of task information;
Scan described task configuration file, generate data structure according to described task configuration file, based at least one task of described data structure building;
Send at least one actuating signal according at least one task described respectively, perform the action that at least one actuating signal described characterizes respectively.
In such scheme, described based on after at least one task of described data structure building, described method also includes:
At least one task described is assigned at least two queue by the property parameters according at least one task described;
Wherein, described at least two queue at least includes: need the open loop queue of man-machine interaction and without the closed loop queue of man-machine interaction.
In such scheme, at least one task described is assigned at least two queue by the described property parameters based at least one task described, including:
When at least one task described, the property parameters of arbitrary task exists special parameter, described task is assigned in the open loop queue needing man-machine interaction;
When at least one task described, the property parameters of arbitrary task is absent from described special parameter, described task is assigned to without in the closed loop queue of man-machine interaction.
In such scheme, after the described task configuration file generating script sign according to described procedure information, described method also includes:
Described task configuration file is stored in shared drive;
Accordingly, the described task configuration file of described scanning, generate data structure according to described task configuration file, including:
From described shared drive, read described task configuration file, described task configuration file is loaded into Installed System Memory;
By presetting the analysis mode described task configuration file of parsing in described Installed System Memory, generate the data structure at least including symbol table, syntax tree and interpreter.
In such scheme, described configuration task procedure information, including:
Configuration logic of propositions rule; Described logic of propositions rule at least includes: four arithmetic operation, logical operations, conditional statement, skip instruction, Do statement and function performance block; Wherein, described function performance block at least includes at least one of following function performance block: switch point function/conjunctions function, gear liter function/drop function/stop function, soft pressing plate throwing function/move back function, fixed value modification function;
The flow of task information characterized by flow chart is generated according to described logic of propositions rule.
In such scheme, described data structure at least includes: symbol table, syntax tree and interpreter; Described send actuating signal according at least one task described respectively, including:
The function triggers callback function that funcall property parameters in logical consequence according to the interpreter in task and described task characterizes, sends actuating signal based on described call back function;
Described actuating signal at least includes at least one of following actuating signal: switch sub-signal/conjunctions signal, gear liter signal/drop signal/stop signal, soft pressing plate voted signal/bounce number, fixed value modification signal.
In such scheme, the described action performing described at least one actuating signal sign respectively, described action at least includes at least one of following action: switch point/conjunction, gear lifting/lowering/stop, soft pressing plate are thrown/moved back, fixed value modification.
The embodiment of the present invention additionally provides a kind of equipment, and described equipment includes: dispensing unit, the first generation unit, the second generation unit and performance element; Wherein,
Described dispensing unit, for configuration task procedure information;
Described first generates unit, generates, for the described flow of task information configured according to described dispensing unit, the task configuration file characterized by script;
Described second generates unit, generates, for scanning described first, the described task configuration file that unit generates, generates data structure according to described task configuration file, based at least one task of described data structure building;
Described performance element, sends at least one actuating signal for generating at least one task described in unit generation according to described second respectively, performs the action that at least one actuating signal described characterizes respectively.
In such scheme, described equipment also includes allocation units, unit is generated based on, after at least one task of described data structure building, being assigned at least two queue according to the property parameters of at least one task described by least one task described for described second; Wherein, described at least two queue at least includes: need the open loop queue of man-machine interaction and without the closed loop queue of man-machine interaction.
In such scheme, described allocation units, for when at least one task described, the property parameters of arbitrary task exists special parameter, being assigned in the open loop queue needing man-machine interaction by described task; When at least one task described, the property parameters of arbitrary task is absent from described special parameter, described task is assigned to without in the closed loop queue of man-machine interaction.
In such scheme, described equipment also includes the first memory element and the second memory element;
Described first memory element, after generating the unit described task configuration file of generation for described first, stores described task configuration file;
Described second generates unit, for reading described task configuration file from described first memory element, described task configuration file is loaded into described second memory element, by presetting the analysis mode described task configuration file of parsing in described second memory element, generate the data structure at least including symbol table, syntax tree and interpreter.
In such scheme, described dispensing unit, it is used for configuring logic of propositions rule; The flow of task information characterized by flow chart is generated according to described logic of propositions rule; Described logic of propositions rule at least includes: four arithmetic operation, logical operations, conditional statement, skip instruction, Do statement and function performance block; Wherein, described function performance block at least includes at least one of following function performance block: switch point function/conjunctions function, gear liter function/drop function/stop function, soft pressing plate throwing function/move back function, fixed value modification function.
In such scheme, described data structure at least includes: symbol table, syntax tree and interpreter;
Described performance element, for the function triggers callback function that the funcall property parameters in the logical consequence according to the interpreter in task and described task characterizes, sends actuating signal based on described call back function; Described actuating signal at least includes at least one of following actuating signal: switch sub-signal/conjunctions signal, gear liter signal/drop signal/stop signal, soft pressing plate voted signal/bounce number, fixed value modification signal.
In such scheme, described performance element, for performing the action that at least one actuating signal described characterizes respectively, described action at least includes at least one of following action: switch point/conjunction, gear lifting/lowering/stop, soft pressing plate are thrown/moved back, fixed value modification.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, and in described computer-readable storage medium, storage has computer executable instructions, and described computer executable instructions is for performing the task processing method described in the embodiment of the present invention.
Task processing method, equipment and the computer-readable storage medium that the embodiment of the present invention provides, by configuration task procedure information, generates the task configuration file characterized by script according to described flow of task information; Scan described task configuration file, generate data structure according to described task configuration file, based at least one task of described data structure building; Send at least one actuating signal according at least one task described respectively, perform the action that at least one actuating signal described characterizes respectively. So, adopt the technical scheme of the embodiment of the present invention, improve independence and motility that embedded system sequence flow controls, solve traditional order Row control hard coded, programming procedural difficulties, and the drawback that motility and operability are not strong, greatly reduce the consumption of human and material resources.
Accompanying drawing explanation
Fig. 1 is the schematic flow sheet of the task processing method of the embodiment of the present invention;
Fig. 2 is the schematic diagram that in the embodiment of the present invention, task processes;
Fig. 3 is the composition structural representation of the equipment of the embodiment of the present invention;
Fig. 4 is the detailed process schematic diagram of the task processing method of the embodiment of the present invention.
Detailed description of the invention
Below in conjunction with drawings and the specific embodiments, the present invention is further detailed explanation.
Embodiments provide a kind of task processing method. Fig. 1 is the schematic flow sheet of the task processing method of the embodiment of the present invention; As it is shown in figure 1, described task processing method includes:
Step 101: configuration task procedure information.
Here, described configuration task procedure information, including:
Configuration logic of propositions rule; Described logic of propositions rule at least includes: four arithmetic operation, logical operations, conditional statement, skip instruction, Do statement and function performance block; Wherein, described function performance block at least includes at least one of following function performance block: switch point function/conjunctions function, gear liter function/drop function/stop function, soft pressing plate throwing function/move back function, fixed value modification function;
The flow of task information characterized by flow chart is generated according to described logic of propositions rule.
Concrete, described configuration logic of propositions rule requires to configure according to script, that is: configuration basic language key element is required according to script, described basic language key element at least includes: four arithmetic operation, logical operations, conditional statement (statement keyword section such as if/else), skip instruction (statement keyword section such as goto), Do statement (statement keyword section such as dowhile), and require configuration function functional device according to script, described function performance block at least includes at least one of following function performance block: switch point/close (critical field is corresponding to cbOpen or cbClose), (critical field is corresponding to tapeUp for gear lifting/lowering/stop, tapeDown, tapeStop), soft pressing plate is thrown/is moved back, fixed value modification, wherein, described four arithmetic operation includes: add (+) computing, subtract (-) computing, take advantage of (*) computing and except (/) computing, described logical operations includes: logical AND (&&) computing, logic or (| |) computing, logic NOT (! ) computing, logic XOR (^) computing, after described logic of propositions rule configuration completes, configuring the product process figure flow of task information characterized based on described logic of propositions rule according to application demand, different application demands can configure and generates different flow of task information, therefore, in the embodiment of the present invention, user can generate different flow of task information by different application demand configurations, from without recompiling firmware and the whole application program of programming.
Step 102: generate the task configuration file characterized by script according to described flow of task information.
Here, described task configuration file at least includes following critical field:
File summary field (GENERAL), described GENERAL field description file format version, generate the time, smart machine title (IEDname), smart machine describe attributes such as (IEDDesc), for the management of configuration text;
Document size field (SIZE), described SIZE field description input quantity, output quantity, formula quantity and script quantity, do summary description for setting up grammatical relation;
Input variable field (INPUT_x), the attribute of described INPUT_x field description input, including: signal characteristic, signal source, data referencing (DataRef), short address, description etc.;
Output variable field (OUTPUT_x), the attribute of described OUTPUT_x field description output, including: behavior characteristics, signal deficiency and excess feature, short address, description, parameter etc.;
Formula (FORMULA_x) field, described FORMULA_x field description formula expression, input is associated with output;
Script (SCRIPT_x) field, described SCRIPT_x field description script rule, adopt the results such as described OUTPUT_x field to participate in script as variable, complete sequence flow control.
File verification (FILE_CHECK) field, described FILE_CHECK field description file verification and, it is prevented that file corruption or be tampered.
Step 103: scan described task configuration file, generates data structure according to described task configuration file, based at least one task of described data structure building.
Task processing method described in the present embodiment can be applicable to have in the equipment of shared drive and Installed System Memory; Described shared drive can be the memory space in described equipment mainly for operating system; Described Installed System Memory can be the memory space in described equipment mainly for real-time operation; Then described in step 102 generate, according to described flow of task information, the task configuration file characterized by script after, described method also includes:
Described task configuration file is stored in shared drive;
Accordingly, the described task configuration file of scanning described in this step, generate data structure according to described task configuration file, including: from described shared drive, read described task configuration file, described task configuration file is loaded into Installed System Memory; By presetting the analysis mode described task configuration file of parsing in described Installed System Memory, generate the data structure at least including symbol table, syntax tree and interpreter.
Concrete, described task configuration file is loaded into Installed System Memory, resolve described task configuration file, described analysis mode includes the processes such as lexical scan, grammer scanning, semantic analysis, based on each field in described task configuration file, particularly as follows: form incidence relation according to input variable field (INPUT_x), output variable field (OUTPUT_x), formula (FORMULA_x) field and script (SCRIPT_x) field, generate the data structures such as symbol table, expression tree and interpreter based on described incidence relation.
According in another embodiment of the embodiment of the present invention, described based on after at least one task of described data structure building, described method also includes: be assigned at least two queue according to the property parameters of at least one task described by least one task described; Wherein, described at least two queue at least includes: need the open loop queue of man-machine interaction and without the closed loop queue of man-machine interaction.
At least one task described is assigned at least two queue by the described property parameters based at least one task described, including: when at least one task described, the property parameters of arbitrary task exists special parameter, described task is assigned in the open loop queue needing man-machine interaction; When at least one task described, the property parameters of arbitrary task is absent from described special parameter, described task is assigned to without in the closed loop queue of man-machine interaction.
Concrete, the task described in the present embodiment passes through data structure building, and therefore described task characterizes also by described data structure; Here, the property parameters of described task can be specifically the language feature parameter extracted in syntax tree in described data structure, when described language feature parameter includes as sent report (sendReport), waiting that user confirms the special parameter making sign Man Machine Interfaces such as (waitForUserCmd), by in described task distribution to the open loop queue needing man-machine interaction, equipment provides open loop mode of operation, it is necessary to man-machine interactive operation determines the behavior after corresponding task; When described language feature parameter does not include above-mentioned special parameter, described task is assigned to without, in the closed loop queue of man-machine interaction, equipment providing operation with closed ring pattern, it is not necessary to man-machine interactive operation, for applying offer separate outlet ports accordingly.
In the present embodiment, at least one task described forms at least one independent process, or forms several threads under an independent process.
Step 104: send at least one actuating signal according at least one task described respectively, performs the action that at least one actuating signal described characterizes respectively.
Here, described send actuating signal according at least one task described respectively, including: the function triggers callback function characterized according to the funcall property parameters in the logical consequence of the interpreter in task and described task, send actuating signal based on described call back function; Wherein, described actuating signal at least includes at least one of following actuating signal: switch sub-signal/conjunctions signal, gear liter signal/drop signal/stop signal, soft pressing plate voted signal/bounce number, fixed value modification signal.
Sending actuating signal based on above-mentioned call back function and perform the action that at least one actuating signal described characterizes respectively, described action at least includes at least one of following action: switch point/conjunction, gear lifting/lowering/stop, soft pressing plate are thrown/moved back, fixed value modification.
Wherein, described " switch point/close " characterizes the separating brake/combined floodgate (i.e. disconnection/the connection of circuit) of switch, and described switch divides/close the switchgear that can be used for transformer station, when described action is " switch point ", characterizing described switch sub-switching operation, namely transmission line of electricity disconnects; Accordingly, when described action is " switch closes ", described switch closing operation is characterized, i.e. transmission line of electricity connection.
Described " gear lifting/lowering/stop " can be used in the transformator of transformer station, when there is shake (namely transmission voltage raises or reduces) in transmission voltage, transformator need to regulate transmission voltage, jitter conditions according to described transmission voltage, corresponding reduction or rising transmission voltage, then " gear liter " characterizes and raises transmission voltage; " gear drops " characterizes and reduces transmission voltage; " gear stops " characterizes the adjustment stopped transmission voltage.
Described " soft pressing plate is thrown/moved back " can be any functional switch of transformer station, and described " soft pressing plate throwing " characterizes the unlatching of described functional switch; Described " soft pressing plate moves back " characterizes the closedown of described functional switch. Concrete, described functional switch is the switch write by software program, i.e. virtual switch. Described functional switch can pass through assignment " 0 " or " 1 " characterizes turning off or on of described functional switch.
Described " fixed value modification " can be the numerical value that arbitrarily can set in transformer station, for instance separating brake pulsewidth 500 milliseconds.
Concrete, when at least one task described forms at least one independent process, or when forming several threads under an independent process, the function triggers callback function that funcall property parameters in logical consequence according to the interpreter in described process or thread and described task characterizes, actuating signal is sent based on described call back function, thus triggering corresponding trigger table, perform the action that described trigger table characterizes. Here, the data structures such as at least one task instances described turns at least one Task entity, described Task entity syntax tree characterize, and the execution of these data structures depends on interpreter; Thering is provided independent interpreter library, described interpreter library in system is dynamic base pattern, provides independent code space and part system data space for all tasks; Each task is called explanation by storehouse and is performed described task, a series of action of final acquisition, for instance the open/close of switch.
The present embodiment adopts parallel mechanism, open loop queue and closed loop queue are instantiated as at least one Task entity, not mutual mutually between each Task entity, independently execute; Fig. 2 is the schematic diagram that in the embodiment of the present invention, task processes; As in figure 2 it is shown, set of tasks is instantiated as N number of task, as illustrated in the drawing task 1, task 2 to task N; Each Task entity is explained by interpreter and is performed; The function triggers callback function that funcall property parameters in logical consequence according to described interpreter and described task characterizes, synchronize triggers callback function, thus triggering corresponding trigger table, actuating signal is sent to system bus, cause control, sequential control (SC, SequenceControl), the action behavior such as automatism voltage control (AVR, AutoVoltageRegular), Automatic Generation Control (AGC, AutoGenerationControl).
According in another embodiment of the embodiment of the present invention, the data structure of each task includes the number of times of action executing, and the number of times of described action executing characterizes the life cycle of corresponding task; When after the corresponding number of times of action executing of task, illustrate that the life cycle of described task terminates; When the life cycle of described task terminates, the automatic destructed corresponding resource of described task.
Adopt the technical scheme of the embodiment of the present invention, improve independence and motility that embedded system sequence flow controls, solve traditional order Row control hard coded, programming procedural difficulties and the drawback that motility and operability are not strong, greatly reduce the consumption of human and material resources.
The embodiment of the present invention additionally provides a kind of equipment. Fig. 3 is the composition structural representation of the equipment of the embodiment of the present invention; As it is shown on figure 3, described equipment includes: dispensing unit 31, first generates unit 32, second and generates unit 33 and performance element 34; Wherein,
Described dispensing unit 31, for configuration task procedure information;
Described first generates unit 32, for generating, according to the described flow of task information of described dispensing unit 31 configuration, the task configuration file characterized by script;
Described second generates unit 33, generates, for scanning described first, the described task configuration file that unit 32 generates, generates data structure according to described task configuration file, based at least one task of described data structure building;
Described performance element 34, sends at least one actuating signal for generating at least one task described in unit 33 generation according to described second respectively, performs the action that at least one actuating signal described characterizes respectively.
In the present embodiment, described dispensing unit 31 configuration task procedure information specifically includes: configuration logic of propositions rule; The flow of task information characterized by flow chart is generated according to described logic of propositions rule; Wherein, described logic of propositions rule at least includes: four arithmetic operation, logical operations, conditional statement, skip instruction, Do statement and function performance block; Wherein, described function performance block at least includes at least one of following function performance block: switch point function/conjunctions function, gear liter function/drop function/stop function, soft pressing plate throwing function/move back function, fixed value modification function.
Concrete, described dispensing unit 31 configures logic of propositions rule and configures according to script requirement, that is: configuration basic language key element is required according to script, described basic language key element at least includes: four arithmetic operation, logical operations, conditional statement (statement keyword section such as if/else), skip instruction (statement keyword section such as goto), Do statement (statement keyword section such as dowhile), and require configuration function functional device according to script, described function performance block at least includes at least one of following function performance block: switch point/close (critical field is corresponding to cbOpen or cbClose), (critical field is corresponding to tapeUp for gear lifting/lowering/stop, tapeDown, tapeStop), soft pressing plate is thrown/is moved back, fixed value modification, wherein, described four arithmetic operation includes: add (+) computing, subtract (-) computing, take advantage of (*) computing and except (/) computing, described logical operations includes: logical AND (&&) computing, logic or (| |) computing, logic NOT (! ) computing, logic XOR (^) computing, after described logic of propositions rule configuration completes, configuring the product process figure flow of task information characterized based on described logic of propositions rule according to application demand, different application demands can configure and generates different flow of task information, therefore, in the embodiment of the present invention, user can generate different flow of task information by different application demand configurations, from without recompiling firmware and the whole application program of programming.
Here, described task configuration file at least includes following critical field:
File summary field (GENERAL), described GENERAL field description file format version, generate the time, smart machine title (IEDname), smart machine describe attributes such as (IEDDesc), for the management of configuration text;
Document size field (SIZE), described SIZE field description input quantity, output quantity, formula quantity and script quantity, do summary description for setting up grammatical relation;
Input variable field (INPUT_x), the attribute of described INPUT_x field description input, including: signal characteristic, signal source, DataRef, short address, description etc.;
Output variable field (OUTPUT_x), the attribute of described OUTPUT_x field description output, including: behavior characteristics, signal deficiency and excess feature, short address, description, parameter etc.;
Formula (FORMULA_x) field, described FORMULA_x field description formula expression, input is associated with output;
Script (SCRIPT_x) field, described SCRIPT_x field description script rule, adopt the results such as described OUTPUT_x field to participate in script as variable, complete sequence flow control.
File verification (FILE_CHECK) field, described FILE_CHECK field description file verification and, it is prevented that file corruption or be tampered.
In another embodiment, described equipment also includes allocation units 35, unit 33 is generated based on, after at least one task of described data structure building, being assigned at least two queue according to the property parameters of at least one task described by least one task described for described second; Wherein, described at least two queue at least includes: need the open loop queue of man-machine interaction and without the closed loop queue of man-machine interaction.
Wherein, described allocation units 35, for when at least one task described, the property parameters of arbitrary task exists special parameter, being assigned in the open loop queue needing man-machine interaction by described task; When at least one task described, the property parameters of arbitrary task is absent from described special parameter, described task is assigned to without in the closed loop queue of man-machine interaction.
Concrete, the task described in the present embodiment passes through data structure building, and therefore described task characterizes also by described data structure; Here, the property parameters of described task can be specifically the language feature parameter extracted in syntax tree in described data structure, when described language feature parameter includes as sent report (sendReport), waiting that user confirms the special parameter making sign Man Machine Interfaces such as (waitForUserCmd), described task is distributed to being assigned in the open loop queue needing man-machine interaction, equipment provides open loop mode of operation, it is necessary to man-machine interactive operation determines the behavior after corresponding task; When described language feature parameter does not include above-mentioned special parameter, described task is assigned to without, in the closed loop queue of man-machine interaction, equipment providing operation with closed ring pattern, it is not necessary to man-machine interactive operation, for applying offer separate outlet ports accordingly.
In another embodiment, described equipment also includes the first memory element 36 and the second memory element 37;
Described first memory element 36, after generating described task configuration file for described first generation unit 32, stores described task configuration file;
Described second generates unit 33, for reading described task configuration file from described first memory element 36, described task configuration file is loaded into described second memory element 37, by presetting the analysis mode described task configuration file of parsing in described second memory element 37, generate the data structure at least including symbol table, syntax tree and interpreter.
Equipment described in the present embodiment also has in shared drive and Installed System Memory; Described shared drive can be the memory space in described equipment mainly for operating system; Described Installed System Memory can be the memory space in described equipment mainly for real-time operation; Then described first generate after unit 32 generates, according to described flow of task information, the task configuration file characterized by script, described task configuration file is stored in shared drive;
Accordingly, described second generates unit 33 scans described task configuration file, generates data structure according to described task configuration file, including: from described shared drive, read described task configuration file, described task configuration file is loaded into Installed System Memory; By presetting the analysis mode described task configuration file of parsing in described Installed System Memory, generate the data structure at least including symbol table, syntax tree and interpreter.
Concrete, described second generates unit 33 is loaded into Installed System Memory by described task configuration file, resolve described task configuration file, described analysis mode includes lexical scan, grammer scans, the processes such as semantic analysis, based on each field in described task configuration file, particularly as follows: according to input variable field (INPUT_x), output variable field (OUTPUT_x), formula (FORMULA_x) field and script (SCRIPT_x) field form incidence relation, symbol table is generated based on described incidence relation, the data structure such as expression tree and interpreter.
In another specific embodiment, described dispensing unit 31, it is used for configuring logic of propositions rule; The flow of task information characterized by flow chart is generated according to described logic of propositions rule; Described logic of propositions rule at least includes: four arithmetic operation, logical operations, conditional statement, skip instruction, Do statement and function performance block; Wherein, described function performance block at least includes: switch point/conjunction, gear lifting/lowering/stop, soft pressing plate are thrown/moved back, fixed value modification.
Based in above-described embodiment, described data structure at least includes: symbol table, syntax tree and interpreter;
Described performance element 34, for the function triggers callback function that the funcall property parameters in the logical consequence according to the interpreter in task and described task characterizes, sends actuating signal based on described call back function; Described actuating signal at least includes at least one of following actuating signal: switch sub-signal/conjunctions signal, gear liter signal/drop signal/stop signal, soft pressing plate voted signal/bounce number, fixed value modification signal.
Accordingly, described performance element 34, for performing the action that at least one actuating signal described characterizes respectively, described action at least includes at least one of following action: switch point/conjunction, gear lifting/lowering/stop, soft pressing plate are thrown/moved back, fixed value modification.
Concrete, at least one task described forms at least one independent process, or form several threads under an independent process, the function triggers callback function that funcall property parameters in logical consequence according to the interpreter in described process or thread and described task characterizes, actuating signal is sent based on described call back function, thus triggering corresponding trigger table, perform the action that described trigger table characterizes.
In the present embodiment, described dispensing unit the 31, first generation unit the 32, second generation unit 33 and performance element 34, allocation units 35 are in actual applications, can by the central processing unit (CPU in described equipment, CentralProcessingUnit), digital signal processor (DSP, DigitalSignalProcessor) or programmable gate array (FPGA, Field-ProgrammableGateArray) realize.
The embodiment of the present invention additionally provides a kind of task processing method; Fig. 4 is the detailed process schematic diagram of the task processing method of the embodiment of the present invention; As shown in Figure 4, described task processing method includes:
Step 401: configuration task procedure information.
In the present embodiment, described flow of task information specifically can be shown by flow of task control chart; Then first this step configures logic of propositions rule; The flow of task information characterized by flow chart is generated according to described logic of propositions rule; Wherein, described logic of propositions rule at least includes: four arithmetic operation, logical operations, conditional statement, skip instruction, Do statement and function performance block; Wherein, described function performance block at least includes at least one of following function performance block: switch point function/conjunctions function, gear liter function/drop function/stop function, soft pressing plate throwing function/move back function, fixed value modification function.
Concrete, described configuration logic of propositions rule requires to configure according to script, that is: configuration basic language key element is required according to script, described basic language key element at least includes: four arithmetic operation, logical operations, conditional statement (statement keyword section such as if/else), skip instruction (statement keyword section such as goto), Do statement (statement keyword section such as dowhile), and require configuration function functional device according to script, described function performance block at least includes at least one of following function performance block: switch point/close (critical field is corresponding to cbOpen or cbClose), (critical field is corresponding to tapeUp for gear lifting/lowering/stop, tapeDown, tapeStop), soft pressing plate is thrown/is moved back, fixed value modification, wherein, described four arithmetic operation includes: add (+) computing, subtract (-) computing, take advantage of (*) computing and except (/) computing, described logical operations includes: logical AND (&&) computing, logic or (| |) computing, logic NOT (! ) computing, logic XOR (^) computing, after described logic of propositions rule configuration completes, configuring the product process figure flow of task information characterized based on described logic of propositions rule according to application demand, different application demands can configure and generates different flow of task information, therefore, in the embodiment of the present invention, user can generate different flow of task information by different application demand configurations, from without recompiling firmware and the whole application program of programming.
Step 402: generate task configuration file according to described flow of task information.
Here, described task configuration file at least includes following critical field:
File summary field (GENERAL), described GENERAL field description file format version, generate the time, smart machine title (IEDname), smart machine describe attributes such as (IEDDesc), for the management of configuration text;
Document size field (SIZE), described SIZE field description input quantity, output quantity, formula quantity and script quantity, do summary description for setting up grammatical relation;
Input variable field (INPUT_x), the attribute of described INPUT_x field description input, including: signal characteristic, signal source, DataRef, short address, description etc.;
Output variable field (OUTPUT_x), the attribute of described OUTPUT_x field description output, including: behavior characteristics, signal deficiency and excess feature, short address, description, parameter etc.;
Formula (FORMULA_x) field, described FORMULA_x field description formula expression, input is associated with output;
Script (SCRIPT_x) field, described SCRIPT_x field description script rule, adopt the results such as OUTPUT_x field to participate in script as variable, complete sequence flow control.
File verification (FILE_CHECK) field, described FILE_CHECK field description file verification and, it is prevented that file corruption or be tampered.
Step 403: described task configuration file is loaded into shared drive by operating system.
Task processing method described in the present embodiment can be applicable to have in the equipment of shared drive and Installed System Memory; Described shared drive can be the memory space in described equipment mainly for operating system; Described Installed System Memory can be the memory space in described equipment mainly for real-time operation
Step 404: processor reads described task configuration file from described shared drive, is circulated redundancy check code (CRC, CyclicRedundancyCheck) verification to described task configuration file.
Here, the preset field in described task configuration file is provided with check code, last four bytes in described preset field such as described task configuration file; Described processor reads binary information check code from the file header of described task configuration file, by preset algorithm, described binary system check code is calculated, when the binary system check code after calculating mates consistent with the check code in described task configuration file, explanation CRC check success, file is not tampered with or destroys, and continues executing with subsequent operation flow process; When the binary system check code after calculating mates inconsistent with the check code in described task configuration file, supporting paper is tampered or destroys, then do not perform subsequent operation flow process.
Step 405: set up summary list item, input list item, output list item, formula list item, script list item successively according to described task configuration file.
Wherein, summary list item can be set up according to the GENERAL field in described task configuration file and SIZE field; Input list item can be set up according to the INPUT_x field in described task configuration file; Output list item can be set up according to the OUTPUT_x field in described task configuration file; Formula list item can be set up according to the FORMULA_x field in described task configuration file; Script list item can be set up according to the SCRIPT_x field in described task configuration file.
Step 406: according to key elements such as input list item, output list item, formula list item, script list items, set up the data structures such as symbol table, syntax tree and interpreter through lexical scan, grammer scanning, semantic analysis.
Step 407: at least one task is assigned at least two queue, at least one task described in parallel processing.
In this step, described at least two queue at least includes: need the open loop queue of man-machine interaction and without the closed loop queue of man-machine interaction. When at least one task described, the property parameters of arbitrary task exists special parameter, described task is assigned in the open loop queue needing man-machine interaction; When at least one task described, the property parameters of arbitrary task is absent from described special parameter, described task is assigned to without in the closed loop queue of man-machine interaction.
Concrete, the task described in the present embodiment passes through data structure building, and therefore described task characterizes also by described data structure; Here, the property parameters of described task can be specifically the language feature parameter extracted in syntax tree in described data structure, when described language feature parameter includes as sent report (sendReport), waiting that user confirms the special parameter making sign Man Machine Interfaces such as (waitForUserCmd), described task is distributed to being assigned in the open loop queue needing man-machine interaction, equipment provides open loop mode of operation, it is necessary to man-machine interactive operation determines the behavior after corresponding task; When described language feature parameter does not include above-mentioned special parameter, described task is assigned to without, in the closed loop queue of man-machine interaction, equipment providing operation with closed ring pattern, it is not necessary to man-machine interactive operation, for applying offer separate outlet ports accordingly. Without artificially configuring described special parameter.
In the present embodiment, at least one task described forms at least one independent process, or forms several threads under an independent process; Further, open loop queue and closed loop queue are instantiated as at least one Task entity, not mutual mutually between each Task entity, independently execute.
Step 408: called by storehouse, is explained and performs at least one task described.
Here, the data structures such as at least one task instances described turns at least one Task entity, described Task entity syntax tree characterize, and the execution of these data structures depends on interpreter; Thering is provided independent interpreter library, described interpreter library in system is dynamic base pattern, provides independent code space and part system data space for all tasks; Each task is called explanation by storehouse and is performed described task.
Step 409: extract triggering behavior, triggers callback function list item from triggering, send actuating signal to system bus; Described actuating signal at least includes at least one of following actuating signal: switch sub-signal/conjunctions signal, gear liter signal/drop signal/stop signal, soft pressing plate voted signal/bounce number, fixed value modification signal.
Here, when at least one task described forms at least one independent process, or when forming several threads under an independent process, the function triggers callback function that funcall property parameters in logical consequence according to the interpreter in described process or thread and described task characterizes, actuating signal is sent based on described call back function, thus triggering corresponding trigger table, perform the action that described trigger table characterizes, thus sending actuating signal to system bus, cause control, sequential control (SC, SequenceControl), automatism voltage control (AVR, AutoVoltageRegular), Automatic Generation Control (AGC, the action behavior such as AutoGenerationControl).
Based on above-mentioned actuating signal, performing the action that at least one actuating signal described characterizes respectively, described action at least includes at least one of following action: switch point/conjunction, gear lifting/lowering/stop, soft pressing plate are thrown/moved back, fixed value modification.
Wherein, described " switch point/close " characterizes the separating brake/combined floodgate (i.e. disconnection/the connection of circuit) of switch, and described switch divides/close the switchgear that can be used for transformer station, when described action is " switch point ", characterizing described switch sub-switching operation, namely transmission line of electricity disconnects; Accordingly, when described action is " switch closes ", described switch closing operation is characterized, i.e. transmission line of electricity connection.
Described " gear lifting/lowering/stop " can be used in the transformator of transformer station, when there is shake (namely transmission voltage raises or reduces) in transmission voltage, transformator need to regulate transmission voltage, jitter conditions according to described transmission voltage, corresponding reduction or rising transmission voltage, then " gear liter " characterizes and raises transmission voltage; " gear drops " characterizes and reduces transmission voltage; " gear stops " characterizes the adjustment stopped transmission voltage.
Described " soft pressing plate is thrown/moved back " can be any functional switch of transformer station, and described " soft pressing plate throwing " characterizes the unlatching of described functional switch; Described " soft pressing plate moves back " characterizes the closedown of described functional switch. Concrete, described functional switch is the switch write by software program, i.e. virtual switch. Described functional switch can pass through assignment " 0 " or " 1 " characterizes turning off or on of described functional switch.
Described " fixed value modification " can be the numerical value that arbitrarily can set in transformer station, for instance separating brake pulsewidth 500 milliseconds.
The embodiment of the present invention additionally provides a kind of computer-readable storage medium, and in described computer-readable storage medium, storage has computer executable instructions, and described computer executable instructions is for performing the task processing method described in the embodiment of the present invention as illustrated in figure 1 or 4.
Those skilled in the art are it should be appreciated that embodiments of the invention can be provided as method, system or computer program. Therefore, the present invention can adopt the form of hardware embodiment, software implementation or the embodiment in conjunction with software and hardware aspect. And, the present invention can adopt the form at one or more upper computer programs implemented of computer-usable storage medium (including but not limited to disk memory and optical memory etc.) wherein including computer usable program code.
The present invention is that flow chart and/or block diagram with reference to method according to embodiments of the present invention, equipment (system) and computer program describe. It should be understood that can by the combination of the flow process in each flow process in computer program instructions flowchart and/or block diagram and/or square frame and flow chart and/or block diagram and/or square frame. These computer program instructions can be provided to produce a machine to the processor of general purpose computer, special-purpose computer, Embedded Processor or other programmable data processing device so that the instruction performed by the processor of computer or other programmable data processing device is produced for realizing the equipment of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and can guide in the computer-readable memory that computer or other programmable data processing device work in a specific way, the instruction making to be stored in this computer-readable memory produces to include the manufacture of commander equipment, and this commander equipment realizes the function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, make on computer or other programmable devices, to perform sequence of operations step to produce computer implemented process, thus the instruction performed on computer or other programmable devices provides for realizing the step of function specified in one flow process of flow chart or multiple flow process and/or one square frame of block diagram or multiple square frame.
The above, be only presently preferred embodiments of the present invention, is not intended to limit protection scope of the present invention.

Claims (15)

1. a task processing method, it is characterised in that described method includes:
Configuration task procedure information, generates the task configuration file characterized by script according to described flow of task information;
Scan described task configuration file, generate data structure according to described task configuration file, based at least one task of described data structure building;
Send at least one actuating signal according at least one task described respectively, perform the action that at least one actuating signal described characterizes respectively.
2. method according to claim 1, it is characterised in that described based on after at least one task of described data structure building, described method also includes:
At least one task described is assigned at least two queue by the property parameters according at least one task described;
Wherein, described at least two queue at least includes: need the open loop queue of man-machine interaction and without the closed loop queue of man-machine interaction.
3. method according to claim 2, it is characterised in that at least one task described is assigned at least two queue by the described property parameters based at least one task described, including:
When at least one task described, the property parameters of arbitrary task exists special parameter, described task is assigned in the open loop queue needing man-machine interaction;
When at least one task described, the property parameters of arbitrary task is absent from described special parameter, described task is assigned to without in the closed loop queue of man-machine interaction.
4. method according to claim 1, it is characterised in that after the described task configuration file generating script sign according to described procedure information, described method also includes:
Described task configuration file is stored in shared drive;
Accordingly, the described task configuration file of described scanning, generate data structure according to described task configuration file, including:
From described shared drive, read described task configuration file, described task configuration file is loaded into Installed System Memory;
By presetting the analysis mode described task configuration file of parsing in described Installed System Memory, generate the data structure at least including symbol table, syntax tree and interpreter.
5. method according to claim 1, it is characterised in that described configuration task procedure information, including:
Configuration logic of propositions rule; Described logic of propositions rule at least includes: four arithmetic operation, logical operations, conditional statement, skip instruction, Do statement and function performance block; Wherein, described function performance block at least includes at least one of following function performance block: switch point function/conjunctions function, gear liter function/drop function/stop function, soft pressing plate throwing function/move back function, fixed value modification function;
The flow of task information characterized by flow chart is generated according to described logic of propositions rule.
6. method according to claim 5, it is characterised in that described data structure at least includes: symbol table, syntax tree and interpreter; Described send actuating signal according at least one task described respectively, including:
The function triggers callback function that funcall property parameters in logical consequence according to the interpreter in task and described task characterizes, sends actuating signal based on described call back function;
Described actuating signal at least includes at least one of following actuating signal: switch sub-signal/conjunctions signal, gear liter signal/drop signal/stop signal, soft pressing plate voted signal/bounce number, fixed value modification signal.
7. method according to claim 6, it is characterized in that, the described action performing described at least one actuating signal sign respectively, described action at least includes at least one of following action: switch point/conjunction, gear lifting/lowering/stop, soft pressing plate are thrown/moved back, fixed value modification.
8. an equipment, it is characterised in that described equipment includes: dispensing unit, the first generation unit, the second generation unit and performance element; Wherein,
Described dispensing unit, for configuration task procedure information;
Described first generates unit, generates, for the described flow of task information configured according to described dispensing unit, the task configuration file characterized by script;
Described second generates unit, generates, for scanning described first, the described task configuration file that unit generates, generates data structure according to described task configuration file, based at least one task of described data structure building;
Described performance element, sends at least one actuating signal for generating at least one task described in unit generation according to described second respectively, performs the action that at least one actuating signal described characterizes respectively.
9. equipment according to claim 8, it is characterized in that, described equipment also includes allocation units, unit is generated based on, after at least one task of described data structure building, being assigned at least two queue according to the property parameters of at least one task described by least one task described for described second; Wherein, described at least two queue at least includes: need the open loop queue of man-machine interaction and without the closed loop queue of man-machine interaction.
10. equipment according to claim 9, it is characterised in that described allocation units, for when at least one task described, the property parameters of arbitrary task exists special parameter, being assigned in the open loop queue needing man-machine interaction by described task; When at least one task described, the property parameters of arbitrary task is absent from described special parameter, described task is assigned to without in the closed loop queue of man-machine interaction.
11. equipment according to claim 8, it is characterised in that described equipment also includes the first memory element and the second memory element;
Described first memory element, after generating the unit described task configuration file of generation for described first, stores described task configuration file;
Described second generates unit, for reading described task configuration file from described first memory element, described task configuration file is loaded into described second memory element, by presetting the analysis mode described task configuration file of parsing in described second memory element, generate the data structure at least including symbol table, syntax tree and interpreter.
12. equipment according to claim 8, it is characterised in that described dispensing unit, it is used for configuring logic of propositions rule; The flow of task information characterized by flow chart is generated according to described logic of propositions rule; Described logic of propositions rule at least includes: four arithmetic operation, logical operations, conditional statement, skip instruction, Do statement and function performance block; Wherein, described function performance block at least includes at least one of following function performance block: switch point function/conjunctions function, gear liter function/drop function/stop function, soft pressing plate throwing function/move back function, fixed value modification function.
13. equipment according to claim 12, it is characterised in that described data structure at least includes: symbol table, syntax tree and interpreter;
Described performance element, for the function triggers callback function that the funcall property parameters in the logical consequence according to the interpreter in task and described task characterizes, sends actuating signal based on described call back function; Described actuating signal at least includes at least one of following actuating signal: switch sub-signal/conjunctions signal, gear liter signal/drop signal/stop signal, soft pressing plate voted signal/bounce number, fixed value modification signal.
14. equipment according to claim 13, it is characterized in that, described performance element, for performing the action that at least one actuating signal described characterizes respectively, described action at least includes at least one of following action: switch point/conjunction, gear lifting/lowering/stop, soft pressing plate are thrown/moved back, fixed value modification.
15. a computer-readable storage medium, in described computer-readable storage medium, storage has computer executable instructions, and described computer executable instructions is for performing the task processing method described in any one of claim 1 to 7.
CN201410626094.3A 2014-11-07 2014-11-07 Task processing method and device, and computer storage medium Pending CN105630581A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410626094.3A CN105630581A (en) 2014-11-07 2014-11-07 Task processing method and device, and computer storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410626094.3A CN105630581A (en) 2014-11-07 2014-11-07 Task processing method and device, and computer storage medium

Publications (1)

Publication Number Publication Date
CN105630581A true CN105630581A (en) 2016-06-01

Family

ID=56045560

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410626094.3A Pending CN105630581A (en) 2014-11-07 2014-11-07 Task processing method and device, and computer storage medium

Country Status (1)

Country Link
CN (1) CN105630581A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632819A (en) * 2016-07-14 2018-01-26 南京南瑞继保电气有限公司 A kind of method and system of the FPGA debugging based on symbol table
CN108762824A (en) * 2018-04-18 2018-11-06 青岛海尔科技有限公司 A kind of apparatus logic processing method and processing device based on configuration file
CN110061861A (en) * 2019-03-21 2019-07-26 广东瑞恩科技有限公司 Internet protocol configuration method, device, equipment and computer readable storage medium
CN110597611A (en) * 2019-09-19 2019-12-20 中国银行股份有限公司 Task scheduling method and device
CN113947071A (en) * 2021-10-21 2022-01-18 北京四方继保工程技术有限公司 Analysis execution system and method for transformer substation five-prevention file
CN114816349A (en) * 2022-04-22 2022-07-29 珠海市奥德维科技有限公司 Development method, system and storage medium for automation equipment control software

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090276274A1 (en) * 2007-03-15 2009-11-05 Fujitsu Limited Program and apparatus for workflow analysis
CN101630275A (en) * 2009-07-31 2010-01-20 清华大学 Realizing method of configuration information for generating cycle task and device thereof
CN102751785A (en) * 2012-05-21 2012-10-24 中国电力科学研究院 Modularization sequential control system and realization method thereof
CN102799515A (en) * 2011-05-24 2012-11-28 腾讯科技(深圳)有限公司 Application program testing method and device
CN103177045A (en) * 2011-12-26 2013-06-26 ***通信集团广东有限公司 Text analysis method and text analysis device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090276274A1 (en) * 2007-03-15 2009-11-05 Fujitsu Limited Program and apparatus for workflow analysis
CN101630275A (en) * 2009-07-31 2010-01-20 清华大学 Realizing method of configuration information for generating cycle task and device thereof
CN102799515A (en) * 2011-05-24 2012-11-28 腾讯科技(深圳)有限公司 Application program testing method and device
CN103177045A (en) * 2011-12-26 2013-06-26 ***通信集团广东有限公司 Text analysis method and text analysis device
CN102751785A (en) * 2012-05-21 2012-10-24 中国电力科学研究院 Modularization sequential control system and realization method thereof

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632819A (en) * 2016-07-14 2018-01-26 南京南瑞继保电气有限公司 A kind of method and system of the FPGA debugging based on symbol table
CN108762824A (en) * 2018-04-18 2018-11-06 青岛海尔科技有限公司 A kind of apparatus logic processing method and processing device based on configuration file
CN110061861A (en) * 2019-03-21 2019-07-26 广东瑞恩科技有限公司 Internet protocol configuration method, device, equipment and computer readable storage medium
CN110597611A (en) * 2019-09-19 2019-12-20 中国银行股份有限公司 Task scheduling method and device
CN113947071A (en) * 2021-10-21 2022-01-18 北京四方继保工程技术有限公司 Analysis execution system and method for transformer substation five-prevention file
CN114816349A (en) * 2022-04-22 2022-07-29 珠海市奥德维科技有限公司 Development method, system and storage medium for automation equipment control software
CN114816349B (en) * 2022-04-22 2023-09-29 珠海市奥德维科技有限公司 Automatic equipment control software development method, system and storage medium

Similar Documents

Publication Publication Date Title
CN105630581A (en) Task processing method and device, and computer storage medium
US11215960B2 (en) Engineering apparatus, control method of engineering apparatus, and program for generating executable code for controlling target hardware
CN108959068A (en) Software interface test method, equipment and storage medium
CN109408102A (en) A kind of version comparison method and device, household appliance, the network equipment
CN104331294A (en) Visual program generation method and device
CN106547522B (en) Method and device for optimizing stream application
CN109614093B (en) Visual intelligent contract system and intelligent contract processing method
CN110532044A (en) A kind of big data batch processing method, device, electronic equipment and storage medium
CN103020310A (en) Method for realizing function extension and customization of electric power monitoring system based on script
CN105183547A (en) Task scheduling method and device of user interface
CN102346670A (en) Intelligent sorting system for graphic logic configuration tool module in transformer substation
CN107179910A (en) The logic configuration method that a kind of online editing comes into force immediately
CN102779091A (en) Test transformation method and test transformation device
CN110705891A (en) Data processing method based on high-allocable changeability
CN106547606B (en) Storehouse self checking method and device
CN113609101A (en) Real-time data task issuing method and device, electronic equipment and storage medium
CN101266556A (en) Multitask scheduling system
CN108287720A (en) software compilation method, device, equipment and storage medium
CN102306109B (en) Method for realizing logic programming in communication management machine
CN104102529A (en) Finite state machine-based storage virtualization management system and method
CN104091225A (en) Object-oriented electric power system scheduling operation ticket system
CN108614694A (en) A kind of method and apparatus of Optimized code
CN104731900A (en) Hive scheduling method and device
CN104375843A (en) Authority control based automatic page generation method
CN110377150B (en) Method and device for operating entity component in virtual scene and computer equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160601