System resource allocation method and device, equipment, storage medium and program product
By acquiring and analyzing the real-time scenario data of the vehicle, using the load prediction model to determine the target demand value of the system resources, and dynamically allocating resources, the problem of insufficient operating system resource allocation performance in the existing technology is solved, and the system under high load conditions is realized Performance remains good.
Patent Information
- Application Number
- CN202411189551.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-28
- Publication Date
- 2024-12-27
AI Technical Summary
The prior art has the problem of poor system performance in some scenarios in the allocation of operating system resources.
By obtaining the real-time scene data of the vehicle, determine the target demand value of the system resources of the user's driving behavior in the corresponding scenarios of the real-time scene data, and dynamically allocate and schedule the system resources according to the target demand value, and use the load prediction model to train based on historical data Predict the demand value and adjust the resource allocation strategy to ensure good performance of the operating system under high load conditions.
It realizes efficient and smooth allocation of system resources, ensures that the operating system maintains good performance under high load conditions, and improves the system's dynamic scheduling capabilities.
Smart Images

Figure CN119201427A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a system resource allocation method, device, equipment, storage medium and program product. Background Art
[0002] With the rapid development of computer technology, the operating system, as a core component of the computer system, plays a vital role in the performance of the computer. For example, in the scenario of autonomous driving on urban roads, for the complex traffic environment that the vehicle has to deal with, by allocating operating system resources, it can ensure that key processes such as the perception process and the planning process have sufficient resources to quickly and accurately process relevant information.
[0003] Currently, a preset resource allocation rule is usually used to allocate operating system resources. However, in some scenarios, the allocation of operating system resources in the above manner may result in poor system performance. Summary of the invention
[0004] The purpose of the present invention is to provide a system resource allocation method, device, equipment, storage medium and program product to solve the problem of poor system performance in some scenarios when operating system resources are allocated in the current way.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is as follows:
[0006] A system resource allocation method includes: acquiring real-time scene data of a vehicle, the real-time scene data including driving data and driving environment data of the vehicle; determining a target demand value for system resources of a user's driving behavior in a scene corresponding to the real-time scene data; and allocating system resources according to the target demand value.
[0007] According to the above-mentioned technical means, based on the real-time scene data of the vehicle, the target demand value of the system resources for the user's driving behavior in the scene corresponding to the real-time scene data is determined, so that the system resources can be allocated according to the target demand value, and the system resources can be dynamically allocated and scheduled in advance to ensure that the operating system can still maintain good performance under high load conditions.
[0008] Furthermore, the target demand value for system resources of the user's driving behavior in the scenario corresponding to the real-time scenario data is determined, including: inputting the real-time scenario data into the load prediction model to obtain the target demand value output by the load prediction model, and the load prediction model is obtained by training based on the historical scenario data of sample vehicles in different scenarios.
[0009] Furthermore, the load prediction model is trained in the following manner: obtaining training samples, the training samples include historical scenario data and labels of sample vehicles in different scenarios, the historical scenario data include historical driving data and historical driving environment data of the sample vehicles, and the labels are used to represent reference demand values for system resources in different scenarios; extracting the time series feature vector corresponding to the historical scenario data; inputting the time series feature vector into the load prediction model to obtain the predicted demand value for system resources of the driving behavior of the sample user in the scenario corresponding to the historical scenario data; training the load prediction model based on the predicted demand value and the reference demand value to obtain the loss function value; adjusting the parameters of the load prediction model according to the loss function value to obtain a trained load prediction model.
[0010] Furthermore, extracting the time series feature vectors corresponding to the historical scene data includes: preprocessing the historical scene data to obtain preprocessed scene data, the preprocessing includes data cleaning processing, data standardization processing and data normalization processing; according to the preprocessed scene data, extracting the time series feature vectors corresponding to the historical scene data in chronological order.
[0011] Furthermore, the system resource allocation method also includes: obtaining multiple sets of real-time scene data of the vehicle within a preset time period before the current moment; and determining a target demand value based on a demand value corresponding to each set of real-time scene data in the multiple sets of real-time scene data.
[0012] Further, system resources are allocated according to the target demand value, including: determining the target process to which resources are to be allocated in the scenario corresponding to the real-time scenario data; adjusting the resource allocation strategy of the system resources according to the target demand value to obtain the adjusted resource allocation strategy; and allocating system resources to the target process according to the adjusted resource allocation strategy.
[0013] Furthermore, the target process includes a perception process and a planning process, and system resources are allocated to the target process according to the adjusted resource allocation strategy, including: allocating network resources, computing resources and graphics processor GPU resources to the perception process according to the adjusted resource allocation strategy, and allocating central processing unit CPU resources and memory resources to the planning process.
[0014] A system resource allocation device includes: an acquisition module for acquiring real-time scene data of a vehicle, the real-time scene data including driving data and driving environment data of the vehicle; a determination module for determining a target demand value for system resources of a user's driving behavior in a scene corresponding to the real-time scene data; and an allocation module for allocating system resources according to the target demand value.
[0015] Furthermore, the determination module is specifically used to: input real-time scenario data into a load prediction model to obtain a target demand value output by the load prediction model, and the load prediction model is obtained by training based on historical scenario data of sample vehicles in different scenarios.
[0016] Furthermore, the system resource allocation device also includes a training module, which is used to train and obtain a load prediction model in the following manner: obtaining training samples, the training samples include historical scenario data and labels of sample vehicles in different scenarios, the historical scenario data include historical driving data and historical driving environment data of the sample vehicles, and the labels are used to represent reference demand values for system resources in different scenarios; extracting the time series feature vector corresponding to the historical scenario data; inputting the time series feature vector into the load prediction model to obtain the predicted demand value for system resources of the driving behavior of the sample user in the scenario corresponding to the historical scenario data; training the load prediction model based on the predicted demand value and the reference demand value to obtain the loss function value; adjusting the parameters of the load prediction model according to the loss function value to obtain a trained load prediction model.
[0017] Furthermore, when the training module is used to extract the time series feature vectors corresponding to the historical scene data, it is specifically used for: preprocessing the historical scene data to obtain preprocessed scene data, the preprocessing includes data cleaning processing, data standardization processing and data normalization processing; according to the preprocessed scene data, extracting the time series feature vectors corresponding to the historical scene data in chronological order.
[0018] Furthermore, the determination module is also used to: obtain multiple sets of real-time scene data of the vehicle within a preset time period before the current moment; and determine the target demand value based on the demand value corresponding to each set of real-time scene data in the multiple sets of real-time scene data.
[0019] Furthermore, the allocation module is specifically used to: determine the target process to which resources are to be allocated in the scenario corresponding to the real-time scenario data; adjust the resource allocation strategy of the system resources according to the target demand value to obtain the adjusted resource allocation strategy; and allocate system resources to the target process according to the adjusted resource allocation strategy.
[0020] Furthermore, the target process includes a perception process and a planning process. When the allocation module is used to allocate system resources to the target process according to the adjusted resource allocation strategy, it is specifically used to: allocate network resources, computing resources and graphics processor GPU resources to the perception process according to the adjusted resource allocation strategy, and allocate central processing unit CPU resources and memory resources to the planning process.
[0021] An electronic device comprises: a processor, and a memory communicatively connected to the processor;
[0022] Memory stores computer-executable instructions;
[0023] The processor executes the computer-executable instructions stored in the memory to implement the system resource allocation method as described above in the present invention.
[0024] A computer-readable storage medium stores computer program instructions. When the computer program instructions are executed, the system resource allocation method of the present invention is implemented.
[0025] A computer program product includes a computer program. When the computer program is executed, the system resource allocation processing method as described above in the present invention is implemented.
[0026] Beneficial effects of the present invention: The system resource allocation method, device, equipment, storage medium and program product provided by the present invention determine the target demand value for system resources of the user's driving behavior in the scenario corresponding to the real-time scenario data according to the real-time scenario data of the vehicle; wherein the real-time scenario data includes the vehicle's driving data and driving environment data, so that system resources can be allocated according to the target demand value, and dynamic allocation and scheduling of system resources can be achieved in advance, and the allocation method of system resources is more efficient and smoother, which can ensure that the operating system can still maintain good performance under high load conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0028] Figure 1 A schematic diagram of an application scenario provided by an embodiment of the present invention;
[0029] Figure 2 A flowchart of a system resource allocation method provided by an embodiment of the present invention;
[0030] Figure 3 A flowchart of a system resource allocation method provided by another embodiment of the present invention;
[0031] Figure 4 A flow chart of a method for training a load prediction model provided by an embodiment of the present invention;
[0032] Figure 5 A schematic diagram of the structure of a system resource allocation device provided by an embodiment of the present invention;
[0033] Figure 6 A schematic diagram of the structure of a system resource allocation device provided by another embodiment of the present invention;
[0034] Figure 7 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0035] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred embodiments are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0036] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0037] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0038] With the rapid development of computer technology, the operating system, as a core component of the computer system, plays a vital role in the performance of the computer. For example, in the scenario of autonomous driving on urban roads, for the complex traffic environment that the vehicle has to deal with, such as pedestrians, other vehicles or traffic signals, by allocating operating system resources, it can ensure that key processes such as the perception process and the planning process have enough resources to quickly and accurately process relevant information.
[0039] At present, preset resource allocation rules are usually used to allocate operating system resources. However, in some scenarios, the allocation of operating system resources in the above manner has the problem of poor system performance. Therefore, it is of great practical significance to study a more efficient and smoother operating system resource allocation scheme.
[0040] In view of the above problems, the present invention provides a system resource allocation method, which is based on the historical scene data of the vehicle, through continuous learning of data such as user driving behavior and system resource usage status, for the real-time scene data of the vehicle obtained, the target demand value of the system resources for the user's driving behavior in the scene corresponding to the real-time scene data is determined according to the real-time scene data, and the system resources are allocated according to the target demand value. The system resources can be dynamically allocated and scheduled in advance to ensure that the operating system can still maintain good performance under high load conditions.
[0041] In the following, the application scenario of the solution provided by the present invention is firstly described by way of example.
[0042] Figure 1 Schematic diagram of an application scenario provided by an embodiment of the present invention. Figure 1 As shown, in this application scenario, the user uses the automatic driving mode to let the vehicle 101 maintain a speed of 80 kilometers per hour (i.e., km / h) on the highway. The vehicle 101 obtains the real-time scene data of the vehicle, determines the target demand value of the system resources for the user's driving behavior in the scene corresponding to the real-time scene data, and allocates the system resources according to the target demand value.
[0043] It should be noted that Figure 1 This is only a schematic diagram of an application scenario provided by an embodiment of the present invention. Figure 1 does not limit the equipment included in Figure 1 The positional relationship between the devices is limited.
[0044] The technical solution of the present invention is described in detail below through specific embodiments. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0045] Figure 2 This is a flow chart of a system resource allocation method provided by an embodiment of the present invention. The system resource allocation method may be executed by software and / or hardware devices. For example, the hardware device may be a system resource allocation device, and the system resource allocation device may be an electronic device or a processing chip in the electronic device. Figure 2 As shown, the method of the embodiment of the present invention includes:
[0046] S201. Acquire real-time scene data of a vehicle, where the real-time scene data includes driving data and driving environment data of the vehicle.
[0047] In the embodiment of the present invention, the driving data of the vehicle includes, for example, the vehicle speed and body acceleration, etc.; the driving environment data of the vehicle includes, for example, road condition information, weather conditions, and ambient temperature, etc. For example, the real-time scene data of the vehicle can be obtained through sensors, cameras, etc. on the vehicle.
[0048] S202: Determine a target demand value for system resources of the user's driving behavior in a scenario corresponding to the real-time scenario data.
[0049] Exemplarily, system resources include, for example, central processing unit (CPU) resources, memory resources, network resources, computing resources, and graphics processing unit (GPU) resources, and the target demand value for system resources includes, for example, the target demand value for CPU resources. The embodiments of the present invention do not limit specific system resources. The scenarios corresponding to the real-time scene data include, for example, autonomous driving scenarios on highway sections and autonomous driving scenarios on congested sections. The embodiments of the present invention do not limit the scenarios corresponding to the real-time scene data.
[0050] In this step, after the real-time scene data of the vehicle is obtained, the target demand value of the system resources for the user's driving behavior in the scene corresponding to the real-time scene data can be determined according to the real-time scene data of the vehicle. Among them, the driving behavior includes, for example, automatic driving or cruise control. For example, assuming that the acquired real-time scene data of the vehicle includes that the speed of the vehicle is continuously maintained at 80km / h and the vehicle is driving on a highway, and the user's driving behavior is automatic driving, then it can be determined that the scene corresponding to the real-time scene data is a highway section automatic driving scene, that is, the scene is a highway section scene where the user has frequently used automatic driving in the past. Therefore, the target demand value of the system resources for the user's driving behavior in the highway section automatic driving scene can be determined. For how to determine the target demand value of the system resources for the user's driving behavior in the scene corresponding to the real-time scene data, please refer to the subsequent embodiments.
[0051] Optionally, in order to improve the accuracy of the target demand value for system resources, the system resource allocation method provided in an embodiment of the present invention may also include: obtaining multiple sets of real-time scene data of vehicles within a preset time period before the current moment; determining the target demand value based on the demand value corresponding to each set of real-time scene data in the multiple sets of real-time scene data.
[0052] Exemplarily, the preset duration is, for example, 1 minute, and the embodiment of the present invention does not limit the preset duration. Multiple sets of real-time scene data of the vehicle within 1 minute before the current moment can be obtained, and for each set of real-time scene data in the multiple sets of real-time scene data, the demand value of the system resources for the user's driving behavior in the scene corresponding to the real-time scene data can be determined. Assuming that the demand value corresponding to each set of real-time scene data in the multiple sets of real-time scene data is the same, the target demand value can be determined to be the demand value corresponding to each set of real-time scene data in the multiple sets of real-time scene data.
[0053] S203: Allocate system resources according to the target demand value.
[0054] It can be understood that the usage of system resources can be monitored in real time to provide a data basis for system resource allocation. The corresponding performance monitoring indicators include, for example, monitoring system-level indicators and monitoring process-level indicators, wherein the monitoring system-level indicators include, for example, the utilization rate of CPU resources, the size of memory resource usage, disk input / output (I / O) and network delay, etc.; the monitoring process-level indicators include, for example, the utilization rate of CPU resources of the process, the size of memory resource usage and the number of disk I / O operations, etc. In this step, after determining the target demand value for system resources, the system resources can be allocated according to the target demand value and the current usage of system resources. For example, for the target process in the corresponding scene of the real-time scene data, the utilization rate of the CPU resources corresponding to the target process can be adjusted to the target demand value for the CPU resources, and the size of the memory space corresponding to the target process can be adjusted to the target demand value for the memory resources. For how to allocate system resources according to the target demand value, please refer to the subsequent embodiments.
[0055] Optionally, after determining the target demand value for system resources, the duration corresponding to the target demand value may also be obtained. For example, the duration corresponding to the target demand value may be obtained from a map of the vehicle, or the duration corresponding to the target demand value may be obtained based on historical scene data of the vehicle, thereby predicting the changing trend of the system load within a period of time in the future (i.e., within the duration).
[0056] The system resource allocation method provided in the embodiment of the present invention determines the target demand value for system resources of the user's driving behavior in the scenario corresponding to the real-time scenario data according to the real-time scenario data of the vehicle; wherein the real-time scenario data includes the vehicle's driving data and driving environment data, so that system resources can be allocated according to the target demand value, and dynamic allocation and scheduling of system resources can be achieved in advance, and the allocation method of system resources is more efficient and smoother, which can ensure that the operating system can still maintain good performance under high load conditions.
[0057] Figure 3FIG. 1 is a flow chart of a system resource allocation method provided by another embodiment of the present invention. Based on the above embodiment, the embodiment of the present invention further illustrates the system resource allocation method. Figure 3 As shown, the method of the embodiment of the present invention may include:
[0058] S301. Acquire real-time scene data of a vehicle, where the real-time scene data includes driving data and driving environment data of the vehicle.
[0059] The detailed description of this step can be found in Figure 2 The relevant description of S201 in the illustrated embodiment will not be repeated here.
[0060] In the embodiment of the present invention, Figure 2 The step S202 may further include the following step S302:
[0061] S302. Input the real-time scenario data into the load prediction model, and obtain the target demand value of the system resources for the user's driving behavior in the scenario corresponding to the real-time scenario data output by the load prediction model. The load prediction model is trained based on the historical scenario data of sample vehicles in different scenarios.
[0062] It can be understood that a load prediction model can be built based on an adaptive learning mechanism. The load prediction model uses machine learning to analyze the historical scene data of sample vehicles collected before the current moment in different scenes to mine the user's usage habits and needs. Based on the data analysis results, the load prediction model is trained to predict the user's future operations and needs.
[0063] In this step, illustratively, the load prediction model is, for example, a recurrent neural network model, and the load prediction model is obtained by training based on historical scene data of sample vehicles in different scenes. For specific information on how to train and obtain the load prediction model, please refer to the subsequent embodiments, which will not be described here. After obtaining the real-time scene data of the vehicle, the real-time scene data can be input into the load prediction model, and through the adaptive ability of the load prediction model, the target demand value for system resources of the user's driving behavior in the scene corresponding to the real-time scene data can be obtained in real time and intelligently.
[0064] In the embodiment of the present invention, Figure 2 The step S203 may further include the following three steps S303 to S305:
[0065] S303: Determine the target process to which resources are to be allocated in the scenario corresponding to the real-time scenario data.
[0066] For example, assuming that the real-time scene data of the vehicle obtained includes that the vehicle speed is continuously maintained at 80km / h and the vehicle is driving on a highway, and the user's driving behavior is autonomous driving, then it can be determined that the scene corresponding to the real-time scene data is an autonomous driving scene on a highway, and thus the target process of the resources to be allocated in the scene corresponding to the real-time scene data can be determined, and the target process includes, for example, a perception process and a planning process.
[0067] S304: Adjust the resource allocation strategy of the system resources according to the target demand value to obtain an adjusted resource allocation strategy.
[0068] Exemplarily, the resource allocation strategy of the system resources is used to determine the system resources corresponding to different processes, so as to more reasonably dynamically allocate system resources and improve the performance of the operating system. The resource allocation strategy of the system resources can be adjusted according to the target demand value to obtain the adjusted resource allocation strategy.
[0069] S305: Allocate system resources to the target process according to the adjusted resource allocation strategy.
[0070] In this step, after the adjusted resource allocation strategy is obtained, system resources can be allocated to the target process to which resources are to be allocated in the scenario corresponding to the real-time scenario data according to the adjusted resource allocation strategy.
[0071] Furthermore, the target process includes a perception process and a planning process, and allocating system resources to the target process according to the adjusted resource allocation strategy may include: allocating network resources, computing resources and GPU resources to the perception process according to the adjusted resource allocation strategy, and allocating CPU resources and memory resources to the planning process.
[0072] For example, assuming that the scene corresponding to the real-time scene data is determined to be an autonomous driving scene on a highway according to the real-time scene data of the vehicle, the resources corresponding to the perception process and the planning process of the vehicle can be allocated in advance according to the target demand value. For example, more data transmission bandwidth (i.e., network resources), computing resources, and GPU resources are allocated to the perception process to accelerate the image recognition and object detection process. More CPU resources are allocated to the planning process to generate future paths and actions, and more memory resources are allocated to the planning process to store map data, traffic rules, and planning results.
[0073] The system resource allocation method provided by the embodiment of the present invention inputs real-time scene data into a load prediction model to obtain the target demand value of the system resources for the user's driving behavior in the scene corresponding to the real-time scene data output by the load prediction model; wherein the load prediction model is obtained by training based on the historical scene data of sample vehicles in different scenes, so that the resource allocation strategy of the system resources can be adjusted according to the target demand value, and the system resources are allocated to the target process according to the adjusted resource allocation strategy, so as to realize the dynamic allocation and scheduling of the system resources in advance, and ensure that the operating system can still maintain good performance under high load conditions. By continuously optimizing the resource allocation strategy, the system performance and fluency can be effectively improved.
[0074] Based on the above embodiments, Figure 4 Flow chart of a method for training a load prediction model provided by an embodiment of the present invention. Figure 4 As shown, the method of the embodiment of the present invention includes:
[0075] S401. Obtain training samples, where the training samples include historical scenario data and labels of sample vehicles in different scenarios. The historical scenario data includes historical driving data and historical driving environment data of the sample vehicles. The labels are used to represent reference demand values for system resources in different scenarios.
[0076] In this step, the historical driving data of the vehicle includes, for example, the vehicle speed and body acceleration; the historical driving environment data of the vehicle includes, for example, road condition information, weather conditions, and ambient temperature. It can be understood that the load prediction model uses machine learning to analyze the historical scene data of sample vehicles collected before the current moment in different scenes to explore the user's usage habits and needs. For example, D = {(x k ,y k )} N k=1 The historical scene data and labels of sample vehicles in different scenarios are collected in a way of, where D represents a set of N training samples, each sample is a tuple (x k ,y k ), where x k The input features of the kth training sample, i.e., the time series feature vector corresponding to the historical scene data, include, for example, vehicle speed, road condition information, ambient temperature, etc. For how to extract the time series feature vector corresponding to the historical scene data, refer to step S402. k is the output label of the kth training sample, representing the k Related system load data, such as CPU resource usage, memory resource usage, etc. Data set D is the information source of the load prediction model, which acquires the ability to predict future system load change trends by learning these data.
[0077] S402: Extracting time series feature vectors corresponding to historical scene data.
[0078] In this step, after the training samples are obtained, the time series feature vectors corresponding to different historical scene data in the training samples can be extracted.
[0079] Furthermore, extracting the time series feature vectors corresponding to the historical scene data may include: preprocessing the historical scene data to obtain preprocessed scene data, the preprocessing including data cleaning processing, data standardization processing and data normalization processing; and extracting the time series feature vectors corresponding to the historical scene data in chronological order based on the preprocessed scene data.
[0080] Exemplarily, the historical scene data is cleaned, standardized and normalized, and the historical scene data is linearly mapped to data in the interval [0,1], thereby obtaining the preprocessed scene data. Based on the preprocessed scene data, a time series feature vector including time series features and historical scene data features is constructed. The time series feature vector is represented by f t =[f t 1 ,f t 2 ,...,f t m ] represents, where m represents the total number of features corresponding to the historical driving data and historical driving environment data of the sample vehicles included in the historical scene data.
[0081] S403: Input the time series feature vector into the load prediction model to obtain the predicted demand value of the system resources for the driving behavior of the sample user in the scenario corresponding to the historical scenario data.
[0082] In this step, after extracting the time series feature vector corresponding to the historical scene data, the time series feature vector can be input into the load prediction model to obtain the predicted demand value for system resources of the driving behavior of the sample user in the scene corresponding to the historical scene data.
[0083] S404: Train the load prediction model based on the predicted demand value and the reference demand value to obtain a loss function value.
[0084] In this step, the labels included in the training samples are used to represent the reference demand values for system resources in different scenarios. After obtaining the predicted demand values for system resources output by the load prediction model, the loss function value can be obtained according to the predicted demand values and the reference demand values. The loss function is, for example, a cross entropy loss function.
[0085] S405. According to the loss function value, adjust the parameters of the load prediction model to obtain a trained load prediction model.
[0086] For example, after obtaining the loss function value, the parameters of the load prediction model can be adjusted based on the loss function value through the gradient back propagation algorithm to obtain a trained load prediction model. The trained load prediction model can be understood as the parameters learned in the process of training the load prediction model are constructed into a load prediction function F(X) that can be used for real-time prediction. t ,H t ). Among them, X t Represents the real-time scene data at the current moment; H t It represents the hidden state of the load prediction model at time t, that is, the target demand value for system resources. The trained load prediction model can be used to perform real-time predictions and output the target demand value for system resources in the future.
[0087] The training method of the load prediction model provided in the embodiment of the present invention obtains training samples, the training samples include historical scene data and labels of sample vehicles in different scenes, trains the load prediction model based on the training samples, and obtains the loss function value; according to the loss function value, adjusts the parameters of the load prediction model to obtain the trained load prediction model. The load prediction model obtained by training can accurately output the target demand value of the user's driving behavior for system resources in the scene corresponding to the real-time scene data, so that the system resources can be dynamically allocated according to the target demand value, ensuring that the operating system can still maintain good performance under high load conditions.
[0088] The following are embodiments of the device of the present invention, which can be used to implement the method embodiments of the present invention. For details not disclosed in the device embodiments of the present invention, please refer to the method embodiments of the present invention.
[0089] Figure 5 A schematic diagram of the structure of a system resource allocation device provided by an embodiment of the present invention is shown in FIG. Figure 5 As shown, the system resource allocation device 500 of the embodiment of the present invention includes: an acquisition module 501, a determination module 502 and an allocation module 503. Among them:
[0090] The acquisition module 501 is used to acquire real-time scene data of the vehicle, where the real-time scene data includes the driving data and driving environment data of the vehicle.
[0091] The determination module 502 is used to determine the target demand value of the system resources for the user's driving behavior in the scene corresponding to the real-time scene data.
[0092] The allocation module 503 is used to allocate system resources according to the target demand value.
[0093] Furthermore, the determination module 502 may be specifically used to: input the real-time scenario data into the load prediction model to obtain the target demand value output by the load prediction model, where the load prediction model is trained based on the historical scenario data of sample vehicles in different scenarios.
[0094] Furthermore, the system resource allocation device 500 may also include a training module (not shown in the figure), which is used to train and obtain a load prediction model in the following manner: obtaining training samples, the training samples include historical scenario data and labels of sample vehicles in different scenarios, the historical scenario data include historical driving data and historical driving environment data of the sample vehicles, and the labels are used to represent reference demand values for system resources in different scenarios; extracting the time series feature vector corresponding to the historical scenario data; inputting the time series feature vector into the load prediction model to obtain the predicted demand value for system resources of the driving behavior of the sample user in the scenario corresponding to the historical scenario data; training the load prediction model based on the predicted demand value and the reference demand value to obtain the loss function value; adjusting the parameters of the load prediction model according to the loss function value to obtain a trained load prediction model.
[0095] Furthermore, when the training module is used to extract the time series feature vectors corresponding to the historical scene data, it is specifically used for: preprocessing the historical scene data to obtain preprocessed scene data, the preprocessing includes data cleaning processing, data standardization processing and data normalization processing; according to the preprocessed scene data, extracting the time series feature vectors corresponding to the historical scene data in chronological order.
[0096] Furthermore, the determination module 502 can also be used to: obtain multiple sets of real-time scene data of the vehicle within a preset time period before the current moment; and determine the target demand value according to the demand value corresponding to each set of real-time scene data in the multiple sets of real-time scene data.
[0097] Furthermore, the allocation module 503 can be specifically used to: determine the target process to which resources are to be allocated in the scenario corresponding to the real-time scenario data; adjust the resource allocation strategy of the system resources according to the target demand value to obtain the adjusted resource allocation strategy; and allocate system resources to the target process according to the adjusted resource allocation strategy.
[0098] Furthermore, the target process includes a perception process and a planning process. When the allocation module 503 is used to allocate system resources to the target process according to the adjusted resource allocation strategy, it can be specifically used to: allocate network resources, computing resources and GPU resources to the perception process according to the adjusted resource allocation strategy, and allocate CPU resources and memory resources to the planning process.
[0099] The device of the embodiment of the present invention can be used to execute the technical solution of any of the above-mentioned method embodiments. Its implementation principle and technical effects are similar and will not be repeated here.
[0100] Figure 6 A schematic diagram of the structure of a system resource allocation device provided by another embodiment of the present invention is shown in FIG. Figure 6 As shown, the system resource allocation device 600 of the embodiment of the present invention includes: an adaptive learning module 601, an intelligent resource monitor 602 and a prediction scheduling management module 603. Among them:
[0101] The adaptive learning module 601 is constructed based on artificial intelligence and is used to analyze the historical scene data of sample vehicles collected before the current moment in different scenes by machine learning to mine the user's usage habits and needs. Based on the data analysis results, the load prediction model is trained to predict the user's future operations and needs.
[0102] The intelligent resource monitor 602 is used to monitor the system resource usage in real time, including the CPU resource usage rate, memory resource usage size, disk I / O and network resources, etc.
[0103] The prediction and scheduling management module 603 is used to predict the changing trend of the system load in the future based on the real-time scene data of the vehicle, the current system load situation and the load prediction model; according to the prediction results, resources are allocated and scheduled in advance to ensure that the system can still maintain good performance under high load conditions; deep learning technology, such as recurrent neural networks, is used to intelligently adjust resource allocation strategies in real time through the adaptive ability of neural networks, such as dynamically allocating CPU resources, the space size of memory resources and disk bandwidth (i.e., network resources).
[0104] The device of the present invention can be used to execute the technical solution of any of the above-mentioned method embodiments, and its implementation principle and technical effects are similar, which will not be repeated here.
[0105] Figure 7 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 7 As shown, the electronic device 700 may include: at least one processor 701 and a memory 702 .
[0106] The memory 702 is used to store programs. Specifically, the programs may include program codes, and the program codes include computer-executable instructions.
[0107] The memory 702 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0108] The processor 701 is used to execute the computer-executable instructions stored in the memory 702 to implement the system resource allocation method described in the aforementioned method embodiment. The processor 701 may be a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiment of the present invention. Specifically, when implementing the system resource allocation method described in the aforementioned method embodiment, the electronic device may be, for example, an electronic control unit on a vehicle or other electronic device with processing functions.
[0109] Optionally, the electronic device 700 may further include a communication interface 703. In a specific implementation, if the communication interface 703, the memory 702 and the processor 701 are implemented independently, the communication interface 703, the memory 702 and the processor 701 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.
[0110] Optionally, in a specific implementation, if the communication interface 703, the memory 702 and the processor 701 are integrated on a chip, the communication interface 703, the memory 702 and the processor 701 can communicate through an internal interface.
[0111] The present invention also provides a computer-readable storage medium, in which computer program instructions are stored. When a processor executes the computer program instructions, the above-mentioned system resource allocation method is implemented.
[0112] The present invention also provides a computer program product, including a computer program, which implements the above system resource allocation method when executed by a processor.
[0113] The computer-readable storage medium mentioned above can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0114] An exemplary readable storage medium is coupled to the processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in a dedicated integrated circuit. Of course, the processor and the readable storage medium can also exist as discrete components in the system resource allocation device.
[0115] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0116] Finally, it should be noted that the above embodiments are only preferred embodiments for fully illustrating the present invention, and the protection scope of the present invention is not limited thereto. Any equivalent substitution or change made by a person skilled in the art based on the present invention is within the protection scope of the present invention.
Claims
1. A system resource allocation method, characterized in that: include: Acquiring real-time scene data of a vehicle, wherein the real-time scene data includes driving data and driving environment data of the vehicle; Determine a target demand value for system resources of the user's driving behavior in the scenario corresponding to the real-time scenario data; System resources are allocated according to the target demand value.
2. The system resource allocation method according to claim 1, characterized in that: The determining of a target demand value of system resources for the user's driving behavior in the scenario corresponding to the real-time scenario data includes: The real-time scenario data is input into a load prediction model to obtain the target demand value output by the load prediction model, wherein the load prediction model is obtained by training based on historical scenario data of sample vehicles in different scenarios.
3. The system resource allocation method according to claim 2, characterized in that: The load prediction model is trained in the following way: Acquire training samples, wherein the training samples include historical scene data and labels of sample vehicles in different scenes, wherein the historical scene data includes historical driving data and historical driving environment data of the sample vehicles, and the labels are used to represent reference demand values for system resources in the different scenes; Extracting a time series feature vector corresponding to the historical scene data; Inputting the time series feature vector into a load prediction model to obtain a predicted demand value for system resources of a sample user's driving behavior in a scenario corresponding to the historical scenario data; Training a load prediction model based on the predicted demand value and the reference demand value to obtain a loss function value; According to the loss function value, the parameters of the load prediction model are adjusted to obtain a trained load prediction model.
4. The system resource allocation method according to claim 3, characterized in that: The extracting the time series feature vector corresponding to the historical scene data includes: Preprocessing the historical scene data to obtain preprocessed scene data, wherein the preprocessing includes data cleaning processing, data standardization processing and data normalization processing; According to the preprocessed scene data, the time series feature vector corresponding to the historical scene data is extracted in chronological order.
5. The system resource allocation method according to any one of claims 1 to 4, characterized in that: Also includes: Acquire multiple sets of real-time scene data of the vehicle within a preset time period before the current moment; The target demand value is determined according to the demand value corresponding to each set of real-time scene data in the multiple sets of real-time scene data.
6. The system resource allocation method according to any one of claims 1 to 4, characterized in that: The allocating system resources according to the target demand value comprises: Determine the target process of resources to be allocated in the scenario corresponding to the real-time scenario data; Adjusting the resource allocation strategy of the system resources according to the target demand value to obtain an adjusted resource allocation strategy; System resources are allocated to the target process according to the adjusted resource allocation policy.
7. The system resource allocation method according to claim 6, characterized in that: The target process includes a perception process and a planning process, and allocating system resources to the target process according to the adjusted resource allocation strategy includes: According to the adjusted resource allocation strategy, network resources, computing resources and graphics processor GPU resources are allocated to the perception process, and central processing unit CPU resources and memory resources are allocated to the planning process.
8. A system resource allocation device, characterized in that: include: An acquisition module, used to acquire real-time scene data of a vehicle, wherein the real-time scene data includes driving data and driving environment data of the vehicle; A determination module, used to determine a target demand value of system resources for the user's driving behavior in the scenario corresponding to the real-time scenario data; An allocation module is used to allocate system resources according to the target demand value.
9. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the system resource allocation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed, the system resource allocation method according to any one of claims 1 to 7 is implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed, the system resource allocation method according to any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Vehicle dual-system resource allocation method and device, vehicle, medium and product
CN120743551A