CN115220701A - Task dependency relationship processing method and device, and task execution method and device - Google Patents

Task dependency relationship processing method and device, and task execution method and device Download PDF

Info

Publication number
CN115220701A
CN115220701A CN202210651186.1A CN202210651186A CN115220701A CN 115220701 A CN115220701 A CN 115220701A CN 202210651186 A CN202210651186 A CN 202210651186A CN 115220701 A CN115220701 A CN 115220701A
Authority
CN
China
Prior art keywords
task
function
dependency
expression
executed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210651186.1A
Other languages
Chinese (zh)
Inventor
瞿红卫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information 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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210651186.1A priority Critical patent/CN115220701A/en
Publication of CN115220701A publication Critical patent/CN115220701A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/24Object-oriented
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The embodiment of the specification provides a task dependency relationship processing method and a task execution method. Which comprises the following steps: writing an expression of the dependency function corresponding to each task according to the task dependency relationship corresponding to each task and the structure of the preset dependency function; wherein the structure of the dependency function comprises: at least one conditional function and a predicate expression; the condition function is used for representing query semantics or screening semantics included in the task dependency relationship, and the judgment expression is used for representing judgment semantics included in the task dependency relationship; expressions of the respective dependent functions corresponding to the respective tasks are stored in a storage table. The method of the embodiment of the specification is simpler and more flexible.

Description

Task dependency relationship processing method and device, and task execution method and device
Technical Field
One or more embodiments of the present specification relate to a network communication technology, and in particular, to a method and an apparatus for processing task dependency relationships, and a method and an apparatus for executing tasks.
Background
With the increasing business application, the number of external tasks that the computer needs to execute is increasing, and various tasks may have task dependency relationship when being executed. A task dependency is a relationship that requires one or more tasks to be performed in a particular temporal order to complete a task. For example, task X is a task that calculates the profit of a financial product, and task Y is a task that distributes the profit to users, so there is a dependency between task X and task Y, and task Y can only be executed if task X is completed.
In order to ensure the correct execution of each task, the task dependency relationship needs to be embodied accurately. In the prior art, task dependency is usually written by a code in a program code of a task, for example, an execution state of a task X is checked by a code in a program code of a task Y, and if the task X is executed completely, a function of a subsequent program code of the task Y is continuously executed.
In the prior art, a method for writing down task dependency in a task program code needs to understand the programming mode of the task program code, the implementation mode is not flexible enough, and when the task dependency is changed, the program code needs to be modified, which increases the difficulty in service implementation.
Disclosure of Invention
One or more embodiments of the present specification describe a method and an apparatus for processing task dependency relationships, and a method and an apparatus for executing tasks, which can embody task dependency relationships and execute tasks in a simpler and flexible manner.
According to a first aspect, a method for processing task dependency relationships is provided, which includes:
writing an expression of the dependency function corresponding to each task according to the task dependency relationship corresponding to each task and the structure of the preset dependency function;
wherein the structure of the dependency function comprises: at least one conditional function and a decision expression; the condition function is used for representing query semantics or screening semantics included in the task dependency relationship, and the judgment expression is used for representing judgment semantics included in the task dependency relationship;
the expressions of the respective dependent functions corresponding to the respective tasks are stored in a storage table.
The different condition functions are separated by using semicolons, and the condition functions and the judgment expressions are separated by using semicolons;
the at least one conditional function and the decision expression are connected in sequence by a semicolon.
Wherein the dependent function uses Java language, go language or C language.
Wherein the tasks are as follows: a time sequence task related to the business application program and having a time sequence requirement;
the task dependency relationships include: dependency between two sequential tasks with a timing requirement.
According to a second aspect, there is provided a method of executing a task, comprising:
when a task to be executed needs to be executed, pulling an expression of a dependent function corresponding to the task to be executed from a storage table;
reading the log record of the task on which the task to be executed depends from the task log record according to the expression of the pulled dependent function;
and judging whether to execute the task to be executed or not according to the expression of the pulled dependent function and the read log record, and if so, executing.
Wherein the method further comprises: adding a dependency check jump statement in a program code of the task to be executed at the creation stage of the task to be executed;
and when the task to be executed is executed to the dependency check jump statement, triggering the dependency check module to execute the pulling step until the judging step.
Wherein the method further comprises: adding a dependency check function on the execution node of the task to be executed;
and when the execution node needs to execute the task to be executed, triggering a dependence checking module to execute the pulling step until the judging step.
According to a third aspect, there is provided a processing apparatus for task dependency, comprising:
the dependent expression writing module is configured to write an expression of the dependent function corresponding to each task according to the task dependent relationship corresponding to each task and the preset structure of the dependent function; wherein the structure of the dependency function comprises: at least one conditional function and a decision expression; the condition function is used for representing query semantics and/or screening semantics included in the task dependency relationship, and the judgment expression is used for representing judgment semantics included in the task dependency relationship;
and the storage module is configured to store the expressions of the dependent functions corresponding to the tasks in a storage table.
According to a fourth aspect, there is provided a task execution device including:
the task docking module is configured to trigger the dependency check module when monitoring that a task to be executed needs to be executed; after receiving the notification, triggering the execution of the task to be executed;
the dependency check module is configured to pull an expression of a dependency function corresponding to the task to be executed from the storage table after being triggered; reading the log record of the task on which the task to be executed depends from the task log record according to the expression of the pulled dependent function; and judging whether to execute the task to be executed or not according to the pulled expression of the dependent function and the read log record, and if so, informing the task docking module.
According to a fifth aspect, there is provided a computing device comprising a memory having stored therein executable code and a processor that, when executing the executable code, implements a method as described in any embodiment of the specification.
The method and the device provided by the embodiment of the specification have at least the following beneficial effects:
1. the program code of the task is not required to be modified, and the task dependence judgment logic is separated from the service, so that the configuration and modification are facilitated;
2. the semantics of the task dependency relationship are embodied in an expression mode, so that complex semantic logic can be realized in a simple mode;
3. by adopting the expression mode, relevant parts in the expression can be modified when the task dependency relationship is changed, other parts are kept unchanged, the implementation mode is simple, and errors are not easy to occur.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present specification, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic diagram of a system configuration to which one embodiment of the present description is applied.
Fig. 2 is a flowchart of a processing method of task dependency in one embodiment of the present specification.
Fig. 3 is a flowchart of a method of performing a task in one embodiment of the present specification.
Fig. 4 is a schematic structural diagram of a processing device for task dependency relationship in one embodiment of the present specification.
Fig. 5 is a schematic structural diagram of a task execution device in one embodiment of the present specification.
Detailed Description
The scheme provided by the specification is described below with reference to the accompanying drawings.
It is first noted that the terminology used in the embodiments of the present invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
To facilitate an understanding of the methods provided herein, reference will first be made to elements referred to and applicable to this description. As shown in fig. 1, mainly includes: individual tasks, dependency check modules, and memory tables.
Each task can complete certain business processing functions, for example, one task is a function of performing financial management, another task is a function of performing financial benefit distribution, and another task is a task of evaluating a credit level of a user. The dependency check module is independent of each task, so that the judgment logic of task dependency is separated from each task, and the problems that in the prior art, the realization mode is not flexible enough, the service realization difficulty is increased and the like caused by the fact that the judgment logic of the task dependency relationship is written in the program code of one task are solved.
The storage table stores expressions of the dependent functions corresponding to each task. The dependency relationship of one task is embodied in an expression mode, on one hand, the storage table is independent of each task, and the problems that the implementation mode in the prior art is not flexible enough, the service implementation difficulty is increased and the like can be solved; on the other hand, the dependency relationship is embodied by using the expression mode, when the dependency relationship of the task is changed, only the corresponding part in the expression needs to be modified, and program codes with higher modification difficulty in the prior art are not needed, so that the dependency relationship of the task can be configured and modified in real time, and the program codes of the task do not need to be deeply understood.
In the embodiments of the present specification, two-part processing is involved, the first part processing: processing the task dependency relationship; and a second part of treatment: and executing the task according to the processing result of the first part. The processing of the two parts will be described below.
First, the process of the first part is explained.
Fig. 2 is a flowchart of a processing method of task dependency in one embodiment of the present specification. The execution main body of the method is a processing device of task dependency relationship. It is to be understood that the method may also be performed by any apparatus, device, platform, cluster of devices having computing, processing capabilities. Referring to fig. 2, the method includes:
step 201: writing an expression of the dependency function corresponding to each task according to the task dependency relationship corresponding to each task and the structure of the preset dependency function;
wherein, the structure of the dependency function comprises: at least one conditional function and a predicate expression; the condition function is used for representing query semantics and/or screening semantics included in the task dependency relationship, and the judgment expression is used for representing judgment semantics included in the task dependency relationship.
Step 203: expressions of the respective dependent functions corresponding to the respective tasks are stored in a storage table.
As can be seen from the flow shown in fig. 2, the storage table stores the expressions of the dependent functions corresponding to each task, and the dependency relationship of one task is embodied by means of the expressions instead of the specific program language of the specific task. On one hand, the memory table is independent of each task, and the problems that the implementation mode is not flexible enough, the service implementation difficulty is increased and the like in the prior art can be solved; on the other hand, the task dependency relationship is embodied by using the expression mode, when the task dependency relationship is changed, only the corresponding part in the expression is required to be modified, for example, only one condition function in the expression is modified or only the judgment expression is modified, and the program code with higher modification difficulty in the prior art is not required, so that the task dependency relationship can be configured and modified in real time, and the program code of the task is not required to be deeply understood.
Based on the dependency relationship of the tasks processed in fig. 2, the judgment logic of the task dependency relationship can be independent of each task, and the problem caused by the fact that the judgment logic of the task dependency relationship is written in the program code of one task in the prior art is solved.
The process shown in fig. 2 will be described with reference to specific examples.
For step 201: writing an expression of the dependency function corresponding to each task according to the task dependency relationship corresponding to each task and the structure of the preset dependency function; wherein the structure of the dependency function comprises: at least one conditional function and a decision expression; each conditional function is used for representing query semantics or screening semantics included in the task dependency relationship, and the judgment expression is used for representing judgment semantics included in the task dependency relationship.
In order to execute the processing of step 201, first, in this embodiment of the present specification, a structure of a dependent function may be designed in advance, and each task dependency relationship in the following may be written according to the structure of the dependent function.
The design of the dependent function takes into account two aspects:
1. configurable and convenient to modify.
In order to make the dependent function convenient for configuration and modification, the dependent function may adopt the structure of an expression, that is, not a program language with a fixed format, but a mode of an expression.
In the semantics of the task dependency relationship, a query condition (for example, whether the query task a is completed), a filter condition (for example, screening the number of times that the task a is executed in the previous month period), and a judgment relationship (for example, judging whether the number of times that the task a is executed in the previous month period is greater than 1 ten thousand) are embodied. The embodiment of the present specification has the advantages of using expression structures: each query condition, each filtering condition and each judgment relation required in the task dependency relation can correspond to one parameter in the expression, namely, the condition or the judgment relation is embodied in the form of the parameter. Because the parameters in the expression can be sequentially associated together through the symbols in the expression, the semantics of the task dependency relationship can still be embodied after the using parameter forms of the query condition, the filtering condition and the judgment relationship are embodied, and meanwhile, because the parameters in the expression independently exist, after the using parameter forms of the query condition, the filtering condition and the judgment relationship are embodied, any one independent parameter (namely the query condition, the filtering condition or the judgment relationship) can be flexibly configured or modified without influencing other parameters (namely other query conditions, filtering conditions or judgment relationships), so that flexible configuration and modification can be realized, the implementation flexibility is greatly improved compared with a program code modifying mode, and the configuration and modification cost is reduced.
In one embodiment of the present specification, in the structural design of the dependent function, the different conditional functions are separated by using semicolons, and the conditional function and the decision expression are separated by using semicolons; in this way, at least one conditional function and the decision expression are connected in sequence by a semicolon and express semantics of the task dependency relationship in sequence.
For example, the structure of the dependency function is designed as follows:
a conditional function 1; 8230a conditional function n; predicate expression
Wherein n is a positive integer greater than 0.
2. The semantics of the task dependency relationship can be embodied.
In order to enable the dependency function to embody the semantics of the task dependency relationship, each parameter in the expression may correspond to a conditional function or a decision expression in the task dependency relationship, that is, the dependency function includes: at least one conditional function and a decision expression; the task dependency relationship is used for representing the semantics of a query condition or the semantics of a screening condition, namely, the condition function can be a query function or a screening function; a predicate expression is used to characterize a predicate semantic included in the task dependency.
For example, the structure of the dependency function may be: conditional function 1 (corresponding to query semantics 1/filter semantics 1); \8230; conditional function n (corresponding to query semantic n/filter semantic n); predicate expressions (corresponding to predicate semantics). Wherein n is a positive integer greater than 0.
Next, after the structure of the dependent function is designed in the above manner, the process of this step 201 may be executed, and an expression of the dependent function corresponding to the task is written for the current task according to the structure of the dependent function.
For example, the execution of task B depends on the execution of task a, and the semantics of the task dependency corresponding to task B include: the task B is executed according to the query semantics (for example, whether the query task a is executed completely), the screening semantics (for example, the times of successful execution of the task a and the times of failed execution of the task a in the previous natural month are screened), and the judgment semantics (for example, after the task a is executed completely, if the times of successful execution of the task a in the previous natural month are greater than the times of failed execution of the task a, the task B is executed). Then, the expression of the dependent function corresponding to task B is denoted as expression 1, and is: querying a function 1; screening function 1; expression 1 is determined.
As another example, if task C is dependent on task D for execution, then in one case, the expression for the dependent function for task C is: a screening function 2; a screening function 3; expression 2 is decided.
Next for step 203: expressions of the respective dependent functions corresponding to the respective tasks are stored in a storage table.
Here, the expressions of the dependent functions are stored in a unified manner, so that when a subsequent task needs to execute the task dependency relationship, the storage table can be accessed to obtain the expression of the dependent function corresponding to the subsequent task.
The memory table may be isolated from the program code of the respective task. This achieves that the program code of the task is decoupled from the expressions of the dependent functions (i.e. the task dependencies).
When the dependency relationship of a task needs to be modified according to the actual service condition, only the expression of the dependent function in the storage table needs to be modified. For example, the semantics of the task dependency corresponding to task B is modified as follows: the query semantics includes 1 st query semantics (for example, whether the query task a is executed completely), 2 nd query semantics (for example, whether the query task C is executed completely), 1 screening semantics (for example, screening the number of times that the task a is executed successfully and the number of times that the task a is executed fails in the last natural month), and 1 judgment semantics (for example, after the task a and the task C are executed completely, if the number of times that the task a is executed successfully is greater than the number of times that the task a is executed fails in the last natural month, the task B is executed). That is to say, the 2 nd query semantics is added, so that only one query function needs to be added on the basis of the above expression 1, and other parts do not need to be modified, that is, the query function becomes expression 2: querying a function 1; querying a function 1; screening function 1; expression 1 is determined. Therefore, compared with the method for modifying the program codes in the prior art, the method is very simple and easy to implement.
In the embodiment of the present specification, the language dependent on the function may use Java language, go language, or C language.
It should be noted that, in the embodiments of the present specification, the tasks involved include: time sequence tasks related to business application programs and having time sequence requirements, such as a task 1 of calculating financial benefits, a task 2 of distributing financial benefits, a task 3 of calculating reliability of face brushing application, a task 4 of popularizing face brushing application and the like; accordingly, the task dependencies include: the dependency relationship between two time-series tasks with time-series requirements, such as the dependency relationship between the task 2 and the task 1, and the dependency relationship between the task 4 and the task 3. That is, the method of the embodiments of the present specification is to process various business applications that occur in real life in an external network.
The following describes the second part of the processing, i.e. how to execute the corresponding task according to the processing result of the task dependency relationship.
After the expression of the dependent function of each task is obtained in the manner of the above embodiment, the corresponding task scheduling process may be executed. Fig. 3 is a flowchart of a method of performing a task in one embodiment of the present specification. Referring to fig. 3, the method includes:
step 301: when a task to be executed needs to be executed, the expression of the dependent function corresponding to the task to be executed is pulled from the storage table.
Step 303: reading the log record of the task on which the task to be executed depends from the task log record according to the expression of the pulled dependent function;
step 305: and judging whether to execute the task to be executed or not according to the pulled expression of the dependent function and the read log record, and if so, executing the task to be executed.
In the process shown in fig. 3, when a task is executed, it is only necessary to read the expression of the dependent function corresponding to the task from the storage table, and execute the logic of the expression, so as to determine whether the task can be currently executed.
For example, whether the task B needs to be executed or not is determined currently, the expression of the dependent function corresponding to the task B is firstly pulled from the storage table to obtain the expression 1, the log record corresponding to the task a is read from the log record of the task according to the expression 1, whether the task a is executed or not is queried, for example, the query result shows that the task a is executed completely, then, the number of times that the task a is executed successfully in the last natural month and the number of times that the task a is executed fails are screened out from the log record corresponding to the task a according to the expression 1, then, whether the number of times that the task a is executed successfully in the last natural month is greater than the number of times that the task a is executed fails is judged according to the expression 1, if so, the task B is executed, otherwise, the task B is not executed.
In the embodiment of the present specification, the process of adding dependency check to one task may include the following two ways:
the first way is adding in the task creating stage.
In the first mode, in the creating stage of a task such as a task B, a dependency check jump statement is added in the program code of the task B; thus, when task B executes to the dependency check jump statement, a dependency check module other than task B is triggered to execute the above steps 301 to 305, and in step 305, when it is determined to execute the task B, the dependency check module triggers task B to continue executing its program code logic.
And the second mode is adding in the task execution stage.
In the second mode, a dependency check function is added to an execution node (such as a server of a pay pal system) of a task such as task B;
when the executing node needs to execute task B, the executing node triggers a dependent checking module other than task B to execute steps 301 to 305, and in step 305, when it is determined that task B is executed, the dependent checking module triggers task B to continue executing the logic of its program code. The dependency check module may be provided in the execution node.
In an embodiment of the present specification, there is provided a task dependency processing apparatus, referring to fig. 4, including:
a dependent expression writing module 401 configured to write an expression of a dependent function corresponding to each task according to a task dependent relationship corresponding to each task and a preset structure of the dependent function;
wherein the structure of the dependency function comprises: at least one conditional function and a decision expression; each condition function is used for representing query semantics or screening semantics included in the task dependency relationship, and the judgment expression is used for representing judgment semantics included in the task dependency relationship;
a storage module 402 configured to store expressions of the respective dependent functions corresponding to the respective tasks in a storage table.
In one embodiment of the apparatus of the present specification shown in FIG. 4, the different conditional functions are separated by semicolons, and the conditional functions are separated from the predicate expressions by semicolons;
the at least one conditional function and the decision expression are connected in sequence by a semicolon.
In one embodiment of the apparatus of the present specification shown in fig. 4, the dependent function uses Java language, go language, or C language.
In one embodiment of the present specification apparatus shown in FIG. 4, the memory table is isolated from the program code for each task.
In one embodiment of the present specification apparatus shown in FIG. 4, the tasks include: a time sequence task related to the business application program and having a time sequence requirement;
the task dependency relationships include: dependency between two sequential tasks with a timing requirement.
In one embodiment of the present specification, there is provided a task performing apparatus, referring to fig. 5, including:
the task docking module 501 is configured to trigger the dependency check module 502 when it is monitored that a task to be executed needs to be executed; and after receiving the notification, triggering the execution of the task to be executed.
A dependency check module 502 configured to pull an expression of a dependency function corresponding to the task to be executed from the storage table after being triggered; reading the log record of the task which is depended by the task to be executed from the task log record according to the expression of the pulled dependency function; and judging whether to execute the task to be executed according to the pulled expression of the dependent function and the read log record, and if so, notifying the task docking module 501.
In one embodiment of the present specification apparatus illustrated in FIG. 5, a dependency check jump statement is added to the program code of a task;
the task interfacing module 501 is configured to perform: the dependency check module 502 is triggered when the task executes to a dependency check jump statement.
In one embodiment of the present specification apparatus shown in fig. 5, the task interfacing module 501 and the dependency check module 502 are provided in an execution node of a task;
the task interfacing module 501 is configured to trigger the dependency check module 502 when an executing node needs to execute the task.
An embodiment of the present specification provides a computer-readable storage medium having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method of any of the embodiments of the specification.
One embodiment of the present specification provides a computing device comprising a memory and a processor, the memory having stored therein executable code, the processor implementing a method in accordance with any one of the embodiments of the specification when executing the executable code.
It is to be understood that the illustrated construction of the embodiments herein is not to be construed as limiting the apparatus of the embodiments herein specifically. In other embodiments of the specification, the apparatus may include more or fewer components than illustrated, or some components may be combined, or some components may be split, or a different arrangement of components may be used. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Those skilled in the art will recognize that, in one or more of the examples described above, the functions described in this disclosure may be implemented in hardware, software, hardware, or any combination thereof. When implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
The above-mentioned embodiments, objects, technical solutions and advantages of the present invention are further described in detail, it should be understood that the above-mentioned embodiments are only exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made on the basis of the technical solutions of the present invention should be included in the scope of the present invention.

Claims (10)

1. The task dependency relationship processing method comprises the following steps:
writing an expression of the dependency function corresponding to each task according to the task dependency relationship corresponding to each task and the structure of the preset dependency function;
wherein the structure of the dependency function comprises: at least one conditional function and a decision expression; each condition function is used for representing query semantics or screening semantics included in the task dependency relationship, and the judgment expression is used for representing judgment semantics included in the task dependency relationship;
expressions of the respective dependent functions corresponding to the respective tasks are stored in a storage table.
2. The method of claim 1, wherein different conditional functions are separated by semicolons, and a conditional function is separated from a predicate expression by semicolons;
at least one conditional function and the decision expression are connected in sequence by a semicolon.
3. The method of claim 1, wherein the dependent function uses Java language, go language, or C language.
4. The method of claim 1, wherein the task comprises: a time sequence task related to the business application program and having a time sequence requirement;
the task dependency relationships include: dependency between two sequential tasks with a timing requirement.
5. The task execution method comprises the following steps:
when a task to be executed needs to be executed, pulling an expression of a dependent function corresponding to the task to be executed from a storage table;
reading the log record of the task on which the task to be executed depends from the task log record according to the expression of the pulled dependent function;
and judging whether to execute the task to be executed or not according to the expression of the pulled dependent function and the read log record, and if so, executing.
6. The method of claim 5, wherein the method further comprises: adding a dependency check jump statement in a program code of the task to be executed at the creation stage of the task to be executed;
and when the task to be executed is executed to the dependency check jump statement, triggering the dependency check module to execute the pulling step until the judging step.
7. The method of claim 5, wherein the method further comprises: adding a dependency check function on the execution node of the task to be executed;
and when the execution node needs to execute the task to be executed, triggering a dependence checking module to execute the pulling step until the judging step.
8. The processing device of task dependency relationship includes:
the dependent expression writing module is configured to write an expression of the dependent function corresponding to each task according to the task dependent relationship corresponding to each task and the structure of the preset dependent function; wherein the structure of the dependency function comprises: at least one conditional function and a decision expression; the condition function is used for representing query semantics and/or screening semantics included in the task dependency relationship, and the judgment expression is used for representing judgment semantics included in the task dependency relationship;
and the storage module is configured to store the expressions of the dependent functions corresponding to the tasks in a storage table.
9. An apparatus for executing a task, comprising:
the task docking module is configured to trigger the dependency check module when monitoring that a task to be executed needs to be executed; after receiving the notification, triggering the execution of the task to be executed;
the dependency check module is configured to pull an expression of a dependency function corresponding to the task to be executed from the storage table after being triggered; reading the log record of the task on which the task to be executed depends from the task log record according to the expression of the pulled dependent function; and judging whether to execute the task to be executed or not according to the pulled expression of the dependent function and the read log record, and if so, informing the task docking module.
10. A computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, implements the method of any of claims 1-7.
CN202210651186.1A 2022-06-10 2022-06-10 Task dependency relationship processing method and device, and task execution method and device Pending CN115220701A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210651186.1A CN115220701A (en) 2022-06-10 2022-06-10 Task dependency relationship processing method and device, and task execution method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210651186.1A CN115220701A (en) 2022-06-10 2022-06-10 Task dependency relationship processing method and device, and task execution method and device

Publications (1)

Publication Number Publication Date
CN115220701A true CN115220701A (en) 2022-10-21

Family

ID=83608671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210651186.1A Pending CN115220701A (en) 2022-06-10 2022-06-10 Task dependency relationship processing method and device, and task execution method and device

Country Status (1)

Country Link
CN (1) CN115220701A (en)

Similar Documents

Publication Publication Date Title
CN110603527B (en) Method, system and apparatus for conditional debugging of server-side production code
Silva Souza et al. Awareness requirements for adaptive systems
CN110806923B (en) Parallel processing method and device for block chain tasks, electronic equipment and medium
CN106557470B (en) Data extraction method and device
US20080235682A1 (en) Defining and executing processes using declarative programming language constructs
US20100131745A1 (en) Exceptional events
US10275234B2 (en) Selective bypass of code flows in software program
CN113157710B (en) Block chain data parallel writing method and device, computer equipment and storage medium
CN110599341A (en) Transaction calling method and system
EP1416383A1 (en) Identifying solutions to computer problems in client/server system
CN111339266A (en) Development system of chat robot and chat robot module
US7418628B2 (en) Systems and methods for identifying solutions to computer problems using contexts and versions
CN109582382B (en) Loading method and device of configuration information, storage medium and terminal equipment
US20210232378A1 (en) Program calling, electronic device, and storage medium
US7735090B2 (en) On demand software contract modification and termination in running component assemblies
US20040153878A1 (en) System and method for implementing a dynamic logger
US7403933B2 (en) Identifying solutions to computer problems in main system by service system
CN114115884A (en) Management method and related device for programming service
CN115220701A (en) Task dependency relationship processing method and device, and task execution method and device
CN111176987A (en) Method and device for uniformly outputting front-end log, computer equipment and storage medium
CN110347471B (en) Hierarchical display component system, display component calling method and device
CN111538491A (en) Data event processing method, device, equipment and storage medium
CN109542598B (en) Timed task management method and device
CN116501477B (en) Automatic data processing method, device and equipment
CN115481156A (en) Data processing method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination