A task execution method, device, apparatus and storage medium
By binding adjustment strategies into the CI/CD business pipeline, the task execution process can be dynamically adjusted, solving the problems of low flexibility and efficiency in task execution and achieving efficient resource utilization and optimized task execution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIDU NETCOM SCI & TECH CO LTD
- Filing Date
- 2021-10-26
- Publication Date
- 2026-07-24
AI Technical Summary
The existing CI/CD business pipeline lacks flexibility and efficiency in task execution, making it difficult to dynamically adjust the task execution process, resulting in resource waste and task redundancy.
By binding adjustment strategies into the pipeline approach, the system detects triggering times and executes target adjustment strategies to dynamically adjust the task execution process, including strategies such as task information analysis, skipping, sorting, cancellation, and result reuse, thereby optimizing the task execution process.
It improves the flexibility and efficiency of task execution, reduces the resource consumption of invalid tasks, enhances resource utilization, and optimizes the task execution process.
Smart Images

Figure CN113986495B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more particularly to the field of software technology. Background Technology
[0002] In different scenarios, different tasks can be completed based on different business requirements. Each business requirement may include multiple tasks, and the aforementioned business requirement can be achieved by executing these tasks. Specifically, these multiple tasks can be executed according to the task execution process defined in the pipeline.
[0003] Taking CI / CD (Continuous Integration / Continuous Delivery) for software products as an example, CI / CD is used to build software products that can be deployed to real-world application environments from code written by developers. CI / CD includes multiple tasks such as code compilation, product testing, and product deployment. In this case, these multiple tasks are generally executed according to the task execution process specified in the pipeline to achieve the CI / CD business. Summary of the Invention
[0004] This disclosure provides a task execution method, apparatus, device, and storage medium.
[0005] According to one aspect of this disclosure, a task execution method is provided, comprising:
[0006] In response to initiating the execution of tasks included in the business in a pipeline manner, if preset detection conditions are met, the system checks whether there is a target adjustment strategy that meets the trigger timing among the adjustment strategies already bound to the pipeline manner. The adjustment strategy is a strategy used to adjust the execution flow of the tasks included in the business.
[0007] If it exists, and the execution conditions of the target adjustment strategy are met, the target adjustment strategy is executed;
[0008] Based on the execution results of the target adjustment strategy, the execution flow of the tasks included in the business is adjusted;
[0009] The tasks included in the business are executed according to the adjusted execution flow.
[0010] According to one aspect of this disclosure, a task execution apparatus is provided, comprising:
[0011] The strategy detection module is used to respond to the start of the task included in the business in a pipeline manner. If the preset detection conditions are met, it detects whether there is a target adjustment strategy that meets the triggering time among the adjustment strategies already bound in the pipeline manner. If there is, it triggers the first strategy execution module. The adjustment strategy is a strategy used to adjust the execution flow of the task included in the business.
[0012] The first strategy execution module is used to execute the target adjustment strategy when the execution conditions of the target adjustment strategy are met;
[0013] The process adjustment module is used to adjust the execution process of the tasks included in the business based on the execution result of the target adjustment strategy.
[0014] The task execution module is used to execute the tasks included in the business according to the adjusted execution flow.
[0015] According to one aspect of this disclosure, an electronic device is provided, comprising:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the task execution method described above.
[0019] According to one aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause the computer to perform the above-described task execution method.
[0020] According to one aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described task execution method.
[0021] The solutions provided in this disclosure can improve the efficiency of task execution.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0023] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0024] Figure 1This is a schematic diagram of a pipelined task execution process provided in an embodiment of the present disclosure;
[0025] Figure 2 A flowchart illustrating the first task execution method provided in this embodiment of the disclosure;
[0026] Figure 3a A flowchart illustrating a second task execution method provided in this embodiment of the disclosure;
[0027] Figure 3b A schematic diagram of a policy link provided in an embodiment of this disclosure;
[0028] Figure 4a A flowchart illustrating a third task execution method provided in this embodiment of the disclosure;
[0029] Figure 4b This is a schematic diagram of the structure of a task execution system provided in an embodiment of the present disclosure;
[0030] Figure 5a A flowchart illustrating the fourth task execution method provided in this embodiment of the disclosure;
[0031] Figure 5b This is a schematic diagram of the structure of a problem-solving system provided in an embodiment of the present disclosure;
[0032] Figure 6 This is a schematic diagram of a microservice architecture provided in an embodiment of the present disclosure;
[0033] Figure 7a A flowchart illustrating the fifth task execution method provided in this embodiment of the disclosure;
[0034] Figure 7b A schematic diagram illustrating the framework of a task execution method provided in an embodiment of this disclosure;
[0035] Figure 8 This is a schematic diagram of the structure of a first type of task execution device provided in an embodiment of the present disclosure;
[0036] Figure 9 This is a schematic diagram of the structure of a second task execution device provided in an embodiment of the present disclosure;
[0037] Figure 10 This is a schematic diagram of the structure of a third task execution device provided in the embodiments of this disclosure;
[0038] Figure 11 This is a schematic diagram of the structure of the fourth task execution device provided in the embodiments of this disclosure;
[0039] Figure 12 This is a block diagram of an electronic device used to implement the task execution method of the embodiments of this disclosure. Detailed Implementation
[0040] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0041] First, the application scenarios of this disclosure will be explained.
[0042] The application scenario disclosed herein is: an application scenario in which tasks included in business operations are executed in a pipeline manner.
[0043] Taking CI / CD as an example, CI / CD tasks include code compilation, product testing, and product deployment. Each task can include multiple subtasks; for example, a code compilation task includes subtasks such as calling the compilation algorithm, code input, and obtaining the compilation results.
[0044] The pipeline approach defines the execution flow of tasks within a business process. Figure 1 For example, Figure 1 This illustrates a pipelined task execution flow, from pipeline initiation to pipeline termination, which can be performed according to... Figure 1 The illustrated process executes multiple tasks involved in the business logic. Figure 1 In the diagram, the tasks from left to right are: Task 1, Task 2, ..., Task N. When executing these tasks, they are executed sequentially according to the execution flow of Task 1, Task 2, ..., Task N.
[0045] Each task includes the following subtasks in sequence: Startup Subtask, Run Subtask, and End Subtask. Thus, when executing each task, the Startup Subtask is executed first, starting the task; then the Run Subtask is executed, running the task; and finally, the End Subtask is executed, ending the task execution.
[0046] Next, the implementing entity of the embodiments of this disclosure will be described.
[0047] The executing entity in this embodiment of the disclosure can be any electronic device with task execution capabilities. For example, the aforementioned electronic device can be a device in a task building platform.
[0048] The task execution method provided in the embodiments of this disclosure will be described in detail below.
[0049] See Figure 2 , Figure 2This is a flowchart illustrating a first task execution method provided in an embodiment of the present disclosure. The method includes the following steps S201-S204.
[0050] Step S201: In response to initiating the execution of tasks included in the business in a pipeline manner, if the preset detection conditions are met, check whether there is a target adjustment strategy that meets the trigger timing among the adjustment strategies already bound in the pipeline manner. If it exists, proceed to step S202; if it does not exist, after the detection conditions are met again, check whether there is a target adjustment strategy that meets the trigger timing again.
[0051] The aforementioned business process may include multiple tasks, and the implementation of the business depends on the execution of these tasks. When executing these multiple tasks, they can be performed according to the task execution flow defined by the pipeline approach.
[0052] The aforementioned detection conditions refer to the conditions used to trigger policy detection. These conditions can specify when policy detection should be performed to detect target adjustment policies that meet the triggering conditions.
[0053] Specifically, the task execution process can be divided into different stages, and different detection conditions can be set for different stages. The detection conditions are explained below through three specific cases.
[0054] In scenario one, the above detection condition could be that the business is in the task preparation stage. This stage can be understood as the period after the business has started but before the tasks it includes have begun execution. This allows for strategy detection before all tasks are executed, providing reference data for adjusting the task execution flow before execution begins.
[0055] In scenario two, the detection condition mentioned above could be that the business is in the task execution phase. The task execution phase can be understood as the stage of executing any task included in the business. For example, if a task is detected to be triggered, the business can be considered to be in the task execution phase, thus meeting the detection condition. This allows for policy detection during task execution, providing reference data for adjusting the task execution flow and facilitating dynamic adjustment of the execution flow during task execution.
[0056] Scenario 3: The detection condition mentioned above can be that the business is in the task completion stage. Here, "task completion stage" can be understood as the stage where any task included in the business has finished executing. For example, if the completion of a task is detected, the business can be considered to be in the task completion stage, thus satisfying the detection condition. This allows for policy detection after a task ends, providing reference data for adjusting the execution flow of subsequent tasks, thereby optimizing the execution flow of subsequent tasks.
[0057] The above adjustment strategy is a strategy used to adjust the execution process of tasks included in the business.
[0058] In one implementation, the adjustment strategy may include analytical strategies and decision-making strategies. Analytical strategies refer to strategies that analyze the task; decision-making strategies refer to strategies that adjust the task's execution flow based on the analysis results. The analysis results used by the decision-making strategies can be either the results obtained from task analysis using decision-making strategies or the results obtained from task analysis using analytical strategies.
[0059] Other forms of adjustment strategies will be described in subsequent embodiments and will not be detailed here.
[0060] The triggering timing mentioned above refers to the time when the adjustment strategy is triggered to execute. It can be set when the adjustment strategy is bound to the pipeline approach.
[0061] The triggering times for different adjustment strategies can be the same or different. The specific form of the triggering time will be introduced in subsequent embodiments, and will not be detailed here.
[0062] Step S202: If the execution conditions of the target adjustment strategy are met, execute the target adjustment strategy.
[0063] Once the triggering conditions for the target adjustment strategy are met, it means that the strategy can be triggered and executed. However, the execution of the target adjustment strategy may require certain execution conditions to be met. If the execution conditions are not met even after the triggering conditions are met, the target adjustment strategy will still be difficult to execute. Therefore, it is necessary to determine the execution conditions before executing the target adjustment strategy.
[0064] Given the above, the execution conditions for the target adjustment strategy are: the conditions that the target adjustment strategy needs to meet to execute. For example, the above execution conditions may include at least one of the following: the strategy on which the adjustment strategy depends has been executed, the data on which the adjustment strategy depends already exists, etc.
[0065] In one implementation, when executing a target adjustment strategy, the target adjustment strategy can be executed according to the execution process specified by the target adjustment strategy and the pre-configured parameter information.
[0066] Other implementation methods for the target adjustment strategy can be found in the following sections. Figure 4a The corresponding implementation examples will not be described in detail here.
[0067] Step S203: Based on the execution results of the target adjustment strategy, adjust the execution process of the tasks included in the business.
[0068] The execution results mentioned above may include: the task whose execution flow needs to be adjusted, the adjustment method, etc. The adjustment method may include: canceling the task, modifying the parameters used in the task execution flow, reusing the execution results of other tasks, etc.
[0069] In one implementation, the execution flow of the task whose execution flow needs to be adjusted can be adjusted according to the above adjustment method.
[0070] Step S204: Execute the tasks included in the business according to the adjusted execution flow.
[0071] As can be seen from the above, in the solution provided by this disclosure, the tasks included in the business are executed in a pipeline manner, and the pipeline manner is bound to an adjustment strategy. Thus, when executing a task, in response to initiating the pipeline execution of the tasks included in the business, the target adjustment strategy is detected and conditionally executed. Since the aforementioned target adjustment strategy is a strategy used to adjust the execution flow of the tasks included in the business, based on the execution result of the aforementioned target adjustment strategy, the execution flow of the tasks can be adjusted. Executing the tasks included in the business according to the adjusted execution flow allows the task execution process to change. Compared to executing tasks according to a fixed execution flow, the solution provided by this disclosure transforms the task execution process into a dynamic execution process, enriching the task execution flow, improving the flexibility of task execution, and thereby improving the efficiency of task execution.
[0072] In addition, the solution provided in this disclosure makes the task execution process a dynamic process. In this process, the number of invalid tasks, redundant tasks and other tasks that consume too many resources can be effectively reduced by implementing adjustment strategies, thereby improving the effective utilization rate of task execution resources.
[0073] The following describes other forms of adjustment strategies in step S201 above.
[0074] In one embodiment of this disclosure, the adjustment strategy may include at least one of the following strategies: task information analysis strategy, task skipping strategy, task sorting strategy, task cancellation strategy, and task execution result reuse strategy.
[0075] The task information analysis strategy is a strategy used to analyze task information, such as analyzing the source code used in the business and analyzing the execution process of the task.
[0076] The task skipping strategy is as follows: It's a strategy used to skip tasks; it's executed before a task is actually performed. During the execution of this strategy, it's determined whether the task needs to be executed. If not, the task is skipped.
[0077] The task sorting strategy is a strategy used to sort tasks; it is executed before executing multiple tasks of the same type. During the execution of this task sorting strategy, the tasks can be prioritized and processed in a queue according to the sorting results.
[0078] The task cancellation policy is as follows: It is a policy used to cancel the execution of a task; it is used to execute the task cancellation policy before or during task execution. During the execution of the above task cancellation policy, it is determined whether the task to be executed or the task currently being executed needs to be cancelled. If so, the task to be executed or the task currently being executed is cancelled.
[0079] The strategy for reusing task execution results is as follows: a strategy for reusing task execution results; and the strategy is executed before or during task execution. During the execution of the reuse strategy, it can be determined whether the task to be executed or the task currently being executed needs to use the execution results of other tasks. If so, the execution results of other tasks are reused.
[0080] The aforementioned other tasks may be other tasks included in the same business; in the case of executing multiple tasks included in multiple businesses in parallel, the aforementioned other tasks may also be tasks included in other businesses executed in parallel.
[0081] Since the adjustment strategy includes at least one of the following: task information analysis strategy, task skipping strategy, task sorting strategy, task cancellation strategy, and task execution result reuse strategy, the adjustment strategy is relatively rich, and the execution results obtained when the adjustment strategy is executed in the future are also relatively rich and comprehensive.
[0082] The adjustment strategy in step S201 above is a strategy pre-bound to the pipeline method corresponding to the business. Specifically, the strategy can be bound to the pipeline method as follows.
[0083] The strategy configurator can select the adjustment strategy stored in the strategy platform through the user interface provided by the task execution system, and set the trigger time, dependent strategies and other information for the selected adjustment strategy. The electronic device in the task execution system binds the selected adjustment strategy and the set information to the pipeline mode corresponding to the business.
[0084] In addition, policy configurators can also upload adjustment policies to the policy platform through the aforementioned user interface, and set information such as trigger timing and dependent policies of the selected policy for the uploaded adjustment policies. The electronic devices in the task execution system will bind the uploaded adjustment policies and the set information to the pipeline mode corresponding to the business.
[0085] The aforementioned strategy platform is used to store adjustment strategies. The specific structure of the task execution system can be found in subsequent embodiments, and will not be detailed here.
[0086] The triggering timing in step S201 above will be explained below.
[0087] In one embodiment of this disclosure, the triggering timing may include at least one of the following: before executing the first task included in the service, during the execution of the tasks included in the service, and after the execution of the tasks included in the service is completed.
[0088] When the adjustment strategy is triggered "before the execution of the first task included in the business," it indicates that the current process is one where the business has been started but the tasks included in the business have not yet begun execution. Since the adjustment strategy is triggered before all tasks begin execution, it can provide reference data for the task execution flow before the tasks begin. An adjustment strategy triggered "before the execution of the first task included in the business" is called a pre-emptive strategy.
[0089] When the triggering time for the adjustment strategy is "during the execution of tasks included in the business," it means that the above adjustment strategy can be triggered and executed during the execution of any task included in the business. Since the execution of the adjustment strategy is triggered during task execution, it provides reference data for the execution flow of tasks during task execution. The adjustment strategy with the triggering time "during the execution of tasks included in the business" is called a real-time strategy.
[0090] When the triggering time for the adjustment strategy is "after the completion of tasks included in the business process," it means that the above adjustment strategy can be triggered after any task included in the business process has been completed. Since the adjustment strategy is triggered after the task execution is completed, it provides reference data for the execution process of subsequent tasks. The adjustment strategy with the triggering time "after the completion of tasks included in the business process" is called a post-implementation strategy.
[0091] Since "before executing the first task included in the business" represents the stage before executing all tasks, "during executing the tasks included in the business" represents the stage of executing any task, and "after executing the tasks included in the business" represents the stage after executing any task, the above three stages are different stages of executing the tasks included in the business in a pipeline manner. Based on this, the adjustment strategy can be bound to each of the above stages, and the triggering time of the adjustment strategy can be set for each of the above stages. For example, the triggering time of the adjustment strategy can be: before the bound stage, during the bound stage, or after the bound stage.
[0092] Based on the above, the triggering granularity of the adjustment strategy can be considered to be the various stages mentioned above.
[0093] Furthermore, as can be seen from the above description, the process of executing business tasks in an assembly line manner can be divided into different stages, each of which can last for a period of time. Therefore, each stage can include multiple tasks.
[0094] Since the three triggering times—before the first task included in the execution of the business, during the execution of the tasks included in the business, and after the completion of the tasks included in the business—cover the complete execution process of the tasks included in the business in a pipeline manner, the target adjustment strategy that satisfies the above triggering times is distributed throughout the complete execution process of the tasks included in the business. Therefore, based on the above target adjustment strategy, the execution flow of tasks in the complete execution process can be adjusted.
[0095] In pipelined adjustment strategies, there may be dependencies between them. For any given adjustment strategy, if a dependent adjustment strategy has not been completed, that strategy cannot be executed immediately. Therefore, based on these dependencies, it can be determined whether the detected target adjustment strategy can be executed. Based on this, in one embodiment of this disclosure, see... Figure 3a A flowchart illustrating the second task execution method is provided. In this embodiment, in the above... Figure 2 In the illustrated embodiment, in response to initiating the execution of tasks included in a pipelined manner, the following step S306 may also be included. Furthermore, based on step S306, the above... Figure 2 Step S202 shown can be implemented according to the following steps S302-S303.
[0096] Specifically, Figure 3a The illustrated embodiment includes the following steps S301-S306.
[0097] Step S301: In response to starting the execution of tasks included in the business in a pipeline manner, if the preset detection conditions are met, check whether there is a target adjustment strategy that meets the trigger timing in the adjustment strategy already bound in the pipeline manner. If there is, execute step S302.
[0098] The aforementioned adjustment strategy is a strategy used to adjust the execution process of tasks included in the business.
[0099] The above step S301 and the above Figure 2 The steps shown in step S201 are the same and will not be repeated here.
[0100] Step S306: Obtain the policy chain that reflects the dependencies between the adjustment policies that are already bound in the pipeline mode.
[0101] The above strategy chain can include nodes and the connection relationships between nodes. Nodes are used to represent adjustment strategies, and the connection relationships between nodes are used to represent the dependencies between adjustment strategies.
[0102] by Figure 3b For example, Figure 3b A policy link is shown. Figure 3b The policy chain shown includes four nodes: A, B, C, and D. The adjustment policies represented by A, B, C, and D are policy 1, policy 2, policy 3, and policy 4, respectively. The arrows between the nodes indicate the dependencies between the adjustment policies represented by the nodes.
[0103] exist Figure 3b In the diagram, both A and B point to C, indicating that the dependency relationship between strategy 3 and strategies 1 and 2 is: strategy 3 depends on strategies 1 and 2, that is, strategy 3 can only be executed after strategies 1 and 2 have been executed.
[0104] C points to D, indicating that the dependency relationship between strategy 3 and strategy 4 is: strategy 4 depends on strategy 3, that is, strategy 4 can only be executed after strategy 3 has been executed.
[0105] There can be multiple policy links. In one implementation, the adjustment policies bound in a pipeline manner can correspond to the tasks included in the business. Based on this, each policy link can be a link for each task included in the business, reflecting the dependencies between the adjustment policies corresponding to the targeted tasks.
[0106] Since the above adjustment strategies can correspond to the tasks included in the business, when binding adjustment strategies to the pipeline approach, they can be specifically bound to each task. Based on this, the triggering time of the adjustment strategy can also be the triggering time of the task, so the granularity of the triggering time can be considered as the task.
[0107] The aforementioned policy links can be pre-generated, so that they are directly obtained after the tasks included in the business are started. Alternatively, the aforementioned policy links can also be generated in real time after the tasks included in the business are started.
[0108] Specifically, when generating the above policy links, the dependencies between the adjustment policies already bound to the pipeline can be determined first, and then the policy links can be generated based on the determined dependencies.
[0109] The dependencies between the above adjustment strategies can be determined in the following two different ways:
[0110] In the first implementation, if other adjustment strategies that the adjustment strategy depends on have been configured, the adjustment strategy will have configuration information. Based on the configuration information, the dependency relationship between the adjustment strategy and other adjustment strategies can be determined.
[0111] For example, the configuration information of the adjustment strategy settings includes the policy identifiers of other adjustment strategies that it depends on. The policy identifiers of other adjustment strategies that the adjustment strategy depends on are obtained from the above configuration information. Based on the obtained policy identifiers, the dependency relationship between the above adjustment strategy and other adjustment strategies is determined.
[0112] In the second implementation, if no other adjustment strategies are configured for the adjustment strategy, the data required to execute the adjustment strategy can be obtained. If the above data can be generated by other adjustment strategies, it is determined that the above other adjustment strategies are the strategies on which the adjustment strategy depends, thereby determining the dependency relationship between the adjustment strategy and other adjustment strategies.
[0113] Step S302: Based on the policy chain, determine the dependent policies of the target adjustment policy.
[0114] The aforementioned dependency strategy refers to the adjustment strategy upon which the target adjustment strategy depends.
[0115] In one implementation, when determining the dependency strategy, the node corresponding to the target adjustment strategy in the strategy chain can be determined, and the adjustment strategies represented by other nodes pointing to that node can be determined as the dependency strategies of the target adjustment strategy.
[0116] The following is in conjunction with the above. Figure 3b Explain the process of determining the dependency strategy. Assume that the target adjustment strategy is... Figure 3b The corresponding node in the policy chain shown is C, and the nodes pointing to C are A and B. A and B represent policies 1 and 2 respectively. Therefore, it can be determined that policies 1 and 2 are dependent policies of policy 3.
[0117] Step S303: After the dependency strategy has been executed, execute the target adjustment strategy.
[0118] If the dependency strategy has not been completed, you can wait for the above dependency strategy to be completed before executing the target adjustment strategy.
[0119] If the dependency strategy has been completed, then the above target adjustment strategy will be executed directly.
[0120] Step S304: Based on the execution results of the target adjustment strategy, adjust the execution process of the tasks included in the business.
[0121] Step S305: Execute the tasks included in the business according to the adjusted execution flow.
[0122] Steps S304-S305 above are respectively related to the above... Figure 2 Steps S203 and S204 shown are the same and will not be repeated here.
[0123] As can be seen from the above, since the dependent strategy is the adjustment strategy that the target adjustment strategy depends on, if the adjustment strategy it depends on has not been executed, the adjustment strategy cannot be executed temporarily. Therefore, the target adjustment strategy is executed after the dependent strategy has been executed, so that the target adjustment strategy can be executed successfully.
[0124] Furthermore, since the policy chain reflects the dependencies between adjustment policies, the dependent policies of the target adjustment policy can be accurately determined based on the policy chain described above.
[0125] In addition to the above, Figure 2 In addition to the execution target adjustment strategy mentioned in step S202 of the embodiments, it can also be done as follows: Figure 4a The target adjustment strategy is executed in the manner mentioned in the illustrated embodiments. In one embodiment of this disclosure, see [link to relevant documentation]. Figure 4a A flowchart illustrating a third task execution method is provided. In this embodiment, in the above... Figure 2 When implementing the target adjustment strategy in the illustrated embodiment, it can be done according to the following steps S402-S403.
[0126] Specifically, Figure 4a The illustrated embodiment includes the following steps S401-S405.
[0127] Step S401: In response to starting the execution of tasks included in the business in a pipeline manner, if the preset detection conditions are met, check whether there is a target adjustment strategy that meets the trigger timing in the adjustment strategy already bound in the pipeline manner. If there is, execute step S402.
[0128] The aforementioned adjustment strategy is a strategy used to adjust the execution process of tasks included in the business.
[0129] The above step S401 and the above Figure 2 The steps shown in step S201 are the same and will not be repeated here.
[0130] Step S402: If the execution conditions of the target adjustment strategy are met, the target adjustment strategy is invoked from the strategy platform, and the configuration data required to execute the target adjustment strategy is obtained from the data platform.
[0131] The aforementioned strategy platform is used to store adjustment strategies.
[0132] The aforementioned data platform is used to store the configuration data required when the adjustment strategy of the storage strategy platform is executed.
[0133] When invoking a target adjustment strategy, the strategy with the target identifier can be read from the strategy platform and used as the target adjustment strategy. The configuration data corresponding to the target adjustment strategy can also be read from the data platform.
[0134] Step S403: Execute the target adjustment strategy based on the configuration data.
[0135] Step S404: Based on the execution results of the target adjustment strategy, adjust the execution process of the tasks included in the business.
[0136] Step S405: Execute the tasks included in the business according to the adjusted execution flow.
[0137] Steps S404-S405 above are respectively related to the above... Figure 2 Steps S203 and S204 shown are the same and will not be repeated here.
[0138] As can be seen from the above, the strategy platform stores the strategies, while the data platform stores the configuration data required by the strategies. This allows for the storage of different data types in different platforms, facilitating the management of various data types. Furthermore, since each platform stores data of a specific type, when retrieving data from a platform, only that type of data can be retrieved from that platform. Compared to retrieving data from a platform that stores all types of data, this effectively reduces the risk of errors during data retrieval.
[0139] Taking electronic devices as an example in building the middleware platform, the following will combine... Figure 4b This section describes the task execution system, which includes a construction platform, a data platform, and a strategy platform. Figure 4b This is a schematic diagram of the structure of a task execution system provided in an embodiment of this disclosure.
[0140] The strategy platform is used to store adjustment strategies; the data platform is used to store the configuration data required by the strategies stored in the strategy platform; and the construction platform integrates multiple services, including: task execution service, strategy execution service, problem handling service, strategy testing service, and strategy feature analysis service.
[0141] When an electronic device calls the aforementioned task execution service to execute tasks included in the business, it can call other services integrated in the construction platform according to the specific circumstances of the task execution. If a strategy needs to be executed during the process of calling other services, the electronic device calls the required strategy from the strategy platform and obtains the configuration data required for the aforementioned strategy from the data platform. Based on the aforementioned configuration data, the aforementioned strategy is executed.
[0142] As can be seen from the above, in the task execution system, operations such as strategy testing and strategy analysis can be performed by electronic devices. When configuring strategies, strategy developers do not need to waste energy on debugging and effect observation, nor do they need to consider other matters besides configuring strategies. They can focus on the development of strategy content, which reduces strategy development to script development, reduces the cost required for strategy configuration, and lowers the threshold for strategy configuration.
[0143] During task execution, if the task plugin used is of poor quality, the business source code is defective, or the network environment is poor, some problems may occur during task execution. To solve the above problems, in one embodiment of this disclosure, see [link to relevant documentation]. Figure 5a A flowchart illustrating the fourth task execution method is provided. In this embodiment, in the above... Figure 2 After the target adjustment strategy is executed in the illustrated embodiment, the following steps S505-S507 are included.
[0144] Specifically, Figure 5a This includes the following steps S501-S507.
[0145] Step S501: In response to initiating the execution of tasks included in the business in a pipeline manner, if the preset detection conditions are met, check whether there is a target adjustment strategy that meets the trigger timing among the adjustment strategies already bound in the pipeline manner. If it exists, proceed to step S502.
[0146] The adjustment strategy is a strategy used to adjust the execution process of tasks included in the business.
[0147] Step S502: If the execution conditions of the target adjustment strategy are met, execute the target adjustment strategy.
[0148] The above steps S501-S502 are respectively related to the above... Figure 2 In the illustrated embodiment, steps S201 and S202 are the same and will not be described again here.
[0149] Step S505: Receive the start command for the problem handling service.
[0150] The aforementioned startup command can be generated by a device capable of invoking problem handling services.
[0151] Specifically, the aforementioned devices can be: electronic devices, devices in the plug-in center, devices in the pipeline platform, etc. Among them, devices in the plug-in center store the plug-ins required to execute tasks, and devices in the pipeline platform provide services that need to be implemented in a pipeline manner.
[0152] Step S506: Execute the configured problem handling strategies according to the execution order of the problem handling strategies configured in the problem handling service, and obtain the processing results.
[0153] The above problem-solving strategies are strategies used to handle problems that occur during task execution.
[0154] The aforementioned problem-handling strategy can be determined from the various alternative strategies already configured in the problem-handling service.
[0155] In one embodiment of this disclosure, the problem handling strategy may include at least one of the following strategies: problem analysis strategy, problem handling priority determination strategy, problem labeling strategy, problem self-healing strategy, problem distribution strategy, and problem reporting strategy. Detailed descriptions of each of the above strategies can be found in subsequent embodiments and will not be elaborated upon here.
[0156] The execution order of problem-solving strategies can be determined based on the dependencies between them. The methods for determining these dependencies can be found above. Figure 3a The method for determining the dependencies of the adjustment strategy in the illustrated embodiment will not be described in detail here.
[0157] The above processing results may include: the cause of the problem and the solution. For example: the cause of the problem is: there is a problem with the business source code; the solution is: adjust the business source code. The cause of the problem is: there is a problem with the task plugin for a certain task; the solution is: replace the task plugin.
[0158] Step S507: Based on the processing results, address any issues in the execution process of the tasks included in the business execution.
[0159] Specifically, the problem can be located based on the reasons included in the processing results, and the processing methods included in the processing results can be used to handle the problem.
[0160] In one implementation, problem handling can be achieved in the following manner:
[0161] After receiving the processing results, the electronic device reports them to the problem location function unit. This unit then analyzes the results to pinpoint problems in the task execution process, thus enabling problem reporting. The problem location function unit can then forward the identified problems to the problem handling function unit, which can then address the issues specifically encountered in the task execution process, thereby enabling problem distribution.
[0162] The aforementioned problem location and problem processing functional units can be functional units of electronic devices or functional units of other devices in the task execution system.
[0163] The execution results of the target-based adjustment strategy address problems in the execution process of tasks included in the business, which may involve adjusting the task execution process, such as skipping tasks, canceling tasks, or determining task priorities. Therefore, the execution results of the above problem-solving strategies affect the execution process of tasks executed in a pipeline manner.
[0164] When the execution process of the tasks included in the business is relatively complex, electronic devices provide problem handling services. Based on the execution results of the problem handling strategies configured in the problem handling services, the execution process of the tasks included in the business can be adjusted and the existing problems can be handled, so that the problem handling process can form a closed loop. The above-mentioned problem handling service can also be called problem closed loop service.
[0165] Step S503: Based on the execution results of the target adjustment strategy, adjust the execution process of the tasks included in the business.
[0166] Step S504: Execute the tasks included in the business according to the adjusted execution flow.
[0167] The above steps S503-S504 are respectively related to the above... Figure 2 In the illustrated embodiment, steps S203 and S204 are the same and will not be repeated here.
[0168] As can be seen from the above, upon receiving the start command for the problem handling service, the problem handling strategies are executed according to their execution order. Since the problem handling strategies are used to handle problems that occur during task execution, the results of executing these strategies can address problems in the execution flow of the tasks included in the business process. Compared to manual problem handling, this significantly improves the efficiency of problem handling.
[0169] In one embodiment of this disclosure, the problem handling strategy in step S506 may include at least one of the following strategies: problem analysis strategy, problem handling priority determination strategy, problem labeling strategy, problem self-healing strategy, problem distribution strategy, and problem reporting strategy.
[0170] Among them, the problem analysis strategy is a strategy used to analyze the problems that occur during task execution.
[0171] The problem labeling strategy is a strategy used to label problems that occur during task execution.
[0172] The problem prioritization strategy is a strategy used to determine the priority of processing multiple problems.
[0173] The problem self-healing strategy is a strategy used to automatically repair problems that occur during task execution.
[0174] The problem assignment strategy is a strategy used to assign problems existing in the task execution process to the problem handling functional unit. This problem handling functional unit can be a functional unit of an electronic device, a functional unit of another device in the task execution system, or a functional unit of a device within the problem handling system.
[0175] The problem reporting strategy can be: to report the processing results to the problem location function unit. This problem location function unit can be a function unit of an electronic device, a function unit of other devices in the task execution system, or a function unit of a device in the problem recording system.
[0176] Because problem handling strategies include at least one of the following: problem analysis strategy, problem handling priority determination strategy, problem labeling strategy, problem self-healing strategy, problem distribution strategy, and problem reporting strategy, the problem handling strategies are relatively rich, and the processing results obtained when the problem handling strategies are subsequently executed are also relatively rich and comprehensive.
[0177] The following combination Figure 5b The process of handling the above problems will be explained.
[0178] Figure 5b This is a schematic diagram of the structure of a problem handling system provided in an embodiment of this disclosure. From top to bottom, the first layer represents the problem handling strategy configured by the problem handling service, the second layer represents the components used to execute the problem handling strategy, and the third layer includes a data platform and an alarm component.
[0179] In the first layer, problem handling strategies include: problem analysis strategy, problem handling priority determination strategy, problem labeling strategy, and problem self-healing strategy.
[0180] The process of implementing the problem analysis strategy includes several steps: obtaining submission information, system analysis, intelligent analysis, and classification labeling.
[0181] Among them, "receiving submission information" means receiving the start command of the problem handling service; "system analysis" means conducting a complete and systematic analysis of the task execution process; "intelligent analysis" means using deep learning to perform analysis; and "classification label" means determining and identifying the type of problem.
[0182] The process of implementing the problem handling priority determination strategy includes the following steps: obtaining classification and source information, priority strategy, distribution queuing, and initiating sub-services.
[0183] Among them, obtaining classification and source information means obtaining the type of problem and the cause of the problem; priority strategy means determining the priority order of each problem; distribution queuing means queuing the processing order of each problem based on the priority order of each problem; initiating sub-service means processing the problem based on the problem processing order.
[0184] The process of implementing the issue labeling strategy includes several steps: obtaining information, requesting the log management system, reporting the issue, and relabeling & self-healing.
[0185] Among them, "Get Information" means receiving the start command of the problem handling service; "Request Log Management System" means sending a problem handling request to the log management system; "Problem Reporting" means sending the detected problem to the electronic device; and "Label & Self-Healing" means labeling, self-healing and repairing the problem.
[0186] The process of implementing the self-healing strategy includes steps such as configuration loading, data assembly, deduplication filtering, and problem reporting.
[0187] Among them, configuration loading means loading the configuration data required to handle the problem; data assembly means assembling the configuration data required to handle the problem; deduplication filtering means deduplicating the results of problem handling; and problem reporting means sending the detected problem to the electronic device.
[0188] In the second layer, the components include a policy management component, a deduplication filtering component, and a problem card template component. Each component includes various tools.
[0189] The strategy management component is further divided into a strategy analysis management component and a strategy positioning management component.
[0190] The management components of the analysis strategy include problem feature analysis tools, risk assessment tools, problem prioritization analysis tools, and tools for building analysis recommendations.
[0191] Among them, the problem feature analysis tool is used to analyze the characteristics of the problem; the risk prediction tool is used to predict the risks caused by the problem; the problem priority analysis tool is used to prioritize the problems; and the analysis suggestion tool is used to make suggestions on the execution process of the task that has the problem.
[0192] The management components of the location strategy include problem location tools, repair suggestion tools, precise alarm tools, and automatic repair tools.
[0193] Among them, the problem location tool is used to locate the problem; the repair suggestion tool is used to determine how to modify the problem; the precise alarm tool is used to issue an alarm for the problem; and the automatic repair tool is used to repair the problem.
[0194] The deduplication filtering component includes a problem type identification tool, a problem feature analysis tool, a unique identifier calculation tool, and a system deduplication tool.
[0195] Among them, the problem type identification tool is used to identify the type of problem; the problem feature analysis tool is used to analyze and obtain the characteristics of the problem; the unique identifier calculation tool is used to determine the identifier of the problem; and the system deduplication tool is used to deduplicate the causes of the problem.
[0196] The issue card template component includes a template configuration tool, a template parsing tool, a content filling tool, and a reporting card tool.
[0197] The template configuration tool is used to configure the template for the issue card; the template parsing tool is used to parse the template for the issue card; the content filling tool is used to fill the content of the issue card; and the reporting card tool is used to send the configured issue card to the electronic device.
[0198] The third layer includes a data platform and alarm components.
[0199] The data platform is used to store feature data, which includes: code features of the initial business code, strategy features of adjustment strategies, strategy features of problem handling strategies, plugin features, and business features.
[0200] The alarm component is used to generate alarms. It includes an email alarm tool, a data monitoring tool, a plugin necessary field monitoring tool, and a card creation and content replacement monitoring tool.
[0201] Among them, the email alert tool is used to send alerts via email; the data monitoring tool is used to monitor the data generated during the problem handling process; the plugin necessary field monitoring tool is used to monitor the necessary fields of the plugin when using the plugin; and the card creation and content replacement monitoring tool is used to monitor the process of creating and replacing the content of the problem card.
[0202] Specifically, during the problem-handling process, each problem-handling strategy can be executed in the order outlined in the first layer. During the execution of these strategies, the components included in the second layer can be invoked. After the problem is resolved, subsequent problem alerts can be generated based on the alarm component in the third layer, and the characteristics of the data generated throughout the problem-handling process can be stored in the data platform.
[0203] To improve the stability of task execution, in one embodiment of this disclosure, the system architecture used by the task execution system can be a microservice architecture, and a business assurance mechanism is added to this microservice architecture to effectively ensure the stability of the business operation process.
[0204] The aforementioned business protection mechanisms include: load balancing mechanism, timeout circuit breaker mechanism, monitoring & log collection scheme, caching mechanism, business degradation measures, cache update mechanism, policy exception retry mechanism, and system fallback conflict handling mechanism.
[0205] The following is combined with Figure 6 The microservice architecture described above will be explained.
[0206] Figure 6 This is a schematic diagram of a microservice architecture provided in an embodiment of the present disclosure. Figure 6 This includes building a middle platform, task scheduling, a registration center, a monitoring system, a logging system, a Redis (Remote Dictionary Server) cluster, an XDB (Xbase Database), and an OS (Object Storage).
[0207] A middle platform is built to execute business tasks in a pipeline manner. This middle platform includes multiple business assurance mechanisms, such as cache update mechanisms, policy exception retry mechanisms, task timeout mechanisms, and system fallback conflict handling mechanisms.
[0208] The system includes a cache update mechanism for updating data in the cache, a policy exception retry mechanism for re-executing policies that have encountered exceptions, a task timeout mechanism for determining timeout situations that occur during task execution, and a system fallback conflict handling mechanism for handling conflicts that arise between tasks.
[0209] Task scheduling is used to schedule various tasks. Task scheduling also includes multiple business assurance mechanisms, such as task distribution mechanisms, timeout circuit breaker mechanisms, and degradation mechanisms.
[0210] The task distribution mechanism is used to cache task execution data; the timeout circuit breaker mechanism is used to handle tasks that time out; and the degradation mechanism is used to handle service anomalies and key business operations.
[0211] The registry center includes a Zookeeper (a reliable coordination system for distributed systems) cluster for service registration and discovery; a monitoring system for tracing and monitoring alerts; and a logging system for collecting logs.
[0212] Redis cluster is used for caching data. XDB is used for storing business data. OS is used for object storage.
[0213] Microservice architecture uses Dubbo (an open-source distributed service framework) to achieve load balancing and timeout circuit breaking.
[0214] The following is combined with Figure 7a , Figure 7b The present disclosure provides a detailed description of the task execution method provided in the embodiments.
[0215] Figure 7a This is a flowchart illustrating the fifth task execution method provided in this embodiment of the disclosure. Figure 7a This includes the following steps S701-S710.
[0216] Step S701: Start the tasks included in the business process to be executed in a pipeline manner.
[0217] Step S702: Determine whether the above pipeline method is bound to an adjustment strategy. If yes, proceed to step S703; otherwise, end the process.
[0218] Step S703: Obtain the policy link that reflects the dependencies between the adjustment policies that are already bound in the pipeline mode.
[0219] Step S704: Based on the above policy chain, call and execute each adjustment policy in sequence.
[0220] Step S705: Assemble and analyze the strategy results of the execution strategy.
[0221] The analysis results include tasks skipped, tasks canceled, and tasks queued.
[0222] Step S706: Determine whether the plugin for the pending task needs to be triggered. If yes, proceed to step S707; otherwise, end the process.
[0223] Step S707: Trigger the above plugin to execute the task.
[0224] Step S708: After the task is completed, determine whether a problem handling strategy has been configured. If yes, proceed to step S709.
[0225] Step S709: Execute the problem handling strategy and obtain the problem handling result.
[0226] In this process, if the problem handling strategy is synchronous, wait for all problem handling strategies to be executed before obtaining the problem handling result.
[0227] Step S710: Based on the problem processing results, process the problem.
[0228] Figure 7b This is a schematic diagram of the task execution method framework. Figure 7b The system is divided into three layers from top to bottom: the first layer includes the operations required to implement the business process, the second layer includes the strategies used to execute the operations in the first layer, and the third layer includes the feature set.
[0229] In the first layer, the operations required to realize the business process include: feature analysis and calculation, task scheduling and execution, risk analysis and calculation, and intelligent problem closure.
[0230] Feature analysis and computation are used to analyze the characteristics of the task. Feature analysis and computation includes the following steps: obtaining submission information, request strategy, feature assembly, and code feature storage.
[0231] Specifically, the process includes: obtaining submission information (used to receive initial data that triggers business implementation, such as source code); request strategy (used to request feature analysis strategy); feature assembly (used to assemble the analyzed features); and code feature storage (used to store the analyzed features into the feature set in the third layer).
[0232] Task scheduling and execution is used to schedule tasks. Task scheduling and execution includes the following steps: obtaining task characteristics, request strategy, task decision, and initiating service.
[0233] Specifically, the functions are: acquire task characteristics, used to acquire the characteristics of the tasks included in the business; request strategy, used to request task scheduling strategy; task decision, used to determine how to adjust the task execution process; and initiate service, used to initiate task execution service.
[0234] Risk analysis calculations are used to analyze the risks that may arise during task execution. Risk analysis calculations include steps such as result collection, request strategy, risk report reorganization, and issue reporting.
[0235] Specifically, the system includes: a results collection module to obtain the execution results of tasks included in the business execution; a request strategy module to request risk analysis and calculation strategies; a risk report reorganization module to reorganize risk results; and a problem reporting module to send problems to electronic devices.
[0236] The intelligent problem-solving loop is used to handle problems that occur during task execution. The intelligent problem-solving loop includes steps such as task information collection, request strategy, report reorganization, and alarm sending.
[0237] Specifically, the task information collection is used to obtain information about the tasks included in the business; the request strategy is used to request the intelligent closed-loop calculation strategy for the problem; the reorganization report is used to reorganize the problem; and the alarm sending is used to send alarm information for the problem that has occurred.
[0238] During the operations at the first layer, the strategies included in the second layer can be invoked.
[0239] The above strategies include: feature calculation strategy, task skipping strategy, task priority queuing strategy, analysis strategy, and location strategy.
[0240] The feature calculation strategy is used for feature analysis. The execution of the feature calculation strategy may include steps such as lone function analysis, risk-free function analysis, tag extraction, and risk level analysis.
[0241] A task skipping strategy is used to determine which tasks need to be skipped. Executing a task skipping strategy can include steps such as risk-free skipping, intra-stage repeated skipping, inter-stage repeated skipping, and invalid skipping.
[0242] Specifically, risk-free skip refers to skipping tasks that are risk-free; intra-stage repeat skip refers to skipping tasks that are repeated within the same stage; inter-stage repeat skip refers to skipping tasks that are repeated across different stages; and invalid skip refers to canceling tasks that have already been skipped.
[0243] Task priority queuing strategies are used to determine the priority of task execution. The process of implementing a task priority queuing strategy may include steps such as estimating queuing time, estimating problem detection capability, priority factors, and circuit breaker decisions.
[0244] Specifically, estimated queuing time refers to the estimated processing time of a task; estimated problem detection capability refers to the estimated problems that may occur during task execution; priority factor refers to the priority factor corresponding to a task; and circuit breaker judgment refers to determining whether task execution has timed out and deciding whether circuit breaking is necessary based on the determined result.
[0245] An analysis strategy is used to analyze a task. The execution of an analysis strategy may include steps such as risk report restructuring, risk assessment, problem closure, and supplementary suggestions.
[0246] Specifically, risk report restructuring refers to restructuring the obtained risk results; risk assessment refers to predicting the risks that may occur during task execution; problem closure refers to handling the problems that may occur during task execution; and supplementary construction suggestions refer to proposing remediation suggestions for the problems that occur during task execution.
[0247] The problem localization strategy is used to locate the problem. The execution of the localization strategy may include steps such as problem localization, remediation suggestions, precise alerts, and automatic repair.
[0248] Specifically, problem localization refers to locating the problems that occur during task execution; repair suggestions refer to determining the repair methods for fixing the problems; precise alerts refer to issuing alerts for the problems; and automatic repair refers to automatically repairing the problems.
[0249] The third layer of features stores feature data for various types of information, including tasks involved in the business, code used in business implementation, and functions used for feature analysis. These feature data may include: isolated functions, connectivity between tasks, code diffs (code modifications), auxiliary code, code that does not change behavior, task name, task type, task stage, historical task execution time, task stability, historical task queuing, task error types, submission risk dimensions, structured report data, code submitter, and priority of related submission requirements.
[0250] Corresponding to the above-described task execution method, this disclosure also provides a task execution device.
[0251] See Figure 8 , Figure 8 This is a schematic diagram of the structure of a first task execution device provided in an embodiment of the present disclosure. The device includes the following modules 801-804.
[0252] The strategy detection module 801 is used to respond to the start of the task included in the business in a pipeline manner. If the preset detection conditions are met, it detects whether there is a target adjustment strategy that meets the triggering time among the adjustment strategies that are already bound in the pipeline manner. If there is, it triggers the first strategy execution module 802. The adjustment strategy is a strategy used to adjust the execution flow of the task included in the business.
[0253] The first strategy execution module 802 is used to execute the target adjustment strategy when the execution conditions of the target adjustment strategy are met;
[0254] The process adjustment module 803 is used to adjust the execution process of the tasks included in the business based on the execution result of the target adjustment strategy.
[0255] The task execution module 804 is used to execute the tasks included in the business according to the adjusted execution flow.
[0256] As can be seen from the above, in the solution provided by this disclosure, the tasks included in the business are executed in a pipeline manner, and the pipeline manner is bound to an adjustment strategy. Thus, when executing a task, in response to initiating the pipeline execution of the tasks included in the business, the target adjustment strategy is detected and conditionally executed. Since the aforementioned target adjustment strategy is a strategy used to adjust the execution flow of the tasks included in the business, based on the execution result of the aforementioned target adjustment strategy, the execution flow of the tasks can be adjusted. Executing the tasks included in the business according to the adjusted execution flow allows the task execution process to change. Compared to executing tasks according to a fixed execution flow, the solution provided by this disclosure transforms the task execution process into a dynamic execution process, enriching the task execution flow, improving the flexibility of task execution, and thereby improving the efficiency of task execution.
[0257] See Figure 9 , Figure 9 This is a schematic diagram of the structure of a second task execution device provided in an embodiment of the present disclosure. The device includes the following modules 901-906.
[0258] The strategy detection module 901 is used to respond to the start of the task included in the business to be executed in a pipeline manner. If the preset detection conditions are met, it detects whether there is a target adjustment strategy that meets the triggering time among the adjustment strategies that are already bound in the pipeline manner. If there is, the trigger strategy determination submodule 902 is triggered. The adjustment strategy is a strategy used to adjust the execution flow of the task included in the business.
[0259] The above module 901 and Figure 8 The module 801 in the illustrated embodiment is the same.
[0260] Link acquisition module 906 is used to obtain policy links reflecting the dependencies between adjustment policies that are bound by the pipeline in response to the initiation of tasks including the execution of services in a pipeline manner.
[0261] The strategy determination submodule 902 is used to determine the dependent strategies of the target adjustment strategy based on the strategy chain;
[0262] The first strategy execution submodule 903 is used to execute the target adjustment strategy after the dependent strategy has been executed.
[0263] The process adjustment module 904 is used to adjust the execution process of the tasks included in the business based on the execution result of the target adjustment strategy.
[0264] The task execution module 905 is used to execute the tasks included in the business according to the adjusted execution flow.
[0265] The above modules 904-905 and Figure 8 Modules 803-804 are the same in the illustrated embodiment.
[0266] As can be seen from the above, since the dependent strategy is the adjustment link on which the target adjustment strategy depends, if the adjustment strategy on which it depends has not been executed, the adjustment strategy cannot be executed temporarily. Therefore, the target adjustment strategy is executed after the dependent strategy has been executed, so that the target adjustment strategy can be executed successfully.
[0267] Furthermore, since the policy chain reflects the dependencies between adjustment policies, the dependent policies of the target adjustment policy can be accurately determined based on the policy chain described above.
[0268] See Figure 10 , Figure 10 This is a schematic diagram of the structure of a third task execution device provided in an embodiment of the present disclosure. The device includes the following modules 1001-1005.
[0269] The strategy detection module 1001 is used to respond to the start of the task included in the business in a pipeline manner. If the preset detection conditions are met, it detects whether there is a target adjustment strategy that meets the trigger timing among the adjustment strategies that are already bound in the pipeline manner. If there is, the trigger information calls the submodule 1002. The adjustment strategy is a strategy used to adjust the execution flow of the task included in the business.
[0270] The above module 1001 and Figure 8 The module 801 in the illustrated embodiment is the same.
[0271] The information retrieval submodule 1002 is used to retrieve the target adjustment strategy from the strategy platform and obtain the configuration data required to execute the target adjustment strategy from the data platform, wherein the strategy platform is used to store strategies and the data platform is used to store the configuration data required to the strategies stored in the strategy platform;
[0272] The second strategy execution submodule 1003 is used to execute the target adjustment strategy based on the configuration data;
[0273] The process adjustment module 1004 is used to adjust the execution process of the tasks included in the business based on the execution result of the target adjustment strategy.
[0274] The task execution module 1005 is used to execute the tasks included in the business according to the adjusted execution flow.
[0275] The above modules 1004-1005 and Figure 8 Modules 803-804 are the same in the illustrated embodiment.
[0276] As can be seen from the above, the strategy platform stores the strategies, while the data platform stores the configuration data required by the strategies. This allows for the storage of different data types in different platforms, facilitating the management of various data types. Furthermore, since each platform stores data of a specific type, when retrieving data from a platform, only that type of data can be retrieved from that platform. Compared to retrieving data from a platform that stores all types of data, this effectively reduces the risk of errors during data retrieval.
[0277] See Figure 11 , Figure 11 This is a schematic diagram of the structure of a fourth task execution device provided in an embodiment of the present disclosure. The device includes the following modules 1101-1107.
[0278] The strategy detection module 1101 is used to respond to the start of the task included in the business to be executed in a pipeline manner. If the preset detection conditions are met, it detects whether there is a target adjustment strategy that meets the triggering time among the adjustment strategies that are bound in the pipeline manner. If there is, it triggers the first strategy execution module 1102. The adjustment strategy is a strategy for adjusting the execution flow of the task included in the business.
[0279] The first strategy execution module 1102 is used to execute the target adjustment strategy when the execution conditions of the target adjustment strategy are met;
[0280] The above modules 1101-1102 and Figure 8 Modules 801-802 are the same in the illustrated embodiment.
[0281] The instruction receiving module 1105 is used to receive a start instruction for the problem handling service after the first strategy execution module executes the target adjustment strategy;
[0282] The second strategy execution module 1106 is used to execute the configured problem handling strategies according to the execution order of the problem handling strategies configured in the problem handling service, and obtain the processing results;
[0283] Problem handling module 1107 is used to handle problems existing in the execution process of the tasks included in the execution of the business based on the processing result;
[0284] The process adjustment module 1103 is used to adjust the execution process of the tasks included in the business based on the execution result of the target adjustment strategy.
[0285] The task execution module 1104 is used to execute the tasks included in the business according to the adjusted execution flow.
[0286] The above modules 1103-1104 and Figure 8 Modules 803-804 are the same in the illustrated embodiment.
[0287] As can be seen from the above, upon receiving the start command for the problem handling service, the problem handling strategies are executed according to their execution order. Since the problem handling strategies are used to handle problems that occur during task execution, the results of executing these strategies can address problems in the execution flow of the tasks included in the business process. Compared to manual problem handling, this significantly improves the efficiency of problem handling.
[0288] In one embodiment of this disclosure, the above-mentioned problem handling strategy includes at least one of the following strategies: problem analysis strategy, problem handling priority determination strategy, problem labeling strategy, problem self-healing strategy, problem distribution strategy, and problem reporting strategy.
[0289] Because problem handling strategies include at least one of the following: problem analysis strategy, problem handling priority determination strategy, problem labeling strategy, problem self-healing strategy, problem distribution strategy, and problem reporting strategy, the problem handling strategies are relatively rich, and the processing results obtained when the problem handling strategies are subsequently executed are also relatively rich and comprehensive.
[0290] In one embodiment of this disclosure, the triggering timing includes at least one of the following: before executing the first task included in the service, during the execution of the task included in the service, and after the execution of the task included in the service is completed.
[0291] Since the three triggering times—before the first task included in the execution of the business, during the execution of the tasks included in the business, and after the completion of the tasks included in the business—cover the complete execution process of the tasks included in the business in a pipeline manner, the target adjustment strategy that satisfies the above triggering times is distributed throughout the complete execution process of the tasks included in the business. Therefore, based on the above target adjustment strategy, the execution flow of tasks in the complete execution process can be adjusted.
[0292] In one embodiment of this disclosure, the adjustment strategy includes at least one of the following strategies: task information analysis strategy, task skipping strategy, task sorting strategy, task cancellation strategy, and task execution result reuse strategy.
[0293] Since the adjustment strategy includes at least one of the following: task information analysis strategy, task skipping strategy, task sorting strategy, task cancellation strategy, and task execution result reuse strategy, the adjustment strategy is relatively rich, and the execution results obtained when the adjustment strategy is executed in the future are also relatively rich and comprehensive.
[0294] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0295] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0296] This disclosure provides an electronic device, which includes:
[0297] At least one processor; and
[0298] A memory communicatively connected to the at least one processor; wherein,
[0299] The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the task execution method described above.
[0300] This disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to perform the above-described task execution method.
[0301] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements the above-described task execution method.
[0302] As can be seen from the above, in the solution provided by this disclosure, the tasks included in the business are executed in a pipeline manner, and the pipeline manner is bound to an adjustment strategy. Thus, when executing a task, in response to initiating the pipeline execution of the tasks included in the business, the target adjustment strategy is detected and conditionally executed. Since the aforementioned target adjustment strategy is a strategy used to adjust the execution flow of the tasks included in the business, based on the execution result of the aforementioned target adjustment strategy, the execution flow of the tasks can be adjusted. Executing the tasks included in the business according to the adjusted execution flow allows the task execution process to change. Compared to executing tasks according to a fixed execution flow, the solution provided by this disclosure transforms the task execution process into a dynamic execution process, enriching the task execution flow, improving the flexibility of task execution, and thereby improving the efficiency of task execution.
[0303] Figure 12A schematic block diagram of an example electronic device 1200 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0304] like Figure 12 As shown, device 1200 includes a computing unit 1201, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1202 or a computer program loaded from storage unit 1208 into random access memory (RAM) 1203. The RAM 1203 may also store various programs and data required for the operation of device 1200. The computing unit 1201, ROM 1202, and RAM 1203 are interconnected via bus 1204. Input / output (I / O) interface 1205 is also connected to bus 1204.
[0305] Multiple components in device 1200 are connected to I / O interface 1205, including: input unit 1206, such as keyboard, mouse, etc.; output unit 1207, such as various types of monitors, speakers, etc.; storage unit 1208, such as disk, optical disk, etc.; and communication unit 1209, such as network card, modem, wireless transceiver, etc. Communication unit 1209 allows device 1200 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0306] The computing unit 1201 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1201 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 1201 performs the various methods and processes described above, such as the task execution methods described above. For example, in some embodiments, the task execution methods described above can be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1208. In some embodiments, part or all of the computer program can be loaded and / or installed on device 1200 via ROM 1202 and / or communication unit 1209. When the computer program is loaded into RAM 1203 and executed by the computing unit 1201, one or more steps of the task execution methods described above can be performed. Alternatively, in other embodiments, the computing unit 1201 may be configured to perform the above-described task execution method by any other suitable means (e.g., by means of firmware).
[0307] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0308] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0309] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0310] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0311] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0312] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.
[0313] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.
[0314] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A task execution method, comprising: In response to the initiation of tasks included in the business to be executed in a pipeline manner, if the preset detection conditions are met, the system checks whether there is a target adjustment strategy that meets the trigger timing among the adjustment strategies already bound to the pipeline manner. The adjustment strategy is a strategy used to adjust the execution flow of the tasks included in the business. The bound adjustment strategy includes: an adjustment strategy selected by the strategy configurator from the adjustment strategies stored in the strategy platform. The selected adjustment strategy is also set with a trigger timing and its own dependency strategy by the strategy configurator. Obtain the policy links that reflect the dependencies between the adjustment policies already bound to the pipeline approach; If it exists, the target adjustment strategy is executed if the execution conditions of the target adjustment strategy are met. The execution conditions include at least one of the following: the strategy on which the adjustment strategy depends has been executed and the data on which the adjustment strategy depends exists. Based on the execution results of the target adjustment strategy, the execution flow of the tasks included in the business is adjusted. The execution results include: the tasks whose execution flow needs to be adjusted and the adjustment method. The adjustment method includes at least one of the following: canceling the task, modifying the parameters used in the task execution flow, and reusing the execution results of other tasks. Execute the tasks included in the business according to the adjusted execution flow; After executing the target adjustment strategy, the method further includes: Receive the startup command for the problem handling service; The configured problem handling strategies are executed according to the execution order of the problem handling service to obtain the processing results, which include: the cause of the problem and the handling method. Based on the processing results, problems existing in the execution process of the tasks included in the business are addressed, wherein the problem-solving methods include at least one of the following: skipping the task, canceling the task, and determining the task priority.
2. The method according to claim 1, wherein executing the target adjustment strategy when the execution conditions of the target adjustment strategy are met includes: Based on the strategy chain, determine the dependent strategies of the target adjustment strategy; Once the dependency strategy has been executed, the target adjustment strategy is executed.
3. The method according to claim 1, wherein, Implementation of target adjustment strategies, including: The target adjustment strategy is invoked from the strategy platform, and the configuration data required to execute the target adjustment strategy is obtained from the data platform. The strategy platform is used to store strategies, and the data platform is used to store the configuration data required for the strategies stored in the strategy platform. Based on the configuration data, the target adjustment strategy is executed.
4. The method according to any one of claims 1-3, wherein, The problem handling strategy includes at least one of the following strategies: problem analysis strategy, problem handling priority determination strategy, problem labeling strategy, problem self-healing strategy, problem distribution strategy, and problem reporting strategy.
5. The method according to any one of claims 1-3, wherein, The triggering timing includes at least one of the following: Before executing the first task included in the business, during the execution of the tasks included in the business, and after the execution of the tasks included in the business is completed.
6. The method according to any one of claims 1-3, wherein, The adjustment strategy includes at least one of the following strategies: Task information analysis strategy, task skipping strategy, task sorting strategy, task cancellation strategy, and task execution result reuse strategy.
7. A task execution device, comprising: The strategy detection module is used to respond to the initiation of tasks included in the business in a pipeline manner. If the preset detection conditions are met, it detects whether there is a target adjustment strategy that meets the triggering time among the adjustment strategies already bound in the pipeline manner. If there is, it triggers the first strategy execution module. The adjustment strategy is a strategy used to adjust the execution flow of the tasks included in the business. The bound adjustment strategy includes: the adjustment strategy selected by the strategy configurator from the adjustment strategies stored in the strategy platform. The selected adjustment strategy is also set with a triggering time and its own dependency strategy by the strategy configurator. The link acquisition module is used to acquire the policy links that reflect the dependencies between the adjustment policies that are bound to the pipeline method. The first strategy execution module is used to execute the target adjustment strategy when the execution conditions of the target adjustment strategy are met. The execution conditions include at least one of the following conditions: the strategy on which the adjustment strategy depends has been executed and the data on which the adjustment strategy depends exists. The process adjustment module is used to adjust the execution process of the tasks included in the business based on the execution result of the target adjustment strategy. The execution result includes: the task whose execution process needs to be adjusted and the adjustment method. The adjustment method includes at least one of the following: canceling the task, modifying the parameters used in the task execution process, and reusing the execution results of other tasks. The task execution module is used to execute the tasks included in the business according to the adjusted execution flow; The device further includes: The instruction receiving module is used to receive a start instruction for the problem handling service after the first strategy execution module executes the target adjustment strategy; The second strategy execution module is used to execute the configured problem handling strategies according to the execution order of the problem handling strategies configured in the problem handling service, and obtain the processing results, which include: the cause of the problem and the handling method; The problem handling module is used to handle problems existing in the execution process of the tasks included in the business based on the processing result, wherein the problem handling methods include at least one of the following: skipping the task, canceling the task, and determining the task priority.
8. The apparatus according to claim 7, wherein the first strategy execution module comprises: The strategy determination submodule is used to determine the dependent strategies of the target adjustment strategy based on the strategy chain. The first strategy execution submodule is used to execute the target adjustment strategy after the dependent strategy has been executed.
9. The apparatus according to claim 7, wherein, The first strategy execution module includes: The information retrieval submodule is used to retrieve the target adjustment strategy from the strategy platform and obtain the configuration data required to execute the target adjustment strategy from the data platform. The strategy platform is used to store strategies, and the data platform is used to store the configuration data required for the strategies stored in the strategy platform. The second strategy execution submodule is used to execute the target adjustment strategy based on the configuration data.
10. The apparatus according to any one of claims 7-9, wherein, The problem handling strategy includes at least one of the following strategies: problem analysis strategy, problem handling priority determination strategy, problem labeling strategy, problem self-healing strategy, problem distribution strategy, and problem reporting strategy.
11. The apparatus according to any one of claims 7-9, wherein, The triggering timing includes at least one of the following: before executing the first task included in the service, during the execution of the tasks included in the service, and after the execution of the tasks included in the service is completed.
12. The apparatus according to any one of claims 7-9, wherein, The adjustment strategy includes at least one of the following strategies: task information analysis strategy, task skipping strategy, task sorting strategy, task cancellation strategy, and task execution result reuse strategy.
13. An electronic device, comprising: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6.
14. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-6.
15. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.