Application starting control method and device, electronic equipment and vehicle
By using the application prediction model in the vehicle computer system to predict user intentions and adjust resource scheduling, the startup time-consuming problem caused by delayed loading is solved, and the application startup speed and user experience are improved.
Patent Information
- Application Number
- CN202411363568.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-27
AI Technical Summary
When starting the application, the delayed loading strategy will take a long time, which will affect the user experience.
When receiving user operations, use the application prediction model to obtain vehicle operation data, vehicle system operation data and user behavior data, predict the target application that the user intends to start, and adjust the central processor resource scheduling method when the target application is in a closed state and perform memory preset processing to reserve resources in advance.
It shortens the time-consuming application startup process and improves the smoothness and user experience of the vehicle system.
Smart Images

Figure CN119201280A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of application control technology, and in particular to an application startup control method, device, electronic equipment and vehicle. Background Art
[0002] With the rapid development of the automobile industry, more intelligent functions and better car-using experience are provided to users. There are more and more applications installed on the car system, and the functions of the applications are becoming more powerful. As a result, the load of the car system is getting higher and higher. At present, in order to avoid unnecessary waste of resources and save memory, the system often adopts a delayed loading strategy, that is, delaying the loading of certain resources or functions until these resources or functions are really needed. However, there is a problem of long time consumption when using this strategy to start a closed application, which causes users to subjectively believe that the car system has been stuck, affecting the user experience. Summary of the invention
[0003] The embodiments of the present application provide an application startup control method, device, electronic device and vehicle to solve the problem of how to shorten the time consumption of the application startup process and make the vehicle system run more smoothly.
[0004] In a first aspect, an embodiment of the present application provides an application startup control method, which is applied to a vehicle system, wherein the vehicle system is provided with an application prediction model for predicting a user's intention to start an application, and the method comprises:
[0005] Upon receiving a first operation performed by the user on the vehicle system, obtaining vehicle operation data, vehicle system operation data and user behavior data;
[0006] Inputting the vehicle operation data, the vehicle system operation data and the user behavior data into the application prediction model to predict the target application that the user intends to start when performing the first operation;
[0007] When the target application is in a closed state, the scheduling mode of the central processing unit resources is adjusted based on the resource information required to start the target application, and the memory is preset.
[0008] In a second aspect, an embodiment of the present application further provides an application startup control device, which is applied to a vehicle system, wherein the vehicle system is provided with an application prediction model for predicting a user's intention to start an application, and the device comprises:
[0009] A first acquisition module, configured to acquire vehicle operation data, vehicle system operation data and user behavior data upon receiving a first operation performed by a user on the vehicle system;
[0010] A prediction module, configured to input the vehicle operation data, the vehicle system operation data and the user behavior data into the application prediction model, and predict a target application that the user intends to start when performing the first operation;
[0011] The processing module is used to adjust the scheduling mode of the central processing unit resources and perform preset processing on the memory based on the resource information required to start the target application when the target application is in a closed state.
[0012] In a third aspect, an embodiment of the present application further provides an electronic device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the above-mentioned application startup control method when executed by the processor.
[0013] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned application startup control method is implemented.
[0014] In a fifth aspect, an embodiment of the present application further provides a vehicle, comprising a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the above-mentioned application startup control method.
[0015] The embodiments of the present application include at least the following technical effects:
[0016] The technical solution of the embodiment of the present application, when receiving the first operation performed by the user on the vehicle system, takes into account that the application that the user intends to open is closely related to the vehicle operation status, the vehicle system operation status and the user status, so the vehicle operation data, the vehicle system operation data and the user behavior data can be obtained and input into the application prediction model to predict the target application that the user intends to start when performing the first operation. After determining the target application that the user intends to start, the state of the target application is judged. When the target application is in a closed state, since the closed application requires more CPU resources and memory when it is started, if the CPU resources are not scheduled in time or the memory is insufficient during the startup process, it will affect the startup speed of the application. Based on this, the present application determines the target application. When the target application is applied and it is determined that the target application is in a closed state, the resource information required to start the target application is further determined, and then based on the resource information, the scheduling method of the central processing unit resources can be adjusted, and the memory can be pre-cleaned. Since the adjustment of the CPU resource scheduling method and the memory cleaning operation are performed when the first operation is received, compared with the delayed loading strategy adopted by the prior art, that is, no operation is performed before the second operation corresponding to the first operation is received, the present application makes full use of the period between the first operation and the second operation, and can reserve the central processing unit resources and memory space in advance, so that when the start request of the target application is received, the time consumed in the process of starting the target application can be shortened, so that the vehicle system can run more smoothly and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 This is one of the flow charts of the application startup control method provided in the embodiment of the present application;
[0018] Figure 2 This is the second flow chart of the application startup control method provided in the embodiment of the present application;
[0019] Figure 3 is a structural diagram of an application startup control device provided in an embodiment of the present application;
[0020] Figure 4 A block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0022] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0023] In the various embodiments of the present application, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0024] In the prior art, as more and more applications are installed on the vehicle system, the load of the vehicle system is also increasing. In order to avoid unnecessary waste of resources and save memory, the system often adopts a delayed loading strategy, that is, delaying the loading of certain resources or functions until these resources or functions are really needed. However, when using this strategy to start a closed application, it takes a long time, which causes users to subjectively believe that the vehicle system is stuck, affecting the user experience.
[0025] In view of this, the present application provides an application startup control method, device, electronic device and vehicle. After receiving a first operation performed by a user, the present application can predict the target application that the user intends to start by performing the first operation, and then determine the resource information required to start the target application, and based on the resource information, adjust the scheduling method of the CPU resources, and perform preset processing on the memory. Compared with the prior art that does not perform any operation after the first operation and before the second operation, the present application makes full use of this period to reserve the central processing unit resources and memory space in advance, so that when receiving a startup request of the target application, the time consumption of starting the target application can be shortened, so that the vehicle system runs more smoothly and improves the user experience.
[0026] like Figure 1 As shown, an embodiment of the present application provides an application startup control method, the method comprising:
[0027] Step 101: upon receiving a first operation performed by a user on a vehicle computer system, obtaining vehicle operation data, vehicle computer system operation data and user behavior data.
[0028] The application startup control method provided in the embodiment of the present application is applied to a vehicle computer system, in which an application prediction model trained based on user application usage record data is provided to predict the user's intention to start the application.
[0029] When the vehicle system is turned on, the user can open any application installed on the vehicle system. The application here can be an application that comes with the vehicle system or an application downloaded by the user. When the user intends to open an application, he can use a variety of methods to send a startup instruction to the vehicle system, so that the vehicle system starts the application corresponding to the application identifier based on the application identifier carried in the startup instruction triggered by the user. Among them, when the vehicle system starts an application, the startup time mainly depends on the startup method of the application and the current load of the vehicle system.
[0030] Specifically, the startup methods include cold start, hot start and warm start. Among them, when the application is in a completely closed state, for example, an application installed for the first time, an application that has not been used for a long time, these applications do not retain any processes and data in the memory. When starting, the system and the application need to initialize and load resources from scratch. The startup method of such applications is cold start. When the application is not completely closed, that is, it is not running in the foreground, but some processes or data are retained in the background. For example, the user reopens an application that was used not long ago but was switched to the background for a period of time from the recent application list, and the application is restarted after the system partially clears resources in the background. When these applications are started, the system and the application do not need to start completely from scratch like a cold start, but they are not completely active. The startup method of such applications is warm start. When the startup of an application is just switching from the background to the foreground, for example, when the user is using an application, he briefly switches to another application, and then quickly switches back. The application remains active in the background and the system does not clean up its resources. Almost all the resources and states of such applications remain intact. At startup, the system and the application do not need to perform substantial initialization or resource allocation operations. The startup method of such applications is hot start.
[0031] There are differences in the corresponding startup methods based on different application states. When the application is started in warm start or cold start mode, it requires more central processing unit (CPU) resources and memory compared to hot start. In addition, if the CPU resources are not scheduled in time or the memory is insufficient during the startup process, it will affect the startup speed of the application, prolong the user's waiting time, and give the user a system lag experience.
[0032] In an embodiment of the present application, when the vehicle system is in a startup state, a first operation performed by a user on the vehicle system can be monitored. The first operation here can be a pressing operation on any touch screen of the vehicle system, or a pressing operation of a button on the steering wheel for operating the vehicle system, or a voice command issued by the user received by a voice receiving module of the vehicle system.
[0033] It should be noted that the operation corresponding to the first operation is the second operation. When the first operation is a pressing operation on any touch screen of the vehicle system, the second operation is a lifting operation corresponding to the pressing operation. When the first operation is a pressing operation of a button on the steering wheel used to operate the vehicle system, the second operation is a lifting operation corresponding to the pressing operation. When the first operation is a voice receiving module of the vehicle system receiving a voice command issued by a user, the second operation is an operation of generating a control command based on the voice command.
[0034] It should be further explained that there is a time difference between the first operation and the second operation. Only after the second operation is performed can the vehicle system clearly understand the user's operation intention and respond.
[0035] The embodiment of the present application monitors the first operation performed by the user on the vehicle system, and when the first operation performed by the user on the vehicle system is received, since the application that the user intends to open is closely related to the vehicle operation status, the vehicle system operation status and the user status, the vehicle operation data, the vehicle system operation data and the user behavior data can be obtained.
[0036] The vehicle operation data here may include vehicle driving parameters, such as vehicle speed, operating time, etc., and may also include vehicle driving road condition information, such as information indicating whether the road is congested, information indicating the road type, etc. The vehicle system operation data may include application usage information in the vehicle system, such as the usage time of each application, the application identifier corresponding to the last opened application, etc. The user behavior data may include the trigger source of the first operation triggered by the user, the user's status information, such as information indicating whether the user is driving fatigued, information indicating the type and number of occupants in the vehicle, etc.
[0037] Step 102: Input the vehicle operation data, the vehicle system operation data and the user behavior data into the application prediction model to predict the target application that the user intends to start when performing the first operation.
[0038] Specifically, after obtaining the vehicle operation data, the vehicle system operation data and the user behavior data, they are input into the application prediction model set in the vehicle system, which is trained based on the user application usage record data and is used to predict the user's intention to launch the application, and predict the target application that the user intends to launch when performing the first operation.
[0039] Step 103: When the target application is in a closed state, based on the resource information required to start the target application, the scheduling method of the central processing unit resources is adjusted and the memory is preset.
[0040] After predicting the target application, it is determined whether the target application is in a closed state. The closed state includes a completely closed state and an incompletely closed state. The startup mode corresponding to the completely closed state is a cold start, and the startup mode corresponding to the incompletely closed state is a warm start.
[0041] When the target application is in a closed state, the resource information required to start the target application is determined, where the resource information includes CPU resources and memory resources. Based on the resource information, the CPU resource scheduling method is adjusted, and the memory is pre-processed, where the pre-processing includes but is not limited to the following processing: memory cleaning, not performing memory cleaning, or other memory-related operations except memory cleaning.
[0042] It should be noted that during the operation of the CPU, the time will be divided into certain lengths, and the product of the division is called a time slice, which can be used to allocate different tasks to run. Among the multiple physical cores of the CPU, one or more cores have stronger performance than the rest, which are called large cores. Correspondingly, the rest of the cores are called small cores.
[0043] The adjustment of the CPU resource scheduling method in the embodiment of the present application means that when multiple tasks apply for CPU time slices at the same time, the CPU is allocated according to certain principles to ensure that all tasks have the opportunity to get time slices to run.
[0044] Specifically, the adjustment of the CPU resource scheduling method may include limiting the processes running in the background at this time to run on the small core, further limiting the number of CPU time slices that can be obtained for processes without an interface or whose interface is invisible for a long time, marking the startup process of the target application, and in the subsequent startup process, when allocating CPU resources to the startup process of the target application, try to allocate time slices of the large core for its operation.
[0045] In the embodiment of the present application, when receiving the first operation performed by the user on the vehicle system, considering that the application that the user intends to open is closely related to the vehicle operation status, the vehicle system operation status and the user status, the vehicle operation data, the vehicle system operation data and the user behavior data can be obtained and input into the application prediction model to predict the target application that the user intends to start when performing the first operation. After determining the target application that the user intends to start, the state of the target application is judged. When the target application is in a closed state, since the closed application requires more CPU resources and memory when starting, if the CPU resources are not scheduled in time or the memory is insufficient during the startup process, it will affect the startup speed of the application. Based on this, the present application determines the target application. And when it is determined that the target application is in a closed state, the resource information required to start the target application is further determined, and then based on the resource information, the scheduling method of the central processing unit resources can be adjusted, and the memory can be pre-cleaned. Since the adjustment of the CPU resource scheduling method and the memory cleaning operation are performed when the first operation is received, compared with the delayed loading strategy adopted by the prior art, that is, no operation is performed before receiving the second operation corresponding to the first operation, the present application makes full use of the period between the first operation and the second operation, and can reserve the central processing unit resources and memory space in advance, so that when the start request of the target application is received, the time spent in starting the target application can be shortened, so that the vehicle system can run more smoothly and the user experience is improved.
[0046] In the specific implementation process, after receiving the first operation, considering that the load of the vehicle system directly affects the startup speed of the application, at this time, before obtaining the vehicle operation data, the vehicle system operation data and the user behavior data, that is, before predicting the target application, it can be determined whether the vehicle system is in a high load state. Based on this, in an optional embodiment of the present application, before obtaining the vehicle operation data, the vehicle system operation data and the user behavior data, the method also includes:
[0047] Obtaining the current CPU occupancy rate and current memory remaining amount corresponding to the vehicle computer system;
[0048] Determine whether the current CPU occupancy rate is greater than an occupancy rate threshold;
[0049] Determine whether the current remaining memory is less than a memory threshold;
[0050] When the current CPU occupancy rate is greater than the occupancy rate threshold, or the current remaining memory amount is less than the memory threshold, determining that the vehicle system is in the high load state;
[0051] When the vehicle system is in a high-load state, the step of acquiring vehicle operation data, vehicle system operation data and user behavior data is performed.
[0052] Specifically, the high load state of the vehicle system includes a variety of situations, namely, high CPU load, high memory load, and high CPU and memory load. Among them, for the CPU load, the current CPU occupancy rate can be obtained, and it can be determined whether the CPU load of the vehicle system is high by judging whether the current CPU occupancy rate is greater than the occupancy rate threshold. For the memory load, the current remaining memory can be obtained, and it can be determined whether the current remaining memory is less than the memory threshold to determine whether the memory load of the vehicle system is high.
[0053] When the current CPU occupancy rate is greater than the occupancy rate threshold, and / or the current remaining memory is less than the memory threshold, it can be determined that the vehicle system is in a high load state. At this time, the steps of acquiring vehicle operation data, vehicle system operation data and user behavior data, and predicting the target application are executed.
[0054] The above-mentioned implementation scheme of the present application determines whether the vehicle system is in a high-load state and continues the subsequent process when it is in a high-load state. Therefore, when the vehicle system is not in a high-load state, it can be determined that the vehicle system will not affect the startup speed of the application. There is no need to reserve CPU resources and memory in advance, thereby reducing unnecessary CPU resource scheduling operations and memory cleanup operations.
[0055] The following describes how to perform preset processing on the memory in step 103. In an optional embodiment of the present application, performing preset processing on the memory includes:
[0056] Determining the triggering time corresponding to the first operation as the starting time corresponding to the memory cleaning window;
[0057] When a second operation corresponding to the first operation is received, determining a triggering time corresponding to the second operation as an end time corresponding to the memory cleaning window;
[0058] In the memory cleaning window, the memory is pre-cleaned.
[0059] In an embodiment of the present application, the first operation may be a pressing operation on any touch screen of the vehicle system, or a pressing operation of a button on the steering wheel for operating the vehicle system, or a voice receiving module of the vehicle system receiving a voice command issued by the user. The operation corresponding to the first operation is the second operation. When the first operation is a pressing operation on any touch screen of the vehicle system, the second operation is a lifting operation corresponding to the pressing operation. When the first operation is a pressing operation of a button on the steering wheel for operating the vehicle system, the second operation is a lifting operation corresponding to the pressing operation. When the first operation is a voice receiving module of the vehicle system receiving a voice command issued by the user, the second operation is an operation of generating a control command based on the voice command.
[0060] There is a time difference between the first operation and the second operation. Only after the second operation is executed can the vehicle system clearly understand the user's operation intention and respond.
[0061] In the embodiment of the present application, the time period between the first operation and the second operation is determined as a memory cleaning window, and the memory pre-cleaning operation is performed only in the memory cleaning window.
[0062] It should be noted that some systems currently use a lazy loading strategy, that is, a delayed loading strategy. This strategy delays the loading of certain resources or functions until they are actually needed, so as to avoid unnecessary waste of resources and save memory.
[0063] That is to say, in the prior art, the vehicle system performs the application startup operation only after receiving the second operation, that is, after determining the application that the user wants to start. The application startup operation here includes memory request operation and CPU resource request operation when the memory is insufficient or the CPU resources are insufficient.
[0064] In an embodiment of the present application, the target application that the user intends to launch by executing the first operation can be predicted before the second operation. Compared with the prior art that does not perform any operation between the first operation and the second operation, the present application makes full use of this period to perform memory pre-cleaning operations in advance.
[0065] Considering that after the second operation is executed, the vehicle system needs to respond to the requests triggered by the first operation and the second operation performed by the user, in order to avoid slow startup caused by reasons such as synchronization lock waiting, it is necessary to stop the memory clearing operation after the second operation is executed.
[0066] The above implementation scheme of the present application determines the time period between the first operation and the second operation as a memory cleaning window, and pre-cleans the memory within the memory cleaning window to avoid triggering a page fault interrupt when a certain amount of memory needs to be applied for when the application starts, and recovering after the system has cleared enough memory space, which causes the startup process to take longer. In addition, by stopping the memory pre-cleaning after the second operation is executed, slow startup caused by reasons such as synchronization lock waiting can also be avoided.
[0067] In the specific implementation process, when it is determined that the target application is in a closed state, it is necessary to determine the resource information required to start the target application, and the resource information includes memory resources and CPU resources. In an optional embodiment of the present application, before the memory is preset, the method also includes:
[0068] Obtaining the memory requirement required to start the target application;
[0069] Obtaining the remaining memory capacity of the vehicle computer system;
[0070] Determining a memory cleanup amount according to the memory demand and the remaining memory;
[0071] Preset processing of memory, including:
[0072] A memory reclaim request carrying the memory cleanup amount is sent to the system kernel, wherein the system kernel, based on the memory reclaim request, traverses the file pages in the system whose usage frequency is lower than a preset frequency threshold, and releases them, and stops the traversal operation when the released amount reaches the memory cleanup amount.
[0073] Specifically, before pre-processing the memory, it is necessary to determine the memory resources, that is, the memory demand, and the remaining memory of the vehicle system, and determine the memory to be cleared, that is, the memory clearing amount, based on the memory demand and the remaining memory. The memory clearing amount here is at least greater than the difference between the memory demand and the remaining memory.
[0074] Further, after determining the memory cleanup amount, a memory reclaim request carrying the memory cleanup amount is sent to the system kernel.
[0075] It should be noted that the system kernel is the core part of the vehicle system's operating system, responsible for managing and controlling the vehicle system's hardware resources. The system kernel divides the vehicle system's memory into pages, one page usually corresponds to 4KB of memory, and a file page is a type of page that is usually loaded from disk to memory when reading and writing files.
[0076] After receiving a memory reclaim request, the system kernel traverses the file pages in the system whose usage frequency is lower than the preset frequency threshold, releases them, and stops the traversal operation when the released amount reaches the memory cleanup amount.
[0077] Specifically, in the system kernel, file pages can be marked based on usage frequency. For example, file pages with a usage frequency lower than a preset frequency threshold can be marked as inactive file pages, and file pages with a usage frequency higher than a preset frequency threshold can be marked as active file pages.
[0078] The above implementation scheme of the present application determines the memory cleanup amount according to the memory demand and the remaining memory required by the target application; and sends a memory recycling request carrying the memory cleanup amount to the system kernel to implement a pre-cleaning operation on the memory.
[0079] The following describes how to adjust the scheduling mode of CPU resources. In an optional embodiment of the present application, the scheduling mode of central processing unit resources is adjusted, including:
[0080] When the CPU resource consumption of the target application is greater than or equal to a preset threshold, a preset number of processes in the background process are restricted to run on the CPU small core, and the number of CPU resource time slices of the process type of the target type is restricted;
[0081] When the CPU resource consumption of the target application is less than the preset threshold, limiting a preset number of processes in the background process to run on the CPU small core;
[0082] The priority of the target application in acquiring the CPU resource time slice is adjusted.
[0083] Specifically, during the CPU operation, the time is divided into time slices, which can be used to allocate different tasks. Among the multiple physical cores of the CPU, one or more cores have stronger performance than the rest, which are called large cores. Correspondingly, the rest are called small cores.
[0084] In the embodiment of the present application, when adjusting the CPU resource scheduling mode, it is possible to first determine whether the CPU resource consumption corresponding to the target application is greater than a preset threshold. Thus, different CPU scheduling mode adjustments can be adopted for different target applications.
[0085] Specifically, when the CPU resource consumption of the target application is greater than or equal to a preset threshold, a preset number of processes in the background process are restricted to run on the CPU small core, and the number of CPU resource time slices of the target type of process is restricted.
[0086] When the CPU resource consumption of the target application is less than a preset threshold, a preset number of processes in the background process are restricted to run on the CPU small core.
[0087] That is to say, when the CPU resource consumption exceeds the preset threshold, not only the preset number of processes in the background process are restricted to run on the CPU small core, but also the number of CPU resource time slices of the process type of the target type is restricted. The target type here includes at least processes without an interface and processes whose interface is invisible for more than a preset time.
[0088] In addition, the present application also adjusts the priority of the target application in obtaining the central processing unit resource time slice, so that when the target application is started, that is, when it is determined based on the first operation and the second operation that the application actually intended to be started by the user is indeed the target application, the central processing unit can prioritize allocating the time slice of the large core to the startup process of the target application when allocating CPU time slices.
[0089] The above implementation scheme of the present application, by limiting a preset number of processes in the background process to run on the small core of the CPU, limiting the number of CPU resource time slices of processes of the target type, and adjusting the priority of the target application in obtaining the CPU resource time slice, can reserve CPU resources for the startup process of the target application in advance, thereby shortening the time consumption when actually starting the target application, making the vehicle system run more smoothly, and improving the user experience.
[0090] The process of determining the application startup prediction model is introduced below. In an optional embodiment of the present application, the method further includes:
[0091] Obtaining basic data corresponding to multiple application startup operations by the user and the actual startup application, wherein the basic data includes vehicle operation data, vehicle system operation data and user behavior data;
[0092] For each actually started application, combining basic data corresponding to the actually started application with identification information corresponding to the actually started application to obtain target data;
[0093] Determine the target data set according to the target data corresponding to each actually started application;
[0094] Model training is performed based on the target data set to determine the application startup prediction model.
[0095] During the specific implementation process, an application prediction model for predicting the user's intention to launch an application is set up in the vehicle system. The embodiment of the present application also needs to obtain a target data set for model training when the user uses the vehicle system. Specifically, the basic data and the actual launched application corresponding to each time the user performs an application launch operation may be obtained, wherein the basic data includes vehicle operation data, vehicle system operation data and user behavior data, and the basic data corresponding to the actual launched application is combined with the identification information corresponding to the actual launched application to obtain the target data; and then the target data set is determined according to the target data corresponding to each actually launched application.
[0096] After obtaining the target data set, model training is performed based on the target data set to determine the application startup prediction model. The application startup prediction model in this embodiment can be a logistic regression (LR) model or other models, which is not specifically limited in this application.
[0097] The above implementation scheme of the present application determines the target data set by obtaining the basic data and the actual launched application corresponding to multiple executions of the application launch operation, and obtains the application launch prediction model through model training, so as to predict the application that the user intends to launch when performing the first operation, and adjusts the scheduling method of the CPU resources based on the resource information required to launch the target application, and pre-cleans the memory, so that the CPU resources and memory space can be reserved in advance, so that when the launch request of the target application is received, the time spent in launching the target application can be shortened, so that the vehicle system can run more smoothly and the user experience can be improved.
[0098] In an optional embodiment of the present application, model training is performed based on the target data set to determine the application startup prediction model, including:
[0099] Dividing the target data set into a training data set and a test data set;
[0100] At least one model training is performed according to the training data set, and when the startup application prediction accuracy corresponding to the test data set is greater than a target threshold, the model training is completed and the application startup prediction model is determined.
[0101] Specifically, when performing model training based on a target data set, the target data in the target data set is divided into training data and test data to form a training data set and a test data set, wherein the ratio of the number of training data to the number of test data is a preset value, such as the ratio of the number of training data to the number of test data is 8:2, and then at least one model training is performed based on the training data set, and after each training is completed, the accuracy of the working status prediction is verified based on the test data set, and when the accuracy of the working status prediction corresponding to the test data set is greater than the target threshold, the model training is completed and the application startup prediction model is determined.
[0102] The above implementation scheme of the present application, by training the model based on the training data set and verifying it based on the test data set, can stop the training when the accuracy of the working status prediction corresponding to the test data set meets the conditions to determine the application startup prediction model.
[0103] The overall implementation process of the embodiment of the present application is introduced below. Figure 2 As shown, the present invention is mainly divided into two modules: user behavior perception module and user behavior prediction module, which complement each other and work together. Among them, the user behavior perception module is used to collect data related to user usage habits and generate prediction data through algorithms for use by the user behavior prediction module; the user behavior prediction module will collect the prediction results after the prediction is completed and feed them back to the algorithm to iterate its accuracy.
[0104] The data collected by the user behavior perception module include: application startup data, application exit data and interface switching data. Among them, the application startup data includes the time of startup, the memory usage after startup is completed, and the overall startup time; the application exit data includes the time of exit; the interface switching data includes the data of the application interface switching to the foreground, or retreating to the background, and the time when the switch occurs. In addition, if there are multiple screens in the cockpit, the data collected by the user behavior perception module also needs to record the screen identifier where it occurs. If the split-screen solution is supported, the screen position where it occurs also needs to be recorded. The recorded application usage data is saved locally in the vehicle system in a specific format, and is protected by the sandbox isolation mechanism and partition encryption mechanism, and is only read by the prediction algorithm.
[0105] The prediction algorithm reads the saved application usage data, calculates the prediction data, and saves it separately. Similarly, the data will be sandboxed and encrypted for protection, and can only be read by the subsequent user behavior prediction module;
[0106] The user behavior prediction module triggers predictions when the following events occur: a) the user clicks Touch Down; b) the voice command detects the command prefix "open"; c) the steering wheel hard button is pressed.
[0107] The user behavior prediction module reads the prediction data to determine whether the user's intention is to start an application. If so, the next specific operation is performed. If not, it is an error operation, but the subsequent process of verifying the accuracy of the prediction will still be executed to iterate the accuracy of the prediction. When it is inferred that the application is started, there are currently two types of specific operations: CPU scheduling adjustment and memory pre-cleaning. CPU scheduling adjustment can include limiting the background process at this time to run on the small core, and further limiting the CPU time slices that can be obtained for processes without an interface or whose interface is invisible for a long time. It can also include marking the process to be started, and in the subsequent startup process, notifying the CPU to try to allocate the time slice of the large core for its operation. Memory pre-cleaning includes predicting the amount of memory required for the normal startup of the process, comparing it with the current system available memory, calculating the difference, and notifying the Linux kernel to perform quantitative recovery; the Linux kernel will receive this notification, traverse the recyclable, infrequently used file pages, and release them; and the entire link also needs to have a time window limit. When the user touches up, voice input is completed, or a hard key is lifted, etc., the cleaning behavior needs to be terminated immediately to avoid slow startup due to reasons such as synchronization lock waiting.
[0108] In addition, when the user touches up, completes voice input, or lifts a hard key, a confirmed, actual operation event can be obtained. At this time, it is compared with the previous prediction result to determine whether the prediction is correct, and the result is fed back to the algorithm for subsequent accuracy improvement.
[0109] The above implementation scheme obtains vehicle operation data, vehicle system operation data and user behavior data and inputs them into the application prediction model when receiving the first operation performed by the user on the vehicle system, thereby predicting the target application that the user intends to start when performing the first operation. Then, when the target application is in a closed state, based on the resource information required to start the target application, the scheduling method of the CPU resources can be adjusted, and the memory can be pre-cleaned. CPU resources and memory space can be reserved in advance, so that when the start request of the target application is received, the time spent in starting the target application can be shortened, so that the vehicle system can run more smoothly and the user experience can be improved.
[0110] The above describes the application startup control method provided by the embodiment of the present application. The following will describe the application startup control device provided by the embodiment of the present application in conjunction with the accompanying drawings.
[0111] like Figure 3 As shown, an embodiment of the present invention further provides an application startup control device, which is applied to a vehicle system, wherein the vehicle system is provided with an application prediction model for predicting a user's intention to start an application, and the device comprises:
[0112] The first acquisition module 301 is used to acquire vehicle operation data, vehicle system operation data and user behavior data upon receiving a first operation performed by a user on the vehicle system;
[0113] A prediction module 302, configured to input the vehicle operation data, the vehicle system operation data and the user behavior data into the application prediction model, and predict the target application that the user intends to start when performing the first operation;
[0114] The processing module 303 is used to adjust the scheduling mode of the central processing unit resources and perform preset processing on the memory based on the resource information required to start the target application when the target application is in a closed state.
[0115] Optionally, before acquiring the vehicle operation data, the vehicle system operation data and the user behavior data, the device further includes:
[0116] The second acquisition module is used to obtain the current CPU occupancy rate and current memory remaining amount corresponding to the vehicle system;
[0117] A first judgment module, used to judge whether the current CPU occupancy rate is greater than an occupancy rate threshold;
[0118] A second judgment module is used to judge whether the current remaining memory is less than a memory threshold;
[0119] The first determination module is used to determine that the vehicle system is in the high load state when the current central processing unit occupancy rate is greater than the occupancy rate threshold, and / or the current remaining memory is less than the memory threshold; when the vehicle system is in the high load state, execute the steps of acquiring vehicle operation data, vehicle system operation data and user behavior data.
[0120] Optionally, the processing module includes:
[0121] A first determining submodule, configured to determine the triggering moment corresponding to the first operation as the starting moment corresponding to the memory cleaning window;
[0122] A second determining submodule is configured to, upon receiving a second operation corresponding to the first operation, determine a triggering moment corresponding to the second operation as an end moment corresponding to the memory cleaning window;
[0123] The first processing submodule is used to perform preset processing on the memory within the memory cleaning window.
[0124] Optionally, before pre-cleaning the memory, the device further includes:
[0125] A third acquisition module is used to acquire the memory requirement required to start the target application;
[0126] A fourth acquisition module, used to acquire the remaining amount of memory of the vehicle system;
[0127] A second determination module is used to determine a memory cleanup amount according to the memory requirement and the remaining memory;
[0128] The processing modules include:
[0129] A sending submodule is used to send a memory reclaim request carrying the memory cleanup amount to the system kernel, wherein the system kernel, based on the memory reclaim request, traverses the file pages in the system whose usage frequency is lower than a preset frequency threshold, and releases them, and stops the traversal operation when the released amount reaches the memory cleanup amount.
[0130] Optionally, the processing module includes:
[0131] A second processing submodule is used to limit a preset number of processes in the background process to the CPU small core when the CPU resource consumption of the target application is greater than or equal to a preset threshold, and to limit the number of CPU resource time slices of the process type of the target type;
[0132] A third processing submodule is used to limit a preset number of processes in the background process to run on the small core of the central processing unit when the central processing unit resource consumption of the target application is less than the preset threshold;
[0133] The fourth processing submodule is used to adjust the priority of the target application in acquiring the CPU resource time slice.
[0134] Optionally, the device further comprises:
[0135] A fifth acquisition module, used to acquire basic data corresponding to when a user executes application startup operations multiple times and actually starts an application, wherein the basic data includes vehicle operation data, vehicle system operation data and user behavior data;
[0136] a sixth acquisition module, configured to combine, for each actually started application, the basic data corresponding to the actually started application with the basic data corresponding to the actually started application to acquire target data;
[0137] A third determination module is used to determine a target data set according to target data corresponding to each actually started application;
[0138] The model training module is used to perform model training based on the target data set to determine the application startup prediction model.
[0139] Optionally, the model training module includes:
[0140] A division submodule, used to divide the target data set into a training data set and a test data set;
[0141] The training submodule is used to perform at least one model training according to the training data set, and when the startup application prediction accuracy corresponding to the test data set is greater than a target threshold, complete the model training and determine the application startup prediction model.
[0142] The application startup control device provided by the present application, when receiving the first operation performed by the user on the vehicle system, takes into account that the application that the user intends to start is closely related to the vehicle operation status, the vehicle system operation status and the user status, so it can obtain the vehicle operation data, the vehicle system operation data and the user behavior data, and input them into the application prediction model to predict the target application that the user intends to start when performing the first operation. After determining the target application that the user intends to start, the state of the target application is judged. When the target application is in a closed state, since the closed application requires more CPU resources and memory when it is started, if the CPU resources are not scheduled in time or the memory is insufficient during the startup process, it will affect the startup speed of the application. Based on this, the present application determines When the target application is determined to be in a closed state, the resource information required to start the target application is further determined, and then the scheduling method of the central processing unit resources can be adjusted based on the resource information, and the memory can be pre-cleaned. Since the adjustment of the CPU resource scheduling method and the memory cleaning operation are performed when the first operation is received, compared with the delayed loading strategy adopted by the prior art, that is, no operation is performed before the second operation corresponding to the first operation is received, the present application makes full use of the period between the first operation and the second operation, and can reserve the central processing unit resources and memory space in advance, so that when the start request of the target application is received, the time consumed in the process of starting the target application can be shortened, so that the vehicle system can run more smoothly and improve the user experience.
[0143] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0144] An embodiment of the present application also provides an electronic device, including: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned application startup control method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0145] For example, Figure 4 FIG. 1 shows a schematic diagram of the physical structure of an electronic device. Figure 4As shown, the electronic device may include: a processor (processor) 410, a communication interface (Communications Interface) 420, a memory (memory) 430 and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 complete mutual communication through the communication bus 440. The processor 410 can call the logic instructions in the memory 430, and the processor 410 is used to perform the following steps: when receiving the first operation performed by the user on the vehicle system, the vehicle operation data, the vehicle system operation data and the user behavior data are obtained; the vehicle operation data, the vehicle system operation data and the user behavior data are input into the application prediction model to predict the target application that the user intends to start when performing the first operation; when the target application is in a closed state, based on the resource information required to start the target application, the scheduling method of the central processing unit resources is adjusted, and the memory is preset. The processor 410 can also execute other schemes in the embodiments of the present application, which will not be further elaborated here.
[0146] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
[0147] An embodiment of the present application also provides a vehicle, a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the various processes of the above-mentioned application startup control method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0148] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above-mentioned application startup control method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0149] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, 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, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0151] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0152] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0153] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0154] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0155] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0156] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0157] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0158] The above description is only a specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.
Claims
1. An application startup control method, characterized in that: Applied to a vehicle system, the vehicle system is provided with an application prediction model for predicting a user's intention to start an application, and the method comprises: Upon receiving a first operation performed by the user on the vehicle system, obtaining vehicle operation data, vehicle system operation data and user behavior data; Inputting the vehicle operation data, the vehicle system operation data and the user behavior data into the application prediction model to predict the target application that the user intends to start when performing the first operation; When the target application is in a closed state, the scheduling mode of the central processing unit resources is adjusted based on the resource information required to start the target application, and the memory is preset.
2. The application startup control method according to claim 1, characterized in that: Before obtaining the vehicle operation data, the vehicle system operation data and the user behavior data, the method further includes: Obtaining the current CPU occupancy rate and current memory remaining amount corresponding to the vehicle computer system; Determine whether the current CPU occupancy rate is greater than an occupancy rate threshold; Determine whether the current remaining memory is less than a memory threshold; When the current CPU occupancy rate is greater than the occupancy rate threshold, and / or the current remaining memory amount is less than the memory threshold, determining that the vehicle system is in a high load state; When the vehicle system is in a high-load state, the step of acquiring vehicle operation data, vehicle system operation data and user behavior data is performed.
3. The application startup control method according to claim 1, characterized in that: Preset processing of memory, including: Determining the triggering time corresponding to the first operation as the starting time corresponding to the memory cleaning window; When a second operation corresponding to the first operation is received, determining a triggering time corresponding to the second operation as an end time corresponding to the memory cleaning window; In the memory cleaning window, the memory is pre-cleaned.
4. The application startup control method according to claim 1, characterized in that: Before performing preset processing on the memory, the method further includes: Obtaining the memory requirement required to start the target application; Obtaining the remaining memory capacity of the vehicle computer system; Determining a memory cleanup amount according to the memory demand and the remaining memory; Preset processing of memory, including: A memory reclaim request carrying the memory cleanup amount is sent to the system kernel, wherein the system kernel, based on the memory reclaim request, traverses the file pages in the system whose usage frequency is lower than a preset frequency threshold, and releases them, and stops the traversal operation when the released amount reaches the memory cleanup amount.
5. The application startup control method according to claim 1, characterized in that: Adjust the CPU resource scheduling method, including: When the CPU resource consumption of the target application is greater than or equal to a preset threshold, a preset number of processes in the background process are restricted to run on the CPU small core, and the number of CPU resource time slices of the process type of the target type is restricted; When the CPU resource consumption of the target application is less than the preset threshold, limiting a preset number of processes in the background process to run on the CPU small core; The priority of the target application in acquiring the CPU resource time slice is adjusted.
6. The application startup control method according to claim 1, characterized in that: The method further comprises: Obtaining basic data corresponding to multiple application startup operations by the user and the actual startup application, wherein the basic data includes vehicle operation data, vehicle system operation data and user behavior data; For each actually started application, combining basic data corresponding to the actually started application with identification information corresponding to the actually started application to obtain target data; Determine the target data set according to the target data corresponding to each actually started application; Model training is performed based on the target data set to determine the application startup prediction model.
7. The application startup control method according to claim 1, characterized in that: Performing model training based on the target data set to determine the application startup prediction model includes: Dividing the target data set into a training data set and a test data set; At least one model training is performed according to the training data set, and when the startup application prediction accuracy corresponding to the test data set is greater than a target threshold, the model training is completed and the application startup prediction model is determined.
8. An application startup control device, characterized in that: Applied to a vehicle system, the vehicle system is provided with an application prediction model for predicting the user's intention to start an application, and the device comprises: A first acquisition module, configured to acquire vehicle operation data, vehicle system operation data and user behavior data upon receiving a first operation performed by a user on the vehicle system; A prediction module, configured to input the vehicle operation data, the vehicle system operation data and the user behavior data into the application prediction model, and predict a target application that the user intends to start when performing the first operation; The processing module is used to adjust the scheduling mode of the central processing unit resources and perform preset processing on the memory based on the resource information required to start the target application when the target application is in a closed state.
9. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the application startup control method according to any one of claims 1 to 7.
10. A vehicle, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor is used to execute the machine executable instructions to implement the application startup control method according to any one of claims 1 to 7.
Citation Information
Cited By
Multi-task switching processing method and system of intelligent terminal
CN121029359A
Method and system for multitasking processing of intelligent terminal
CN121029359B
Vehicle machine system temperature control method and device, electronic equipment, storage medium and vehicle
CN121375659A
