Task scheduling method and device, equipment and storage medium
By analyzing task information and generating business logic and scenarios, and automatically determining task scheduling information and executors, the difficulty and stability of task scheduling development in the financial field are solved, and efficiency and security are improved.
Patent Information
- Application Number
- CN202411104741.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-13
AI Technical Summary
In task scheduling in the financial field, the existing technology leads to problems such as high difficulty in developing scheduling tasks, low efficiency, stability and security.
By obtaining task information for analysis, generating business logic information and task scenarios, determining task scheduling information and executors, realizing automated task scheduling, and avoiding targeted setting of specific execution methods and paying attention to success rates.
It reduces the difficulty of development of scheduling tasks, improves development efficiency, stability and security, and realizes automated task execution.
Smart Images

Figure CN119127418A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and in particular to a task scheduling method, a task scheduling device, a computer device, and a computer-readable storage medium. Background Art
[0002] In the financial field, there are various task scenarios that require task scheduling. In the underwriting task scenario, there will be some delayed task execution requirements. For example, during the double recording process, it is necessary to send a text message to the agent to notify him to contact the customer for double recording. Except for the first time on the day of insurance, other times require sending text message notifications to the agent every other day and other scheduling tasks. In related technologies, setting up scheduling tasks requires not only writing task logic and execution cycles, but also setting specific task scheduling execution methods and paying attention to whether the task scheduling is successful. This leads to high difficulty in developing scheduling tasks, low development efficiency, and low stability and security. Summary of the invention
[0003] The present application provides a task scheduling method, a task scheduling device, a computer device and a computer-readable storage medium, aiming to solve the problems of high difficulty in developing scheduling tasks, low development efficiency, and low stability and security.
[0004] To achieve the above object, the present application provides a task scheduling method, the method comprising:
[0005] Obtaining task information of the task to be scheduled, and parsing the task information to obtain task execution information, task execution requirements and task interface information of the task to be scheduled;
[0006] Generate the business logic information of the task to be scheduled according to the task execution information and the task interface information;
[0007] Determine the task scenario of the task to be scheduled according to the task execution information and the task execution requirements;
[0008] Generate task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario;
[0009] Determine the task scheduling executor corresponding to the task to be scheduled according to the task scenario;
[0010] Based on the task scheduling executor, the to-be-scheduled task is processed according to the task scheduling information to generate a task scheduling result.
[0011] To achieve the above object, the present application provides a task scheduling device, the task scheduling device comprising:
[0012] The task information parsing module is used to obtain the task information of the task to be scheduled, and parse the task information to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled;
[0013] A business logic generation module, used to generate business logic information of the task to be scheduled according to the task execution information and the task interface information;
[0014] A task scenario determination module, used to determine the task scenario of the task to be scheduled according to the task execution information and task execution requirements;
[0015] A scheduling information generation module, used to generate task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario;
[0016] An executor determination module is used to determine the task scheduling executor corresponding to the task to be scheduled according to the task scenario;
[0017] The scheduling result generating module processes the to-be-scheduled task according to the task scheduling information based on the task scheduling executor to generate a task scheduling result.
[0018] To achieve the above-mentioned purpose, the present application provides a computer device, which includes a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the task scheduling method described above when executing the computer program.
[0019] To achieve the above objectives, the present application provides 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 processor implements the task scheduling method as described above.
[0020] The task scheduling method, task scheduling device, computer equipment and computer-readable storage medium disclosed in the embodiment of the present application obtain the task information of the task to be scheduled, and parse the task information to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled; generate the business logic information of the task to be scheduled according to the task execution information and the task interface information; determine the task scenario of the task to be scheduled according to the task execution information and the task execution requirements; generate the task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario; determine the task scheduling executor corresponding to the task to be scheduled according to the task scenario; based on the task scheduling executor, the task to be scheduled is processed according to the task scheduling information to generate a task scheduling result. In this way, the task scheduling information can be determined according to the business logic information and the task scenario, and the task scheduling executor can be determined according to the task scenario, so that the corresponding scheduling task can be executed without setting a specific task scheduling execution method in a targeted manner and without paying attention to the success rate of task scheduling, thereby reducing the development difficulty of scheduling tasks, improving development efficiency, and improving stability and security. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 It is a scenario diagram of a task scheduling method provided in an embodiment of the present application;
[0023] Figure 2 It is a flowchart of a task scheduling method provided in an embodiment of the present application;
[0024] Figure 3 is a schematic block diagram of a task scheduling device provided in one embodiment of the present application;
[0025] Figure 4 It is a schematic block diagram of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0026] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0027] The flowcharts shown in the accompanying drawings are only examples and do not necessarily include all the contents and operations / steps, nor do they have to be executed in the order described. For example, some operations / steps can also be decomposed, combined or partially merged, so the actual execution order may change according to actual conditions. In addition, although the functional modules are divided in the device schematic, in some cases, the module division can be different from that in the device schematic.
[0028] The term "and / or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0029] The present application proposes a task scheduling method, a task scheduling device, a computer device and a computer-readable storage medium, which can determine task scheduling information according to business logic information and task scenarios, and determine a task scheduling executor according to the task scenario, so that the corresponding scheduling task can be executed without setting a specific task scheduling execution method in a targeted manner and without paying attention to the success rate of task scheduling, thereby reducing the development difficulty of scheduling tasks, improving development efficiency, and improving stability and security.
[0030] The method can be applied to a server, and of course can also be applied to a terminal device, to generate a corresponding image classification model, wherein the terminal device may include a fixed terminal such as a mobile phone, a tablet computer, a personal digital assistant (PDA), etc. The server can be, for example, a separate server or a server cluster. However, for ease of understanding, the following embodiments will be described in detail with a task scheduling method applied to a server.
[0031] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.
[0032] like Figure 1 As shown, the task scheduling method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. The application environment includes a terminal device 110 and a server 120, and the terminal device 110 can communicate with the server 120 through a network. Specifically, the server 120 responds to the outgoing request of the business message, obtains the task information of the task to be scheduled, and parses the task information to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled; generates the business logic information of the task to be scheduled according to the task execution information and the task interface information; determines the task scenario of the task to be scheduled according to the task execution information and the task execution requirements; generates the task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario; determines the task scheduling executor corresponding to the task to be scheduled according to the task scenario; based on the task scheduling executor, processes the task to be scheduled according to the task scheduling information, generates a task scheduling result, and sends the task scheduling result to the terminal device 110. Among them, the server 120 can be an independent server, or it can be 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, content delivery networks (CDN), and big data and artificial intelligence platforms. The terminal device 110 can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0033] See also Figure 2 , Figure 2 It is a schematic flow chart of a task scheduling method provided by an embodiment of the present application. Among them, the task scheduling method can determine the task scheduling information according to the business logic information and the task scenario, and determine the task scheduling executor according to the task scenario, so that the corresponding scheduling task can be executed without setting a specific task scheduling execution mode in a targeted manner and without paying attention to the success rate of task scheduling, thereby reducing the development difficulty of the scheduling task, improving the development efficiency, and improving stability and security.
[0034] like Figure 2 As shown, the task scheduling method includes steps S101 to S106.
[0035] S101. Obtain task information of a task to be scheduled, and parse the task information to obtain task execution information, task execution requirements, and task interface information of the task to be scheduled.
[0036] Among them, the tasks to be scheduled are tasks that need to be scheduled, which can be immediate tasks, delayed tasks, etc. Task information can include task-related information of the tasks to be scheduled, such as task execution information, task execution requirements, and task interface information. Task execution information can include information such as executor name and execution parameters. Task execution requirements can include information such as expected execution time, task expiration time, and number of executions. Task interface information can be used to call the corresponding task interface and determine the business logic information of the tasks to be scheduled.
[0037] In some embodiments, the subtasks of the task information are parsed to obtain the task subject and the corresponding text information in the subtask; the task subject is classified according to the text information to obtain the category information of the subtask; the task information is classified according to the category information of the subtask to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled. In this way, the task execution information, task execution requirements and task interface information of the task to be scheduled can be accurately extracted from the task information.
[0038] Among them, task information generally includes multiple subtasks, and the categories corresponding to each subtask may be the same or different. It is necessary to classify them so that the various subtasks can be classified into task execution information, task execution requirements and task interface information. The task subject can be the subject information corresponding to the subtask, indicating the main task information of the subtask. The text information can be the text information included in the subtask. The category information can be the task category corresponding to the subtask, such as task execution information, task execution requirements and task interface information.
[0039] Specifically, the subtasks of the task information are parsed to obtain the task topics corresponding to each subtask and the text information corresponding to each task topic; the keyword information in the text information corresponding to each task topic is extracted, and the task topics are classified according to the keyword information, so as to determine the category information of the task topics corresponding to each subtask; finally, the task information is classified according to the category information of the task topics, so as to divide the subtasks in the task information into task execution information, task execution requirements and task interface information of the tasks to be scheduled.
[0040] Exemplarily, if the subtasks of the task information include subtask A and subtask B, the task subject corresponding to subtask A is determined to be executor, and the corresponding text information mainly includes contents such as executor name and executor parameters; the task subject corresponding to subtask B is determined to be execution time, and the corresponding text information mainly includes contents such as expected execution time; the keyword information of subtask A and subtask B are extracted as executor and time respectively; the task subjects are classified according to the keyword information, so as to determine that the category information corresponding to subtask A and subtask B is task execution information and task execution requirement; finally, the information corresponding to subtask A is classified into task execution information, and the information corresponding to subtask B is classified into task execution requirement.
[0041] It should be noted that by traversing all subtasks in the task information, the task information can be classified into task execution information, task execution requirements and task interface information.
[0042] S102: Generate business logic information of the task to be scheduled according to the task execution information and the task interface information.
[0043] The business logic information is used to represent the business logic involved in the task to be scheduled, and is used to determine the task scheduling information corresponding to the task to be scheduled.
[0044] In some embodiments, a preset code framework is obtained, and a task scheduling code is generated through the preset code framework and task execution information; the task scheduling code is optimized according to the task interface information to obtain a target task scheduling code; the target task scheduling code is parsed to obtain the business logic information of the task to be scheduled. Thus, the task scheduling code can be automatically generated through the preset code framework, task execution information and task interface information, so as to extract the business logic information from the task scheduling code.
[0045] The preset code framework is a pre-set general code framework, which can generate task scheduling codes applicable to different scenarios according to task execution information. The target task scheduling code is the task scheduling code optimized by the task interface information.
[0046] Specifically, a pre-set general code framework can be obtained, and parameters such as task execution information can be substituted into the preset code framework to generate a task scheduling code that conforms to the task execution information; the task scheduling code is optimized according to the task interface information to obtain the target task scheduling code that can call the task interface; finally, the target task scheduling code is parsed to obtain the business logic information of the task to be scheduled.
[0047] Exemplarily, a pre-set general code framework can be obtained, and parameters such as task execution information can be substituted into the preset code framework to generate task scheduling code that conforms to the task execution information; then, the task interface is defined according to the task interface information and an access entry is provided for subsequent batch scheduling, and sharding information is supported. After the task interface is defined, the task scheduling code can be optimized according to the task interface and the corresponding task interface information to obtain the target task scheduling code that can call the task interface; finally, the target task scheduling code is parsed to obtain the business logic information of the task to be scheduled.
[0048] S103: Determine the task scenario of the task to be scheduled according to the task execution information and the task execution requirement.
[0049] Among them, the task scenarios of the tasks to be scheduled may include delayed task scenarios, immediate task scenarios, and scheduled task scenarios.
[0050] In some embodiments, the business type of the task to be scheduled is determined according to the task execution information, and the task scenario of the task to be scheduled is determined according to the business type and the task execution requirement. Thus, the corresponding business type can be accurately determined, and thus the corresponding task scenario can be accurately determined.
[0051] Among them, business types may include insurance business, deposit business, loan business and other types.
[0052] Specifically, the business type of the task to be scheduled can be determined by analyzing the task execution information; and the task scenario of the task to be scheduled can be accurately determined according to the business type and the task execution requirements.
[0053] Exemplarily, the business type of the task to be scheduled can be determined as an insurance task based on the executor name and execution parameters, and then the task scenario of the task to be scheduled can be determined as a delayed task scenario based on information such as the business type, expected execution time, task overdue time and number of executions.
[0054] S104: Generate task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario.
[0055] The task scheduling information may include information required for scheduling the task to be scheduled.
[0056] In some embodiments, the slicing subtasks corresponding to the task to be scheduled are determined according to the business logic information; the timeliness information corresponding to the slicing subtasks is determined according to the task scenario; and the task scheduling information corresponding to the task to be scheduled is generated according to the slicing subtasks and their corresponding timeliness information. Thus, the task scheduling information can be accurately generated to execute the task to be scheduled later.
[0057] The shard subtask is the shard information obtained after the task to be scheduled is divided. The timeliness information is used to indicate the execution interval time corresponding to each shard subtask, for example, it can be 2 minutes.
[0058] Specifically, the data of the task to be scheduled can be dispersed and stored in multiple databases or nodes through business logic information, so as to obtain sharded subtasks; the timeliness information corresponding to the sharded subtasks can be determined according to the task scenario; and the task scheduling information corresponding to the task to be scheduled can be generated according to the sharded subtasks and their corresponding timeliness information.
[0059] For example, if the task scenario is a delayed task scenario, it can be determined that the timeliness information corresponding to the shard subtask is 2 minutes. Finally, the task scheduling information corresponding to the task to be scheduled is generated by combining the shard subtask and its corresponding timeliness information, so that the generated task scheduling information can process each shard subtask relatively balanced when executing the task to be scheduled.
[0060] S105. Determine the task scheduling executor corresponding to the task to be scheduled according to the task scenario.
[0061] The task scheduling executor may be an executor for executing the task to be scheduled.
[0062] In some embodiments, the similarity between the task scenario and the preset task scenario is determined; if the similarity between the task scenario and the preset task scenario is higher than a preset similarity threshold, the task scheduling executor corresponding to the preset task scenario is obtained as the task scheduling executor corresponding to the task to be scheduled. Thus, the task scheduling executor corresponding to the task to be scheduled can be accurately determined.
[0063] The preset task scenario may be a pre-set task scenario, and the preset similarity threshold may be any similarity threshold, such as 0.8, which is not specifically limited here.
[0064] Specifically, determine the similarity between the task scenario and the preset task scenario; if the similarity between the task scenario and the preset task scenario is higher than the preset similarity threshold, obtain the task scheduling executor corresponding to the preset task scenario as the task scheduling executor corresponding to the task to be scheduled; if the similarity between the task scenario and the preset task scenario is not higher than the preset similarity threshold, re-determine the task scenario of the task to be scheduled.
[0065] Exemplarily, errors may occur due to different action objects or action parameters, so whether the task scene is a preset task scene can be determined by comparing the similarity between the task scene and the preset task scene. If the preset similarity threshold is 0.9, if the similarity between the task scene and the preset task scene is higher than 0.9, for example, both are delayed task scenes, then the task scheduling executor corresponding to the preset task scene can be obtained as the task scheduling executor corresponding to the task to be scheduled. If the similarity between the task scene and the preset task scene is not higher than 0.9, it is necessary to re-determine the task scene of the task to be scheduled or use the task scheduling executor corresponding to the preset task scene with the highest similarity as the task scheduling executor corresponding to the task to be scheduled.
[0066] S106 , based on the task scheduling executor, processing the task to be scheduled according to the task scheduling information, and generating a task scheduling result.
[0067] Specifically, based on the task scheduling executor, the to-be-scheduled task may be executed according to the task scheduling information, thereby generating a task scheduling result. The task scheduling result may include information such as a scheduling task log table and a task execution status.
[0068] In some embodiments, based on the task scheduling executor, the scheduled task is processed according to the task scheduling information, and after the task scheduling result is generated, the task execution status of the scheduled task is determined according to the task scheduling result; if the task execution status is an abnormal state, the scheduled task log table is obtained from the task scheduling result; the scheduled task log table is traversed to determine the abnormal log information, and the abnormal problem corresponding to the scheduled task is determined according to the abnormal log information. In this way, when the task execution status is an abnormal state, production problems can be discovered quickly and efficiently, reducing the asset losses caused by production problems.
[0069] The task execution status may include a normal state and an abnormal state. The scheduling task log table is used to include log information when executing the task to be scheduled. The abnormal log information is abnormal log information.
[0070] Specifically, the task execution status of the task to be scheduled can be determined from the task scheduling result; if the task execution status is normal, it means that the scheduled task is executed smoothly and no subsequent operations are required; if the task execution status is abnormal, the scheduled task log table is obtained from the task scheduling result; the scheduled task log table is traversed to determine the abnormal log information, and the abnormal problem corresponding to the task to be scheduled is determined based on the abnormal log information.
[0071] For example, if the task execution status is normal, if the task scenario is a one-time task scenario, the next expected execution time is set to the overdue time, so that it will not be executed later. If the task scenario is a delayed task scenario and the next execution time is set, the task will be executed again when the current time meets the next execution time. If the next execution time is not set, the task will be captured and executed again after 2 minutes.
[0072] For example, if the task execution status is abnormal, the scheduling task log table is obtained from the task scheduling result, and the abnormal log information is captured in the scheduling task log table, and then the abnormal log information is saved in a special error log table without affecting the normal execution of other tasks. In this way, by monitoring whether there is error log data in the error log table and whether there is a task in the delayed task table whose expected execution time is less than the current time, an alarm reminder about delayed tasks can be issued, so that developers can quickly and efficiently discover production problems and reduce the asset losses caused by production problems.
[0073] The task scheduling method disclosed in the embodiment of the present application obtains the task information of the task to be scheduled, and parses the task information to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled; generates the business logic information of the task to be scheduled according to the task execution information and the task interface information; determines the task scenario of the task to be scheduled according to the task execution information and the task execution requirements; generates the task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario; determines the task scheduling executor corresponding to the task to be scheduled according to the task scenario; based on the task scheduling executor, processes the task to be scheduled according to the task scheduling information to generate a task scheduling result. In this way, the task scheduling information can be determined according to the business logic information and the task scenario, and the task scheduling executor can be determined according to the task scenario, so that the corresponding scheduling task can be executed without setting a specific task scheduling execution method in a targeted manner and without paying attention to the success rate of the task scheduling, thereby reducing the development difficulty of the scheduling task, improving the development efficiency, and improving the stability and security.
[0074] See also Figure 3 , Figure 3 It is a schematic block diagram of a task scheduling device provided in an embodiment of the present application. The task scheduling device can be configured in a server to execute the aforementioned task scheduling method.
[0075] like Figure 3 As shown, the task scheduling device 200 includes: a task information parsing module 201, a business logic generating module 202, a task scenario determining module 203, a scheduling information generating module 204, an executor determining module 205 and a scheduling result generating module 206.
[0076] The task information parsing module 201 is used to obtain the task information of the task to be scheduled, and parse the task information to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled;
[0077] A business logic generation module 202, configured to generate business logic information of the task to be scheduled according to the task execution information and the task interface information;
[0078] A task scenario determination module 203 is used to determine the task scenario of the task to be scheduled according to the task execution information and the task execution requirement;
[0079] A scheduling information generating module 204 is used to generate task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario;
[0080] An executor determination module 205 is used to determine a task scheduling executor corresponding to the task to be scheduled according to the task scenario;
[0081] The scheduling result generating module 206 processes the to-be-scheduled task based on the task scheduling executor and according to the task scheduling information to generate a task scheduling result.
[0082] In some embodiments, the task information parsing module 201 is also used to parse the subtasks of the task information to obtain the task subject and the corresponding text information in the subtask; classify the task subject according to the text information to obtain the category information of the subtask; classify the task information according to the category information of the subtask to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled.
[0083] In some embodiments, the business logic generation module 202 is also used to obtain a preset code framework, and generate a task scheduling code through the preset code framework and the task execution information; optimize the task scheduling code according to the task interface information to obtain the target task scheduling code; parse the target task scheduling code to obtain the business logic information of the task to be scheduled.
[0084] In some embodiments, the task scenario determination module 203 is further used to determine the business type of the task to be scheduled according to the task execution information; and determine the task scenario of the task to be scheduled according to the business type and the task execution requirement.
[0085] In some embodiments, the scheduling information generation module 204 is also used to determine the sharded subtask corresponding to the task to be scheduled based on the business logic information; determine the timeliness information corresponding to the sharded subtask based on the task scenario; and generate task scheduling information corresponding to the task to be scheduled based on the sharded subtask and its corresponding timeliness information.
[0086] In some embodiments, the executor determination module 205 is also used to determine the similarity between the task scenario and the preset task scenario; if the similarity between the task scenario and the preset task scenario is higher than a preset similarity threshold, the task scheduling executor corresponding to the preset task scenario is obtained as the task scheduling executor corresponding to the task to be scheduled.
[0087] In some embodiments, the task scheduling device also includes an exception monitoring module 207, which is also used to determine the task execution status of the task to be scheduled based on the task scheduling result; if the task execution status is an abnormal state, obtain the scheduling task log table from the task scheduling result; traverse the scheduling task log table to determine the abnormal log information, and determine the abnormal problem corresponding to the task to be scheduled based on the abnormal log information.
[0088] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices, modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0089] The method and apparatus of the present application can be used in many general or special computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer terminal devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices.
[0090] Exemplarily, the above method and apparatus may be implemented in the form of a computer program. The computer program may be implemented in the form of a computer program. Figure 4 Runs on the computer device shown.
[0091] See also Figure 4 , Figure 4 1 is a schematic diagram of a computer device provided in an embodiment of the present application. The computer device may be a server.
[0092] like Figure 4 As shown, the computer device includes a processor, a memory and a network interface connected through a system bus, wherein the memory may include a volatile storage medium, a non-volatile storage medium and an internal memory.
[0093] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, and when the program instructions are executed, the processor can execute any task scheduling method.
[0094] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.
[0095] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any task scheduling method.
[0096] The network interface is used for network communication, such as outbound assigned tasks, etc. Those skilled in the art can understand that the structure of the computer device is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0097] It should be understood that the processor may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0098] Among them, in some embodiments, the processor is used to run a computer program stored in a memory to implement the following steps: obtain task information of the task to be scheduled, and parse the task information to obtain task execution information, task execution requirements and task interface information of the task to be scheduled; generate business logic information of the task to be scheduled based on the task execution information and the task interface information; determine the task scenario of the task to be scheduled based on the task execution information and the task execution requirements; generate task scheduling information corresponding to the task to be scheduled based on the business logic information and the task scenario; determine the task scheduling executor corresponding to the task to be scheduled based on the task scenario; based on the task scheduling executor, process the task to be scheduled according to the task scheduling information to generate a task scheduling result.
[0099] In some embodiments, the processor is also used to parse the subtasks of the task information to obtain the task subjects and corresponding text information in the subtasks; classify the task subjects according to the text information to obtain category information of the subtasks; classify the task information according to the category information of the subtasks to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled.
[0100] In some embodiments, the processor is also used to obtain a preset code framework, and generate a task scheduling code through the preset code framework and the task execution information; optimize the task scheduling code according to the task interface information to obtain a target task scheduling code; and parse the target task scheduling code to obtain the business logic information of the task to be scheduled.
[0101] In some implementations, the processor is further configured to determine a business type of the task to be scheduled based on the task execution information; and determine a task scenario of the task to be scheduled based on the business type and the task execution requirements.
[0102] In some embodiments, the processor is also used to determine the sharded subtask corresponding to the task to be scheduled based on the business logic information; determine the timeliness information corresponding to the sharded subtask based on the task scenario; and generate task scheduling information corresponding to the task to be scheduled based on the sharded subtask and its corresponding timeliness information.
[0103] In some embodiments, the processor is also used to determine the similarity between the task scenario and a preset task scenario; if the similarity between the task scenario and the preset task scenario is higher than a preset similarity threshold, the task scheduling executor corresponding to the preset task scenario is obtained as the task scheduling executor corresponding to the task to be scheduled.
[0104] In some embodiments, the processor is also used to determine the task execution status of the task to be scheduled based on the task scheduling result; if the task execution status is an abnormal state, obtain the scheduling task log table from the task scheduling result; traverse the scheduling task log table to determine the abnormal log information, and determine the abnormal problem corresponding to the task to be scheduled based on the abnormal log information.
[0105] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions, and when the program instructions are executed, any one of the task scheduling methods provided in the embodiments of the present application is implemented.
[0106] The computer-readable storage medium may be an internal storage unit of the computer device described in the foregoing embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc., equipped on the computer device.
[0107] Furthermore, the computer-readable storage medium may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data created according to the use of the blockchain node, etc.
[0108] The present invention refers to a new application model of computer technologies such as storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. of the blockchain language model. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the blockchain underlying platform, platform product service layer, and application service layer.
[0109] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A task scheduling method, characterized in that: The method comprises: Obtaining task information of the task to be scheduled, and parsing the task information to obtain task execution information, task execution requirements and task interface information of the task to be scheduled; Generate the business logic information of the task to be scheduled according to the task execution information and the task interface information; Determine the task scenario of the task to be scheduled according to the task execution information and the task execution requirement; Generate task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario; Determine the task scheduling executor corresponding to the task to be scheduled according to the task scenario; Based on the task scheduling executor, the to-be-scheduled task is processed according to the task scheduling information to generate a task scheduling result.
2. The method according to claim 1, characterized in that: The task information is parsed to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled, including: Parsing the subtasks of the task information to obtain the task topics and corresponding text information in the subtasks; Classifying the task subject according to the text information to obtain category information of the subtask; The task information is classified according to the category information of the subtasks to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled.
3. The method according to claim 1, characterized in that: The generating the business logic information of the task to be scheduled according to the task execution information and the task interface information includes: Acquire a preset code framework, and generate a task scheduling code through the preset code framework and the task execution information; Optimizing the task scheduling code according to the task interface information to obtain a target task scheduling code; The target task scheduling code is parsed to obtain the business logic information of the task to be scheduled.
4. The method according to claim 1, characterized in that: The determining the task scenario of the task to be scheduled according to the task execution information and the task execution requirement includes: Determine the business type of the task to be scheduled according to the task execution information; The task scenario of the task to be scheduled is determined according to the business type and the task execution requirement.
5. The method according to claim 1, characterized in that The generating the task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario includes: Determine the shard subtask corresponding to the task to be scheduled according to the business logic information; Determine the timeliness information corresponding to the shard subtask according to the task scenario; According to the sliced subtasks and their corresponding timeliness information, task scheduling information corresponding to the task to be scheduled is generated.
6. The method according to claim 1, characterized in that The step of determining the task scheduling executor corresponding to the task to be scheduled according to the task scenario includes: Determining the similarity between the task scenario and a preset task scenario; If the similarity between the task scenario and the preset task scenario is higher than a preset similarity threshold, the task scheduling executor corresponding to the preset task scenario is obtained as the task scheduling executor corresponding to the task to be scheduled.
7. The method according to claim 1, characterized in that After the task scheduling executor processes the task to be scheduled according to the task scheduling information and generates a task scheduling result, the method further includes: Determine the task execution status of the task to be scheduled according to the task scheduling result; If the task execution status is an abnormal state, obtaining a scheduling task log table from the task scheduling result; The scheduling task log table is traversed to determine the abnormal log information, and the abnormal problem corresponding to the task to be scheduled is determined according to the abnormal log information.
8. A task scheduling device, characterized in that: The task scheduling device comprises: The task information parsing module is used to obtain the task information of the task to be scheduled, and parse the task information to obtain the task execution information, task execution requirements and task interface information of the task to be scheduled; A business logic generation module, used to generate business logic information of the task to be scheduled according to the task execution information and the task interface information; A task scenario determination module, used to determine the task scenario of the task to be scheduled according to the task execution information and task execution requirements; A scheduling information generation module, used to generate task scheduling information corresponding to the task to be scheduled according to the business logic information and the task scenario; An executor determination module is used to determine the task scheduling executor corresponding to the task to be scheduled according to the task scenario; The scheduling result generating module processes the to-be-scheduled task according to the task scheduling information based on the task scheduling executor to generate a task scheduling result.
9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is configured to execute the computer program and implement, when executing the computer program: A task scheduling method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the task scheduling method according to any one of claims 1 to 7.
