Performance optimization method and device for automatic driving system, equipment and medium
By introducing a status management submodule into the autonomous driving system, and adjusting the resource usage strategy according to resource consumption warning notifications, the problem of excessive system resource occupancy is solved and system performance and user experience are improved.
Patent Information
- Application Number
- CN202411382083.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-01-03
AI Technical Summary
The resource occupancy rate in the autonomous driving system is instantly high, resulting in functional lag and user experience affected. How to improve the performance of the autonomous driving system.
By introducing a status management submodule in the autonomous driving system, including the system performance monitoring submodule and the processing submodule, obtain resource consumption warning notifications, and adjust CPU usage, CPU migration times and IO operations according to preset policies, and take process shutdown , thread stop, thread ligation, and reducing process log levels are regulated.
Effectively reduce the target resource load, improve the performance of the autonomous driving system, avoid functional lags, and improve user experience.
Smart Images

Figure CN119248500A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to an autonomous driving system performance optimization method, device, equipment and medium. Background Art
[0002] Currently, the system resources occupied by various applications running on autonomous driving chips change dynamically, which may cause the overall resource utilization to be instantly extremely high at a specific moment and may affect the system behavior performance. For example, if the CPU (Central Processing Unit) utilization is too high or the system IO (Input / Output) is too high, it may cause function jams or even abnormalities, affecting the user experience.
[0003] In summary, how to improve the performance of autonomous driving systems is an urgent problem that needs to be solved. Summary of the invention
[0004] In view of this, the object of the present invention is to provide a method, device, equipment and medium for optimizing the performance of an autonomous driving system, which can improve the performance of the autonomous driving system. The specific scheme is as follows:
[0005] In a first aspect, the present application discloses a method for optimizing the performance of an autonomous driving system, which is applied to a state management submodule of an optimization module, wherein the optimization module further includes a system performance monitoring submodule and a processing submodule, including:
[0006] Obtaining a resource consumption warning notification for a target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes a CPU usage rate, a CPU migration number, and an IO operation number;
[0007] Determine a target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and process log level reduction;
[0008] The target optimization strategy is sent to a processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy.
[0009] Wherein, the processing submodule includes an execution management module, and the execution management module includes a process core binding management module; the target resource load corresponding to the resource consumption warning notification is the CPU usage rate;
[0010] Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes:
[0011] The target optimization strategy is sent to the execution management module so that the execution management module can close the parking process in the driving state or close the driving process in the parking state based on the target optimization strategy through the process switch management module to reduce the CPU usage in the automatic driving system.
[0012] Wherein, the processing submodule includes a communication management module;
[0013] Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes:
[0014] The target optimization strategy is sent to the communication management module so that the communication management module stops the transmission of low priority messages based on the target optimization strategy to reduce the CPU usage in the autonomous driving system.
[0015] Wherein, the processing submodule includes a health management module;
[0016] Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes:
[0017] The target optimization strategy is sent to the health management module so that the health management module stops the health status monitoring of the autonomous driving system based on the target optimization strategy to reduce the CPU usage in the autonomous driving system.
[0018] The processing submodule includes an execution management module, and the execution management module includes a process core binding management module; the target resource load corresponding to the resource consumption warning notification is the number of CPU migrations;
[0019] Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes:
[0020] The target optimization strategy is sent to the execution management module, so that the execution management module binds the corresponding thread to the core through the process core binding management module based on the processing strategy to reduce the number of CPU migrations.
[0021] Wherein, the processing submodule includes an execution management module, the execution management module includes a process switch management module, the optimization module also includes a process log management module corresponding to each process, and the target resource load corresponding to the resource consumption warning notification is the number of IO operations;
[0022] Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes:
[0023] The target optimization strategy is sent to the execution management module so that the execution management module sends a process log level reduction instruction to each process log management module through the process switch management module based on the target optimization strategy, so that the process log management module reduces the process log level of each process based on the process log level reduction instruction to reduce the number of IO operations.
[0024] The processing submodule includes an execution management module and a thread scheduling module corresponding to each process, and the execution management module includes a process scheduling management module; the target resource load corresponding to the resource consumption warning notification is the CPU usage rate;
[0025] Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes:
[0026] The target optimization strategy is sent to the execution management module so that the execution management module sends an execution stop command for a specific thread to the thread scheduling module of the process corresponding to the specific thread through the process scheduling management module, so that the thread scheduling module stops executing the specific thread based on the execution stop command; the specific thread is a thread that is only applicable to the parking state in the parking process when the vehicle is in the driving state, or a thread that is only applicable to the driving state in the driving process when the vehicle is in the parking state.
[0027] In a second aspect, the present application discloses an automatic driving system performance optimization device, which is applied to a state management submodule of an optimization module, wherein the optimization module further includes a system performance monitoring submodule and a processing submodule, and the device includes:
[0028] A notification acquisition module, used to obtain a resource consumption warning notification for a target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes a CPU usage rate, a CPU migration number, and an IO operation number;
[0029] A strategy determination module, used to determine a target optimization strategy corresponding to the resource consumption warning notification from various resource optimization strategies that are preset and correspond to each of the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and process log level reduction;
[0030] The control module is used to send the target optimization strategy to the processing submodule so that the processing submodule can regulate the target resource load in the automatic driving system based on the target optimization strategy.
[0031] In a third aspect, the present application discloses an electronic device, comprising:
[0032] Memory, used to store computer programs;
[0033] A processor is used to execute the computer program to implement the aforementioned disclosed method for optimizing the performance of the autonomous driving system.
[0034] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed method for optimizing the performance of an autonomous driving system is implemented.
[0035] It can be seen that the present application obtains the resource consumption warning notification for the target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes CPU usage, CPU migration times and IO operation times; the target optimization strategy corresponding to the resource consumption warning notification is determined from the pre-set resource optimization strategies corresponding to each of the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and lowering the process log level; the target optimization strategy is sent to the processing submodule so that the processing submodule can regulate the target resource load in the autonomous driving system based on the target optimization strategy. It can be seen that the present application sets different resource regulation methods according to the resource consumption of different target resource loads, so as to reduce the target resources in a targeted manner and improve the performance of the autonomous driving system. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0037] Figure 1 A flow chart of a method for optimizing the performance of an autonomous driving system disclosed in this application;
[0038] Figure 2 A flowchart of a specific automatic driving system performance optimization method disclosed in this application;
[0039] Figure 3 A flowchart of a specific automatic driving system performance optimization method disclosed in this application;
[0040] Figure 4 A flowchart of a specific automatic driving system performance optimization method disclosed in this application;
[0041] Figure 5 A schematic diagram of an automatic driving system performance optimization process disclosed in this application;
[0042] Figure 6 This is a schematic diagram of the structure of an automatic driving system performance optimization device disclosed in this application;
[0043] Figure 7 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0045] Currently, the system resources occupied by various applications running on autonomous driving chips change dynamically, which may cause the overall resource utilization to be instantly extremely high at a specific moment and may affect the system behavior performance. For example, if the CPU utilization rate is too high or the system IO is too high, it may cause function jams or even abnormalities, affecting the user experience.
[0046] To this end, an embodiment of the present application proposes an autonomous driving system performance optimization solution that can improve the performance of the autonomous driving system.
[0047] The present application embodiment discloses a method for optimizing the performance of an autonomous driving system, which is applied to a state management submodule of an optimization module, wherein the optimization module further includes a system performance monitoring submodule and a processing submodule. Figure 1 As shown, the method includes:
[0048] Step S11: Obtain a resource consumption warning notification for a target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes CPU usage, CPU migration times, and IO operation times.
[0049] In this embodiment, the autonomous driving system performance optimization method can be applied to an autonomous driving system performance optimization system, which includes a system performance monitoring module, a status management module, an execution management module, a communication management module, system processes and threads, and a health management module.
[0050] In this embodiment, the system performance monitoring module can set components such as idle CPU monitoring, CPU migration monitoring, and disk IO operation monitoring to monitor the CPU, CPU migration, disk IO operations, etc., so as to determine the target resource load through monitoring, and obtain a resource consumption warning notification for the target resource load in the autonomous driving system, and send it to the status management module so that the subsequent status management module can determine the target optimization strategy corresponding to the resource consumption warning notification.
[0051] Step S12: Determine the target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and process log level reduction.
[0052] In this embodiment, the target optimization strategies corresponding to different resource consumption warning notifications are generally different, and are not specifically set here.
[0053] In this embodiment, after the state management module determines the target optimization strategy, it will send the target optimization strategy to the corresponding module (execution management module or communication management module or health management module) so that the corresponding module will subsequently send instructions to the system process and thread to implement the step of sending the target optimization strategy to the processing sub-module, so that the processing sub-module can regulate the target resource load in the autonomous driving system based on the target optimization strategy.
[0054] Step S13: Send the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy.
[0055] In this embodiment, the determination of the target resource load also requires thresholds (CPU usage threshold, CPU migration number threshold and IO operation number threshold), and the thresholds and the settings of the aforementioned target optimization strategies are pre-defined by the user in a json file format.
[0056] It can be seen that the present application obtains the resource consumption warning notification for the target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes CPU usage, CPU migration times and IO operation times; the target optimization strategy corresponding to the resource consumption warning notification is determined from the pre-set resource optimization strategies corresponding to each of the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and lowering the process log level; the target optimization strategy is sent to the processing submodule so that the processing submodule can regulate the target resource load in the autonomous driving system based on the target optimization strategy. It can be seen that the present application sets different resource regulation methods according to the resource consumption of different target resource loads, so as to reduce the target resources in a targeted manner and improve the performance of the autonomous driving system.
[0057] The embodiment of the present application discloses a specific method for optimizing the performance of an autonomous driving system. Compared with the previous embodiment, the present embodiment further illustrates and optimizes the technical solution. The state management submodule applied to the optimization module further includes a system performance monitoring submodule and a processing submodule. Figure 2 As shown, specifically including:
[0058] Step S21: Obtain a resource consumption warning notification for a target resource load in an autonomous driving system sent by the system performance monitoring submodule; the target resource load corresponding to the resource consumption warning notification is the CPU usage rate.
[0059] In this embodiment, the processing submodule includes an execution management module, and the execution management module includes a process switch management module; the target resource load corresponding to the resource consumption warning notification is the CPU usage rate.
[0060] Step S22: Determine the target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to the target resource loads.
[0061] In this embodiment, the execution management module includes process scheduling management, process switch management and thread core binding management, wherein, when the target resource load corresponding to the resource consumption warning notification is the CPU usage rate, the process switch management is used to determine the target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to each target resource load, and send instructions corresponding to the target optimization strategy to the system process and thread, so as to send the target optimization strategy to the execution management module, so that the execution management module can close the parking process in the driving state or close the driving process in the parking state based on the target optimization strategy through the process switch management module to reduce the CPU usage rate in the automatic driving system.
[0062] Step S23: Send the target optimization strategy to the execution management module so that the execution management module can close the parking process in the driving state or close the driving process in the parking state based on the target optimization strategy through the process switch management module to reduce the CPU usage in the automatic driving system.
[0063] In a specific embodiment, when the CPU usage rate exceeds 90%, the current system state is the driving state, and the response strategy at this time is to close the parking process, and the closing of the parking process is as follows:
[0064] {
[0065] Condition:
[0066] {
[0067] CpuLoad: "90",
[0068] Systemstate: "driving",
[0069] },
[0070] Action:
[0071] {
[0072] {
[0073] "ProcessAction": "ProcessParking",
[0074] “ThreadAction”:
[0075] {
[0076] Process:"ProcessCommon",
[0077] Thread:"PCommonThreadPark"
[0078] }
[0079] }
[0080] }
[0081] }
[0082] Step S24: Send the target optimization strategy to the execution management module so that the execution management module sends an execution stop command for a specific thread to the thread scheduling module of the process corresponding to the specific thread through the process scheduling management module, so that the thread scheduling module stops executing the specific thread based on the execution stop command; the specific thread is a thread that is only applicable to the parking state in the parking process when the vehicle is in the driving state, or, a thread that is only applicable to the driving state in the driving process when the vehicle is in the parking state.
[0083] In this embodiment, the processing submodule includes an execution management module and a thread scheduling module corresponding to each process, and the execution management module includes a process scheduling management module; the target resource load corresponding to the resource consumption warning notification is the CPU usage rate.
[0084] It should be pointed out that if the parking process and the driving process are not completely non-overlapping, it means that the same thread exists in the parking process and the driving process. If the other process is directly closed at this time, the overlapping thread will also be closed. Therefore, the process cannot be closed directly at this time, but the corresponding non-overlapping threads in progress must be closed directly.
[0085] In this embodiment, the processing submodule includes a communication management module and the processing submodule includes a health management module. Not only can the CPU usage rate in the autonomous driving system be reduced by closing threads or processes, but other methods can also be used to reduce the CPU usage rate in the autonomous driving system. Specifically, the first method is to send the target optimization strategy to the health management module so that the health management module stops the health status monitoring of the autonomous driving system based on the target optimization strategy to reduce the CPU usage rate in the autonomous driving system. The second method is specifically to send the target optimization strategy to the communication management module so that the communication management module stops the transmission of low-priority messages based on the target optimization strategy to reduce the CPU usage rate in the autonomous driving system.
[0086] It should be noted that stopping the health status monitoring of the autonomous driving system is completed by the health management module, and the health management module obtains the target optimization strategy of the status management module, so that the health management module stops the health status monitoring of the autonomous driving system based on the target optimization strategy to reduce the CPU usage in the autonomous driving system. Stopping the transmission of low-priority messages is completed by the communication management module, which sends the target optimization strategy to the communication management module, so that the communication management module stops the transmission of low-priority messages based on the target optimization strategy to reduce the CPU usage in the autonomous driving system.
[0087] It can be seen that the present application obtains a resource consumption warning notification for a target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load corresponding to the resource consumption warning notification is the CPU usage rate; the target optimization strategy corresponding to the resource consumption warning notification is determined from the pre-set resource optimization strategies corresponding to each of the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and reducing the process log level; the target optimization strategy is sent to the execution management module, so that the execution management module closes the parking process in the driving state or closes the driving process in the parking state based on the target optimization strategy through the process switch management module to reduce the CPU usage rate in the autonomous driving system; or, the target optimization strategy is sent to the execution management module, so that the execution management module sends an execution stop command for a specific thread to the thread scheduling module of the process corresponding to the specific thread through the process scheduling management module, so that the thread scheduling module stops executing the specific thread based on the execution stop command; the specific thread is a thread that is only applicable to the parking state in the parking process when in the driving state, or a thread that is only applicable to the driving state in the driving process when in the parking state. It can be seen that the present application can reduce CPU usage by shutting down the parking process and / or stopping the health status monitoring of the autonomous driving system and / or stopping the transmission of low-priority messages.
[0088] The embodiment of the present application discloses a specific method for optimizing the performance of an autonomous driving system. Compared with the previous embodiment, the present embodiment further illustrates and optimizes the technical solution. The state management submodule applied to the optimization module further includes a system performance monitoring submodule and a processing submodule. Figure 3 As shown, specifically including:
[0089] Step S31: Obtain a resource consumption warning notification for a target resource load in an autonomous driving system sent by the system performance monitoring submodule; the target resource load corresponding to the resource consumption warning notification is the number of CPU migrations.
[0090] In this embodiment, the processing submodule includes an execution management module, and the execution management module includes a process core binding management module; the target resource load corresponding to the resource consumption warning notification is the number of CPU migrations.
[0091] Step S32: Determine the target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to the target resource loads.
[0092] In this embodiment, the execution management module includes process scheduling management, process switch management and thread core binding management. When the target resource load corresponding to the resource consumption warning notification is the number of CPU migrations, the thread core binding management is used to determine the target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to the target resource loads, and send instructions corresponding to the target optimization strategy to the system process and thread, so as to send the target optimization strategy to the execution management module, so that the execution management module can bind the corresponding thread to the core based on the processing strategy through the process core binding management module to reduce the number of CPU migrations.
[0093] Step S33: Send the target optimization strategy to the execution management module, so that the execution management module binds the corresponding thread to the core through the process core binding management module based on the processing strategy to reduce the number of CPU migrations.
[0094] In a specific embodiment, when the number of CPU migrations exceeds 1000, the current system state is a parking state, and the response strategy at this time is to bind the thread with the excessive number of migrations to a core:
[0095] {
[0096] Condition:
[0097] {
[0098] CpuMigration: "1000",
[0099] Systemstate: "parking",
[0100] },
[0101] Action:
[0102] {
[0103] Cpucore:"2",
[0104] }
[0105] }
[0106] It can be seen that the present application obtains the resource consumption warning notification for the target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load corresponding to the resource consumption warning notification is the number of CPU migrations; the target optimization strategy corresponding to the resource consumption warning notification is determined from the pre-set resource optimization strategies corresponding to each of the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread binding core and reducing process log level; the target optimization strategy is sent to the execution management module so that the execution management module binds the corresponding thread to the core through the process binding core management module based on the processing strategy to reduce the number of CPU migrations. It can be seen that the present application can reduce the number of CPU migrations by binding the corresponding thread to the core.
[0107] The embodiment of the present application discloses a specific method for optimizing the performance of an autonomous driving system. Compared with the previous embodiment, the present embodiment further illustrates and optimizes the technical solution. The state management submodule applied to the optimization module further includes a system performance monitoring submodule and a processing submodule. Figure 4 As shown, specifically including:
[0108] Step S41: Obtain a resource consumption warning notification for a target resource load in an autonomous driving system sent by the system performance monitoring submodule; the target resource load corresponding to the resource consumption warning notification is the number of IO operations.
[0109] In this embodiment, the processing submodule includes an execution management module, the execution management module includes a process switch management module, the optimization module also includes a process log management module corresponding to each process, and the target resource load corresponding to the resource consumption warning notification is the number of IO operations.
[0110] Step S42: Determine the target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to the target resource loads.
[0111] In this embodiment, the execution management module includes process scheduling management, process switch management and thread core binding management. When the target resource load corresponding to the resource consumption warning notification is the number of IO operations, the process switch management is used to determine the target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to each target resource load, and send a log level reduction instruction corresponding to the target optimization strategy to the system process and thread, so as to reduce the process log level based on the process log level reduction instruction to reduce the number of IO operations.
[0112] Step S43: Send the target optimization strategy to the execution management module, so that the execution management module sends a process log level reduction instruction to each process log management module through the process switch management module based on the target optimization strategy, so that the process log management module can reduce the process log level of each process based on the process log level reduction instruction to reduce the number of IO operations.
[0113] In a specific embodiment, when the number of IO operations exceeds 100,000, the current system state is a parking state, and the response strategy at this time is to reduce the log level of all processes:
[0114] {
[0115] Condition:
[0116] {
[0117] IO: "100000",
[0118] Systemstate: "parking",
[0119] },
[0120] Action:
[0121] {
[0122] LogLevel:"2",
[0123] }
[0124] }
[0125] It can be seen that the present application obtains the resource consumption warning notification for the target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load corresponding to the resource consumption warning notification is the number of IO operations; the target optimization strategy corresponding to the resource consumption warning notification is determined from the pre-set resource optimization strategies corresponding to each of the target resource loads. The target optimization strategy is sent to the execution management module so that the execution management module sends a process log level reduction instruction to each process log management module based on the target optimization strategy through the process switch management module, so that the process log management module reduces the process log level of each process based on the process log level reduction instruction to reduce the number of IO operations. It can be seen that the present application can reduce the number of IO operations by reducing the process log level.
[0126] See also Figure 5As shown in the figure, it is a schematic diagram of the performance optimization process of an autonomous driving system; the system performance monitoring module in the figure includes components such as system CPU monitoring, idle CPU monitoring, CPU migration monitoring, and disk IO operation monitoring; the state management module is mainly responsible for monitoring various states of the system and taking corresponding measures according to the monitoring results; the execution management module includes process switch management, process scheduling management, thread binding core management, etc., and is responsible for managing and controlling the execution of system processes and threads; the communication management module is responsible for the transmission of low-priority messages in the system; the system process and thread contain multiple processes, each process has multiple threads, and describes the scheduling and log management between them; the health management module is responsible for the overall health status monitoring of the system; among them, the threads in the process are scheduled and executed by the thread scheduling module; different monitoring modules (such as system CPU monitoring and disk IO monitoring) will send notifications exceeding the threshold to the state management module; the state management module decides to take corresponding measures according to the received notification, such as closing the process, stopping thread execution, reducing process IO output, etc.; after the CPU migration monitoring module notifies the state management module, the state management module binds the relevant threads to the specified CPU core for execution. Figure 5 The execution process under different threshold-exceeding notifications is shown. After the state management receives the notification that the CPU usage rate exceeds the threshold, it sends a process shutdown instruction to the process switch management of the execution management module. The process switch management sends an instruction to close unnecessary processes to the corresponding process to close the process. The figure shows process 1 and process 2, where the unnecessary process is the parking process; after the state management receives the notification that the number of CPU migrations exceeds the threshold, it sends an instruction to bind the corresponding thread to the thread core binding management of the execution management module. The thread core binding management sends an instruction to bind the corresponding thread to the corresponding process to implement thread core binding. The figure shows process 1 and process 2; after the state management module receives the notification that the number of IO operations exceeds the threshold, it sends an instruction to reduce the process IO output to The process switch management of the execution management module sends an instruction to reduce the process log printing level to the log management module of the corresponding process, which is shown in the figure as process 1 and process 2; the state management module can directly send a command to stop thread execution for a specific thread to the process scheduling management of the execution management module, and the process scheduling management sends a command to stop thread execution to the corresponding thread, which is shown in the figure as process 1 and process 2. In thread 1, the thread 1 thread scheduling module completes the scheduling execution based on thread 1-1, thread 1-2, thread 1-3, thread 1-4, thread 1-5, and thread 1-6. In thread 2, the thread 2 thread scheduling module completes the scheduling execution based on thread 2-1 and thread 2-2 to stop the execution of the specific thread.
[0127] It should be pointed out that this application is a responsibility chain model, that is, the command can be processed by multiple modules or management or processes, and each module or management or process passes it to the next module or management or process after processing the request, or each module or management or process directly passes it to the next module or management or process. This application allows real-time dynamic changes in monitoring strategies (including system CPU monitoring, idle CPU monitoring, CPU migration monitoring, disk IO operation monitoring, etc.), and calls corresponding monitoring methods as needed.
[0128] Accordingly, the embodiment of the present application also discloses an automatic driving system performance optimization device, which is applied to the state management submodule of the optimization module, and the optimization module also includes a system performance monitoring submodule and a processing submodule, see Figure 6 As shown, the device comprises:
[0129] The notification acquisition module 11 is used to obtain the resource consumption warning notification of the target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes CPU usage, CPU migration times and IO operation times;
[0130] A strategy determination module 12 is used to determine a target optimization strategy corresponding to the resource consumption warning notification from various resource optimization strategies that are preset and correspond to the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and process log level reduction;
[0131] The control module 13 is used to send the target optimization strategy to the processing submodule so that the processing submodule can control the target resource load in the automatic driving system based on the target optimization strategy.
[0132] Among them, the more specific working process of each of the above modules can refer to the corresponding content disclosed in the above embodiments, which will not be repeated here.
[0133] It can be seen that the present application obtains the resource consumption warning notification for the target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes CPU usage, CPU migration times and IO operation times; the target optimization strategy corresponding to the resource consumption warning notification is determined from the pre-set resource optimization strategies corresponding to each of the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and lowering the process log level; the target optimization strategy is sent to the processing submodule so that the processing submodule can regulate the target resource load in the autonomous driving system based on the target optimization strategy. It can be seen that the present application sets different resource regulation methods according to the resource consumption of different target resource loads, so as to reduce the target resources in a targeted manner and improve the performance of the autonomous driving system.
[0134] Furthermore, an embodiment of the present application also provides an electronic device. Figure 7 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0135] Figure 7 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the automatic driving system performance optimization method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0136] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0137] In addition, the memory 22, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. In addition to the computer program that can be used to complete the automatic driving system performance optimization method executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 221 may further include a computer program that can be used to complete other specific tasks.
[0138] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed method for optimizing the performance of an autonomous driving system is implemented.
[0139] The specific steps of the method can refer to the corresponding contents disclosed in the above embodiments, which will not be repeated here.
[0140] The various embodiments in this application are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.
[0141] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0142] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0143] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0144] The above is a detailed introduction to the method, device, equipment, and storage medium for optimizing the performance of an autonomous driving system provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the ideas of the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for optimizing the performance of an automatic driving system, characterized in that: A state management submodule applied to an optimization module, wherein the optimization module further comprises a system performance monitoring submodule and a processing submodule, and the method comprises: Obtaining a resource consumption warning notification for a target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes a CPU usage rate, a CPU migration number, and an IO operation number; Determine a target optimization strategy corresponding to the resource consumption warning notification from the pre-set resource optimization strategies corresponding to the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and process log level reduction; The target optimization strategy is sent to a processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy.
2. The method for optimizing the performance of an automatic driving system according to claim 1, characterized in that: The processing submodule includes an execution management module, and the execution management module includes a process switch management module; The target resource load corresponding to the resource consumption warning notification is the CPU usage rate; Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes: The target optimization strategy is sent to the execution management module so that the execution management module can close the parking process in the driving state or close the driving process in the parking state based on the target optimization strategy through the process switch management module to reduce the CPU usage in the automatic driving system.
3. The method for optimizing the performance of an automatic driving system according to claim 1, characterized in that: The processing submodule includes a communication management module; Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes: The target optimization strategy is sent to the communication management module so that the communication management module stops the transmission of low priority messages based on the target optimization strategy to reduce the CPU usage in the autonomous driving system.
4. The method for optimizing the performance of an automatic driving system according to claim 1, characterized in that: The processing submodule includes a health management module; Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes: The target optimization strategy is sent to the health management module so that the health management module stops the health status monitoring of the autonomous driving system based on the target optimization strategy to reduce the CPU usage in the autonomous driving system.
5. The method for optimizing the performance of an automatic driving system according to claim 1, characterized in that: The processing submodule includes an execution management module, and the execution management module includes a process core binding management module; the target resource load corresponding to the resource consumption warning notification is the number of CPU migrations; Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes: The target optimization strategy is sent to the execution management module so that the execution management module can bind the corresponding thread to the core through the process core binding management module based on the processing strategy to reduce the number of CPU migrations.
6. The method for optimizing the performance of an automatic driving system according to claim 1, characterized in that: The processing submodule includes an execution management module, the execution management module includes a process switch management module, the optimization module also includes a process log management module corresponding to each process, and the target resource load corresponding to the resource consumption warning notification is the number of IO operations; Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes: The target optimization strategy is sent to the execution management module so that the execution management module sends a process log level reduction instruction to each process log management module through the process switch management module based on the target optimization strategy, so that the process log management module reduces the process log level of each process based on the process log level reduction instruction to reduce the number of IO operations.
7. The method for optimizing the performance of an automatic driving system according to claim 1, characterized in that: The processing submodule includes an execution management module and a thread scheduling module corresponding to each process, and the execution management module includes a process scheduling management module; The target resource load corresponding to the resource consumption warning notification is the CPU usage rate; Accordingly, sending the target optimization strategy to the processing submodule so that the processing submodule regulates the target resource load in the autonomous driving system based on the target optimization strategy includes: The target optimization strategy is sent to the execution management module so that the execution management module sends an execution stop command for a specific thread to the thread scheduling module of the process corresponding to the specific thread through the process scheduling management module, so that the thread scheduling module stops executing the specific thread based on the execution stop command; the specific thread is a thread that is only applicable to the parking state in the parking process when the vehicle is in the driving state, or a thread that is only applicable to the driving state in the driving process when the vehicle is in the parking state.
8. An automatic driving system performance optimization device, characterized in that: A state management submodule applied to an optimization module, wherein the optimization module further comprises a system performance monitoring submodule and a processing submodule, and the device comprises: A notification acquisition module, used to obtain a resource consumption warning notification for a target resource load in the autonomous driving system sent by the system performance monitoring submodule; the target resource load includes a CPU usage rate, a CPU migration number, and an IO operation number; A strategy determination module, used to determine a target optimization strategy corresponding to the resource consumption warning notification from various resource optimization strategies that are preset and correspond to each of the target resource loads; the target optimization strategy includes process shutdown, thread stop, thread core binding and process log level reduction; The control module is used to send the target optimization strategy to the processing submodule so that the processing submodule can regulate the target resource load in the automatic driving system based on the target optimization strategy.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the method for optimizing the performance of an autonomous driving system as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the automatic driving system performance optimization method as described in any one of claims 1 to 7 is implemented.
