Vehicle-mounted application operation method and device, vehicle, storage medium and program product
By dividing on-board applications into UI processes and business logic processing processes, and only loading UI resources at initial startup, the problems of slow startup speed and high memory usage of traditional on-board applications are solved, and a smoother user experience and improved system is achieved performance.
Patent Information
- Application Number
- CN202411169041.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-17
AI Technical Summary
Traditional on-board applications have slow startup speed and high memory usage, which affects the performance of on-board infotainment systems.
By dividing on-board applications into user interface UI processes and business logic processing processes, and only loading UI resources at initial startup, using lightweight inter-process communication mechanisms for data exchange, delaying loading of non-critical resources, and optimizing memory management.
It significantly improves the startup speed and memory utilization of on-board applications, reduces resource competition, and improves user experience and system performance.
Smart Images

Figure CN119149128A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle technology, and in particular to a method, device, vehicle, storage medium and program product for running an in-vehicle application. Background Art
[0002] With the rapid development of the automotive industry and the increasing demand of consumers for intelligent driving experience, the number and complexity of in-vehicle applications are also increasing. In order to meet these needs, modern cars are equipped with a variety of advanced in-vehicle infotainment systems that integrate multiple functions and services such as navigation, multimedia playback, vehicle health monitoring, etc.
[0003] However, with the increase in in-vehicle applications and the complexity of their functions, the demand for memory and processor resources of the in-vehicle system has become higher. The traditional way of starting in-vehicle applications usually involves loading a large amount of resources and initializing multiple services, which leads to slow application startup and high memory usage. These problems directly affect the user experience and the overall performance of the in-vehicle infotainment system.
[0004] Specifically, traditional in-vehicle applications have the following main problems when starting up: 1. Slow startup speed: Since a large amount of resources need to be loaded and services need to be initialized, the application startup time is relatively long; 2. High memory usage: The resources and services loaded when the application starts take up a large amount of memory, especially in a resource-limited in-vehicle environment, which may lead to insufficient resources for other important services; 3. Degraded performance of the in-vehicle infotainment system: Excessive memory usage can cause system freezes and affect the user experience. Summary of the invention
[0005] The present application provides a method, device, vehicle, storage medium and program product for running an in-vehicle application to solve the problems that the in-vehicle application occupies a large amount of memory and has a slow startup speed when starting, thereby affecting the performance of the in-vehicle infotainment system.
[0006] The first aspect of the present application provides a method for running an in-vehicle application, including the following steps: obtaining the current state of a target in-vehicle application of the vehicle; if the current state is initial startup, loading the target UI resource of the target in-vehicle application based on the UI (User Interface) process of the target in-vehicle application, otherwise identifying the user's operation; triggering the UI process and / or business logic processing process corresponding to the target in-vehicle application based on the user's operation, and running the target in-vehicle application based on the corresponding UI process and / or business logic processing process.
[0007] Optionally, in one embodiment of the present application, loading the target UI resources of the target in-vehicle application based on the UI process of the target in-vehicle application includes: loading the basic interface layout and basic icon resources of the target in-vehicle application.
[0008] Optionally, in one embodiment of the present application, the UI process is used to render interface elements and process user input, and the business logic processing process is used to execute specific business logic and data processing tasks.
[0009] Optionally, in one embodiment of the present application, before obtaining the current state of the target in-vehicle application of the vehicle, it also includes: dividing the operation of the target in-vehicle application into a user interface UI process and a business logic processing process.
[0010] Optionally, in one embodiment of the present application, data is exchanged between the UI process and the business logic processing process through a lightweight inter-process communication mechanism.
[0011] The second aspect of the present application provides a vehicle-mounted application running device, including: an acquisition module, used to obtain the current state of a target vehicle-mounted application of a vehicle; a loading module, used to load the target UI resource of the target vehicle-mounted application based on the user interface UI process of the target vehicle-mounted application if the current state is initial startup, otherwise identifying the user's operation; an running module, used to trigger the UI process and / or business logic processing process corresponding to the target vehicle-mounted application based on the user's operation, and run the target vehicle-mounted application based on the corresponding UI process and / or business logic processing process.
[0012] Optionally, in one embodiment of the present application, the loading module is further used to: load the basic interface layout and basic icon resources of the target vehicle-mounted application.
[0013] Optionally, in one embodiment of the present application, the UI process is used to render interface elements and process user input, and the business logic processing process is used to execute specific business logic and data processing tasks.
[0014] Optionally, in one embodiment of the present application, it also includes: a division module, which is used to divide the operation of the target in-vehicle application into a user interface UI process and a business logic processing process before obtaining the current state of the target in-vehicle application of the vehicle.
[0015] Optionally, in one embodiment of the present application, data is exchanged between the UI process and the business logic processing process through a lightweight inter-process communication mechanism.
[0016] A third aspect of the present application provides a vehicle, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to execute a vehicle-mounted application operating method as described in the above embodiment.
[0017] The fourth aspect of the present application provides a computer-readable storage medium on which a computer program or instruction is stored. The computer program or instruction is executed by a processor to perform a method for running an in-vehicle application.
[0018] The fifth aspect of the present application provides a computer program product, including a computer program or instructions. When the computer program or instructions are executed, the vehicle-mounted application running method as described in the above embodiment is implemented.
[0019] Therefore, this application has at least the following beneficial effects:
[0020] The embodiment of the present application can load the target UI resource of the vehicle-mounted application only based on the UI process when the vehicle-mounted application is initially started, thereby avoiding excessive memory usage of the vehicle-mounted application when it is started, effectively improving the startup speed and memory utilization of the vehicle-mounted application. Otherwise, the UI process and business logic processing process corresponding to the target vehicle-mounted application are triggered based on the user's operation, and the target vehicle-mounted application is run based on the corresponding UI process and business logic processing process, providing users with a smoother application experience, thereby improving the performance of the vehicle-mounted infotainment system. As a result, the technical problems such as high memory usage and slow startup speed when the vehicle-mounted application is started, which in turn affects the performance of the vehicle-mounted infotainment system, are solved.
[0021] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0023] Figure 1 A flowchart of a method for running an in-vehicle application according to an embodiment of the present application;
[0024] Figure 2 A schematic diagram of a vehicle-mounted application running device provided according to an embodiment of the present application;
[0025] Figure 3 It is a schematic diagram of the structure of a vehicle provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0026] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0027] The following describes the vehicle application operation method, device, vehicle, storage medium and program product of the embodiment of the present application with reference to the accompanying drawings. In view of the traditional vehicle application startup method mentioned in the background technology center, which usually involves loading a large amount of resources and initializing multiple services, this leads to a slow application startup speed and high memory usage, which directly affects the user experience and the overall performance of the vehicle infotainment system. The present application provides a vehicle application operation method, in which the target UI resource of the vehicle application can be loaded only based on the UI process when the vehicle application is initially started, thereby avoiding excessive memory usage of the vehicle application at startup, effectively improving the startup speed and memory utilization of the vehicle application, otherwise the UI process and business logic processing process corresponding to the target vehicle application are triggered based on the user's operation, and the target vehicle application is run based on the corresponding UI process and business logic processing process. In this way, the problem of high memory usage and slow startup speed when the vehicle application is started, which in turn affects the performance of the vehicle infotainment system, is solved.
[0028] Specifically, Figure 1 A flowchart of a method for running an in-vehicle application provided in an embodiment of the present application.
[0029] like Figure 1 As shown, the vehicle-mounted application running method includes the following steps:
[0030] In step S101 , the current state of a target in-vehicle application of the vehicle is obtained.
[0031] Among them, the target vehicle-mounted application is the application that the user wants to run or load on the vehicle-mounted infotainment system, which can be any software, such as a music APP or a video APP. The status of the target vehicle-mounted application can be the initial startup and subsequent operation based on the user's operation.
[0032] It can be understood that the embodiments of the present application can obtain the current state of the target in-vehicle application of the vehicle so as to subsequently determine how to run the target in-vehicle application based on the current state.
[0033] In an embodiment of the present application, before obtaining the current state of the target in-vehicle application of the vehicle, it also includes: dividing the operation of the target in-vehicle application into a UI process and a business logic processing process.
[0034] Among them, the UI process is used to render interface elements and process user input, and the business logic processing process is used to execute specific business logic and data processing tasks. The UI process and the business logic processing process exchange data through a lightweight inter-process communication mechanism, which can exchange data quickly and reliably while keeping communication overhead to a minimum.
[0035] It can be understood that the embodiments of the present application can divide the operation of the target vehicle-mounted application into a UI process and a business logic processing process, and clearly divide the responsibility scope of the UI process and the business logic processing process, so that the subsequent UI process and the business logic processing process can respectively run the target vehicle-mounted application based on their own responsibility scope.
[0036] The UI process and the business logic processing process of the embodiment of the present application are independent of each other, and an abnormality in one process will not affect the normal operation of another process, thereby enhancing the stability and reliability of the application to a certain extent.
[0037] In addition, it should be noted that Android provides a variety of IPC (Inter-Process Communication) mechanisms, such as Intent, Binder, AIDL, etc., which allow data exchange and method calls between different processes. Binder is based on the C / S architecture, and only needs to copy data once for cross-process communication, while pipes, message queues, and sockets all need to copy data twice, and the shared memory method does not require any memory copy; from a performance perspective, although Binder's performance is worse than pipes and other methods, it is not as good as shared memory.
[0038] However, the receiver of traditional Linux IPC cannot obtain the reliable UID / PID of the other process, and can only fill in the UID / PID in the transmitted data packet by the user, which makes it very easy to forge the identity; Binder is different. The reliable identity tag is only added in the kernel by the IPC mechanism itself. Binder does this, and is not controlled by the user application. It directly adds the process identity tag to the data in the kernel. Therefore, considering all factors, Binder is more suitable for the IPC interaction between the system_server process and the upper APP layer. Therefore, the inter-process communication in the embodiment of this application can adopt the Binder mechanism.
[0039] In step S102 , if the current state is initial startup, a target UI resource of the target in-vehicle application is loaded based on the user interface UI process of the target in-vehicle application, otherwise a user operation is identified.
[0040] It can be understood that the embodiment of the present application can load the target UI resources of the target vehicle application based on the UI process of the target vehicle application when the current state of the target vehicle application is the initial startup, thereby significantly reducing the memory usage when the vehicle application is started, speeding up the application startup speed, and improving the user experience. Otherwise, if it is not the initial startup, the user's operation on the target vehicle application is identified.
[0041] In an embodiment of the present application, loading target UI resources of a target in-vehicle application based on a UI process of the target in-vehicle application includes: loading a basic interface layout and basic icon resources of the target in-vehicle application.
[0042] It can be understood that when the target vehicle-mounted application is initially started, the embodiment of the present application only loads the basic interface layout and basic icon resources of the target vehicle-mounted application based on the UI, and other resources can be loaded later or on demand, thereby effectively improving the startup speed and operating efficiency of the vehicle-mounted application.
[0043] In step S103 , the UI process and / or the business logic processing process corresponding to the target vehicle-mounted application is triggered based on the user's operation, and the target vehicle-mounted application is run based on the corresponding UI process and / or the business logic processing process.
[0044] It can be understood that the embodiments of the present application can trigger the UI process and business logic processing process corresponding to the target vehicle-mounted application based on the user's operation, and run the target vehicle-mounted application based on the corresponding UI process and / or business logic processing process, so that the corresponding UI process and business logic processing process can be triggered based on the user's needs, and then the corresponding part of the target vehicle-mounted application can be run according to the user's needs, thereby optimizing the use of vehicle-mounted application running resources, reducing resource competition, reducing the phenomenon of vehicle-mounted application running jams, and improving the fluency of vehicle-mounted applications.
[0045] It should be noted that the corresponding target UI resources (key resources) are loaded when the in-vehicle application is initially started. Other non-key resources can be loaded based on user operations or automatically delayed if the user does not operate.
[0046] Specifically, the vehicle-mounted application operation method of the embodiment of the present application includes:
[0047] 1. Process separation strategy: The key lies in how to efficiently divide and manage different processes to optimize memory usage. Services that need to run continuously in the background, such as hardware button switching and seat adjustment to monitor driving modes, are concentrated in a dedicated process. At the same time, other non-persistent background running requirements, such as user interface UI display, are handled by another independent process. In this way, the scope of responsibilities of the UI process and the business logic processing process are clearly distinguished: the UI process is mainly responsible for the rendering of interface elements and the processing of user input; while the business logic processing process focuses on completing specific business operations and data processing.
[0048] 2. During the startup of the in-vehicle infotainment system, not all applications need to start their user interface UI process immediately. If an application's UI process is activated, it must load the necessary resources, including the basic interface layout and commonly used icons. However, for those resources that are not critical in the initial stage, you can choose not to load them immediately. Through the separation management of processes, key business processing processes are started only when necessary, and non-urgent resources can be loaded later. Only when it is necessary to display a specific application interface, the corresponding UI process is activated to reduce the memory usage when the application starts, thereby realizing delayed loading and on-demand loading of resources, effectively improving the system's startup speed and operating efficiency.
[0049] 3. Lightweight inter-process communication (IPC): Design an efficient IPC mechanism to ensure that data can be exchanged quickly and reliably between the UI process and the business logic processing process while minimizing communication overhead.
[0050] In addition, the Intent mechanism can also be used to exchange data and jump interfaces between the process and the business logic processing process.
[0051] 4. Memory management optimization: Adopt memory recycling and reuse strategies to release resources that are no longer in use in a timely manner, and use technologies such as memory pools to effectively manage memory to avoid performance losses caused by frequent application and release of memory.
[0052] In addition, this application can also set appropriate priorities for different processes to ensure that key processes obtain necessary resources, and reclaim resources in a timely manner for processes that are no longer in use. Technologies such as memory pools can also be introduced to achieve efficient reuse of memory resources, thereby optimizing overall system performance and preventing application crashes caused by memory overflow.
[0053] Therefore, this application has the following effects:
[0054] 1. Significantly reduce the memory usage when starting in-vehicle applications, speed up application startup, and improve user experience.
[0055] 2. By optimizing the use of resources, the resource competition of the in-vehicle infotainment system is reduced, the lag of the in-vehicle infotainment system is reduced, and the fluency of the in-vehicle infotainment system is improved.
[0056] 3. Enhance the stability and reliability of the application. Since the UI process and the business logic processing process are independent of each other, an abnormality in one process will not affect the normal operation of the other process.
[0057] 4. Easy to develop and maintain. The clear division of process responsibilities allows developers to focus more on code development and performance optimization in their respective fields.
[0058] According to the in-vehicle application running method proposed in the embodiment of the present application, when the in-vehicle application is initially started, only the target UI resources of the in-vehicle application can be loaded based on the UI process, thereby avoiding excessive memory occupation of the in-vehicle application when it is started, and effectively improving the startup speed and memory utilization of the in-vehicle application. Otherwise, the UI process and business logic processing process corresponding to the target in-vehicle application are triggered based on the user's operation, and the target in-vehicle application is run based on the corresponding UI process and business logic processing process, providing users with a smoother application experience, thereby improving the performance of the in-vehicle infotainment system.
[0059] Next, the in-vehicle application running device proposed according to the embodiment of the present application is described with reference to the accompanying drawings.
[0060] Figure 2 It is a block diagram of a vehicle-mounted application running device according to an embodiment of the present application.
[0061] like Figure 2 As shown, the vehicle-mounted application running device 10 includes: an acquisition module 100 , a loading module 200 and a running module 300 .
[0062] Among them, the acquisition module 100 is used to obtain the current state of the target in-vehicle application of the vehicle; the loading module 200 is used to load the target UI resources of the target in-vehicle application based on the user interface UI process of the target in-vehicle application if the current state is the initial startup, otherwise identify the user's operation; the running module 300 is used to trigger the UI process and / or business logic processing process corresponding to the target in-vehicle application based on the user's operation, and run the target in-vehicle application based on the corresponding UI process and / or business logic processing process.
[0063] In the embodiment of the present application, the loading module 200 is further used to: load the basic interface layout and basic icon resources of the target vehicle-mounted application.
[0064] In the embodiment of the present application, the UI process is used to render interface elements and process user input, and the business logic processing process is used to execute specific business logic and data processing tasks.
[0065] In the embodiment of the present application, the device 10 of the embodiment of the present application further includes: a division module.
[0066] The division module is used to divide the operation of the target in-vehicle application into a user interface UI process and a business logic processing process before obtaining the current state of the target in-vehicle application of the vehicle.
[0067] In an embodiment of the present application, data is exchanged between the UI process and the business logic processing process through a lightweight inter-process communication mechanism.
[0068] It should be noted that the above explanation of the embodiment of the vehicle-mounted application running method is also applicable to the vehicle-mounted application running device of this embodiment, and will not be repeated here.
[0069] According to the in-vehicle application running device proposed in the embodiment of the present application, when the in-vehicle application is initially started, only the target UI resources of the in-vehicle application can be loaded based on the UI process, thereby avoiding excessive memory occupation of the in-vehicle application when it is started, and effectively improving the startup speed and memory utilization of the in-vehicle application. Otherwise, the UI process and business logic processing process corresponding to the target in-vehicle application are triggered based on the user's operation, and the target in-vehicle application is run based on the corresponding UI process and business logic processing process, providing users with a smoother application experience, thereby improving the performance of the in-vehicle infotainment system.
[0070] Figure 3 A schematic diagram of the structure of a vehicle provided in an embodiment of the present application. The vehicle may include:
[0071] A memory 301 , a processor 302 , and a computer program stored in the memory 301 and executable on the processor 302 .
[0072] When the processor 302 executes the program, the vehicle-mounted application running method provided in the above embodiment is implemented.
[0073] Furthermore, the vehicle also includes:
[0074] The communication interface 303 is used for communication between the memory 301 and the processor 302 .
[0075] The memory 301 is used to store computer programs that can be run on the processor 302 .
[0076] The memory 301 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0077] If the memory 301, the processor 302 and the communication interface 303 are implemented independently, the communication interface 303, the memory 301 and the processor 302 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0078] Optionally, in a specific implementation, if the memory 301, the processor 302 and the communication interface 303 are integrated on a chip, the memory 301, the processor 302 and the communication interface 303 can communicate with each other through an internal interface.
[0079] The processor 302 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0080] An embodiment of the present application also provides a computer-readable storage medium on which a computer program or instruction is stored. When the computer program or instruction is executed by a processor, the above-mentioned vehicle-mounted application operation method is implemented.
[0081] An embodiment of the present application also provides a computer program product, including a computer program or instructions, which, when executed, implements the above-mentioned vehicle-mounted application running method.
[0082] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0083] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0084] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0085] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of multiple of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0086] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
Claims
1. A method for running an in-vehicle application, characterized in that: The following steps are involved: Get the current status of the target vehicle application; If the current state is initial startup, then loading the target UI resource of the target in-vehicle application based on the user interface UI process of the target in-vehicle application, otherwise identifying the user's operation; The UI process and / or the business logic processing process corresponding to the target vehicle-mounted application is triggered based on the user's operation, and the target vehicle-mounted application is run based on the corresponding UI process and / or the business logic processing process.
2. The vehicle-mounted application operation method according to claim 1, characterized in that: The loading of the target UI resource of the target in-vehicle application based on the UI process of the target in-vehicle application includes: The basic interface layout and basic icon resources of the target vehicle-mounted application are loaded.
3. The vehicle-mounted application operation method according to claim 1, characterized in that: The UI process is used to render interface elements and process user input, and the business logic processing process is used to execute specific business logic and data processing tasks.
4. The vehicle-mounted application operation method according to claim 1, characterized in that: Before obtaining the current state of the target vehicle application, it also includes: The operation of the target vehicle-mounted application is divided into a user interface UI process and a business logic processing process.
5. The vehicle-mounted application operation method according to any one of claims 1 to 4, characterized in that: The UI process and the business logic processing process exchange data through a lightweight inter-process communication mechanism.
6. A vehicle-mounted application running device, characterized in that: include: An acquisition module, used to acquire the current state of a target vehicle-mounted application of the vehicle; A loading module, configured to load a target UI resource of the target in-vehicle application based on the user interface UI process of the target in-vehicle application if the current state is an initial startup, and otherwise identify a user operation; A running module is used to trigger the UI process and / or business logic processing process corresponding to the target vehicle-mounted application based on the user's operation, and run the target vehicle-mounted application based on the corresponding UI process and / or business logic processing process.
7. The vehicle-mounted application running device according to claim 6, characterized in that: The loading module is further used for: The basic interface layout and basic icon resources of the target vehicle-mounted application are loaded.
8. A vehicle, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the vehicle-mounted application running method as described in any one of claims 1 to 5.
9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: The computer program or instruction is executed by a processor to implement the in-vehicle application running method as described in any one of claims 1-5.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed, the in-vehicle application running method as described in any one of claims 1-5 is implemented.
