Task execution method and device, storage medium and electronic equipment

By monitoring configuration information changes during task execution and updating task execution instructions, the problem that terminal devices cannot be updated in time after task configuration information is changed in the prior art is solved, and efficient task execution and optimized use of resources are achieved.

CN119182660AActive Publication Date: 2024-12-24GUANGZHOU YIHU NETWORK TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

After the task configuration information is changed in the prior art, terminal equipment cannot update the task configuration in time, resulting in reduced task execution efficiency, waste of resources and increased costs.

Method used

By obtaining task configuration information, the original task execution instructions are generated and sent to the terminal device, and the task execution instructions are updated after monitoring configuration information is changed, so that the terminal device stops executing old instructions and continues the task according to the new instructions.

Benefits of technology

Ensure the consistency of information between the task scheduling end and the execution end, avoid resource waste, improve task execution efficiency and success rate, and improve business promotion speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119182660A_ABST
    Figure CN119182660A_ABST
Patent Text Reader

Abstract

The invention discloses a task execution method and device, a storage medium and electronic equipment, and the method specifically comprises the steps: generating an original task execution instruction corresponding to a target task according to obtained task configuration information, and transmitting the original task execution instruction to target terminal equipment 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 equipment can execute the target task according to the updated task execution instruction. Through the method in the specification, the information consistency between the server for scheduling the task and the terminal equipment for executing the task can be effectively ensured, the situation that the terminal equipment for executing the task still executes the task according to the old configuration information due to the change of the configuration information is avoided, and the time consumption and the execution cost are saved to a great extent; and the execution efficiency of the target task is effectively improved, so that the overall propulsion speed of the business to which the target task belongs is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] With the continuous advancement and innovation of network technology, all technical fields related to computer networks at this stage will more or less involve the use of network technology to achieve multi-threaded or multi-device task scheduling. A reasonably planned task scheduling process can effectively promote the normal execution of the overall business and improve execution efficiency.

[0003] Although reasonable task scheduling can bring certain convenience to business execution, there are still some obvious and unresolved defects and problems. In the current technology, when the configuration information of the task is changed during normal execution, the terminal device executing the task often cannot immediately change the configuration information of the task being executed, and even needs to continue to execute the task according to the original task configuration until the execution is completed before the updated task can be executed according to the changed task configuration. In this case, the repeated execution of the same task part will seriously drag down the task execution efficiency of the changed task, as well as the time and computing resources consumed to execute the task according to the original task configuration until the end, resulting in an increase in the overall business execution cost, which in turn affects the business promotion efficiency and cost consumption.

[0004] Therefore, how to execute the changed target tasks more efficiently is a crucial issue. Summary of the invention

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

[0006] This manual adopts the following technical solutions:

[0007] This specification provides a task execution method, including:

[0008] Obtain task configuration information for the target task;

[0009] Generating an original task execution instruction corresponding to the target task according to the task configuration information;

[0010] 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;

[0011] When it is detected that the task configuration information has 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;

[0012] The updated task execution instruction is sent to the target terminal device, so that when the target terminal device receives the updated task execution instruction, it stops executing the target task according to the original 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 includes:

[0014] Determine, according to the task configuration information, device parameter requirement information corresponding to the target task, wherein the device parameter requirement information is used to characterize device parameter requirements of a target terminal device used to execute the target task;

[0015] According to the device parameter requirement information, a terminal device that meets the device parameter requirement corresponding to the device parameter requirement information is determined as the target terminal device.

[0016] Optionally, when it is detected that the task configuration information has changed during the execution of the target task according to the original task execution instruction, the step of updating the task execution instruction according to the changed task configuration information specifically includes:

[0017] When a change in the task configuration information is monitored during the process of executing the target task 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] The task execution instruction is updated 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 executing the target task according to the original task execution instruction upon receiving the updated task execution instruction, and executes the target task according to the updated task execution instruction specifically includes:

[0020] Determine, according to the updated task execution instruction and the original task execution instruction, a 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;

[0021] Stop executing the target task according to the original task execution instruction, save the task progress information corresponding to the public task progress when executing the target task according to the original task execution instruction, and execute other task progress in the task progress corresponding to the target task except the public task progress according to the updated task execution instruction.

[0022] Optionally, the method further includes:

[0023] Acquire association information of the target terminal device when executing the target task, wherein the association information includes: task execution state information of the target terminal device when executing the target task, and at least one of device operation parameters of the target terminal device when executing the target task;

[0024] According to the association information, anomaly detection is performed on the target task executed by the target terminal device.

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

[0026] Predicting, based on the task execution status information, the execution time required for the target terminal device to complete the target task as the predicted execution time, and determining the execution time required for the target terminal device to actually complete the target task as the actual execution time;

[0027] According to the predicted execution time and the actual execution time, anomaly detection is performed on the target task executed by the target terminal device.

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

[0029] According to the device operating parameters and a preset device operating parameter safety interval, anomaly detection is performed on the target task executed by the target terminal device.

[0030] This specification provides a task execution device, including:

[0031] An acquisition module, used to obtain task configuration information for a target task;

[0032] An instruction generation module, used to generate an original task execution instruction corresponding to the target task according to the task configuration information;

[0033] A first execution module, used for sending 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 is used to update the task execution instruction according to the changed task configuration information when the task configuration information is detected to be changed during the execution of the target task according to the original task execution instruction;

[0035] The second execution module is used to send the updated task execution instruction to the target terminal device, so that when the target terminal device receives the updated task execution instruction, it stops executing the target task according to the original task execution instruction and executes the target task according to the updated task execution instruction.

[0036] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned task execution method is implemented.

[0037] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned task execution method when executing the program.

[0038] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0039] It can be seen from the above method that in the task execution method provided in this specification, the original task execution instruction corresponding to the target task can be generated according to the acquired 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 has 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] From the above content, it can be seen that the task execution method provided in this specification can update the original task execution instruction after determining that the task configuration information has changed, so that the target terminal device can execute the target task according to the updated task execution instruction. The method in this specification can effectively ensure the consistency of information between the server side of the scheduling task and the terminal device that executes the task, avoiding the terminal device that executes the task according to the old configuration information due to the change of the configuration information, greatly saving resource consumption and improving the execution efficiency of the target task. The method in this specification can also perform anomaly detection on the execution process of the target task, effectively detect potential abnormal problems that may affect the execution of the task during the task execution process, improve the execution success rate and execution efficiency of the target task, and improve the overall advancement speed of the business. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0042] Figure 1 A flowchart of a task execution method provided in this specification;

[0043] Figure 2 This is an overall flow chart of a task execution method provided in this specification;

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

[0045] Figure 4 A method provided in this specification corresponding to Figure 1 Schematic diagram of the structure of an electronic device. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

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

[0048] Figure 1 A flowchart of a task execution method provided in this specification includes the following steps:

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

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

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

[0052] To this end, this specification provides a task execution method, wherein the execution subject used by the method provided in this specification can be a server or a terminal device such as a desktop computer or a laptop computer. In addition, the execution subject of this specification can also be a subject in the form of software, such as a client installed in a terminal device. For the sake of convenience, this specification only takes the server as the execution subject to explain the task execution method provided below.

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

[0054] Among them, the application scenario in which the server performs task execution for the target task can be flexibly changed according to the actual application needs. For example, in the field of industrial manufacturing, the server using the method in this specification can generate the corresponding original task execution instruction according to the preset task configuration information in the industrial manufacturing scenario and send it to the target terminal device for executing the corresponding target task, such as a CNC machine tool, a high-voltage power distribution device, etc. Then, after determining that the task configuration information has changed, the server can update the original task execution instruction based on the changed task configuration information 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 ensure the execution efficiency of the target task, and to a certain extent avoid the cost waste when executing the task.

[0055] For another example, in the field of game operation and development, the server using the method in this specification can send the corresponding original task execution instructions to the server responsible for maintaining the operation of the game according to the task configuration information set by the game developer, so that the server responsible for maintaining the operation of the game executes the corresponding target task according to the received original task execution instructions. After determining that the task configuration information has changed, the server using the method in this specification can send the corresponding updated task instruction information to the server responsible for maintaining the operation of the game, so that the server responsible for maintaining the operation of the game can adjust the execution of the target task in time according to the updated task instruction information. This effectively improves the overall efficiency of the game business and avoids the waste of resources during the task execution process due to task information delays.

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

[0057] Among them, the specific content of the preset task configuration information is not strictly limited in this specification, and can be flexibly set according to the corresponding actual task requirements in different application fields, and may include but is not limited to: task name or task ID, task execution time or execution cycle, task specific content and process, task initial configuration parameters, etc.

[0058] The specific data format of the task configuration information is not strictly limited in this specification, and can be a data format such as the JavaScript Object Notation (JSON) format, eXtensible Markup Language (XML) format, YAML Ain't Markup Language (YAML) format, etc., which are commonly used in the current technology. The original task execution instructions generated by the server based on the task configuration information can be used to specifically direct the various information in the task configuration information, so that the terminal device that subsequently receives the original task execution instructions can determine the specific execution process of the target task by parsing 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., which can be flexibly set according to the actual application scenario.

[0059] S103: 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.

[0060] In this specification, after determining the original task execution instruction corresponding to the target task based on 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] Among them, before inputting the original task execution instruction into the target terminal device so that the target terminal device executes the target task, the server can determine the device parameter requirement information of the target terminal device that can execute the target task based on the acquired task configuration information. Then, the server can determine the terminal device that meets the parameter requirements corresponding to the device parameter requirement information from each candidate terminal device based on the determined device parameter requirement information as the target terminal device. Then, 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.

[0062] Of course, if the task configuration information for the target task pre-sets the device identification of the terminal device that specifies the target task, the server can also directly match the terminal device corresponding to the terminal identification information from the selected terminal devices according to the terminal identification information used to represent the target terminal device in the task configuration information, as the target terminal device. Then, similarly, the server can input the determined original task execution instruction into the target terminal device determined according to the terminal identification information in the task configuration information, so that the target terminal device can execute the corresponding target task.

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

[0064] In this specification, the server can monitor whether the task configuration information in the database has changed during the process of the target terminal device executing the target task according to the original task execution instruction. If it is detected that the task configuration information has 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 it is determined that the task configuration information changes during the process of the target terminal device executing the target task according to the acquired original task execution instruction, the server can obtain the task progress information corresponding to the target terminal device executing the target task according to the original task execution instruction. The task progress information can be used to characterize the progress ratio of the task content that has been executed in the target task compared to the overall target task execution process.

[0066] Then, the server can update part or all of the original task execution instructions according to the configuration information of the changed part in the changed task configuration information and the task progress information corresponding to the target task. For example, assume that the target task is divided into five task stages. When the target terminal device executes the target task according to the original task execution instruction and reaches the third stage, the server detects that the configuration information corresponding to the target task has been modified, and determines that the main modified part corresponds to the latter two task stages of the five task stages of the target task, that is, the task configuration information corresponding to the fourth stage and the fifth stage has changed according to the changed task configuration information. At this time, the server can update the task execution instructions corresponding to the updated fourth stage and the fifth stage of the target task based only on the original task execution instructions and the changed task configuration information. As for the first three task stages, the corresponding task configuration information has not changed, so there is no need to generate task execution instructions containing instructions corresponding to the unchanged task stages.

[0067] This method can effectively reduce the data volume of the updated task execution instructions, improve the update efficiency of the task execution instructions, and thus improve the execution efficiency of the target task after subsequent updates. If the configuration information of the changed part of the changed task configuration information conflicts with the task progress information corresponding to the target task, that is, the modified part of the changed task configuration information in the above example contains at least one of the first three task stages of the target task, the server can determine that the task progress information that has been executed by the target terminal device for the target task is invalid at the corresponding stage, and generate updated task execution instructions corresponding to the corresponding stage and subsequent stages, so that the target task can subsequently execute the target task according to the updated task update instructions.

[0068] Still taking the above example as the basis, assume that the changed task configuration information determines that the main modified parts correspond 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 has been invalidated, but because the task configuration information corresponding to the first task stage has not been changed, the target terminal device does not need to completely 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 that is only used to guide 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 changes occur directly from the beginning of the execution of the target task, the server can directly generate a complete updated task execution instruction based on the changed task configuration information and send it to the target terminal device to enable it to execute the updated target task. In addition, if the task configuration information of the target task is 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 stops the loss in time to avoid wasting resources.

[0070] The above contents are all optional methods for improving the efficiency of updating task execution instructions. In addition, the server can also generate updated task execution instructions for the target terminal device to execute the complete target task based on the changed task configuration information, regardless of whether the task configuration information is partially updated or completely updated. The specific update method of the task execution instruction is not strictly limited in this manual and can be flexibly adjusted according to the actual application scenario.

[0071] S105: Sending the updated task execution instruction to the target terminal device, so that when the target terminal device receives the updated task execution instruction, it stops executing the target task according to the original 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 when the target terminal device obtains the updated task execution instruction, it will promptly stop executing the target task according to the original task execution instruction previously obtained, and execute the corresponding updated target task according to the obtained updated task execution instruction.

[0073] Specifically, after generating an updated task execution instruction for the target terminal device to execute the complete target task, the server can determine the common task progress between the target terminal device executing the target task according to the original task execution instruction and the updated task execution instruction according to the target task. The so-called common task progress can be used to indicate 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 when the target task is executed according to the updated task execution instruction.

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

[0075] For example, assuming that there are four actual execution stages corresponding to the target task. 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 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 completely updated target task.

[0076] It can be clearly 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. Although the task configuration information of the fourth stage has not changed, the target terminal device has not executed the fourth stage of the target task, so it is impossible to determine and save the task progress information corresponding to the fourth stage. Therefore, the server can save the task progress information corresponding to the first stage and the second stage when the target terminal device executes the target task according to the original task execution instruction, and based on the task progress information corresponding to the first stage and the second stage of the updated task execution instruction, the target terminal device executes the updated third stage of the target task and the unchanged fourth stage. Through 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 above-mentioned task execution instruction, still based on the above-mentioned example, if the changed part corresponds to the first execution stage of the target task according to the changed task configuration information, and the updated task execution instruction for executing the completely updated target task is determined. 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 regard the task progress information corresponding to the first and second stages of the target task that have been 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 completely updated target task. Of course, if there is no correlation between the task progress information of the first stage and the second stage corresponding to the target task, the server can also use the second stage executed according to the original task execution instruction as the above-mentioned public task progress, and save the corresponding task progress information, so that after the target terminal device completes the first stage according to the updated task execution instruction, it can directly execute the third stage of the target task based on the saved task progress information of the second stage, so as to effectively improve the execution efficiency of the updated target task.

[0078] In addition to the above, in this specification, the server can also obtain the associated information of the target terminal device when executing the target task. Based on the associated information, the server can perform anomaly detection on the task execution process of the target terminal device for the target task. Among them, the associated information of the target terminal device when executing the target task can specifically be at least one of the task execution status information corresponding to the target task when the target terminal device executes the target task, and the device operation parameters corresponding to the target terminal device when the target terminal device executes the target task.

[0079] Specifically, when the associated information is the task execution status information corresponding to the target task when the target terminal device executes the target task, the server can predict the execution time required for the target terminal device to complete the target task based on the acquired task execution status information as the predicted execution time, and simultaneously determine the execution time required for the target terminal device to actually complete the target task as the actual execution time. Then, based on the predicted execution time and the actual execution time corresponding to the target task, the server can perform anomaly detection on the task execution process of the target terminal device for the target task.

[0080] In this specification, it is considered that in the actual application scenario where multiple devices execute tasks, the execution process of each task performed by each terminal device is intertwined and complex, and the computing power required for real-time monitoring of each task is relatively large. In this case, the server can preset a collection period for task execution status information, and the collection period can be specifically used to limit the time interval for the server to obtain the task execution status information corresponding to the target task or the device operation parameter data corresponding to the target terminal device from the target terminal device. The server can periodically collect the task execution status 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 number of execution cycles required for the target terminal device to normally complete the target task, i.e., the above-mentioned predicted execution duration, based on the task execution instruction corresponding to the target task generated in the previous step, the preset collection cycle, and the task execution status information corresponding to each collection cycle. Next, the server can determine the actual number of execution cycles corresponding to the target task, i.e., the actual execution duration, based on the difference between the last collection cycle corresponding to the task execution status information collected to indicate that the target task is in a task unexecuted state and the first collection cycle corresponding to the task execution status information collected to indicate that the target task is in a task execution completed state.

[0082] The server can perform anomaly detection on the task execution process of the target task based on the determined predicted execution time and the determined actual execution time. Specifically, the server can determine whether the actual execution time actually taken to complete the execution of the target task meets the predicted execution time. If the actual execution time is not greater than the predicted execution time, the server can consider that the target task execution process is normal, and the corresponding anomaly detection result indicates that there is no anomaly in the target task execution process; if the actual execution time is greater than the predicted execution time, the server can consider that the target task execution process is abnormal, and the corresponding anomaly detection result indicates that there is an anomaly in the target task execution process.

[0083] In the current field of task execution management, if the task execution time of the target task exceeds expectations, it may be that an abnormal problem occurs during the task execution, causing the task execution to be delayed or interrupted. The server using the method in this specification can accurately detect whether there is an abnormality in the execution of the target task based on the actual execution time and the predicted execution time. Even if the target task has been successfully executed and completed through the target terminal device, the server can still determine the task execution abnormality detection result corresponding to the target task based on the execution time, so that some potential problems that do not affect the final successful execution of the target task can be discovered in time, and alarms or prompts related personnel to perform maintenance, thereby improving the execution efficiency and success probability of subsequent target tasks.

[0084] In addition, if the server still fails to obtain the first task execution status information indicating that the target task is in the process of task execution completion after collecting multiple rounds of task execution status information according to the preset collection cycle, then the difference cycle number and the actual execution time in the above step 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 cycle number threshold, when the number of collection cycles for the task execution status information indicating that the target task is in the process of task execution completion is greater than the preset collection cycle number threshold, and generate a corresponding abnormal detection result indicating that there is an abnormal problem in the execution of the target task, so as to promptly alert the relevant maintenance personnel to handle it as soon as possible.

[0085] In addition to the above-mentioned method of performing anomaly detection on the task execution process of the target task according to the collection cycle, the collected task execution status information may also include specific time record information of the task status change. The server can also directly determine whether the actual execution time of the target task meets the predicted execution time based on the task status change time in the task execution status information, and generate corresponding anomaly detection results.

[0086] In addition to the above, when the associated information is the device operating parameters corresponding to the target terminal device when the target terminal device executes the target task, the server can perform anomaly detection on the execution process of the target terminal device for the target task based on the acquired device operating parameters of the target terminal device and the preset device operating parameter safety range.

[0087] Similar to the above-mentioned anomaly detection process based on task execution status information, when obtaining the device operating parameters corresponding to the target terminal device, the server can also obtain the device operating parameters corresponding to the target terminal device according to a preset collection period. The device operating parameters can be specifically used to represent the specific values ​​of each operating parameter of the target terminal device within the corresponding collection period, which may include but are not limited to device operating parameters such as CPU occupancy, memory occupancy, network bandwidth, etc.

[0088] Specifically, the server can determine whether the numerical values ​​corresponding to the various device operating parameters in the device operating parameters corresponding to the target terminal device are within the preset device operating parameter safety range according to the numerical values ​​of the various device operating parameters in the device operating parameters corresponding to the target terminal device. When the operating value of any device operating parameter in the device operating status information is not within the device operating parameter safety range, the server can determine that there is an abnormality in the corresponding target terminal device executing the target task, generate a corresponding abnormality detection result, and can replace the target terminal device with a preset backup terminal device to execute the target task.

[0089] For example, assume that the device operating parameters corresponding to the target terminal device obtained by the server include operating parameters such as CPU utilization 95%, memory occupancy 97%, and available network bandwidth 300KB / s. If the preset device operating parameter safety interval specifically includes: CPU utilization safety interval 20%-80%, memory occupancy safety interval 40%-80%, available network bandwidth safety interval ≥5MB / s, etc. It can be clearly seen that the various operating parameters in the device operating parameters of the target terminal device in this example basically do not meet the safety range specified by the device operating parameter safety interval. In this case, if the target terminal device still insists on executing the target task, an abnormal situation may occur in which the device crashes or the target task cannot be executed smoothly. Therefore, based on this situation, the server can determine that the operating status of the target terminal device is no longer suitable for starting or continuing to execute the target task, and generate an abnormal detection result for indicating that the target terminal device executes the target task abnormally.

[0090] If a spare terminal device is pre-set in the application scenario and can be used for replacement at any time, the server can directly replace the target terminal device with the pre-set spare terminal device according to the abnormal detection result, and execute the target task through the spare terminal device. This method can effectively avoid the situation where the target task cannot be successfully executed due to abnormal problems of the target terminal device, and effectively improve the success probability and efficiency of the target task.

[0091] The above-mentioned associated information may also simultaneously include the task execution status information corresponding to the target task when the target terminal device executes the target task, and the device operating parameters corresponding to the target terminal device when the target terminal device executes the target task. The server can simultaneously perform anomaly detection on the target terminal device executing the target task based on the above two types of data, wherein only when the anomaly detection result determined according to the task execution status information and the anomaly detection result determined according to the device operating parameters jointly indicate that there is no anomaly in the execution process of the target task, the server can determine that the execution process of the target task is normal. If either the anomaly detection result determined according to the task execution status information or the anomaly detection result determined according to the device operating parameters indicates that there is an anomaly, the server can directly determine that there is an anomaly in the execution process of the target task, and can perform subsequent operations such as anomaly alarms or prompts.

[0092] It should be noted that the practical application stage of anomaly detection for the execution process of the target task, which is introduced in great detail above, can be performed in real time after the original task execution instruction in the above steps is generated, or it can be performed after the task execution instruction is updated. Simply put, in this specification, whether the task configuration information corresponding to the target task has not changed or has changed, as long as the execution process of the target task is involved, the server can perform anomaly detection based on the above content, and the execution period of the anomaly detection process is not strictly limited in this specification.

[0093] To sum up all the above contents, in order to facilitate understanding of the overall process direction of the task execution method mentioned in this specification, the following is a comprehensive explanation using a multi-terminal process structure diagram of a task execution method, such as Figure 2 as shown in .

[0094] Figure 2 This is an overall flow chart of a task execution method provided in this specification.

[0095] like Figure 2 As shown, the server using the method in this specification can obtain preset task configuration information from the database, and generate corresponding original task execution instructions according to the task configuration information. Then, the server can 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.

[0096] If the task configuration information changes, 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 that executes the target task, so that the target terminal device can execute the target task according to the updated task execution instruction. This method can effectively ensure the consistency of information between the target terminal device and the server, and can successfully avoid the waste of resources when executing invalid tasks, and also improve the execution efficiency of the updated target task.

[0097] In addition, Figure 2 As shown in , the server can also obtain the task execution status information and device operating parameters when the target terminal device performs the target task, and use at least one of them as associated information. The server can then perform anomaly detection on the task execution process of the target terminal device performing the target task based on the acquired associated information, and generate corresponding anomaly detection results.

[0098] From the above content, it can be seen that the task execution method provided in this specification can generate the original task execution instruction corresponding to the target task according to the task configuration information, and the target terminal device executes the target task according to the task execution instruction. 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. The method in this specification can effectively ensure the information consistency between the task scheduling end and the execution end, and improve the task execution efficiency. In addition, the method in this specification can also perform anomaly detection on the execution process of the target task according to the task execution status and equipment operating parameters, effectively detect potential abnormal problems that may affect the task execution during the task execution process, improve the execution success rate and execution efficiency of the target task, and thus also improve the promotion efficiency of the overall business.

[0099] The above are one or more implementation methods of this specification. Based on the same idea, this specification also provides a corresponding task execution device, such as Figure 3 shown.

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

[0101] An acquisition module 301 is used to acquire task configuration information for a target task;

[0102] An instruction generation module 302 is used to generate an original task execution instruction corresponding to the target task according to the task configuration information;

[0103] A first execution module 303, 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;

[0104] The task updating module 304 is used to update the task execution instruction according to the changed task configuration information when the task configuration information is detected to be changed during the execution of the target task according to the original task execution instruction;

[0105] The second execution module 305 is used to send the updated task execution instruction to the target terminal device, so that when the target terminal device receives the updated task execution instruction, it stops executing the target task according to the original task execution instruction and executes the target task according to the updated task execution instruction.

[0106] Optionally, the first execution module 303 is specifically used to determine, based on the task configuration information, device parameter requirement information corresponding to the target task, the device parameter requirement information being used to characterize the device parameter requirements of the target terminal device used to execute the target task; based on the device parameter requirement information, determine a terminal device that meets the device parameter requirements corresponding to the device parameter requirement information as the target terminal device.

[0107] Optionally, the task update module 304 is specifically used to obtain task progress information of the target terminal device executing the target task according to the original task execution instruction when it is monitored that the task configuration information has changed during the execution of the target task according to the original task execution instruction; and update the task execution instruction based on the task progress information and the changed task configuration information.

[0108] Optionally, the second execution module 305 is specifically used to determine, based on the updated task execution instruction and the original task execution instruction, 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; stop executing the target task according to the original task execution instruction, save the task progress information corresponding to the common task progress when executing the target task according to the original task execution instruction, and execute other task progress in the task progress corresponding to the target task except the common task progress according to the updated task execution instruction.

[0109] Optionally, the device further comprises:

[0110] The anomaly detection module 306 is used to obtain related information of the target terminal device when executing the target task, wherein the related information includes: task execution status information of the target terminal device when executing the target task, and at least one of the device operating parameters of the target terminal device when executing the target task; based on the related information, perform anomaly detection on the target task executed by the target terminal device.

[0111] Optionally, the anomaly detection module 306 is specifically used to predict, based on the task execution status information, the execution time required for the target terminal device to complete the target task as the predicted execution time, and to determine the execution time required for the target terminal device to actually complete the target task as the actual execution time; and to perform anomaly detection on the target task executed by the target terminal device based on the predicted execution time and the actual execution time.

[0112] Optionally, the anomaly detection module 306 is specifically used to perform anomaly detection on the target task executed by the target terminal device according to the device operating parameters and a preset device operating parameter safety interval.

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

[0114] This manual also provides Figure 4 The one shown corresponds to Figure 1 A schematic diagram of the electronic device. Figure 4 As shown, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 The task execution method described.

[0115] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, 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. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0116] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers 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 also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0117] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, 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 convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

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

[0120] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0121] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0122] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

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

[0124] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0125] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0126] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

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

[0128] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may 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 may be located in local and remote computer storage media, including storage devices.

[0129] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0130] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. 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 in that: include: Obtain task configuration information for the target task; Generating an original task execution instruction corresponding to the target task according to the task configuration information; 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; When it is detected that the task configuration information has 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; The updated task execution instruction is sent to the target terminal device, so that when the target terminal device receives the updated task execution instruction, it stops executing the target task according to the original task execution instruction and executes the target task according to the updated task execution instruction.

2. The method according to claim 1, characterized in that 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 includes: Determine, according to the task configuration information, device parameter requirement information corresponding to the target task, wherein the device parameter requirement information is used to characterize device parameter requirements of a target terminal device used to execute the target task; According to the device parameter requirement information, a terminal device that meets the device parameter requirement corresponding to the device parameter requirement information is determined as the target terminal device.

3. The method according to claim 1, characterized in that When it is detected that the task configuration information has changed during the execution of the target task according to the original task execution instruction, the step of updating the task execution instruction according to the changed task configuration information specifically includes: When a change in the task configuration information is monitored during the process of executing the target task 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; The task execution instruction is updated according to the task progress information and the changed task configuration information.

4. The method according to claim 1, characterized in that The step of sending 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 upon receiving the updated task execution instruction and executes the target task according to the updated task execution instruction specifically includes: Determine, according to the updated task execution instruction and the original task execution instruction, a 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; Stop executing the target task according to the original task execution instruction, save the task progress information corresponding to the public task progress when executing the target task according to the original task execution instruction, and execute other task progress in the task progress corresponding to the target task except the public task progress according to the updated task execution instruction.

5. The method according to claim 1, characterized in that The method further comprises: Acquire association information of the target terminal device when executing the target task, wherein the association information includes: task execution state information of the target terminal device when executing the target task, and at least one of device operation parameters of the target terminal device when executing the target task; According to the association information, anomaly detection is performed on the target task executed by the target terminal device.

6. The method according to claim 5, characterized in that According to the association information, anomaly detection is performed on the target task executed by the target terminal device, specifically including: Predicting, based on the task execution status information, the execution time required for the target terminal device to complete the target task as the predicted execution time, and determining the execution time required for the target terminal device to actually complete the target task as the actual execution time; According to the predicted execution time and the actual execution time, anomaly detection is performed on the target task executed by the target terminal device.

7. The method according to claim 5, characterized in that According to the association information, anomaly detection is performed on the target task executed by the target terminal device, specifically including: According to the device operating parameters and a preset device operating parameter safety interval, anomaly detection is performed on the target task executed by the target terminal device.

8. A task execution device, characterized in that: include: An acquisition module, used to obtain task configuration information for a target task; An instruction generation module, used to generate an original task execution instruction corresponding to the target task according to the task configuration information; A first execution module, used for sending 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; A task updating module is used to update the task execution instruction according to the changed task configuration information when the task configuration information is detected to be changed during the execution of the target task according to the original task execution instruction; The second execution module is used to send the updated task execution instruction to the target terminal device, so that when the target terminal device receives the updated task execution instruction, it stops executing the target task according to the original task execution instruction and executes the target task according to the updated task execution instruction.

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

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Task processing method and apparatus

    CN106557356A

  • Configuration parameter update method, device and apparatus for task executor

    CN108958933A

  • Data processing method and device, equipment, storage medium and program product

    CN112925811A

  • Business processing method and device

    CN114443180A

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

    CN116862215A