Task execution method, device, electronic device and storage medium

By creating and switching batch tasks for the update operation of target data items in the project management software, the problem of inefficient batch tasks execution caused by frequent changes in the data item attribute value is solved, and more efficient task execution and better user experience is achieved.

CN116149822BActive Publication Date: 2025-04-29BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310153825.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-17
Publication Date
2025-04-29
Estimated Expiration
2043-02-17

AI Technical Summary

Technical Problem

In project management software, frequent changes in data item attribute values ​​lead to the creation of multiple batch tasks continuously, resulting in inefficient and long-term execution of batch tasks.

Method used

For a target data item containing a plurality of subdata items, a first batch of tasks is performed in response to a first update operation, a second batch of tasks is created in response to a second update operation and a second batch of tasks is stopped, and a second batch of tasks is started to be executed to update the attribute value of each subdata item in the target data item.

Benefits of technology

By discarding the executing batch tasks and quickly starting new batch tasks, save computing power, execute the latest batch tasks in advance, improve the execution efficiency of batch tasks, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116149822B_ABST
    Figure CN116149822B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide a task execution method, device, electronic device and storage medium. The task execution method includes: for a target data item containing multiple sub-data items, in response to a first update operation on the target data item, executing a first batch task, wherein the first batch task includes multiple sub-tasks for updating the attribute value of each sub-data item in the target data item based on the first update operation; in response to a second update operation on the target data item, creating a second batch task, stopping the execution of the first batch task, and starting the execution of the second batch task, wherein the second batch task includes multiple sub-tasks for updating the attribute value of each sub-data item in the target data item based on the second update operation. Through the technical solution of the disclosed embodiments, while ensuring the final consistency of batch tasks, the resources consumed by task execution are effectively saved and the task execution efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to computer application technology, and more particularly to a task execution method, device, electronic device, and storage medium. Background Art

[0002] In project development and management scenarios, project management software can be used to finely control one or more projects. Usually, for projects managed in project management software, one or more work items are set in the project space of each project. Each work item can be set to include one or more sub-work items, and each sub-work item often includes multiple data items.

[0003] In the related art, if a data item is to be modified, a batch task needs to be created, and the attribute value of the data item under each sub-work item is modified one by one through each sub-task in the batch task. If the method of determining the attribute value corresponding to the data item is changed multiple times, multiple batch tasks will be created continuously, and it will take a long time to obtain the latest batch task execution result, which affects the execution efficiency of the batch task. Summary of the invention

[0004] The present disclosure provides a task execution method, device, electronic device and storage medium to optimize the related task execution logic.

[0005] In a first aspect, an embodiment of the present disclosure provides a task execution method, the method comprising:

[0006] For a target data item including a plurality of sub-data items, in response to a first update operation on the target data item, executing a first batch task, wherein the first batch task includes a plurality of sub-tasks for updating a property value of each of the sub-data items in the target data item based on the first update operation;

[0007] In response to a second update operation on the target data item, a second batch task is created, and the execution of the first batch task is stopped and the execution of the second batch task is started, wherein the second batch task includes multiple subtasks for updating the attribute value of each of the sub-data items in the target data item based on the second update operation.

[0008] In a second aspect, an embodiment of the present disclosure further provides a task execution device, the device comprising:

[0009] a task execution module, configured to execute a first batch task for a target data item including a plurality of sub-data items in response to a first update operation for the target data item, wherein the first batch task includes a plurality of sub-tasks for updating a property value of each of the sub-data items in the target data item based on the first update operation;

[0010] A task update module is used to create a second batch task in response to a second update operation on the target data item, stop executing the first batch task, and start executing the second batch task, wherein the second batch task includes multiple subtasks for updating the attribute value of each of the sub-data items in the target data item based on the second update operation.

[0011] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0012] one or more processors;

[0013] a storage device for storing one or more programs,

[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the task execution method as described in any one of the embodiments of the present disclosure.

[0015] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute a task execution method as described in any one of the embodiments of the present disclosure.

[0016] The technical solution of the disclosed embodiment is to execute a first batch task for a target data item containing multiple sub-data items in response to a first update operation on the target data item, so as to update the attribute value of each sub-data item in the target data item by executing the sub-task of the first batch task; then, when receiving a second update operation on the target data item, in response to the second update operation on the target data item, create a second batch task, stop executing the first batch task, and start executing the second batch task, so as to update the attribute value of each sub-data item in the target data item based on the second update operation, and when a new batch task is generated, the batch task being executed can be discarded, and the execution of the new batch task can be quickly started, which not only saves computing power but also advances the execution timing of the second batch task, solves the technical problems of long time consumption in obtaining the latest execution result of the batch task and low execution efficiency of the batch task, and realizes the technical effect of effectively saving resources consumed by task execution, improving the execution efficiency of the batch task, and enhancing the user experience while ensuring the final consistency of the batch task. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0018] Figure 1A A flowchart of a task execution method provided by an embodiment of the present disclosure;

[0019] Figure 1B A schematic diagram of an interface display of a demand work item page for applying a task execution method of an embodiment of the present disclosure provided by the embodiment of the present disclosure;

[0020] Figure 2 A flowchart of another task execution method provided by an embodiment of the present disclosure;

[0021] Figure 3 A flowchart of another task execution method provided by an embodiment of the present disclosure;

[0022] Figure 4 A schematic diagram of the structure of a task execution device provided by an embodiment of the present disclosure;

[0023] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0030] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0031] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0032] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0033] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0034] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.

[0035] Figure 1A A flowchart of a task execution method provided in an embodiment of the present disclosure is applicable to the case of executing a batch task containing multiple subtasks, and is particularly applicable to the case of changing the update method of the attribute values ​​of the sub-data items of the same target data item. The method can be executed by a task execution device, which can be implemented in the form of software and / or hardware, and optionally, by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0036] like Figure 1AAs shown, the method of this embodiment may specifically include:

[0037] S110 . For a target data item including a plurality of sub-data items, in response to a first update operation on the target data item, execute a first batch task.

[0038] Among them, the target data item can be understood as a data item containing multiple sub-data items. In the work item management scenario, the target data item can be an entry in the work item for structured management of multiple sub-work items. The target data item can be used to characterize the type of information contained in the sub-work item. For example, the target data item can be used to characterize the name, length, authorization role, status, and quantity of each sub-work item. The sub-data item can be understood as a target data item corresponding to a single sub-work item. The attribute value of the sub-data item can be understood as the specific content corresponding to the sub-data item. The attribute value of the sub-data item can be determined by the attribute field corresponding to the target data item.

[0039] In the disclosed embodiments, a batch task can be understood as a task including multiple subtasks, that is, a task set including several subtasks, which requires the computing resources and storage resources of the system to execute. Subtasks are components of a batch task, and each batch task is composed of several subtasks. If all subtasks are completed, the entire batch task is considered to be completed. The multiple subtasks in a batch task can be independent tasks or tasks with an associated relationship. Among them, the first batch task includes multiple subtasks for updating the attribute value of each sub-data item in the target data item based on the first update operation. Optionally, a subtask can be understood as a task for updating the attribute value of a single sub-data item.

[0040] Specifically, in response to the first update operation on the target data item, a first batch task for the target data item is created, and then the first batch task is executed. Optionally, the first update operation on the target data item may be an operation of modifying an attribute field corresponding to the target data item or an operation of adding a target data item.

[0041] Take the management page of the requirement work item as an example. Figure 1BAs shown, a plurality of requirements may be included in a requirement work item, for example, the row corresponding to each serial number in serial numbers 1-12 may be a requirement item (i.e., a sub-work item). The target data item may be data item A, data item B, data item C, data item D, data item E, data item F, data item G, or data item H in the first row, etc. Each target data item is provided with one or more attribute fields. The attribute value of each sub-work item relative to the target work item may be determined according to the attribute field corresponding to the target data item. For example, for data item A, the attribute value corresponding to sub-work item 1 is attribute value A1. In response to adding or changing the attribute field of data item A, a first batch task for updating the attribute value of each sub-work item relative to data item A is created. The first batch task is used to update attribute value A1, attribute value A2, attribute value A3, attribute value A4, attribute value A5, attribute value A6 one by one... The update of each attribute value may correspond to a sub-task. For example, executing subtask 1 of the first batch task created for data item A can update attribute value A1, executing subtask 2 can update attribute value A2, and so on. When the first batch task is completed, the attribute values ​​corresponding to all sub-data items under data item A are also completely updated.

[0042] S120 . In response to a second update operation on the target data item, create a second batch task, stop executing the first batch task, and start executing the second batch task.

[0043] The second batch task includes a plurality of subtasks for updating the attribute value of each sub-data item in the target data item based on the second update operation.

[0044] Similarly, the second update operation for the target data item may be an operation for modifying the attribute field corresponding to the target data item or an operation for adding the target data item. It should be noted that the first update operation and the second update operation may be the same or different in the way the attribute value of each sub-data item in the target data item is updated (such as the update order and / or the calculation method, etc.). The attribute field corresponding to the target data item may include a calculation field. Optionally, the first update operation and / or the second update operation at least include a modification operation for the calculation field corresponding to the target data item. Among them, the calculation field may be a field used to indicate the calculation method of the attribute value of the sub-data item.

[0045] In the disclosed embodiment, the execution of a batch task requires the recalculation of all attribute fields related to the target data item of all instances in the space. Specifically, in response to a second update operation for the target data item, a second batch task corresponding to the second update operation is created, and the execution of the first batch task is stopped, and the execution of the second batch task is started. Optionally, the execution of the first batch task is stopped and the execution of the second batch task is started, including: stopping the execution of unexecuted subtasks in the first batch task, and starting to execute the subtasks of the second batch task one by one. It can be understood that the update objects of the first batch task and the second batch task are the same, which are the attribute values ​​of each sub-data item in the target data item.

[0046] In the related art, if the attribute values ​​of multiple sub-data items corresponding to the target data item need to be updated, it is necessary to create a batch task to achieve this. However, the time to execute a batch task is uncertain. If the amount of calculation of the batch task is large, the execution time may take minutes. If the update method of the attribute value corresponding to the sub-data item changes multiple times, it will trigger the creation of multiple batch tasks in succession. After the batch tasks are generated continuously, in order to ensure the final consistency, the batch tasks generated later need to wait for the execution of the previous batch tasks before they can start to execute.

[0047] In order to ensure the final consistency, the batch tasks generated later cannot be executed first, otherwise the final inconsistency will occur. Since batch tasks need to be queued for execution, users need to wait for a while for their last update operation to actually start executing, which affects the user experience. Moreover, after the batch tasks are continuously generated, the execution results of the previous tasks are actually no longer necessary, so executing the previous batch tasks is a waste of computing and storage resources, which will increase infrastructure costs.

[0048] In the embodiment of the present disclosure, in response to the second update operation on the target data item, a second batch task is created, and the execution of the first batch task is stopped, and the execution of the second batch task is started. This is especially only used for such repeated appended batch tasks to be executed, but only the task result of the last created batch task is expected. The execution of the latest batch task can be quickly started and the batch task being executed can be discarded, thereby solving the above-mentioned problem.

[0049] The technical solution of the disclosed embodiment is to execute a first batch task for a target data item containing multiple sub-data items in response to a first update operation on the target data item, so as to update the attribute value of each sub-data item in the target data item by executing the sub-task of the first batch task; then, when receiving a second update operation on the target data item, in response to the second update operation on the target data item, create a second batch task, stop executing the first batch task, and start executing the second batch task, so as to update the attribute value of each sub-data item in the target data item based on the second update operation, and when a new batch task is generated, the batch task being executed can be discarded, and the execution of the new batch task can be quickly started, which not only saves computing power but also advances the execution timing of the second batch task, solves the technical problems of long time consumption in obtaining the latest execution result of the batch task and low execution efficiency of the batch task, and realizes the technical effect of effectively saving resources consumed by task execution, improving the execution efficiency of the batch task, and enhancing the user experience while ensuring the final consistency of the batch task.

[0050] Figure 2 A flowchart of another task execution method provided by an embodiment of the present disclosure. The technical solution of this embodiment is based on the above-mentioned embodiment, and adds a technical description of how to determine that a second update operation for a target data item has been received. Optionally, the task execution method also includes: determining a second batch task corresponding to the first batch task when it is detected that a preset task detection condition has been met; and determining that a second update operation for the target data item has been received when the creation time of the second batch task is later than the creation time of the first batch task. For specific implementation methods, please refer to the description of this embodiment. Among them, technical features that are the same or similar to those of the above-mentioned embodiments are not repeated here.

[0051] like Figure 2 As shown, the method of this embodiment may specifically include:

[0052] S210 . For a target data item including a plurality of sub-data items, in response to a first update operation on the target data item, execute a first batch task.

[0053] S220 : In response to a second update operation on the target data item, create a second batch task.

[0054] S230: When it is detected that a preset task detection condition is met, determine a second batch of tasks corresponding to the first batch of tasks.

[0055] Among them, the task detection conditions can be set according to actual needs, for example, real-time detection can be performed or detection can be performed in response to a preset trigger event, etc. The specific content of the task detection conditions is not limited in the embodiments of the present disclosure.

[0056] For example, the preset task detection condition may include but is not limited to at least one of the following conditions:

[0057] For each subtask in the first batch of tasks, before each subtask is executed;

[0058] The time interval from the last task detection time reaches the preset time interval;

[0059] The current time point is the preset task detection time point;

[0060] When creating the second batch of tasks.

[0061] The second batch task is the latest batch task corresponding to the target data item. In other words, the second batch task is the batch task whose creation time is closest to the current moment.

[0062] Optionally, determining the second batch task corresponding to the first batch task includes: determining the second batch task corresponding to the first batch task through the attribute field of the target data item corresponding to the first batch task and the creation time of the batch task corresponding to the attribute field. Alternatively, determining the second batch task through the second task identifier corresponding to the second batch task stored in the preset storage space. The preset storage space may be a pre-set space that can store the second task identifier. For example, the preset storage space may be a global storage space, such as Redis or other storage spaces.

[0063] S240: When the creation time of the second batch of tasks is later than the creation time of the first batch of tasks, stop executing the first batch of tasks and start executing the second batch of tasks.

[0064] It should be noted that the first batch task and the second batch task in the embodiment of the present disclosure may be the same batch task or different batch tasks. Specifically, whether the first batch task and the second batch task are the same batch task can be determined by the creation time of the second batch task and the first batch task. It is also possible to determine whether the second batch task is the latest batch task corresponding to the target data item when the first batch task and the second batch task are different.

[0065] It can be understood that the creation time of the second batch task is later than the creation time of the first batch task, which means that the second batch task and the first batch task are different batch tasks, and the second batch task is newer than the first batch task, that is, there are continuous updates of batch tasks, and the currently executed first batch task is not the latest batch task, which can be discarded in the scenario of eventual consistency. The second batch task is the batch task created later, that is, the batch task that the user pays more attention to. At this time, the execution of the first batch task can be stopped and the execution of the second batch task can be started.

[0066] Based on any optional technical solution of the disclosed embodiment, the task execution method further includes: when the creation time of the second batch task is the same as the creation time of the first batch task, continue to execute the first batch task. It can be understood that if the creation time of the second batch task is the same as the creation time of the first batch task, it means that the second batch task is the same as the first batch task, that is, the first batch task currently being executed is the latest batch task, therefore, the first batch task can continue to be executed, and the execution efficiency of the batch tasks can be guaranteed under the premise of ensuring final consistency.

[0067] Based on any optional technical solution of the disclosed embodiment, the task execution method further includes: when the creation time of the second batch of tasks is earlier than the creation time of the first batch of tasks, continuing to execute the first batch of tasks and generating alarm information for prompting business logic abnormalities.

[0068] It should be noted that, in theory, if the creation time of the first batch task being executed or having been executed is later than the creation time of the latest batch task, an alarm is required so that the user can check whether there is a logical problem and eliminate the vulnerability.

[0069] The technical solution of the disclosed embodiment can automatically detect new batch tasks by determining the second batch task corresponding to the first batch task when it is detected that the preset task detection condition is met, thereby providing a guarantee for the timely execution of the new batch task. Furthermore, when the creation time of the second batch task is later than the creation time of the first batch task, it is determined that the second update operation for the target data item is received, and it can be determined whether the first batch task being executed is the latest batch task through the creation time of the second batch task and the first batch task, thereby ensuring the final consistency of task execution, so that no matter how many times the batch task is created and what the concurrent execution relationship is, the final data must be consistent with the last task instruction.

[0070] Figure 3A flowchart of another task execution method provided by an embodiment of the present disclosure. The technical solution of this embodiment is based on the above-mentioned embodiment, and adds a technical description of how to determine the order of creation time of the second batch task and the first batch task. Optionally, the task execution method also includes: obtaining a first task identifier corresponding to the first batch task and a second task identifier corresponding to the second batch task, wherein the second batch task is the latest batch task corresponding to the target data item; determining whether the creation time of the second batch task is later than the creation time of the first batch task based on the first task identifier and the second task identifier. The specific implementation method can be found in the description of this embodiment. Among them, the technical features that are the same or similar to those of the above-mentioned embodiments are not repeated here.

[0071] like Figure 3 As shown, the method of this embodiment may specifically include:

[0072] S310 . For a target data item including a plurality of sub-data items, in response to a first update operation on the target data item, execute a first batch task.

[0073] Specifically, in response to a first update operation on a target data item, a first batch task for the target data item is created, and a first task identifier corresponding to the first task is recorded. Optionally, the first task identifier corresponding to the first batch task is generated based on the creation time of the first batch task. Exemplarily, the first task identifier may be a timestamp generated based on the creation time of the first batch task, or a version number generated based on the creation time of the first batch task. The version number may include one of information such as numbers, text, and symbols, or a combination of multiple information.

[0074] S320: In response to a second update operation on the target data item, create a second batch task.

[0075] S330: When it is detected that a preset task detection condition is met, determine a second batch of tasks corresponding to the first batch of tasks.

[0076] It should be noted that determining the second batch task corresponding to the first batch task does not mean executing the second batch task. The purpose of determining the second batch task is to determine the latest batch task, which is used to further verify whether the first batch task is the latest batch task.

[0077] S340: Obtain a first task identifier corresponding to the first batch of tasks and a second task identifier corresponding to the second batch of tasks.

[0078] Optionally, after creating the second batch of tasks, the method further includes: generating a second task identifier of the second batch of tasks based on the creation time of the second batch of tasks, and storing the second task identifier in a preset storage space.

[0079] The second task identifier is a task identifier corresponding to the second batch task. In order to facilitate the subsequent application of the first task identifier and the second task identifier, the second task identifier can be generated in the same manner as the first task identifier. Similarly, the second task identifier can be a timestamp generated based on the creation time of the second batch task, or a version number generated based on the creation time of the second batch task. The version number can include one of the information such as numbers, text and symbols, or a combination of multiple information.

[0080] In the disclosed embodiment, for the first batch task being executed, before executing each subtask of the first batch task, the second task identifier corresponding to the second batch task corresponding to the first batch task can be obtained in advance. The first task identifier of the first batch task corresponding to the subtask to be executed is determined, and then, based on the first task identifier and the second task identifier, it is determined which task of the first batch task and the second batch task is the latest batch task.

[0081] S350: Determine whether the creation time of the second batch of tasks is later than the creation time of the first batch of tasks based on the first task identifier and the second task identifier.

[0082] Specifically, the first task identifier and the second task identifier may be compared, and based on the comparison result, it is determined whether the creation time of the second batch of tasks is later than the creation time of the first batch of tasks.

[0083] S360: When the creation time of the second batch of tasks is later than the creation time of the first batch of tasks, stop executing the first batch of tasks and start executing the second batch of tasks.

[0084] Based on any optional technical solution of the disclosed embodiment, the task execution method further includes: if the second task identifier is not obtained, continuing to execute the first batch task. Further, it can also be used to prompt that the prompt information of generating the second task identifier is not obtained, so as to facilitate the user to check.

[0085] The technical solution of the disclosed embodiment determines whether the creation time of the first batch task is earlier or later than the creation time of the second batch task based on the first task identifier corresponding to the first batch task and the second task identifier corresponding to the second batch task. Without complicated processing procedures, it is possible to simply and quickly determine whether the second batch task is a batch task newer than the first batch task, thereby fully ensuring the execution efficiency of the latest batch tasks.

[0086] Figure 4 A schematic diagram of the structure of a task execution device provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the device includes: a task execution module 410 and a task update module 420.

[0087] Among them, the task execution module 410 is used to execute a first batch task for a target data item containing multiple sub-data items in response to a first update operation on the target data item, wherein the first batch task includes multiple sub-tasks for updating the attribute value of each of the sub-data items in the target data item based on the first update operation; the task update module 420 is used to create a second batch task in response to a second update operation on the target data item, and stop executing the first batch task and start executing the second batch task, wherein the second batch task includes multiple sub-tasks for updating the attribute value of each of the sub-data items in the target data item based on the second update operation.

[0088] The technical solution of the disclosed embodiment is to execute a first batch task for a target data item containing multiple sub-data items in response to a first update operation on the target data item, so as to update the attribute value of each sub-data item in the target data item by executing the sub-task of the first batch task; then, when receiving a second update operation on the target data item, in response to the second update operation on the target data item, create a second batch task, stop executing the first batch task, and start executing the second batch task, so as to update the attribute value of each sub-data item in the target data item based on the second update operation, and when a new batch task is generated, the batch task being executed can be discarded, and the execution of the new batch task can be quickly started, which not only saves computing power but also advances the execution timing of the second batch task, solves the technical problems of long time consumption in obtaining the latest execution result of the batch task and low execution efficiency of the batch task, and realizes the technical effect of effectively saving resources consumed by task execution, improving the execution efficiency of the batch task, and enhancing the user experience while ensuring the final consistency of the batch task.

[0089] On the basis of any optional technical solution of the disclosed embodiment, optionally, the task execution device further includes: a detection trigger module and an operation update module. The detection trigger module is used to determine the second batch task corresponding to the first batch task when it is detected that the preset task detection condition is met before the first batch task is stopped and the second batch task is started; the operation update module is used to stop the first batch task and start the second batch task when the creation time of the second batch task is later than the creation time of the first batch task. .

[0090] On the basis of any optional technical solution of the disclosed embodiment, optionally, the task execution device further includes: a task identification acquisition module and a creation time determination module. The task identification acquisition module is used to acquire a first task identification corresponding to the first batch task and a second task identification corresponding to the second batch task, wherein the second batch task is the latest batch task corresponding to the target data item; the creation time determination module is used to determine whether the creation time of the second batch task is later than the creation time of the first batch task based on the first task identification and the second task identification.

[0091] Based on any optional technical solution of the embodiment of the present disclosure, optionally, the task execution device also includes an identifier creation module, which is used to generate a second task identifier of the second batch task based on the creation time of the second batch task after creating the second batch task, and store the second task identifier in a preset storage space.

[0092] Based on any optional technical solution of the embodiment of the present disclosure, optionally, the task execution device further includes a continuing execution module, wherein the continuing execution module is used to continue executing the first batch task when the creation time of the second batch task is the same as the creation time of the first batch task, or when the second task identifier is not obtained.

[0093] Based on any optional technical solution of the embodiment of the present disclosure, optionally, the task execution device further includes an alarm module, wherein the alarm module is used to continue to execute the first batch of tasks and generate alarm information for indicating business logic abnormality when the creation time of the second batch of tasks is earlier than the creation time of the first batch of tasks.

[0094] Based on any optional technical solution of the embodiment of the present disclosure, optionally, the task updating module is specifically used to:

[0095] Stop executing the unexecuted subtasks in the first batch of tasks, and start executing the subtasks of the second batch of tasks one by one.

[0096] Based on any optional technical solution of the embodiment of the present disclosure, optionally, the first update operation and / or the second update operation at least includes a modification operation on the calculation field corresponding to the target data item.

[0097] The task execution device provided in the embodiments of the present disclosure can execute the task execution method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects for executing the task execution method.

[0098] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0099] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 , which shows an electronic device (eg, Figure 5 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0100] like Figure 5 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.

[0101] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0102] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0103] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0104] The electronic device provided by the embodiment of the present disclosure and the task execution method provided by the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0105] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the task execution method provided by the above embodiments is implemented.

[0106] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0107] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0108] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0109] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device: executes a first batch task for a target data item containing multiple sub-data items in response to a first update operation on the target data item, wherein the first batch task includes multiple sub-tasks for updating the attribute value of each of the sub-data items in the target data item based on the first update operation; creates a second batch task in response to a second update operation on the target data item, stops executing the first batch task, and starts executing the second batch task, wherein the second batch task includes multiple sub-tasks for updating the attribute value of each of the sub-data items in the target data item based on the second update operation.

[0110] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0111] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0112] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0113] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0114] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0115] According to one or more embodiments of the present disclosure, [Example 1] provides a task execution method, including:

[0116] For a target data item including a plurality of sub-data items, in response to a first update operation on the target data item, executing a first batch task, wherein the first batch task includes a plurality of sub-tasks for updating a property value of each of the sub-data items in the target data item based on the first update operation;

[0117] In response to a second update operation on the target data item, a second batch task is created, and the execution of the first batch task is stopped and the execution of the second batch task is started, wherein the second batch task includes multiple subtasks for updating the attribute value of each of the sub-data items in the target data item based on the second update operation.

[0118] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further comprising:

[0119] Optionally, before stopping the execution of the first batch of tasks and starting the execution of the second batch of tasks, the method further includes:

[0120] In the case where it is detected that a preset task detection condition is met, determining a second batch of tasks corresponding to the first batch of tasks;

[0121] When the creation time of the second batch of tasks is later than the creation time of the first batch of tasks, it is determined that a second update operation for the target data item is received.

[0122] According to one or more embodiments of the present disclosure, [Example 3] provides the method of Example 2, further comprising:

[0123] Optionally, obtaining a first task identifier corresponding to the first batch task and a second task identifier corresponding to the second batch task, wherein the second batch task is the latest batch task corresponding to the target data item;

[0124] It is determined whether the creation time of the second batch of tasks is later than the creation time of the first batch of tasks based on the first task identifier and the second task identifier.

[0125] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 3, further comprising:

[0126] Optionally, after creating the second batch of tasks, the method further includes:

[0127] A second task identifier of the second batch task is generated based on the creation time of the second batch task, and the second task identifier is stored in a preset storage space.

[0128] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 2, further comprising:

[0129] Optionally, when the creation time of the second batch of tasks is the same as the creation time of the first batch of tasks, or when the second task identifier is not obtained, the first batch of tasks continues to be executed.

[0130] According to one or more embodiments of the present disclosure, [Example 6] provides the method of Example 2, further comprising:

[0131] Optionally, when the creation time of the second batch of tasks is earlier than the creation time of the first batch of tasks, the first batch of tasks continues to be executed, and alarm information for prompting a business logic abnormality is generated.

[0132] According to one or more embodiments of the present disclosure, [Example 7] provides the method of Example 1, further comprising:

[0133] Optionally, the stopping of executing the first batch of tasks and starting of executing the second batch of tasks includes:

[0134] Stop executing the unexecuted subtasks in the first batch of tasks, and start executing the subtasks of the second batch of tasks one by one.

[0135] According to one or more embodiments of the present disclosure, [Example 8] provides the method of Example 1, further comprising:

[0136] Optionally, the first update operation and / or the second update operation at least includes a modification operation on a calculation field corresponding to the target data item.

[0137] According to one or more embodiments of the present disclosure, [Example 9] provides a task execution device, including:

[0138] a task execution module, configured to execute a first batch task for a target data item including a plurality of sub-data items in response to a first update operation for the target data item, wherein the first batch task includes a plurality of sub-tasks for updating a property value of each of the sub-data items in the target data item based on the first update operation;

[0139] A task update module is used to create a second batch task in response to a second update operation on the target data item, stop executing the first batch task, and start executing the second batch task, wherein the second batch task includes multiple subtasks for updating the attribute value of each of the sub-data items in the target data item based on the second update operation.

[0140] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0141] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0142] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A task execution method, characterized in that: include: For a target data item including a plurality of sub-data items, in response to a first update operation on the target data item, a first batch task is executed, wherein the first batch task includes a plurality of sub-tasks for updating the attribute value of each of the sub-data items in the target data item based on the first update operation, the target data item is an entry for managing information of a plurality of sub-data items, and is used to characterize the type of information included in the sub-data item, the attribute value of the sub-data item is determined by an attribute field corresponding to the target data item, and the first update operation is an operation of modifying the attribute field corresponding to the target data item or an operation of adding a target data item; In response to a second update operation on the target data item, a second batch task is created, and the execution of the first batch task is stopped and the execution of the second batch task is started, wherein the second batch task includes multiple subtasks for updating the attribute value of each of the sub-data items in the target data item based on the second update operation.

2. The task execution method according to claim 1, characterized in that: Before stopping the execution of the first batch of tasks and starting the execution of the second batch of tasks, the method further includes: In the case where it is detected that a preset task detection condition is met, determining a second batch of tasks corresponding to the first batch of tasks; In a case where the creation time of the second batch of tasks is later than the creation time of the first batch of tasks, an operation of stopping the execution of the first batch of tasks and starting the execution of the second batch of tasks is performed.

3. The task execution method according to claim 2, characterized in that: Also includes: Obtaining a first task identifier corresponding to the first batch task and a second task identifier corresponding to the second batch task, wherein the second batch task is the latest batch task corresponding to the target data item; It is determined whether the creation time of the second batch of tasks is later than the creation time of the first batch of tasks based on the first task identifier and the second task identifier.

4. The task execution method according to claim 3, characterized in that: After creating the second batch of tasks, the method further includes: A second task identifier of the second batch task is generated based on the creation time of the second batch task, and the second task identifier is stored in a preset storage space.

5. The task execution method according to claim 3, characterized in that: Also includes: When the creation time of the second batch of tasks is the same as the creation time of the first batch of tasks, or when the second task identifier is not obtained, the first batch of tasks continues to be executed.

6. The task execution method according to claim 2, characterized in that: Also includes: In the case that the creation time of the second batch of tasks is earlier than the creation time of the first batch of tasks, the first batch of tasks continues to be executed, and alarm information for prompting a business logic abnormality is generated.

7. The task execution method according to claim 1, characterized in that: The stopping of executing the first batch of tasks and starting to execute the second batch of tasks includes: Stop executing the unexecuted subtasks in the first batch of tasks, and start executing the subtasks of the second batch of tasks one by one.

8. The task execution method according to claim 1, characterized in that: The first update operation and / or the second update operation at least includes a modification operation on a calculation field corresponding to the target data item.

9. A task execution device, characterized in that: include: A task execution module, for executing a first batch task in response to a first update operation on a target data item containing a plurality of sub-data items, wherein the first batch task includes a plurality of sub-tasks for updating an attribute value of each of the sub-data items in the target data item based on the first update operation, the target data item is an entry for managing information of a plurality of sub-work items, and is used to characterize a type of information contained in the sub-work item, the attribute value of the sub-data item is determined by an attribute field corresponding to the target data item, and the first update operation is an operation for modifying an attribute field corresponding to the target data item or an operation for adding a target data item; A task update module is used to create a second batch task in response to a second update operation on the target data item, stop executing the first batch task, and start executing the second batch task, wherein the second batch task includes multiple subtasks for updating the attribute value of each of the sub-data items in the target data item based on the second update operation.

10. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the task execution method as described in any one of claims 1 to 8.

11. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the task execution method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Relational database updating method and device, equipment and storage medium

    CN111488366A

  • Dynamic selection of synchronization update path

    US20220075770A1