CN102298653B - Method and device for configuring algorithm execution sequence number - Google Patents

Method and device for configuring algorithm execution sequence number Download PDF

Info

Publication number
CN102298653B
CN102298653B CN201010209737.6A CN201010209737A CN102298653B CN 102298653 B CN102298653 B CN 102298653B CN 201010209737 A CN201010209737 A CN 201010209737A CN 102298653 B CN102298653 B CN 102298653B
Authority
CN
China
Prior art keywords
algorithm
output
execution sequence
module
index
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.)
Active
Application number
CN201010209737.6A
Other languages
Chinese (zh)
Other versions
CN102298653A (en
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.)
BEIJING GUODIAN ZHISHEN CONTROL TECHNOLOGY Co Ltd
Original Assignee
BEIJING GUODIAN ZHISHEN CONTROL TECHNOLOGY 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 BEIJING GUODIAN ZHISHEN CONTROL TECHNOLOGY Co Ltd filed Critical BEIJING GUODIAN ZHISHEN CONTROL TECHNOLOGY Co Ltd
Priority to CN201010209737.6A priority Critical patent/CN102298653B/en
Publication of CN102298653A publication Critical patent/CN102298653A/en
Application granted granted Critical
Publication of CN102298653B publication Critical patent/CN102298653B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Logic Circuits (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and device for configuring an algorithm execution sequence number. The method comprises the following steps of: a, extracting and storing basic information; b, finding all the first and second algorithms, and configuring the execution sequence numbers thereof; c, traversing each output of the first half of algorithms and executing step d, and then executing step e; d, for an output of which output connecting line is not a tracker line and is not in a connection cycle, if the execution sequence number of the output algorithm is greater than that of the algorithm and is the minimum in the output algorithm greater than the algorithm, interchanging the execution sequence numbers of the output algorithm and the algorithm; e, traversing each input of each algorithm and executing step f, ending after completing the step f; f, for an input of which input connecting line is not a tracker line, if the execution sequence number of the algorithm is greater than that of the input algorithm of the input, and if the execution sequence number of the input algorithm is the maximum in all the input algorithms of which execution sequence numbers are less than that of the algorithm, interchanging the execution sequence number of the input algorithm with that of the algorithm.

Description

The method of a kind of placement algorithm execution sequence number and device
Technical field
The present invention designs industrial control field, particularly relates to method and the device of a kind of placement algorithm execution sequence number.
Background technology
Algorithm execution sequence intelligent sequencing is a critical function of page configuration module in the control configuration instrument of EDPF NT+ system.
Algorithm execution sequence number is one of attribute of algorithm, is kept in algorithm record, for record certain algorithm in SAMA figure which by computing.The algorithm execution sequence of algorithm order-assigned number from 1 in SAMA figure (steering logic figure), each algorithm must have continuous, unique algorithm execution sequence number, when this SAMA figure runs in DPU (dispersion treatment unit), algorithm computing will be carried out successively according to algorithm execution sequence number.
Algorithm execution sequence number is specified in page configuration operation; The operation that page configuration module will be done comprises: 1, to SAMA figure allocation domain number, station number, page number; 2, the execution sequence of SAMA figure in control zone is specified; 3, appointment SAMA figure can by which equipment operating; 4, to algorithm assigns algorithm name; 5, be algorithm assigns algorithm execution sequence number.
At present, what algorithm execution sequence number was given tacit consent to is the serial number be added to algorithm on SAMA figure, namely algorithm is which is added in SAMA figure, algorithm execution sequence number is exactly how many, but this serial number is inaccurate usually, need artificial appointment, namely in page configuration properties dialog, by moving up and down the execution sequence number that algorithm carrys out assignment algorithm in algorithm sequence dialog box.This pattern is also inconvenient, too increases the consuming time of page configuration operation.
Summary of the invention
The technical problem to be solved in the present invention is to provide method and the device of a kind of placement algorithm execution sequence number, can be algorithm configuration execution sequence number automatically in the process of page configuration, improve the efficiency that page configuration operates.
In order to solve the problem, the invention provides the method for a kind of placement algorithm execution sequence number, comprising:
A, extraction preserve the essential information of algorithm in steering logic figure, comprise the index of algorithm, whether the I/O number of each algorithm, the index of I/O algorithm, I/O line be tracker wire;
B, according to index ergodic algorithm, find first, second algorithms all; The execution sequence number that each described first algorithm configuration increases progressively from minimum index is followed successively by according to indexed sequential; The execution sequence number that each described second algorithm configuration successively decreases from largest index is followed successively by by reverse indexing order;
Described first algorithm is not for exporting, or output line is the algorithm of tracker wire; Described second algorithm is not input, or input link is the algorithm of tracker wire;
C, from minimum index, travel through each output of the first half algorithm by index, when traversing each output of each algorithm, perform a steps d; Travel through rear execution step e;
If the output algorithm of this output of d does not have execution sequence number, then for the configuration of this output algorithm adds execution sequence number 1 from described current minimum value, after configuration, described current minimum value is added 1;
Judging whether that the output line of this output is not tracker wire and this output is not in connection circulation, is not travel through next output;
If it is judge whether that the execution sequence number of this output algorithm is greater than this algorithm, and be minimum in the output algorithm being greater than this algorithm, be then the rear next one that travels through of execution sequence number exchange of this output algorithm and this algorithm is exported, otherwise directly travel through next one output;
E, travel through each input of each algorithm according to described index, when traversing each input of each algorithm, perform a step f; Travel through rear end;
F, when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence number of the input algorithm of this input, and it is maximum that the execution sequence of this input algorithm number is less than in the input algorithm of this algorithm at all execution sequences number, then by the execution sequence of this input algorithm number exchange with this algorithm; Then the next input of traversal.
Further, in described steps d, after this output algorithm and the execution sequence number of this algorithm being exchanged, before the next output of traversal, also comprise step:
From this output algorithm, travel through each input of the algorithm distributing execution sequence number according to execution sequence number back to front, when traversing each input of each algorithm, perform a step f; Export by index traversal is next after having traveled through.
Further, in described step c, after having traveled through, before execution step e, also comprise step:
If the number of described second algorithm of g is greater than 0, then from index be described maximum execution sequence number deducts the algorithm of described current minimum value, travel through each output of this algorithm and each algorithm thereafter by index, when traversing each output of each algorithm, perform a steps d; Travel through rear execution step e.
Further, described step a comprises:
A1, according to all algorithms in picture order traversal steering logic figure, in internal memory, preserve the index of each algorithm, initial value be 0 I/O number, be temporarily the index of empty I/O algorithm, be defaulted as the trace labelling of each I/O of non-tracking;
A2, isolate tracker wire and be connected to the pel not needing algorithm execution sequence number, arrange out algorithm and perform flow process trunk figure;
A3, to perform in flow process trunk figure at described algorithm, travel through all connecting lines;
If connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, in internal memory, the output number of the essential information of this algorithm is added 1, increase the index of this connecting line output terminal algorithm, if connecting line is tracker wire, being set to by the trace labelling of this output is follow the tracks of; For the output terminal algorithm of this connecting line, in internal memory, the input number of the essential information of this algorithm is added 1, increase the index of this connecting line input end algorithm, if connecting line is tracker wire, being set to by the trace labelling of this input is follow the tracks of.
Further, described step b comprises:
B1, using described minimum index as current minimum value, by all algorithms in described index traversal internal memory, when finding the first algorithm, the execution sequence number of the first found algorithm is configured to current minimum value, then traversal is continued after current minimum value being added 1, until traveled through;
B2, using described largest index as current maximum, by all algorithms in described index traversal internal memory, when finding the second algorithm, the execution sequence number of the second found algorithm is configured to current maximum, then traversal is continued after current maximum being subtracted 1, until traveled through.
Present invention also offers the device of a kind of placement algorithm execution sequence number, comprising:
First, second configuration module, first, second spider module, memory module, first configuration module;
Extraction module, for extracting the essential information of depositing algorithm in steering logic figure, comprises the index of algorithm, whether the I/O number of each algorithm, the index of I/O algorithm, I/O line is tracker wire, and is kept in described memory module; The described just configuration module of startup after completing;
Described just configuration module is used for the algorithm traveled through according to index in described memory module, find first, second algorithms all, the execution sequence number that each described first algorithm configuration increases progressively from minimum index is followed successively by according to indexed sequential, the execution sequence number that each described second algorithm configuration successively decreases from largest index is followed successively by, described first spider module of startup after completing by reverse indexing order; Described first algorithm is not for exporting, or output line is the algorithm of tracker wire; Described second algorithm is not input, or input link is the algorithm of tracker wire;
Described first spider module is used for each output traveling through the first half algorithm in described memory module from minimum index by index, calls once described first configuration module when traversing each output of each algorithm; Travel through described second spider module of rear startup;
Described first configuration module is used for when the output algorithm of this output does not have execution sequence, adds execution sequence number 1, after configuration, described current minimum value is added 1 for this output algorithm configures from described current minimum value; Judge whether that the output line of this output is not tracker wire and this output is not in connection circulation, be not, notify that the module walks next one calling this module exports; If it is judge whether that the execution sequence number of this output algorithm is greater than this algorithm, and be minimum in the output algorithm being greater than this algorithm, then the execution sequence number of this output algorithm in described memory module and this algorithm is exchanged, then notice calls the module walks next one output of this module, otherwise directly notifies that the module walks next one calling this module exports;
Described second spider module is used for each input traveling through each algorithm in described memory module according to described index, calls once described second configuration module when traversing each input of each algorithm;
Described second configuration module is used for when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence number of the input algorithm of this input, and it is maximum that the execution sequence of this input algorithm number is less than in the input algorithm of this algorithm at all execution sequences number, then by the execution sequence of this input algorithm in the described memory module number exchange with this algorithm, notice calls the module walks next one input of this module.
Further, described first configuration module is also for after exchanging the execution sequence of output algorithm and this algorithm number, before notice calls the module walks next one output of this module, from this output algorithm, travel through each input of the algorithm distributing execution sequence number according to execution sequence number back to front, when traversing each input of each algorithm, call once described second configuration module; Reinform the module walks next one calling this module after having traveled through to export.
Further, described device also comprises:
3rd spider module;
Described first spider module, also for after traversal completes, before starting the second spider module, if the number of described second algorithm is greater than 0, then calls described 3rd spider module; Described second spider module is restarted after receiving the notice that described 3rd spider module traveled through;
Described 3rd spider module be used for from index be described maximum execution sequence number deducts the algorithm of described current minimum value, travel through each output of this algorithm in described memory module and each algorithm thereafter by index, when traversing each output of each algorithm, call once described first configuration module; Described first spider module is notified after having traveled through.
Further, described extraction module comprises:
Initialization unit, for according to all algorithms in picture order traversal steering logic figure, in described memory module, preserve the index of each algorithm, initial value be 0 I/O number, be temporarily the index of empty I/O algorithm, be defaulted as the trace labelling of each I/O of non-tracking;
Separative element, not needing the pel of algorithm execution sequence number for separating of going out tracker wire and being connected to, arranging out algorithm and performing flow process trunk figure;
Updating block, for performing in flow process trunk figure at described algorithm, travels through all connecting lines; If connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, in described memory module, the output number of the essential information of this algorithm is added 1, increase the index of this connecting line output terminal algorithm, if connecting line is tracker wire, being set to by the trace labelling of this output is follow the tracks of; For the output terminal algorithm of this connecting line, in described memory module, the input number of the essential information of this algorithm is added 1, increase the index of this connecting line input end algorithm, if connecting line is tracker wire, being set to by the trace labelling of this input is follow the tracks of.
Further, described just configuration module comprises: first, second algorithm configuration unit;
Described first algorithm configuration unit is used for described minimum index as current minimum value, the all algorithms in described memory module are traveled through by described index, when finding the first algorithm, the execution sequence number of the first found algorithm is configured to current minimum value, then continue traversal after current minimum value being added 1, travel through rear startup second algorithm configuration unit;
Described second algorithm configuration unit is used for described largest index as current maximum, the all algorithms in described memory module are traveled through by described index, when finding the second algorithm, the execution sequence number of the second found algorithm is configured to current maximum, then traversal is continued after current maximum being subtracted 1, described first spider module of startup after completing.
Technical scheme of the present invention can carry out the algorithm execution sequence number configuration in page configuration operation quickly and easily automatically, has saved the time of combination flow process, has improve configuration speed, also ensure that the accuracy of algorithm execution sequence to a certain extent.
Accompanying drawing explanation
Fig. 1 is the idiographic flow schematic diagram of steps A in embodiment one;
Fig. 2 is the idiographic flow schematic diagram of step B1 in embodiment one;
Fig. 3 is the idiographic flow schematic diagram of step B2 in embodiment one;
Fig. 4 is the idiographic flow schematic diagram of step D in embodiment one;
Fig. 5 is the idiographic flow schematic diagram of step e in embodiment one;
Fig. 6 is the schematic block diagram of the device of placement algorithm execution sequence number in embodiment one.
Embodiment
Below in conjunction with drawings and Examples, technical scheme of the present invention is described in detail.
It should be noted that, if do not conflicted, each feature in the embodiment of the present invention and embodiment can be combined with each other, all within protection scope of the present invention.In addition, can perform in the computer system of such as one group of computer executable instructions in the step shown in the process flow diagram of accompanying drawing, and, although show logical order in flow charts, but in some cases, can be different from the step shown or described by order execution herein.
Embodiment one, the method for a kind of placement algorithm execution sequence number, comprising:
A, extraction preserve the essential information of common algorithm in SAMA figure, comprise the index of algorithm, the input of each algorithm and/or output information; Described common algorithm is the algorithm needing algorithm execution sequence number; Described I/O information comprises the I/O number of this algorithm, whether the index of I/O algorithm, I/O line are tracker wire;
In the present embodiment, described steps A as shown in Figure 1, specifically can comprise:
A1, according to picture order traversal SAMA scheme in all algorithms, in internal memory, preserve the essential information of each algorithm; The index of described algorithm can be the integer representing traversal order, and the index of the first algorithm such as traveled through to be 1, second be 2...... by that analogy; Now, it is 0 that the I/O number of described algorithm gets initial value, and the index of I/O algorithm is temporarily empty, and the trace labelling of each I/O is defaulted as non-tracking;
A2, isolate tracker wire and be connected to the pel not needing algorithm execution sequence number, the algorithm arranging out whole figure performs flow process trunk figure;
A3, to perform in flow process trunk figure at described algorithm, travel through all connecting lines, upgrade input and/or the output information of each algorithm, comprising:
If connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, in internal memory, the output number of the essential information of this algorithm is added 1, the index that this connecting line output terminal algorithm is preserved in internal memory is increased in output information, if connecting line is tracker wire, being set to by the trace labelling of this output is follow the tracks of; For the output terminal algorithm of this connecting line, in internal memory, the input number of the essential information of this algorithm is added 1, in input information, increase the index that this connecting line input end algorithm is preserved in internal memory, if connecting line is tracker wire, being set to by the trace labelling of this input is follow the tracks of;
Line two ends have one end to be pel without the need to allocation algorithm execution sequence, and the common algorithm end of line do not process.
During practical application, the mode do not got rid of beyond with trace labelling represents whether connecting line is tracker wire.
B, travel through the algorithm preserved according to index, find first, second algorithm in all described SAMA figure;
Described first algorithm is that upstream does not connect output (namely exporting number is 0), or upstream has one or more to export, but this output line is the algorithm of tracker wire (trace labelling is follow the tracks of);
Described second algorithm is that downstream does not connect input (namely inputting number is 0), or downstream is connected with one or more input, but this input link is the algorithm of tracker wire (trace labelling is follow the tracks of);
The execution sequence number that each described first algorithm configuration increases progressively from minimum index is followed successively by according to indexed sequential; The execution sequence number that each described second algorithm configuration successively decreases from largest index (adding 1 after namely common algorithm number n deducts minimum index in described SAMA figure) is followed successively by by reverse indexing order.
Minimum index described in the present embodiment can be, but not limited to be 1, and now described largest index is n.
In the present embodiment, described step B specifically can comprise:
B1, using described minimum index as current minimum value, by all algorithms in described index traversal internal memory, when finding the first algorithm, the execution sequence number of the first found algorithm is configured to current minimum value, then traversal is continued after current minimum value being added 1, until traveled through, as shown in Figure 2; Now, described current minimum value is the number of the first algorithm;
When minimum index is 1, that is: traveling through all algorithms according to described index, for described first algorithm found, is that the execution sequence number of first configuration is 1, be that the order of second configuration performs number be 2, be the order of the 3rd configuration to perform number for 3...... by that analogy;
B2, using described largest index as current maximum, by all algorithms in described index traversal internal memory, when finding the second algorithm, the execution sequence number of the second found algorithm is configured to current maximum, then traversal is continued after current maximum being subtracted 1, until traveled through, as shown in Figure 3; Now, described current maximum is the number that largest index deducts the second algorithm;
When largest index is n, that is: (oppositely traveling through) all described second algorithms found are traveled through back to front, be the execution sequence number of first configuration be n (common algorithm number), be that the order of second configuration performs number for n-1, be the order of the 3rd configuration to perform number for n-2...... by that analogy; After being assigned,
During practical application, the execution sequence of step B1, B2 can exchange, and also can walk abreast.
C, from minimum index by index traversal internal memory in the first half algorithm (such as have 20 algorithms, then travel through first 10; If there are 21, then travel through first 10 or front 11) each output, perform a step D when traversing each output of each algorithm; Travel through rear execution step F.
D, as shown in Figure 4, if the output algorithm of this output does not have execution sequence number, then for the configuration of this output algorithm adds execution sequence number 1 from described current minimum value, adds 1 by described current minimum value after configuration; This ensures that there in subsequent step, the output algorithm of this output has necessarily been assigned with execution sequence number;
Judging whether that the output line of this output is not tracker wire (trace labelling is not follow the tracks of) and this output is not in connection circulation, is not travel through next output;
Continue to judge whether that the execution sequence number of this output algorithm is greater than this algorithm (being traversed algorithm), and be minimum in the output algorithm (being only limitted to the output algorithm of this algorithm) being greater than this algorithm, be not that then directly traversal is next to export, then the execution sequence number of this output algorithm and this algorithm is exchanged, after exchange from this output algorithm, travel through each input of the algorithm distributing execution sequence number according to execution sequence number back to front, when traversing each input of each algorithm, perform a step e; Return step C after having traveled through, traversal is next to be exported.
In the present embodiment, if the output line of this output is tracker wire, maybe this output is in and connects in circulation, then traversal is next exports, the next one namely traveling through this algorithm exports, if the output of this algorithm travels through all, is then first output of the next algorithm of traversal.
In the present embodiment, check whether this output is in connect in circulation and refer to: if got back to again this output itself along the final line in the direction of line, then judge that this output is in and connect in circulation.
E, when the input link of this input is for tracker wire (trace labelling be not follow the tracks of), if the execution sequence number of this algorithm (being traversed algorithm) is greater than the execution sequence number of the input algorithm of this input, and it is maximum that the execution sequence of this input algorithm number is less than in the input algorithm (being only limitted to the input algorithm of this algorithm) of this algorithm at all execution sequences number, then by the execution sequence of this input algorithm number exchange with this algorithm; Then the next input of traversal, namely travel through the next one input of this algorithm, if the input of this algorithm travels through all, be then that (if perform this step in step D, then next algorithm is execution sequence number for this algorithm subtracts the algorithm of 1 to the next algorithm of traversal; If perform this step in step G, then next algorithm is index is the next algorithm that this algorithm adds 1) first input, as shown in Figure 5.
If the number of described second algorithm of F is greater than 0, then from index be described maximum execution sequence number deducts the algorithm of described current minimum value, travel through each output of this algorithm and each algorithm thereafter by index, when traversing each output of each algorithm, perform a step D; Travel through rear execution step G.
This step, for the linkage unit that there is dispersion in figure, can prevent from omitting in printing.
If there is no the second algorithm, then do not carry out step F, directly carry out step G.
G, each input according to each algorithm in described index traversal internal memory, perform a step e when traversing each input of each algorithm; Travel through rear end.
Embodiment two, the device of a kind of placement algorithm execution sequence number, as shown in Figure 6, comprising:
First, second configuration module, first, second spider module, memory module, first configuration module;
Extraction module, for extracting the essential information of algorithm in steering logic figure, comprises the index of algorithm, whether the I/O number of each algorithm, the index of I/O algorithm, I/O line is tracker wire, and is kept in described memory module; The described just configuration module of startup after completing;
Described just configuration module is used for the algorithm traveled through according to index in described memory module, find first, second algorithms all, the execution sequence number that each described first algorithm configuration increases progressively from minimum index is followed successively by according to indexed sequential, the execution sequence number that each described second algorithm configuration successively decreases from largest index is followed successively by, described first spider module of startup after completing by reverse indexing order; Described first algorithm is not for exporting, or output line is the algorithm of tracker wire; Described second algorithm is not input, or input link is the algorithm of tracker wire;
Described first spider module is used for each output traveling through the first half algorithm in described memory module from minimum index by index, calls once described first configuration module when traversing each output of each algorithm; Travel through described second spider module of rear startup;
Described first configuration module is used for when the output algorithm of this output does not have execution sequence, adds execution sequence number 1, after configuration, described current minimum value is added 1 for this output algorithm configures from described current minimum value; Judge whether that the output line of this output is not tracker wire and this output is not in connection circulation, be not, notify that the module walks next one calling this module exports; Continue to judge whether that the execution sequence number of this output algorithm is greater than this algorithm, and be minimum in the output algorithm being greater than this algorithm, not notify that the module walks next one calling this module exports, be then the execution sequence number of this output algorithm in described memory module and this algorithm is exchanged, notify that the module walks next one calling this module exports afterwards in exchange; Can also be used for after the execution sequence of output algorithm and this algorithm number is exchanged, before notice calls the module walks next one output of this module, from this output algorithm, each input of the algorithm distributing execution sequence number is traveled through back to front according to execution sequence number, call once described second configuration module when traversing each input of each algorithm, reinform the module walks next one calling this module after having traveled through and export.
Described second spider module is used for each input traveling through each algorithm in described memory module according to described index, calls once described second configuration module when traversing each input of each algorithm; Travel through, configured end;
Described second configuration module is used for when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence number of the input algorithm of this input, and it is maximum that the execution sequence of this input algorithm number is less than in the input algorithm of this algorithm at all execution sequences number, then by the execution sequence of this input algorithm in the described memory module number exchange with this algorithm; Notice calls the module walks next one input of this module.
In the present embodiment, described device can also comprise: the 3rd spider module;
Described first spider module, also for after traversal completes, before starting the second spider module, if the number of described second algorithm is greater than 0, then calls described 3rd spider module; Described second spider module is restarted after receiving the notice that described 3rd spider module traveled through;
Described 3rd spider module be used for from index be described maximum execution sequence number deducts the algorithm of described current minimum value, travel through each output of this algorithm in described memory module and each algorithm thereafter by index, when traversing each output of each algorithm, call once described first configuration module; Described first spider module is notified after having traveled through.
In the present embodiment, described extraction module specifically can comprise:
Initialization unit, for according to all algorithms in picture order traversal steering logic figure, in described memory module, preserve the index of each algorithm, initial value be 0 I/O number, be temporarily the index of empty I/O algorithm, be defaulted as the trace labelling of each I/O of non-tracking;
Separative element, not needing the pel of algorithm execution sequence number for separating of going out tracker wire and being connected to, arranging out algorithm and performing flow process trunk figure;
Updating block, for performing in flow process trunk figure at described algorithm, travels through all connecting lines; If connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, in described memory module, the output number of the essential information of this algorithm is added 1, increase the index of this connecting line output terminal algorithm, if connecting line is tracker wire, being set to by the trace labelling of this output is follow the tracks of; For the output terminal algorithm of this connecting line, in described memory module, the input number of the essential information of this algorithm is added 1, increase the index of this connecting line input end algorithm, if connecting line is tracker wire, being set to by the trace labelling of this input is follow the tracks of.
In the present embodiment, described just configuration module specifically can comprise: first, second algorithm configuration unit;
Described first algorithm configuration unit is used for described minimum index as current minimum value, the all algorithms in described memory module are traveled through by described index, when finding the first algorithm, the execution sequence number of the first found algorithm is configured to current minimum value, then continue traversal after current minimum value being added 1, traveled through and started described second algorithm configuration unit;
Described second algorithm configuration unit is used for described largest index as current maximum, the all algorithms in described memory module are traveled through by described index, when finding the second algorithm, the execution sequence number of the second found algorithm is configured to current maximum, then continue traversal after current maximum being subtracted 1, traveled through and started described first spider module.
During practical application, also can first second algorithm configuration cell operation, startup first algorithm configuration unit after completing, described first spider module of startup after the first algorithm configuration unit completes; Or first, second algorithm configuration unit concurrent working, described first spider module of startup after completing.
Other realizes details can with described in embodiment one.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on network that multiple calculation element forms, alternatively, they can realize with the executable program code of calculation element, thus, they can be stored and be performed by calculation element in the storage device, or they are made into each integrated circuit modules respectively, or the multiple module in them or step are made into single integrated circuit module to realize.Like this, the present invention is not restricted to any specific hardware and software combination.
Certainly; the present invention also can have other various embodiments; when not deviating from the present invention's spirit and essence thereof; those of ordinary skill in the art are when making various corresponding change and distortion according to the present invention, but these change accordingly and are out of shape the protection domain that all should belong to claim of the present invention.

Claims (10)

1. a method for placement algorithm execution sequence number, comprising:
A, extraction preserve the essential information of each algorithm in steering logic figure, comprise the index of each algorithm, whether the index of I/O algorithm of each algorithm, the I/O number of each algorithm, I/O line be tracker wire;
B, according to index ergodic algorithm, find first, second algorithms all; The execution sequence number that each described first algorithm configuration increases progressively from minimum index is followed successively by according to indexed sequential; The execution sequence number that each described second algorithm configuration successively decreases from largest index is followed successively by by reverse indexing order;
Described first algorithm is not for exporting, or output line is the algorithm of tracker wire; Described second algorithm is not input, or input link is the algorithm of tracker wire;
C, from minimum index, travel through each output of the first half algorithm by index, when traversing each output of each algorithm, perform a steps d; Travel through rear execution step e;
If the output algorithm of this output of d does not have execution sequence number, then for the configuration of this output algorithm adds execution sequence number 1 from execution sequence minimum value current in page, after configuration, described current minimum value is added 1;
Judging whether that the output line of this output is not tracker wire and this output is not in connection circulation, is not travel through next output;
If it is judge whether that the execution sequence number of this output algorithm is greater than this algorithm, and be minimum in the output algorithm being greater than this algorithm, be then the rear next one that travels through of execution sequence number exchange of this output algorithm and this algorithm is exported, otherwise directly travel through next one output;
E, travel through each input of each algorithm according to the index of described each algorithm, when traversing each input of each algorithm, perform a step f; Travel through rear end;
F, when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence number of the input algorithm of this input, and it is maximum that the execution sequence of this input algorithm number is less than in the input algorithm of this algorithm at all execution sequences number, then by the execution sequence of this input algorithm number exchange with this algorithm; Then the next input of traversal.
2. the method for claim 1, is characterized in that, in described steps d, after this output algorithm and the execution sequence number of this algorithm being exchanged, also comprises step before the next output of traversal:
From this output algorithm, travel through each input of the algorithm distributing execution sequence number according to execution sequence number back to front, when traversing each input of each algorithm, perform a step f; Export by index traversal is next after having traveled through.
3. the method for claim 1, is characterized in that, in described step c, after having traveled through, before execution step e, also comprises step:
If the number of described second algorithm of g is greater than 0, then from index be described maximum execution sequence number deducts the algorithm of described current minimum value, travel through each output of this algorithm and each algorithm thereafter by index, when traversing each output of each algorithm, perform a steps d; Travel through rear execution step e.
4. the method according to any one of Claim 1-3, is characterized in that, described step a comprises:
A1, according to all algorithms in picture order traversal steering logic figure, in internal memory, preserve the index of each algorithm, initial value be 0 I/O number, be temporarily the index of empty I/O algorithm, be defaulted as the trace labelling of each I/O of non-tracking;
A2, isolate tracker wire and be connected to the pel not needing algorithm execution sequence number, arrange out algorithm and perform flow process trunk figure;
A3, to perform in flow process trunk figure at described algorithm, travel through all connecting lines;
If connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, in internal memory, the output number of the essential information of this algorithm is added 1, increase the index of this connecting line output terminal algorithm, if connecting line is tracker wire, being set to by the trace labelling of this output is follow the tracks of; For the output terminal algorithm of this connecting line, in internal memory, the input number of the essential information of this algorithm is added 1, increase the index of this connecting line input end algorithm, if connecting line is tracker wire, being set to by the trace labelling of this input is follow the tracks of.
5. the method according to any one of Claim 1-3, is characterized in that, described step b comprises:
B1, using described minimum index as current minimum value, by all algorithms in described index traversal internal memory, when finding the first algorithm, the execution sequence number of the first found algorithm is configured to current minimum value, then traversal is continued after current minimum value being added 1, until traveled through;
B2, using described largest index as current maximum, by all algorithms in described index traversal internal memory, when finding the second algorithm, the execution sequence number of the second found algorithm is configured to current maximum, then traversal is continued after current maximum being subtracted 1, until traveled through.
6. a device for placement algorithm execution sequence number, is characterized in that, comprising:
First, second configuration module, first, second spider module, memory module, first configuration module;
Extraction module, for extracting the essential information of depositing each algorithm in steering logic figure, comprise the index of each algorithm, whether the index of I/O algorithm of each algorithm, the I/O number of each algorithm, I/O line be tracker wire, and be kept in described memory module; The described just configuration module of startup after completing;
Described just configuration module is used for the algorithm traveled through according to index in described memory module, find first, second algorithms all, the execution sequence number that each described first algorithm configuration increases progressively from minimum index is followed successively by according to indexed sequential, the execution sequence number that each described second algorithm configuration successively decreases from largest index is followed successively by, described first spider module of startup after completing by reverse indexing order; Described first algorithm is not for exporting, or output line is the algorithm of tracker wire; Described second algorithm is not input, or input link is the algorithm of tracker wire;
Described first spider module is used for each output traveling through the first half algorithm in described memory module from minimum index by index, calls once described first configuration module when traversing each output of each algorithm; Travel through described second spider module of rear startup;
Described first configuration module is used for when the output algorithm of this output does not have execution sequence, adds execution sequence number 1, after configuration, described current minimum value is added 1 for this output algorithm configures from execution sequence minimum value current in page; Judge whether that the output line of this output is not tracker wire and this output is not in connection circulation, be not, notify that the module walks next one calling this module exports; If it is judge whether that the execution sequence number of this output algorithm is greater than this algorithm, and be minimum in the output algorithm being greater than this algorithm, then the execution sequence number of this output algorithm in described memory module and this algorithm is exchanged, then notice calls the module walks next one output of this module, otherwise directly notifies that the module walks next one calling this module exports;
Described second spider module is used for each input traveling through each algorithm in described memory module according to the index of described each algorithm, calls once described second configuration module when traversing each input of each algorithm;
Described second configuration module is used for when the input link of this input is not tracker wire, if the execution sequence of this algorithm number is greater than the execution sequence number of the input algorithm of this input, and it is maximum that the execution sequence of this input algorithm number is less than in the input algorithm of this algorithm at all execution sequences number, then by the execution sequence of this input algorithm in the described memory module number exchange with this algorithm, notice calls the module walks next one input of this module.
7. device as claimed in claim 6, is characterized in that:
Described first configuration module is also for after exchanging the execution sequence of output algorithm and this algorithm number, before notice calls the module walks next one output of this module, from this output algorithm, travel through each input of the algorithm distributing execution sequence number according to execution sequence number back to front, when traversing each input of each algorithm, call once described second configuration module; Reinform the module walks next one calling this module after having traveled through to export.
8. device as claimed in claim 6, is characterized in that, also comprise:
3rd spider module;
Described first spider module, also for after traversal completes, before starting the second spider module, if the number of described second algorithm is greater than 0, then calls described 3rd spider module; Described second spider module is restarted after receiving the notice that described 3rd spider module traveled through;
Described 3rd spider module be used for from index be described maximum execution sequence number deducts the algorithm of described current minimum value, travel through each output of this algorithm in described memory module and each algorithm thereafter by index, when traversing each output of each algorithm, call once described first configuration module; Described first spider module is notified after having traveled through.
9. the device according to any one of claim 6 to 8, is characterized in that, described extraction module comprises:
Initialization unit, for according to all algorithms in picture order traversal steering logic figure, in described memory module, preserve the index of each algorithm, initial value be 0 I/O number, be temporarily the index of empty I/O algorithm, be defaulted as the trace labelling of each I/O of non-tracking;
Separative element, not needing the pel of algorithm execution sequence number for separating of going out tracker wire and being connected to, arranging out algorithm and performing flow process trunk figure;
Updating block, for performing in flow process trunk figure at described algorithm, travels through all connecting lines; If connecting line two ends are common algorithm, then for the input end algorithm of this connecting line, in described memory module, the output number of the essential information of this algorithm is added 1, increase the index of this connecting line output terminal algorithm, if connecting line is tracker wire, being set to by the trace labelling of this output is follow the tracks of; For the output terminal algorithm of this connecting line, in described memory module, the input number of the essential information of this algorithm is added 1, increase the index of this connecting line input end algorithm, if connecting line is tracker wire, being set to by the trace labelling of this input is follow the tracks of.
10. the device according to any one of claim 6 to 8, is characterized in that, described just configuration module comprises: first, second algorithm configuration unit;
Described first algorithm configuration unit is used for described minimum index as current minimum value, the all algorithms in described memory module are traveled through by described index, when finding the first algorithm, the execution sequence number of the first found algorithm is configured to current minimum value, then continue traversal after current minimum value being added 1, travel through rear startup second algorithm configuration unit;
Described second algorithm configuration unit is used for described largest index as current maximum, the all algorithms in described memory module are traveled through by described index, when finding the second algorithm, the execution sequence number of the second found algorithm is configured to current maximum, then traversal is continued after current maximum being subtracted 1, described first spider module of startup after completing.
CN201010209737.6A 2010-06-25 2010-06-25 Method and device for configuring algorithm execution sequence number Active CN102298653B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010209737.6A CN102298653B (en) 2010-06-25 2010-06-25 Method and device for configuring algorithm execution sequence number

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010209737.6A CN102298653B (en) 2010-06-25 2010-06-25 Method and device for configuring algorithm execution sequence number

Publications (2)

Publication Number Publication Date
CN102298653A CN102298653A (en) 2011-12-28
CN102298653B true CN102298653B (en) 2015-07-22

Family

ID=45359067

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010209737.6A Active CN102298653B (en) 2010-06-25 2010-06-25 Method and device for configuring algorithm execution sequence number

Country Status (1)

Country Link
CN (1) CN102298653B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108228409A (en) * 2017-12-29 2018-06-29 南京国电南自维美德自动化有限公司 A kind of algorithm performs based on signal stream are sequentially generated method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1423772A (en) * 1999-11-22 2003-06-11 特博数据实验室公司 Information processing system
CN1488091A (en) * 2000-12-21 2004-04-07 Cp8技术公司 Method for making secure a logical or mathematical operator in a microprocessor-based electronic module
CN101617328A (en) * 2006-12-22 2009-12-30 新加坡技术动态私人有限公司 The automatic configuration method and the device that in problem solving environment, are used for meta-heuristic algorithms

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1423772A (en) * 1999-11-22 2003-06-11 特博数据实验室公司 Information processing system
CN1488091A (en) * 2000-12-21 2004-04-07 Cp8技术公司 Method for making secure a logical or mathematical operator in a microprocessor-based electronic module
CN101617328A (en) * 2006-12-22 2009-12-30 新加坡技术动态私人有限公司 The automatic configuration method and the device that in problem solving environment, are used for meta-heuristic algorithms

Also Published As

Publication number Publication date
CN102298653A (en) 2011-12-28

Similar Documents

Publication Publication Date Title
CN109034814B (en) Intelligent contract processing method and device based on Etheng virtual machine
CN108829610B (en) Memory management method and device in neural network forward computing process
CN108365967A (en) Method, system, terminal and the computer readable storage medium of dynamic configuration communications parameter
CN109828935A (en) It is a kind of that method is write with a brush dipped in Chinese ink based on CAN FD bus parallel
CN108255589A (en) Method for scheduling task and server
CN105335855A (en) Transaction risk identification method and apparatus
CN104778079A (en) Method and device used for dispatching and execution and distributed system
CN106126643A (en) The distributed approach of stream data and device
CN108243407A (en) A kind of method and terminal device of multiple wireless module device network interface managements
CN101615130B (en) Service function management system and method
CN109101611A (en) File system directories maximize test method, device, terminal and storage medium
CN109241357A (en) Chain structure model and its construction method, system and terminal device
CN102298653B (en) Method and device for configuring algorithm execution sequence number
CN103905310B (en) Message processing method and forwarding device
CN107977504A (en) A kind of asymmetric in-core fuel management computational methods, device and terminal device
CN113157720B (en) Query statement processing method, device, equipment and medium
CN103064749B (en) Inter-process communication method
CN109800074A (en) Task data concurrently executes method, apparatus and electronic equipment
CN105677233B (en) The storage method and storage device of instant data
CN105264519B (en) A kind of columnar database processing method and processing device
CN108563399A (en) Method for reading data, device, terminal device and the storage medium of storage device
CN108052574A (en) Slave ftp server based on Kafka technologies imports the ETL system and implementation method of mass data
CN103713954B (en) A kind of processor module and electronic equipment
CN109542351A (en) A kind of power consumption control method and solid state hard disk of solid state hard disk
CN110222286A (en) Information acquisition method, device, terminal and computer readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant