A task execution method and device, a storage medium, and an electronic device

By updating task execution instructions in real time via the server, the problem of terminal devices being unable to adjust in a timely manner after changes in task configuration information is solved, thereby improving task execution efficiency and success rate and reducing resource waste.

CN119182660BActive Publication Date: 2025-12-16GUANGZHOU YIHU NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411216676.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2025-12-16
Estimated Expiration
2044-08-30

AI Technical Summary

Technical Problem

In existing technologies, after the task configuration information is changed, the terminal device cannot update the task execution instructions in a timely manner, resulting in low task execution efficiency and waste of resources.

Method used

The server monitors changes to task configuration information, generates and sends updated task execution instructions, causing the terminal device to immediately stop the old instructions and execute the task according to the new instructions, and performs anomaly detection.

Benefits of technology

It improved the efficiency and success rate of task execution, reduced resource waste, and ensured information consistency and business progress.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182660B_ABST
    Figure CN119182660B_ABST
Patent Text Reader

Abstract

The specification discloses a task execution method and device, a storage medium and an electronic device, specifically comprising: generating original task execution instructions corresponding to a target task according to obtained task configuration information and sending the original task execution instructions to a target terminal device for execution. When it is determined that the task configuration information corresponding to the target task is changed, the task execution instructions can be updated according to the changed task configuration information, so that the target terminal device can execute the target task according to the updated task execution instructions. Through the method in the specification, the information consistency between the server side scheduling the task and the terminal device executing the task can be effectively ensured, and the terminal device executing the task according to the old configuration information after the configuration information is changed can be avoided, time consumption and execution cost are greatly saved, the execution efficiency of the target task is effectively improved, and the overall promotion speed of the business to which the target task belongs is also improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present specification relates to the field of data processing, and in particular, to a task execution method and device, a storage medium, and an electronic device. BACKGROUND

[0002] With the continuous progress and innovation of network technology, at present, each technical field related to computer network will more or less involve the use of network technology to realize multi-threaded or multi-device task scheduling. Reasonable task scheduling process can effectively promote the normal execution of the overall business and improve the execution efficiency.

[0003] Although reasonable task scheduling can bring certain convenience to business execution, there are still some obvious defects and problems that have not been solved. In the current technology, when the configuration information of the executing task is changed during the normal execution of the task, the terminal device executing the task often cannot immediately replace the configuration information of the task being executed, and even needs to still execute the task according to the original task configuration until the execution ends, and then execute the updated task according to the changed task configuration. In this case, the repeated execution of the same task part will seriously hinder the task execution efficiency of the changed task, and the time and computing resources consumed by executing the task according to the original task configuration until the end, resulting in an increase in the execution cost of the overall business, and thus affecting the business promotion efficiency and cost consumption.

[0004] Therefore, how to more efficiently execute the changed target task is a crucial problem. SUMMARY

[0005] The present specification provides a task execution method, device, storage medium, and electronic device to partially solve the above problems existing in the prior art.

[0006] The present specification adopts the following technical solutions:

[0007] The present specification provides a task execution method, comprising:

[0008] obtaining task configuration information for a target task;

[0009] generating original task execution instructions corresponding to the target task according to the task configuration information;

[0010] sending the original task execution instructions to a target terminal device, so that the target terminal device executes the target task according to the original task execution instructions;

[0011] when it is monitored that the task configuration information is changed during the execution of the target task according to the original task execution instructions, updating the task execution instructions according to the changed task configuration information;

[0012] sending the updated task execution instruction to the target terminal device, so that the target terminal device stops continuing to execute the target task according to the original task execution instruction when receiving the updated task execution instruction, and executes the target task according to the updated task execution instruction.

[0013] Optionally, before the step of sending the original task execution instruction to the target terminal device, so that the target terminal device executes the target task according to the original task execution instruction, the method further comprises:

[0014] determining device parameter requirement information corresponding to the target task according to the task configuration information, the device parameter requirement information being used to represent device parameter requirements of a target terminal device for executing the target task;

[0015] determining a terminal device meeting the device parameter requirement information corresponding to the device parameter requirement information as the target terminal device according to the device parameter requirement information.

[0016] Optionally, when the task configuration information is monitored to be changed in the process that the target task is executed according to the original task execution instruction, the step of updating the task execution instruction according to the changed task configuration information comprises:

[0017] when the task configuration information is monitored to be changed in the process that the target task is executed according to the original task execution instruction, obtaining task progress information of the target terminal device executing the target task according to the original task execution instruction;

[0018] updating the task execution instruction according to the task progress information and the changed task configuration information.

[0019] Optionally, the step of sending the updated task execution instruction to the target terminal device, so that the target terminal device stops continuing to execute the target task according to the original task execution instruction when receiving the updated task execution instruction, and executes the target task according to the updated task execution instruction comprises:

[0020] determining common task progress between executing the target task according to the original task execution instruction and executing the target task according to the updated task execution instruction according to the updated task execution instruction and the original task execution instruction.

[0021] stopping the execution of the target task according to the original task execution instruction, saving task progress information corresponding to the common task progress when the target task is executed according to the original task execution instruction, and executing other task progress of the target task except the common task progress according to the updated task execution instruction.

[0022] Optionally, the method further comprises:

[0023] obtaining associated information of the target terminal device when the target task is executed, wherein the associated information comprises at least one of task execution state information of the target terminal device when the target task is executed and device running parameter of the target terminal device when the target task is executed;

[0024] performing abnormality detection on the target task executed by the target terminal device according to the associated information.

[0025] Optionally, performing abnormality detection on the target task executed by the target terminal device according to the associated information specifically comprises:

[0026] predicting an execution time length required for the target terminal device to complete the target task as a predicted execution time length according to the task execution state information, and determining an execution time length actually required for the target terminal device to complete the target task as an actual execution time length;

[0027] performing abnormality detection on the target task executed by the target terminal device according to the predicted execution time length and the actual execution time length.

[0028] Optionally, performing abnormality detection on the target task executed by the target terminal device according to the associated information specifically comprises:

[0029] performing abnormality detection on the target task executed by the target terminal device according to the device running parameter and a preset safe interval of the device running parameter.

[0030] The present specification provides a task execution apparatus, comprising:

[0031] an obtaining module configured to obtain task configuration information for a target task;

[0032] an instruction generating module configured to generate original task execution instruction corresponding to the target task according to the task configuration information;

[0033] a first execution module configured to send the original task execution instruction to a target terminal device, so that the target terminal device executes the target task according to the original task execution instruction.

[0034] a task updating module, configured to, when it is monitored that the task configuration information is changed in the process in which the target task is executed according to the original task execution instruction, update the task execution instruction according to the changed task configuration information;

[0035] a second execution module, configured to send the updated task execution instruction to the target terminal device, so that the target terminal device stops continuing to execute the target task according to the original task execution instruction and executes the target task according to the updated task execution instruction when the updated task execution instruction is received.

[0036] The specification provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the task execution method.

[0037] The specification provides an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the task execution method when executing the program.

[0038] The above at least one technical solution adopted by the specification can achieve the following beneficial effects:

[0039] As can be seen from the above method, in the task execution method provided by the specification, the original task execution instruction corresponding to the target task can be generated according to the obtained task configuration information and sent to the target terminal device for execution. When it is determined that the task configuration information corresponding to the target task is changed, the task execution instruction can be updated according to the changed task configuration information, so that the target terminal device can execute the target task according to the updated task execution instruction.

[0040] As can be seen from the above content, the task execution method provided by the specification can update the original task execution instruction after determining that the task configuration information is changed, so that the target terminal device can execute the target task according to the updated task execution instruction. Through the method in the specification, the information consistency between the server side scheduling the task and the terminal device executing the task can be effectively guaranteed, and the terminal device executing the task according to the old configuration information is avoided, which greatly saves resource consumption and improves the execution efficiency of the target task. The method in the specification can also detect the execution process of the target task, effectively detect potential abnormal problems that may affect the execution of the task in the execution process of the task, improve the execution success rate and execution efficiency of the target task, and improve the overall promotion speed of the business. BRIEF DESCRIPTION OF DRAWINGS

[0041] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:

[0042] Figure 1 This is a flowchart illustrating one task execution method provided in this specification;

[0043] Figure 2 This is a flowchart illustrating the overall process structure of a task execution method provided in this specification.

[0044] Figure 3 This is a schematic diagram of a task execution device provided in this specification;

[0045] Figure 4 The one provided in this specification corresponds to Figure 1 A schematic diagram of the structure of an electronic device. Detailed Implementation

[0046] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.

[0047] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0048] Figure 1 This is a flowchart illustrating a task execution method provided in this specification, including the following steps:

[0049] S101: Obtain task configuration information for the target task.

[0050] S102: Generate the original task execution instruction corresponding to the target task based on the task configuration information.

[0051] At present, with the progress of computer technology, task scheduling involving multi-threading or multi-device is widely used in various technical fields. Although the use of reasonable task scheduling can effectively improve the efficiency of business execution, in the current technology, when the configuration information corresponding to the task changes, the target task executed by the execution task device cannot be changed in time. In this case, executing the target task corresponding to the old task configuration not only seriously reduces the execution efficiency of the updated task, but also wastes time cost and computing resources, thereby affecting the promotion efficiency of the overall business. Therefore, how to efficiently execute the updated target task is a very important problem.

[0052] Therefore, the present specification provides a task execution method, wherein the execution subject of the method provided by the present specification can be a server, or a terminal device such as a desktop computer, a notebook computer, etc., and in addition, the execution subject of the present specification can also be a software form of subject, such as a client installed in a terminal device, etc. For the sake of convenience, the present specification will only take the server as the execution subject to explain the task execution method provided.

[0053] Based on this, the server applying the task execution method provided by the present specification can generate the corresponding original task execution instruction according to the original task execution instruction, and send the original task execution to the target terminal device. After determining that the task configuration information has changed, the original task execution instruction is updated, so that the target terminal device can execute the target task according to the updated task execution instruction.

[0054] Among them, the application scenario of the server performing task execution for the target task can be flexibly changed according to actual application requirements. For example, in the field of industrial manufacturing, the server applying the method in the present specification can generate the corresponding original task execution instruction according to the preset task configuration information in the industrial manufacturing scene and send it to the target terminal device for executing the corresponding target task, such as numerical control machine tool, high-voltage power distribution device, etc. Then, the server can update the original task execution instruction based on the changed task configuration information after determining that the task configuration information has changed, and send it to the corresponding target terminal device, so that the target terminal device can execute the target task according to the updated task execution instruction. Effectively guarantee the execution efficiency of the target task, and to a certain extent, avoid the cost waste in executing the task.

[0055] For example, in the field of game operation and development, the server applying the method in the specification can send corresponding original task execution instructions to the server responsible for maintaining game operation according to the task configuration information set by the game developer, so that the server responsible for maintaining game operation executes the corresponding target task according to the received original task execution instructions. After determining that the task configuration information has changed, the server applying the method in the specification can send the corresponding updated task instruction information to the server responsible for maintaining game operation, so that the server responsible for maintaining game operation adjusts the execution of the target task according to the updated task instruction information in a timely manner. The overall game business promotion efficiency is effectively improved, and resource waste in the task execution process caused by delayed task information is avoided.

[0056] In the specification, the server can obtain task configuration information for the target task set by the relevant developer in advance, and generate original task execution instructions corresponding to the target task according to the obtained task configuration information. The task configuration information can be set in the database by the relevant developer in advance.

[0057] In the specification, the specific content of the preset task configuration information is not strictly limited, and can be flexibly set according to the actual task requirements in different application fields. Specifically, it can include but is not limited to: task name or task ID, task execution time or execution period, task specific content and process, task initial configuration parameter, etc.

[0058] The specific data form of the task configuration information is not strictly limited in the specification, and can be a data format commonly used in the current technology, such as JavaScript Object Notation (JSON) format, eXtensible Markup Language (XML) format, YAML Ain't Markup Language (YAML) format, etc. The original task execution instructions generated by the server according to the task configuration information can be used to instruct the information in the task configuration information, so that the terminal device receiving the original task execution instructions later can determine the specific execution process of the target task by analyzing the original task execution instructions. The specific data format of the original task execution instructions can be, for example, machine language or assembly language instructions, code snippets of scripting languages (such as Python, Shell, Perl), etc. The data form can be flexibly set according to the actual application scenario.

[0059] S103: Send the original task execution instructions to the target terminal device, so that the target terminal device executes the target task according to the original task execution instructions.

[0060] In the present specification, after determining the original task execution instruction corresponding to the target task according to the task configuration information, the server can input the determined original task execution instruction into the target terminal device, so that the target terminal device can execute the corresponding target task according to the original task execution instruction.

[0061] In the present specification, after determining the original task execution instruction corresponding to the target task according to the task configuration information, the server can input the determined original task execution instruction into the target terminal device, so that the target terminal device can execute the corresponding target task according to the original task execution instruction.

[0062] Of course, if the task configuration information of the target task is pre-configured with the device identifier of the terminal device that executes the target task, the server can also directly match the terminal device corresponding to the terminal identifier information in the task configuration information from the candidate terminal devices as the target terminal device according to the terminal identifier information in the task configuration information. Then, the server can input the determined original task execution instruction into the target terminal device determined according to the terminal identifier information in the task configuration information, so that the target terminal device can execute the corresponding target task.

[0063] S104: When the task configuration information is changed during the execution of the target task according to the original task execution instruction, updating the task execution instruction according to the changed task configuration information.

[0064] In the present specification, the server can monitor whether the task configuration information in the database is changed during the execution of the target task by the target terminal device according to the original task execution instruction. If it is monitored that the task configuration information is changed, the server can update the original task execution instruction according to the changed task configuration information to obtain the updated task execution instruction.

[0065] Specifically, when the task configuration information is changed during the execution of the target task by the target terminal device according to the obtained original task execution instruction, the server can obtain the task progress information corresponding to the execution of the target task by the target terminal device according to the original task execution instruction. The task progress information can be used to represent the progress ratio of the task content of the target task that has been executed compared to the overall target task execution process.

[0066] Then, the server can update part or all of the original task execution instruction according to the changed part of the changed task configuration information and the task progress information corresponding to the target task. For example, it is assumed that the target task corresponds to five task stages. When the target terminal device executes the target task according to the original task execution instruction to the third stage, the server monitors that the configuration information corresponding to the target task is modified, and determines that the main modified part corresponds to the last two task stages, i.e., the fourth stage and the fifth stage, of the five task stages of the target task according to the changed task configuration information. At this time, the server can only update the task execution instruction for executing the updated task content of the fourth stage and the fifth stage corresponding to the target task according to the original task execution instruction and the changed task configuration information. As for the first three task stages, the corresponding task configuration information has not been changed, so there is no need to generate a task execution instruction containing the instruction corresponding to the unmodified task stage.

[0067] In this way, the data volume of the updated task execution instruction can be effectively reduced, and the updating efficiency of the task execution instruction can be improved, thereby improving the execution efficiency of the target task after updating. If the changed part of the changed task configuration information conflicts with the task progress information corresponding to the target task, i.e., the modified part of the changed task configuration information contains at least one of the first three task stages of the target task in the above example, the server can determine that the task progress information corresponding to the target task executed by the target terminal device is invalid in the corresponding stage, and generate the updated task execution instruction corresponding to the corresponding stage and the subsequent stage, so that the target task can execute the target task according to the updated task execution instruction.

[0068] Still based on the above example, it is assumed that the changed task configuration information determines that the main modified part corresponds to the second task stage and the fifth task stage of the five task stages of the target task, and the task progress information corresponding to the target task still indicates that the target task has been executed to the third stage according to the original task execution instruction. At this time, the task configuration information corresponding to the second task stage has been changed, and the server can determine that the actual task content corresponding to the second task stage and the third task stage executed according to the original task execution instruction is invalid, but since the task configuration information corresponding to the first task stage has not been changed, the target terminal device does not need to execute the target task from the first task stage. Therefore, the server can only change the instruction content corresponding to the second task stage and the fifth task stage in the original task execution instruction, and generate an updated task execution instruction only for guiding the target terminal device to execute from the second task stage to the fifth task stage.

[0069] Of course, if the task configuration information is changed as a whole or directly from the execution start stage of the target task, the server can directly generate a complete updated task execution instruction according to the changed task configuration information, and send it to the target terminal device to make it execute the updated target task. In addition, if the task configuration information of the target task is executed to be deleted or stopped, the server can generate a task termination instruction for the target task and send it to the target terminal device that is executing the target task, so that the target terminal device stops executing the target task and timely stops the loss to avoid resource waste.

[0070] The above is an optional method for improving the efficiency of updating the task execution instruction. In addition, the server can generate an updated task execution instruction for the target terminal device to execute the complete target task according to the changed task configuration information, regardless of whether the task configuration information is partially updated or updated as a whole. The specific updating method of the task execution instruction is not strictly limited in the specification, and can be flexibly adjusted according to the actual application scenario.

[0071] S105: Send the updated task execution instruction to the target terminal device, so that the target terminal device stops executing the target task according to the original task execution instruction when receiving the updated task execution instruction, and executes the target task according to the updated task execution instruction.

[0072] In this specification, the server can send the updated task execution instruction to the target terminal device, so that the target terminal device stops executing the target task according to the original task execution instruction when receiving the updated task execution instruction, and executes the corresponding updated target task according to the updated task execution instruction.

[0073] Specifically, after generating the updated task execution instruction for the target terminal device to execute the complete target task, the server can determine the common task progress between executing the target task according to the original task execution instruction and executing the target task according to the updated task execution instruction according to the original task execution instruction and the updated task execution instruction of the target task. The so-called common task progress can be used to represent the common task execution content corresponding to the same instruction content when the target terminal device executes the target task according to the original task execution instruction and executes the target task according to the updated task execution instruction.

[0074] Then, the server can immediately stop continuing to execute the target task according to the original task execution instruction, and at the same time save the task progress information corresponding to the above common task progress when executing the target task according to the original task execution instruction. Next, according to the updated task execution instruction, on the basis of the saved task progress information corresponding to the common task progress, the other task progress except the common task progress in the task progress corresponding to the updated target task is executed.

[0075] For example, it is assumed that the actual execution stage corresponding to the target task has four stages. When the target terminal device executes the target task according to the original task execution instruction and completes the second stage, the server detects that the task configuration information corresponding to the target task has been changed, and determines that the changed part corresponds to the third execution stage of the target task according to the changed task configuration information, thereby determining the updated task execution instruction for executing the updated target task.

[0076] It can be seen that in the above example, the server can determine that the common task progress between the target terminal device executing the target task according to the original task execution instruction and executing the target task according to the updated task execution instruction is the first stage and the second stage of the target task. The fourth stage of the task configuration information is also not changed, but the target terminal device does not execute the fourth stage of the target task, so the task progress information corresponding to the fourth stage cannot be determined and saved. Therefore, the server can save the task progress information corresponding to the first stage and the second stage of the target terminal device executing the target task according to the original task execution instruction, and execute the updated third stage and the unchanged fourth stage of the target task based on the task progress information corresponding to the first stage and the second stage according to the updated task execution instruction. By this method, when executing the updated target task, the execution of the repeated task progress of the target task can be effectively reduced, the execution efficiency of the updated target task can be effectively improved, and the waste of computing resources can be reduced.

[0077] In addition, similar to the updating process of the task execution instruction described above, based on the above example, if it is determined according to the changed task configuration information that the changed part corresponds to the first execution stage of the target task, and it is determined that the updated task execution instruction is used to execute the target task after the complete update. At this time, the target terminal device has executed the target task according to the original task execution instruction and completed the second stage, the server can consider the task progress information corresponding to the first stage and the second stage of the target task executed according to the original task execution instruction as invalid, and immediately stop continuing to execute the target task according to the original task execution instruction, and execute the updated target task from the updated first stage according to the updated task execution instruction for executing the target task after the complete update. Of course, if there is no correlation between the first stage and the second stage of the target task corresponding to the target task, the server can also regard the second stage executed according to the original task execution instruction as the above-mentioned common task progress, and save the corresponding task progress information, so that the target terminal device can directly execute the third stage of the target task based on the saved task progress information of the second stage after executing the first stage according to the updated task execution instruction. In this way, the execution efficiency of the updated target task can be effectively improved.

[0078] In addition to the above, in the present specification, the server can also obtain the association information of the target terminal device when executing the target task. According to the association information, the server can detect the task execution process of the target terminal device for the target task. Among them, the association information of the target terminal device when executing the target task can be at least one of the task execution state information corresponding to the target task of the target terminal device when executing the target task, and the device running parameter corresponding to the target terminal device when executing the target task.

[0079] Specifically, when the association information is the task execution state information corresponding to the target task of the target terminal device when executing the target task, the server can predict the execution time required by the target terminal device to complete the target task according to the obtained task execution state information as the predicted execution time, and at the same time determine the execution time required by the target terminal device to actually complete the target task as the actual execution time. Then, according to the predicted execution time and the actual execution time corresponding to the target task, the server can detect the task execution process of the target terminal device for the target task.

[0080] In the present specification, considering that in actual application scenarios of performing tasks by multiple devices, the execution processes of each terminal device performing each task are complex and interleaved, and the required computing power for real-time monitoring of each task is relatively large. In this case, the server can be preset with a collection period for task execution state information, which can be used to define the time interval for the server to obtain the task execution state information corresponding to the target task or the device running parameter data corresponding to the target terminal device from the target terminal device. The server can collect the task execution state information corresponding to the target task from the target terminal device according to the preset collection period.

[0081] Then, the server can predict the predicted execution period number required for the target terminal device to normally execute and complete the target task according to the task execution instruction corresponding to the target task generated in the previous step, the preset collection period, and the task execution state information corresponding to each collection period. Next, the server can determine the actual execution period number corresponding to the target task, i.e., the actual execution time length, according to the difference period number between the collection period corresponding to the last task execution state information indicating that the target task is in the task non-execution state and the collection period corresponding to the first task execution state information indicating that the target task is in the task execution completion state.

[0082] The server can perform anomaly detection on the task execution process of the target task according to the predicted execution time length and the actual execution time length. Specifically, the server can determine whether the actual execution time length actually occupied by the end of the target task execution conforms to the predicted execution time length. If the actual execution time length is not greater than the predicted execution time length, the server can consider that the target task execution process is normally performed, and the corresponding anomaly detection result indicates that the target task execution process is normal. If the actual execution time length is greater than the predicted execution time length, the server can consider that the target task execution process is abnormally performed, and the corresponding anomaly detection result indicates that the target task execution process is abnormal.

[0083] At present, in the field of task execution management, if the task execution time of the target task exceeds the expectation, it is generally caused by abnormal problems in the task execution process, which delays or interrupts the task execution. The server applying the method in the present specification can accurately detect whether there is an abnormality in the execution process of the target task according to the actual execution time length and the predicted execution time length. Even if the target task has been successfully executed by the target terminal device, the server can still determine the task execution anomaly detection result corresponding to the target task according to the execution time length, so that potential problems that do not affect the final successful execution of the target task can be found in time, and relevant personnel can be alerted or prompted for maintenance, thereby improving the execution efficiency and success probability of subsequent target tasks.

[0084] In addition, if the server still does not obtain the first task execution state information indicating that the target task is in a task execution completion state after collecting the task execution state information of the target task for multiple rounds according to the preset collection period, the difference period number and the actual execution duration in the above steps cannot be determined. The server can determine that the execution process of the target task may be interrupted or abnormally delayed according to the preset collection period threshold, generate the corresponding abnormal detection result indicating that the target task execution has an abnormal problem, and timely alert the relevant maintenance personnel to process as soon as possible.

[0085] In addition to the above method of detecting the abnormality of the task execution process of the target task according to the collection period, the collected task execution state information can also include specific time record information of the change of the task state. The server can directly determine whether the actual execution duration of the target task meets the predicted execution duration according to the task state change time in the task execution state information, and generate the corresponding abnormal detection result.

[0086] In addition to the above, when the association information is the device running parameter of the target terminal device corresponding to the target terminal device when the target terminal device executes the target task, the server can detect the abnormality of the execution process of the target terminal device for the target task according to the obtained device running parameter of the target terminal device and the preset device running parameter safety interval.

[0087] Similar to the above abnormal detection process according to the task execution state information, when obtaining the device running parameter of the target terminal device, the server can also obtain the device running parameter of the target terminal device according to the preset collection period. The device running parameter can specifically be used to indicate the specific value of each running parameter of the target terminal device in the corresponding collection period, and can include but is not limited to device running parameters such as CPU occupancy rate, memory occupancy rate, network bandwidth, etc.

[0088] Specifically, the server can determine whether the value of each device running parameter in the device running parameter of the target terminal device is within the preset device running parameter safety interval according to the value of each device running parameter. When the running value of any device running parameter in the device running state information is not within the device running parameter safety interval, the server can determine that the target terminal device executing the target task has an abnormality, generate the corresponding abnormal detection result, and can replace the target terminal device with the preset standby terminal device to execute the target task.

[0089] For example, it is assumed that the server obtains the device running parameters of the target terminal device, including CPU utilization of 95%, memory occupation of 97%, and available network bandwidth of 300 KB / s. The preset device running parameter safety interval includes CPU utilization safety interval of 20%-80%, memory occupation safety interval of 40%-80%, and available network bandwidth safety interval of ≥5 MB / s. It can be seen that the device running parameters of the target terminal device in this example do not meet the safety range specified by the device running parameter safety interval. In this case, if the target terminal device still insists on executing the target task, the device may crash or the target task may not be executed successfully. Therefore, the server can determine that the running condition of the target terminal device is no longer suitable for starting or continuing to execute the target task based on this condition, and generate an abnormality detection result indicating that the target terminal device executing the target task is abnormal.

[0090] If a standby terminal device that can be used for replacement at any time is preset in the application scenario, the server can directly replace the target terminal device with the standby terminal device, and execute the target task through the standby terminal device. In this way, the situation that the target task cannot be executed successfully due to the abnormal problem of the target terminal device can be effectively avoided, and the execution success probability and efficiency of the target task can be effectively improved.

[0091] The above-mentioned association information can also include task execution state information corresponding to the target task when the target terminal device executes the target task, and device running parameters corresponding to the target terminal device when the target terminal device executes the target task. The server can simultaneously perform abnormality detection on the target terminal device executing the target task according to the above-mentioned two kinds of data. Only when the abnormality detection result determined according to the task execution state information and the abnormality detection result determined according to the device running parameters both indicate that the execution process of the target task is normal, the server can determine that the execution process of the target task is normal. If either the abnormality detection result determined according to the task execution state information or the abnormality detection result determined according to the device running parameters indicates that there is an abnormality, the server can directly determine that the execution process of the target task is abnormal, and can perform subsequent operations such as abnormality alarm or prompt.

[0092] It should be noted that the actual application stage of the above-mentioned abnormality detection on the execution process of the target task can be performed in real time after the generation of the original task execution instruction in the above-mentioned steps, or can be performed after the update of the task execution instruction. In short, in this specification, whether the task configuration information corresponding to the target task is changed or not, as long as the execution process of the target task is involved, the server can perform abnormality detection according to the above-mentioned content, and the execution time period of the abnormality detection process is not strictly limited in this specification.

[0093] In summary of all the above, in order to facilitate the understanding of the overall flow direction of the task execution method mentioned in this specification, the following is a multi-end flow structure diagram of a task execution method, which is illustrated as shown in Figure 2

[0094] Figure 2 The overall flow structure diagram of a task execution method provided in this specification.

[0095] As shown in Figure 2 , the server applying the method in this specification can obtain the preset task configuration information from the database, and generate the corresponding original task execution instruction according to the task configuration information. Then, the server can send the original task execution instruction to the target terminal device, so that the target terminal device can execute the target task according to the original task execution instruction.

[0096] If the task configuration information is changed, the server can update the original task execution instruction according to the changed task configuration information, and send the updated task execution instruction to the target terminal device executing the target task, so that the target terminal device can execute the target task according to the updated task execution instruction. By this method, the information consistency between the target terminal device and the server can be effectively guaranteed, and the resource waste in invalid task execution can be successfully avoided, and the execution efficiency of the updated target task is also improved.

[0097] In addition, as shown in Figure 2 , the server can also obtain the task execution state information and the device running parameter when the target terminal device executes the target task, and use at least one of them as the association information, and then the server can perform abnormality detection on the task execution process of the target terminal device executing the target task according to the obtained association information, and generate the corresponding abnormality detection result.

[0098] ​From the above, it can be seen that the task execution method provided in the specification can generate original task execution instructions corresponding to a target task according to task configuration information, and when a target terminal device executes the target task according to the task execution instructions, the original task execution instructions are updated after the task configuration information is changed, so that the target terminal device can execute the target task according to the updated task execution instructions. Through the method in the specification, the information consistency of the task scheduling end and the execution end can be effectively guaranteed, and the task execution efficiency is improved. Moreover, the method in the specification can also detect the execution process of the target task according to the task execution state and the device running parameter, effectively detect potential abnormal problems that may affect the task execution in the task execution process, improve the execution success rate and execution efficiency of the target task, and further improve the promotion efficiency of the overall business.

[0099] The above is the method of one or more embodiments of the specification. Based on the same idea, the specification also provides a corresponding task execution device, as shown in Figure 3 .

[0100] Figure 3 The schematic diagram of a task execution device provided in the specification includes:

[0101] The acquisition module 301 is configured to acquire task configuration information for a target task.

[0102] The instruction generation module 302 is configured to generate original task execution instructions corresponding to the target task according to the task configuration information.

[0103] The first execution module 303 is configured to send the original task execution instructions to a target terminal device, so that the target terminal device executes the target task according to the original task execution instructions.

[0104] The task update module 304 is configured to update the task execution instructions according to the changed task configuration information when the task configuration information is changed during the execution of the target task according to the original task execution instructions.

[0105] The second execution module 305 is configured to send the updated task execution instructions to the target terminal device, so that the target terminal device stops continuing to execute the target task according to the original task execution instructions when the updated task execution instructions are received, and executes the target task according to the updated task execution instructions.

[0106] Optionally, the first execution module 303 is specifically configured to determine, according to the task configuration information, device parameter requirement information corresponding to the target task, the device parameter requirement information being used to represent device parameter requirements of a target terminal device for executing the target task; and determine, according to the device parameter requirement information, a terminal device meeting the device parameter requirement corresponding to the device parameter requirement information as the target terminal device.

[0107] Optionally, the task updating module 304 is specifically configured to, when the task configuration information is found to be changed during execution of the target task according to the original task execution instruction, acquire task progress information of the target terminal device executing the target task according to the original task execution instruction; and update the task execution instruction according to the task progress information and the changed task configuration information.

[0108] Optionally, the second execution module 305 is specifically configured to determine, according to the updated task execution instruction and the original task execution instruction, common task progress between execution of the target task according to the original task execution instruction and execution of the target task according to the updated task execution instruction; stop continuing to execute the target task according to the original task execution instruction, save task progress information corresponding to the common task progress when the target task is executed according to the original task execution instruction, and execute, according to the updated task execution instruction, other task progress of the target task except the common task progress.

[0109] Optionally, the apparatus further comprises:

[0110] The abnormality detection module 306 is configured to acquire associated information of the target terminal device executing the target task, the associated information including at least one of task execution state information of the target terminal device executing the target task and device running parameter of the target terminal device executing the target task; and perform abnormality detection on the target task executed by the target terminal device according to the associated information.

[0111] Optionally, the abnormality detection module 306 is specifically configured to determine, according to the task execution state information, a predicted execution time length required for the target terminal device to execute the target task completely as a predicted execution time length, and determine an actual execution time length required for the target terminal device to execute the target task completely as an actual execution time length; and perform abnormality detection on the target task executed by the target terminal device according to the predicted execution time length and the actual execution time length.

[0112] Optionally, the abnormality detection module 306 is specifically configured to perform abnormality detection on the target task executed by the target terminal device according to the device operation parameter and a preset safe interval of the device operation parameter.

[0113] The specification also provides a computer readable storage medium storing a computer program, which can be used to execute the above Figure 1 task execution method.

[0114] The specification also provides a computer program product, which can be used to execute the above Figure 4 task execution method. Figure 1 The specification also provides a computer readable storage medium storing a computer program, which can be used to execute the above Figure 4 task execution method. Figure 1 The specification also provides a computer readable storage medium storing a computer program, which can be used to execute the above

[0115] In the 1990s, it was quite obvious to distinguish whether an improvement in a technology was in hardware (e.g., improvement in circuit structures of diodes, transistors, switches, etc.) or in software (improvement in method flow). However, as technology has evolved, many improvements in method flow today can be considered as direct improvements in hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method flow into hardware circuits. Therefore, it cannot be said that an improvement in a method flow cannot be implemented by hardware entity modules. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A digital system is "integrated" on a PLD by the designer programming it, rather than by asking a chip manufacturer to design and fabricate a custom integrated circuit chip. Moreover, instead of manually fabricating integrated circuit chips, this programming is now mostly implemented by "logic compiler" software, which is similar to software compilers used in program development, and the original code to be compiled is written in a specific programming language, which is called a hardware description language (HDL), and there are many such languages, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should be aware that, as long as the method flow is logically programmed in the above-mentioned hardware description languages and programmed into an integrated circuit, a hardware circuit implementing the logical method flow can be easily obtained.

[0116] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can equally well be implemented to perform the same functions using logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. by means of a logical programming of the method steps. The controller can thus be considered as a hardware component, and the means comprised therein for performing the various functions can be considered as structures within the hardware component. Alternatively, the means for performing the various functions can even be considered as both a software module implementing the method and a structure within the hardware component.

[0117] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0118] For the sake of description, the above apparatuses are described in various units by functions respectively. Of course, the functions of each unit can be implemented in one or more software and / or hardware in implementing the present specification.

[0119] Those skilled in the art will understand that the embodiments of the present specification can be provided as a method, a system or a computer program product. Therefore, the present specification can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0120] The specification is presented with reference to flow diagrams and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks.

[0121] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks. ​ The flow diagrams and / or block diagrams in the specification can present a method, apparatus or computer program product according to embodiments of the specification. Flow diagrams and / or block diagrams can also present a method, apparatus or computer program product to achieve functions specified in flow diagrams and / or block diagrams block or blocks.

[0123] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0124] The memory can include non-persistent memory and / or persistent memory, such as flash memory, read-only memory (ROM), and / or volatile / non-volatile random access memory (RAM), among others. The memory is an example of computer-readable media.

[0125] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.

[0126] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.

[0127] Those skilled in the art will appreciate that embodiments of the present specification can be provided as methods, systems or computer program products. Therefore, the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0128] The present specification can be described in the general context of computer-executable instructions, such as program modules, executed by computers. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.

[0129] The various embodiments described in this specification are described using a numbering of embodiments approach: these are each individually integrated contributions pertaining to different aspects of the description. For each embodiment, the description focuses on the differences from the other embodiments. Each embodiment is to be read in isolation, with the understanding that the same or similar features from other embodiments can be combined with the features of the respective embodiment. In particular, the description of the system embodiments is kept relatively short, as the system embodiments are largely analogous to the method embodiments.

[0130] The above description is embodied in the form of only a description of embodiments of the present specification, and is not intended to limit the present specification. Various changes and modifications can be made by those skilled in the art based on the present specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A task execution method characterized by, The method comprises the following steps: obtaining task configuration information for a target task, the task configuration information comprising: a task name, a task ID, a task execution time, an execution cycle, task specific content and a task initial configuration parameter of the target task; generating original task execution instructions corresponding to the target task according to the task configuration information; sending the original task execution instructions to a target terminal device, so that the target terminal device executes the target task according to the original task execution instructions; when it is monitored that the task configuration information is changed during execution of the target task according to the original task execution instructions, updating the task execution instructions according to the changed task configuration information, wherein if the changed task configuration information is partially changed compared with the task configuration information, then task execution instructions for the changed part of the target task are updated according to the original task execution instructions and the changed task configuration information; sending the updated task execution instructions to the target terminal device, so that the target terminal device stops executing the target task according to the original task execution instructions when the updated task execution instructions are received, and executes the target task according to the updated task execution instructions, wherein the target task comprises task stages, for a task stage that has been executed according to the original task execution instructions, if the task stage is different between the task configuration information corresponding to the original task execution instructions and the changed task configuration information, then the actual task content corresponding to the task stage is invalidated, and updated task execution instructions corresponding to the task stage are generated to re-execute the task stage according to the updated task execution instructions, if the task stage is the same between the task configuration information corresponding to the original task execution instructions and the changed task configuration information, then the task stage is not re-executed.

2. The method of claim 1, wherein, Before the step of sending the original task execution instructions to the target terminal device, so that the target terminal device executes the target task according to the original task execution instructions, the method further comprises the following steps: determining device parameter requirement information corresponding to the target task according to the task configuration information, the device parameter requirement information being used to represent device parameter requirements of a target terminal device for executing the target task; determining a terminal device meeting the device parameter requirement information as the target terminal device according to the device parameter requirement information.

3. The method of claim 1, wherein, The method further comprises the following steps: when it is monitored that the task configuration information is changed during execution of the target task according to the original task execution instructions, obtaining task progress information of the target terminal device executing the target task according to the original task execution instructions; updating the task execution instructions according to the task progress information and the changed task configuration information.

4. The method of claim 1, wherein, The step of sending the updated task execution instruction to the target terminal device, so that the target terminal device stops continuing to execute the target task according to the original task execution instruction, and executes the target task according to the updated task execution instruction, specifically comprises: According to the updated task execution instruction and the original task execution instruction, determining the common task progress between executing the target task according to the original task execution instruction and executing the target task according to the updated task execution instruction; Stopping continuing to execute the target task according to the original task execution instruction, saving the task progress information corresponding to the common task progress when executing the target task according to the original task execution instruction, and executing the task progress corresponding to the target task except the common task progress according to the updated task execution instruction.

5. The method of claim 1, wherein, The method further comprises: Obtaining associated information of the target terminal device when executing the target task, wherein the associated information comprises at least one of task execution state information of the target terminal device when executing the target task and device running parameter of the target terminal device when executing the target task; According to the associated information, performing abnormality detection on the target task executed by the target terminal device.

6. The method of claim 5, wherein, According to the associated information, performing abnormality detection on the target task executed by the target terminal device, specifically comprising: According to the task execution state information, predicting the execution time length required for the target terminal device to execute the target task as a predicted execution time length, and determining the execution time length required for the target terminal device to actually execute the target task as an actual execution time length; According to the predicted execution time length and the actual execution time length, performing abnormality detection on the target task executed by the target terminal device.

7. The method of claim 5, wherein, According to the associated information, performing abnormality detection on the target task executed by the target terminal device, specifically comprising: According to the device running parameter and the preset device running parameter safety interval, performing abnormality detection on the target task executed by the target terminal device.

8. A task execution apparatus characterized by comprising: Comprise: An acquisition module is used to acquire task configuration information for a target task, wherein the task configuration information comprises a task name, a task ID, a task execution time, an execution period, task specific content and task initial configuration parameters of the target task; An instruction generation module is used to generate an original task execution instruction corresponding to the target task according to the task configuration information; A first execution module is used to send the original task execution instruction to a target terminal device, so that the target terminal device executes the target task according to the original task execution instruction; The task updating module is configured to, when the task configuration information is changed during execution of the target task according to the original task execution instruction, update the task execution instruction according to the changed task configuration information, and if the changed task configuration information is partially changed compared with the task configuration information, update the task execution instruction for the changed part of the target task according to the original task execution instruction and the changed task configuration information. The second execution module is configured to send the updated task execution instruction to the target terminal device, so that the target terminal device stops executing the target task according to the original task execution instruction and executes the target task according to the updated task execution instruction when the updated task execution instruction is received.

9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by the processor to implement the method in any one of claims 1-7.

10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to implement the method in any one of claims 1-7.

Citation Information

Patent Citations

  • Information processing method, warehousing control system, equipment and storage medium

    CN116862215A