Method and device for generating scheduling strategy in intelligent heuristic manner

By obtaining the orchestration information of the task flow and using the prompt word generation model and intelligent heuristic generation model to generate a multi-core scheduling strategy, the problems of complex and costly multi-core scheduling operations in the existing technology are solved, and efficient multi-core scheduling strategy generation is achieved.

CN119718571APending Publication Date: 2025-03-28GUOKE FOUNDATION STONE (CHONGQING) SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411774966.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art has complex operations in multi-core scheduling and requires calling solvers, resulting in increased time and cost.

Method used

By obtaining the orchestration information of the task flow, multi-core allocation scheduling problems are generated, and a pre-trained prompt word generation model and intelligent heuristic generation model are used to quickly generate multi-core scheduling strategies.

Benefits of technology

It effectively improves the generation efficiency of multi-core scheduling strategies, reduces dependence on solvers, and reduces operation costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718571A_ABST
    Figure CN119718571A_ABST
Patent Text Reader

Abstract

The invention relates to an intelligent heuristic scheduling strategy generation method and device, and the method comprises the steps: obtaining the arrangement information of a task flow, and the arrangement information is used for indicating the execution logic sequence of a plurality of tasks; generating a multi-core distribution scheduling problem according to the arrangement information and the number of the CPU cores; inputting the multi-core allocation scheduling problem into a pre-trained cue word generation model, and outputting cue words for multi-core allocation scheduling; inputting the cue word into a pre-trained intelligent heuristic generation model, and outputting to obtain a multi-core scheduling strategy for the task flow; the intelligent heuristic generation model learns the thinking chain for solving the multi-core distribution scheduling problem corresponding to the input cue word in the training stage. According to the intelligent heuristic generation model, the multi-core scheduling strategy for the task flow can be quickly generated, and the multi-core scheduling strategy is a combined understanding conforming to solving constraints, so that the efficiency of obtaining the multi-core scheduling strategy is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of deterministic scheduling, and in particular to a method and device for intelligently generating a scheduling strategy. Background Art

[0002] As the functions of in-vehicle software become more and more abundant, there is a demand for iterative upgrades of autonomous driving technology. The types and numbers of tasks are increasing, and the task allocation and scheduling for multiple cores in the processor are becoming more and more complicated.

[0003] During the research and development, the following technical problems were found in related technologies: In related technologies, when arranging multiple tasks and performing multi-core scheduling, the scheduling strategy is generally calculated by constructing corresponding optimization problems, objective functions, and constraints, etc., through linear programming; this process is computationally complex and requires calling some solvers. The linear programming solution process is time-consuming and consumes the cost of purchasing solvers. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method and device for generating a scheduling strategy in an intelligent heuristic manner.

[0005] According to the first aspect of the embodiment of the present disclosure, a method for intelligent heuristic generation of scheduling strategies is provided. The above method includes: obtaining the scheduling information of the task flow, the above scheduling information is used to indicate the execution logic order of multiple tasks; generating a multi-core allocation scheduling problem according to the above scheduling information and the number of CPU cores; inputting the above multi-core allocation scheduling problem into a pre-trained prompt word generation model, and outputting the prompt word of multi-core allocation scheduling; inputting the above prompt word into a pre-trained intelligent heuristic generation model, and outputting the multi-core scheduling strategy for the above task flow; the above intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation scheduling problem corresponding to the input prompt word during the training stage.

[0006] In some embodiments, during the training phase, the intelligent heuristic generation model tunes model parameters based on: training prompt words corresponding to the multi-core allocation scheduling training problem, a chain of thoughts for solving the multi-core allocation scheduling training problem by at least one solver, and a result of solving the multi-core scheduling strategy; wherein the training prompt words and the chain of thoughts serve as training inputs for the intelligent heuristic generation model, the training output is a result of generating a multi-core scheduling strategy, and the result of solving the multi-core scheduling strategy serves as a training label.

[0007] In some embodiments, the above-mentioned prompt word generation model and the above-mentioned intelligent heuristic generation model constitute a combined model for synchronous training. During the synchronous training process, the above-mentioned multi-core allocation scheduling training problem is used as a training input of the above-mentioned combined model, which is used to be input into the above-mentioned prompt word generation model; the thinking chain of solving the multi-core allocation scheduling training problem by at least one solver is used as another training input of the above-mentioned combined model, which is used to be input into the above-mentioned intelligent heuristic generation model. During this period, the training prompt words output by the above-mentioned prompt word generation model for the input are also used as the input of the above-mentioned intelligent heuristic generation model, and finally the multi-core scheduling strategy generation result is output by the above-mentioned combined model; the multi-core scheduling strategy solution result corresponding to the above-mentioned at least one solver is used as a training label, and the prompt word generation model and the intelligent heuristic generation model in the above-mentioned combined model are synchronously trained.

[0008] In some embodiments, the above-mentioned solver is a solver for solving linear programming problems, including at least one of the following solvers for mixed integer programming problems: Gurobi solver, SCIP solver, Highs solver.

[0009] In some embodiments, the above-mentioned scheduling information includes: task information of multiple tasks and the execution logic order between multiple tasks; wherein the above-mentioned task information includes: the estimated task execution time of each task. In some embodiments, based on the above-mentioned scheduling information and the number of CPU cores, a multi-core allocation scheduling problem is generated, including: according to the estimated task execution time of each task and the execution logic order between multiple tasks, a basic scheduling cycle for representing the minimum scheduling time slice and a scheduling scheduling cycle for representing the longest time consumption of the task flow are determined; based on the above-mentioned task information, the above-mentioned basic scheduling cycle, the above-mentioned scheduling scheduling cycle and the above-mentioned number of CPU cores, a multi-core allocation scheduling problem is generated. In other embodiments, the multi-core allocation scheduling problem includes: the above-mentioned scheduling information and the above-mentioned number of CPU cores; when the multi-core allocation scheduling problem is input into a pre-trained prompt word generation model, the prompt word generation model performs the following processing steps: according to the estimated task execution time of each task and the execution logical order between multiple tasks, determine the basic scheduling cycle used to represent the minimum scheduling time slice and the scheduling scheduling cycle used to represent the longest time consumption of the task flow; according to the multi-core allocation scheduling problem, the above-mentioned basic scheduling cycle and the above-mentioned scheduling scheduling cycle, output the prompt word for multi-core allocation scheduling.

[0010] In some embodiments, according to the estimated task execution duration of each task and the execution logic order among multiple tasks, a basic scheduling period for representing the minimum scheduling time slice and a scheduling and scheduling period for representing the longest time consumption of the task flow are determined, including: according to the estimated task execution duration of each task, the greatest common divisor of the estimated task execution duration of all tasks in the above task flow is determined, and the above greatest common divisor is used as the basic scheduling period; according to the execution logic order among multiple tasks, the earliest start time and the earliest end time of each task are traversed in sequence and determined until the earliest end time corresponding to the terminal task in the above task flow is obtained, and the earliest end time corresponding to the terminal task is used as the above scheduling and scheduling period; wherein, when there are one or more preceding tasks of the current task, the earliest start time of the current task is: the maximum value of the earliest end times corresponding to one or more preceding tasks; the earliest end time of the current task is: the sum of the earliest start time of the current task and the estimated task execution duration of the current task.

[0011] In some embodiments, the method for generating scheduling strategies by intelligent heuristics further includes: displaying the multi-core scheduling strategies in the form of a visual scheduling table. The visual scheduling table is a two-dimensional chart, including: a task allocation time dimension and a task corresponding to a CPU core dimension, indicating that the target task in the task flow is allocated to the target CPU core within the target time period; wherein the execution order corresponding to the allocation time period of each task in the task flow satisfies the constraints of the execution logic order.

[0012] According to the second aspect of the embodiment of the present disclosure, a method for constructing a scheduling strategy generation model is provided. The above method includes: obtaining training scheduling information of a training task flow, the above training scheduling information is used to indicate the execution logic order of multiple training tasks; generating a multi-core allocation scheduling training problem according to the above training scheduling information and the number of CPU cores; inputting the above multi-core allocation scheduling training problem into a pre-trained prompt word generation model, and outputting the training prompt words of multi-core allocation scheduling; solving the above multi-core allocation scheduling training problem by at least one solver to obtain the corresponding thinking chain and multi-core scheduling strategy solution results; training the intelligent heuristic generation model to be trained according to the above training prompt words, the above thinking chain and the above multi-core scheduling strategy solution results, and using the trained intelligent heuristic generation model as a scheduling strategy generation model for generating scheduling policies.

[0013] In some embodiments, the training prompt words and the thought chain are used as training inputs of the intelligent heuristic generation model, the training output is a multi-core scheduling strategy generation result, and the multi-core scheduling strategy solution result is used as a training label.

[0014] According to the third aspect of the embodiment of the present disclosure, another method for constructing a scheduling strategy generation model is provided. The above method includes: obtaining training scheduling information of a training task flow, the above training scheduling information is used to indicate the execution logic order of multiple training tasks; generating a multi-core allocation scheduling training problem according to the above training scheduling information and the number of CPU cores; inputting the above multi-core allocation scheduling training problem into the prompt word generation model to be trained, and outputting the training prompt words of multi-core allocation scheduling; solving the multi-core allocation scheduling training problem by at least one solver to obtain the corresponding thinking chain and multi-core scheduling strategy solution results; inputting the above training prompt words and the above thinking chain into the intelligent heuristic generation model to be trained, and outputting the multi-core scheduling strategy generation result; using the above multi-core scheduling strategy solution result as a training label, synchronously training the above prompt word generation model and the above intelligent heuristic generation model, and using the combined model composed of the trained prompt word generation model and the intelligent heuristic generation model as a scheduling strategy generation model for generating scheduling strategies.

[0015] According to the fourth aspect of the embodiment of the present disclosure, a device for intelligently heuristically generating scheduling strategies is provided. The above-mentioned device includes: a scheduling information acquisition module, a scheduling problem generation module, a prompt word generation module and a scheduling strategy generation module. The above-mentioned scheduling information acquisition module is used to obtain the scheduling information of the task flow, and the above-mentioned scheduling information is used to indicate the execution logical order of multiple tasks. The above-mentioned scheduling problem generation module is used to generate a multi-core allocation scheduling problem according to the above-mentioned scheduling information and the number of CPU cores. The above-mentioned prompt word generation module is used to input the above-mentioned multi-core allocation scheduling problem into a pre-trained prompt word generation model, and output the prompt word of multi-core allocation scheduling. The above-mentioned scheduling strategy generation module is used to input the above-mentioned prompt word into a pre-trained intelligent heuristic generation model, and output a multi-core scheduling strategy for the above-mentioned task flow; the above-mentioned intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation scheduling problem corresponding to the input prompt word during the training stage.

[0016] According to a fifth aspect of an embodiment of the present disclosure, a device for constructing a scheduling strategy generation model is provided. The device includes: a first training data acquisition module, a first training problem generation module, a first training prompt word generation module, a first problem solving module and a first model training module. The first training data acquisition module is used to acquire the training scheduling information of the training task flow, and the training scheduling information is used to indicate the execution logic order of multiple training tasks. The first training problem generation module is used to generate a multi-core allocation scheduling training problem according to the training scheduling information and the number of CPU cores. The first training prompt word generation module is used to input the multi-core allocation scheduling training problem into a pre-trained prompt word generation model, and output the training prompt word of the multi-core allocation scheduling. The first problem solving module is used to solve the multi-core allocation scheduling training problem through at least one solver to obtain the corresponding thinking chain and multi-core scheduling strategy solution results. The first model training module is used to train the intelligent heuristic generation model to be trained according to the training prompt word, the thinking chain and the multi-core scheduling strategy solution results, and use the trained intelligent heuristic generation model as a scheduling strategy generation model for generating scheduling strategies.

[0017] According to the sixth aspect of the embodiment of the present disclosure, a device for constructing a scheduling strategy generation model is provided. The device includes: a second training data acquisition module, a second training problem generation module, a second training prompt word generation module, a second problem solving module, a scheduling strategy training generation module and a second model training module. The second training data acquisition module is used to obtain the training scheduling information of the training task flow, and the training scheduling information is used to indicate the execution logic order of multiple training tasks. The second training problem generation module is used to generate a multi-core allocation scheduling training problem according to the training scheduling information and the number of CPU cores. The second training prompt word generation module is used to input the multi-core allocation scheduling training problem into the prompt word generation model to be trained, and output the training prompt word of the multi-core allocation scheduling. The second problem solving module is used to solve the multi-core allocation scheduling training problem through at least one solver to obtain the corresponding thinking chain and multi-core scheduling strategy solution results. The scheduling strategy training generation module is used to input the training prompt word and the thinking chain into the intelligent heuristic generation model to be trained, and output the multi-core scheduling strategy generation result. The second model training module is used to use the multi-core scheduling strategy solution result as a training label to synchronously train the prompt word generation model and the intelligent heuristic generation model. The combined model composed of the trained prompt word generation model and the intelligent heuristic generation model is used as a scheduling strategy generation model for generating scheduling strategies.

[0018] According to the seventh aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; a memory for storing executable instructions of the processor; the processor is used to read the executable instructions from the memory and execute the instructions to implement the method for intelligently heuristically generating scheduling strategies provided in the first aspect of the present disclosure, and the method for constructing a scheduling strategy generation model provided in the second or third aspect.

[0019] According to an eighth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the method for intelligently heuristically generating scheduling strategies provided in the first aspect of the present disclosure and the steps of the method for constructing a scheduling strategy generation model provided in the second or third aspect are implemented.

[0020] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0021] By obtaining the scheduling information of the task flow, a multi-core allocation scheduling problem is generated according to the above scheduling information and the number of CPU cores; by pre-training the prompt word generation model and the intelligent heuristic generation model, the above prompt word generation model is used to convert the input multi-core allocation scheduling problem into prompt words. Since the above prompt words can relatively comprehensively and accurately describe and refine the key content of the multi-core allocation scheduling problem, the above intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation scheduling problem corresponding to the input prompt words during the training stage. In this way, the intelligent heuristic generation model can quickly generate a multi-core scheduling strategy for the above task flow and this multi-core scheduling strategy is a reasonable solution that meets the solution constraints, effectively improving the efficiency of obtaining the multi-core scheduling strategy.

[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0024] Figure 1 The present invention is a flowchart of a method for generating a scheduling strategy in an intelligent heuristic manner according to an exemplary embodiment.

[0025] Figure 2 The diagram is a schematic diagram showing a process of obtaining a task flow by dragging and arranging multiple tasks in a visual interface according to an exemplary embodiment.

[0026] Figure 3 is a detailed implementation flowchart of step S120 according to an exemplary embodiment.

[0027] Figure 4 is a detailed implementation flowchart of step S130 according to another exemplary embodiment.

[0028] Figure 5 The present invention is a schematic diagram of (a) the use process of a prompt word generation model and an intelligent heuristic generation model according to an exemplary embodiment, (b1) an example process of training the intelligent heuristic generation model alone, and (b2) another example process of synchronously training the intelligent heuristic generation model and the prompt word generation model.

[0029] Figure 6 It is a schematic diagram of a visual scheduling table according to an exemplary embodiment.

[0030] Figure 7 The present invention is a flowchart of a method for constructing a scheduling strategy generation model according to an exemplary embodiment.

[0031] Figure 8 The present invention is a flowchart of another method for constructing a scheduling strategy generation model according to an exemplary embodiment.

[0032] Fig. 9 It is a block diagram of a device for generating a scheduling strategy in an intelligent heuristic manner according to an exemplary embodiment.

[0033] Fig.10 It is a block diagram of a device for constructing a scheduling strategy generation model according to an exemplary embodiment.

[0034] Fig.11 It is a block diagram of a device for constructing a scheduling strategy generation model according to another exemplary embodiment.

[0035] Fig.12 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0036] Exemplary embodiments will be described in detail below with reference to the accompanying drawings.

[0037] It should be pointed out that the relevant embodiments and drawings are only for describing exemplary embodiments provided by the present disclosure, rather than all embodiments of the present disclosure, and it should not be understood that the present disclosure is limited to the relevant exemplary embodiments.

[0038] It should be noted that the terms "first", "second", etc. used in the present disclosure are only used to distinguish different steps, devices or modules, etc. The related terms neither represent any specific technical meanings nor indicate the order or interdependence between them.

[0039] It should be noted that the modifications of the terms "one", "multiple", and "at least one" used in the present disclosure are illustrative rather than restrictive. Unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0040] It should be noted that the term "and / or" used in this disclosure is used to describe the association relationship between associated objects, and generally indicates that there are at least three association relationships. For example, A and / or B can at least indicate the existence of three association relationships: A exists alone, A and B exist at the same time, and B exists alone.

[0041] It should be noted that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. Unless otherwise specified, the scope of the present disclosure is not limited by the order of description of the steps in the relevant embodiments.

[0042] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0043] The following technical problems were discovered during research and development: In related technologies, when choreographing multiple tasks and performing multi-core scheduling, the scheduling strategy is generally calculated by constructing corresponding optimization problems, objective functions, and constraints, etc., through linear programming. This process is computationally complex and requires calling some solvers. The linear programming solution process is time-consuming and incurs the cost of purchasing solvers.

[0044] For example, there are some commercial deterministic scheduling middleware on the market, which are used to provide global task scheduling and scheduling for complex intelligent driving systems across cores, chips, and domains to ensure the end-to-end latency of key task chains. Some support deterministic scheduling mechanisms such as time triggering, data triggering, and event triggering to meet the requirements of algorithm parallel computing.

[0045] However, the development cycle of these scheduling middleware is long, and each developer needs to spend a lot of time to construct the corresponding scheduling strategy and the corresponding algorithm. In addition, in the process of solving each algorithm, some can use existing solvers, while others need to set up their own self-developed solution logic. Not only does it take a long time to wait for the algorithm to run tests and update optimization during the development period; during the use stage of the scheduling middleware, due to the complex calculation process, it also takes a lot of time to execute the corresponding scheduling algorithm. In addition, in the process of using existing solvers for calculations, it is generally necessary to purchase the solver's certificate or license, and as long as the scheduling middleware continues to be used, this expense will continue.

[0046] In view of this, the embodiments of the present disclosure provide a method and device for intelligently heuristically generating scheduling strategies, which obtains the scheduling information of the task flow and generates a multi-core allocation scheduling problem according to the above scheduling information and the number of CPU cores; by pre-training a prompt word generation model and an intelligent heuristic generation model, the above prompt word generation model is used to convert the input multi-core allocation scheduling problem into prompt words. Since the above prompt words can relatively comprehensively and accurately describe and refine the key content of the multi-core allocation scheduling problem, the above intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation scheduling problem corresponding to the input prompt words during the training stage. In this way, the intelligent heuristic generation model can quickly generate a multi-core scheduling strategy for the above task flow and this multi-core scheduling strategy is a reasonable solution that meets the solution constraints, effectively improving the efficiency of obtaining the multi-core scheduling strategy.

[0047] Technical terminology

[0048] Best Case Execution Time (BCET): indicates the time required to execute a task under the optimal execution conditions.

[0049] Worst Case Execution Time (WCET): indicates the time required to execute a task under the worst execution conditions.

[0050] Basic Cycle (BC): It indicates the minimum scheduling time slice corresponding to the scheduling of multiple tasks to multiple cores in the task flow. The execution duration of a task can correspond to one or more basic scheduling cycles.

[0051] Matrix Cycle (MC): It indicates the longest time required for all tasks in the task flow to be assigned to the corresponding multi-cores for execution.

[0052] Gurobi solver: is a solver for numerical programming problems. It can be used to solve linear programming, quadratic programming, quadratic constrained programming, mixed integer linear programming, mixed integer quadratic programming, and mixed integer quadratic constrained programming.

[0053] SCIP solver: is an open source solver for mixed integer linear programming (MILP) problems. It combines integer linear programming and constraint programming techniques and is difficult to use.

[0054] Highs solver: is a solver for numerical programming problems that supports linear programming, mixed integer programming, and quadratic programming.

[0055] Mixed Integer Programming (MIP) Solver, a solver for solving mixed integer programming problems.

[0056] System on Chip (SoC): SoC refers to a key component in a domain controller that integrates multiple functions, such as infotainment system, autonomous driving processing unit, etc.; the adaptive software platform AUTOSAR AP can be deployed on SoC to realize complex automotive electronic system functions.

[0057] Exemplary Methods

[0058] Figure 1 The present invention is a flowchart of a method for generating a scheduling strategy in an intelligent heuristic manner according to an exemplary embodiment.

[0059] Reference Figure 1 As shown, the first exemplary embodiment of the present disclosure provides a method for intelligently generating a scheduling strategy by heuristics, the method comprising the following steps: S110, S120 and S130. The above method can be applied to a vehicle or an electronic device capable of data communication with a vehicle; it can also be applied to other intelligent devices.

[0060] For example, in some application scenarios, the vehicle can execute the above-mentioned intelligent heuristic method for generating scheduling strategies to obtain a multi-core scheduling strategy, and the vehicle itself can perform scheduling based on the generated multi-core scheduling strategy during autonomous driving or assisted driving. For example, the above-mentioned method can be executed by a vehicle-mounted system on chip (SoC).

[0061] Alternatively, the electronic device executes the method for generating a scheduling strategy using an intelligent heuristic method, and synchronizes the generated multi-core scheduling strategy to the vehicle.

[0062] In other application scenarios, the above method is not limited to being applied to vehicle task scheduling, but can also be applied to other intelligent devices, such as drones, intelligent robots (such as various types of robots such as search and rescue, patrol, home, cleaning, intelligent dialogue, etc.) task scheduling, etc.

[0063] In step S110, the scheduling information of the task flow is obtained, where the scheduling information is used to indicate the execution logic sequence of multiple tasks.

[0064] Task flow refers to the task execution process obtained by arranging multiple tasks. The arrangement makes multiple tasks have a logical execution order, including but not limited to: parallel execution, sequential execution, call execution (for example, during the execution of one task, the execution result of another task will be called) and other logics.

[0065] For vehicle scenarios, the above tasks can be various processes, threads, sub-threads, etc. running in the vehicle operating system. Other scenarios can be understood by reference.

[0066] In some embodiments, the above-mentioned arrangement information includes: task information of multiple tasks and the execution logic order between multiple tasks. Wherein, the above-mentioned task information includes: the estimated execution time of each task. In some embodiments, the above-mentioned task information also includes a task identifier.

[0067] Figure 2 The diagram is a schematic diagram showing a process of obtaining a task flow by dragging and arranging multiple tasks in a visual interface according to an exemplary embodiment.

[0068] In some embodiments, users are supported to drag and drop tasks in a visual interface to implement task flow arrangement. When a user sets the execution logic order between different tasks, the system supports verifying whether the execution logic order set by the user is reasonable based on preset constraint verification information. For example, constraint verification information includes: a specified task (e.g., Task 4-Perception Fusion Task) must not be started before completing one or more given tasks (e.g., Task 1-Radar Perception Task, Task 2-Camera Perception Task).

[0069] For example, refer to Figure 2As shown, a front-end visualization interface 200 for arranging tasks is illustrated. The front-end visualization interface 200 presents a plurality of task boxes 210. Each task box 210 carries and presents the following information: task identification, task content, and estimated task execution time. For example, the task content corresponding to task 1 is radar perception, and the corresponding task execution estimated time is 1000ms (milliseconds); the task content corresponding to task 2 is camera perception, and the corresponding task execution estimated time is 2000ms; the task content corresponding to task 3 is camera detection, and the corresponding task execution estimated time is 3000ms; the task content corresponding to task 4 is The task content of task 5 is perception fusion, and the corresponding estimated task execution time is 4000ms; the task content of task 5 is camera recognition, and the corresponding estimated task execution time is 5000ms; the task content of task 6 is obstacle recognition, and the corresponding estimated task execution time is 8000ms; the task content of task 7 is camera tracking, and the corresponding estimated task execution time is 7000ms; the task content of task 8 is driving decision-making, and the corresponding estimated task execution time is 8000ms; and so on, the task content of task 16 is driving control, and the corresponding estimated task execution time is 16000ms. The above-mentioned task execution estimated time can adopt the best case execution time BCET or the worst case execution time WCET. Alternatively, the statistical value corresponding to the historical task execution time can be used as the task execution estimated time. The above-mentioned statistical value can be adopted but not limited to one of the following: average value, median value, maximum value, weighted average value, etc.

[0070] The user can obtain one or more arranged task flows by dragging and dropping the task boxes 210 in the front-end visual interface 200 and setting the execution logic order. Figure 2 As shown, task flow 1 is obtained by dragging the task boxes corresponding to task 1, task 2, task 4, task 8 and task 16 and setting the corresponding execution logic order, wherein task 1 and task 2 are executed in parallel. After task 1 and task 2 are all executed, the output results of the two are used as the input of task 4, and task 4 is executed; then the output of task 4 is used as the input of task 8, and task 8 is executed; the output of task 8 is used as the input of task 16, and task 16 is executed.

[0071] Similarly, in Figure 2 The figure also illustrates a task flow 2 obtained by dragging Task 3, Task 5 and Task 7 and setting the three tasks to be executed in sequence.

[0072] In other embodiments, task scheduling may also be achieved by defining task information of multiple tasks included in a task flow and the execution logic order of the multiple tasks in a configuration file.

[0073] In step S120, a multi-core allocation scheduling problem is generated according to the above-mentioned scheduling information and the number of CPU cores.

[0074] In some embodiments, the above-mentioned scheduling information includes: task information of multiple tasks and the execution logic order between the multiple tasks; wherein the above-mentioned task information includes: the estimated execution time of each task.

[0075] Since the above-mentioned scheduling information limits the execution of multiple tasks according to a preset execution logic order, the estimated execution time of each task corresponding to each task is determined, so that a multi-core allocation scheduling problem can be generated according to the above-mentioned scheduling information and the number of CPU cores.

[0076] Generally speaking, a multi-core allocation scheduling problem can be generated based on the scheduling information of one or more task flows and the number of CPU cores.

[0077] In some embodiments, the multi-core allocation scheduling problem can be a problem described by scheduling-related information, such as including the task identifiers, task contents and the logical order of execution of multiple tasks in the task flow, the number of CPU cores and the goal of allocating tasks to multiple cores; or, it can be a problem described in natural language; or, it can be a problem described from the perspective of mathematical language, such as including known conditions, constraints and problems to be solved.

[0078] As an example of a problem described in mathematical language, a text description form of the multi-core allocation scheduling problem Q11 is generated based on the scheduling information of task flow 1 and task flow 2 and 6 CPU cores: it is known that task flow 1 contains task 1, task 2, task 4, task 8 and task 16, and the estimated execution time of each task is: 1000ms, 2000ms, 4000ms, 8000ms, 16000ms; it is known that task flow 2 contains task 3, task 5 and task 7, and the estimated execution time of each task is: 3000ms, 5000ms, 7000ms; construct the corresponding time allocation problem between the above two task flows 1-2 and 6 CPU cores; the constraints are: task 1 and task 2 are executed in parallel, and task 4, task 8 and task 16 are executed sequentially after task 1 and task 2 are completed; task 3, task 5 and task 7 are executed sequentially.

[0079] As an example of a problem described in natural language, another text description form of the multi-core allocation scheduling problem Q11 is generated based on the scheduling information of task flow 1 and task flow 2 and 6 CPU cores: Task flow 1 includes task 1, task 2, task 4, task 8 and task 16. Task 1 and task 2 are executed in parallel. After task 1 and task 2 are completed, task 4, task 8 and task 16 are executed sequentially; the estimated task execution durations of task 1, task 2, task 4, task 8 and task 16 are 1000ms, 2000ms, 4000ms, 8000ms and 16000ms respectively; Task flow 2 includes task 3, task 5 and task 7. Task 3, task 5 and task 7 are executed sequentially, and the estimated task execution durations of task 3, task 5 and task 7 are 3000ms, 5000ms and 7000ms respectively; The current system has a total of 6 CPU cores, and the corresponding duration allocation problem between the above two task flows and the 6 CPU cores is constructed.

[0080] In some embodiments, in order to make the multi-core allocation scheduling process comply with the principle of deterministic scheduling and reduce system scheduling fluctuations to enhance system stability, in the multi-core allocation scheduling problem, it is stipulated that a CPU core can only be assigned one task at the same time. This content can be used as the default operation principle of the algorithm (for example, it can be an algorithm of an intelligent heuristic generation model, specifically by limiting it when solving in the solver, and training the intelligent heuristic generation model through the solver's solution thinking chain and solution results) or as a component of the prompt word.

[0081] Figure 3 is a detailed implementation flowchart of step S120 according to an exemplary embodiment.

[0082] In some embodiments, reference Figure 3 As shown, in the above step S120, a multi-core allocation scheduling problem is generated according to the above orchestration information and the number of CPU cores, including the following steps: S310 and S320.

[0083] In step S310, according to the estimated execution time of each task and the execution logic order of multiple tasks, a basic scheduling period BC for representing the minimum scheduling time slice and a scheduling scheduling period MC for representing the longest time consumption of the task flow are determined.

[0084] In some embodiments, in the above step S310, according to the estimated execution time of each task and the execution logic order between multiple tasks, determining the basic scheduling period for representing the minimum scheduling time slice and the scheduling scheduling period for representing the longest time consumption of the task flow includes:

[0085] According to the estimated task execution time of each task, determine the greatest common divisor of the estimated task execution time of all tasks in the above task flow, and the above greatest common divisor is used as the basic scheduling cycle BC; wherein, when multi-core scheduling of one or more task flows is performed simultaneously, for multiple task flows, determine the greatest common divisor of the estimated task execution time of all tasks in multiple task flows;

[0086] According to the execution logic order between multiple tasks, the earliest start time and the earliest end time of each task are traversed in sequence and determined until the earliest end time corresponding to the terminal task in the above task flow is obtained, and the earliest end time corresponding to the above terminal task is used as the above scheduling cycle; wherein, when there are one or more preceding tasks of the current task, the earliest start time of the current task is: the maximum value of the earliest end time corresponding to one or more preceding tasks; the earliest end time of the current task is: the sum of the earliest start time of the current task and the estimated task execution duration of the current task.

[0087] In some implementation scenarios, multiple task flows are executed independently of each other, so the scheduling cycle is related to each task flow, and the scheduling cycle of the current task flow does not need to consider the task information in other task flows. In other implementation scenarios, there are logical constraints on the execution of tasks between some task flows. In this case, when determining the scheduling cycle, it is necessary to consider not only the logical association of execution between tasks within the same task flow, but also the logical association of execution between tasks in different task flows. In the above-mentioned determination logic of the scheduling cycle, when the task flow in which the current task is located has an execution logic association or no association with other task flows, the earliest start time of the current task is determined according to the earliest end time corresponding to the previous task of the current task. Regardless of where the current task is in the task flow (starting position, middle position or end position), the scheduling cycle of the corresponding task flow can be accurately calculated.

[0088] For example, taking the multi-core scheduling of the above-mentioned task flow 1 and task flow 2 as an example, it is determined that the greatest common divisor of the estimated task execution time of all tasks in task flow 1 and task flow 2 (task 1, task 2, task 4, task 8, task 16 and task 3, task 5, task 7) is 1000ms, then the basic scheduling cycle is 1000ms.

[0089] Assuming that task flow 1 and task flow 2 are executed independently of each other, that is, there is no task execution association constraint between each task in task flow 1 and each task in task flow 2, the scheduling cycle corresponding to task flow 1 and task flow 2 is determined separately according to the execution logic order of each task in task flow 1 and task flow 2. For example, by determining that the earliest end time of the terminal task corresponding to task flow 1 (i.e., task 16) is 2000ms+4000ms+8000ms+16000ms=30000ms, the scheduling cycle of task flow 1 is 30000ms. By determining that the earliest end time of the terminal task corresponding to task flow 2 (i.e., task 7) is 3000ms+5000ms+7000ms=15000ms, the scheduling cycle of task flow 2 is 15000ms.

[0090] Assume that there are task execution association constraints in task flow 1 and task flow 2, for example, task 3 (camera detection) in task flow 2 must be executed after task 2 (camera perception) in task flow 1. For task flow 1, the above constraints do not affect the final calculated result of the scheduling cycle, which is still 30000ms; but it will affect the calculation result of the scheduling cycle corresponding to task flow 2. For task flow 2, in the process of sequentially traversing and determining the earliest start time and earliest end time of each task, for the initial task 3, there is a previous task 2, so the earliest start time corresponding to task 3 is the maximum value of the earliest end time corresponding to one or more previous tasks, that is, 2000ms. Therefore, the earliest end time of task 3 is: the earliest start time 2000ms + the estimated execution time of task 3 3000ms = 5000ms. By traversing the subsequent tasks 5 and 7 in sequence, the scheduling cycle corresponding to task flow 2 can be finally obtained as: 5000ms + 5000ms + 7000ms = 17000ms.

[0091] In step S320, a multi-core allocation scheduling problem is generated according to the task information, the basic orchestration period BC, the orchestration scheduling period MC and the number of CPU cores.

[0092] In the embodiment including the above steps S310 to S320, the basic scheduling cycle and the scheduling cycle are obtained based on the task information calculation in the process of generating the multi-core allocation scheduling problem. Since the basic scheduling cycle represents the minimum scheduling time slice corresponding to the multiple tasks contained in one or more task flows, this minimum scheduling time slice is the minimum scale of the scheduling time. A task can correspond to one or more basic scheduling cycles. The determination of the basic scheduling cycle is helpful to clarify the fine granularity of the scheduling time during the allocation and scheduling of multiple tasks among multiple cores in the later stage. At the same time, the greatest common divisor is determined as the basic scheduling cycle, which helps to save resources for scheduling operations. Since the scheduling cycle represents the longest time consumption of the task flow corresponding to one or more task flows, the longest time consumption of the task flow corresponding to multiple task flows can be determined on the premise of clarifying the execution relationship between multiple task flows. The scheduling cycle determines the specific range for the overall duration constraint of the subsequent allocation and scheduling of multiple tasks among multiple cores.

[0093] In other embodiments, the calculation process of generating the basic orchestration cycle and the orchestration scheduling cycle is not performed during the generation of the multi-core allocation scheduling problem, but is performed during the process of generating prompt words according to the multi-core allocation scheduling problem (for example, implemented in the subsequent step S130).

[0094] Specifically, in some other embodiments, the multi-core allocation scheduling problem includes: the above-mentioned scheduling information and the above-mentioned number of CPU cores. When the multi-core allocation scheduling problem is input into the pre-trained prompt word generation model, the prompt word generation model performs the following processing steps: according to the estimated task execution time of each task in the multi-core allocation scheduling problem and the execution logic order between multiple tasks, determine the basic scheduling cycle for representing the minimum scheduling time slice and the scheduling scheduling cycle for representing the longest time consumption of the task flow; according to the multi-core allocation scheduling problem, the above-mentioned basic scheduling cycle and the above-mentioned scheduling scheduling cycle, output the prompt word for multi-core allocation scheduling.

[0095] In step S130, the multi-core allocation and scheduling problem is input into a pre-trained prompt word generation model, and a prompt word for multi-core allocation and scheduling is output.

[0096] In some embodiments (for example, in an embodiment where step S120 includes S310 to S320), the multi-core allocation and scheduling problem includes a basic scheduling cycle and a scheduling and scheduling cycle. The multi-core allocation and scheduling problem in text form is segmented and features are extracted to obtain a text vector sequence. The text vector sequence is input into the prompt word generation model. The prompt word generation model performs key feature integration extraction, invalid information elimination and prompt word generation processing to obtain a prompt word for input into the intelligent heuristic generation model. This prompt word can be a natural language text or a result after refining the multi-core allocation and scheduling problem.

[0097] The above-mentioned multi-core allocation scheduling prompt words are a combination of a group of multi-core scheduling related information, such as but not limited to: task information of multiple tasks contained in one or more task flows (such as task identification and estimated task execution time), execution logic order, basic scheduling cycle, orchestration scheduling cycle and number of CPU cores.

[0098] Figure 4 is a detailed implementation flowchart of step S130 according to another exemplary embodiment.

[0099] In other embodiments, the multi-core allocation scheduling problem includes: the above-mentioned scheduling information and the above-mentioned number of CPU cores.

[0100] Reference Figure 4 As shown, in the above step S130, after the multi-core allocation scheduling problem is input into the pre-trained prompt word generation model, the prompt word generation model performs the following processing steps: S410, according to the estimated execution time of each task in the multi-core allocation scheduling problem and the execution logic order between multiple tasks, determine the basic scheduling cycle for representing the minimum scheduling time slice and the scheduling cycle for representing the longest time consumption of the task flow; S420, according to the multi-core allocation scheduling problem, the basic scheduling cycle and the scheduling cycle, output the prompt word for the multi-core allocation scheduling. The execution details of step S410 can refer to the above introduction to step S310, which will not be repeated here.

[0101] In step S140, the prompt word is input into a pre-trained intelligent heuristic generation model, and a multi-core scheduling strategy for the task flow is output; the intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation scheduling problem corresponding to the input prompt word during the training phase.

[0102] Figure 5 The present invention is a schematic diagram of (a) the use process of a prompt word generation model and an intelligent heuristic generation model according to an exemplary embodiment, (b1) an example process of training the intelligent heuristic generation model alone, and (b2) another example process of synchronously training the intelligent heuristic generation model and the prompt word generation model.

[0103] Reference Figure 5 As shown in (a), the use process of the pre-trained prompt word generation model and the pre-trained intelligent heuristic generation model is illustrated, corresponding to the steps 130 and S140 described above. In some embodiments, the pre-trained intelligent heuristic generation model can be constructed as a scheduling strategy generation model for generating a scheduling strategy; or, the combined model corresponding to the pre-trained prompt word generation model and the pre-trained intelligent heuristic generation model is used as the scheduling strategy generation model.

[0104] Reference Figure 5 As shown in (b1), in some embodiments, the pre-trained prompt word generation model and the pre-trained intelligent heuristic generation model can be obtained by pre-training. Figure 5 As shown in (b2), the pre-trained prompt word generation model and the pre-trained intelligent heuristic generation model can also be obtained by synchronous training, that is, the parameters of the two models are iteratively optimized synchronously in one training process.

[0105] In the above two embodiments, refer to Figure 5 As shown in (b1) and (b2), in the training phase, the intelligent heuristic generation model is based on: the training prompt words corresponding to the multi-core allocation scheduling training problem, the thought chain of solving the multi-core allocation scheduling training problem by at least one solver (for example, a MIP problem solver), and the multi-core scheduling strategy solution result to tune the model parameters. The training prompt words and the thought chain serve as the training input of the intelligent heuristic generation model, the training output is the multi-core scheduling strategy generation result, and the multi-core scheduling strategy solution result serves as the training label.

[0106] In some embodiments, for example, referring to Figure 5 As shown in (b1), the prompt word generation model and the intelligent heuristic generation model are trained separately in advance. During the training of the intelligent heuristic generation model, the pre-trained prompt word generation model can be used.

[0107] In other embodiments, for example, referring to Figure 5 As shown in (b2), the above-mentioned prompt word generation model and the above-mentioned intelligent heuristic generation model constitute a combined model for synchronous training, and the input and output data flows within the combined model are indicated by dotted lines. During the synchronous training process, the above-mentioned multi-core allocation scheduling training problem is used as a training input of the above-mentioned combined model, which is used to be input into the above-mentioned prompt word generation model; the thinking chain of solving the multi-core allocation scheduling training problem by at least one solver is used as another training input of the above-mentioned combined model, which is used to be input into the above-mentioned intelligent heuristic generation model. During this period, the training prompt words output by the above-mentioned prompt word generation model for the input are also used as the input of the above-mentioned intelligent heuristic generation model, and finally the multi-core scheduling strategy generation result is output by the above-mentioned combined model; the multi-core scheduling strategy solution result corresponding to the above-mentioned at least one solver is used as a training label, and the prompt word generation model and the intelligent heuristic generation model in the above-mentioned combined model are synchronously trained.

[0108] In some embodiments, the above-mentioned solver is a solver for solving linear programming problems, including at least one of the following mixed integer programming problem (MIP) solvers: Gurobi solver, SCIP solver, Highs solver.

[0109] Since the thought chain and multi-core scheduling strategy solution results output by the solver are only used in the training phase of the intelligent heuristic generation model, the intelligent heuristic generation model learns the thought chain for solving the multi-core allocation and scheduling problem corresponding to the input prompt word in the training phase. The pre-trained intelligent heuristic generation model can directly generate the corresponding multi-core scheduling strategy based on the input prompt word, and there is no need to use the solver in the use phase, reducing the time cost and licensing cost required for calling the solver. At the same time, since the intelligent heuristic generation model can efficiently process and automatically generate corresponding multi-core scheduling strategies for various multi-core allocation and scheduling problems (linear programming problems) that have not been processed in the training phase, the scheduling efficiency and applicability of the method are improved.

[0110] In an embodiment including steps S110 to S140, the orchestration information of the task flow is obtained, and a multi-core allocation scheduling problem is generated according to the above orchestration information and the number of CPU cores; by pre-training a prompt word generation model and an intelligent heuristic generation model, the above prompt word generation model is used to convert the input multi-core allocation scheduling problem into prompt words. Since the above prompt words can relatively comprehensively and accurately describe and refine the key content of the multi-core allocation scheduling problem, the above intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation scheduling problem corresponding to the input prompt words during the training stage. In this way, the intelligent heuristic generation model can quickly generate a multi-core scheduling strategy for the above task flow and this multi-core scheduling strategy is a reasonable solution that meets the solution constraints, effectively improving the efficiency of obtaining the multi-core scheduling strategy.

[0111] In some embodiments, the method for generating a scheduling strategy by intelligent heuristics, in addition to the steps S110 to S140, further includes: displaying the multi-core scheduling strategy in the form of a visual scheduling table.

[0112] Figure 6 It is a schematic diagram of a visual scheduling table according to an exemplary embodiment.

[0113] The above-mentioned visual scheduling table is a two-dimensional chart, including: the task allocation time dimension and the task corresponding CPU core dimension, which means that the target task in the above-mentioned task flow is allocated to the target CPU core within the target time period; wherein the execution order corresponding to the allocated time period of each task in the above-mentioned task flow satisfies the constraints of the above-mentioned execution logic order.

[0114] For example, refer to Figure 6As shown in the figure, the visualization schedule table corresponding to the multi-core scheduling strategy generated for task flow 1 and task flow 2 is shown. The six cores are respectively represented as CPU0 to CPU5. The fine-grained level of the time axis is the duration corresponding to the basic scheduling cycle of 1000ms as the basic scale. The corresponding maximum value 30 on the time axis corresponds to a duration of 30000ms as the scheduling cycle. Figure 6 In the illustrated two-dimensional chart, for each task in task flow 1, task 1 is assigned to CPU0, and the assigned time period is the time scale segment of 0 to 1; task 2 is assigned to CPU1, and the assigned time period is the time scale segment of 0 to 2 (for example, the left open and right closed interval); task 4 is assigned to CPU1, and the assigned time period is the time scale segment of 2 to 6 (for example, the left open and right closed interval); task 8 is assigned to CPU2, and the assigned time period is the time scale segment of 6 to 14 (for example, the left open and right closed interval); task 16 is assigned to CPU4, and the assigned time period is the time scale segment of 14 to 30 (for example, the left open and right closed interval, and the subsequent similarities). For each task in task flow 2, task 3 is assigned to CPU3, and the assigned time period is the time scale segment of 0 to 3; task 5 is assigned to CPU5, and the assigned time period is the time scale segment of 3 to 8; task 7 is assigned to CPU5, and the assigned time period is the time scale segment of 8 to 15.

[0115] By displaying it on the front end in the form of a visual scheduling table, the generated multi-core scheduling strategy can be presented to users more vividly and intuitively, thereby improving the user experience.

[0116] Exemplary Methods

[0117] Figure 7 The present invention is a flowchart of a method for constructing a scheduling strategy generation model according to an exemplary embodiment.

[0118] Combination Figure 7 and Figure 5 As shown in (b1), the second exemplary embodiment of the present disclosure provides a method for constructing a scheduling strategy generation model, which includes the following steps: S710-S750.

[0119] In step S710, training scheduling information of the training task flow is obtained, where the training scheduling information is used to indicate the execution logic sequence of multiple training tasks.

[0120] In step S720, a multi-core allocation scheduling training problem is generated according to the above training scheduling information and the number of CPU cores.

[0121] In step S730, the multi-core allocation scheduling training problem is input into a pre-trained prompt word generation model, and the training prompt words for multi-core allocation scheduling are output.

[0122] In step S740, at least one solver is used to solve the multi-core allocation scheduling training problem to obtain corresponding thought chains and multi-core scheduling strategy solution results.

[0123] In step S750, the intelligent heuristic generation model to be trained is trained according to the training prompt words, the thought chain and the multi-core scheduling strategy solution, and the trained intelligent heuristic generation model is used as a scheduling strategy generation model for generating scheduling strategies.

[0124] In some embodiments, the above-mentioned training prompt words and the above-mentioned thought chain serve as the training input of the above-mentioned intelligent heuristic generation model, the training output is the multi-core scheduling strategy generation result, and the above-mentioned multi-core scheduling strategy solution result serves as the training label. During the training process, the loss function is used to represent the gap between the multi-core scheduling strategy generation result (training output) and the multi-core scheduling strategy solution result (training label). For example, a cross entropy loss function or other loss functions may be used. The training is considered completed when the training reaches a preset number of times or the loss function is less than a set threshold.

[0125] This embodiment provides a method for constructing a scheduling strategy generation model. The prompt word generation model and the intelligent heuristic generation model are trained separately in advance. During the training of the intelligent heuristic generation model, the pre-trained prompt word generation model can be used. During the training of the intelligent heuristic generation model, at least one solver is used to solve the multi-core allocation scheduling training problem, and the corresponding thought chain and multi-core scheduling strategy solution results are obtained. The intelligent heuristic generation model learns the thought chain for solving the multi-core allocation scheduling problem corresponding to the input prompt word during the training period. Then, in the subsequent use stage of the intelligent heuristic generation model, there is no need to input additional thought chains. Only based on the input multi-core allocation scheduling problem, the corresponding processing thought chain can be analyzed and the multi-core scheduling strategy can be generated based on this processing thought chain.

[0126] Exemplary Methods

[0127] Figure 8 The present invention is a flowchart of another method for constructing a scheduling strategy generation model according to an exemplary embodiment.

[0128] Combination Figure 8 and Figure 5 As shown in (b2), the third exemplary embodiment of the present disclosure provides another method for constructing a scheduling strategy generation model, which includes the following steps: S810-S860.

[0129] In step S810, training scheduling information of the training task flow is obtained, where the training scheduling information is used to indicate the execution logic sequence of multiple training tasks.

[0130] In step S820, a multi-core allocation scheduling training problem is generated based on the above training scheduling information and the number of CPU cores.

[0131] In step S830, the multi-core allocation scheduling training problem is input into the prompt word generation model to be trained, and the training prompt words of the multi-core allocation scheduling are output.

[0132] In step S840, at least one solver is used to solve the multi-core allocation scheduling training problem to obtain corresponding thought chains and multi-core scheduling strategy solution results.

[0133] In step S850, the training prompt words and the thought chain are input into the intelligent heuristic generation model to be trained, and the multi-core scheduling strategy generation result is output.

[0134] In step S860, the multi-core scheduling strategy solution result is used as a training label, and the prompt word generation model and the intelligent heuristic generation model are synchronously trained. The combined model composed of the trained prompt word generation model and the intelligent heuristic generation model is used as a scheduling strategy generation model for generating a scheduling strategy.

[0135] During the training process, the loss function is used to represent the gap between the multi-core scheduling strategy generation result (training output) and the multi-core scheduling strategy solution result (training label). For example, a cross entropy loss function or other loss functions can be used. The training is considered complete when the training reaches the preset number of times or the loss function is less than the set threshold.

[0136] This embodiment provides another method for constructing a scheduling strategy generation model, in which the prompt word generation model and the intelligent heuristic generation model constitute a combined model for synchronous training, and the model and internal output results of the combined model are illustrated by dotted lines. During the synchronous training process, the multi-core allocation scheduling training problem is used as a training input of the combined model, which is input into the prompt word generation model to be trained; the thinking chain of solving the multi-core allocation scheduling training problem by at least one solver is used as another training input of the combined model, which is input into the intelligent heuristic generation model to be trained. During this period, the training prompt words output by the prompt word generation model for the input are also used as the input of the intelligent heuristic generation model, and finally the multi-core scheduling strategy generation result is output by the combined model; the multi-core scheduling strategy solution result corresponding to the at least one solver is used as a training label, and the prompt word generation model and the intelligent heuristic generation model in the combined model are synchronously trained. During the training of the intelligent heuristic generation model and the prompt word generation model, at least one solver is used to solve the above-mentioned multi-core allocation and scheduling training problem to obtain the corresponding thinking chain and multi-core scheduling strategy solution results, and the intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation and scheduling problem corresponding to the input prompt word during the training period. Therefore, there is no need to input additional thinking chains in the subsequent use stage of the intelligent heuristic generation model. Only based on the input multi-core allocation and scheduling problem, the corresponding processing thinking chain can be analyzed and the multi-core scheduling strategy can be generated based on this processing thinking chain.

[0137] Exemplary Devices

[0138] Fig. 9 It is a block diagram of a device for generating a scheduling strategy in an intelligent heuristic manner according to an exemplary embodiment.

[0139] Reference Fig. 9 As shown, the fourth exemplary embodiment of the present disclosure provides an apparatus 900 for intelligently heuristically generating a scheduling strategy. The apparatus 900 includes: an orchestration information acquisition module 910, a scheduling problem generation module 920, a prompt word generation module 930 and a scheduling strategy generation module 940.

[0140] The above-mentioned arrangement information acquisition module 910 is used to acquire the arrangement information of the task flow, and the above-mentioned arrangement information is used to indicate the execution logic sequence of multiple tasks.

[0141] The scheduling problem generating module 920 is used to generate a multi-core allocation scheduling problem according to the above-mentioned scheduling information and the number of CPU cores.

[0142] The prompt word generation module 930 is used to input the multi-core allocation scheduling problem into a pre-trained prompt word generation model, and output the prompt words for the multi-core allocation scheduling.

[0143] The above-mentioned scheduling strategy generation module 940 is used to input the above-mentioned prompt words into the pre-trained intelligent heuristic generation model, and output the multi-core scheduling strategy for the above-mentioned task flow; the above-mentioned intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation scheduling problem corresponding to the input prompt words during the training stage.

[0144] In some embodiments, the above-mentioned device 900 further includes: a visual schedule display module.

[0145] The above-mentioned visual scheduling table display module is used to display the above-mentioned multi-core scheduling strategy in the form of a visual scheduling table. The above-mentioned visual scheduling table is a two-dimensional chart, which includes: the task allocation time dimension and the task corresponding CPU core dimension, indicating that the target task in the above-mentioned task flow is allocated to the target CPU core within the target time period; wherein the execution order corresponding to the allocation time period of each task in the above-mentioned task flow satisfies the constraints of the above-mentioned execution logic order.

[0146] The device 900 of this embodiment may store pre-trained prompt word generation models and intelligent heuristic generation models locally, or the device 900 may remotely call the pre-trained prompt word generation models and intelligent heuristic generation models. The prompt word generation models and intelligent heuristic generation models may be trained by the device 900, or may be trained by other devices and used only by the device 900.

[0147] For more details and beneficial effects of this embodiment, please refer to the relevant description of the first embodiment, which will not be repeated here.

[0148] Exemplary Devices

[0149] Fig.10 It is a block diagram of a device for constructing a scheduling strategy generation model according to an exemplary embodiment.

[0150] Reference Fig.10 As shown, the fifth exemplary embodiment of the present disclosure provides a device 1000 for constructing a scheduling strategy generation model, and the above-mentioned device 1000 includes: a first training data acquisition module 1010, a first training question generation module 1020, a first training prompt word generation module 1030, a first problem solving module 1040 and a first model training module 1050.

[0151] The first training data acquisition module 1010 is used to acquire training scheduling information of a training task flow, where the training scheduling information is used to indicate a logical execution order of a plurality of training tasks.

[0152] The first training problem generating module 1020 is used to generate a multi-core allocation scheduling training problem according to the training scheduling information and the number of CPU cores.

[0153] The first training prompt word generation module 1030 is used to input the multi-core allocation scheduling training problem into a pre-trained prompt word generation model, and output the training prompt words for multi-core allocation scheduling.

[0154] The first problem solving module 1040 is used to solve the multi-core allocation scheduling training problem through at least one solver to obtain the corresponding thinking chain and multi-core scheduling strategy solution results.

[0155] The first model training module 1050 is used to train the intelligent heuristic generation model to be trained according to the training prompt words, the thinking chain and the multi-core scheduling strategy solution results, and use the trained intelligent heuristic generation model as a scheduling strategy generation model for generating scheduling strategies.

[0156] For more details of this embodiment, please refer to the relevant description of the second embodiment, which will not be repeated here.

[0157] Exemplary Devices

[0158] Fig.11 It is a block diagram of a device for constructing a scheduling strategy generation model according to another exemplary embodiment.

[0159] Reference Fig.11 As shown, the sixth exemplary embodiment of the present disclosure provides another device 1100 for constructing a scheduling strategy generation model, and the above-mentioned device 1100 includes: a second training data acquisition module 1110, a second training question generation module 1120, a second training prompt word generation module 1130, a second problem solving module 1140, a scheduling strategy training generation module 1150 and a second model training module 1160.

[0160] The second training data acquisition module 1110 is used to acquire training scheduling information of the training task flow, where the training scheduling information is used to indicate the execution logic sequence of multiple training tasks.

[0161] The second training problem generating module 1120 is used to generate a multi-core allocation scheduling training problem according to the training scheduling information and the number of CPU cores.

[0162] The second training prompt word generation module 1130 is used to input the multi-core allocation scheduling training problem into the prompt word generation model to be trained, and output the training prompt words for the multi-core allocation scheduling.

[0163] The second problem solving module 1140 is used to solve the multi-core allocation scheduling training problem through at least one solver to obtain the corresponding thinking chain and multi-core scheduling strategy solution results.

[0164] The scheduling strategy training generation module 1150 is used to input the training prompt words and the thought chain into the intelligent heuristic generation model to be trained, and output the multi-core scheduling strategy generation result.

[0165] The second model training module 1160 is used to use the multi-core scheduling strategy solution result as a training label to synchronously train the prompt word generation model and the intelligent heuristic generation model. The combined model composed of the trained prompt word generation model and the intelligent heuristic generation model is used as a scheduling strategy generation model for generating scheduling strategies.

[0166] For more details of this embodiment, please refer to the relevant description of the third embodiment, which will not be repeated here.

[0167] Exemplary Electronic Devices

[0168] Fig.12 is a block diagram of an electronic device according to an exemplary embodiment. Fig.12 As shown, the electronic device 1200 provided in this embodiment may be a vehicle controller, a vehicle terminal, a vehicle computer or other types of electronic devices.

[0169] Reference Fig.12 As shown, the electronic device 1200 may include at least one processor 1210 and a memory 1220. The processor 1210 may execute instructions stored in the memory 1220. The processor 1210 is communicatively connected to the memory 1220 via a data bus. In addition to the memory 1220, the processor 1210 may also be communicatively connected to an input device 1230, an output device 1240, and a communication device 1250 via a data bus.

[0170] The processor 1210 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0171] Memory 1220 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0172] In the embodiment of the present disclosure, executable instructions are stored in the memory 1220, and the processor 1210 can read the executable instructions from the memory 1220 and execute the instructions to implement all or part of the steps of any of the methods described in the above exemplary embodiments.

[0173] Exemplary computer-readable storage media

[0174] In addition to the above methods and devices, the exemplary embodiments of the present disclosure may also be a computer program product or a computer-readable storage medium storing the computer program product. The computer product includes computer program instructions that can be executed by a processor to implement all or part of the steps described in any method in the above exemplary embodiments.

[0175] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and also conventional procedural programming languages, such as "C" language or similar programming languages ​​and scripting languages ​​(e.g., Python). The program code may be executed entirely on the user computing device, partially on the user computing device, as an independent software package, partially on the user computing device and partially on the remote computing device, or entirely on the remote computing device or server.

[0176] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples of readable storage media include: a static random access memory (SRAM) with one or more wires electrically connected, an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic storage, a flash memory, a magnetic disk or an optical disk, or any suitable combination of the above.

[0177] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0178] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for intelligent heuristic generation of scheduling strategies, characterized in that: include: Acquire the task flow arrangement information, where the arrangement information is used to indicate the execution logic order of multiple tasks; Generate a multi-core allocation scheduling problem according to the orchestration information and the number of CPU cores; Inputting the multi-core allocation scheduling problem into a pre-trained prompt word generation model, and outputting prompt words for multi-core allocation scheduling; The prompt word is input into a pre-trained intelligent heuristic generation model, and a multi-core scheduling strategy for the task flow is output; the intelligent heuristic generation model learns a chain of thinking for solving the multi-core allocation scheduling problem corresponding to the input prompt word during the training phase.

2. The method according to claim 1, characterized in that: In the training phase, the intelligent heuristic generation model is based on: the training prompt words corresponding to the multi-core allocation scheduling training problem, the thinking chain of solving the multi-core allocation scheduling training problem by at least one solver, and the multi-core scheduling strategy solution result to tune the model parameters; The training prompt words and the thought chain serve as training inputs of the intelligent heuristic generation model, the training output is a multi-core scheduling strategy generation result, and the multi-core scheduling strategy solution result serves as a training label.

3. The method according to claim 1 or 2, characterized in that: The prompt word generation model and the intelligent heuristic generation model form a combined model for synchronous training; During the synchronous training process, the multi-core allocation scheduling training problem is used as a training input of the combined model, and is input into the prompt word generation model; The thought chain of solving the multi-core allocation scheduling training problem by at least one solver is used as another training input of the combined model, which is used to be input into the intelligent heuristic generation model. During this period, the training prompt words output by the prompt word generation model for the input are also used as the input of the intelligent heuristic generation model, and finally the multi-core scheduling strategy generation result is output by the combined model; the multi-core scheduling strategy solution result corresponding to the at least one solver is used as a training label, and the prompt word generation model and the intelligent heuristic generation model in the combined model are synchronously trained.

4. The method according to claim 2, characterized in that: The solver is a solver for solving linear programming problems, including at least one of the following solvers for mixed integer programming problems: Gurobi solver, SCIP solver, Highs solver.

5. The method according to claim 1, characterized in that The arrangement information includes: task information of multiple tasks and the execution logic order between the multiple tasks; wherein the task information includes: the estimated execution time of each task; According to the scheduling information and the number of CPU cores, a multi-core allocation scheduling problem is generated, including: determining a basic scheduling period for representing a minimum scheduling time slice and a scheduling scheduling period for representing a maximum time consumption of a task flow according to an estimated execution time of each task and a logical execution order between multiple tasks; generating a multi-core allocation scheduling problem according to the task information, the basic scheduling period, the scheduling scheduling period and the number of CPU cores; or, The multi-core allocation scheduling problem includes: the scheduling information and the number of CPU cores; when the multi-core allocation scheduling problem is input into a pre-trained prompt word generation model, the prompt word generation model performs the following processing steps: according to the estimated task execution time of each task and the execution logic order between multiple tasks, determine the basic scheduling cycle for representing the minimum scheduling time slice and the scheduling scheduling cycle for representing the longest time consumption of the task flow; according to the multi-core allocation scheduling problem, the basic scheduling cycle and the scheduling scheduling cycle, output the prompt word for multi-core allocation scheduling.

6. The method according to claim 5, characterized in that According to the estimated execution time of each task and the logical execution order of multiple tasks, determine the basic scheduling cycle used to represent the minimum scheduling time slice and the scheduling cycle used to represent the longest time consumption of the task flow, including: Determine the greatest common divisor of the estimated task execution times of all tasks in the task flow according to the estimated task execution time of each task, and use the greatest common divisor as the basic scheduling period; According to the execution logic order among multiple tasks, the earliest start time and the earliest end time of each task are traversed in sequence and determined until the earliest end time corresponding to the terminal task in the task flow is obtained, and the earliest end time corresponding to the terminal task is used as the scheduling cycle; wherein, when there are one or more preceding tasks of the current task, the earliest start time of the current task is: the maximum value of the earliest end time corresponding to one or more preceding tasks; the earliest end time of the current task is: the sum of the earliest start time of the current task and the estimated task execution duration of the current task.

7. The method according to claim 1, characterized in that Also includes: Displaying the multi-core scheduling strategy in a visual scheduling table; Among them, the visual scheduling table is a two-dimensional chart, including: a task allocation time dimension and a task corresponding CPU core dimension, indicating that the target task in the task flow is allocated to the target CPU core within the target time period; wherein the execution order corresponding to the allocated time period of each task in the task flow satisfies the constraints of the execution logic order.

8. A method for constructing a scheduling strategy generation model, characterized in that: include: Acquire training scheduling information of the training task flow, where the training scheduling information is used to indicate a logical order of execution of multiple training tasks; Generate a multi-core allocation scheduling training problem according to the training scheduling information and the number of CPU cores; Inputting the multi-core allocation scheduling training problem into a pre-trained prompt word generation model, and outputting a training prompt word for multi-core allocation scheduling; Solving the multi-core allocation scheduling training problem by at least one solver to obtain corresponding thinking chains and multi-core scheduling strategy solution results; The intelligent heuristic generation model to be trained is trained according to the training prompt words, the thought chain and the multi-core scheduling strategy solution result, and the trained intelligent heuristic generation model is used as a scheduling strategy generation model for generating a scheduling strategy.

9. The method according to claim 8, characterized in that The training prompt words and the thought chain serve as training inputs of the intelligent heuristic generation model, the training output is a multi-core scheduling strategy generation result, and the multi-core scheduling strategy solution result serves as a training label.

10. A method for constructing a scheduling strategy generation model, characterized in that: include: Acquire training scheduling information of the training task flow, where the training scheduling information is used to indicate a logical order of execution of multiple training tasks; Generate a multi-core allocation scheduling training problem according to the training scheduling information and the number of CPU cores; Inputting the multi-core allocation scheduling training problem into a prompt word generation model to be trained, and outputting training prompt words for multi-core allocation scheduling; At least one solver is used to solve the multi-core allocation scheduling training problem, and the corresponding thought chain and multi-core scheduling strategy solution results are obtained; Inputting the training prompt words and the thought chain into the intelligent heuristic generation model to be trained, and outputting a multi-core scheduling strategy generation result; The multi-core scheduling strategy solution result is used as a training label, the prompt word generation model and the intelligent heuristic generation model are synchronously trained, and the combined model composed of the trained prompt word generation model and the intelligent heuristic generation model is used as a scheduling strategy generation model for generating scheduling strategies.

11. A device for intelligent heuristic generation of scheduling strategies, characterized in that: include: An orchestration information acquisition module, used to acquire the orchestration information of the task flow, wherein the orchestration information is used to indicate the execution logic sequence of multiple tasks; A scheduling problem generating module, used for generating a multi-core allocation scheduling problem according to the orchestration information and the number of CPU cores; A prompt word generation module, used for inputting the multi-core allocation scheduling problem into a pre-trained prompt word generation model, and outputting prompt words for multi-core allocation scheduling; The scheduling strategy generation module is used to input the prompt word into a pre-trained intelligent heuristic generation model and output a multi-core scheduling strategy for the task flow; the intelligent heuristic generation model learns the thinking chain for solving the multi-core allocation scheduling problem corresponding to the input prompt word during the training stage.

12. A device for constructing a scheduling strategy generation model, characterized in that: include: A first training data acquisition module, used to acquire training arrangement information of a training task flow, wherein the training arrangement information is used to indicate a logical order of execution of multiple training tasks; A first training problem generating module is used to generate a multi-core allocation scheduling training problem according to the training scheduling information and the number of CPU cores; A first training prompt word generation module is used to input the multi-core allocation scheduling training problem into a pre-trained prompt word generation model, and output a training prompt word for multi-core allocation scheduling; A first problem solving module is used to solve the multi-core allocation scheduling training problem by using at least one solver to obtain a corresponding thinking chain and a multi-core scheduling strategy solution result; The first model training module is used to train the intelligent heuristic generation model to be trained according to the training prompt words, the thought chain and the multi-core scheduling strategy solution, and use the trained intelligent heuristic generation model as a scheduling strategy generation model for generating scheduling strategies.

13. A device for constructing a scheduling strategy generation model, characterized in that: include: A second training data acquisition module, used to acquire training arrangement information of a training task flow, wherein the training arrangement information is used to indicate a logical order of execution of multiple training tasks; A second training problem generating module is used to generate a multi-core allocation scheduling training problem according to the training scheduling information and the number of CPU cores; A second training prompt word generation module, used for inputting the multi-core allocation scheduling training problem into the prompt word generation model to be trained, and outputting the training prompt words of the multi-core allocation scheduling; The second problem solving module is used to solve the multi-core allocation scheduling training problem through at least one solver to obtain the corresponding thinking chain and multi-core scheduling strategy solution results; A scheduling strategy training generation module, used for inputting the training prompt words and the thought chain into the intelligent heuristic generation model to be trained, and outputting a multi-core scheduling strategy generation result; The second model training module is used to use the multi-core scheduling strategy solution result as a training label to synchronously train the prompt word generation model and the intelligent heuristic generation model, and the combined model composed of the trained prompt word generation model and the intelligent heuristic generation model is used as a scheduling strategy generation model for generating a scheduling strategy.

14. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is used to read the executable instructions from the memory and execute the instructions to implement the method described in any one of claims 1-10.

15. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 10 are implemented.