Task scheduling method, device, electronic device and storage medium for multi-application system
By receiving task batches to be consumed in task scheduling, calculating basic merge and sorting, and adjusting task queues in combination with domain parameters and manual intervention rate, the problems of low task scheduling efficiency and insufficient throughput in the existing technology are solved, and high efficiency is achieved. task processing and system resource management.
Patent Information
- Application Number
- CN202111362198.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-17
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2041-11-17
AI Technical Summary
The existing technology has network transmission overhead and server performance bottlenecks in task scheduling, cannot effectively handle high-priority tasks, and lacks a unified backlog capability and manual intervention mechanism, resulting in low task scheduling efficiency and insufficient throughput.
By receiving task batches to be consumed, the task type is determined and the basic score is calculated based on the preset calculation rules to sort the tasks; domain parameters and manual intervention ratios are judged, and the task queue processing order is adjusted; domain parameter configuration and task dimension weight calculation are used to flexibly Deliver tasks to a dedicated queue and support user-defined scheduling rules and downstream service interfaces to achieve orderly processing and priority adjustment of tasks.
It improves the efficiency of task scheduling and system throughput, reduces the difficulty of task scheduling under multi-application systems, saves system resources, enables flexible control of downstream service carrying capacity, and improves the priority and processing efficiency of task processing.
Smart Images

Figure CN114138432B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and specifically relates to a task scheduling method, device, electronic device and storage medium for a multi-application system. Background Art
[0002] Enterprise-developed services or third-party services provide many different capabilities to handle complex tasks in application scenarios. However, task scheduling itself is often overlooked, and there is no help for some temporary scheduling requirements proposed by the business side that break the original design.
[0003] Currently, the processing capacity of tasks provided by enterprises or third-party cloud service providers has a certain upper limit, which depends not only on the network transmission overhead but also on the server performance bottleneck. Service providers will also provide a certain backlog capacity while ensuring a certain throughput, but there is no unified standard for backlog capacity among different providers and it is impossible to prioritize high-priority tasks, that is, it is impossible to manually intervene in the priority order that has been set by the system according to the rules. Summary of the invention
[0004] The first purpose of the embodiment of the present application is to provide a task scheduling method for a multi-application system, aiming to solve at least one problem existing in the above-mentioned prior art.
[0005] The embodiment of the present application is implemented as follows: a task scheduling method for a multi-application system, comprising:
[0006] Receive a task batch to be consumed, determine the task type of each task in the task batch, calculate the basic score of each task in each task type based on a preset calculation rule, and sort the tasks in each task type from large to small according to the value of the basic score of each task, so as to obtain a task sequence in each task type;
[0007] Determine whether each task is configured with a domain parameter, and if so, perform domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task;
[0008] Each task is delivered to a corresponding task queue according to the task type and domain type, so as to call a downstream service so that the downstream service processes the tasks in sequence according to the order of each task.
[0009] In one embodiment, after delivering each task to the corresponding task queue according to the task type and domain type, it also includes: determining whether each task is configured with a manual intervention multiplier, if not, calculating the final score of each task according to the default multiplier, if yes, calculating the final score of the corresponding task according to the manual intervention multiplier; adjusting the ranking of each task based on the final score.
[0010] In one embodiment, before calling the downstream service, it also includes: judging whether each task is a static task, and if not, calling the downstream service.
[0011] In one embodiment, calling the downstream service includes: reading the configuration table according to the task type, disassembling the parameters, processing methods and uniform resource locators required for the downstream service to process the task; assembling the calling object of the downstream service, and calling the downstream service according to the calling object.
[0012] In one embodiment, the configuration method of the preset calculation rules is: pre-setting the task dimensions involved in the rule calculation, the task dimensions characterizing the attributes of the task objects; selecting the target task dimensions for participating in the preset calculation rules, setting the basic weight and subdivision weight of each target task dimension, and calculating the basic score of each task in each task type based on the preset calculation rules includes: obtaining the basic score of each task by weighted calculation according to the basic weight and subdivision weight corresponding to each task.
[0013] In one embodiment, the domain parameter is an identifier, and performing domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task includes: determining the domain type of the corresponding task according to the identifier, and the domain type is an exclusive task queue corresponding to the identifier.
[0014] Another object of the embodiment of the present application is to provide a task scheduling system for a multi-application system, comprising:
[0015] A rule calculation module is used to receive a task batch to be consumed, determine the task type of each task in the task batch, calculate the basic score of each task in each task type based on a preset calculation rule, and sort the tasks in each task type from large to small according to the value of the basic score of each task, so as to obtain a task sequence in each task type;
[0016] A domain calculation module is used to determine whether each task is configured with a domain parameter. If so, a domain calculation is performed on the task corresponding to the domain parameter according to the domain parameter to obtain a domain type corresponding to the task.
[0017] The task distribution module is used to deliver each task to the corresponding task queue according to the task type and domain type, so as to call the downstream service so that the downstream service processes the tasks in sequence according to the order of each task.
[0018] In one embodiment, a task adjustment module is also included, which is used to determine whether each task is configured with a manual intervention multiplier. If not, the final score of each task is calculated according to the default multiplier. If yes, the final score of the corresponding task is calculated according to the manual intervention multiplier; and the ranking of each task is adjusted based on the final score.
[0019] Another object of an embodiment of the present application is to provide an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the task scheduling method for a multi-application system.
[0020] Another object of an embodiment of the present application is to provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor executes the steps of the task scheduling method for a multi-application system.
[0021] The embodiment of the present application provides a task scheduling method, system, electronic device and storage medium for a multi-application system. The basic score of processing priority is calculated for each task in each task type through preset calculation rules, and then sorted based on the basic score, so as to facilitate the subsequent orderly processing of the task queue based on the sorting; through the configuration of domain parameters, urgent tasks can be flexibly added to the exclusive queue for exclusive processing, thereby improving the efficiency of processing. The embodiment of the present application designs a task scheduling system for multiple applications. The system is designed to fully support the scalability of the underlying layer, that is, users can completely use the configuration method to configure their own scheduling rules, request parameters of the downstream interface, and manually intervene to adjust the tasks to be delivered to the downstream service. Overall, the difficulty of task scheduling in a multi-application system is reduced, the efficiency of task scheduling is improved, and system resources are saved. At the same time, tasks can be delivered according to the downstream service carrying capacity, and the consumption capacity of the downstream service can be controlled as needed, thereby improving the throughput of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 An implementation process of a task scheduling method for a multi-application system provided by an embodiment of the present application;
[0023] Figure 2 A schematic diagram of the main modules of a task scheduling system for a multi-application system provided by an embodiment of the present application;
[0024] Figure 3 An exemplary system architecture diagram that can be applied to the embodiments of the present application;
[0025] Figure 4 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present application. DETAILED DESCRIPTION
[0026] 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.
[0027] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms of "a" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0028] It should be understood that although the terms first, second, etc. may be used to describe various information in the embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
[0029] It should be pointed out that the embodiments in this application and the features in the embodiments may be combined with each other if there is no conflict.
[0030] In order to further explain the technical means and effects adopted by the present application to achieve the predetermined invention purpose, the specific implementation method, structure, characteristics and effects of the present application are described in detail below in combination with the accompanying drawings and preferred embodiments.
[0031] Figure 1 The following is a flow chart of an implementation of a task scheduling method for a multi-application system provided by an embodiment of the present application. For ease of explanation, only the part related to the embodiment of the present application is shown, which is described in detail as follows:
[0032] A task scheduling method for a multi-application system comprises the following steps:
[0033] S101: receiving a task batch to be consumed, determining the task type of each task in the task batch, calculating the basic score of each task in each task type based on a preset calculation rule, and sorting the tasks in each task type from large to small according to the value of the basic score of each task, so as to obtain a task sequence in each task type;
[0034] S102: Determine whether each task is configured with a domain parameter, and if so, perform domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task;
[0035] S103: delivering each task to a corresponding task queue according to the task type and domain type, so as to call a downstream service so that the downstream service processes the tasks in sequence according to the order of each task.
[0036] In step S101: receiving a task batch to be consumed, determining the task type of each task in the task batch, calculating the basic score of each task in each task type based on the preset calculation rules, and sorting the tasks in each task type from large to small according to the value of the basic score of each task, so as to obtain a task sequence in each task type. Here, the upstream service initiates a request for task batch processing, receives the original task, and then puts it into the message queue to form a task batch to be consumed, thereby realizing the processing of the task. When processing the task, first receive the task batch to be consumed, generate a task batch number to be submitted once, and then determine the task type of each task in the task batch based on the task parameters when each task is passed in, and then calculate the basic score of each task in each task type based on the preset calculation rules, and sort the tasks in each task type from large to small according to the value of the basic score of each task, so as to obtain a task sequence in each task type.
[0037] In one embodiment, the configuration method of the preset calculation rule is: pre-setting the task dimension involved in the rule calculation, the task dimension characterizing the attribute of the task object; selecting the target task dimension for participating in the preset calculation rule, setting the basic weight and subdivision weight of each target task dimension, and calculating the basic score of each task in each task type based on the preset calculation rule includes: obtaining the basic score of each task by weighted calculation according to the basic weight and subdivision weight corresponding to each task. By setting multiple task dimensions, the task dimensions involved in the calculation can be flexibly selected according to the actual situation.
[0038] For example, users can customize the task dimensions involved in rule calculations, and these dimensions will be allowed to participate in task priority calculations. For example, to extract text from a picture (OCR), you can define some attributes of the picture (pixels, resolution, size, color, bit depth, hue, saturation, etc.) as task dimensions. Users can formulate task calculation rules based on the confirmation items of the above task dimensions, and set different weights for weighted calculations based on the task dimensions. Each dimension has a basic weight, and the subdivision items of the dimension have subdivision weight values. For example, a definition file has three attributes, namely three dimensions, namely size, type, and number of fragments. The basic weight for file size can be defined as 1.0, the subdivision weight for files under 10m is 10.0, the subdivision weight for files between 10m and 100m is 9.0, the subdivision weight for files between 100m and 1g is 8.0, and so on; the basic weight for file type is defined as 2.0, the subdivision weight for jpg format is 1.0, the subdivision weight for png format is 2.0, and so on; the basic weight for the number of shards is defined as 3.0, the subdivision weight for 10 shards is 10.0, the subdivision weight for 9 shards is 9.0, and so on. In addition, the system limits ensure that the product of the basic weight and subdivision weight of different dimensions is different, so that the calculation rules of tasks can be dynamically adjusted according to real-time configuration, thereby changing the basic weight of tasks, affecting the sorting of tasks, and making the processing order of tasks dynamically adjusted. Overall, the difficulty of task scheduling in a multi-application system is reduced, the efficiency of task scheduling is improved, and system resources are saved. At the same time, tasks can be delivered according to the service carrying capacity of downstream services, and the consumption capacity of downstream services can be controlled as needed, thereby improving the throughput of the system.
[0039] In one example, the basic score of each task in each task type is calculated based on preset calculation rules. The preset calculation rules can be first obtained, and then the preset calculation rules are read into a dictionary, and dictionary items are obtained by constraining the dictionary data. The basic score of each task in each task type is calculated based on the preset calculation rules according to the dictionary items.
[0040] In step S102: determine whether each task is configured with domain parameters, if yes, perform domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task. After the tasks in each task type are sorted according to the basic score, before the task is delivered, it can be determined whether each task is configured with domain parameters, if yes, perform domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task, if no, deliver the task directly according to the currently determined task queue.
[0041] In one embodiment, the domain parameter is an identifier, and performing domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task includes: determining the domain type of the corresponding task according to the identifier, and the domain type is the exclusive task queue corresponding to the identifier. It should be noted that the domain parameter can be an identifier or a string used to identify the exclusive queue corresponding to the task. The domain type indicates the exclusive queue corresponding to the task, and thus tasks that require expedited or special processing can be identified and added to the exclusive queue.
[0042] In one example, domain calculation is performed on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task. The user can configure the domain parameter in the background, and when performing the calculation, the domain parameter matching each task configuration is first obtained, and then the domain object is constructed based on the matched domain parameter, and the exclusive queue corresponding to the task is identified based on the constructed domain object.
[0043] Therefore, according to the above task dimensions and task rules, the basic score of a single or batch task can be calculated. At this time, the tasks will be sorted according to the basic score. The system will default to delivering them to different queues according to the type of task and the configuration domain parameters corresponding to the current type in descending order of scores.
[0044] For example, user Zhang San uploaded 100 pictures, 33 of which need to be OCR-extracted and 67 need to be cropped; user Li Si uploaded 10 pictures, 5 of which need to be cropped and 5 need to be previewed. At this time, the system will send tasks to three different queues, namely OCR, cropping and preview, according to the behavior. By default, the order is based on the submission time. If the user defines the task rule to set the weight of png format pictures to be higher than that of jpg format pictures, the relative order can be determined according to the type of pictures. The user-defined rules are higher than the default.
[0045] In step S103: each task is delivered to the corresponding task queue according to the task type and domain type, so as to call the downstream service so that the downstream service processes the tasks in sequence according to the order of each task. After confirming the task type queue and exclusive queue of each task, each task is delivered to the corresponding task queue, so that the downstream service can process the tasks in sequence according to the order of each task in the task queue.
[0046] Furthermore, after delivering each task to the corresponding task queue according to the task type and domain type, it also includes: determining whether each task is configured with a manual intervention multiplier, if not, calculating the final score of each task according to the default multiplier, if yes, calculating the final score of the corresponding task according to the manual intervention multiplier; adjusting the order of each task based on the final score. Before the queued tasks in the task queue are delivered to the downstream, the multiplier of the task can be manually intervened to adjust the multiplier of the task, and the multiplier participates in the calculation of the task score. If the value is not adjusted to 1, once the value is adjusted to 10, the task will enjoy a higher priority at the next delivery, and thus be delivered first. In this way, the order of task processing in each task queue can be adjusted through manual intervention before processing, and the final order can be determined under possible human intervention, and then delivered to the queue, and the tasks are delivered according to the downstream service carrying capacity, and then the consumption capacity of the downstream service is controlled as needed, thereby improving the throughput of the system.
[0047] In one embodiment, before calling the downstream service, it also includes: judging whether each task is a static task, and if not, calling the downstream service.
[0048] In one embodiment, the calling of the downstream service includes: reading the configuration table according to the task type, disassembling the parameters, processing methods and uniform resource locators required by the downstream service to process the task; assembling the calling object of the downstream service, and calling the downstream service according to the calling object. In this way, the downstream service resources can be called according to the downstream service capabilities.
[0049] Therefore, the embodiment of the present application provides a task scheduling method for a multi-application system, which calculates the basic score of processing priority for each task in each task type through preset calculation rules, and then sorts based on the basic score, so as to facilitate the subsequent orderly processing of the task queue based on the sorting; through the configuration of domain parameters, urgent tasks can be flexibly added to the exclusive queue for exclusive processing, thereby improving the processing efficiency. The method is designed to fully support the scalability of the underlying layer, that is, users can completely use the configuration method to configure their own scheduling rules, request parameters of the downstream interface, and manually intervene to adjust the tasks to be delivered to the downstream service, which reduces the difficulty of task scheduling in a multi-application system as a whole, improves the efficiency of task scheduling, saves system resources, and can deliver tasks according to the downstream service carrying capacity, and then complete the control of the consumption capacity of the downstream service as needed, thereby improving the system throughput.
[0050] Figure 2 The main module schematic diagram of the task scheduling system for a multi-application system provided in an embodiment of the present application is shown. For the sake of convenience, only the part related to the embodiment of the present application is shown, which is described in detail as follows:
[0051] A task scheduling system 200 for a multi-application system includes:
[0052] Rule calculation module 201: used to receive a task batch to be consumed, determine the task type of each task in the task batch, calculate the basic score of each task in each task type based on a preset calculation rule, and sort the tasks in each task type from large to small according to the value of the basic score of each task, so as to obtain a task sequence in each task type;
[0053] Domain calculation module 202: used to determine whether each task is configured with domain parameters, and if so, perform domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task;
[0054] Task distribution module 203: used for delivering each task to the corresponding task queue according to the task type and domain type, so as to call the downstream service so that the downstream service processes the tasks in sequence according to the order of each task.
[0055] For the rule calculation module 201: it is used to receive the task batch to be consumed, determine the task type of each task in the task batch, calculate the basic score of each task in each task type based on the preset calculation rules, and sort the tasks in each task type from large to small according to the score of each task's basic score, so as to obtain the task sequence in each task type. Here, the upstream service initiates a request for task batch processing, receives the original task, and then puts it into the message queue to form a task batch to be consumed, thereby realizing the processing of the task. When processing the task, first receive the task batch to be consumed, generate a task batch number submitted once, and then determine the task type of each task in the task batch based on the task parameters when each task is passed in, and then calculate the basic score of each task in each task type based on the preset calculation rules, and sort the tasks in each task type from large to small according to the score of each task's basic score, so as to obtain the task sequence in each task type.
[0056] In one embodiment, the configuration method of the preset calculation rule is: pre-setting the task dimension involved in the rule calculation, the task dimension characterizing the attribute of the task object; selecting the target task dimension for participating in the preset calculation rule, setting the basic weight and subdivision weight of each target task dimension, and calculating the basic score of each task in each task type based on the preset calculation rule includes: obtaining the basic score of each task by weighted calculation according to the basic weight and subdivision weight corresponding to each task. By setting multiple task dimensions, the task dimensions involved in the calculation can be flexibly selected according to the actual situation.
[0057] For example, users can customize the task dimensions involved in rule calculations, and these dimensions will be allowed to participate in task priority calculations. For example, to extract text from a picture (OCR), you can define some attributes of the picture (pixels, resolution, size, color, bit depth, hue, saturation, etc.) as task dimensions. Users can formulate task calculation rules based on the confirmation items of the above task dimensions, and set different weights for weighted calculations based on the task dimensions. Each dimension has a basic weight, and the subdivision items of the dimension have subdivision weight values. For example, a definition file has three attributes, namely three dimensions, namely size, type, and number of fragments. The basic weight for file size can be defined as 1.0, the subdivision weight for files under 10m is 10.0, the subdivision weight for files between 10m and 100m is 9.0, the subdivision weight for files between 100m and 1g is 8.0, and so on; the basic weight for file type is defined as 2.0, the subdivision weight for jpg format is 1.0, the subdivision weight for png format is 2.0, and so on; the basic weight for the number of shards is defined as 3.0, the subdivision weight for 10 shards is 10.0, the subdivision weight for 9 shards is 9.0, and so on. In addition, the system limits ensure that the product of the basic weight and subdivision weight of different dimensions is different, so that the calculation rules of tasks can be dynamically adjusted according to real-time configuration, thereby changing the basic weight of tasks, affecting the sorting of tasks, and making the processing order of tasks dynamically adjusted. Overall, the difficulty of task scheduling in a multi-application system is reduced, the efficiency of task scheduling is improved, and system resources are saved. At the same time, tasks can be delivered according to the service carrying capacity of downstream services, and the consumption capacity of downstream services can be controlled as needed, thereby improving the throughput of the system.
[0058] In one example, the basic score of each task in each task type is calculated based on preset calculation rules. The preset calculation rules can be first obtained, and then the preset calculation rules are read into a dictionary, and dictionary items are obtained by constraining the dictionary data. The basic score of each task in each task type is calculated based on the preset calculation rules according to the dictionary items.
[0059] For the domain calculation module 202: it is used to determine whether each task is configured with domain parameters. If so, domain calculation is performed on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task. After the tasks in each task type are sorted according to the basic score, before the task is delivered, it can be determined whether each task is configured with domain parameters. If so, domain calculation is performed on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task. If not, the task is delivered directly according to the currently determined task queue.
[0060] In one embodiment, the domain parameter is an identifier, and performing domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task includes: determining the domain type of the corresponding task according to the identifier, and the domain type is the exclusive task queue corresponding to the identifier. It should be noted that the domain parameter can be an identifier or a string used to identify the exclusive queue corresponding to the task. The domain type indicates the exclusive queue corresponding to the task, and thus tasks that require expedited or special processing can be identified and added to the exclusive queue.
[0061] In one example, domain calculation is performed on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task. The user can configure the domain parameter in the background, and when performing the calculation, the domain parameter matching each task configuration is first obtained, and then the domain object is constructed based on the matched domain parameter, and the exclusive queue corresponding to the task is identified based on the constructed domain object.
[0062] Therefore, according to the above task dimensions and task rules, the basic score of a single or batch task can be calculated. At this time, the tasks will be sorted according to the basic score. The system will default to delivering them to different queues according to the type of task and the configuration domain parameters corresponding to the current type in descending order of scores.
[0063] For example, user Zhang San uploaded 100 pictures, 33 of which need to be OCR-extracted and 67 need to be cropped; user Li Si uploaded 10 pictures, 5 of which need to be cropped and 5 need to be previewed. At this time, the system will send tasks to three different queues, namely OCR, cropping and preview, according to the behavior. By default, the order is based on the submission time. If the user defines the task rule to set the weight of png format pictures to be higher than that of jpg format pictures, the relative order can be determined according to the type of pictures. The user-defined rules are higher than the default.
[0064] For the task distribution module 203: it is used to deliver each task to the corresponding task queue according to the task type and domain type, so as to call the downstream service so that the downstream service can process the tasks in sequence according to the order of each task. After confirming the task type queue and exclusive queue of each task, each task is delivered to the corresponding task queue, so that the downstream service can process the tasks in sequence according to the order of each task in the task queue.
[0065] Further, after each task is delivered to the corresponding task queue according to the task type and domain type, the system also includes a task adjustment module, which is used to determine whether each task is configured with a manual intervention multiplier. If not, the final score of each task is calculated according to the default multiplier. If yes, the final score of the corresponding task is calculated according to the manual intervention multiplier; the order of each task is adjusted based on the final score. Before the queued tasks in the task queue are delivered to the downstream, the multiplier of the task can be manually intervened to adjust the multiplier of the task. The multiplier participates in the calculation of the task score. If the value is not adjusted to 1, once this value is adjusted to 10, the task will enjoy a higher priority at the next delivery, and then be delivered first. In this way, the tasks in each task queue can be processed by manual intervention to adjust the order of task processing, determine the final order under possible human intervention, and then deliver them to the queue, deliver the tasks according to the downstream service carrying capacity, and then complete the control of the consumption capacity of the downstream service as needed, and improve the throughput of the system.
[0066] In one embodiment, before calling the downstream service, it also includes: judging whether each task is a static task, and if not, calling the downstream service.
[0067] In one embodiment, the calling of the downstream service includes: reading the configuration table according to the task type, disassembling the parameters, processing methods and uniform resource locators required by the downstream service to process the task; assembling the calling object of the downstream service, and calling the downstream service according to the calling object. In this way, the downstream service resources can be called according to the downstream service capabilities.
[0068] Therefore, the embodiment of the present application provides a task scheduling system for a multi-application system, which calculates the basic score of processing priority for each task in each task type through preset calculation rules, and then sorts based on the basic score, so as to facilitate the subsequent orderly processing of the task queue based on the sorting; through the configuration of domain parameters, urgent tasks can be flexibly added to the exclusive queue for exclusive processing, thereby improving the processing efficiency. The method is designed to fully support the scalability of the underlying layer, that is, users can completely use the configuration method to configure their own scheduling rules, request parameters of the downstream interface, and manually intervene to adjust the tasks to be delivered to the downstream service, which reduces the difficulty of task scheduling in a multi-application system as a whole, improves the efficiency of task scheduling, saves system resources, and can deliver tasks according to the downstream service carrying capacity, and then complete the control of the consumption capacity of the downstream service as needed, thereby improving the system throughput.
[0069] The embodiment of the present application also provides an electronic device, including: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the task scheduling method for a multi-application system of the embodiment of the present application
[0070] The embodiment of the present application also provides a computer-readable medium on which a computer program is stored. When the program is executed by a processor, the task scheduling method for a multi-application system of the embodiment of the present application is implemented.
[0071] Figure 3 An exemplary system architecture 300 is shown to which the task scheduling method or apparatus for a multi-application system according to an embodiment of the present application can be applied.
[0072] like Figure 3 As shown, the system architecture 300 may include terminal devices 301, 302, 303, a network 304 and a server 305. The network 304 is used to provide a medium for communication links between the terminal devices 301, 302, 303 and the server 305. The network 304 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0073] Users can use terminal devices 301, 302, 303 to interact with server 305 through network 304 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 301, 302, 303, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0074] The terminal devices 301 , 302 , and 303 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0075] The server 305 may be a server providing various services, such as a background management server providing support for the messages sent by the users using the terminal devices 301, 302, 303. The background management server may perform analysis and other processing after receiving the request of the terminal device, and feed back the processing result to the terminal device.
[0076] It should be noted that the task scheduling method for a multi-application system provided in the embodiment of the present application is generally executed by the terminal device 301, 302, 303 or the server 305. Accordingly, the task scheduling device for a multi-application system is generally arranged in the terminal device 301, 302, 303 or the server 305.
[0077] It should be understood that Figure 3The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0078] Reference below Figure 4 , which shows a schematic diagram of the structure of a computer system 400 suitable for implementing an electronic device of an embodiment of the present application. Figure 4 The computer system shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0079] like Figure 4 As shown, the computer system 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 402 or a program loaded from a storage part 408 into a random access memory (RAM) 403. In the RAM 403, various programs and data required for the operation of the system 400 are also stored. The CPU 401, the ROM 402, and the RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0080] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, etc.; an output section 407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 408 including a hard disk, etc.; and a communication section 409 including a network interface card such as a LAN card, a modem, etc. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. A removable medium 411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 410 as needed, so that a computer program read therefrom is installed into the storage section 408 as needed.
[0081] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 409, and / or installed from the removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present application are executed.
[0082] It should be noted that the computer-readable medium shown in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0083] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the above-mentioned module, program segment or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0084] The modules involved in the embodiments described in the present application may be implemented by software or hardware. The modules described may also be set in a processor, for example, it may be described as: a processor includes a determination module, an extraction module, a training module and a screening module. The names of these modules do not constitute a limitation on the modules themselves in some cases, for example, the determination module may also be described as a "module for determining a candidate user set".
[0085] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
[0086] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A task scheduling method for a multi-application system, It is characterized in that include: Receive a task batch to be consumed, determine the task type of each task in the task batch, calculate the basic score of each task in each task type based on a preset calculation rule, and sort the tasks in each task type from large to small according to the value of the basic score of each task, so as to obtain a task sequence in each task type; Determine whether each task is configured with domain parameters. If yes, perform domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task. The domain type is the exclusive task queue corresponding to the task, and add the task to the exclusive queue. After confirming the task type queue and exclusive queue of each task, deliver each task to the corresponding task queue according to the task type and domain type, so as to call the downstream service so that the downstream service processes the tasks in sequence according to the order of each task; After delivering each task to the corresponding task queue according to the task type and domain type, the method further includes: determining whether each task is configured with a manual intervention multiplier, if not, calculating the final score of each task according to the default multiplier, and if yes, calculating the final score of the corresponding task according to the manual intervention multiplier; Adjust the ranking of each task based on the final score.
2. The task scheduling method for a multi-application system according to claim 1, It is characterized in that Before calling the downstream service, it also includes: judging whether each task is a static task, and if not, calling the downstream service.
3. The task scheduling method for a multi-application system according to claim 2, It is characterized in that The calling of the downstream service includes: reading the configuration table according to the task type, disassembling the parameters, processing methods and uniform resource locators required for the downstream service to process the task; assembling the calling object of the downstream service, and calling the downstream service according to the calling object.
4. The task scheduling method for a multi-application system according to claim 1, It is characterized in that The configuration method of the preset calculation rules is: pre-setting the task dimensions involved in the rule calculation, the task dimensions characterizing the attributes of the task objects; selecting the target task dimensions for participating in the preset calculation rules, setting the basic weight and subdivision weight of each target task dimension, and calculating the basic score of each task in each task type based on the preset calculation rules includes: obtaining the basic score of each task by weighted calculation according to the basic weight and subdivision weight corresponding to each task.
5. The task scheduling method for a multi-application system according to claim 1, It is characterized in that The domain parameter is an identifier, and performing domain calculation on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task includes: determining the domain type of the corresponding task according to the identifier, and the domain type is an exclusive task queue corresponding to the identifier.
6. A task scheduling system for multi-application systems, It is characterized in that include: A rule calculation module is used to receive a task batch to be consumed, determine the task type of each task in the task batch, calculate the basic score of each task in each task type based on a preset calculation rule, and sort the tasks in each task type from large to small according to the value of the basic score of each task, so as to obtain a task sequence in each task type; A domain calculation module is used to determine whether each task is configured with domain parameters. If so, domain calculation is performed on the task corresponding to the domain parameter according to the domain parameter to obtain the domain type corresponding to the task. The domain type is the exclusive task queue corresponding to the task, and the task is added to the exclusive queue. The task distribution module is used to confirm the task type queue and exclusive queue of each task, and then deliver each task to the corresponding task queue according to the task type and domain type, so as to call the downstream service so that the downstream service processes the tasks in sequence according to the order of each task; It also includes a task adjustment module, which is used to determine whether each task is configured with a manual intervention multiplier. If not, the final score of each task is calculated according to the default multiplier. If yes, the final score of the corresponding task is calculated according to the manual intervention multiplier. Adjust the ranking of each task based on the final score.
7. An electronic device, It is characterized in that The method comprises a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the task scheduling method for a multi-application system according to any one of claims 1 to 5.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the steps of the task scheduling method for a multi-application system according to any one of claims 1 to 5.
Citation Information
Patent Citations
Task dynamic balance assignment method and system, electronic equipment and storage medium
CN111178791A
Task scheduling method
US20080244584A1
