A task execution management method, device, apparatus, and medium

By breaking down task steps in a cloud computing platform and using a pre-set database to store the latest information, the timeliness and accuracy of task information push are solved, enabling fine-grained display and efficient push of task information.

CN119718588BActive Publication Date: 2026-07-24INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2024-12-31
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

In existing technologies, task messages on cloud computing platforms cannot be broken down into steps, leading to issues with the timeliness and accuracy of task progress and status, making it difficult to obtain detailed information, and data push suffers from delays and overwriting problems.

Method used

By breaking down task steps in the task platform, saving task information and step information, and storing the latest status using a preset database, a task information list is assembled based on user query conditions and pushed to the user according to a predefined model.

Benefits of technology

It achieves highly timely and accurate push notifications of task information, and can display task progress, step status and related information in real time, thereby improving user experience and task management efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718588B_ABST
    Figure CN119718588B_ABST
Patent Text Reader

Abstract

The application discloses a task execution management method and device, equipment and medium, relates to the technical field of computers, and is applied to a task platform, and comprises the following steps: obtaining a creation request of a target task and saving initial task information and initial task step information; the initial task information comprises a task mark and an initial task state, and the initial task step information comprises a step mark and an initial step state of each task step; determining a push address based on a user end that sends the creation request; when the current query condition is met, querying each mark information corresponding to the user end in a target time period, and assembling task content corresponding to the mark information queried from a preset database according to a pre-defined result display model to obtain a task information list; the preset database is used for storing the latest task information and the latest task step information in a task execution process; and the task information list is pushed to the push address by using a target thread, and the push address and the task information list are deleted after the pushing succeeds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a task execution management method, apparatus, device, and medium. Background Technology

[0002] In the era of cloud computing, as cloud services are applied to increasingly wider areas, the three main services of computing, networking, and storage are often insufficient for cloud computing platforms. With the growing prevalence of big data analytics, real-time monitoring of the task execution process and results on cloud resources has become even more crucial.

[0003] Currently, task messages on the task platform's cloud resources do not differentiate between steps; there is only one large task body. Task progress and status are updated within this task body, such as... Figure 1 As shown, when the progress or status changes, data assembly begins at the current time, and a message is pushed to the front end after the data assembly is complete. However, firstly, this message only shows the overall progress and status of the task, making it difficult to obtain more detailed task steps; secondly, due to the long cycle of reading and assembling data, timeliness issues may occur, causing some task progress to be skipped, and concurrent data assembly may result in new data being overwritten by old data, leading to low data accuracy and causing task progress to regress.

[0004] In summary, how to obtain more detailed task information and achieve accuracy and timeliness in task information delivery is a problem that needs to be solved. Summary of the Invention

[0005] In view of this, the purpose of this invention is to provide a task execution management method, apparatus, device, and medium, capable of acquiring more detailed task information and achieving accuracy and timeliness in task information delivery. The specific solution is as follows:

[0006] Firstly, this application discloses a task execution management method, applied to a task platform, comprising:

[0007] Obtain the creation request of the target task and save the initial task information and initial task step information of the target task; the initial task information includes the task flag and initial task status, and the initial task step information includes the step flag and initial step status of each task step in the target task.

[0008] The push address corresponding to the target task is determined based on the client that sent the creation request.

[0009] When the preset query conditions are met, query the flag information corresponding to the user terminal within the target time period, and query the task content corresponding to the flag information from the preset database. The task content is then assembled according to the predefined result display model to obtain a task information list. The flag information includes task flags and step flags. The preset database is used to store the latest task information and the latest task step information during the execution of the target task. The latest task information includes the latest task status, and the latest task step information includes the latest step status.

[0010] The task information list is pushed to the address using a preset target thread, and the push address and task information list are deleted after successful push.

[0011] Optionally, the push address corresponding to the target task is determined based on the client that sent the creation request, including:

[0012] Obtain the user session information of the client that sent the creation request, and determine whether the client is a legitimate client based on the user session information;

[0013] If it is a legitimate user client, the push address corresponding to the target task is assembled based on the user identifier, user role information, and user virtual data center identifier in the user session information.

[0014] Optionally, after assembling the task content according to a predefined result display model to obtain a task information list, it also includes:

[0015] Key-value pairs are constructed based on the push address and the task information list, and the key-value pairs are stored in a preset list; where the push address is the key and the task information list is the value.

[0016] Accordingly, a list of task information is pushed to the designated address using a preset target thread, and the push address and task information list are deleted after successful push, including:

[0017] The preset target thread polls the preset list, and after detecting key-value pairs, it parses the key-value pairs to obtain the push address and task information list;

[0018] The task information list is pushed according to the push address, and the key-value pair is deleted from the preset list after the push is successful.

[0019] Optionally, query the flag information corresponding to the user terminal within the target time period, and query the task content corresponding to the flag information from the preset database, including:

[0020] Query the target tasks and task steps that are in the target state corresponding to the user within the target time period, and construct a task flag list based on each flag; the target state includes execution completed and execution in progress.

[0021] Iterate through each flag in the task flag list and query the task content corresponding to each flag from the preset database.

[0022] Optionally, the result display model includes, in order from top to bottom, a first display model for displaying basic task information, a second display model for displaying task step information, and a third display model for displaying task step association information; wherein, the second display model is a sub-model of the first display model, and the third display model is a sub-model of the second display model.

[0023] Accordingly, the task content is assembled according to a predefined result display model to obtain a task information list, including:

[0024] The first information content corresponding to the first display model is selected from the task content, and the first information content is assembled to obtain the first assembly result;

[0025] The second information content corresponding to the second display model is selected from the task content, and the second information content is assembled to obtain the second assembly result;

[0026] The third information content corresponding to the third display model is selected from the task content, and the third information content is assembled to obtain the third assembly result;

[0027] The first assembly result, the second assembly result, and the third assembly result are integrated in sequence to obtain the task information list.

[0028] Optionally, the basic task information includes task identifier, task operation type, task operation object, task operator, task status, task progress, task start execution time, task end execution time, and task execution process information; the task step information includes task step identifier, task step operation type, task step operation object, task step operator, task step status, task step progress, task step start execution time, task step end execution time, and task step execution process information; the task step association information includes associated task step identifier, associated task step operation type, associated task step operation object, associated task step operator, associated task step status, associated task step progress, associated task step start execution time, associated task step end execution time, and associated task step execution process information.

[0029] Optionally, when the preset query conditions are met, the query can retrieve the corresponding flag information for the target time period and the user, including:

[0030] During the execution of the target task, when a change in the task status or step status is detected, query the corresponding flag information of the user terminal within the target time period;

[0031] Alternatively, during the execution of the target task, if the current timestamp matches the preset query timestamp, query the flag information corresponding to the user terminal within the target time period.

[0032] Secondly, this application discloses a task execution management device applied to a task platform, comprising:

[0033] The request acquisition module retrieves the creation request of the target task and saves the initial task information and initial task step information of the target task. The initial task information includes the task flag and initial task status, and the initial task step information includes the step flag and initial step status of each task step in the target task.

[0034] The push address determination module is used to determine the push address corresponding to the target task based on the user client that sent the creation request;

[0035] The result assembly module is used to query the flag information corresponding to the user terminal within the target time period when the preset query conditions are met, and to query the task content corresponding to the flag information from the preset database. The task content is then assembled according to the predefined result display model to obtain a task information list. The flag information includes task flags and step flags. The preset database is used to store the latest task information and the latest task step information during the execution of the target task. The latest task information includes the latest task status, and the latest task step information includes the latest step status.

[0036] The push module is used to push a list of task information to a preset target thread according to the push address, and delete the push address and the task information list after the push is successful.

[0037] Thirdly, this application discloses an electronic device, including:

[0038] Memory, used to store computer programs;

[0039] A processor for executing computer programs to implement the steps of the aforementioned disclosed task execution management method.

[0040] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the steps of the aforementioned disclosed task execution management method.

[0041] As can be seen, this application obtains the creation request of the target task through a task platform and saves the initial task information and initial task step information of the target task. The initial task information includes a task flag and an initial task status, and the initial task step information includes the step flag and initial step status of each task step in the target task. The push address corresponding to the target task is determined based on the user terminal that sent the creation request. When the preset query conditions are met, the flag information corresponding to the user terminal within the target time period is queried, and the task content corresponding to the flag information is queried from the preset database. The task content is then assembled into a task information list according to a predefined result display model. The flag information includes a task flag and a step flag. The preset database is used to store the latest task information and the latest task step information during the execution of the target task. The latest task information includes the latest task status, and the latest task step information includes the latest step status. The task information list is pushed according to the push address using a preset target thread, and the push address and task information list are deleted after successful push.

[0042] Beneficial Effects: In this application, after receiving a creation request for a target task, the task platform needs to first save the initial task information and initial task step information of the target task. The initial task information includes a task flag and an initial task status, while the initial task step information includes the step flag and initial step status of each task step in the target task. Subsequently, during the execution of the target task, when the task status or task step status of the target task changes, the latest task information and latest task step information of the target task will be cached in a preset database, i.e., storing the latest task status and latest step status. Furthermore, this application needs to determine the push address corresponding to the target task based on the user terminal that sent the creation request, so that the corresponding task information can be pushed according to that push address. When the preset query conditions are met, the platform queries the flag information corresponding to the user terminal within the target time period. The flag information includes the aforementioned task flag and step flag, and the platform queries the preset database for the task content corresponding to the flag information, assembling the task content according to a predefined result display model to obtain a task information list. In other words, this application predefines a result display model. When the query conditions are met, it retrieves the latest task content corresponding to the user within the target time period from the preset database, including the latest task status and latest step status. This information is then assembled into a task information list according to the result display model, and the task information list is pushed to the system. Through this approach, by subdividing each task step and setting up a preset database to specifically store the latest task information and latest task step information during the execution of the target task, and by displaying the latest status of the target task and each task step according to the result display model, more detailed task information can be obtained, achieving accuracy and timeliness in task information push. Attached Figure Description

[0043] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0044] Figure 1 This is a schematic diagram of an existing task message push process disclosed in this application;

[0045] Figure 2 This application discloses a flowchart of a task execution management method.

[0046] Figure 3 This application discloses a task execution management architecture diagram;

[0047] Figure 4 This application discloses a specific task execution management method flowchart;

[0048] Figure 5 This application discloses a diagram illustrating the relationship between basic task information and task step information.

[0049] Figure 6 This is a schematic diagram of the structure of a task execution management device disclosed in this application;

[0050] Figure 7 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation

[0051] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0052] Currently, task messages on cloud resources of task platforms do not differentiate between steps; there is only a single large task body. Task progress and status are updated within this task body. When progress or status changes, data assembly begins at the current time, and a message is pushed to the front end only after assembly is complete. However, firstly, this message only shows the overall progress and status of the task, making it difficult to obtain more detailed task steps; secondly, due to the long cycle of reading and assembling data, timeliness issues arise, leading to skipping certain task progress steps. Furthermore, concurrent data assembly may result in new data being overwritten by older data, leading to low data accuracy and causing task progress to regress. Therefore, this application discloses a task execution management method, apparatus, device, and medium that can obtain more detailed task information and achieve accurate and timely task information push.

[0053] See Figure 2 and Figure 3 As shown in the figure, this application discloses a task execution management method applied to a task platform. The method includes:

[0054] Step S11: Obtain the creation request of the target task and save the initial task information and initial task step information of the target task; the initial task information includes the task flag and initial task status, and the initial task step information includes the step flag and initial step status of each task step in the target task.

[0055] In this embodiment, after receiving the creation request for the target task, the task platform needs to first save the initial task information and initial task step information of the target task. The initial task information includes a task identifier (task ID) and an initial task status, while the initial task step information includes a step identifier (step ID) and an initial step status for each task step in the target task. Subsequently, during the execution of the target task, when the task status or task step status of the target task changes, the latest task information and latest task step information of the target task will be cached in a preset database, i.e., storing the latest task status and latest step status. The preset database can be Redis (Remote Dictionary Server).

[0056] It should be noted that the task platform in this application needs to run in a K8s (Kubernetes, an open-source container management platform) environment and be in a normal operating state. The user client can issue a creation request for the target task through the business module. For example, taking the target task as creating a cloud host, the corresponding task steps include cloud host creation verification, remote cloud host creation, waiting for remote cloud host creation, and saving the cloud host to the database. The business module has built-in streaming task configuration information for cloud host creation. The user client maintains basic information about the cloud host, including the cloud host name, the VDC (Virtual Data Center) where the cloud host is located, the owner of the cloud host, and cloud host specifications. After completing the basic configuration information of the cloud host, the user client submits the creation request for the task.

[0057] Step S12: Determine the push address corresponding to the target task based on the client that sent the creation request.

[0058] In this embodiment, it is necessary to determine the push address corresponding to the target task based on the user terminal that sent the creation request, so that the corresponding task information can be pushed according to the push address in the future.

[0059] In a specific implementation, determining the push address corresponding to the target task based on the user terminal sending the creation request includes: obtaining the user session information of the user terminal sending the creation request, and determining whether the user terminal is a legitimate user terminal based on the user session information; if it is a legitimate user terminal, then assembling the push address corresponding to the target task based on the user identifier, user role information, and user virtual data center identifier in the user session information. It is understood that this application needs to detect whether the received creation request was initiated by a legitimate user, that is, it needs to detect the legitimacy of the user terminal sending the creation request, in order to ensure the legitimacy and security of task execution, as well as the accuracy and relevance of the push information.

[0060] Specifically, it is necessary to obtain the user session information (i.e., user session information) of the client that sent the creation request. This information is used to determine if the client is legitimate. If legitimate, the push address corresponding to the target task is assembled based on the user identifier, user role information, and user virtual data center identifier from the user session information. If the request was not initiated by a legitimate user, appropriate action must be taken, such as rejecting the request or conducting a security review, to maintain the stable operation of the system and data security. This effectively prevents illegal or malicious task requests from entering the system, protects the security and stability of cloud resources, and avoids potential security vulnerabilities and data leakage risks.

[0061] In one specific implementation, if the system detects that the creation request was not initiated by a legitimate user, it can immediately reject the request and may record relevant request information, such as the IP address of the request source and the request time, for subsequent security analysis and tracing. At the same time, it can send an alert to the system administrator or security monitoring module to indicate the potential security threat.

[0062] In another specific implementation, for suspicious requests initiated by illegitimate user clients, in addition to rejection, a security review process can be initiated to conduct in-depth analysis of the requests, attempt to trace the source and intent of the requests, determine whether they are signs of system vulnerabilities or external attacks, and take corresponding measures based on the review results, such as fixing vulnerabilities and strengthening security protection mechanisms, to prevent similar situations from happening again.

[0063] In this way, accurately identifying the initiator of the task request helps assemble the correct push address information based on the user's specific information. This ensures that various messages and results during task execution are accurately pushed to the user who initiated the task, improving user experience and task management efficiency.

[0064] Step S13: When the preset query conditions are met, query the flag information corresponding to the user terminal within the target time period, and query the task content corresponding to the flag information from the preset database, so as to assemble the task content according to the predefined result display model to obtain a task information list; the flag information includes task flags and step flags, and the preset database is used to store the latest task information and the latest task step information during the execution of the target task. The latest task information includes the latest task status, and the latest task step information includes the latest step status.

[0065] In this embodiment, when the preset query conditions are met, the system queries the flag information corresponding to the user terminal within the target time period. The flag information includes the aforementioned task flags and step flags. The system then queries the preset database for the task content corresponding to the flag information, and assembles the task content according to a predefined result display model to obtain a task information list. That is, this application predefines a result display model. When the query conditions are met, the system queries the preset database for the latest task content corresponding to the user terminal within the target time period, i.e., the latest task status and the latest step status, and assembles it into a task information list according to the result display model.

[0066] Specifically, when the preset query conditions are met, querying the flag information corresponding to the user terminal within the target time period can include: during the execution of the target task, when a change in the task status or step status is detected, querying the flag information corresponding to the user terminal within the target time period; or, during the execution of the target task, when the current timestamp is consistent with the preset query timestamp, querying the flag information corresponding to the user terminal within the target time period.

[0067] That is, in one specific implementation, the task status or step status is monitored in real time during the execution of the target task. When a change in the task status or step status is detected, the corresponding flag information of the user terminal within the target time period is queried.

[0068] In another specific implementation, during the execution of the target task, the flag information is periodically queried. That is, a query timestamp is preset. When the current timestamp is consistent with the preset query timestamp, the flag information corresponding to the user terminal within the target time period is queried.

[0069] In a specific implementation, the system queries the flag information corresponding to the user terminal within the target time period and retrieves the task content corresponding to the flag information from a preset database. This includes: querying the flag information of target tasks in the target state corresponding to the user terminal within the target time period and the flag information of task steps, and constructing a task flag list based on each flag information; wherein, the target state includes execution completed and execution in progress; traversing each flag information in the task flag list, and retrieving the task content corresponding to each flag information from the preset database. It is understood that during the query, a task for reading and assembling task data is automatically added to the task thread pool. The task module automatically queries the flag information of target tasks in the target state within the target time period of the current user terminal, specifically including execution completed and execution in progress. For example, it queries the flag information of all tasks completed within 3 minutes of the current user terminal and all tasks in progress, and constructs a task flag list. Then, it traverses each flag information in the task flag list and retrieves the task content corresponding to each flag information from the preset database Redis, that is, it queries the latest task information and latest task step information of the target task in the execution process, thereby assembling a task information that conforms to a predefined result display model. After the traversal is complete, a task information list is assembled.

[0070] The Redis database stores the latest information about the task and the latest information about the task steps. The storage period can be, for example, 24 hours. The latest task information includes the task ID, task operation type KEY, task operation type name, task operation object, task operator, task status, task progress, task start time, task end time, and task execution information. The latest task step information includes the task ID, task step ID, task step operation type KEY, task step operation type name, and task step status.

[0071] Furthermore, after assembling the task content according to a predefined result display model to obtain a task information list, the process also includes: constructing key-value pairs based on the push address and the task information list, and storing the key-value pairs in a preset list; wherein the push address is the key and the task information list is the value. That is, in this embodiment, the push address is used as the key and the task information list is used as the value to store in the preset list.

[0072] Step S14: Push the task information list according to the push address using the preset target thread, and delete the push address and task information list after successful push.

[0073] In this embodiment, a preset target thread is used to push the task information list according to the push address, and the push address and task information list are deleted after the push is successful.

[0074] In a specific implementation, a preset target thread is used to push a list of task information according to the push address, and the push address and task information list are deleted after successful push. This includes: using the preset target thread to poll a preset list, and upon detecting a key-value pair, parsing the key-value pair to obtain the push address and task information list; pushing the task information list according to the push address, and deleting the key-value pair from the preset list after successful push. That is, in this application, a preset target thread is used to poll a preset list to detect whether a key-value pair exists in the preset list. If it exists, the key-value pair is parsed to obtain the push address represented by the key and the task information list represented by the value. Then, the task information list is sent to the front-end task bar via WebSocket according to the push address, and the sent key-value pair is automatically cleaned up after successful push.

[0075] As can be seen, in this application, after receiving the creation request of the target task, the task platform needs to first save the initial task information and initial task step information of the target task. The initial task information includes the task flag and initial task status, and the initial task step information includes the step flag and initial step status of each task step in the target task. Subsequently, during the execution of the target task, when the task status or task step status of the target task changes, the latest task information and latest task step information of the target task will be cached in a preset database, i.e., storing the latest task status and latest step status. Furthermore, this application needs to determine the push address corresponding to the target task based on the user terminal that sent the creation request, so that the corresponding task information can be pushed according to that push address. When the preset query conditions are met, the platform queries the flag information corresponding to the user terminal within the target time period. The flag information includes the aforementioned task flag and step flag, and the platform queries the preset database for the task content corresponding to the flag information, assembling the task content according to a predefined result display model to obtain a task information list. In other words, this application predefines a result display model. When the query conditions are met, it retrieves the latest task content corresponding to the user within the target time period from the preset database, including the latest task status and latest step status. This information is then assembled into a task information list according to the result display model, and the task information list is pushed to the system. Through this approach, by subdividing each task step and setting up a preset database to specifically store the latest task information and latest task step information during the execution of the target task, and by displaying the latest status of the target task and each task step according to the result display model, more detailed task information can be obtained, achieving accuracy and timeliness in task information push.

[0076] See Figure 4 As shown, this application discloses a specific task execution management method. Compared with the previous embodiment, this embodiment further explains and optimizes the technical solution. Specifically, it includes:

[0077] Step S21: Obtain the creation request of the target task and save the initial task information and initial task step information of the target task; the initial task information includes the task flag and initial task status, and the initial task step information includes the step flag and initial step status of each task step in the target task.

[0078] Step S22: Determine the push address corresponding to the target task based on the client that sent the creation request.

[0079] Step S23: When the preset query conditions are met, query the flag information corresponding to the user terminal within the target time period, and query the task content corresponding to the flag information from the preset database; the flag information includes task flags and step flags. The preset database is used to store the latest task information and the latest task step information during the execution of the target task. The latest task information includes the latest task status, and the latest task step information includes the latest step status.

[0080] Step S24: Determine the predefined result display model; the result display model includes, in order from top to bottom, a first display model for displaying basic task information, a second display model for displaying task step information, and a third display model for displaying task step association information; wherein, the second display model is a sub-model of the first display model, and the third display model is a sub-model of the second display model.

[0081] In this embodiment, a predefined result display model is first determined. This model has a three-layer structure, consisting of a first display model for displaying basic task information, a second display model for displaying task step information, and a third display model for displaying task step-related information, arranged from top to bottom. The second and third display models are sub-models of the first and second display models, respectively. This three-layer model approach enables the display of richer task messages: the first layer presents basic task information, the second layer presents task step information, and the third layer presents task step-related information, ultimately achieving the goal of accurate and timely delivery of cloud resource task information.

[0082] Furthermore, such as Figure 5 As shown, the basic task information includes task ID, task operation type, task operation object, task operator, task status, task progress, task start time, task end time, and task execution process information; the task step information includes task step ID, task step operation type, task step operation object, task step operator, task step status, task step progress, task step start time, task step end time, and task step execution process information; the task step association information includes associated task step ID, associated task step operation type, associated task step operation object, associated task step operator, associated task step status, associated task step progress, associated task step start time, associated task step end time, and associated task step execution process information.

[0083] In this way, after a user submits a request to create a cloud host through the business module, they can query real-time task information on the task platform. They can view the changes in task progress and steps, as well as the changes in task step progress and status, and the changes in task step-related task progress and status.

[0084] Step S25: Select the first information content corresponding to the first display model from the task content, and assemble the first information content to obtain the first assembly result; select the second information content corresponding to the second display model from the task content, and assemble the second information content to obtain the second assembly result; select the third information content corresponding to the third display model from the task content, and assemble the third information content to obtain the third assembly result.

[0085] In this embodiment, the task content corresponding to the task flag and the step flag has been retrieved from the preset database through the aforementioned steps. Therefore, according to the definition of the result display model, this embodiment further selects the first information content corresponding to the first display model from the task content and assembles it to obtain the first assembly result; selects the second information content corresponding to the second display model from the task content and assembles it to obtain the second assembly result; and selects the third information content corresponding to the third display model from the task content and assembles it to obtain the third assembly result.

[0086] Step S26: Integrate the first assembly result, the second assembly result, and the third assembly result in sequence to obtain a task information list.

[0087] In this embodiment, the first assembly result, the second assembly result, and the third assembly result are integrated in the order from top to bottom according to the result display model to obtain the task information list.

[0088] Step S27: Push the task information list according to the push address using the preset target thread, and delete the push address and task information list after successful push.

[0089] For more detailed processing procedures of steps S21, S22 and S27, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.

[0090] As can be seen, this application achieves a richer display of task messages through a three-layer model: the first layer displays basic task information, the second layer displays task step information, and the third layer displays task step-related information, ultimately achieving the goal of accurate and timely delivery of cloud resource task information. In this way, the delivery of cloud resource tasks changes from the traditional coarse-grained and low-failure method of displaying progress and status information of a single task to a fine-grained method that includes task progress, task status, task steps, task step progress, and task step-related task information, and can deliver information in real time, essentially achieving zero latency.

[0091] See Figure 6 As shown in the figure, this application discloses a task execution management device applied to a task platform. The device includes:

[0092] The request acquisition module 11 acquires the creation request of the target task and saves the initial task information and initial task step information of the target task; the initial task information includes the task flag and initial task status, and the initial task step information includes the step flag and initial step status of each task step in the target task.

[0093] The push address determination module 12 is used to determine the push address corresponding to the target task based on the user terminal that sent the creation request.

[0094] The result assembly module 13 is used to query the flag information corresponding to the user terminal within the target time period when the preset query conditions are met, and to query the task content corresponding to the flag information from the preset database, so as to assemble the task content according to the predefined result display model to obtain a task information list; the flag information includes task flags and step flags, and the preset database is used to store the latest task information and the latest task step information during the execution of the target task. The latest task information includes the latest task status, and the latest task step information includes the latest step status.

[0095] The push module 14 is used to push a list of task information according to a preset target thread and push the push address and task information list after the push is successful.

[0096] As can be seen, in this application, after receiving the creation request of the target task, the task platform needs to first save the initial task information and initial task step information of the target task. The initial task information includes the task flag and initial task status, and the initial task step information includes the step flag and initial step status of each task step in the target task. Subsequently, during the execution of the target task, when the task status or task step status of the target task changes, the latest task information and latest task step information of the target task will be cached in a preset database, i.e., storing the latest task status and latest step status. Furthermore, this application needs to determine the push address corresponding to the target task based on the user terminal that sent the creation request, so that the corresponding task information can be pushed according to that push address. When the preset query conditions are met, the platform queries the flag information corresponding to the user terminal within the target time period. The flag information includes the aforementioned task flag and step flag, and the platform queries the preset database for the task content corresponding to the flag information, assembling the task content according to a predefined result display model to obtain a task information list. In other words, this application predefines a result display model. When the query conditions are met, it retrieves the latest task content corresponding to the user within the target time period from the preset database, including the latest task status and latest step status. This information is then assembled into a task information list according to the result display model, and the task information list is pushed to the system. Through this approach, by subdividing each task step and setting up a preset database to specifically store the latest task information and latest task step information during the execution of the target task, and by displaying the latest status of the target task and each task step according to the result display model, more detailed task information can be obtained, achieving accuracy and timeliness in task information push.

[0097] Since the embodiments of the apparatus and the method correspond to each other, please refer to the description of the embodiments in the method section for the apparatus embodiments, which will not be repeated here. Furthermore, it has the same beneficial effects as the task execution management method mentioned above.

[0098] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Specifically, it may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the task execution management method disclosed in any of the foregoing embodiments.

[0099] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0100] The processor 21 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 21 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 21 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 21 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0101] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.

[0102] The operating system 221 manages and controls the various hardware devices and computer programs 222 on the electronic device 20 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows, Unix, Linux, etc. The computer program 222, in addition to including a computer program capable of performing the task execution management method disclosed in any of the foregoing embodiments, may further include computer programs capable of performing other specific tasks. The data 223 may include data received by the electronic device from external devices, as well as data collected by its own input / output interface 25.

[0103] Furthermore, embodiments of this application also disclose a computer-readable storage medium storing a computer program. When the computer program is loaded and executed by a processor, it implements the task execution management method steps disclosed in any of the foregoing embodiments.

[0104] Furthermore, embodiments of this application also disclose a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the task execution management method disclosed in any of the foregoing embodiments.

[0105] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0106] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0107] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, compact disc read-only memory (CD-ROM), or any other form of storage medium known in the art.

[0108] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0109] The above provides a detailed description of the task execution management method, apparatus, device, and storage medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A task execution management method, characterized in that, Applied to task platforms, including: Obtain the creation request of the target task and save the initial task information and initial task step information of the target task; the initial task information includes a task flag and an initial task status, and the initial task step information includes a step flag and an initial step status for each task step in the target task. The push address corresponding to the target task is determined based on the user terminal that sent the creation request; When the preset query conditions are met, the system queries each flag information corresponding to the user terminal within the target time period and queries the task content corresponding to the flag information from the preset database. The task content is then assembled into a task information list according to a predefined result display model. The flag information includes task flags and step flags. The preset database is used to store the latest task information and the latest task step information of the target task during execution. The latest task information includes the latest task status, and the latest task step information includes the latest step status. The task information list is pushed to the push address using a preset target thread, and the push address and the task information list are deleted after successful push. The step of determining the push address corresponding to the target task based on the user terminal that sent the creation request includes: Obtain user session information of the user terminal that sent the creation request, and determine whether the user terminal is a legitimate user terminal based on the user session information; If it is a legitimate user client, then the push address corresponding to the target task is assembled based on the user identifier, user role information and user virtual data center identifier in the user session information; If the client is not a legitimate user, the creation request will be rejected or a security review will be conducted on the creation request. The result display model includes, in order from top to bottom, a first display model for displaying basic task information, a second display model for displaying task step information, and a third display model for displaying task step association information; wherein, the second display model is a sub-model of the first display model, and the third display model is a sub-model of the second display model. Accordingly, assembling the task content according to a predefined result display model to obtain a task information list includes: First information content corresponding to the first display model is selected from the task content, and the first information content is assembled to obtain a first assembly result; The second information content corresponding to the second display model is selected from the task content, and the second information content is assembled to obtain the second assembly result; The third information content corresponding to the third display model is selected from the task content, and the third information content is assembled to obtain the third assembly result; The first assembly result, the second assembly result, and the third assembly result are integrated sequentially to obtain a task information list.

2. The task execution management method according to claim 1, characterized in that, After assembling the task content according to a predefined result display model to obtain a task information list, the process further includes: A key-value pair is constructed based on the push address and the task information list, and the key-value pair is stored in a preset list; wherein, the push address is the key and the task information list is the value; Accordingly, the step of using a preset target thread to push the task information list according to the push address, and deleting the push address and the task information list after successful push, includes: The preset list is polled using a preset target thread, and after detecting the key-value pair, the key-value pair is parsed to obtain the push address and the task information list; The task information list is pushed to the specified address, and the key-value pair is deleted from the preset list after successful push.

3. The task execution management method according to claim 1, characterized in that, The query process involves identifying the flag information corresponding to the user terminal within the target time period and retrieving the task content corresponding to the flag information from a preset database, including: Query the target tasks and task steps that are in the target state corresponding to the user terminal within the target time period, and construct a task flag list based on each of the flag information; wherein, the target state includes execution completed and execution in progress; Iterate through each flag in the task flag list and query the task content corresponding to each flag from the preset database.

4. The task execution management method according to claim 1, characterized in that, The basic task information includes task identifier, task operation type, task operation object, task operator, task status, task progress, task start execution time, task end execution time, and task execution process information; the task step information includes task step identifier, task step operation type, task step operation object, task step operator, task step status, task step progress, task step start execution time, task step end execution time, and task step execution process information; the task step association information includes associated task step identifier, associated task step operation type, associated task step operation object, associated task step operator, associated task step status, associated task step progress, associated task step start execution time, associated task step end execution time, and associated task step execution process information.

5. The task execution management method according to any one of claims 1 to 4, characterized in that, The step of querying the flag information corresponding to the user terminal within the target time period when the preset query conditions are met includes: During the execution of the target task, when a change in the task status or step status is detected, the flag information corresponding to the user terminal within the target time period is queried. Alternatively, during the execution of the target task, if the current timestamp matches the preset query timestamp, query the flag information corresponding to the user terminal within the target time period.

6. A task execution management device, characterized in that, Applied to task platforms, including: The request acquisition module acquires the creation request of the target task and saves the initial task information and initial task step information of the target task; the initial task information includes a task flag and an initial task status, and the initial task step information includes a step flag and an initial step status for each task step in the target task. The push address determination module is used to determine the push address corresponding to the target task based on the user terminal that sent the creation request. The result assembly module is used to query the flag information corresponding to the user terminal within a target time period when the preset query conditions are met, and to query the task content corresponding to the flag information from a preset database, so as to assemble the task content according to a predefined result display model to obtain a task information list; the flag information includes task flags and step flags, and the preset database is used to store the latest task information and latest task step information of the target task during the execution process, the latest task information includes the latest task status, and the latest task step information includes the latest step status; The push module is used to push the task information list according to the push address using a preset target thread, and delete the push address and the task information list after the push is successful; Specifically, the push address determination module is used to obtain user session information of the user terminal that sent the creation request, so as to determine whether the user terminal is a legitimate user terminal based on the user session information; if it is a legitimate user terminal, the push address corresponding to the target task is assembled based on the user identifier, user role information and user virtual data center identifier in the user session information; if it is not a legitimate user terminal, the creation request is rejected or the creation request is subject to security review. The result display model includes, in order from top to bottom, a first display model for displaying basic task information, a second display model for displaying task step information, and a third display model for displaying task step association information; wherein, the second display model is a sub-model of the first display model, and the third display model is a sub-model of the second display model. Accordingly, the result assembly module is specifically used to: filter out first information content corresponding to the first display model from the task content, and assemble the first information content to obtain a first assembly result; filter out second information content corresponding to the second display model from the task content, and assemble the second information content to obtain a second assembly result; filter out third information content corresponding to the third display model from the task content, and assemble the third information content to obtain a third assembly result; and sequentially integrate the first assembly result, the second assembly result, and the third assembly result to obtain a task information list.

7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the task execution management method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the steps of the task execution management method as described in any one of claims 1 to 5.