Task execution method and device, storage medium, electronic device and program product
By identifying and avoiding duplicate task requests and adjusting the execution order according to task priority and type, the problem of repeated execution of timing tasks in multi-machine clusters due to time synchronization is solved, and resource utilization efficiency and system stability are improved.
Patent Information
- Application Number
- CN202411853563.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-04-15
AI Technical Summary
In a multi-machine cluster, due to the out-of-synchronization of machine time, timed tasks may be repeated execution, resulting in waste of resources and inconsistent task execution results.
By identifying duplicate business requests, determine whether the task request is initiated repeatedly, and avoid repeated tasks execution. At the same time, adjust the execution order according to the priority and type of the task to ensure that high priority or critical tasks are prioritized and processed.
It effectively avoids repeated tasks caused by time out-of-synchronization, improves resource usage efficiency, reduces system load overload or conflicts, and enhances system stability and reliability.
Smart Images

Figure CN119829238A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of communications, and in particular, to a task execution method, device, storage medium, electronic device and program product. Background Art
[0002] In a multi-machine cluster in a distributed computing environment, the machines in the multi-machine cluster may be out of sync due to network problems, system failures, human operations, etc., which may cause scheduled tasks to be executed repeatedly, resulting in resource waste and inconsistent task execution results. There is currently no suitable solution to the above problems in the relevant technology. Summary of the invention
[0003] The embodiments of the present invention provide a task execution method, device, storage medium, electronic device and program product to at least solve the problem of repeated execution of scheduled tasks due to machine time asynchrony in a multi-machine cluster in the related art.
[0004] According to one embodiment of the present invention, a task execution method is provided, comprising: upon receiving a first task request for requesting execution of a target task, determining whether the first task request is a repeatedly initiated request; in the case where the first task request is a non-repeatedly initiated request, determining the target task as a first task and adding it to a sequence of tasks to be executed, and, adjusting the execution order of the target task in the sequence of tasks to be executed according to the type of the target task and the priority of the target task, so as to obtain a first execution order of each first task to be executed included in the sequence of tasks to be executed; and executing each first task according to the first execution order.
[0005] In an exemplary embodiment, after executing each of the first tasks in accordance with the first execution order, the method further includes: receiving the execution results of each of the first tasks and the task execution log fed back by the task threads used to execute each of the first tasks respectively; and storing the received execution results and the task execution log.
[0006] In an exemplary embodiment, after storing the received execution result and the task execution log, the method further includes: in a case where a failure result is included in multiple execution results, outputting first information to instruct the target object to analyze the failure cause of the failure result based on the first information, wherein the first information includes an identifier of the first task whose execution result is a failure result and the task execution log of the first task whose execution result is a failure result.
[0007] In an exemplary embodiment, determining whether the first task request is a repeatedly initiated request includes: determining whether there is a second task request historically received for requesting execution of the target task based on the identifier of the target task included in the first task request; if the second task request exists and the time difference between a first moment of receiving the second task request and a second moment of receiving the first task request is less than a preset time threshold, determining that the first task request is a repeatedly initiated request.
[0008] In an exemplary embodiment, adjusting the execution order of the target task in the sequence of tasks to be executed according to the type of the target task and the priority of the target task to obtain the first execution order of each first task to be executed included in the sequence of tasks to be executed includes: determining a first score of the target task according to the type of the target task and the priority of the target task; obtaining a second score of each first task included in other tasks, wherein the other tasks are other first tasks included in the task sequence except the target task, and the second score is determined according to the type of each first task and the priority of each first task; and sorting the first scores and each of the second scores in order from high to low to determine the first execution order.
[0009] In an exemplary embodiment, storing the received execution results and the task execution log includes: storing the execution results and the task execution log of the first tasks of the same type under the same path; after storing the received execution results and the task execution log, the method also includes: performing statistical analysis on the first tasks of this type based on the execution results and the task execution log of the first tasks stored under the same path.
[0010] According to another embodiment of the present invention, a task execution device is provided, including: a first determination module, for determining whether a first task request for requesting execution of a target task is a repeatedly initiated request when the first task request is received; a second determination module, for determining the target task as a first task and adding it to a sequence of tasks to be executed when the first task request is not a repeatedly initiated request, and for adjusting the execution order of the target task in the sequence of tasks to be executed according to the type of the target task and the priority of the target task, so as to obtain a first execution order of each first task to be executed included in the sequence of tasks to be executed; and an execution module, for executing each of the first tasks according to the first execution order.
[0011] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.
[0012] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0013] According to yet another embodiment of the present invention, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0014] In the present invention, by identifying repeated business requests, the same task is avoided from being triggered and executed multiple times in a multi-machine cluster due to time asynchrony, ensuring that the task is executed only once; by adjusting the execution order according to the priority and type of the task, high-priority or critical tasks can be given priority in resources and processing. Therefore, the problem of repeated execution of scheduled tasks due to machine time asynchrony in a multi-machine cluster in the related technology can be solved, thereby achieving the effect of improving resource utilization efficiency, reducing system overload or conflicts that may be caused by repeated execution of tasks, and enhancing system stability and reliability. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a hardware structure block diagram of a mobile terminal according to a task execution method according to an embodiment of the present invention;
[0016] Figure 2 is a flowchart of a task execution method according to an embodiment of the present invention;
[0017] Figure 3 is a schematic diagram of a task execution system according to an embodiment of the present invention;
[0018] Figure 4 is a schematic diagram of the structure of a task execution system according to an embodiment of the present invention Figure 1 ;
[0019] Figure 5 is a schematic diagram of the structure of a task execution system according to an embodiment of the present invention Figure 2 ;
[0020] Figure 6 is a schematic diagram of a task execution flow according to an embodiment of the present invention;
[0021] Figure 7 is a structural block diagram of a task execution device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0024] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 is a hardware structure block diagram of a mobile terminal according to a task execution method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0025] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the task execution method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0026] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0027] In this embodiment, a task execution method running on a mobile terminal is provided. Figure 2 is a flowchart of a task execution method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0028] Step S202, when receiving a first task request for requesting execution of a target task, determining whether the first task request is a repeatedly initiated request;
[0029] Step S204, in the case where the first task request is a non-repeated request, determining the target task as the first task and adding it to the sequence of tasks to be executed, and adjusting the execution order of the target task in the sequence of tasks to be executed according to the type of the target task and the priority of the target task, so as to obtain a first execution order of each of the first tasks to be executed included in the sequence of tasks to be executed;
[0030] Step S206: execute each of the first tasks according to the first execution order.
[0031] In the above steps, the target task includes but is not limited to: scheduled tasks, other tasks to be executed in the task execution system, etc., and exemplarily, step S202 and step S204 include but are not limited to being executed by the first node, and step S206 includes but is not limited to being executed by the second node; step S202 includes but is not limited to being executed by the third node, step S204 includes but is not limited to being executed by the fourth node, and step S206 includes but is not limited to being executed by the fifth node, wherein the first node, the third node and the fourth node include but are not limited to being nodes in the scheduling center included in the task execution system; the second node and the fifth node include but are not limited to being nodes in the executor included in the task execution system. The dispatch center is used to perform the following operations: maintain and manage the dispatch information of the system to ensure that the tasks are correctly assigned and executed according to the predetermined dispatch configuration; send dispatch requests to the executor according to the dispatch configuration. The dispatch center itself does not execute business codes and is mainly used to implement the dispatch and coordination of tasks; provide a visual interface to allow users to simply and dynamically manage dispatch information, including but not limited to the creation, update, and deletion of tasks; support GLUE development operations to allow users to develop and maintain scripts or codes for task execution; when an exception or failure occurs in task execution, relevant personnel can be notified in a timely manner; record and monitor dispatch results and execution logs so that users can track the execution status and history of tasks in real time; support the failover mechanism of the executor. When an executor fails to execute a task, it can automatically dispatch the task to other available executors to ensure the continuity and reliability of the task. The executor is used to receive and respond to the dispatch request, execution request, termination request, and log request sent by the dispatch center.
[0032] In the above steps, by identifying repeated business requests, the same task is avoided from being triggered and executed multiple times in a multi-machine cluster due to time asynchrony in related technologies, ensuring that the task is only executed once; by adjusting the execution order according to the priority and type of the task, high-priority or critical tasks can get resources and processing first, thereby improving resource utilization efficiency; by reasonably arranging task execution, the system overload or conflict that may be caused by repeated execution of tasks is reduced, thereby enhancing the stability and reliability of the system.
[0033] In an optional embodiment, after executing each of the first tasks in accordance with the first execution order, the method further includes: receiving the execution results of each of the first tasks and the task execution log fed back by the task threads used to execute each of the first tasks respectively; and storing the received execution results and the task execution log.
[0034] In the above steps, by storing the execution results of the tasks and the task execution logs, the task scheduling strategy can be optimized by analyzing the execution results and logs of the tasks, thereby improving the overall performance of the system.
[0035] In an optional embodiment, after storing the received execution result and the task execution log, the method further includes: in a case where a failure result is included in multiple execution results, outputting first information to instruct the target object to analyze the failure cause of the failure result based on the first information, wherein the first information includes an identifier of the first task whose execution result is a failure result and the task execution log of the first task whose execution result is a failure result.
[0036] In the above steps, by outputting the task execution log when the task execution fails, the cause of the task failure can be analyzed by analyzing the task execution log, thereby determining the cause of the task failure and optimizing the system according to the cause of the task failure, thereby improving the overall stability of the system.
[0037] In an optional embodiment, determining whether the first task request is a repeatedly initiated request includes: determining whether there is a second task request historically received for requesting execution of the target task based on the identifier of the target task included in the first task request; if the second task request exists and the time difference between a first moment of receiving the second task request and a second moment of receiving the first task request is less than a preset time threshold, determining that the first task request is a repeatedly initiated request.
[0038] In the above steps, the time threshold includes but is not limited to: 1 hour, 2 hours, 6 hours, etc. The time threshold can be pre-set, and the time threshold can be adjusted according to the type of the target task and the application scenario.
[0039] In an optional embodiment, adjusting the execution order of the target task in the sequence of tasks to be executed according to the type of the target task and the priority of the target task to obtain the first execution order of each first task to be executed included in the sequence of tasks to be executed includes: determining a first score of the target task according to the type of the target task and the priority of the target task; obtaining a second score of each first task included in other tasks, wherein the other tasks are other first tasks included in the task sequence except the target task, and the second score is determined according to the type of each first task and the priority of each first task; and sorting the first score and each second score in order from high to low to determine the first execution order.
[0040] In the above steps, exemplarily, for each task request received, when it is determined to be a non-repetitive request, the score of the task is first determined based on the type and priority of the requested task, and then the task is inserted into the sequence of tasks to be executed. For example, when the scores of the tasks included in the sequence of tasks to be executed are "96, 82, 75, 49" and the score of the target task is "77", the score corresponding to the new sequence of tasks to be executed obtained by inserting the target task into the sequence of tasks to be executed is "96, 82, 77, 75, 49".
[0041] In the above steps, by adjusting the execution order according to the priority and type of the tasks, high-priority or critical tasks can be given priority in obtaining resources and processing, thereby improving the efficiency of resource utilization.
[0042] In an optional embodiment, storing the received execution results and the task execution log includes: storing the execution results and the task execution log of the first tasks of the same type under the same path; after storing the received execution results and the task execution log, the method also includes: performing statistical analysis on the first tasks of this type based on the execution results and the task execution log of the first tasks stored under the same path.
[0043] In the above steps, by centrally storing the same type of task data, the data analysis process can be simplified, making the analysis of the performance and behavior of a specific type of task more direct and efficient.
[0044] Figure 3 is a schematic diagram of a task execution system according to an embodiment of the present invention. Figure 3 As shown, the task execution system includes: a scheduling center and an executor, wherein the scheduling center is responsible for managing and scheduling tasks, including: a task management module, an executor management module, a log management module and other modules, wherein the task management module is used to manage the executor of the task, the task mode, etc., the executor management module is used to manage the registration method, application name (AppName), machine address list, etc. of the executor, the log management module is used to record the scheduling log, the rolling log, the version change log of the task script (GLUE), etc., and other modules are used to store operation reports, failure alarms and task dependencies, etc. The scheduling center provides the following services in the process of interacting with the executor: a scheduler (quartz) service, a rolling log service, an API-based callback service, and an API-based registration service.
[0045] Exemplarily, the task execution system includes but is not limited to being deployed in the following two ways:
[0046] Method 1:
[0047] Figure 4 is a schematic diagram of the structure of a task execution system according to an embodiment of the present invention Figure 1 ,like Figure 4 As shown, the task execution system includes a scheduling center and a business system, and the scheduling center and the business system are deployed independently. The business system includes an executor module and a business processing module. The executor module is registered in the scheduling center so that the scheduling center records that the executor module can receive and process tasks. When the scheduling center needs to execute a task, it will send the task to the registered executor module; after receiving the task, the executor module will internally call the business processing module to execute specific business logic; after processing the task, the business processing module will feed back the execution result to the executor module, and the executor module will feed back the result to the scheduling center.
[0048] Method 2:
[0049] Figure 5 is a schematic diagram of the structure of a task execution system according to an embodiment of the present invention Figure 2 ,like Figure 5 As shown, the task execution system includes a scheduling center, an executor and a business system, and the scheduling center, the executor and the business system are deployed independently, wherein the executor is registered in the scheduling center so that the scheduling center records that the executor can receive and process tasks. When the scheduling center needs to execute a task, it will send the task to the registered executor; after receiving the task, the executor will remotely call the relevant services or interfaces in the business system to execute specific business logic; after the business system processes the task, it will feed back the execution result to the executor, and the executor will feed back the result to the scheduling center.
[0050] Figure 6 is a schematic diagram of a task execution flow according to an embodiment of the present invention, such as Figure 6 As shown in the figure, the registered thread executor automatically registers with the dispatch center; the task execution service receives the tasks issued by the dispatch center and puts them into the queue of tasks to be executed; the task execution thread pool obtains tasks from the queue of tasks to be executed, and multiple JobHandlers (task processors) execute them concurrently; the callback thread asynchronously reports the task execution results to the dispatch center; the log service processes the logs during the task execution process (including log storage and query); the task log file stores the detailed log information of the task execution. Among them, the communication between the dispatch center and the task executor adopts the remote procedure call (RPC) method to realize the functions of task issuance, registration, log query, etc.
[0051] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0052] In this embodiment, a task execution device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0053] Figure 7 is a structural block diagram of a task execution device according to an embodiment of the present invention. Figure 7 As shown, the device includes: a first determination module 72, which is used to determine whether a first task request for requesting execution of a target task is a repeatedly initiated request when the first task request is received; a second determination module 74, which is used to determine the target task as a first task and add it to a sequence of tasks to be executed when the first task request is not a repeatedly initiated request, and to adjust the execution order of the target task in the sequence of tasks to be executed according to the type of the target task and the priority of the target task, so as to obtain a first execution order of each first task to be executed included in the sequence of tasks to be executed; and an execution module 76, which is used to execute each of the first tasks according to the first execution order.
[0054] In an optional embodiment, the device also includes: a receiving module, used to receive the execution results and task execution logs of each first task fed back by the task threads used to execute each first task respectively after executing each first task in accordance with the first execution order; and a storage module, used to store the received execution results and task execution logs.
[0055] In an optional embodiment, the device also includes: an output module for, after storing the received execution results and the task execution log, outputting first information to instruct the target object to analyze the failure cause of the failure result based on the first information when a failure result is included in multiple execution results, wherein the first information includes an identifier of the first task whose execution result is a failure result and the task execution log of the first task whose execution result is a failure result.
[0056] In an optional embodiment, the first determination module 72 includes: a first determination unit, used to determine whether there is a second task request historically received for requesting execution of the target task based on the identifier of the target task included in the first task request; a second determination unit, used to determine that the first task request is a repeatedly initiated request if the second task request exists and the time difference between the first moment of receiving the second task request and the second moment of receiving the first task request is less than a preset time threshold.
[0057] In an optional embodiment, the second determination module 74 includes: a third determination unit, used to determine the first score of the target task according to the type of the target task and the priority of the target task; an acquisition unit, used to acquire the second score of each first task included in other tasks, wherein the other tasks are other first tasks included in the task sequence except the target task, and the second score is determined according to the type of each first task and the priority of each first task; a fourth determination unit, used to sort the first scores and each second score in order from high to low to determine the first execution order.
[0058] In an optional embodiment, the storage module includes: a storage unit, used to store the execution results of the first tasks of the same type and the task execution logs in the same path; an analysis unit, used to perform statistical analysis on the first tasks of the same type based on the execution results of the first tasks and the task execution logs stored in the same path after storing the received execution results and the task execution logs.
[0059] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0060] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0061] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0062] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0063] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0064] An embodiment of the present invention further provides a computer program product, the computer program product comprising a computer program, and when the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0065] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.
[0066] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
[0067] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A task execution method, characterized in that: include: Upon receiving a first task request for requesting execution of a target task, determining whether the first task request is a repeatedly initiated request; In the case where the first task request is a non-repeated request, the target task is determined as a first task and added to a sequence of tasks to be executed, and the execution order of the target task in the sequence of tasks to be executed is adjusted according to the type of the target task and the priority of the target task, so as to obtain a first execution order of each of the first tasks to be executed included in the sequence of tasks to be executed; Each of the first tasks is executed in the first execution order.
2. The method according to claim 1, characterized in that After executing each of the first tasks in the first execution order, the method further includes: receiving an execution result of each of the first tasks and a task execution log fed back by a task thread respectively used to execute each of the first tasks; The received execution result and the task execution log are stored.
3. The method according to claim 2, characterized in that After storing the received execution result and the task execution log, the method further includes: In the case where a failure result is included in multiple execution results, first information is output to instruct the target object to analyze the failure cause of the failure result based on the first information, wherein the first information includes an identifier of the first task whose execution result is a failure result and the task execution log of the first task whose execution result is a failure result.
4. The method according to claim 1, characterized in that: Determining whether the first task request is a repeatedly initiated request includes: Determining, according to the identifier of the target task included in the first task request, whether there is a second task request received in the past for requesting execution of the target task; If the second task request exists and the time difference between a first time when the second task request is received and a second time when the first task request is received is less than a preset time threshold, it is determined that the first task request is a repeatedly initiated request.
5. The method according to claim 1, characterized in that Adjusting the execution order of the target task in the to-be-executed task sequence according to the type of the target task and the priority of the target task to obtain a first execution order of each of the first tasks to be executed included in the to-be-executed task sequence includes: Determining a first score of the target task according to the type of the target task and the priority of the target task; Obtaining a second score of each first task included in other tasks, wherein the other tasks are other first tasks included in the task sequence except the target task, and the second score is determined according to the type of each first task and the priority of each first task; The first score and each of the second scores are sorted in descending order to determine the first execution order.
6. The method according to claim 2, characterized in that Storing the received execution result and the task execution log includes: The execution results of the first tasks of the same type and the task execution logs are stored in the same path; After storing the received execution result and the task execution log, the method further includes: performing statistical analysis on the first task of this type based on the execution result and the task execution log of the first task stored in the same path.
7. A task execution device, characterized in that: include: A first determining module is used to determine whether a first task request for requesting execution of a target task is a repeated request when the first task request is received; A second determination module is used to determine the target task as a first task and add it to a sequence of tasks to be executed if the first task request is a non-repeated request, and to adjust the execution order of the target task in the sequence of tasks to be executed according to the type of the target task and the priority of the target task, so as to obtain a first execution order of each of the first tasks to be executed included in the sequence of tasks to be executed; An execution module is used to execute each of the first tasks according to the first execution order.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.
9. 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 computer program, the steps of the method described in any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Method for determining request execution sequence, electronic equipment and storage medium
CN120335972A
Method, electronic device and storage medium for determining request execution order
CN120335972B