Vehicle application program adjustment method and device, vehicle and storage medium
By analyzing and adjusting the initial application and optimizing the ECU application using the target dependency library, the problems of low resource utilization and difficult maintenance were solved, a lightweight and efficient vehicle application was achieved, and resource utilization and user experience were improved.
Patent Information
- Application Number
- CN202510863942.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-10-03
AI Technical Summary
In the existing technology, AUTOSAR CP ECU applications have low resource utilization and are difficult to maintain in resource-constrained embedded environments. This is especially true after integrating advanced driver assistance systems.
By obtaining the target dependency library and the initial application of the target vehicle, the modules to be optimized are analyzed and identified. The target dependency library is used to adjust the modules to be optimized, including memory management, timer management, data structure management, and code management. The modules are optimized to obtain the target application and achieve lightweight and efficient operation.
It realizes lightweight vehicle applications, reduces memory usage, increases code reuse, simplifies maintenance processes, improves resource utilization and system efficiency, and enhances user experience.
Smart Images

Figure CN120743334A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle electronic control, and in particular to a vehicle application adjustment method, device, vehicle and storage medium. Background Art
[0002] In the field of vehicle electronic control, with the rapid expansion of automotive functions and iterative technological innovation, modern vehicle electronic systems are undergoing a transformation from simple mechanical operation to highly intelligent and networked systems. This process has seen a dramatic increase in the number and complexity of Electronic Control Units (ECUs), the core components of automotive electronic control systems. This is particularly true with the integration of cutting-edge technologies such as Advanced Driver Assistance Systems (ADAS), which place higher demands on the efficiency and resource management of ECU application architectures. The Automotive Open System Architecture Classic Platform (AUTOSAR CP), a widely adopted standardized framework for ECU application development, improves communication efficiency and application reusability between different ECUs through modular design and standardized interfaces. However, its versatile and complex functional modules and protocol stack design suffer from low resource utilization and high dimensionality in resource-constrained embedded environments.
[0003] To address the above-mentioned problems, no effective solutions have been proposed so far. Summary of the Invention
[0004] Embodiments of the present invention provide a vehicle application adjustment method, device, vehicle, and storage medium to at least solve the technical problems of low resource utilization and high maintenance difficulty existing in the vehicle application adjustment method provided in the related art.
[0005] According to one aspect of an embodiment of the present invention, a vehicle application adjustment method is provided, comprising: obtaining a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes multiple functional modules, the multiple functional modules are used to adjust the initial application, and the initial application is used to control the target vehicle to perform a vehicle control task; analyzing and processing the initial application to obtain a module to be optimized; adjusting and processing the module to be optimized using the target dependency library to obtain a target application; and controlling the target vehicle to perform a vehicle control task based on the target application.
[0006] Optionally, obtaining the target dependency library includes: obtaining a basic dependency library, wherein the basic dependency library includes standardized application components, and the standardized application components are used to provide basic software services for the target vehicle; segmenting the basic dependency library to obtain multiple functional modules; and reconstructing the multiple functional modules to obtain the target dependency library.
[0007] Optionally, reconstructing the multiple functional modules to obtain a target dependency library includes: functionally reconstructing the multiple functional modules to obtain a target functional module; and standardizing the interfaces of the target functional modules to obtain a target dependency library.
[0008] Optionally, the initial application is analyzed and processed to obtain a module to be optimized, including: obtaining performance indicators corresponding to the initial application, wherein the performance indicators include memory usage and response time corresponding to the initial application; in response to the memory usage being greater than a preset usage threshold, and the response time being greater than a preset time threshold, determining that the functional module corresponding to the current initial application is the module to be optimized.
[0009] Optionally, the module to be optimized is adjusted using the target dependency library to obtain a target application, including: determining a target functional module corresponding to the module to be optimized based on the target dependency library; and adjusting the module to be optimized using the target functional module to obtain a target application.
[0010] Optionally, the target functional module includes: a memory management module, a timer management module, a data structure management module and a code management module, and the target functional module is used to adjust the module to be optimized to obtain a target application, including: using the memory management module to adjust the memory management mechanism corresponding to the module to be optimized to obtain a memory management application; using the timer management module to adjust the timer type corresponding to the module to be optimized to obtain a timer management application, wherein the timer type includes a periodic timer, a single timer, and a countdown timer; using the data structure management module to adjust the data structure type of the module to be optimized, wherein the data structure type includes at least one of the following: a circular queue, a bidirectional linked list, and a hash map; using the code management module to adjust the code management of the module to be optimized to obtain a code management application, wherein the code management module is used to delete duplicate code in the module to be optimized; merging the memory management application, the timer management application, the data structure management application and the code management application to obtain the target application.
[0011] According to another aspect of an embodiment of the present invention, a vehicle application adjustment device is also provided, including: an acquisition module for acquiring a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes multiple functional modules, and the multiple functional modules are used to adjust and process the initial application, and the initial application is used to control the target vehicle to perform vehicle control tasks; an analysis module for analyzing and processing the initial application to obtain a module to be optimized; an adjustment module for adjusting and processing the module to be optimized using the target dependency library to obtain a target application; and a control module for controlling the target vehicle to perform vehicle control tasks based on the target application.
[0012] Optionally, the acquisition module is also used to: obtain a basic dependency library, wherein the basic dependency library includes standardized application components, and the standardized application components are used to provide basic software services for the target vehicle; split the basic dependency library to obtain multiple functional modules; and reconstruct the multiple functional modules to obtain a target dependency library.
[0013] Optionally, the acquisition module is further used to: perform functional reconstruction on multiple functional modules to obtain a target functional module; perform interface standardization processing on the target functional module to obtain a target dependency library.
[0014] Optionally, the analysis module is also used to: obtain performance indicators corresponding to the initial application, wherein the performance indicators include memory usage and response time corresponding to the initial application; in response to the memory usage being greater than a preset usage threshold, and the response time being greater than a preset time threshold, determine that the functional module corresponding to the current initial application is a module to be optimized.
[0015] Optionally, the adjustment module is further used to: determine a target functional module corresponding to the module to be optimized based on a target dependency library; and use the target functional module to adjust the module to be optimized to obtain a target application.
[0016] Optionally, the target functional module includes: a memory management module, a timer management module, a data structure management module and a code management module, and the adjustment module is further used to: use the memory management module to adjust the memory management mechanism corresponding to the module to be optimized to obtain a memory management application; use the timer management module to adjust the timer type corresponding to the module to be optimized to obtain a timer management application, wherein the timer type includes a periodic timer, a single timer, and a countdown timer; use the data structure management module to adjust the data structure type of the module to be optimized, wherein the data structure type includes at least one of the following: a circular queue, a bidirectional linked list, and a hash mapping table; use the code management module to perform code management adjustment on the module to be optimized to obtain a code management application, wherein the code management module is used to delete duplicate code in the module to be optimized; merge the memory management application, the timer management application, the data structure management application and the code management application to obtain the target application.
[0017] According to another aspect of an embodiment of the present invention, a vehicle is also provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement any one of the vehicle application adjustment methods of the embodiments of the present invention.
[0018] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, which includes a stored executable program, wherein when the executable program is running, the device where the storage medium is located is controlled to execute any one of the vehicle application adjustment methods in the embodiments of the present invention.
[0019] According to another aspect of an embodiment of the present invention, a computer program product is further provided. The computer program product includes computer instructions. When the computer instructions are executed by a processor, the vehicle application adjustment method according to any one of the embodiments of the present invention is implemented.
[0020] In an embodiment of the present invention, by obtaining the target dependency library and the initial application corresponding to the target vehicle, and analyzing and processing the initial application, a module to be optimized is obtained, and then the target dependency library is used to adjust and process the module to be optimized to obtain a target application. Finally, based on the target application, the target vehicle is controlled to perform vehicle control tasks, thereby achieving the purpose of lightweighting vehicle applications, reducing memory usage and increasing code reuse rate, thereby achieving the technical effect of improving resource utilization and simplifying maintenance processes, and thus solving the technical problems of low resource utilization and high maintenance difficulty in the vehicle application adjustment method provided in the related art. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0022] Figure 1 is a flow chart of a vehicle application adjustment method according to one embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of a basic dependency library according to one embodiment of the present invention;
[0024] Figure 3 4 is a structural block diagram of a vehicle application adjustment device according to one embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the description and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] AUTOSAR CP, a standardized framework widely used in ECU application development, improves communication efficiency and application reusability between different ECUs through modular design and standardized interfaces. However, its general and large functional modules and protocol stack design have problems such as low resource utilization and high dimensionality in resource-constrained embedded environments.
[0028] Specifically, the massive feature set of AUTOSAR CP means that even if an ECU only requires a small subset of features, the entire framework is loaded. This results in a large amount of unused code and data structures occupying significant memory space, impacting the ECU's operational efficiency and real-time responsiveness. Furthermore, the complex code architecture and configuration options within AUTOSAR CP complicate application development and maintenance. Developers not only need to deeply understand the details of each module but also must adjust module configurations to suit specific ECU requirements while preventing the introduction of new compatibility issues or functional redundancy, further increasing the complexity and cost of system integration.
[0029] The method embodiment can be executed in an electronic device or similar computing device including a memory and a processor. Taking running on a computer terminal as an example, the computer terminal may include one or more processors (processors may include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a programmable logic device (Field Programmable Gate Array, FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, etc.) and a memory for storing data. Optionally, the above-mentioned computer terminal may also include a transmission device, an input and output device, and a display device for communication functions. It will be understood by those skilled in the art that the above-mentioned structural description is only illustrative and does not limit the structure of the above-mentioned computer terminal. For example, the computer terminal may also include more or fewer components than the above-mentioned structural description, or have a configuration different from the above-mentioned structural description.
[0030] The memory can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the vehicle application adjustment method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the computer program stored in the memory, that is, realizes the above-mentioned vehicle application adjustment method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely located relative to the processor, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0031] The transmission device is used to receive or send data via a network. Specific examples of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one embodiment, the transmission device may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0032] The display device can be, for example, a touch-screen liquid crystal display (LCD) and a touch display (also referred to as a "touch screen" or "touch display screen"). The liquid crystal display can enable the user to interact with the user interface of the mobile terminal. In some embodiments, the mobile terminal has a graphical user interface (GUI), and the user can interact with the GUI by finger contacts and / or gestures on the touch-sensitive surface. The human-computer interaction functions here optionally include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interfaces, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for performing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0033] According to an embodiment of the present invention, a method embodiment of a vehicle application adjustment method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0034] Figure 1 is a flow chart of a vehicle application adjustment method according to one embodiment of the present invention. Figure 1 As shown, the method includes the following steps:
[0035] Step S11, obtaining a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes a plurality of functional modules, the plurality of functional modules are used to adjust and process the initial application, and the initial application is used to control the target vehicle to perform a vehicle control task;
[0036] The core of this target dependency library is to provide a series of streamlined and optimized functional modules to address the low resource utilization and difficult development and maintenance challenges faced by ECU applications in resource-constrained environments. Specifically, this target dependency library includes optimized implementations for memory management, timer operations, data structure processing, and other functions. Each module can be directly reused in ECU applications, reducing redundant code, lowering memory usage, and improving system efficiency and responsiveness.
[0037] For example, the memory management module can use memory pool technology to reduce the overhead of dynamic memory allocation and release, while the timer module can improve the accuracy and responsiveness of time-sensitive applications by optimizing time event scheduling strategies. The data structure module can use high-performance circular queues, doubly linked lists, and hash maps to enable the ECU to process large amounts of data more smoothly and quickly. The introduction of the target dependency library provides ECU applications with a more refined and powerful toolbox, helping them implement their functions while minimizing the consumption of system resources and ensuring good operation and performance even in resource-constrained environments.
[0038] The initial application corresponding to the above-mentioned target vehicle refers to the original software code designed for a specific car model and used to control and manage the operation of its electronic systems (such as engine control, braking system, entertainment system, etc.) before optimization. Specifically, the initial application corresponding to the above-mentioned target vehicle is usually built based on the AUTOSAR CP framework, which provides a standardized and modular software architecture for the automotive industry, aiming to improve the portability and reusability of ECU applications. In addition, the above-mentioned initial application includes multiple modules and protocol stacks designed in accordance with the AUTOSAR CP standard. These modules and protocol stacks cover various functions required by automotive electronic systems, such as communication, diagnosis, storage, etc., to ensure that the vehicle can perform complex control and management tasks.
[0039] Step S12, analyzing and processing the initial application to obtain a module to be optimized;
[0040] These modules are identified through in-depth analysis of the target vehicle's initial application program as having potential for improvement in terms of functionality, resource consumption, or performance efficiency. These modules may suffer from issues such as high memory usage, slow processing speeds, or low stability in specific scenarios due to design redundancy, improper resource management, or inefficient algorithms.
[0041] For example, the initial application can be analyzed and processed through code review, performance evaluation, requirements analysis, and compatibility checking to identify modules to be optimized. Specifically, manual or automated code review can be used to identify modules with redundant code as modules to be optimized. Performance analysis tools can also be used to measure the resource consumption and response time of modules in the actual operating environment, identifying modules with high resource utilization and slow response speed as modules to be optimized.
[0042] Step S13, adjusting the module to be optimized using the target dependency library to obtain the target application;
[0043] The target application is an optimized version of the original application, created by adjusting the modules to be optimized using the target dependency library. While maintaining the integrity of its original functionality, the target application is designed to operate more efficiently, stably, and resource-efficiently, providing users with a superior driving experience while also reducing development and maintenance costs for manufacturers and enhancing product competitiveness.
[0044] Step S14: controlling the target vehicle to perform the vehicle control task based on the target application.
[0045] The above-mentioned vehicle control tasks cover the entire life cycle from vehicle startup to driving and then to parking, including but not limited to power system management, body control, driving assistance functions, infotainment services, environmental perception and decision-making, vehicle network communication coordination and fault diagnosis.
[0046] For example, taking the vehicle body control task as an example, since the target application integrates the timer management and hash mapping table functions in the target dependency library, it can accurately control vehicle body components such as door locks, windows, and lights in a short period of time, improve the speed and accuracy of operation response, and ensure that when the driver or passenger issues a command, various body control functions can respond quickly without going through complex initialization processes or lengthy data search time. Specifically, the timer management function can ensure that vehicle body control tasks such as door locks and window lifts can be executed at the preset precise time and frequency. For example, when the driver presses the unlock button on the remote control key, the target application can immediately trigger the timer to control the door locks to open with millisecond accuracy, without waiting for additional initialization time, thereby improving the user experience.
[0047] Hash maps, on the other hand, provide a fast path for data retrieval in body control tasks. In body control scenarios, each vehicle component (such as windows, lights, and wipers) has unique control parameters and status identifiers. By storing and managing these parameters and identifiers in a hash map, the target application can instantly locate the correct vehicle component information upon receiving a control command, eliminating the need to traverse the entire data structure. This reduces operational latency and improves operational fluidity.
[0048] Based on the above steps S11 to S14, by obtaining the target dependency library and the initial application corresponding to the target vehicle, and analyzing and processing the initial application, the module to be optimized is obtained, and then the target dependency library is used to adjust the module to be optimized to obtain the target application. Finally, based on the target application, the target vehicle is controlled to perform vehicle control tasks, thereby achieving the purpose of lightweighting vehicle applications, reducing memory usage and increasing code reuse rate, thereby achieving the technical effect of improving resource utilization and simplifying maintenance processes, and thus solving the technical problems of low resource utilization and high maintenance difficulty in the vehicle application adjustment method provided in the relevant technology.
[0049] The following further introduces the vehicle application adjustment method in the embodiment of the present invention.
[0050] Optionally, in step S11, obtaining a target dependency library includes:
[0051] Step S111, obtaining a basic dependency library, wherein the basic dependency library includes standardized application components, and the standardized application components are used to provide basic software services for the target vehicle;
[0052] Step S112, splitting the basic dependency library to obtain multiple functional modules;
[0053] Step S113: reconstruct multiple functional modules to obtain a target dependency library.
[0054] Figure 2 is a schematic diagram of a basic dependency library according to one embodiment of the present invention, such as Figure 2 As shown, the basic dependency library includes the application layer (APP), the runtime environment layer (RTE), the operating system layer (OS) and the microcontroller abstraction layer (MCAL).
[0055] Specifically, the app resides at the highest level of the underlying dependency library, directly addressing user or business needs. It is responsible for implementing specific functional logic and services and is the core area of the application system that handles business rules, user interface logic, and data conversion. Furthermore, the app can utilize hardware resources such as the processor, memory, and communication interfaces within the end-to-end workstation to perform computations and logic processing.
[0056] The RTE layer, located below the app, is the middle layer of the basic dependency library and is responsible for scheduling and managing communications between various layers. This includes the diagnostic module, memory management module, communication module, input / output hardware abstraction layer (IOHWABS), system library (SYSLIB), and configuration data description (CDD). The communication module includes the controller area network (CAN), local interconnect network (LIN), communication protocols (such as the FlexRay communication protocol), and Ethernet.
[0057] The OS is responsible for managing hardware resources and the software operating environment, and providing necessary services and interfaces for upper-layer software, including system service modules and the Extended Communication Protocol (XCP).
[0058] MCAL sits between the OS and the hardware, providing a hardware abstraction interface that allows the OS and apps to be independent of the specific microcontroller hardware. Specifically, MCAL includes the system driver (SYSDRIVER), memory driver (MEM DRIVER), communication driver (COMMUNICATION DRIVER), and input / output driver (I / O DRIVER).
[0059] For example, the base dependency library can be split into multiple functional modules, each responsible for a specific task. For example, a memory management module, a timer management module, a data structure module, and so on can be separated. During the segmentation process, it is necessary to ensure that the dependencies between the modules are minimized. Modules should be as independent as possible to facilitate independent testing and maintenance. For example, a memory management module should not depend on a timer module, and vice versa.
[0060] Based on the above steps S111 to S113, by obtaining the basic dependency library and splitting the basic dependency library to obtain multiple functional modules, and then reconstructing the multiple functional modules to obtain the target dependency library, code redundancy can be reduced, functional modularization can be achieved, and resource utilization can be improved.
[0061] Optionally, in step S113, multiple functional modules are reconstructed to obtain a target dependency library, including:
[0062] Step S1131, reconstructing the functions of multiple functional modules to obtain a target functional module;
[0063] Step S1132: perform interface standardization processing on the target functional module to obtain a target dependency library.
[0064] The above-mentioned interface standardization process mainly includes two aspects: one is to standardize the interface definition to ensure that the interaction between all modules follows a unified rule and format, thereby improving the interchangeability of modules and the overall consistency of the system; the other is to write detailed interface documents, clearly describing the functions, parameters, return values and possible error handling mechanisms of each interface, providing clear guidance for developers, facilitating the correct calling of modules and subsequent maintenance of the system.
[0065] For example, when reconstructing the functions of the memory management module, we can first build a highly flexible memory pool management system that can support a variety of memory block size allocations and have dynamic scaling capabilities to seamlessly adapt to resource demand fluctuations in different scenarios. Subsequently, we can introduce a memory block allocation and recycling mechanism to ensure that memory resources can be quickly allocated. At the same time, we can avoid the accumulation of memory fragments through preventive and immediate fragmentation management strategies, ensuring that even under the harsh conditions of multi-threaded concurrent access, we can guarantee the efficiency and consistency of memory operations. Finally, we can introduce an automatic defragmentation mechanism to reduce the proportion of memory fragmentation through periodic memory block integration, thereby improving the overall utilization efficiency of memory space.
[0066] Furthermore, block transfers can be used for memory copying, leveraging the parallel processing capabilities of modern processors to accelerate memory zeroing operations. Compared to byte-by-byte copying, block transfers can move large amounts of data in a shorter timeframe, significantly reducing operation time. Memory alignment mechanisms can also be built into the memory management module to eliminate the performance overhead caused by unaligned accesses.
[0067] For example, when reconfiguring the function of the timer management module, first, a general timer management system is designed and developed to ensure that it can support various types of timers, such as periodic timers, single timers, and countdown timers, so as to meet the time management needs of the system in different scenarios. For scenarios that require high real-time performance, the timing accuracy can be further optimized by cooperating with software timers and hardware timers to ensure that the timing signal is accurate. Secondly, in terms of timer task management, the functional reconstruction module must have the ability to add, delete, pause, and resume timer tasks, and introduce a task priority management mechanism to ensure that critical tasks can be executed first when the system processes multiple tasks in parallel. Furthermore, in order to optimize time event scheduling, an efficient time event queue should be implemented to support fast event insertion and deletion operations to ensure real-time processing of events. Even under high load conditions, the time slice scheduling strategy can be dynamically adjusted to ensure that timer events are executed within the expected time slice, adapting to changes in system load while maintaining stable system operation.
[0068] For example, when reconstructing the functions of the data structure management module, common data structures such as circular queues, bidirectional linked lists, and hash maps can be introduced into the data structure management module. The above data structures can be directly called by various modules in the system to avoid repeated implementation.
[0069] For example, a general-purpose circular queue data structure with automatic expansion can be implemented to support the storage of different data types to adapt to different load requirements. At the same time, the queue's read and write operations are optimized to ensure that the queue's operational complexity remains at O(1) to improve response speed. In addition, for queue operations in a concurrent environment, a lock-free design can be designed to improve response speed.
[0070] For example, a doubly linked list data structure can be implemented to support efficient node insertion, deletion, and search operations. Linked list nodes should have self-management capabilities to simplify the operational logic of the linked list. Furthermore, the memory management of the doubly linked list can be integrated with the memory management module of the underlying dependency library to automatically manage memory allocation and deallocation for linked list nodes, reducing memory fragmentation.
[0071] For example, a general hash table structure can be implemented to support fast lookup, insertion, and deletion operations. The hash table should support dynamic expansion and contraction to accommodate varying data sizes. Furthermore, conflict resolution mechanisms, such as chain addressing or open addressing, can be designed to ensure that the hash table maintains good performance even under high loads.
[0072] In addition, in certain cases, linked lists and queues can be used in combination. For example, the nodes of a circular queue can be managed using a doubly linked list to provide a more flexible data operation method.
[0073] Illustratively, based on the above functional reconstruction operation, a target functional module can be obtained. Further, the interface standardization processing can be performed on the target functional module to obtain a target dependency library.
[0074] Based on the above steps S1131 to S1132, by functionally reconstructing multiple functional modules, a target functional module is obtained, and then the interface of the target functional module is standardized to obtain a target dependency library, which can eliminate redundant code and unnecessary functions, reduce the occupancy of memory and other system resources, and improve resource utilization.
[0075] Optionally, in step S12, the initial application is analyzed and processed to obtain a module to be optimized, including:
[0076] Step S121, obtaining performance indicators corresponding to the initial application, wherein the performance indicators include memory usage and response time corresponding to the initial application;
[0077] Step S122 : In response to the memory usage being greater than a preset usage threshold and the response time being greater than a preset time threshold, determining that the functional module corresponding to the current initial application is a module to be optimized.
[0078] The modules to be optimized include but are not limited to the diagnosis module, communication module, system service module and storage module in the initial application program.
[0079] For example, assuming that the preset occupancy threshold corresponding to the timer management module is 10MB and the preset time threshold is 250ms, when it is detected that the memory occupancy corresponding to the timer management module is greater than 10MB and the response time is greater than 250ms, the timer management module can be determined as a module to be optimized.
[0080] Based on the above steps S121 to S122, through performance testing and threshold monitoring mechanisms, functional modules that exceed preset thresholds can be promptly identified as modules to be optimized, thereby avoiding performance bottlenecks and improving system stability.
[0081] Optionally, in step S13, the module to be optimized is adjusted using the target dependency library to obtain a target application, including:
[0082] Step S131, determining the target functional module corresponding to the module to be optimized based on the target dependency library;
[0083] Step S132: Using the target functional module, the module to be optimized is adjusted to obtain a target application.
[0084] The above-mentioned target functional modules include but are not limited to a memory management module, a timer management module, a data structure management module and a code management module after functional reconstruction and interface standardization.
[0085] The memory management module adjusts the memory allocation and reclamation strategies in the modules being optimized. By introducing memory pool technology, it reduces the overhead of dynamic memory allocation, reduces memory fragmentation, and thus improves overall memory utilization. Furthermore, the memory management module provides standardized interfaces for memory operations, such as memory copy, clear, and alignment functions, to achieve efficient memory operations.
[0086] The timer management module is used to optimize the scheduling management of time and events. By providing different types of timers (such as periodic, single-trigger and countdown timers) and high-precision time event scheduling strategies, it ensures that time-sensitive tasks in the module to be optimized can be executed in a timely and accurate manner, thereby improving the real-time performance and stability of the system.
[0087] The data structure management module provides a series of efficient data structure implementations, such as circular queues, doubly linked lists, and hash maps, to replace inefficient data organization methods that may exist in the original system. These data structures are designed with full consideration of memory usage and access efficiency, making them particularly suitable for high-concurrency and large-scale data processing scenarios. They can effectively reduce data operation latency and improve response speed.
[0088] The Code Management module streamlines and refactors code. By modularizing the core functionality of system service modules and removing redundant code, it not only reduces application size but also enhances code readability and maintainability. The Code Management module also provides code optimization suggestions to help developers better understand and improve application logic, ensuring application quality while improving execution efficiency.
[0089] For example, the communication module in the original application often encounters problems such as data transmission delays and buffer overflows in high-concurrency communication scenarios. Therefore, if the program to be optimized is the communication module, its data structure and memory management adjustments are required. The corresponding target functional modules are the data structure management module and the memory management module.
[0090] For example, the diagnostic module in the original application often suffers from slow response and excessive memory usage when processing a large number of diagnostic requests. Therefore, if the module to be optimized is the diagnostic module, adjustments to its timer management, memory management, and data structure are required. The corresponding target functional modules are the timer management module, the data structure management module, and the memory management module.
[0091] Based on the above steps S131 to S132, by introducing target functional modules such as optimized memory management, timer management, data structure management and code management, memory consumption can be reduced, memory utilization efficiency can be improved, and the occupancy of CPU and storage resources can be reduced, so that the application can run more efficiently on limited hardware resources.
[0092] Optionally, the target functional module includes: a memory management module, a timer management module, a data structure management module, and a code management module. In step S132, the target functional module is used to adjust the module to be optimized to obtain a target application, including:
[0093] Step S1321, using the memory management module to adjust the memory management mechanism corresponding to the module to be optimized, to obtain a memory management application;
[0094] Step S1322: Using the timer management module, adjust the timer type corresponding to the module to be optimized to obtain a timer management application, where the timer types include periodic timer, single timer, and countdown timer.
[0095] Step S1323: Using the data structure management module to adjust the data structure type of the module to be optimized, wherein the data structure type includes at least one of the following: a circular queue, a doubly linked list, and a hash map;
[0096] Step S1324: Using the code management module to perform code management adjustments on the module to be optimized, thereby obtaining a code management application program, wherein the code management module is used to delete duplicate codes in the module to be optimized;
[0097] Step S1325 , merging the memory management application, the timer management application, the data structure management application, and the code management application to obtain a target application.
[0098] These periodic timers are primarily used for tasks that require regular execution, such as periodic vehicle status monitoring and system heartbeat detection. By setting a fixed period, periodic timers ensure stable and continuous execution of related tasks, avoiding the additional overhead of frequent checks and thus improving response speed.
[0099] The one-shot timer is used to execute a one-time scheduled task, such as starting a vehicle warm-up at a specific time or performing a diagnostic check. Unlike periodic timers, a one-shot timer automatically stops after completing its task, eliminating the need for continuous execution and reducing unnecessary resource consumption.
[0100] The countdown timer described above counts down to a specific time, triggering a corresponding action until the time expires. This type of timer provides precise timing control and enhances the user experience.
[0101] The aforementioned circular queue is a special linear data structure with a fixed size and internally loops. In ECUs, it's often used for message passing and task scheduling, particularly when processing continuous input and output operations. The advantage of a circular queue is that it avoids copying or moving elements when the queue is full, reducing memory overhead and data processing latency. For message queues in communication protocol stacks or data buffers in storage protocol stacks, using a circular queue can improve memory efficiency and data processing speed.
[0102] The aforementioned doubly linked list is a chain storage structure in which each node contains pointers to its predecessor and successor nodes. This makes it suitable for scenarios where element insertion and deletion are frequent, such as maintaining a dynamically changing list of diagnostic parameters in a diagnostic module. The advantage of a doubly linked list is that it can be traversed from front to back or back to front, providing more flexible data access. Furthermore, when inserting and deleting nodes, only the pointers to adjacent nodes need to be modified, without moving other nodes. This reduces memory operations and improves operational efficiency.
[0103] The hash map described above is an associative array-type data structure. By using a hash function to convert keys into indexes, it enables fast access to corresponding values. It is suitable for scenarios requiring efficient lookup, insertion, and deletion operations based on key values, such as managing connection status in communication modules and indexing data in storage modules. The advantage of a hash map is that it can achieve an average time complexity of approximately O(1), maintaining good performance even with very large amounts of data, thereby improving response speed and resource utilization efficiency.
[0104] For example, the diagnostic module is responsible for monitoring the operating status of the vehicle and providing diagnostic information when a fault occurs. As the functions of the vehicle increase, the amount and complexity of data that the diagnostic module needs to process are also increasing. The diagnostic module in the initial application often has problems with slow response and excessive memory usage when processing a large number of diagnostic requests. To address the above problems, the circular queue and Hash Map in the target dependency library can be integrated into the diagnostic module to replace the original queue and search algorithm. At the same time, the memory allocation and recovery logic in the diagnostic module can be replaced with the memory management module in the target dependency library, and a memory pool management mechanism can be used to reduce memory fragmentation. In addition, the timer management logic in the diagnostic module can be replaced with the timer management module in the basic dependency library to improve timing accuracy and task scheduling efficiency.
[0105] For example, the communication module is responsible for data transmission between various ECUs. With the advancement of vehicle intelligence and networking, the amount of data and communication frequency that the communication module needs to process have increased significantly. In the communication module of the initial application, problems such as data transmission delay and cache overflow often occur in high-concurrency communication scenarios. To address the above problems, the circular queue and bidirectional linked list functions in the target dependency library can be integrated into the communication module to optimize the management of message queues and connection lists. At the same time, the cache management logic in the communication module can be replaced with the memory pool management function in the target dependency library to improve cache utilization and hit rate. In addition, the data structure in the communication module can be replaced with the circular queue and Hash Map in the target dependency library to reduce data transmission delays.
[0106] For example, the storage module manages the vehicle's non-volatile memory (NVM), storing important data such as vehicle configuration information and driving data. As vehicle functionality increases, the amount of data the storage module must handle and the frequency of storage operations also increase. The storage module in the initial application often experiences storage delays and data loss during frequent read and write operations. To address these issues, the circular queue and doubly linked list in the target dependency library can be integrated into the storage module to optimize data buffer and storage queue management. Furthermore, the memory allocation logic in the storage module can be replaced with the memory pool management functionality in the target dependency library, reducing memory allocation and deallocation overhead. Furthermore, the data structures in the storage module can be replaced with the circular queue and hash map in the target dependency library, improving data storage and retrieval efficiency. Through memory pool management and data structure adjustments, the storage module significantly improves data reliability in abnormal situations such as power outages. Furthermore, the adjusted storage module has avoided memory leaks and data loss during long-term operation.
[0107] Furthermore, for different modules to be optimized, their corresponding target functional modules may be merged to obtain a target application corresponding to the current module to be optimized.
[0108] Based on the above steps S1321 to S1325, the target function module is used to adjust the module to be optimized, and the resulting target application can achieve efficient use of resources, improve system performance, enhance software stability and response speed, while simplifying the development and maintenance process and improving overall reliability and efficiency.
[0109] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0110] The present invention also provides a vehicle application program adjustment device for implementing the aforementioned embodiments and preferred implementations. Details already described will not be repeated. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. While the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0111] Figure 3 is a structural block diagram of a vehicle application adjustment device according to one embodiment of the present invention. Figure 3 As shown, the device includes:
[0112] An acquisition module 301 is configured to acquire a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes a plurality of functional modules, the plurality of functional modules being configured to adjust and process the initial application, and the initial application being configured to control the target vehicle to perform a vehicle control task;
[0113] An analysis module 302 is used to analyze and process the initial application program to obtain a module to be optimized;
[0114] An adjustment module 303 is configured to adjust the module to be optimized using a target dependency library to obtain a target application;
[0115] The control module 304 is configured to control the target vehicle to perform a vehicle control task based on the target application.
[0116] Optionally, the acquisition module 301 is also used to: obtain a basic dependency library, wherein the basic dependency library includes standardized application components, and the standardized application components are used to provide basic software services for the target vehicle; split the basic dependency library to obtain multiple functional modules; and reconstruct the multiple functional modules to obtain a target dependency library.
[0117] Optionally, the acquisition module 301 is further used to: perform functional reconstruction on multiple functional modules to obtain a target functional module; and perform interface standardization processing on the target functional module to obtain a target dependency library.
[0118] Optionally, the analysis module 302 is also used to: obtain performance indicators corresponding to the initial application, wherein the performance indicators include memory usage and response time corresponding to the initial application; in response to the memory usage being greater than a preset usage threshold, and the response time being greater than a preset time threshold, determine that the functional module corresponding to the current initial application is a module to be optimized.
[0119] Optionally, the adjustment module 303 is further configured to: determine a target functional module corresponding to the module to be optimized based on a target dependency library; and adjust the module to be optimized using the target functional module to obtain a target application.
[0120] Optionally, the target functional module includes: a memory management module, a timer management module, a data structure management module and a code management module, and the adjustment module 303 is also used to: use the memory management module to adjust the memory management mechanism corresponding to the module to be optimized to obtain a memory management application; use the timer management module to adjust the timer type corresponding to the module to be optimized to obtain a timer management application, wherein the timer type includes a periodic timer, a single timer, and a countdown timer; use the data structure management module to adjust the data structure type of the module to be optimized, wherein the data structure type includes at least one of the following: a circular queue, a bidirectional linked list, and a hash mapping table; use the code management module to perform code management adjustment on the module to be optimized to obtain a code management application, wherein the code management module is used to delete duplicate code in the module to be optimized; merge the memory management application, the timer management application, the data structure management application and the code management application to obtain the target application.
[0121] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0122] According to another aspect of an embodiment of the present invention, a vehicle is also provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement any one of the vehicle application adjustment methods of the embodiments of the present invention.
[0123] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0124] S1, obtaining a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes multiple functional modules, the multiple functional modules are used to adjust and process the initial application, and the initial application is used to control the target vehicle to perform a vehicle control task;
[0125] S2, analyze and process the initial application to obtain the module to be optimized;
[0126] S3, using the target dependency library to adjust the module to be optimized to obtain the target application;
[0127] S4, controlling the target vehicle to perform a vehicle control task based on the target application.
[0128] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, which includes a stored executable program, wherein when the executable program is running, the device where the storage medium is located is controlled to execute any one of the vehicle application adjustment methods in the embodiments of the present invention.
[0129] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0130] S1, obtaining a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes multiple functional modules, the multiple functional modules are used to adjust and process the initial application, and the initial application is used to control the target vehicle to perform a vehicle control task;
[0131] S2, analyze and process the initial application to obtain the module to be optimized;
[0132] S3, using the target dependency library to adjust the module to be optimized to obtain the target application;
[0133] S4, controlling the target vehicle to perform a vehicle control task based on the target application.
[0134] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0135] According to another aspect of an embodiment of the present invention, a computer program product is further provided. The computer program product includes computer instructions. When the computer instructions are executed by a processor, the vehicle application adjustment method according to any one of the embodiments of the present invention is implemented.
[0136] Optionally, in this embodiment, the computer program product may be configured as a computer program for executing the following steps:
[0137] S1, obtaining a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes multiple functional modules, the multiple functional modules are used to adjust and process the initial application, and the initial application is used to control the target vehicle to perform a vehicle control task;
[0138] S2, analyze and process the initial application to obtain the module to be optimized;
[0139] S3, using the target dependency library to adjust the module to be optimized to obtain the target application;
[0140] S4, controlling the target vehicle to perform a vehicle control task based on the target application.
[0141] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0142] In the above embodiments of the present invention, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0143] 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 the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0144] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, and can be electrical or other forms.
[0145] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0146] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0147] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk, etc. Various media that can store program codes.
[0148] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A vehicle application adjustment method, characterized in that: include: Obtaining a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes a plurality of functional modules, the plurality of functional modules being used to adjust and process the initial application, and the initial application being used to control the target vehicle to perform a vehicle control task; Analyzing and processing the initial application to obtain a module to be optimized; Using the target dependency library to adjust the module to be optimized to obtain a target application; The target vehicle is controlled to perform the vehicle control task based on the target application.
2. The vehicle application adjustment method according to claim 1, characterized in that: The obtaining of the target dependency library includes: Acquire a basic dependency library, wherein the basic dependency library includes standardized application components, and the standardized application components are used to provide basic software services for the target vehicle; Segmenting the basic dependency library to obtain the multiple functional modules; Reconstruct the multiple functional modules to obtain the target dependency library.
3. The vehicle application adjustment method according to claim 2, characterized in that: The reconstructing the plurality of functional modules to obtain the target dependency library includes: Performing functional reconstruction on the multiple functional modules to obtain a target functional module; Perform interface standardization processing on the target functional module to obtain the target dependency library.
4. The vehicle application adjustment method according to claim 1, characterized in that: The analyzing and processing the initial application to obtain the module to be optimized includes: Obtaining performance indicators corresponding to the initial application, wherein the performance indicators include memory usage and response time corresponding to the initial application; In response to the memory occupancy being greater than a preset occupancy threshold, and the response time being greater than a preset time threshold, it is determined that the functional module corresponding to the current initial application is the module to be optimized.
5. The vehicle application adjustment method according to claim 3, characterized in that: The step of adjusting the module to be optimized by using the target dependency library to obtain a target application comprises: Determine the target functional module corresponding to the module to be optimized based on the target dependency library; The target function module is used to adjust the module to be optimized to obtain a target application program.
6. The vehicle application adjustment method according to claim 5, characterized in that: The target functional modules include: a memory management module, a timer management module, a data structure management module, and a code management module. The target functional modules are used to adjust the modules to be optimized to obtain a target application, including: Utilizing the memory management module to adjust the memory management mechanism corresponding to the module to be optimized to obtain a memory management application; Using the timer management module to adjust the timer type corresponding to the module to be optimized to obtain a timer management application, wherein the timer type includes a periodic timer, a single timer, and a countdown timer; Using the data structure management module to adjust the data structure type of the module to be optimized, wherein the data structure type includes at least one of the following: a circular queue, a bidirectional linked list, and a hash map; Using the code management module to perform code management adjustment on the module to be optimized to obtain a code management application, wherein the code management module is used to delete duplicate codes in the module to be optimized; The memory management application, the timer management application, the data structure management application, and the code management application are merged to obtain the target application.
7. A vehicle application adjustment device, characterized in that: include: an acquisition module, configured to acquire a target dependency library and an initial application corresponding to a target vehicle, wherein the target dependency library includes a plurality of functional modules, the plurality of functional modules being configured to adjust and process the initial application, and the initial application being configured to control the target vehicle to perform a vehicle control task; An analysis module, configured to analyze and process the initial application program to obtain a module to be optimized; An adjustment module, configured to adjust the module to be optimized using the target dependency library to obtain a target application; A control module is used to control the target vehicle to perform the vehicle control task based on the target application.
8. A vehicle, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the vehicle application adjustment method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the storage medium is located is controlled to execute the vehicle application adjustment method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product includes computer instructions, which, when executed by a processor, implement the vehicle application adjustment method described in any one of claims 1 to 6.