CN102880500B - The optimization method of a kind of task tree and device - Google Patents

The optimization method of a kind of task tree and device Download PDF

Info

Publication number
CN102880500B
CN102880500B CN201110195626.9A CN201110195626A CN102880500B CN 102880500 B CN102880500 B CN 102880500B CN 201110195626 A CN201110195626 A CN 201110195626A CN 102880500 B CN102880500 B CN 102880500B
Authority
CN
China
Prior art keywords
task
node
tree
path
father
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
CN201110195626.9A
Other languages
Chinese (zh)
Other versions
CN102880500A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201110195626.9A priority Critical patent/CN102880500B/en
Publication of CN102880500A publication Critical patent/CN102880500A/en
Priority to HK13102641.4A priority patent/HK1175548A1/en
Application granted granted Critical
Publication of CN102880500B publication Critical patent/CN102880500B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

This application provides the optimization method of a kind of task tree and device, method wherein specifically comprises: receive the optimization order for task tree; Detect the connection between two task nodes in described task tree, if connection therebetween had both comprised the path that length is 1, comprise again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on; Described task tree is deleted the Redundant task detected out rely on. The application can detect Redundant task fast and efficiently and rely on.

Description

The optimization method of a kind of task tree and device
Technical field
The application relates to dispatching technique field, particularly relates to optimization method and the device of a kind of task tree.
Background technology
At present, along with the development of society, scheduling is widely applied in the fields such as production, electric power, traffic commander, computer operation control.
Such as, data warehouse is decision support system (DSS) (dss, and the structurizing data environment of on-line analysis application data source decisionsupportsystem), dispatching system based on data warehouse can by task description data warehouse a business processing, and it also uses as given a definition and describe:
Task dependence: describe the relation between task and task, a task could start to perform after must relying on another tasks carrying success;
Father's task: being in the task of being relied on position in task dependence, except root task, any task has at least one father's task;
Subtask: for father's task, is in the task of relying on position in task dependence;
Task tree: all dependences between the description task of image and task;
Node: the task in the description task tree of image, a node represents a task.
The existence of each task dependence, it is meant that subtask must rely on the output of father's task, also, only father's task all performs successfully, and subtask could start to perform. Along with the growth of business in data warehouse and the gradually increasing of task, dependence is also more and more complicated.
Once dependence is established, just can not at will deleting, even if unless can ensure there is not this dependence, when subtask starts to perform, father's task has necessarily performed successfully, and such dependence is just referred to as Redundant task dependence.
Owing to user is when determining task dependence, usually from the angle of single task, when considering from the angle of the overall situation, a lot of task dependence is that redundancy is unnecessary, therefore unavoidably there is Redundant task and relies on.
With reference to Fig. 1, show a kind of example that there is the task tree that Redundant task relies on of prior art, user is when determining task 4 dependence task 3 and task 1, and do not know that task 3 also depends on task 1 indirectly, when obvious task 4 starts to perform, task 1 is inevitable perform successfully, and therefore dependence between task 4 and task 1 is that redundancy is unnecessary. With reference to Fig. 2, show delete Redundant task in Fig. 1 rely on after task tree, it can be seen that task dependence becomes clearly distinct, and dispatching system is when judging whether task 4 can perform, it is possible to minimizing is checked task 1 state thus raised the efficiency.
Along with task quantity size is increasing, the existence of redundancy dependence will make task dependence become more intricate. If can detecting and deleting the task dependence of all redundancies, it is possible not only to make task dependency structure become clear distinct, and the efficiency of dispatching system can be improved.
Redundant task is relied on, prior art or do not process, or can only simple artificial congnition. But, when not processing Redundant task and rely on, along with the expansion of task scale, when such as number of tasks reaches up to ten thousand grades, user cannot check clearly task dependency structure. Many a task dependence, dispatching system will increase the judgement of a task status, reduce and dispatch efficiency simultaneously often; And simple artificial congnition not only wastes a large amount of manpowers, and Redundant task dependences all in None-identified task tree, also, there is recognition efficiency and the low defect of accuracy rate.
In a word, it is necessary to the technical problem that those skilled in the art urgently solve is exactly: how can detect Redundant task fast and efficiently and rely on.
Summary of the invention
Technical problems to be solved in this application are to provide optimization method and the device of a kind of task tree, it is possible to detect Redundant task fast and efficiently and rely on.
In order to solve the problem, this application discloses the optimization method of a kind of task tree, comprising:
Receive the optimization order for task tree;
Detect the connection between two task nodes in described task tree, if connection therebetween had both comprised the path that length is 1, comprise again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on;
Described task tree is deleted the Redundant task detected out rely on.
Preferably, the step of connection between two task nodes in described Detection task tree, comprising:
Obtaining the subtask node in described task tree with two or more direct fathers, wherein, this subtask node equals 1 to the path length of direct father;
From this subtask node, the corresponding father's task node indirectly of traversal in described task tree, wherein, this subtask node is greater than 1 to the path length of indirect father's task node;
If there is a certain indirect father's task node in described task tree to the length of this subtask node is the path of 1, then this indirect father's task node is defined as Redundant task to the path that the length of this subtask node is 1 and relies on.
Preferably, adopting database table to store the task dependence of described task tree, the field of described database table comprises father's task mark and subtask mark.
Preferably, the structure of described database table is relational data structure.
Preferably, the step of connection between two task nodes in described Detection task tree, comprising:
Structure basedization inquiry carries out in task tree the detection of the connection between two task nodes, and described structuralized query is using set of records ends as operation object, and structured query sentence accepts set as input, returns set as exporting;
This output is defined as Redundant task rely on.
On the other hand, disclosed herein as well is the optimization device of a kind of task tree, comprising:
Interface module, for receiving the optimization order for task tree;
Detection module, for the connection detected in described task tree between two task nodes, if connection therebetween had both comprised the path that length is 1, comprises again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on;
Removing module, relies on for deleting the Redundant task detected out in described task tree.
Preferably, described detection module, comprising:
Acquiring unit, for obtaining the subtask node in described task tree with two or more direct fathers, wherein, this subtask node equals 1 to the path length of direct father;
Traversal unit, for, from this subtask node, traveling through corresponding father's task node indirectly in described task tree, wherein, this subtask node is greater than 1 to the path length of indirect father's task node;
Judging unit, it is the path of 1 for judging whether described task tree exists a certain indirect father's task node to the length of this subtask node, if then this indirect father's task node being defined as Redundant task to the path that the length of this subtask node is 1 and relying on.
Preferably, described device also comprises:
Memory module, for adopting database table to store the task dependence of described task tree, the field of described database table comprises father's task mark and subtask mark.
Preferably, the structure of described database table is relational data structure.
Preferably, described detection module, comprising:
Structuralized query unit, the detection of the connection between two task nodes is carried out in described task tree for structure basedization inquiry, described structuralized query is using set of records ends as operation object, and structured query sentence accepts set as input, returns set as exporting;
Determining unit, relies on for this output is defined as Redundant task.
Compared with the prior art, the application has the following advantages:
Connection between two task nodes in the application Detection task tree, if connection therebetween had both comprised the path that length is 1, comprises again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on; Due to the above-mentioned process being detected as detection automatically, it is not necessary to manual intervention, namely can detect Redundant tasks all in tree of going out on missions and rely on, therefore, relative to the artificial congnition of prior art, it is possible to improve detection efficiency and accuracy rate; For task tree, delete the Redundant task detected out and rely on, it is possible to make the task dependence in task tree become clearly distinct, also namely reach the object of optimization task tree; For dispatching system, when judging whether a certain subtask can perform, it is possible to reduce checking corresponding father's task status, thus improve scheduling efficiency.
Secondly, the automatic detection of the application realizes by structuralized query, owing to structuralized query language is simple for structure, powerful, easy to learn, like this, Redundant tasks all in Detection task tree relies on only needs primary structureization inquiry to realize, thus, it is possible to greatly improve detection efficiency and accuracy rate.
Accompanying drawing explanation
Fig. 1 is a kind of example that there is the task tree that Redundant task relies on of prior art;
Fig. 2 be delete Redundant task in Fig. 1 rely on after task tree;
Fig. 3 is that a kind of mark of the application has levels the task tree example of structure;
Fig. 4 is the application example of a kind of task tree of the application;
Fig. 5 is the application example of the application another kind of task tree;
Fig. 6 is the schema of the optimization method embodiment of a kind of task tree of the application;
Fig. 7 is a kind of task tree example being applied to operation scheduling of the application;
Fig. 8 is the application example of another task tree of the application;
Fig. 9 is the structure iron of the optimization device embodiment of a kind of task tree of the application.
Embodiment
For enabling above-mentioned purpose, the feature and advantage of the application more become apparent, below in conjunction with the drawings and specific embodiments, the application is described in further detail.
For making those skilled in the art understand the application better, based on the following the structure of task tree, task redundancy in task tree is relied on and analyzes.
In a task tree, mulitpath may be there is to a certain task node from root knot point, and path length differs, then the length in longest path footpath can be selected as the level of this task node, therefore just can be uniquely identified for its level any task node. With reference to Fig. 3, show a kind of mark of the application and have levels the task tree example of structure, figure assuming, the level of root knot point is 0, and part task node is arranged out by level.
First, according to the definition of task dependence, a task could start to perform after must relying on another tasks carrying success. Like this, for the task node of an only father, if deleting the connection of itself and unique father, then this task node will no longer include dependence, namely also it can perform immediately, and need not rely on another task node perform successfully, this has just run counter to the definition of task dependence. Therefore, for the task node of an only father, its connection can not be deleted, therefore do not belong to Redundant task and rely on.
Secondly, according to the definition of level: to the longest path footpath number of root knot point as the level of this task node. Like this, for adjacent two task nodes, therebetween connection only comprises that one unique, length is the path of 1, if deleting connection therebetween, then corresponding subtask node and father's task node just no longer include contact, when also just certainly can not ensure that subtask node performs, corresponding father's task node performs successfully, thus has run counter to the definition of task dependence. Therefore, for the task node of adjacent two layers, connection therebetween can not be deleted, therefore do not belong to Redundant task and rely on.
To sum up, redundancy rely on only be present in a unnecessary father task node and non-adjacent level between. Do not lose generality, the subtask node A assuming to be in n-th layer has two or more father's nodes, then must find a father node B (otherwise A node is in (n-1)th layer) at (n-1)th layer, this father's node necessarily also can find corresponding father's node at the n-th-2 layers, trace back successively, until finding an other path arriving subtask node A at a certain layer, m (m < n-1) layer might as well be located at, at this moment has and only have two kinds of situations:
1) with reference to Fig. 4, in the application example of a kind of task tree of the application, identical to the initial node of two paths of subtask node A, it is all father task node C, because the existence of father task node B, at this moment the path length deleting C-> A is the connection of 1, it is clear that when can ensure that subtask node A performs, father's task node C has necessarily performed successfully, and therefore the path length of C → A is the connection of 1 is that Redundant task relies on;
2) with reference to Fig. 5, in the application example of the application another kind of task tree, to the initial node difference of two paths of subtask node A, it is respectively father task node C and D.
The definition relied on according to Redundant task, when subtask starts to perform, father's task has necessarily performed successfully; Like this, begin to perform if subtask node A looks on the bright side of things, its all father's tasks must be judged, if there is no the connection of D → A, so only can judge whether father task node B performs successfully, father task node B only can judge its father task C when starting to perform, C and D is in same layer, certainly without any contact;Such A can not directly or indirectly detect the state of D when starting to perform, and therefore, when can not ensure that subtask node A starts to perform, father's task node D has necessarily performed successfully; So, now can not delete the connection of D-> A, the path length of D → A is the connection of 1 is not that Redundant task relies on.
Through above-mentioned analysis, it is possible to learn, be the path of 1 if the connection between two task nodes has not only comprised length but also comprise the path that length is greater than 1, then this length is the path of 1 is that Redundant task relies on; Rely on if a path is Redundant task, then the length in this path is 1, and connection between two task nodes involved by this path had not only comprised this path but also comprised the path that length is greater than 1. Connection between two task nodes had not only comprised length and has been the path of 1 but also comprises the path that length is greater than 1, to be this length be 1 path be the sufficient and necessary condition that Redundant task relies on.
Present inventor notices this point, therefore one of invention design creatively proposing the application, also it is, connection between two task nodes in Detection task tree, if connection therebetween had both comprised the path that length is 1, comprise again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on. Due to the above-mentioned process being detected as detection automatically, it is not necessary to manual intervention, namely can detect Redundant tasks all in tree of going out on missions and rely on, therefore, relative to the artificial congnition of prior art, it is possible to greatly improve detection efficiency and accuracy rate.
With reference to Fig. 6, show the schema of the optimization method embodiment of a kind of task tree of the application, specifically can comprise:
Step 601, receive for the optimization order of task tree;
Step 602, detect the connection between two task nodes in described task tree, if connection therebetween had both comprised the path that length is 1, comprise again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on;
Step 603, the Redundant task that deletion detects out in described task tree rely on.
The application can be applied to the fields such as production, electric power, traffic commander, computer operation control, action available task in these fields describes, and task tree has dependence between task, dispatching system is when judging whether a certain subtask can perform, it is necessary to check the state of corresponding father's task. But, the existence that Redundant task relies on, can make dispatching system cannot check clearly task dependency structure; Many a task dependence, dispatching system will increase the judgement of a task status, reduce and dispatch efficiency simultaneously often.
The main purpose of the application is optimization task tree, specifically, detects and deletes Redundant tasks all in task tree and rely on, so that the task dependence in task tree becomes clearly distinct; For dispatching system, when judging whether a certain subtask can perform, it is possible to reduce checking corresponding father's task status, thus improve scheduling efficiency.
With reference to table 1, show the example of a kind of operation scheduling of the application, wherein, operation in units of working, have corresponding action, preceding activity and man-hour parameter.
Table 1
Work Action Preceding activity Man-hour
A Market survey / 4
B Fund is prepared / 10
C Demand analysis A 3
D Product design A 6
E Product development D 8
F Formulate cost plan C, E 2
G Formulate the production program F 3
H Preparation equipment B, G 2
I Prepare starting material B, G 8
J Erecting equipment H 5
K Assemble personnel G 2
L Prepare to go into operation operation I.J, K 1
If describe the work in table 1 by task, the task tree shown in Fig. 7 can be obtained, such that it is able to application the application automatically detects and deletes Redundant tasks all in this task tree and rely on, to optimize this task tree such that it is able to improve the scheduling efficiency of operation.
In practice, an interface can be supplied to, trigger the optimization order for task tree by user by this interface; Wherein, this interface function can be integrated in a certain order in a certain button or menu, and the triggering mode optimizing order is not limited by the application.
In specific implementation, the detection of the connection that various technique means carries out in task tree between two task nodes can be used.
In a preferred embodiment of the present application, the step of connection between two task nodes in described Detection task tree, specifically can comprise:
The subtask node in sub-step A1, acquisition task tree with two or more direct fathers, wherein, this subtask node equals 1 to the path length of direct father;
Sub-step A2, from this subtask node, the corresponding father's task node indirectly of traversal in described task tree, wherein, this subtask node is greater than 1 to the path length of indirect father's task node;
If there is a certain indirect father's task node in sub-step A3 described task tree to the length of this subtask node is the path of 1, then this indirect father's task node is defined as Redundant task to the path that the length of this subtask node is 1 and relies on.
This preferred embodiment proposes direct father and the concept of indirect father's task node, and wherein, direct father is the direct father task node adjacent with subtask node, and also, this subtask node equals 1 to the path length of direct father; Father's task node is then the father's task node except direct father's task node indirectly, and also, this subtask node is greater than 1 to the path length of indirect father's task node.
The path meeting above-mentioned sufficient and necessary condition for detecting out, first this preferred embodiment finds subtask node by the condition of " having two or more direct fathers ", then in described task tree, travel through indirect father's task node corresponding to this subtask node, often obtain indirect father's task node, then judging whether to exist in task tree this indirect father's task node to the length of this subtask node is the path of 1, if, then think that this path meets sufficient and necessary condition, so, to the path that the length of this subtask node is 1, this indirect father's task node is defined as Redundant task rely on.
In embodiments of the present invention, it is preferred that data warehouse can be adopted as the structurizing data environment of task tree.
Further, database table can being adopted to store the task dependence of described task tree, the field of described database table may further include father's task mark and subtask mark.
Such as, with reference to the task tree example shown in Fig. 8, the database table shown in table 2 can be adopted it to be stored, wherein, the name of this database table is called etl_task_tree, the field of this database table can comprise parent_task_id and son_task_id, and a line of this database table then represents the record of a task dependence in task tree.
Table 2
parent_task_id son_task_id
11 12
11 13
11 14
12 15
12 18
13 17
13 18
14 18
17 18
15 18
In the example of table 2, relying on for Redundant task if detecting out (12,18), only need to delete in table and recording accordingly.
In a preferred embodiment of the present application, the structure of described database table can be relational data structure. Relation schema is the description to relation. Relation schema must describe the structure of relation, and namely it which attribute is made up of, and these attributes are from which territory, and the map relation between attribute and territory. Relation is normally determined by the tuple semanteme giving it, and in fact tuple semanteme be a n order predicate, every make this n order predicate be genuine flute card long-pending in the entirety of element just constitute the relation of this relation schema.No matter how the relation of relation schema changes, relation schema all should meet attribute span and limit or the integrity constraint such as interrelated between attribute value.
And relational database, then it is the database being based upon on relational database model basis, carrys out the data in process database by means of concept and methodologies such as set algebraically. In actual applications, any one of following relational database can be adopted: oracle, SQL (structuralized query language, StructuredQueryLanguage), access, db2, sqlserver, sybase, concrete relational database is not limited by the application.
Like this, the step of connection between two task nodes in described Detection task tree, it is possible to comprise further:
The inquiry of sub-step B1, structure basedization carries out in task tree the detection of the connection between two task nodes, and described structuralized query is using set of records ends as operation object, and structured query sentence accepts set as input, returns set as exporting;
Sub-step B2, this output is defined as Redundant task rely on.
Sql like language is simple for structure, powerful, easy to learn, so since IBM company releases for 1981, sql like language is widely used. Nowadays no matter it is picture these large-scale data base management system (DBMS)s of Oracle, Sybase, DB2, Informix, SQLServer, or picture these PC (Personal Computers of VisualFoxpro, PowerBuilder, personalcomputer) upper conventional database development system, all supports that sql like language is as ql.
For making those skilled in the art understand the application better, the testing process below by way of the tree of task shown in Fig. 8 and table 2 illustrates the application further, and described testing process specifically can comprise:
Step S1, structure basedization are inquired about, and have the subtask node of two or more direct fathers in acquisition task tree, and wherein, this subtask node equals 1 to the path length of direct father;
In specific implementation, following SQL statement can be inputted:
Selectson_task_idfrometl_task_treegroupbyson_task_idhavi ngcount (parent_task_id) > 1
Return set also namely export be 18, SQL statement below is all using 18 as TASKID_I.
Step S2, from this subtask node, the corresponding father's task node indirectly of traversal in described task tree, wherein, this subtask node is greater than 1 to the path length of indirect father's task node;
Described task tree travels through the indirect father task node corresponding to this subtask node, by the startwith...connectby grammer of OracleSQL, realizes easily:
Return set also namely export be 12,13. .
It should be noted that, the internal layer SQL in SQL statement above
Selectparent_task_id, levelaslvfrometl_task_tree
Startwithson_task_id=#TASKID_I#connectbypriorparent_task _ id=son_task_id
Can travel through and obtain all father's task nodes (comprising direct and indirect father's task node), but skin will obtain all indirect father's nodes by restriction lv > 1, in fact, direct father's task node is exactly the node that restriction lv=1 obtains. Consider from another angle, according to the parent_task_id in a record corresponding in storage mode its tangible etl_task_tree of direct father task node above, it is possible to by Simple SQL statement:
Selectparent_task_idfrometl_task_treewhereson_task_id=#T ASKID_I#
Directly obtain.
If there is a certain indirect father's task node in step S3 described task tree to the length of this subtask node is the path of 1, then this indirect father's task node is defined as Redundant task to the path that the length of this subtask node is 1 and relies on.
Corresponding table 2, then this step is then whether have (TASKID_J, TASKID_I) such record in etl_task_tree by checking, wherein, TASKID_J is the Query Result 12 and 13 that step S2 obtains. Owing to there is the record of (12,18) and (13,18) in etl_task_tree, then the output that this step SQL inquires about is (12,18) and (13,18).
By SQL statement, each step is described above, it it is the principle in order to the application is described, in fact, the application can be realized by the inquiry of once complete SQL statement, also it is, input structured query sentence accepts set as input, exports all redundancies that can be confirmed as corresponding TASK_I returning set and relies on. This complete SQL statement can be:
Therefore, relied on by artificial congnition Redundant task relative to prior art, not only waste a large amount of manpowers, and all Redundant tasks rely in None-identified task tree, the application, without the need to manual intervention, only need to be inquired about by once complete SQL statement, namely can detect Redundant tasks all in tree of going out on missions and rely on, accordingly, it may be possible to greatly improve detection efficiency and accuracy rate.
Corresponding to aforementioned embodiment of the method, disclosed herein as well is the optimization device of a kind of task tree, with reference to Fig. 9, specifically can comprise:
Interface module 901, for receiving the optimization order for task tree;
Detection module 902, for the connection detected in described task tree between two task nodes, if connection therebetween had both comprised the path that length is 1, comprise again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on; And
Removing module 903, relies on for deleting the Redundant task detected out in described task tree.
Gather in a preferred embodiment of the present application, described detection module 902, it is possible to comprise further:
Acquiring unit, for obtaining the subtask node in task tree with two or more direct fathers, wherein, this subtask node equals 1 to the path length of direct father;
Traversal unit, for, from this subtask node, traveling through corresponding father's task node indirectly in described task tree, wherein, this subtask node is greater than 1 to the path length of indirect father's task node;
Judging unit, it is the path of 1 for judging whether described task tree exists a certain indirect father's task node to the length of this subtask node, if then this indirect father's task node being defined as Redundant task to the path that the length of this subtask node is 1 and relying on.
In another preferred embodiment of the present application, described device can also comprise:
Memory module, for adopting database table to store the task dependence of described task tree, the field of described database table may further include father's task mark and subtask mark.
In the embodiment of the present application, it is preferred that the structure of described database table can be relational data structure.
In the embodiment of the present application, more preferably, described detection module 902, it is possible to comprise further:
Structuralized query unit, the detection of the connection between two task nodes is carried out in task tree for structure basedization inquiry, described structuralized query is using set of records ends as operation object, and structured query sentence accepts set as input, returns set as exporting;
Determining unit, relies on for this output is defined as Redundant task.
For device embodiment, due to itself and embodiment of the method basic simlarity, so what describe is fairly simple, relevant part illustrates see the part of embodiment of the method.
Each embodiment in this specification sheets all adopts the mode gone forward one by one to describe, each embodiment emphasis illustrate be the difference with other embodiments, between each embodiment identical similar part mutually see.
The optimization method of a kind of task tree above the application provided and device, it is described in detail, apply specific case herein the principle of the application and enforcement mode to have been set forth, illustrating just for helping the method understanding the application and core concept thereof of above embodiment; Meanwhile, for one of ordinary skill in the art, according to the thought of the application, all will change in specific embodiments and applications, in sum, this description should not be construed as the restriction to the application.

Claims (10)

1. the optimization method of a task tree, it is characterised in that, comprising:
Receive the optimization order for task tree;
Detect the connection between two task nodes in described task tree, if connection therebetween had both comprised the path that length is 1, comprise again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on; Wherein, when being applied in data warehouse of task is dispatched, task is used for a business processing in data of description warehouse, and described task node is a kind of abstractdesription to task in graphics, all dependences of described task tree for describing between task and task;
Described task tree is deleted the Redundant task detected out rely on.
2. the method for claim 1, it is characterised in that, the step of connection between two task nodes in described Detection task tree, comprising:
Obtaining the subtask node in described task tree with two or more direct fathers, wherein, this subtask node equals 1 to the path length of direct father;
From this subtask node, the corresponding father's task node indirectly of traversal in described task tree, wherein, this subtask node is greater than 1 to the path length of indirect father's task node;
If there is a certain indirect father's task node in described task tree to the length of this subtask node is the path of 1, then this indirect father's task node is defined as Redundant task to the path that the length of this subtask node is 1 and relies on.
3. method as claimed in claim 1 or 2, it is characterised in that, adopt database table to store the task dependence of described task tree, the field of described database table comprises father's task mark and subtask mark.
4. method as claimed in claim 3, it is characterised in that, the structure of described database table is relational data structure.
5. method as claimed in claim 4, it is characterised in that, the step of connection between two task nodes in described Detection task tree, comprising:
Structure basedization inquiry carries out in task tree the detection of the connection between two task nodes, and described structuralized query is using set of records ends as operation object, and structured query sentence accepts set as input, returns set as exporting;
This output is defined as Redundant task rely on.
6. the optimization device of a task tree, it is characterised in that, comprising:
Interface module, for receiving the optimization order for task tree;
Detection module, for the connection detected in described task tree between two task nodes, if connection therebetween had both comprised the path that length is 1, comprises again the path that length is greater than 1, then the path that length therebetween is 1 is defined as Redundant task and relies on;Wherein, when being applied in data warehouse of task is dispatched, task is used for a business processing in data of description warehouse, and described task node is a kind of abstractdesription to task in graphics, all dependences of described task tree for describing between task and task;
Removing module, relies on for deleting the Redundant task detected out in described task tree.
7. device as claimed in claim 6, it is characterised in that, described detection module, comprising:
Acquiring unit, for obtaining the subtask node in described task tree with two or more direct fathers, wherein, this subtask node equals 1 to the path length of direct father;
Traversal unit, for, from this subtask node, traveling through corresponding father's task node indirectly in described task tree, wherein, this subtask node is greater than 1 to the path length of indirect father's task node;
Judging unit, it is the path of 1 for judging whether described task tree exists a certain indirect father's task node to the length of this subtask node, if then this indirect father's task node being defined as Redundant task to the path that the length of this subtask node is 1 and relying on.
8. device as claimed in claims 6 or 7, it is characterised in that, also comprise:
Memory module, for adopting database table to store the task dependence of described task tree, the field of described database table comprises father's task mark and subtask mark.
9. device as claimed in claim 8, it is characterised in that, the structure of described database table is relational data structure.
10. device as claimed in claim 9, it is characterised in that, described detection module, comprising:
Structuralized query unit, the detection of the connection between two task nodes is carried out in described task tree for structure basedization inquiry, described structuralized query is using set of records ends as operation object, and structured query sentence accepts set as input, returns set as exporting;
Determining unit, relies on for this output is defined as Redundant task.
CN201110195626.9A 2011-07-13 2011-07-13 The optimization method of a kind of task tree and device Active CN102880500B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201110195626.9A CN102880500B (en) 2011-07-13 2011-07-13 The optimization method of a kind of task tree and device
HK13102641.4A HK1175548A1 (en) 2011-07-13 2013-03-04 Method and device for optimizing a task tree

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110195626.9A CN102880500B (en) 2011-07-13 2011-07-13 The optimization method of a kind of task tree and device

Publications (2)

Publication Number Publication Date
CN102880500A CN102880500A (en) 2013-01-16
CN102880500B true CN102880500B (en) 2016-06-15

Family

ID=47481839

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110195626.9A Active CN102880500B (en) 2011-07-13 2011-07-13 The optimization method of a kind of task tree and device

Country Status (2)

Country Link
CN (1) CN102880500B (en)
HK (1) HK1175548A1 (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104536814B (en) * 2015-01-16 2019-01-22 北京京东尚科信息技术有限公司 A kind of method and system handling workflow
CN106294478B (en) * 2015-06-04 2019-11-08 阿里巴巴集团控股有限公司 The data processing method and device of data warehouse
CN105159783A (en) * 2015-10-09 2015-12-16 上海瀚之友信息技术服务有限公司 System task distribution method
US10795888B2 (en) * 2018-12-21 2020-10-06 Tableau Software, Inc. Elimination of query fragment duplication in complex database queries
CN110837475B (en) * 2019-11-14 2024-03-01 北京有竹居网络技术有限公司 Redundancy detection method and device, terminal and storage medium
CN112835696B (en) * 2021-02-08 2023-12-05 兴业数字金融服务(上海)股份有限公司 Multi-tenant task scheduling method, system and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920781A (en) * 2005-08-24 2007-02-28 松下电器产业株式会社 Task execution device and method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920781A (en) * 2005-08-24 2007-02-28 松下电器产业株式会社 Task execution device and method

Also Published As

Publication number Publication date
CN102880500A (en) 2013-01-16
HK1175548A1 (en) 2013-07-05

Similar Documents

Publication Publication Date Title
CN102880500B (en) The optimization method of a kind of task tree and device
US9489654B2 (en) Artificial intelligence system and method for processing multilevel bills of materials
US7343209B2 (en) Attribute-based item information grouping, such as for use in generating manufacturing instructions
CN105243528A (en) Financial IT system graphical centralized reconciliation system and method under big data environment
US10671581B2 (en) Hierarchical computations of nodes having non-tree topologies in relational database management systems
Chen et al. Development of foundation models for Internet of Things
CN101436192A (en) Method and apparatus for optimizing inquiry aiming at vertical storage type database
CN103853818A (en) Multidimensional data processing method and device
CN111125116B (en) Method and system for positioning code field in service table and corresponding code table
CN104750496A (en) Automatic checking method for change influence degree of model
CN102222278A (en) Operation process customizing method and device
CN103678725A (en) Method, storage module and system for layered garbage collection in object relationship database
CN104081397A (en) Creating an archival model
CN101578579B (en) Taxonomy object modeling method and system
CN116680354A (en) Metadata management method and system for lithium battery production and manufacturing industry
CN104572832A (en) Requirement meta model construction method and device
Glake et al. Data management in multi-agent simulation systems
Koncilia et al. Interval OLAP: Analyzing interval data
CN101968747B (en) Cluster application management system and application management method thereof
CN106021401A (en) Extensible entity analysis algorithm based on reverse indices
CN111241176A (en) Data management system
CN105653565A (en) Data checking method and data checking apparatus
CN104063413A (en) MYSQL (my structured query language) database tree structure and quick retrieval method thereof
CN102902760B (en) Method for detecting demand conflict relation
CN112381228B (en) Knowledge system construction and application method based on business

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1175548

Country of ref document: HK

C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1175548

Country of ref document: HK