Task processing method and device, electronic equipment and storage medium

By identifying and configuring the priority of the task and the server load status, generating a task processing sequence, and processing the task immediately when the server is idle, it solves the problems of low task processing efficiency and difficulty in queue processing of emergency tasks in the existing technology, and achieves efficient Task processing and user experience improvements.

CN119336464APending Publication Date: 2025-01-21KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411417585.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the generation of business white paper PPT files, the existing technology has problems such as low task processing efficiency, high server idle rate, long user waiting time, and difficulty in handling emergency tasks by jumping to queue.

Method used

By obtaining multiple target tasks submitted by the user, it identifies the priority of the task and the load status of the server, configures the task status, generates a task processing sequence, and processes the task immediately when the server is idle. It supports scheduled sharding task processing and task queue jumping.

Benefits of technology

It realizes continuous processing of tasks, makes full use of server resources, reduces server idle rate and user waiting time, improves user experience, and supports queue jumping processing of emergency tasks, improving the efficiency of enterprise business operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336464A_ABST
    Figure CN119336464A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a task processing method and device, electronic equipment and a storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: acquiring a plurality of target tasks submitted by a user; identifying the priority of the target task and the load state of a target server for processing the target task; configuring the task state of the target task according to the priority of the target task and the load state of the target server; under the condition that the task state of the target task is determined to be an initialized state and the target server is in an idle state, changing the task state of the corresponding target task from the initialized state to a processing state according to the task processing sequence; and under the condition that the task state of the target task is determined to be a processing state, processing the plurality of target tasks according to a preset service logic and the timed fragmented task to obtain a task processing result. Based on the method and the device, the task can be continuously processed by the server, so that the business service efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a task processing method and device, an electronic device, and a storage medium. Background Art

[0002] At present, the business operation background of an enterprise generates a business white paper based on the business white paper template and combines the enterprise's own business data to generate the corresponding business white paper PPT file. The general business process is as follows:

[0003] 1. Develop and upload business white paper PPT templates and perform relevant configurations for PPT processing;

[0004] 2. Generate business white papers by operating clicks;

[0005] 3. Wait for 2 to 5 minutes for the generation to complete, and download the generated complete PPT on the operation page.

[0006] However, the above process has the following problems:

[0007] 1. For example, if a task is executed every two minutes, and it is the first time to submit the task, and it happens to be the next second after the task is triggered, then the task of generating the PPT will need to wait for about 2 minutes, plus the time consumed by the execution (for example, 2 minutes, the amount of data for each enterprise is inconsistent, and the execution time is uncertain), the total time will reach 4 minutes, doubling the overall task generation time.

[0008] 2. If there are 10 tasks to generate PPT in queue, and 2 tasks are picked up for processing each time, the remaining 8 tasks are waiting, but these 2 tasks are completed in 1 minute. At this time, there is still 1 minute before the next task is triggered, which will cause the server to be idle for 1 minute, and all the remaining tasks will have to wait for a long time.

[0009] 3. There is no priority in task processing. When multiple tasks are queued, urgent tasks cannot be processed in queue. Summary of the invention

[0010] The main purpose of the embodiments of the present application is to propose a task processing method and device, an electronic device and a storage medium, which can realize that tasks can be processed continuously by the server, make full use of the server resources, reduce the server idle rate, reduce the user's waiting time, thereby improving the user experience, and support users to jump the queue according to the urgency of the task during the server processing process. Especially in the enterprise business operation scenario, it can speed up the generation of business documents, improve business service efficiency, and thus enhance the competitiveness of the enterprise.

[0011] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application provides a task processing method, the method comprising:

[0012] Obtain multiple target tasks submitted by the user;

[0013] Identifying the priority of the target task and the load status of the target server processing the target task, wherein the load status includes a full load status and an idle status;

[0014] configuring the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state;

[0015] generating a task processing sequence according to the priorities of the plurality of target tasks;

[0016] When it is determined that the task state of the target task is in the initialization state and the target server is in the idle state, changing the task state corresponding to the target task from the initialization state to the processing state according to the task processing sequence;

[0017] When it is determined that the task status of the target task is in the processing status, the plurality of target tasks are processed as timed slice tasks according to a preset business logic to obtain a task processing result.

[0018] In some embodiments, configuring the task status of the target task according to the priority of the target task and the load status of the target server includes:

[0019] When it is determined that the priority of the target task is a low priority, configuring the task state of the target task to be an initialization state;

[0020] When it is determined that the priority of the target task is a high priority and the target server is in a fully loaded state, configuring the task state of the target task to an initialization state;

[0021] When it is determined that the priority of the target task is a high priority and the target server is in an idle state, the task state of the target task is configured as a processing state.

[0022] In some embodiments, after determining that the task state of the target task is in the initialization state and the target server is in the idle state, changing the task state corresponding to the target task from the initialization state to the processing state according to the task processing sequence, the method further includes:

[0023] Performing task processing on the target task according to the business logic of the target task to obtain a task completion result, wherein the task completion result includes execution success and execution failure;

[0024] The task status of the target task is changed according to the task completion result.

[0025] In some embodiments, the step of changing the task status of the target task according to the task completion result includes:

[0026] When it is determined that the task completion result is successful execution, the task status of the target task is changed from a processing status to a successful execution status;

[0027] When it is determined that the task completion result is an execution failure, the task status of the target task is changed from a processing status to an execution failure status.

[0028] In some embodiments, after the task status of the target task is changed according to the task completion result, the method further includes:

[0029] When it is determined that there is still a target task in the initialization state, continue to compare the priorities of the multiple target tasks in the initialization state;

[0030] The timed slicing task is triggered again according to the priority of the target task in the initialization state.

[0031] In some embodiments, when it is determined that the task status of the target task is in the processing state, the plurality of target tasks are processed according to the timed slice tasks according to the preset business logic to obtain the task processing result, including:

[0032] When it is determined that the task status of the target task is in the processing state, each of the target tasks is split into a plurality of timed slice tasks according to preset task conditions;

[0033] The plurality of timed slice tasks are processed according to the business logic to obtain the task processing results.

[0034] In some embodiments, the method further comprises:

[0035] Determining the processing completion time of the target task;

[0036] Determine the time at which the task status of the target task is changed to a processing status;

[0037] Determine the actual processing time of the target task according to the difference between the processing completion time and the change time;

[0038] Determine the number of first tasks being queued and the number of second tasks being executed in the target server;

[0039] Determining the task processing quantity of the target server according to the sum of the first task quantity and the second task quantity;

[0040] Determine the number of parallel tasks when the target server is in a fully loaded state;

[0041] Determine the average actual execution time of the task based on the historical task processing data of the target server;

[0042] The estimated completion time of the target task is determined according to the task processing quantity, the task parallel quantity and the average actual execution time of the task.

[0043] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a task processing device, the device comprising:

[0044] The first module is used to obtain multiple target tasks submitted by the user;

[0045] A second module is used to identify the priority of the target task and the load state of the target server processing the target task, wherein the load state includes a full load state and an idle state;

[0046] A third module is used to configure the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state;

[0047] A fourth module is used to generate a task processing sequence according to the priorities of the plurality of target tasks;

[0048] A fifth module is used for changing the task state corresponding to the target task from the initialization state to the processing state according to the task processing sequence when it is determined that the task state of the target task is the initialization state and the target server is in an idle state;

[0049] The sixth module is used to process the multiple target tasks according to the timed slice tasks according to the preset business logic when it is determined that the task status of the target task is in the processing status, so as to obtain the task processing result.

[0050] To achieve the above objectives, a third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method described in the first aspect is implemented.

[0051] To achieve the above-mentioned purpose, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0052] The task processing method and device, electronic device and storage medium proposed in the present application obtain multiple target tasks submitted by the user; identify the priority of the target task and the load state of the target server that processes the target task, wherein the load state includes a full load state and an idle state; configure the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state; generate a task processing sequence according to the priority of multiple target tasks; when it is determined that the task state of the target task is the initialization state and the target server is in an idle state, change the task state of the corresponding target task from the initialization state to the processing state according to the task processing sequence; when it is determined that the task state of the target task is the processing state, process multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing result. By obtaining multiple target tasks submitted by the user, identifying and determining the priority of the target task and the load state of the target server that processes the target task, configuring the task state of the target task according to the priority of the target task and the load state of the target server, the initialization state indicates that the target task still needs to wait in line, and the processing state indicates that the target task is picked up by the server for processing. And generate a task processing sequence according to the priority of multiple target tasks. When it is determined that the task state of the target task is in the initialization state and the target server is in the idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence, so that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, and the waiting time of the user is reduced, thereby improving the user's experience, and it can support users to jump in the queue according to the priority of the task during the server processing process. When it is determined that the task state of the target task is in the processing state, the server processes multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing result. Based on this, the embodiment of the present application can realize that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, and the waiting time of the user is reduced, thereby improving the user's experience, and it can support users to jump in the queue according to the urgency of the task during the server processing process, especially in the enterprise business operation scenario, which can speed up the business file generation speed, improve business service efficiency, and thus enhance the competitiveness of the enterprise. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1is a flowchart of a task processing method provided in an embodiment of the present application;

[0054] Figure 2 is a flowchart of task submission processing provided by an embodiment of the present application;

[0055] Figure 3 is a flowchart from step S301 to step S302;

[0056] Figure 4 This is a flowchart of the timing slicing task triggering provided by the embodiment of the present application;

[0057] Figure 5 is a flowchart from step S501 to step S502;

[0058] Figure 6 is a flowchart from step S601 to step S602;

[0059] Figure 7 is a flowchart of steps S701 to S708;

[0060] Figure 8 is a structural diagram of a task processing device provided in an embodiment of the present application;

[0061] Fig. 9 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0064] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0065] First, some nouns involved in this application are analyzed:

[0066] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robotics, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0067] Priority: It is a convention that high priority is done first, and low priority is done later. Priority is a parameter that determines the priority level of each operating program to receive system resources when a computer time-sharing operating system processes multiple operating programs.

[0068] At present, the business operation background of an enterprise generates a business white paper based on the business white paper template and combines the enterprise's own business data to generate the corresponding business white paper PPT file. The general business process is as follows:

[0069] 1. Develop and upload business white paper PPT templates and perform relevant configurations for PPT processing;

[0070] 2. Generate business white papers by operating clicks;

[0071] 3. Wait for 2 to 5 minutes for the generation to complete, and download the generated complete PPT on the operation page.

[0072] However, the above process has the following problems:

[0073] 1. For example, if a task is executed every two minutes, and it is the first time to submit the task, and it happens to be the next second after the task is triggered, then the task of generating the PPT will need to wait for about 2 minutes, plus the time consumed by the execution (for example, 2 minutes, the amount of data for each enterprise is inconsistent, and the execution time is uncertain), the total time will reach 4 minutes, doubling the overall task generation time.

[0074] 2. If there are 10 tasks to generate PPT in queue, and 2 tasks are picked up for processing each time, the remaining 8 tasks are waiting, but these 2 tasks are completed in 1 minute. At this time, there is still 1 minute before the next task is triggered, which will cause the server to be idle for 1 minute, and all the remaining tasks will have to wait for a long time.

[0075] 3. There is no priority in task processing. When multiple tasks are queued, urgent tasks cannot be processed in queue.

[0076] Based on this, the embodiment of the present application provides a task processing method and device, an electronic device and a storage medium, which obtain multiple target tasks submitted by a user; identify the priority of the target task and the load state of the target server that processes the target task, wherein the load state includes a full load state and an idle state; configure the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state; generate a task processing sequence according to the priority of multiple target tasks; when it is determined that the task state of the target task is the initialization state and the target server is in an idle state, change the task state of the corresponding target task from the initialization state to the processing state according to the task processing sequence; when it is determined that the task state of the target task is the processing state, process multiple target tasks according to the timed slicing tasks according to the preset business logic, and obtain the task processing result. By obtaining multiple target tasks submitted by the user, identifying and determining the priority of the target task and the load state of the target server that processes the target task, configuring the task state of the target task according to the priority of the target task and the load state of the target server, the initialization state indicates that the target task still needs to wait in line, and the processing state indicates that the target task is picked up by the server for processing. And generate a task processing sequence according to the priority of multiple target tasks. When it is determined that the task state of the target task is in the initialization state and the target server is in the idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence, so that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, and the waiting time of the user is reduced, thereby improving the user's experience, and it can support users to jump in the queue according to the priority of the task during the server processing process. When it is determined that the task state of the target task is in the processing state, the server processes multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing result. Based on this, the embodiment of the present application can realize that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, and the waiting time of the user is reduced, thereby improving the user's experience, and it can support users to jump in the queue according to the urgency of the task during the server processing process, especially in the enterprise business operation scenario, which can speed up the business file generation speed, improve business service efficiency, and thus enhance the competitiveness of the enterprise.

[0077] The task processing method and device, electronic device and storage medium provided in the embodiments of the present application are specifically described through the following embodiments. First, the task processing method in the embodiments of the present application is described.

[0078] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0079] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0080] The task processing method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The task processing method provided in the embodiment of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the task processing method, etc., but is not limited to the above forms.

[0081] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can 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. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0082] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0083] Figure 1 is an optional flowchart of the task processing method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S106.

[0084] Step S101, obtaining multiple target tasks submitted by a user;

[0085] Step S102, identifying the priority of the target task and the load state of the target server processing the target task, wherein the load state includes a full load state and an idle state;

[0086] Step S103, determining the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state;

[0087] Step S104, generating a task processing sequence according to the priorities of the multiple target tasks;

[0088] Step S105, when it is determined that the task state of the target task is in the initialization state and the target server is in the idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence;

[0089] Step S106, when it is determined that the task status of the target task is in the processing status, multiple target tasks are processed according to the timed slice tasks according to the preset business logic to obtain the task processing result.

[0090] In step S101 of some embodiments, multiple target tasks submitted by users are obtained. Specifically, multiple target tasks submitted by the same user may be obtained, or multiple target tasks submitted by different users may be obtained. The target task may be a business task of different types. In the business operation scenario of an enterprise, taking the generation of an enterprise white paper as an example, the target task may be a PPT file generation task. In a financial scenario, an operator may submit a target file generation task through the business operation system of the enterprise, and the backend server performs task processing on the target file generation task to generate a target file.

[0091] In step S102 of some embodiments, the priority of the target task and the load state of the target server processing the target task are identified, wherein the load state includes a full load state and an idle state. Since the urgency of different target tasks submitted by users is different, it is necessary to identify the priority of each target task so that the server can execute according to the priority of the task, so that high-priority tasks can be queued and processed, and low-priority tasks can be processed in turn. In addition, it is also necessary to analyze the current load state of the target server processing the target task to determine whether the target server is currently in a full load state or an idle state.

[0092] In step S103 of some embodiments, the task state of the target task is determined according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state. The task state of the target task is determined by comprehensively considering the priority of the target task and the current load state of the target server, so as to characterize whether the target task can enter processing or wait for processing according to the task state. It should be noted that when the target task is in the initialization state, it means that the target task is waiting in line on the server for processing; when the target task is in the processing state, it means that the target task has been picked up by the server and is being processed.

[0093] In step S104 of some embodiments, a task processing sequence is generated according to the priorities of the multiple target tasks. By generating the task processing sequence according to the priorities of the target tasks, the server can process the multiple target tasks according to the task processing sequence, so that high-priority tasks can be queued and processed, and low-priority tasks are queued.

[0094] In step S105 of some embodiments, when it is determined that the task state of the target task is in the initialization state and the target server is in the idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence. The target server detects that there is a target task in the initialization state, that is, it determines that there are target tasks waiting to be processed, and the target server is in the idle state. Then, the target server retrieves the target tasks waiting to be processed according to the task processing sequence, which can ensure that the tasks are processed continuously, thereby making full use of the server resources and reducing the idle rate of the server. Moreover, it can support users to jump the queue according to the priority of the task during the server processing process.

[0095] In step S106 of some embodiments, when it is determined that the task status of the target task is in the processing state, multiple target tasks are processed according to the preset business logic as timed slice tasks to obtain task processing results. In the enterprise business operation scenario, taking the generation of an enterprise white paper as an example, the target task is a PPT file generation task. When the PPT file generation task is configured as the processing state, the server pulls the PPT template according to the PPT generation business logic, parses the PPT template, traverses each page, and renders the PPT page separately. After all renderings are completed, a new PPT file is generated. Based on the use of slice tasks, the embodiment of the present application can achieve immediate execution after submitting the task and continuous execution of the slice tasks. It can also support execution according to the priority of the task, support queue processing of high-priority tasks, and slowly process low-priority tasks.

[0096] Steps S101 to S106 shown in the embodiment of the present application, obtain multiple target tasks submitted by the user; identify the priority of the target task and the load state of the target server that processes the target task, wherein the load state includes a full load state and an idle state; configure the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state; generate a task processing sequence according to the priority of multiple target tasks; when the task state of the target task is determined to be the initialization state and the target server is in an idle state, change the task state of the corresponding target task from the initialization state to the processing state according to the task processing sequence; when the task state of the target task is determined to be the processing state, process multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing result. By obtaining multiple target tasks submitted by the user, identifying the priority of the target task and the load state of the target server that processes the target task, configuring the task state of the target task according to the priority of the target task and the load state of the target server, the initialization state indicates that the target task still needs to wait in line, and the processing state indicates that the target task is picked up by the server for processing. And generate a task processing sequence according to the priority of multiple target tasks. When it is determined that the task state of the target task is in the initialization state and the target server is in the idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence, so that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, and the waiting time of the user is reduced, thereby improving the user's experience, and it can support users to jump in the queue according to the priority of the task during the server processing process. When it is determined that the task state of the target task is in the processing state, the server processes multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing result. Based on this, the embodiment of the present application can realize that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, and the waiting time of the user is reduced, thereby improving the user's experience, and it can support users to jump in the queue according to the urgency of the task during the server processing process, especially in the enterprise business operation scenario, which can speed up the business file generation speed, improve business service efficiency, and thus enhance the competitiveness of the enterprise.

[0097] See also Figure 2 In some embodiments, step S103 includes the following judgment conditions:

[0098] When it is determined that the priority of the target task is a low priority, the task state of the target task is configured as an initialization state;

[0099] When it is determined that the priority of the target task is high and the target server is in a fully loaded state, the task state of the target task is configured to be an initialization state;

[0100] When it is determined that the priority of the target task is a high priority and the target server is in an idle state, the task state of the target task is configured as a processing state.

[0101] In some embodiments, when the priority of the target task is determined to be low priority, it means that the urgency of the target task is low. In the presence of other tasks with higher priorities, the target task needs to queue up for processing. Based on this, the task state of the target task is configured as the initialization state.

[0102] In some embodiments, when the priority of the target task is determined to be high priority, it means that the urgency of the target task is high and needs to be processed first. However, if it is found through comparison that the number of tasks in the server being processed has reached the upper limit of the concurrent processing of the server, that is, the target server is already in a full load state, the high-priority target task still needs to queue up for processing, based on which, the task state of the target task is configured as the initialization state.

[0103] In some embodiments, when the priority of the target task is determined to be high priority, it means that the urgency of the target task is high and needs to be processed first. At the same time, if it is found through comparison that the number of tasks in the server in the processing state has not reached the concurrent processing upper limit of the server, that is, the target server is in an idle state, the high-priority target task can be immediately queued for processing, based on which, the task state of the target task is configured as the initialization state.

[0104] See also Figure 3 In some embodiments, after step S105, the following steps may also include but are not limited to steps S301 to S302:

[0105] Step S301, performing task processing on the target task according to the business logic of the target task to obtain a task completion result, wherein the task completion result includes execution success and execution failure;

[0106] Step S302: Change the task status of the target task according to the task completion result.

[0107] See also Figure 4, based on the business logic of the target task, the target task is processed and the task completion result is obtained, which includes successful execution and failed execution. And the task status of the target task is changed according to the task completion result. Specifically, when it is determined that the task completion result is successful execution, the task status of the target task is changed from the processing state to the successful execution state; when it is determined that the task completion result is a failed execution, the task status of the target task is changed from the processing state to the failed execution state. Based on this, the task status of the target task is used to inform the user whether the target task submitted by the user has been successfully executed, so that the user can reprocess the failed target task.

[0108] See also Figure 5 In some embodiments, after step S302, the following steps may also be performed, including but not limited to steps S501 to S502:

[0109] Step S501, when it is determined that there is still a target task in the initialization state, continue to compare the priorities of multiple target tasks in the initialization state;

[0110] Step S502, triggering the timed slice task again according to the priority of the target task in the initialization state.

[0111] In some embodiments, since the server will continuously receive new target tasks uploaded by users, when it is determined that there are still target tasks in the initialization state, the priorities of multiple target tasks in the initialization state will continue to be compared. And the timed slicing task will be triggered again according to the priority of the target task in the initialization state. After the above optimization, on the basis of using slicing tasks, it is possible to execute the task immediately after submission and to execute the slicing task continuously. It can also support execution according to the priority of the task, support queue-jumping for high-priority tasks, and slowly process low-priority tasks.

[0112] In some embodiments, when initializing the task submission, the system first determines whether the task needs to be queued, and does not need to directly set the task status to [Processing], actively triggering the timed slicing task to execute business logic processing. If queuing is required, the task is set to [Initialize] and waits for the timed slicing task to be triggered.

[0113] In some embodiments, the timed slicing task processing is changed to picking up tasks in the [initialization] state for processing. Once the batch task is picked up, the state is immediately changed to [processing].

[0114] In some embodiments, when a scheduled slicing task completes a task, it is determined whether there is a batch task in the [initialization] state. If there is, the scheduled task is immediately triggered to execute.

[0115] See also Figure 6 In some embodiments, step S106 may include but is not limited to steps S601 to S602:

[0116] Step S601, when it is determined that the task status of the target task is in the processing status, each target task is split into a plurality of timed slice tasks according to preset task conditions;

[0117] Step S602: Process multiple timed slice tasks according to business logic to obtain task processing results.

[0118] In order to speed up the processing of target tasks, the embodiment of the present application adopts timed slicing tasks, that is, regularly splitting large batch tasks into small tasks according to preset conditions, and evenly distributing fine-grained tasks on each server in the cluster for processing. After all task details are processed, they are aggregated and processed.

[0119] Taking the PPT file generation task of the scheduled slicing task as an example, the process can be as follows:

[0120] 1. The operator clicks Submit, and the system generates a task batch with the status of [Processing], and generates task details with the same number of PPT pages under this batch. The system processes based on the slide page of the PPT, with one task detail per page.

[0121] 2. Distribute evenly to each server for processing based on task details.

[0122] 3. Each server processes the assigned task details respectively, and processes according to the processor configured for each detail page, queries and assembles the fixed-format data required to render the PPT page, and updates the data to the task details table. At this time, the task details are changed to the [Completed] status.

[0123] 4. After all the page data of all PPTs are processed, the system pulls the PPT template, parses the template, traverses each page, and renders the PPT pages separately.

[0124] 5. After all rendering is completed, the newly generated PPT file will be uploaded to the file storage server, a download link will be generated, and the batch task status will be changed to [Completed].

[0125] See also Figure 7 In some embodiments, the task processing method of the embodiment of the present application may also include but is not limited to steps S701 to S708:

[0126] Step S701, determining the processing completion time of the target task;

[0127] Step S702, determining the time when the task status of the target task is changed to the processing status;

[0128] Step S703, determining the actual processing time of the target task according to the difference between the processing completion time and the change time;

[0129] Step S704, determining the number of first tasks being queued and the number of second tasks being executed in the target server;

[0130] Step S705, determining the task processing quantity of the target server according to the sum of the first task quantity and the second task quantity;

[0131] Step S706, determining the number of parallel tasks when the target server is in a full load state;

[0132] Step S707, determining the average actual execution time of the task according to the historical task processing data of the target server;

[0133] Step S708, determining the estimated completion time of the target task according to the number of tasks to be processed, the number of tasks to be run in parallel, and the average actual execution time of the tasks.

[0134] In some embodiments, on the system operation page, the estimated completion time of a target task can also be calculated, and the actual processing time of each target task can be accurately calculated. The specific calculation formula is as follows:

[0135] Actual task processing time = (task processing completion time - task status changed to [Processing] time);

[0136] Estimated completion time = (number of tasks in the queue + number of tasks being executed) / number of parallel tasks * [average actual execution time of tasks].

[0137] Based on this, for users, if the system has no tasks being processed, the initialization task will be executed immediately, reducing the user's waiting time. At the same time, the page can prompt the user's estimated completion time to optimize the user's experience. The system function is expanded to support users to jump the queue according to the urgency of the task. From a system level, the task processing method of the embodiment of the present application can ensure that the sharding tasks are processed continuously. At the same time, the sharding tasks themselves will also distribute the task details to each server for processing, reducing the idle rate of the server and making full use of the server's resources.

[0138] See also Figure 8 The embodiment of the present application also provides a task processing device, which can implement the above-mentioned task processing method, and the device includes:

[0139] The first module 810 is used to obtain multiple target tasks submitted by the user;

[0140] The second module 820 is used to identify the priority of the target task and the load state of the target server processing the target task, wherein the load state includes a full load state and an idle state;

[0141] The third module 830 is used to configure the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state;

[0142] The fourth module 840 is used to generate a task processing sequence according to the priorities of multiple target tasks;

[0143] The fifth module 850 is used to change the task state of the corresponding target task from the initialization state to the processing state according to the task processing sequence when it is determined that the task state of the target task is the initialization state and the target server is in an idle state;

[0144] The sixth module 860 is used to process multiple target tasks according to the timed slice tasks according to the preset business logic to obtain the task processing result when it is determined that the task status of the target task is in the processing status.

[0145] In some embodiments of the present application, the first module 810 obtains multiple target tasks submitted by a user; the second module 820 identifies the priority of the target task and the load status of the target server that processes the target task, wherein the load status includes a full load status and an idle status; the third module 830 configures the task status of the target task according to the priority of the target task and the load status of the target server, wherein the task status includes an initialization status and a processing status; the fourth module 840 generates a task processing sequence according to the priorities of multiple target tasks; the fifth module 850, when determining that the task status of the target task is an initialization status and the target server is in an idle status, changes the task status of the corresponding target task from an initialization status to a processing status according to the task processing sequence; the sixth module 860, when determining that the task status of the target task is a processing status, processes the multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing result.

[0146] In some embodiments of the present application, multiple target tasks submitted by users are obtained. Specifically, multiple target tasks submitted by the same user can be obtained, and multiple target tasks submitted by different users can also be obtained. The target task can be different types of business tasks. In the enterprise business operation scenario, taking the generation of an enterprise white paper as an example, the target task can be a PPT file generation task. In the financial scenario, the operator can submit a target file generation task through the enterprise's business operation system, and the backend server performs task processing on the target file generation task to generate the target file.

[0147] In some embodiments of the present application, the priority of the target task and the load state of the target server for processing the target task are identified, wherein the load state includes a full load state and an idle state. Since the urgency of different target tasks submitted by users is different, therefore, it is necessary to identify the priority of each target task so that the server can execute according to the priority of the task, so that high-priority tasks can be processed in queue, and low-priority tasks can be processed in turn. In addition, it is also necessary to analyze the current load state of the target server for processing the target task to determine whether the target server is currently in a full load state or an idle state.

[0148] In some embodiments of the present application, the task state of the target task is determined according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state. The task state of the target task is determined by comprehensively considering the priority of the target task and the current load state of the target server, so as to characterize whether the target task can enter processing or wait for processing according to the task state. It should be noted that when the target task is in the initialization state, it means that the target task is waiting in line on the server for processing; when the target task is in the processing state, it means that the target task has been picked up by the server and is being processed.

[0149] In some embodiments of the present application, a task processing sequence is generated according to the priorities of multiple target tasks. By generating a task processing sequence according to the priorities of the target tasks, the server can process multiple target tasks according to the task processing sequence, so that high-priority tasks can be queued and processed, and low-priority tasks are waiting in line for processing.

[0150] In some embodiments of the present application, when it is determined that the task state of the target task is in the initialization state and the target server is in an idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence. The target server detects that there is a target task in the initialization state, that is, it determines that there are target tasks waiting to be processed, and the target server is in an idle state. Then, the target server retrieves the target tasks waiting to be processed according to the task processing sequence, which can ensure that the tasks are processed continuously, thereby making full use of the server's resources and reducing the server's idle rate. Moreover, it can support users to jump in line according to the priority of the task during the server processing process.

[0151] In some embodiments of the present application, when it is determined that the task status of the target task is in the processing state, multiple target tasks are processed according to the preset business logic as scheduled slice tasks to obtain task processing results. In the enterprise business operation scenario, taking the generation of an enterprise white paper as an example, the target task is a PPT file generation task. When the PPT file generation task is configured as a processing state, the server pulls the PPT template according to the PPT generation business logic, parses the PPT template, traverses each page, and renders the PPT page separately. After all renderings are completed, a new PPT file is generated. Based on the use of slice tasks, the embodiments of the present application can achieve immediate execution after submitting the task and continuous execution of the slice tasks. It can also support execution according to the priority of the task, support queue processing of high-priority tasks, and slowly process low-priority tasks.

[0152] Based on this, in the task processing device of the embodiment of the present application, the first module 810 obtains multiple target tasks submitted by the user; the second module 820 identifies the priority of the target task and the load status of the target server that processes the target task, wherein the load status includes a full load status and an idle status; the third module 830 configures the task status of the target task according to the priority of the target task and the load status of the target server, wherein the task status includes an initialization status and a processing status; the fourth module 840 generates a task processing sequence according to the priority of multiple target tasks; the fifth module 850 changes the task status of the corresponding target task from the initialization status to the processing status according to the task processing sequence when it is determined that the task status of the target task is the initialization status and the target server is in the idle status; the sixth module 860 processes the multiple target tasks according to the timed slicing tasks according to the preset business logic when it is determined that the task status of the target task is the processing status, and obtains the task processing result. The present application obtains multiple target tasks submitted by the user; identifies the priority of the target task and the load state of the target server that processes the target task, wherein the load state includes a full load state and an idle state; configures the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state; generates a task processing sequence according to the priority of multiple target tasks; when it is determined that the task state of the target task is the initialization state and the target server is in an idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence; when it is determined that the task state of the target task is the processing state, multiple target tasks are processed according to the timed slicing tasks according to the preset business logic to obtain the task processing result. By obtaining multiple target tasks submitted by the user, identifying the priority of the target task and the load state of the target server that processes the target task, configuring the task state of the target task according to the priority of the target task and the load state of the target server, the initialization state indicates that the target task still needs to wait in line, and the processing state indicates that the target task is picked up by the server for processing. And generate a task processing sequence according to the priority of multiple target tasks. When it is determined that the task state of the target task is in the initialization state and the target server is in the idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence, so that the task can be processed continuously by the server, making full use of the server resources, reducing the server idle rate, reducing the user's waiting time, thereby improving the user experience, and supporting users to queue up according to the priority of the task during the server processing process. When it is determined that the task state of the target task is in the processing state, the server processes multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing results.Based on this, the embodiments of the present application can realize that tasks can be processed continuously by the server, fully utilizing the server resources, reducing the server idle rate, reducing the user's waiting time, thereby improving the user experience, and supporting users to jump the queue according to the urgency of the task during the server processing process. Especially in the enterprise business operation scenario, it can speed up the generation of business documents, improve business service efficiency, and thus enhance the competitiveness of the enterprise.

[0153] The specific implementation of the task processing device is basically the same as the specific implementation of the above-mentioned task processing method, and will not be repeated here.

[0154] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned task processing method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0155] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0156] The processor 901 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solution provided in the embodiments of the present application.

[0157] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device or a random access memory (RAM). The memory 902 can store an operating system and other applications. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the task processing method of the embodiment of this application, that is, by obtaining multiple target tasks submitted by the user; identifying the priority of the target task and the load state of the target server for processing the target task, wherein the load state includes a full load state and an idle state; configuring the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state; generating a task processing sequence according to the priority of multiple target tasks; when it is determined that the task state of the target task is the initialization state and the target server is in an idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence; when it is determined that the task state of the target task is the processing state, the multiple target tasks are processed according to the timed slicing tasks according to the preset business logic to obtain the task processing result. By acquiring multiple target tasks submitted by the user, identifying and determining the priority of the target task and the load state of the target server that processes the target task, the task state of the target task is configured according to the priority of the target task and the load state of the target server. The initialization state indicates that the target task still needs to wait in line, and the processing state indicates that the target task is picked up by the server for processing. And a task processing sequence is generated according to the priority of multiple target tasks. When it is determined that the task state of the target task is the initialization state and the target server is in an idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence, so that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, the waiting time of the user is reduced, and the user experience is improved. Moreover, it can support the user to jump the queue according to the priority of the task during the server processing process. When it is determined that the task state of the target task is the processing state, the server processes multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing result. Based on this, the embodiments of the present application can realize that tasks can be processed continuously by the server, fully utilizing the server resources, reducing the server idle rate, reducing the user's waiting time, thereby improving the user experience, and supporting users to jump the queue according to the urgency of the task during the server processing process. Especially in the enterprise business operation scenario, it can speed up the generation of business documents, improve business service efficiency, and thus enhance the competitiveness of the enterprise.

[0158] The input / output interface 903 is used to implement information input and output.

[0159] The communication interface 904 is used to realize the communication interaction between this device and other devices. Communication can be realized through wired methods (such as USB, network cable, etc.) or wireless methods (such as mobile network, WIFI, Bluetooth, etc.).

[0160] The bus transmits information between various components of the device (eg, the processor 901 , the memory 902 , the input / output interface 903 , and the communication interface 904 ).

[0161] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus.

[0162] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned task processing method is implemented.

[0163] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor 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.

[0164] The task processing method, task processing device, electronic device and storage medium provided by the embodiment of the present application are obtained by obtaining multiple target tasks submitted by the user; identifying the priority of the target task and the load state of the target server for processing the target task, wherein the load state includes a full load state and an idle state; configuring the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state; generating a task processing sequence according to the priority of multiple target tasks; when the task state of the target task is determined to be the initialization state and the target server is in an idle state, changing the task state of the corresponding target task from the initialization state to the processing state according to the task processing sequence; when the task state of the target task is determined to be the processing state, processing multiple target tasks according to the timed slicing tasks according to the preset business logic, and obtaining the task processing result. By obtaining multiple target tasks submitted by the user, identifying the priority of the target task and the load state of the target server for processing the target task, configuring the task state of the target task according to the priority of the target task and the load state of the target server, the initialization state indicates that the target task still needs to wait in line, and the processing state indicates that the target task is picked up by the server for processing. And generating a task processing sequence according to the priority of multiple target tasks. When it is determined that the task state of the target task is in the initialization state and the target server is in the idle state, the task state of the corresponding target task is changed from the initialization state to the processing state according to the task processing sequence, so that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, and the waiting time of the user is reduced, thereby improving the user's experience, and it can support users to jump in the queue according to the priority of the task during the server processing process. When it is determined that the task state of the target task is in the processing state, the server processes multiple target tasks according to the timed slicing tasks according to the preset business logic to obtain the task processing result. Based on this, the embodiment of the present application can realize that the task can be processed continuously by the server, the server resources are fully utilized, the idle rate of the server is reduced, and the waiting time of the user is reduced, thereby improving the user's experience, and it can support users to jump in the queue according to the urgency of the task during the server processing process, especially in the enterprise business operation scenario, which can speed up the business file generation speed, improve business service efficiency, and thus enhance the competitiveness of the enterprise.

[0165] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as a computer-readable program, a data structure, a program module or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media generally contain computer-readable programs, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0166] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0167] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0168] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0169] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0170] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0171] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0172] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0173] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0174] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0175] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0176] The preferred embodiments of the present application are described above with reference to the accompanying drawings, but the scope of the rights of the present application is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present application should be within the scope of the rights of the present application.

Claims

1. A task processing method, characterized in that: The method comprises: Obtain multiple target tasks submitted by the user; Identifying the priority of the target task and the load status of the target server processing the target task, wherein the load status includes a full load status and an idle status; configuring the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state; generating a task processing sequence according to the priorities of the plurality of target tasks; When it is determined that the task state of the target task is an initialization state and the target server is in an idle state, changing the task state corresponding to the target task from an initialization state to a processing state according to the task processing sequence; When it is determined that the task status of the target task is in the processing status, the plurality of target tasks are processed as timed slice tasks according to a preset business logic to obtain a task processing result.

2. The method according to claim 1, characterized in that The configuring the task status of the target task according to the priority of the target task and the load status of the target server includes: When it is determined that the priority of the target task is a low priority, configuring the task state of the target task to be an initialization state; When it is determined that the priority of the target task is a high priority and the target server is in a fully loaded state, configuring the task state of the target task to an initialization state; When it is determined that the priority of the target task is a high priority and the target server is in an idle state, the task state of the target task is configured as a processing state.

3. The method according to claim 1, characterized in that In the case where it is determined that the task state of the target task is the initialization state and the target server is in an idle state, after changing the task state corresponding to the target task from the initialization state to the processing state according to the task processing sequence, the method further includes: Performing task processing on the target task according to the business logic of the target task to obtain a task completion result, wherein the task completion result includes execution success and execution failure; The task status of the target task is changed according to the task completion result.

4. The method according to claim 3, characterized in that The changing the task status of the target task according to the task completion result includes: When it is determined that the task completion result is successful execution, the task status of the target task is changed from a processing status to a successful execution status; When it is determined that the task completion result is an execution failure, the task status of the target task is changed from a processing status to an execution failure status.

5. The method according to claim 3, characterized in that: After the task status of the target task is changed according to the task completion result, the method further includes: When it is determined that there is still a target task in the initialization state, continue to compare the priorities of the multiple target tasks in the initialization state; The timed slicing task is triggered again according to the priority of the target task in the initialization state.

6. The method according to claim 1, characterized in that When it is determined that the task status of the target task is in the processing state, the plurality of target tasks are processed according to the preset business logic as timed slice tasks to obtain the task processing result, including: When it is determined that the task status of the target task is in the processing state, each of the target tasks is split into a plurality of timed slice tasks according to preset task conditions; The plurality of timed slice tasks are processed according to the business logic to obtain the task processing results.

7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Determining the processing completion time of the target task; Determine the time at which the task status of the target task is changed to a processing status; Determine the actual processing time of the target task according to the difference between the processing completion time and the change time; Determine the number of first tasks being queued and the number of second tasks being executed in the target server; Determining the task processing quantity of the target server according to the sum of the first task quantity and the second task quantity; Determine the number of parallel tasks when the target server is in a fully loaded state; Determine the average actual execution time of the task based on the historical task processing data of the target server; The estimated completion time of the target task is determined according to the task processing quantity, the task parallel quantity and the average actual execution time of the task.

8. A task processing device, characterized in that: The device comprises: The first module is used to obtain multiple target tasks submitted by the user; A second module is used to identify the priority of the target task and the load state of the target server processing the target task, wherein the load state includes a full load state and an idle state; A third module is used to configure the task state of the target task according to the priority of the target task and the load state of the target server, wherein the task state includes an initialization state and a processing state; A fourth module is used to generate a task processing sequence according to the priorities of the plurality of target tasks; A fifth module is used for changing the task state corresponding to the target task from the initialization state to the processing state according to the task processing sequence when it is determined that the task state of the target task is the initialization state and the target server is in an idle state; The sixth module is used to process the multiple target tasks according to the timed slice tasks according to the preset business logic when it is determined that the task status of the target task is in the processing status, so as to obtain the task processing result.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the task processing method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the task processing method according to any one of claims 1 to 7 is implemented.