Scheduling method of target operating system, vehicle, equipment and medium

By automatically adjusting the configuration of the vehicle's operating system using a target configuration model, the problem of insufficient real-time performance in traditional methods is solved, achieving efficient and low-cost system configuration that is applicable to multiple operating systems.

CN121742986APending Publication Date: 2026-03-27BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-25
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies suffer from poor functionality, low performance, poor scalability, poor robustness, and high labor costs when ensuring the real-time performance of automotive operating systems. Traditional methods are difficult to support complex systems, and system configuration requires a large amount of manual analysis and adjustment.

Method used

The target configuration model is adopted. By acquiring the operating system's state data, the system generates configuration information through training using a reward function, and automatically adjusts the system configuration to meet real-time requirements. This includes inputting state data into the configuration model, outputting configuration information, and performing scheduling.

Benefits of technology

It improves the configuration efficiency of the operating system, reduces labor costs, has good scalability and robustness, and is suitable for system configuration adjustments on various operating systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121742986A_ABST
    Figure CN121742986A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a scheduling method of a target operating system, a vehicle, equipment and a medium. The method comprises the following steps: acquiring state data of the target operating system; the state data is input into a target configuration model, configuration information of the target operating system corresponding to the state data is output, and the target configuration model is used for determining the configuration information of the target operating system when the target operating system is in preset state data; and performing configuration information scheduling on the target operating system based on the configuration information. According to the embodiment of the invention, the target configuration model is adopted to quickly determine the configuration of the target operating system based on the current state data, the method can be suitable for the system configuration adjustment of various operating systems, the configuration efficiency of the target operating system is improved, the labor cost is reduced, and the target configuration model has the advantages of good expansibility and good robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle control technology, and in particular to a scheduling method for a target operating system, a vehicle, equipment, and a medium. Background Technology

[0002] Real-time performance is crucial for ensuring vehicle safety, as it ensures that the system can respond to external events in a timely and predictable manner.

[0003] Ensuring system real-time performance requires extensive design work. This necessitates developers having a clear understanding of all components within the system (including user applications) throughout their entire lifecycle, including task execution time, memory consumption, and interrupt frequency. By analyzing this information in conjunction with real-time task requirements (hard real-time, soft real-time, latency metrics, jitter metrics), complex configurations are manually derived, ensuring the system strictly adheres to these configurations for task scheduling and resource allocation.

[0004] Current methods for ensuring system real-time performance still suffer from drawbacks such as poor functionality, poor performance, low efficiency, poor scalability, poor robustness, and high labor costs. Summary of the Invention

[0005] In view of the above problems, a scheduling method, vehicle, device, and medium for a target operating system are proposed to overcome or at least partially solve the above problems, including:

[0006] A scheduling method for a target operating system, the method comprising:

[0007] Obtain the status data of the target operating system;

[0008] The state data is input into the target configuration model, and the configuration information of the target operating system corresponding to the state data is output. The target configuration model is used to determine the configuration information of the target operating system when the target operating system is in a preset state data state.

[0009] The target operating system is configured with configuration information scheduled based on the configuration information.

[0010] Optionally, the target configuration model is generated through the following steps:

[0011] Define a reward function for state data and configuration information, wherein the reward function is used to calculate the reward value when the target operating system is in any preset set of state data and configuration information;

[0012] Obtain the sample state data used to train the target configuration model and the actual configuration information corresponding to the sample state data;

[0013] The sample state data is input into the target configuration model, and the expected configuration information of the target operating system is determined in the target configuration model based on the reward value of the reward function;

[0014] The model parameters of the target configuration model are adjusted according to the expected configuration information and the actual configuration information.

[0015] Optionally, the reward function defining the state data and configuration information includes:

[0016] If the target operating system does not have a target application that times out, the reward value of the reward function is zero;

[0017] If the target operating system has a target application that times out, then the reward value of the reward function is the sum of the delay difference between the target latency and the actual latency of the target application.

[0018] If the target operating system has a target application in a crash state, then the reward value of the reward function is a preset reward threshold.

[0019] Optionally, after scheduling the target operating system based on the configuration information, the method further includes:

[0020] When a timeout response is detected in the target operating system, the resource allocation increment corresponding to the target application in the target operating system is determined.

[0021] Determine the number of applications that have not timed out in the target operating system, and determine the resource allocation reduction for the applications that have not timed out based on the number of applications and the resource allocation increment;

[0022] The configuration information of the target operating system is updated based on the resource allocation increment and the resource allocation decrement.

[0023] Optionally, updating the configuration information of the target operating system based on the resource allocation increment and the resource allocation decrement includes:

[0024] The configuration information of the target application at the current moment is increased by the resource allocation increment to obtain the configuration information of the target application at the next moment;

[0025] The configuration information of the non-timeout application at the current moment is reduced according to the resource allocation reduction to obtain the configuration information of the non-timeout application at the next moment.

[0026] A scheduling device for a target operating system, the device comprising:

[0027] The status data acquisition module is used to acquire the status data of the target operating system;

[0028] The configuration model processing module is used to input the state data into the target configuration model and output the configuration information of the target operating system corresponding to the state data. The target configuration model is used to determine the configuration information of the target operating system when the target operating system is under preset state data.

[0029] The configuration scheduling module is used to schedule configuration information for the target operating system based on the configuration information, wherein the configuration information includes the configuration of each application in the target operating system.

[0030] A configuration scheduling system includes a terminal and a cloud. The terminal is connected to the cloud. The cloud is used to train a target configuration model based on sample state data uploaded by the terminal and the actual configuration information corresponding to the sample state data, and to distribute the target configuration model to the terminal. The terminal is used to execute the scheduling method of the target operating system as described above based on the target configuration model.

[0031] Optionally, the controller includes a central processing unit and a neural network processor, wherein:

[0032] The neural network processor is used to receive the target configuration model sent from the cloud, obtain the status data of the target operating system collected by the central processing unit, input the status data into the target configuration model, output the configuration information of the target operating system corresponding to the status data, and send the configuration information to the central processing unit.

[0033] The central processing unit is used to collect the status data of the target operating system, receive the configuration information sent by the neural network processor, and perform configuration information scheduling on the target operating system based on the configuration information.

[0034] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the scheduling method of the target operating system as described above.

[0035] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the scheduling method of the target operating system as described above.

[0036] The embodiments of the present invention have the following advantages:

[0037] In this embodiment of the invention, the state data of the target operating system can be obtained; the state data is input into the target configuration model, and the configuration information of the target operating system corresponding to the state data is output. The target configuration model is used to determine the configuration information of the target operating system when the target operating system is under preset state data; the configuration information of the target operating system is scheduled based on the configuration information, thereby realizing the rapid determination of the target operating system configuration based on the current state data using the target configuration model. It can be applied to the system configuration adjustment of various operating systems, improves the configuration efficiency of the target operating system, reduces labor costs, and the target configuration model has the advantages of good scalability and robustness. Attached Figure Description

[0038] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the description of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating the steps of a scheduling method for a target operating system according to an embodiment of the present invention;

[0040] Figure 2 This is a flowchart of the steps of another scheduling method for a target operating system provided in an embodiment of the present invention;

[0041] Figure 3a This is a schematic diagram of a vehicle structure provided in an embodiment of the present invention;

[0042] Figure 3b This is a schematic diagram of another vehicle structure provided in one embodiment of the present invention;

[0043] Figure 3c This is a flowchart of a scheduling method for a target operating system provided in an embodiment of the present invention;

[0044] Figure 4 This is a schematic diagram of the structure of a scheduling device for a target operating system provided in an embodiment of the present invention. Detailed Implementation

[0045] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0046] Real-time performance is crucial for ensuring vehicle safety, as it ensures that the target operating system can respond to external events in a timely and predictable manner. Currently, the mainstream operating systems used in automotive controllers are Linux, Android, and FreeRTOS. FreeRTOS, a traditional real-time operating system, uses priority scheduling, interrupt disabling, and strict definition of task time and resource constraints to guarantee real-time performance. Linux and Android are not real-time operating systems and cannot guarantee real-time performance; however, their performance can be improved by adding patches using traditional methods similar to FreeRTOS.

[0047] The real-time performance of the vehicle under different operating systems is shown in Table 1:

[0048]

[0049] Based on Table 1, the traditional methods used in the industry to ensure system real-time performance are as follows:

[0050] Strictly implement the priority-based preemptive scheduling strategy to ensure that high-priority tasks are executed first. Use static memory allocation to avoid resource acquisition failures. Disable interrupts when executing real-time tasks to avoid unexpected delays caused by interrupt responses.

[0051] Ensuring system real-time performance using the above methods requires extensive design work. This necessitates developers having a clear understanding of all components within the system (including user applications) throughout their entire lifecycle, including task execution time, memory consumption, and interrupt frequency. By analyzing this information in conjunction with real-time task requirements (hard real-time, soft real-time, latency metrics, jitter metrics), complex configurations are manually derived, ensuring the system strictly adheres to these configurations for task scheduling and resource allocation.

[0052] However, the above methods have the following drawbacks:

[0053] (1) Poor functionality: It is difficult to support complex systems. When there are a large number of components in the system, manual analysis using traditional methods is too complicated, and any omissions or oversights will directly lead to the failure of the overall design.

[0054] (2) Poor performance and low efficiency: Compared with non-real-time systems, traditional real-time systems focus on task determinism rather than efficiency. For example, traditional real-time systems may experience problems such as high-priority tasks frequently preempting low-priority tasks and overly conservative resource allocation.

[0055] (3) Poor scalability: When a new software component is added to the system, the overall system configuration needs to be redesigned and changed accordingly. The application layer needs to be developed using a special real-time API (Application Programming Interface).

[0056] (4) Poor robustness: In the traditional approach, "strictly following the configuration" is a sufficient condition for the system's real-time performance, but not a necessary one. This is the reason for the poor robustness of the traditional approach. When an anomaly occurs that causes the system to not follow the configuration, even if there is no real-time problem, it will still lead to system errors.

[0057] (5) High labor costs: Traditional methods require development and maintenance personnel to have a deep understanding of the operating system, real-time policies and business logic, otherwise they will be unable to analyze and solve the problems that arise in the above process.

[0058] In this embodiment of the invention, a trained target configuration model can be used in the vehicle. The current state data of the vehicle is input, and the target configuration model can determine the configuration information of the target operating system under the state data based on the reward function of the state data and configuration information. Then, scheduling is performed according to the configuration information output by the target configuration model. It can be applied to the system configuration adjustment of various operating systems, improve the configuration efficiency of the target operating system, reduce labor costs, and the target configuration model has the advantages of good scalability and robustness.

[0059] Reference Figure 1 The diagram illustrates a flowchart of a scheduling method for a target operating system according to an embodiment of the present invention, which may specifically include the following steps:

[0060] Step S101: Obtain the status data of the target operating system;

[0061] The target operating system's status data may include the status data of each application (APP) within the target operating system. This status data may include, but is not limited to, any one or more of the following: CPU usage data, memory usage data, and task runtime data for each application (APP). In this embodiment of the invention, the target operating system can be the operating system of a vehicle, used to configure and schedule the various applications within the vehicle.

[0062] In practical applications, the vehicle configuration and scheduling system may include a terminal, which may include a central processing unit (CPU) and a neural network processor (NPU). The central processing unit may include multiple applications, and during vehicle operation, the status data corresponding to the multiple applications can be collected.

[0063] The applications may include, but are not limited to, applications for vehicle navigation, applications for remote vehicle control, applications for driver assistance, applications for voice interaction with the vehicle, and applications for controlling intelligent parking of the vehicle.

[0064] Step S102: Input the state data into the target configuration model and output the configuration information of the target operating system corresponding to the state data. The target configuration model is used to determine the configuration information of the target operating system when the target operating system is under the preset state data.

[0065] In this embodiment of the invention, a pre-trained target configuration model can be pre-installed in the terminal (such as a vehicle). The input data of this target configuration model is the current state data of the target operating system, and the output data is the configuration information of the target operating system. This configuration information is the configuration information corresponding to the state data, and it is used by the target operating system to perform task scheduling and resource allocation according to the configuration. Specifically, the configuration information includes the configuration of each application in the target operating system. The configuration information in this embodiment of the invention may include, but is not limited to, any one or more of the following: timeout limit information for each App in the vehicle, App priority information, App CPU allocation information, and App memory allocation information.

[0066] In practical applications, after acquiring the state data, the state data can be input into the trained target configuration model. The target configuration model calculates based on its built-in model algorithm and outputs the target operating system configuration information corresponding to the state data. This configuration information is the best application configuration that can ensure the system's real-time performance meets the preset real-time requirements.

[0067] The target configuration model has a built-in model algorithm corresponding to the reward function. The reward function can be used to calculate the instant reward value corresponding to each configuration information under any preset set of state data. That is, after determining the state data and configuration information of the vehicle application, the instant reward value can be calculated according to the reward function. Specifically, the reward function can be set according to the actual scenario.

[0068] A set of state data includes the state of each application in the target operating system. During the training of the target configuration model, multiple sets of state data and multiple configuration information can be defined, and then the reward value corresponding to each configuration information under each set of state data can be determined based on the defined state data and configuration information.

[0069] The target configuration model includes a model algorithm, which uses the immediate reward value as one model parameter. Other model parameters can also be set in the model algorithm to train the configuration model and improve the accuracy of model prediction.

[0070] In one example, the configuration information can be generated through training in the cloud. Specifically, the terminal can send its state data and corresponding configuration information as sample data to the cloud. The cloud can then train the initial model data based on the received sample data to obtain the target configuration model. This target configuration model is then sent to the terminal, which determines the configuration information corresponding to the state data according to the target configuration model.

[0071] In one embodiment of the present invention, the target configuration model is generated through the following steps:

[0072] Step S11: Define a reward function for state data and configuration information. The reward function is used to calculate the reward value when the target operating system is in any preset set of state data and configuration information.

[0073] In practical applications, the specific types of status data and configuration information can be determined in advance, and then a reward function for the status data and configuration information can be defined. The reward function is a function for calculating the reward value under specific status data and configuration information. According to the reward function, the reward value under specific status data and configuration information can be determined.

[0074] In this context, the reward value in the reward function is a numerical value used in reinforcement learning to quantify the benefit gained by an agent (i.e., the vehicle in this embodiment) after taking a specific action in a specific state. This value can be positive, negative, or zero, with the following specific meanings:

[0075] Positive reward: This indicates that the agent's actions are beneficial, align with the expected goals, or move in the direction of solving a problem. Positive rewards encourage the agent to repeat these actions in the future.

[0076] Negative reward: This indicates that the agent's actions are detrimental, potentially worsening the problem or deviating from the correct path to solving it. Negative rewards incentivize the agent to avoid these actions in the future.

[0077] Zero reward: This means that the agent's action has no direct impact on the current goal, bringing neither benefit nor harm. Zero reward is typically used for neutral situations that neither encourage nor punish.

[0078] In one embodiment of the present invention, a reward function for defining state data and configuration information is defined, including: if the target operating system does not have a target application that times out, the reward value of the reward function is zero; if the target operating system has a target application that times out, the reward value of the reward function is the sum of the delay difference between the target latency and the actual latency of the target application; if the target operating system has a target application that is in a crash state, the reward value of the reward function is a preset reward threshold.

[0079] In practical applications, when it is determined that all target applications in the target operating system do not have timeout responses, the vehicle's applications are running normally, and the real-time performance of the target operating system is good. That is, the current configuration action has no impact on the real-time performance of the applications. Therefore, in this state, the reward value of the reward function is zero.

[0080] Specifically, when the real-time status data of the target operating system application is status data, if the result of configuring according to the configuration data is that all target applications do not have timeout responses, then the reward value of the reward function corresponding to this set of status data and configuration data is zero.

[0081] If the target operating system configures the application according to the configuration data when the application's real-time state data is state data, and there are target applications with timeout responses, then the vehicle's real-time performance under the current configuration information will be affected. This allows us to determine the target latency and actual latency for each target application. The target latency is a configuration item in the configuration information, and the actual latency is a type of state data in the vehicle's state data. Furthermore, after obtaining the target latency and actual latency, we can subtract the target latency from the actual latency to calculate the latency difference: Latency Difference = Target Latency - Actual Latency. Finally, we sum the latency differences for each target application to obtain the reward value for the reward function.

[0082] Specifically, when the target latency is greater than the actual latency, the current configuration information is optimized for the target application, thus reducing latency. When the target latency is equal to the actual latency, the configuration information has no effect on the target application. When the target latency is less than the actual latency, the current configuration information results in a significant delay for the target application.

[0083] When the target operating system displays the application's real-time state data as state data, and configures according to the configuration data, if one or more applications in the target operating system crash, it indicates that the current configuration information has reached or exceeded the application's limit. Therefore, the reward value of the reward function can be set to a preset reward threshold. This reward threshold can be set according to actual scenario requirements, and no further restrictions are imposed in this embodiment of the invention.

[0084] The following is a process for defining a reward function:

[0085] (1) Define the state space: The state space includes the state data of each application of the target operating system, including the CPU usage data and memory usage data of the application.

[0086]

[0087] Among them, S t The state space represents the state data at different points in the application; Ccpu t This represents the current CPU usage at time point t; Cmem t This represents the current memory usage at time t.

[0088] (2) Define the action space: The action space includes actions such as changing the priority of the APP, changing the CPU allocation of the APP, and changing the memory allocation of the APP, which are the configuration information of the vehicle application.

[0089]

[0090] The action space can consist of three types of actions: changing the App's priority, changing the App's CPU allocation, and changing the App's memory allocation.

[0091] A t This represents the action space, which can include application configuration information at different times. (Tcpu) t The symbol Tpri represents the target CPU percentage at time point t. t This indicates the application priority at time point t; Tmem t This represents the application memory allocation at time t.

[0092] (3) Define the reward function:

[0093] R(S_{t},A_{t})=\begin{cases}r_{\text{positive}}

[0094] =0,\text{if}\text{PerformanceMetric}(S_t,A_t)\le\text{T}\\r_{

[0095] \text{nagetive}}=\sum_{i

[0096] =1}^{n}(T_i-L_i),\text{if}\text{PerformanceMetric}(s_t,A_t)

[0097] >\text{T}\end{cases}

[0098] Where r represents the reward value, L represents the actual delay, T represents the target delay, and n is the total number of apps in the system.

[0099] The reward is 0 if all apps in the operating system are problem-free. If several apps time out, the reward is the sum of (target latency - actual latency) of the timed-out apps. If an app crashes, the maximum value is taken. The maximum value is set according to the actual scenario, and no further restrictions are imposed on it in this embodiment of the invention.

[0100] For example: If the app timeout is specified to be no more than 100ms, and the actual execution time is 120ms, then the reward is 100ms - 120ms = -20ms.

[0101] Step S12: Obtain the sample state data used to train the target configuration model and the actual configuration information corresponding to the sample state data;

[0102] In practical applications, model training can be performed in the cloud to avoid the vehicle's response time being affected by excessive computation during the model training process.

[0103] The vehicle control system can upload the collected status data and corresponding configuration information to the cloud as training sample data. This configuration information can also include actual configuration settings configured by engineers based on the vehicle's current status data, effectively ensuring the real-time performance of various applications within the vehicle.

[0104] Step S13: Input the sample state data into the target configuration model, and determine the expected configuration information of the target operating system based on the reward value of the reward function in the target configuration model;

[0105] In practical applications, an initial configuration model can be constructed, which may include multiple initial model parameters, with the reward function serving as one of the model parameters.

[0106] The cloud can input sample state data into the initial configuration model, where the sample state data can be processed based on model parameters to obtain the expected configuration information of the target operating system.

[0107] In one example, the target configuration model can be trained using a Q-network according to standard CNN training methods. In a Q-network, the goal is to learn a function Q(s, a, θ), where θ are the network parameters, such that the Q-value is as close as possible to the true Q-value. The Q-network is trained by minimizing the difference between the predicted Q-value and the target Q-value. The Q-value represents the expected cumulative reward obtained by taking action A in state S and following a certain policy.

[0108] During training, the target Q-value is typically calculated using the reward function and the Q-value of the next state.

[0109] Step S14: Adjust the model parameters of the target configuration model according to the expected configuration information and the actual configuration information.

[0110] In practical applications, the model parameters of the configuration model can be adjusted based on the expected configuration information and the actual configuration information provided by the configuration model to achieve iterative training.

[0111] For example, the loss function of a Q-network is typically the mean squared error (MSE) between the predicted Q-value (calculated based on the expected configuration information) and the target Q-value (calculated with respect to the actual configuration information). By minimizing this loss function, the parameters θ of the Q-network are gradually adjusted so that the predicted Q-value is closer to the target Q-value.

[0112] In this embodiment of the invention, the Q-network estimates its Q-value by learning the immediate reward provided by the reward function and the Q-value of the next state. The reward function provides the Q-network with training signals, helping it learn how to select actions in different states to maximize cumulative rewards. The goal of the Q-network is to approximate the true Q-value function, and the reward function is a key component in calculating the target Q-value. In practical applications, the design of the reward function has a significant impact on the training effect of the Q-network and the quality of the final policy. A well-designed reward function can guide the Q-network to learn the desired behavior, while an inappropriate reward function may lead to the learning of suboptimal or unstable behaviors.

[0113] Step S103: Configure the target operating system according to the configuration information.

[0114] After obtaining the configuration information output by the target configuration model, the target operating system can use this configuration information to schedule configuration information and adjust the configuration information in real time.

[0115] In this embodiment of the invention, the state data of the target operating system can be obtained. The state data is the state data corresponding to the target operating system under the current configuration information. The state data is input into the target configuration model, and the new configuration information of the target operating system corresponding to the state data is output. The new configuration information can ensure the real-time performance of the target operating system during operation. The new configuration information can replace the original configuration information to improve the real-time performance of the target operating system. The target configuration model is used to determine the configuration information of the target operating system under the state data based on the reward function of the state data and the configuration information. The configuration information of the target operating system is scheduled based on the configuration information. Thus, the target operating system configuration is quickly determined based on the current state data of the vehicle using the target configuration model. It can be applied to the system configuration adjustment of various operating systems, improves the configuration efficiency of the target operating system, reduces labor costs, and the target configuration model has the advantages of good scalability and robustness.

[0116] Reference Figure 2 The diagram illustrates a flowchart of another scheduling method for a target operating system according to an embodiment of the present invention, which may specifically include the following steps:

[0117] Step S201: Obtain the status data of the target operating system;

[0118] Step S202: Input the state data into the target configuration model and output the configuration information of the target operating system corresponding to the state data. The target configuration model is used to determine the configuration information of the target operating system under the state data based on the reward function of the state data and the configuration information.

[0119] Step S203: Configure the target operating system according to the configuration information.

[0120] Step S204: When a target application with a timeout response is detected in the target operating system, determine the resource allocation increment corresponding to the target application in the target operating system.

[0121] After the vehicle schedules the target operating system according to the configuration information, if a timeout error is detected in the target operating system, the previous configuration information scheduling has not achieved the real-time performance of the application. Therefore, fine-tuning of the previous configuration information is required. In practical applications, the configuration information fine-tuning process can be implemented by setting a fine-tuning model. The fine-tuning model includes a preset algorithm for fine-tuning the configuration information. This preset algorithm can be set according to the actual scenario. In this embodiment of the invention, no restrictions are placed on it. The fine-tuning model in this embodiment of the invention can ensure that the fine-tuned configuration information meets the real-time requirements of all applications in the vehicle.

[0122] Specifically, the target application with a timeout response can be identified, and then the corresponding resource allocation increment for the target application can be determined based on the current state data of the vehicle's operating system. The resource allocation increment represents the amount of resources still needed to be allocated to the target application. This increment is used to reduce or eliminate latency in the target application, ensuring its real-time performance.

[0123] Step S205: Determine the number of applications that have not timed out in the target operating system, and determine the reduction of resource allocation for applications that have not timed out based on the number of applications and the resource allocation increment.

[0124] In practical applications, the total amount of resources is fixed. When the target application needs to increase the allocation of resources, it can be determined that the resources are allocated to the applications that have not yet timed out in the target operating system, and a portion of the resources are distributed according to the resource allocation increment of the target application. That is, the resource allocation is reduced for the applications that have not timed out. Specifically, the sum of the resource allocation reduction of multiple applications that have not timed out should be equal to the resource allocation increment of the target application, thereby ensuring that the total amount of resources remains unchanged.

[0125] In one example, the resource allocation reduction can be determined based on the running status of applications that have not timed out; in another example, the reduction can be evenly distributed among multiple applications that have not timed out, i.e., the reduction is evenly distributed based on the number of applications that have not timed out, and the resource allocation reduction = resource allocation increment / number of applications that have not timed out.

[0126] Step S206: Update the configuration information of the target operating system based on resource allocation increment and resource allocation decrement.

[0127] After obtaining the resource allocation increment and resource allocation decrement, the configuration information obtained from the target configuration model can be fine-tuned and updated based on the resource allocation increment and resource allocation decrement.

[0128] Specifically, the configuration information of the target application at the current moment can be increased by increasing the resource allocation according to the resource allocation increment to obtain the configuration information of the target application at the next moment; the configuration information of the application that has not timed out at the current moment can be decreased by decreasing the resource allocation according to the resource allocation decrement to obtain the configuration information of the application that has not timed out at the next moment.

[0129] In one embodiment of the present invention, configuration information can be initially determined in the configuration model, and fine-tuned according to the latency of the actual application. The fine-tuning can be performed multiple times. That is, after each fine-tuning, it is determined whether there is a target application that times out. If there is, the configuration information fine-tuning and updating continues until there is no target application that times out.

[0130] In this embodiment of the invention, a configuration model can be used to determine the configuration information corresponding to the state data, and then the configuration information can be fine-tuned when there is a target application with a timeout response.

[0131] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.

[0132] Reference Figure 3a The diagram illustrates a configuration scheduling system according to an embodiment of the present invention. The configuration scheduling system may include a terminal 301 and a cloud 302. The terminal 301 is connected to the cloud 302. The cloud 302 is used to train a target configuration model based on sample state data uploaded by the controller and the corresponding actual configuration information, and then sends the target configuration model to the terminal 301. The terminal 301 is used to execute the following target operating system scheduling method based on the target configuration model:

[0133] Acquire the state data of the target operating system; input the state data into the target configuration model, and output the configuration information of the target operating system corresponding to the state data. The target configuration model is used to determine the configuration information of the target operating system when the target operating system is under preset state data; schedule the configuration information of the target operating system based on the configuration information.

[0134] In this embodiment of the invention, the terminal is a vehicle terminal, and the target operating system is the vehicle's operating system.

[0135] Reference Figure 3a The terminal 301 in this embodiment of the invention includes a central processing unit 11 and a neural network processor 12, wherein:

[0136] The central processing unit 11 can be used to collect the status data of the target operating system, receive the configuration information sent by the neural network processor, and perform configuration information scheduling on the target operating system based on the configuration information.

[0137] The central processing unit 11 may include a data acquisition module for acquiring status data for multiple applications.

[0138] The neural network processor 12 can be used to receive the target configuration model sent from the cloud, obtain the status data of the target operating system collected by the central processing unit, input the status data into the target configuration model, output the configuration information of the target operating system corresponding to the status data, and send the configuration information to the central processing unit.

[0139] Specifically, the neural network processor 12 can be configured with a target configuration model and a fine-tuning model. The target configuration model is used to generate a baseline real-time configuration table based on information provided by the data acquisition module. The fine-tuning model is used to update the real-time configuration table when an application response timeout occurs.

[0140] Reference Figure 3b This diagram illustrates another vehicle structure according to an embodiment of the present invention. The vehicle includes a controller and can connect to the cloud. The cloud includes a cloud database and a model trainer. The cloud database can be used to store training samples and training data, and the model trainer can be used to execute the training process of the target configuration model. The controller may include a central processing unit (CPU) and a neural network processor (NPU). The NPU is configured with a real-time configuration model and a fine-tuning model. The CPU manages multiple applications. The data acquisition module in the CPU can collect the status data of each application. The database in the CPU can store the collected data layer, and the real-time configuration table contains the current configuration information of the vehicle.

[0141] Reference Figure 3c This paper illustrates a scheduling method for a target operating system provided by an embodiment of the present invention, comprising the following steps:

[0142] (1) The controller’s CPU sends system status data and real-time configuration table to the cloud.

[0143] (2) AI algorithms are built in the cloud based on system configuration information and system status data.

[0144] The state space is defined based on system state data, the action space is defined based on system configuration information, and the reward function is defined based on the state space and action time.

[0145] (3) Training configuration models based on AI algorithms.

[0146] Construct a Q-network and train the model based on the Q-network.

[0147] (4) Send the configuration model to the controller's NPU.

[0148] (5) The NPU receives system status data sent by the CPU.

[0149] (6) The NPU inputs the system status data into the configuration model, generates the corresponding configuration information, and sends the configuration information to the CPU.

[0150] (7) Fine-tuning the model receives system status data.

[0151] (8) The fine-tuning model fine-tunes the configuration information based on system status data.

[0152] Reference Figure 4 The diagram illustrates a structural schematic of a scheduling device for a target operating system according to an embodiment of the present invention, which may specifically include the following modules:

[0153] The status data acquisition module 401 is used to acquire the status data of the target operating system.

[0154] The configuration model processing module 402 is used to input the state data into the target configuration model and output the configuration information of the target operating system corresponding to the state data. The target configuration model is used to determine the configuration information of the target operating system when the target operating system is under preset state data.

[0155] The configuration scheduling module 403 is used to schedule configuration information for the target operating system based on the configuration information, wherein the configuration information includes the configuration of each application in the target operating system.

[0156] In one embodiment of the present invention, the device further includes:

[0157] The reward function definition module is used to define the reward function for state data and configuration information. The reward function is used to calculate the reward value corresponding to each type of configuration information of the target operating system under any preset set of state data.

[0158] The training sample data acquisition module is used to acquire sample state data for training the target configuration model and the actual configuration information corresponding to the sample state data;

[0159] The model training module is used to input the sample state data into the target configuration model, and determine the expected configuration information of the target operating system based on the reward value of the reward function in the target configuration model;

[0160] The parameter adjustment module is used to adjust the model parameters of the target configuration model according to the expected configuration information and the actual configuration information.

[0161] In one embodiment of the present invention, the reward function definition module includes:

[0162] The first reward value definition submodule is used to set the reward value of the reward function to zero if the target operating system does not have a target application that has a timeout response.

[0163] The second reward value definition submodule is used to define the reward value of the reward function as the sum of the delay difference between the target delay and the actual delay of the target application if the target operating system has a target application with a timeout response.

[0164] The third reward value definition submodule is used to define the reward value of the reward function as a preset reward threshold if the target operating system has a target application in a crash state.

[0165] In one embodiment of the present invention, the device may further include:

[0166] The resource allocation increment determination module is used to determine the resource allocation increment corresponding to the target application in the target operating system when a timeout response is detected in the target operating system.

[0167] The resource allocation reduction determination module is used to determine the number of applications that have not timed out in the target operating system, and to determine the resource allocation reduction of the applications that have not timed out based on the number information and the resource allocation increment.

[0168] The configuration information update module is used to update the configuration information of the target operating system based on the resource allocation increment and the resource allocation decrement.

[0169] In one embodiment of the present invention, the configuration information update module may include:

[0170] The target application configuration update submodule is used to add resource allocation to the current configuration information of the target application according to the resource allocation increment to obtain the configuration information of the target application at the next moment;

[0171] The non-timeout application configuration update submodule is used to reduce the resource allocation of the non-timeout application at the current moment according to the resource allocation reduction to obtain the configuration information of the non-timeout application at the next moment.

[0172] In this embodiment of the invention, the state data of the target operating system can be obtained; the state data is input into the target configuration model, and the configuration information of the target operating system corresponding to the state data is output, thereby determining the configuration information of the target operating system when the target operating system is under preset state data; the configuration information of the target operating system is scheduled based on the configuration information, thereby realizing the rapid determination of the target operating system configuration based on the current state data of the vehicle using the target configuration model. This can be applied to the system configuration adjustment of various operating systems, improving the configuration efficiency of the target operating system, reducing labor costs, and the target configuration model has the advantages of good scalability and robustness.

[0173] An embodiment of the present invention also provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, it implements the scheduling method of the target operating system described above.

[0174] An embodiment of the present invention also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, it implements the scheduling method of the target operating system described above.

[0175] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0176] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0177] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0178] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0179] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1The function specified in one or more boxes.

[0180] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0181] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.

[0182] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0183] The above provides a detailed description of the scheduling method, vehicle, equipment, and medium for a target operating system. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A scheduling method for a target operating system, characterized in that, The method includes: Obtain the status data of the target operating system; The state data is input into the target configuration model, and the configuration information of the target operating system corresponding to the state data is output. The target configuration model is used to determine the configuration information of the target operating system when the target operating system is in a preset state data state. The target operating system is configured with configuration information based on the configuration information, which includes the configuration of each application in the target operating system.

2. The method according to claim 1, characterized in that, The target configuration model is generated through the following steps: Define a reward function for state data and configuration information, wherein the reward function is used to calculate the reward value when the target operating system is in any preset set of state data and configuration information; Obtain the sample state data used to train the target configuration model and the actual configuration information corresponding to the sample state data; The sample state data is input into the target configuration model, and the expected configuration information of the target operating system is determined in the target configuration model based on the reward value of the reward function; The model parameters of the target configuration model are adjusted according to the expected configuration information and the actual configuration information.

3. The method according to claim 2, characterized in that, The reward function defining the state data and configuration information includes: If the target operating system does not have a target application that times out, the reward value of the reward function is zero; If the target operating system has a target application that times out, then the reward value of the reward function is the sum of the delay difference between the target latency and the actual latency of the target application. If the target operating system has a target application in a crash state, then the reward value of the reward function is a preset reward threshold.

4. The method according to any one of claims 1 to 3, characterized in that, After scheduling the configuration information of the target operating system based on the configuration information, the process further includes: When a timeout response is detected in the target operating system, the resource allocation increment corresponding to the target application in the target operating system is determined. Determine the number of applications that have not timed out in the target operating system, and determine the resource allocation reduction for the applications that have not timed out based on the number of applications and the resource allocation increment; The configuration information of the target operating system is updated based on the resource allocation increment and the resource allocation decrement.

5. The method according to claim 4, characterized in that, The step of updating the configuration information of the target operating system based on the resource allocation increment and the resource allocation decrement includes: The configuration information of the target application at the current moment is increased by the resource allocation increment to obtain the configuration information of the target application at the next moment; The configuration information of the non-timeout application at the current moment is reduced according to the resource allocation reduction to obtain the configuration information of the non-timeout application at the next moment.

6. A scheduling device for a target operating system, characterized in that, The device includes: The status data acquisition module is used to acquire the status data of the target operating system; The configuration model processing module is used to input the state data into the target configuration model and output the configuration information of the target operating system corresponding to the state data. The target configuration model is used to determine the configuration information of the target operating system when the target operating system is under preset state data. The configuration scheduling module is used to schedule configuration information for the target operating system based on the configuration information, wherein the configuration information includes the configuration of each application in the target operating system.

7. A configuration scheduling system, characterized in that, The configuration scheduling system includes a terminal and a cloud. The terminal is connected to the cloud. The cloud is used to train a target configuration model based on the sample state data uploaded by the terminal and the actual configuration information corresponding to the sample state data, and to send the target configuration model to the terminal. The terminal is used to execute the scheduling method of the target operating system as described in any one of claims 1 to 5 based on the target configuration model.

8. The system according to claim 7, characterized in that, The terminal includes a central processing unit and a neural network processor, wherein: The neural network processor is used to receive the target configuration model sent from the cloud, obtain the status data of the target operating system collected by the central processing unit, input the status data into the target configuration model, output the configuration information of the target operating system corresponding to the status data, and send the configuration information to the central processing unit. The central processing unit is used to collect the status data of the target operating system, receive the configuration information sent by the neural network processor, and perform configuration information scheduling on the target operating system based on the configuration information.

9. An electronic device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the scheduling method of the target operating system as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the scheduling method of the target operating system as described in any one of claims 1 to 5.