Task scheduling method and system, equipment, medium and product

By obtaining and configuring the task execution time, assigning tasks to the control unit partition according to security level and priority, and using prediction models and dynamic scheduling strategies, the problem of low scheduling efficiency of Autosar OS is solved, improving the real-time and stability of the system.

CN118963939APending Publication Date: 2024-11-15CHONGQING JINKANG POWER NEW ENERGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410982157.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-22
Publication Date
2024-11-15

AI Technical Summary

Technical Problem

The existing Autosar OS scheduling technology is inefficient and cannot accurately predict and control the execution time of tasks, resulting in a disordered task execution order, affecting the stability and real-time nature of the system.

Method used

By obtaining the execution time of the tasks to be executed, scheduling tasks are configured according to the security level and priority, and tasks are allocated to different partitions of the control unit, chronological scheduling is adopted, and task execution time is predicted using the prediction model, and scheduling strategies are dynamically adjusted to adapt to vehicles. Real-time status.

Benefits of technology

It reduces the switching load of the processor during task scheduling, realizes isolated execution of tasks, reduces conflicts and resource competition between tasks, and improves the real-time and stability of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118963939A_ABST
    Figure CN118963939A_ABST
Patent Text Reader

Abstract

The invention provides a task scheduling method and system, equipment, a medium and a product. The task scheduling method comprises the following steps: acquiring a first execution duration of a to-be-executed application task; configuring a scheduling task according to the first execution duration; wherein the first execution durations of the application tasks in the same scheduling task are the same; according to the security level of the application task, distributing the application task to a partition corresponding to the control unit; scheduling the application tasks according to the scheduling sequence of the scheduling tasks; wherein the scheduling sequence is a time sequence. According to the application task scheduling method and device, the control unit is partitioned, isolated scheduling of the application tasks is achieved, conflicts and resource competition between the application tasks are reduced, the scheduling execution time of the application tasks is shortened, and the real-time performance of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a task scheduling method and system, device, medium, and product. Background Art

[0002] The automotive software system is an important part of modern cars. It is responsible for controlling and managing various functions of the car, including the engine, transmission system, braking system, etc. The OS (Operating System) is the core of the automotive software system. It is responsible for managing and scheduling various software resources, tasks, events, and interrupt processing to ensure the efficient operation of the automotive software system. However, due to the complexity and real-time nature of the automotive software system, the efficiency of OS scheduling has a significant impact on the performance of the automotive software system.

[0003] The existing Autosar OS scheduling technology relies on the built-in algorithms of the tool chain to generate scheduling strategies, lacks perception of real scenarios, and is often unable to accurately predict and control the execution time of tasks under complex working conditions, which may lead to disordered execution order of tasks and affect the stability and real-time performance of the system. Summary of the invention

[0004] The technical problem to be solved by the present disclosure is to overcome the defect of low scheduling efficiency in the prior art and to provide a task scheduling method and system, equipment, medium and product.

[0005] The present invention solves the above technical problems through the following technical solutions:

[0006] In a first aspect, a task scheduling method is provided, the task scheduling method comprising:

[0007] Get the first execution time of the application task to be executed;

[0008] The scheduling task is configured according to the first execution duration; wherein the first execution duration of the application tasks in the same scheduling task is the same;

[0009] Allocating the application task to a partition corresponding to the control unit according to the security level of the application task;

[0010] The application tasks are scheduled according to a scheduling order of the scheduling tasks; wherein the scheduling order is a time order.

[0011] Optionally, when applied to a vehicle, before obtaining the first execution duration of the application task to be executed, the method further includes:

[0012] Determine the application tasks to be executed based on the real-time status parameters and environmental parameters of the vehicle.

[0013] Optionally, obtaining a first execution duration of the application task to be executed includes:

[0014] The execution time of the application task is predicted according to a pre-trained prediction model to obtain the first execution time; wherein the prediction model is trained according to historical application tasks and the second execution time; and the second execution time is obtained by obtaining the execution time of multiple historical application tasks.

[0015] Optionally, configuring the scheduling task according to the first execution duration includes:

[0016] A scheduling task is configured according to the first execution duration and the security level; wherein, in the same scheduling task, the application tasks are sorted according to the security level.

[0017] Optionally, configuring the scheduling task according to the first execution duration further includes:

[0018] A scheduling task is configured according to the first execution duration and the priority of the application task; wherein, in the same scheduling task, the application tasks are sorted according to the priority.

[0019] Optionally, before allocating the application task to a partition corresponding to the control unit according to the security level of the application task, the method further includes:

[0020] The storage space in the control unit is partitioned according to the security level; wherein the capacity of each partition is determined according to the number of application tasks in the predetermined security level.

[0021] In a second aspect, a task scheduling system is provided, the task scheduling system comprising:

[0022] An acquisition module, used for acquiring a first execution duration of an application task to be executed;

[0023] A configuration module, configured to configure a scheduling task according to the first execution duration; wherein the first execution durations of the application tasks in the same scheduling task are the same;

[0024] An allocation module, used for allocating the application task to a partition corresponding to the control unit according to the security level of the application task;

[0025] The scheduling module is used to schedule the application tasks according to the scheduling order of the scheduling tasks; wherein the scheduling order is a time order.

[0026] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, wherein the processor implements the task scheduling method described in the first aspect when executing the computer program.

[0027] According to a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the task scheduling method according to the first aspect is implemented.

[0028] In a fifth aspect, a computer program product is provided, comprising a computer program, characterized in that when the computer program is executed by a processor, the task scheduling method described in the first aspect is implemented.

[0029] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.

[0030] The positive progressive effect of the present disclosure is that application tasks with the same execution time are assigned to the same scheduling task, thereby reducing the switching load of the processor when scheduling application tasks, and according to the security levels of multiple application tasks, the application tasks are assigned to different partitions of the control unit to achieve isolated execution of application tasks, reduce conflicts and resource competition between application tasks, thereby reducing the scheduling execution time of application tasks and improving the real-time performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 A first flow chart of a task scheduling method provided by an exemplary embodiment of the present disclosure;

[0032] Figure 2 A second flow chart of a task scheduling method provided by an exemplary embodiment of the present disclosure;

[0033] Figure 3 A structural diagram of a task scheduling system provided by an exemplary embodiment of the present disclosure;

[0034] Figure 4 The present invention provides a schematic structural diagram of an electronic device according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0035] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.

[0036] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various places in the text does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0037] As shown in this document, unless the context clearly indicates an exception, the words "a", "an", "an" and / or "the" do not refer to the singular and may also include the plural, unless the context clearly indicates an exception. Generally speaking, the terms "include" and "comprise" only indicate that the steps and elements that have been clearly identified are included, and these steps and elements do not constitute an exclusive list. The method or device may also include other steps or elements.

[0038] The definitions of inclusion in this document, such as the terms "having", "may have", "include" or "may include" used herein, indicate the existence of the corresponding functions, operations, elements, etc. herein, and do not limit the existence of one or more other functions, operations, elements, etc. In addition, it should be understood that the terms "including" or "having" used herein indicate the existence of the features, numbers, steps, operations, elements, components, or a combination thereof described in the specification, without excluding the existence or addition of one or more other features, numbers, steps, operations, elements, components, or a combination thereof.

[0039] Prefixes such as "first" and "second" are used in the embodiments of the present disclosure only to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of prefixes such as ordinal numbers to distinguish description objects in the embodiments of the present disclosure does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and no unnecessary limitation should be constituted due to the use of such prefixes. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.

[0040] Figure 1 A flowchart of a task scheduling method provided by an exemplary embodiment of the present disclosure, the task scheduling method comprises the following steps:

[0041] S11. Obtain a first execution duration of an application task to be executed.

[0042] The first execution duration may be an actually detected execution duration of the application task, or an execution duration of the application task predicted based on historical execution durations, or an execution duration of the application task inferred based on experience.

[0043] In one embodiment, the task scheduling method is applied to a vehicle, and before obtaining the first execution duration of the application task to be executed, the method further includes:

[0044] Determine the application tasks to be executed based on the real-time status parameters and environmental parameters of the vehicle.

[0045] Based on the real-time state parameters of the vehicle (such as speed, acceleration, driving mode, etc.) and environmental parameters (such as road conditions, traffic conditions, etc.), a scheduling strategy scheduling algorithm based on reinforcement learning is adopted. This algorithm can dynamically adjust the scheduling strategy according to the real-time state parameters of the system to adapt to the changing environmental requirements and working conditions, and further improve the scheduling efficiency and reliability of the system.

[0046] As shown in Table 1, when the vehicle sensor detects that the vehicle's road condition is poor (such as starting on a low-adhesion road, sudden acceleration, side slip and tail swing, etc.), the vehicle's road condition is specifically reflected in the vehicle's real-time state parameters, and the adaptive scheduling algorithm is based on the vehicle's real-time state parameters. For example, when the speed of the car's real-time state parameters is v2, the acceleration is a2, the speed is r2, and the torque is n2, the current optimal scheduling is calculated as strategy 2, and fed back to the OS decision center. The OS decision center determines the application tasks associated with strategy 2 as the application tasks to be executed according to the task partition strategy table, and schedules the application tasks to be executed to adapt to the changing environmental requirements and working conditions, and improve the scheduling efficiency and reliability of the system.

[0047] Table 1 Task partition strategy table

[0048]

[0049] In one embodiment, obtaining a first execution duration of the application task to be executed includes: predicting the execution duration of the application task according to a pre-trained prediction model to obtain the first execution duration.

[0050] Among them, the prediction model is trained according to historical application tasks and the second execution time, the second execution time is the execution time of multiple historical application tasks, and the prediction model can be a prediction model based on time series analysis, such as LSTM (Long Short-Term Memory).

[0051] Collect and analyze the execution data of multiple historical application tasks within a year. The execution data includes the start time, end time and any interruption time during the execution process of the task. Through data cleaning, preprocessing and other technical means, extract valid data and store the data in a dedicated database TaskDB (Task Database) for subsequent analysis and processing.

[0052] Using a prediction model based on time series analysis, it is possible to predict the future execution time of application tasks based on historical execution data, such as the second execution time of historical application tasks, and obtain the first execution time. The prediction model is trained based on historical application tasks and the second execution time. The training and testing process of the prediction model is carried out on the machine learning platform. The LSTM neural network model is used. The model has powerful time series analysis capabilities. The task data in TaskDB is input into LSTM to predict the execution time of future tasks, that is, the first execution time, and generate a task execution table TaskTimeTable (task execution table) to provide an accurate execution time reference for subsequent scheduling. At the same time, the platform can automatically tune the parameters of the prediction model to improve the accuracy of the prediction.

[0053] By collecting and analyzing the second execution time of multiple historical application tasks, an intelligent prediction model for task execution time is established to predict and control the execution time of application tasks, reduce the uncertainty of application task execution, avoid disorder of application task execution order, and improve system stability.

[0054] S12. Configure the scheduling task according to the first execution duration.

[0055] Among them, the first execution duration of the application tasks in the same scheduling task is the same.

[0056] In the prior art, 100ms and 200ms tasks are assigned to one OS task for scheduling. During scheduling, the next scheduling will take effect only after the 200ms task is completed. At this time, the 100ms task waits for 100ms in vain, resulting in low scheduling efficiency.

[0057] In this embodiment, as shown in Table 2, the present disclosure schedules application tasks with the same first execution duration in the same scheduling task. For example, application tasks with an execution duration of 100us are all configured in the scheduling task of 100us_task to achieve precise matching. When multiple application tasks need to be executed, the OS will schedule the application tasks according to the priority of the tasks and the availability of resources. When scheduling the scheduling task of 100us_task, all application tasks with an execution duration of 100us are scheduled and allocated to reduce the switching load of the CPU (Central Processing Unit) during scheduling. For example, the scheduling task of 100us_task is executed at Point0, and all the application tasks 100us_qm, 100us_asilb, etc. whose first execution time is 100us in the scheduling task of 100us_task are all scheduled and allocated; the scheduling task of 1ms_task is executed at Point1, and all the application tasks such as 1ms_asilc, 1ms_asild, etc. whose first execution time is 1ms in the scheduling task of 1ms_task are all scheduled and allocated, and so on. There is a dependency relationship between the application tasks and the scheduling tasks, for example, scheduling is first performed at Point0, and after all the application tasks 100us_qm, 100us_asilb, etc. whose first execution time is 100us in the scheduling task of 100us_task are scheduled, Point1 and subsequent application tasks such as 1ms_task, 10ms_task, etc. are scheduled, and so on.

[0058] Table 2 Execution table of application tasks

[0059]

[0060] In one embodiment, configuring the scheduled task according to the first execution duration includes: configuring the scheduled task according to the first execution duration and the security level.

[0061] Among them, in the same scheduling task, the application tasks are sorted according to their security levels.

[0062] The safety level represents the degree of safety in executing application tasks. According to the functional safety architecture of the vehicle, the dependency relationship between each application task is analyzed to obtain the safety level. For example, the application tasks are divided into safety levels according to the degree of relevance of each application task to personal safety during vehicle driving. Each application task has safety attributes, such as safety attributes related to personal safety or not related to personal safety. When an application task is marked as related to personal safety by the application layer security policy, the safety attribute of the application task will be automatically increased to the preset safety threshold to ensure that application tasks related to personal safety are always at the top of the priority. The safety threshold refers to a series of standards and parameters set during the design and manufacturing process of the vehicle to ensure the safety of the vehicle. For example, the driver and passengers are allowed to perform a series of operations without reaching the safety threshold. When the safety attribute is increased to the preset safety threshold, the system forcibly takes over the vehicle and implements emergency avoidance operations.

[0063] When dealing with emergency tasks such as collision, overcurrent, overvoltage, emergency braking, etc., existing scheduling technologies may not be able to handle them in a timely manner due to interference from other tasks, affecting the safety and reliability of the system.

[0064] In this embodiment, taking a car as an example, the safety level is designed according to the functional safety architecture of the car. Application tasks that are not related to personal safety, such as temperature acquisition, are divided into QM level, and application tasks that involve personal hazards, such as detecting high voltage, overcurrent, and collision in the car, are divided into different safety levels of ASIL-A, ASIL-B, ASIL-C, and ASIL-D according to the degree of hazard.

[0065] For application tasks involving personal hazards, an emergency task priority scheduling mechanism is established, with dual attributes, one priority attribute and one safety attribute, and a safety threshold for application tasks. The first execution duration of application tasks in the same scheduling task is the same, and application tasks are sorted according to the safety level. Application tasks with high safety levels are scheduled first, and those with low safety levels are scheduled later. For example, when there are high-priority tasks to be processed, the system automatically adjusts the scheduling strategy to give priority to high-priority application tasks. When an application task is marked as safety-related by the application layer security policy, the safety attribute priority of the application task will be automatically increased to the preset safety threshold to ensure that the safety task is always at the top of the priority list. At the same time, the system will temporarily suspend other non-urgent tasks.

[0066] In one embodiment, configuring the scheduling task according to the first execution duration further includes: configuring the scheduling task according to the first execution duration and the priority of the application task.

[0067] Among them, in the same scheduling task, the application tasks are sorted according to the priority.

[0068] Application tasks that are not related to personal safety have lower safety attributes and are mainly scheduled based on priority. For example, application tasks in the QM level are application tasks that are not related to personal safety. The first execution time in the same scheduling task is the same, and the application tasks are sorted according to priority. For example, in the same scheduling task, the execution time of two application tasks is 100us_qm. The contents of the application tasks are voltage detection and temperature detection, and they belong to the same QM level, but the voltage detection has a higher priority, so it is scheduled first.

[0069] S13. Allocate the application task to the partition corresponding to the control unit according to the security level of the application task.

[0070] The control unit is used to execute application tasks, and the control unit may be an MCU (Microcontroller Unit).

[0071] Taking the control unit as MCU as an example, the partitioning technology of MCU is used to realize the isolated execution of application tasks, resource isolation between partitions, and no interference. According to the safety level of each application task, the storage space of MCU is partitioned, and application tasks of different safety levels such as ASIL-A, ASIL-B, ASIL-C, and ASIL-D are assigned to the storage space of different partitions of MCU for execution, reducing conflicts and resource competition between tasks. When there are multiple application tasks to be executed, OS will schedule the application tasks according to the priority of application tasks and the availability of resources, optimize the scheduling of concurrent tasks, improve the task access speed, thereby shortening the scheduling time, and at the same time, through the task collaboration strategy, ensure that concurrent tasks run efficiently without interfering with key safety tasks, and can effectively handle a large number of concurrent tasks, avoiding excessive scheduling time and improving the real-time performance of the system.

[0072] In one embodiment, before allocating the application task to the partition corresponding to the control unit according to the security level of the application task, the method further includes:

[0073] The memory space in the control unit is partitioned according to the security level.

[0074] As shown in Table 3, application tasks are divided into five safety levels: QM, ASIL-A, ASIL-B, ASIL-C, and ASIL-D. Tasks not related to personal safety, such as temperature acquisition, are classified into the QM level. Tasks involving personal hazards, such as detecting high voltage, overcurrent, and collision in the vehicle, are classified into different safety levels of ASIL-A, ASIL-B, ASIL-C, and ASIL-D according to the degree of hazard. The storage space in the control unit is partitioned according to the safety level. For example, if it is divided into five safety levels: QM, ASIL-A, ASIL-B, ASIL-C, and ASIL-D, the control unit is divided into multiple partitions such as Application0 (application), Application1...Application4, and so on. The application tasks included in the QM safety level are 100us_task (qm) and 100ms_task (qm). Both 100us_task (qm) and 100ms_task (qm) are allocated to Application0. The partition capacity of each partition is determined according to the number of all application tasks at the same security level that are predefined. If there are more application tasks at the same security level, the partition capacity of the partition corresponding to the security level is larger. After the storage space is partitioned, the OS task will assign tasks of different security levels to the storage space of different partitions. The OS schedules application tasks in different partitions of the storage space according to the scheduling order, thus realizing mutual isolation between application tasks and improving scheduling efficiency.

[0075] Table 3 Application task allocation table

[0076]

[0077] S14. Schedule application tasks according to the scheduling order of the scheduling tasks.

[0078] Among them, the scheduling order is the time order.

[0079] As shown in Table 2 above, the scheduling order of the scheduling tasks is Point0, Point1, etc. First, Point0 is scheduled, and all the application tasks 100us_qm, 100us_asilb, etc. with the first execution time of 100us in the scheduling task of 100us_task are scheduled. As shown in Table 3, 100us_qm and 100us_asilb are in different storage space partitions. After all the application tasks in Point0 are scheduled, Point1 and subsequent 1ms_task, 10ms_task and other scheduling tasks are executed, and so on. However, when an emergency occurs in Point0, and the priority of the application task to be executed in the emergency is higher than the priority of the currently scheduled application task, the application task with the higher priority is executed immediately. For example, if the scheduling task of 100us_task is currently executed in Point0, but the application task of 100ms_asild needs to be executed after the emergency occurs, the scheduling of the 100us_task currently executed in Point0 is stopped immediately, and the application task of 100ms_asild is scheduled first.

[0080] Combine the following Figure 2 , Table 1-Table 3, further explains the task scheduling method:

[0081] First, the execution data of multiple historical application tasks within a year are collected and analyzed. The execution data includes the start time, end time and any interruption time of the task during the execution process. Through data cleaning, preprocessing and other technical means, valid data are extracted and stored in a dedicated database TaskDB (Task Database) for subsequent analysis and processing. Then, a prediction model based on time series analysis is used to predict the future execution time of the application task based on historical execution data, such as the second execution time of the historical application task, and obtain the first execution time. The prediction model is trained based on the historical application task and the second execution time. The training and testing process of the prediction model is carried out on the machine learning platform, using the LSTM neural network model, which has a strong time series analysis capability. The task data in TaskDB is input into LSTM to predict the execution time of future tasks, that is, the first execution time, and generate a task execution table TaskTimeTable to provide an accurate execution time reference for subsequent scheduling.

[0082] Based on the real-time state parameters of the vehicle (such as speed, acceleration, driving mode, etc.) and environmental parameters (such as road conditions, traffic conditions, etc.), an adaptive scheduling strategy scheduling algorithm based on reinforcement learning is adopted. According to the real-time state parameters of the system, the scheduling strategy is dynamically adjusted. When the vehicle sensor detects that the vehicle's road condition is poor (such as starting on a low-adhesion road, sudden acceleration, skidding and drifting, etc.), the vehicle's road condition is specifically reflected in the vehicle's real-time state parameters. The adaptive scheduling algorithm calculates the current optimal scheduling based on the vehicle's real-time state parameters and environmental parameters, and feeds it back to the OS decision center. The OS decision center determines the application tasks to be executed according to the task partition strategy table and schedules the application tasks.

[0083] The application tasks to be executed are allocated to the partitions corresponding to the control unit according to the safety level. Tasks that are not related to personal safety in the safety level, such as temperature acquisition, are QM level. Tasks involving personal hazards, such as detecting high voltage, overcurrent, and collision in the vehicle, are divided into ASIL-A, ASIL-B, ASIL-C, ASIL-D, etc. according to the degree of hazard. The storage space in the control unit is partitioned according to the safety level. For example, it is divided into five safety levels of QM, ASIL-A, ASIL-B, ASIL-C, and ASIL-D. The control unit is divided into multiple partitions such as Application0, Application1...Application4, etc., and the application tasks of QM level are allocated to Application0, and the application tasks of ASIL-A level are allocated to Application1, and so on. The partition capacity of each partition is determined according to the pre-defined number of all application tasks at the same safety level.

[0084] Put application tasks with the same first execution time into the same scheduling task for scheduling. For example, configure all application tasks with an execution time of 100us into the scheduling task of 100us_task to achieve precise matching. When there are multiple application tasks to be executed, the OS will schedule the application tasks according to the priority of the task and the availability of resources. When scheduling the scheduling task of 100us_task, all application tasks 100us_qm, 100us_asilb, etc. with a first execution time of 100us are scheduled and allocated. In the same scheduling task, sort the application tasks according to the safety level, and divide the application tasks into five safety levels: QM, ASIL-A, ASIL-B, ASIL-C, and ASIL-D. The safety level gradually increases from QM to ASIL-D. The high safety level is scheduled first, and the low safety level is scheduled later. For example, when there are high-priority tasks to be processed, the system automatically adjusts the scheduling strategy to give priority to high-priority application tasks. When an application task is marked as security-related by the application layer security policy, the security attribute priority of the application task will be automatically increased to the preset security threshold to ensure that the security task is always at the top of the priority list. At the same time, the system will temporarily suspend other non-urgent tasks.

[0085] Corresponding to the aforementioned task scheduling method embodiment, the present disclosure also provides an embodiment of a task scheduling system.

[0086] Figure 3 A module diagram of a task scheduling system provided by an exemplary embodiment of the present disclosure, the system comprising:

[0087] An acquisition module 31 is used to acquire a first execution duration of an application task to be executed;

[0088] A configuration module 32, configured to configure a scheduling task according to the first execution duration; wherein the first execution durations of the application tasks in the same scheduling task are the same;

[0089] An allocation module 33, configured to allocate the application task to a partition corresponding to the control unit according to the security level of the application task;

[0090] The scheduling module 34 is used to schedule the application tasks according to the scheduling order of the scheduling tasks; wherein the scheduling order is a time order.

[0091] In one embodiment, the acquisition module is further used to:

[0092] Determine the application tasks to be executed based on the real-time status parameters and environmental parameters of the vehicle.

[0093] In one embodiment, the acquisition module is further used to:

[0094] The execution time of the application task is predicted according to a pre-trained prediction model to obtain the first execution time; wherein the prediction model is trained according to historical application tasks and the second execution time; and the second execution time is obtained by obtaining the execution time of multiple historical application tasks.

[0095] In one embodiment, the configuration module is further configured to:

[0096] A scheduling task is configured according to the first execution duration and the security level; wherein, in the same scheduling task, the application tasks are sorted according to the security level.

[0097] In one embodiment, the configuration module is further configured to:

[0098] A scheduling task is configured according to the first execution duration and the priority of the application task; wherein, in the same scheduling task, the application tasks are sorted according to the priority.

[0099] In one embodiment, the allocation module is further configured to:

[0100] The storage space in the control unit is partitioned according to the security level; wherein the capacity of each partition is determined according to the number of application tasks in the predetermined security level.

[0101] As for the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The system embodiment described above is only illustrative, wherein the units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution.

[0102] Figure 4 This is a structural schematic diagram of an electronic device shown in an example embodiment of the present disclosure, the electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor, and when the processor executes the computer program, the task scheduling method described in any of the above embodiments is implemented. Figure 4 The electronic device 40 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0103] like Figure 4As shown, the electronic device 40 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 40 may include, but are not limited to: at least one processor 41, at least one memory 42, and a bus 43 connecting different system components (including the memory 42 and the processor 41).

[0104] The bus 43 includes a data bus, an address bus, and a control bus.

[0105] The memory 42 may include a volatile memory, such as a random access memory (RAM) 421 and / or a cache memory 422 , and may further include a read-only memory (ROM) 423 .

[0106] The memory 42 may also include a program tool 425 (or utility) having a set (at least one) of program modules 424, such program modules 424 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0107] The processor 41 executes various functional applications and data processing by running the computer program stored in the memory 42, such as the task scheduling method provided in any of the above embodiments.

[0108] The electronic device 40 may also communicate with one or more external devices 44 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 45. Furthermore, the electronic device 40 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 46. As shown, the network adapter 46 communicates with other modules of the electronic device 40 via a bus 43. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 40, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.

[0109] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.

[0110] The embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the task scheduling method provided by any of the above embodiments is implemented.

[0111] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.

[0112] The embodiment of the present disclosure further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor, the task scheduling method described in any one of the above items is implemented.

[0113] Among them, the program code for executing the computer program product of the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.

[0114] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.

Claims

1. A task scheduling method, characterized in that: The task scheduling method comprises: Get the first execution time of the application task to be executed; The scheduling task is configured according to the first execution duration; wherein the first execution duration of the application tasks in the same scheduling task is the same; Allocating the application task to a partition corresponding to the control unit according to the security level of the application task; The application tasks are scheduled according to a scheduling order of the scheduling tasks; wherein the scheduling order is a time order.

2. The task scheduling method according to claim 1, characterized in that: Applied to a vehicle, before obtaining the first execution duration of the application task to be executed, the method further includes: Determine the application tasks to be executed based on the real-time status parameters and environmental parameters of the vehicle.

3. The task scheduling method according to claim 1, characterized in that: The obtaining of a first execution duration of the application task to be executed includes: The execution time of the application task is predicted according to a pre-trained prediction model to obtain the first execution time; wherein the prediction model is trained according to historical application tasks and the second execution time; and the second execution time is obtained by obtaining the execution time of multiple historical application tasks.

4. The task scheduling method according to claim 1, characterized in that: The configuring the scheduling task according to the first execution duration includes: A scheduling task is configured according to the first execution duration and the security level; wherein, in the same scheduling task, the application tasks are sorted according to the security level.

5. The task scheduling method according to claim 1, characterized in that: The configuring the scheduling task according to the first execution duration also includes: A scheduling task is configured according to the first execution duration and the priority of the application task; wherein, in the same scheduling task, the application tasks are sorted according to the priority.

6. The task scheduling method according to claim 1, characterized in that: Before allocating the application task to the partition corresponding to the control unit according to the security level of the application task, the method further includes: The storage space in the control unit is partitioned according to the security level; wherein the capacity of each partition is determined according to the number of application tasks in the predetermined security level.

7. A task scheduling system, characterized in that: The task scheduling system comprises: An acquisition module, used for acquiring a first execution duration of an application task to be executed; A configuration module, configured to configure a scheduling task according to the first execution duration; wherein the first execution durations of the application tasks in the same scheduling task are the same; An allocation module, used for allocating the application task to a partition corresponding to the control unit according to the security level of the application task; The scheduling module is used to schedule the application tasks according to the scheduling order of the scheduling tasks; wherein the scheduling order is a time order.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the task scheduling method according to any one of claims 1 to 6 is implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the task scheduling method according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the task scheduling method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Edge cloud resource management collaborative scheduling method based on artificial intelligence

    CN120872528A