Load optimization method of automobile controller and related equipment
By setting resource utilization limits and generating reports during the software integration phase of the vehicle controller, and combining this with load optimization using an automated testing system, the problem of excessive controller load was solved, thereby improving the controller's reliability and safety.
Patent Information
- Application Number
- CN202511788834.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-30
- Publication Date
- 2026-01-23
AI Technical Summary
The application software design of existing car controllers is unreasonable, resulting in excessive load, which may cause operational lag and vehicle malfunction, endangering traffic safety.
During the software integration phase, resource utilization limits are set, static resource reports and stack usage reports are generated, and load optimization is performed through an automated testing system, including resource removal, CAN communication optimization, and RTE interface optimization, to reduce controller load.
Proactively identify and resolve load issues early in the project to improve the maturity and reliability of the controller software, ensure traffic safety, and prevent operational lag and resets caused by excessive controller load.
Smart Images

Figure CN121386728A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of automotive technology, and in particular to a method and related equipment for optimizing the load of an automotive controller. Background Technology
[0002] Automobiles require various controllers that run different levels of application software to achieve intelligent functions such as sensing and control. However, some poorly designed application software may overload the vehicle controller, causing it to malfunction or even require a reset to restore normal operation. This can lead to vehicle malfunction and potentially cause serious problems such as loss of vehicle control, endangering traffic safety. Summary of the Invention
[0003] To address at least one of the aforementioned technical problems, the present invention aims to provide a load optimization method and related equipment for an automotive controller.
[0004] On one hand, embodiments of the present invention include a load optimization method for an automotive controller, the load optimization method for the automotive controller comprising the following steps: During the software integration phase, the application software code is configured to limit the resource utilization of the vehicle controller. During the compilation and linking phase, static resource statistics are performed on the application software to generate a static resource report; During the runtime testing phase, stack usage statistics are performed on the application software, and a stack usage report is generated. Load optimization is performed based on the static resource report and the stack usage report.
[0005] Furthermore, the code settings for the application software to limit the resource utilization of the vehicle controller include: Set a threshold for resource utilization of the vehicle controller; Obtain the code of the application software mounted on multiple different car controllers, and specify real vehicle test cases; Obtain the load rate of the real vehicle test cases under extreme operating conditions in the real vehicle; When the load rate exceeds the resource utilization threshold, an alarm is triggered and the application software code is repaired.
[0006] Furthermore, the step of performing static resource statistics on the application software and generating a static resource report includes: The application software code is compiled and linked to obtain a map file; Based on the map file, determine the static resource usage of the application software; The static resource report is generated based on the static resource usage.
[0007] Further, the static resource usage amount includes a FLASH usage amount and a RAM usage amount.
[0008] Further, the stack usage statistics of the application software generates a stack usage report, including: integrating the stack peak monitoring into an automated test system; using the automated test system to automatically test the code of the application software to obtain a stack resource usage amount; generating the stack usage report according to the stack resource usage amount.
[0009] Further, the stack resource usage amount includes stack space and usage space allocated to each task function of all cores in the automotive controller, call relations between main functions and sub functions, and stack usage states corresponding to the main functions and the sub functions.
[0010] Further, the load optimization according to the static resource report and the stack usage report includes: when the usage rate indicated by the static resource report is greater than a resource usage rate threshold, removing a diagnostic service and / or performing software component core migration processing on the application software.
[0011] Further, the load optimization according to the static resource report and the stack usage report includes: when the usage rate indicated by the stack usage report is greater than a resource usage rate threshold, performing CAN communication optimization, Ethernet optimization and / or RTE interface optimization.
[0012] In another aspect, an embodiment of the present application further includes a computer device including a memory and a processor, the memory being configured to store at least one program, and the processor being configured to load the at least one program to execute the load optimization method of the automotive controller in the embodiment.
[0013] In another aspect, an embodiment of the present application further includes a computer program product including a computer program, the computer program being configured to implement the load optimization method of the automotive controller in the embodiment when executed by a processor.
[0014] The beneficial effect of the embodiment of the present application is that the load optimization method of the automobile controller in the embodiment can configure the code of the application software in the initial software integration stage, thereby controlling the bench of the built code, and after each code submission, automatically generating resource reports such as static resource reports and stack usage reports and real vehicle load test results, and finally serving as the basis for satisfying the load rate standard. By monitoring the static resources and stack area usage of the controller in a positive direction, by integrating the analysis reports and alarm mechanisms of the two aspects into the development and integration process, the load problems can be actively discovered and solved in the early stage of the project, the maturity and reliability of the controller software are greatly improved, thereby solving the problems of running stagnation caused by high controller load, vehicle function failure caused by reset, and the like, and ensuring traffic safety. BRIEF DESCRIPTION OF DRAWINGS
[0015] Figure 1 The structure schematic diagram of AUTOSAR in the embodiment; Figure 2 The step schematic diagram of the load optimization method of the automobile controller in the embodiment; Figure 3 The flow schematic diagram of the load optimization method of the automobile controller in the embodiment. DETAILED DESCRIPTION
[0016] TERMS EXPLANATION: In the embodiment, the load optimization method of the automobile controller is described by taking the load optimization of the automobile controller based on AUTOSAR as an example.
[0017] AUTOSAR is the abbreviation of Automotive Open System Architecture, that is, automobile open system architecture. AUTOSAR is an open and standardized automobile embedded system software architecture specification launched by a global development cooperation partner group composed of global automobile manufacturers, suppliers, service providers and the like in the automobile electronics, semiconductor and software industries.
[0018] The core idea of AUTOSAR is the separation of software and hardware and the standardization of the interface. As shown in Figure 1 , it realizes the separation between the application program and the hardware module through a layered architecture, and the automobile electronic software architecture is abstracted into four layers. Referring to Figure 1 , AUTOSAR is from top to bottom: application layer, run time environment (RTE), basic software layer (BSW), and microcontroller.
[0019] Specifically, an application software layer (ASW) includes a plurality of software components (SWC), which interact through ports (Port). The ports expose abstract service interfaces or data interfaces, rather than specific physical addresses or register operations. Each software component can include one or more running entities (RE), which encapsulate relevant control algorithms and can be triggered by RTE events (RTE Event).
[0020] A runtime environment (RTE) is a node for interaction between the application software layer and the underlying software layer, and can implement communication between software components, between underlying software, and between software components and underlying software. The RTE encapsulates the communication and services of the underlying software layer, and provides standardized underlying software and communication interfaces for the application layer software components, so that the application layer can call the services of the underlying software through the RTE interface functions. In addition, the RTE abstracts the communication between ECUs, i.e., the RTE unifies it as communication between software components by using standardized interfaces. Since the implementation of the RTE is related to the specific ECU, it must be implemented for each ECU respectively.
[0021] Currently, in the software development environment based on the AUTOSAR architecture, SWC with the same function is deployed in the same core, which reduces the signal cross-core communication and increases the inter-core communication load. Application deployment: Core0 deploys application SWC, Core1 deploys communication CAN / ETH, Core2 deploys FOTA, Core3 deploys SWC and clock synchronization. However, the high load rate of CAN / LIN / Ethernet bus, complex UDS diagnostic services and NVM read / write operations occupy a large number of CPU cycles. Each functional iteration will cause the load rate of the MCU chip to increase, and the system is close to the computing power bottleneck. Under high load, task scheduling is delayed, and interrupt response is not timely, which poses a hidden danger to functional safety. According to industry standards and past project experience, a controller load rate less than 80% is considered to be a relatively reasonable range and will not affect the normal operation of each function. When the load rate is in a high load state for a long time, the controller has poor robustness and there is a risk of task timeout reset.
[0022] Based on the above principle, in the embodiment, a load optimization method of an automobile controller is provided. Referring to Figure 2 , the load optimization method of the automobile controller includes the following steps: S1. In the software integration stage, the code of the application software is set to limit the resource usage rate of the automobile controller; S2. In the compilation and linking stage, the application software is statically resource counted to generate a static resource report; S3. In the running test phase, stack usage statistics of the application software are generated, and a stack usage report is generated; S4. Load optimization is performed according to the static resource report and the stack usage report.
[0023] The flow of steps S1-S4 is shown in Figure 3 Figure 3 The figure shows a positive monitoring flow of the load.
[0024] In this embodiment, the steps S1-S4 can be performed by using a computer. By performing the steps S1-S4, the code of the automobile controller that has been optimized in terms of load can be obtained. The application software compiled from such code can run on the automobile controller, and unnecessary load generated by the automobile controller is reduced during the running, so that the load generated by the automobile controller is reduced to a proper level.
[0025] In this embodiment, when performing the step S1, that is, the step of setting the resource usage rate limit of the automobile controller for the code of the application software, the following steps can be performed: S101. A resource usage rate threshold of the automobile controller is set; S102. The code of the application software carried by a plurality of different automobile controllers is obtained, and a real vehicle test case is specified; S103. The load rate of the real vehicle test case under the extreme working condition of the real vehicle is obtained; S104. When the load rate is greater than the resource usage rate threshold, an alarm is triggered and the code of the application software is repaired.
[0026] The steps S101-S104 are performed in the early stage of the project, that is, in the software integration stage.
[0027] In the step S101, a clear threshold (for example, not more than 80% of the total resources) is set for the usage rate of the code Flash and the data RAM.
[0028] In the steps S102-S103, the real vehicle test case is formulated according to the functions carried by different controllers, and the load rate under the extreme working condition of the real vehicle is taken as the basis for regression verification to complete the closed loop.
[0029] In the step S104, once the load rate obtained in the step S103 exceeds the standard, that is, the load rate is greater than the resource usage rate threshold set in the step S101, an alarm is triggered and the repair is performed.
[0030] By performing the steps S101-S104, the step of setting the code analysis is realized in the software integration process, so that the control is performed at the software integration end, the bench of the code is built, and the subsequent steps are facilitated.
[0031] In this embodiment, when performing step S2, that is, the step of performing static resource statistics on the application software and generating a static resource report, the following steps can be performed: S201. Compiling and linking the code of the application software to obtain a map file; S202. Determining the static resource usage of the application software according to the map file; S203. Generating a static resource report according to the static resource usage.
[0032] In the process of resource measurement, static resource statistics are mainly completed in the compiling and linking stage. In steps S201-S203, the CPU load and resource consumption are estimated by analyzing the finally generated target file. Specifically, in step S202, the static resource usage can be obtained through the map file generated after compiling and linking. In this embodiment, the static resource usage includes the total resource and used resource of FLASH & RAM, each function application / communication / diagnosis, etc. (o file), and the actual used byte size of FLASH & RAM, that is, the following information: the usage of FLASH (code and constant): usually determined by the size of.text and.rodata segments; the usage of RAM (initialized and uninitialized data): usually determined by the size of.data and.bss segments.
[0033] In step S203, after each code submission, a static resource report is automatically generated and compared with the baseline to generate a static resource report.
[0034] In this embodiment, when performing step S3, that is, the step of performing stack usage statistics on the application software and generating a stack usage report, the following steps can be performed: S301. Integrating stack peak monitoring into an automated test system; S302. Using the automated test system to automatically test the code of the application software to obtain the stack resource usage; S303. Generating a stack usage report according to the stack resource usage.
[0035] The stack usage statistics is an analysis of the runtime, which pursues to expose the stack consumption in the worst case as much as possible in the test phase, and is a positive, scenario-based verification method. In step S301, the stack peak monitoring is integrated into the automatic test system, which makes the automatic test system have the functions of both the automatic test and the stack peak monitoring of the code of the application software. In step S302, the automatic test system is used to automatically test the code of the application software, and the stack peak monitoring function integrated in the automatic test system simultaneously monitors the code of the application software, so as to obtain the stack resource usage of the code of the application software. In the embodiment, the stack resource usage includes: the stack space and the usage space allocated by all cores to each TASK task function; and the stack usage corresponding to the calling relationship between the main function and the sub-function.
[0036] In step S303, the stack usage report is automatically generated after each test suite is executed.
[0037] In the embodiment, when the step S4, that is, the load optimization according to the static resource report and the stack usage report, is executed, the following steps can be executed: S401. When the usage indicated by the static resource report is greater than the resource usage threshold, the diagnostic service is removed, and / or the software component is moved to another core. S402. When the usage indicated by the stack usage report is greater than the resource usage threshold, the CAN communication optimization, the Ethernet optimization and / or the RTE interface optimization are executed.
[0038] Referring to Figure 3 When the usage indicated by the static resource report is greater than the resource usage threshold (80%), that is, the usage of the static resource exceeds the threshold, it is indicated that the load generated by the code of the application software on the automotive controller is abnormal, which belongs to the static resource exception, the task can be alarmed, and the step S401 can be executed to reduce the communication and diagnostic stack area usage by removing the unused PDU and signal and the necessary diagnostic service (UDS), and the load of a core can be reduced by moving the SWC to another core, so as to achieve the load optimization.
[0039] Referring to Figure 3When the usage rate of the stack usage report is greater than the resource usage threshold, i.e., the usage of the stack exceeds the threshold, it indicates that the load generated by the code of the application software on the automotive controller is abnormal in stack usage, and such a task can be alarmed, and step S402 can be performed to reduce the load by changing the signal level to PDU routing (CAN to CAN) when the abnormal situation occurs; at the Ethernet level, the load can be reduced by frequency adjustment and packet aggregation, with a frequency multiplication coefficient of 100, and the sending type on change; at the RTE interface level, the Appnet_Route can be split into tasks with different periods according to the message sending period, and the fast period message is placed in the 10ms task, and the slow period message is placed in the 50ms or 100ms task, to achieve the effect of reducing the load.
[0040] In this embodiment, by performing steps S1-S4, the code of the application software can be configured in the initial software integration stage, so as to control the well-built code bench. After each code submission, static resource reports and stack usage reports and vehicle load test results are automatically generated, and finally serve as the basis for meeting the load rate standard. By monitoring the static resources and stack area usage of the controller in a positive way, and by integrating the analysis reports and alarm mechanisms of the two aspects into the development and integration process, the load problems can be actively discovered and solved in the early stage of the project, greatly improving the maturity and reliability of the controller software. Therefore, by performing steps S1-S4, the SWC specified by different controllers is implemented to perform real load testing in different vehicle scenarios to ensure that the load rate of the controller under full load working conditions can be kept below the threshold (e.g., 80%) standard, thereby solving the problems of running card stagnation and vehicle function failure caused by reset caused by high controller load.
[0041] In this embodiment, a computer device can be used, which includes a memory and a processor. The memory is used to store at least one program, and the processor is used to load the at least one program to execute the load optimization method of the automotive controller, so as to obtain the effect of the load optimization method of the automotive controller.
[0042] In this embodiment, a computer program product can be used, which includes a computer program. When the computer program is executed by the processor, the load optimization method of the automotive controller in the embodiment is implemented.
[0043] It should be noted that, as used in this disclosure and unless otherwise specified, an "and / or," where used, refers to a combination of that which is specified and / or one or more additional such specifications. It should also be noted that, as used in this disclosure and unless otherwise specified, a "coupled" or "connected" or "fixed" or "attached" or "connected" or "engaged" or "mounted" or similar specifications is not necessarily intended to connote an element directly fixed, connected or attached to, or engaged with, another element, unless otherwise specified. It should also be noted that, as used in this disclosure and unless otherwise specified, an "on" or "under" or "over" or "top" or "bottom" or similar specifications is not necessarily intended to connote an element directly on, under, over, on top of, or on the bottom of another element, unless otherwise specified.
[0044] It should be understood that, although the terms first, second, third, etc. can be used herein to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first element could be termed a second element without departing from the scope of the present disclosure. The use of such terms as "and / or" and "at least one of' includes any and all combinations of one or more of the associated listed items.
[0045] It should be appreciated that embodiments of the present application can be realized by either computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer-readable storage medium. The methods can be implemented in a computer program, using standard programming techniques, including the configuration of non-transitory computer-readable storage media with a computer program, wherein the storage medium so configured with the computer program instructs the computer to operate in a specific and predefined manner according to the methods described in the detailed embodiments and the drawings. Each program can be implemented in a high-level procedural or object-oriented programming language to communicate with a computer system. However, the programs can be implemented in assembly or machine language, if desired. In any case, the language can be a compiled or interpreted language. Furthermore, the programs can be able to run on a specially programmed integrated circuit for this purpose.
[0046] Further, the operations of the processes described in this embodiment can be performed in any suitable order, unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described in this embodiment (or variations and / or combinations thereof) can be implemented under the control of one or more computer systems configured with executable instructions (e.g., computer programs, one or more computer programs, or one or more applications) to perform the functionality described herein, and can be implemented completely or partially using hardware, or a combination thereof. Computer programs include machine instructions that can be executed by one or more processors.
[0047] Further, the methods can be implemented in any suitable type of computing platform operatively coupled to any suitable type of computing platform, including but not limited to a personal computer, a mini-computer, a mainframe, a workstation, a network or distributed computing environment, a stand-alone or integrated computer platform, or in communication with a charged particle tool or other imaging device, and the like. Aspects of embodiments of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated to the computing platform, such as a hard disk, optical reading and / or writing storage media, RAM, ROM, and the like, such that it can be read by a programmable computer to configure and operate the computer to perform the processes described herein when the storage medium or device is read by the computer. Further, the machine-readable code, or portions thereof, can be transmitted over wired or wireless networks. The present invention encompasses these and other different types of non-transitory computer-readable storage media when such media include instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor. Embodiments of the present invention also encompass computers themselves when programmed in accordance with the methods and techniques of embodiments of the present invention.
[0048] The computer programs can be applied to input data to perform the functions of embodiments of the present invention to transform the input data to generate output data that is stored to non-volatile memory. The output information can also be applied to one or more output devices, such as a display. In preferred embodiments of embodiments of the present invention, the transformed data represents a physical and tangible object, including a particular visual depiction of a physical and tangible object produced on a display.
[0049] The above merely preferred embodiments of the present invention, and the present invention is not limited to only the above-described embodiments, as long as the same means achieve the technical effects of embodiments of the present invention, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of embodiments of the present invention shall be included in the scope of protection of embodiments of the present invention. The technical solutions and / or embodiments of the present invention can have various modifications and changes within the scope of protection.
Claims
1. A load optimization method of an automobile controller, characterized by, The load optimization method of the automobile controller comprises: In the software integration stage, the resource usage rate of the application software code is set to the automobile controller; In the compiling and linking stage, the static resource statistics of the application software is carried out to generate a static resource report; In the running test stage, the stack usage statistics of the application software is carried out to generate a stack usage report; According to the static resource report and the stack usage report, load optimization is carried out.
2. The load optimization method of an automobile controller according to claim 1, characterized by, The setting of the resource usage rate of the application software code to the automobile controller comprises: The resource usage rate threshold of the automobile controller is set; The codes of the application software carried by a plurality of different automobile controllers are obtained, and the real vehicle test cases are specified; The load rate of the real vehicle test cases under the real vehicle limit working condition is obtained; When the load rate is greater than the resource usage rate threshold, an alarm is triggered and the code of the application software is repaired.
3. The load optimization method of an automobile controller according to claim 1, characterized by, The static resource statistics of the application software is carried out to generate a static resource report, comprising: The code of the application software is compiled and linked to obtain a map file; According to the map file, the static resource usage amount of the application software is determined; According to the static resource usage amount, the static resource report is generated.
4. The load optimization method of an automobile controller according to claim 3, characterized by, The static resource usage amount comprises the usage amount of FLASH and the usage amount of RAM.
5. The load optimization method of an automobile controller according to claim 1, characterized by, The stack usage statistics of the application software is carried out to generate a stack usage report, comprising: The stack peak value monitoring is integrated into an automatic test system; The automatic test system is used to automatically test the code of the application software to obtain the stack resource usage amount; According to the stack resource usage amount, the stack usage report is generated.
6. The load optimization method of an automobile controller according to claim 5, characterized by, The stack resource usage amount comprises the stack space and usage space of each task function of all cores in the automobile controller, the calling relationship between the main function and the sub-function, and the stack usage state corresponding to the main function and the sub-function.
7. The load optimization method of an automobile controller according to any one of claims 1 to 6, characterized by, According to the static resource report and the stack usage report, load optimization is carried out, comprising: When the usage rate indicated by the static resource report is greater than the resource usage rate threshold, the diagnostic service is removed, and / or the software component is moved to the core of the application software.
8. The load optimization method of an automobile controller according to any one of claims 1 to 6, characterized by, According to the static resource report and the stack usage report, load optimization is carried out, comprising: When the usage rate indicated by the stack usage report is greater than the resource usage rate threshold, CAN communication optimization, Ethernet optimization and / or RTE interface optimization are carried out.
9. A computer apparatus, comprising: The computer program is executed by the processor to implement the load optimization method of the automobile controller according to any one of claims 1-8.
10. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the load optimization method of the automobile controller according to any one of claims 1-8.
Citation Information
Patent Citations
Automatic generation method and system of CAN signal interface software and vehicle
CN108345288A
Jenkins-based embedded software construction method and system
CN113553030A
Method, system, equipment and medium for reducing load rate of main chip of vehicle control unit
CN115494932A
Automobile ECU software system diagnosis optimization method, device, equipment and medium
CN116048049A
Performance data monitoring method and device, storage medium and electronic equipment
CN116974870A
