Head unit system process control method and apparatus, and electronic device and vehicle
By detecting the status of the vehicle system, obtaining the memory occupancy and activity, dividing the interval levels and performing process processing, the problem of poor memory status improvement of the vehicle system is solved, and memory recycling and operation speed are improved.
Patent Information
- Application Number
- PCT/CN2024/083852
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-30
- Filing Date
- 2024-03-26
- Publication Date
- 2024-10-03
AI Technical Summary
The existing memory compression method of the vehicle system is not effective in improving the memory status of the vehicle system and cannot effectively increase the running speed, especially when multiple application processes are running, lags are prone to occur.
By detecting the current status of the vehicle system, the memory usage and application process activity are obtained, the memory usage range is divided according to the preset interval level, and corresponding process processing strategies are used for killing or compression, including full compression and reverse page compression. , to ensure memory recycling.
It realizes the fundamental recycling of vehicle system memory without limiting scenarios or special conditions, improves the effect of improving memory status, and avoids lags and slowdowns in running speed.
Smart Images

Figure CN2024083852_03102024_PF_FP_ABST
Abstract
Description
Vehicle system process control method, device, electronic equipment and vehicle
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure is based on and claims the priority of Chinese patent application with application number 202310331782.6 and application date March 30, 2023. The entire content of the Chinese patent application is hereby incorporated into this disclosure by reference. Technical Field
[0003] The present disclosure relates to the technical field of memory management of vehicle-mounted systems, and in particular to a vehicle-mounted system process control method, device, electronic equipment, and vehicle. Background Art
[0004] In a vehicle, the vehicle computer system is the core of the vehicle control. When there are too many application processes running in the vehicle computer system, the memory usage of the vehicle computer system is too high, which may affect the operating speed of the vehicle computer system and even cause adverse phenomena such as freezing. Therefore, in order to ensure the operating speed of the vehicle computer system, certain types of qualified processes are usually compressed in specific scenarios to free up some memory. For example, during normal driving of the vehicle, processes related to vehicle remote control can be compressed. The solutions in the related technology, because the compression process is only targeted at certain specific scenarios and the compression conditions only include a few special conditions, the effect of recycling the memory of the vehicle computer system is not obvious, and the system memory status cannot be truly improved.
[0005] Summary of the Invention
[0006] The technical problem to be solved by the present disclosure is that the existing memory compression method of the vehicle-mounted system has a poor effect on improving the memory status of the vehicle-mounted system. To this end, the present disclosure proposes a vehicle-mounted system process control method, device, electronic equipment and vehicle.
[0007] In a first aspect, the disclosed technical solution provides a vehicle system process control method, comprising:
[0008] Detect the current status of the vehicle system;
[0009] If the current state is a working state, obtaining the memory occupancy rate of the vehicle system;
[0010] Obtaining a running application process in a running state, and obtaining the activity of the running application process according to a preset rule;
[0011] Determine the interval level of the memory occupancy rate and obtain a determination result; the interval level includes a plurality of pre-set interval levels, each of the interval levels corresponding to a different memory occupancy rate range;
[0012] The process processing strategy corresponding to the interval level in the judgment result is obtained as the target process processing strategy, and the running application processes of different activity levels are checked, killed or compressed according to the target process processing strategy; wherein each interval level corresponds to a different process processing strategy.
[0013] In some embodiments of the vehicle system process control method, the interval level includes multiple interval levels set from high to low according to the memory usage rate range; and determining the interval level of the memory usage rate and obtaining the determination result includes:
[0014] The interval level to which the memory occupancy rate belongs is determined according to the memory occupancy rate and the memory occupancy rate range corresponding to each interval level.
[0015] In some embodiments of the vehicle system process control method, the interval level includes a high interval level, obtaining the process processing strategy corresponding to the interval level in the judgment result as the target process processing strategy, and checking, killing or compressing the running application processes of different activity levels according to the target process processing strategy, including:
[0016] If the judgment result indicates that the interval level of the memory usage rate is the high interval level, all running application processes with an activity level lower than the first activity level are checked and killed.
[0017] In some embodiments of the vehicle system process control method, the interval level includes a median interval level, obtaining a process processing strategy corresponding to the interval level in the judgment result as a target process processing strategy, and checking, killing, or compressing the running application processes of different activity levels according to the target process processing strategy, including:
[0018] If the judgment result indicates that the interval level of the memory usage rate is the median interval level, the application process whose activity is lower than the second activity level is compressed in the first compression method, and the second activity level is greater than the first activity level.
[0019] In some embodiments of the vehicle system process control method, the interval level includes a low interval level, obtaining a process processing strategy corresponding to the interval level in the judgment result as a target process processing strategy, and checking, killing, or compressing the running application processes of different activity levels according to the target process processing strategy, including:
[0020] If the judgment result indicates that the interval level of the memory occupancy rate is the low interval level, the application process whose activity is lower than the third activity level is compressed using the second compression method, the third activity level is lower than the second activity level, and the compression rate of the second compression method is lower than the compression rate of the first compression method.
[0021] In some embodiments of the vehicle system process control method, the first compression method is a full compression method, and the second compression method is a reverse page compression process.
[0022] In some embodiments of the vehicle system process control method, the step of obtaining a running application process in a running state and obtaining the activity of the running application process according to a preset rule includes:
[0023] Obtaining user identification information and extracting historical data associated with the user identification information, the historical data including the historical start frequency and historical running time of the running application process in a set historical period;
[0024] Obtaining the running time, memory usage information, and importance data of the running application process, wherein the importance data represents the importance of the user service corresponding to the running application process;
[0025] The activity of the running application process is obtained by weighted calculation of the historical startup frequency, the historical running time, the running time of the current run, the memory occupancy information and the importance data.
[0026] In some embodiments of the vehicle system process control method, the step of obtaining user identification information includes:
[0027] At least one biometric feature information of the user is detected as the user identification information.
[0028] In some embodiments, the vehicle system process control method further includes, if the current state is a dormant state:
[0029] detecting the remaining space size of a preset area reserved by the vehicle system for storing compressed process data;
[0030] Obtaining the compression process activity of the application corresponding to each compression process data in the preset area;
[0031] Comparing the remaining space size with a set value to obtain a comparison result;
[0032] If the comparison result shows that the remaining space size is lower than the set value, the application processes corresponding to the compressed process data are sequentially checked and killed in the order of compression process activity until the remaining space size is higher than or equal to the set value.
[0033] In a second aspect, the disclosed technical solution provides a vehicle system process control device, comprising:
[0034] A state detection module is configured to detect the current state of the vehicle system;
[0035] a memory occupancy rate acquisition module, configured to acquire the memory occupancy rate of the vehicle system if the current state is a working state;
[0036] A process activity acquisition module is configured to acquire a running application process in a running state and obtain the activity of the running application process according to a preset rule;
[0037] an interval level acquisition module configured to determine the interval level of the memory occupancy rate and obtain a determination result; the interval level includes a plurality of pre-set interval levels, each of the interval levels corresponding to a different memory occupancy rate range;
[0038] The process control module is configured to obtain the process processing strategy corresponding to the interval level in the judgment result as the target process processing strategy, and to detect, kill or compress the running application processes of different activity levels according to the target process processing strategy; wherein each interval level corresponds to a different process processing strategy.
[0039] In a third aspect, the technical solution disclosed herein provides a storage medium in which program instructions are stored. After a computer calls the program instructions, the computer executes the vehicle system process control method described in any one of the technical solutions in the first aspect.
[0040] In a fourth aspect, the technical solution disclosed herein provides an electronic device comprising at least one processor and at least one memory, wherein at least one of the memories stores program information, and at least one of the processors calls the program information and executes the vehicle system process control method described in any one of the solutions in the first aspect.
[0041] In a fifth aspect, the technical solution disclosed herein provides a vehicle computer, which is equipped with the vehicle computer system process control device described in the second aspect of the technical solution or the storage medium described in the third aspect of the technical solution or the electronic device described in the fourth aspect of the technical solution.
[0042] In a sixth aspect, the technical solution disclosed herein provides a vehicle, which includes the vehicle computer described in the technical solution in the fifth aspect.
[0043] The above technical solution has the following beneficial effects:
[0044] The vehicle system process control method, device, electronic device and vehicle provided by the technical solution disclosed herein detect the current state of the vehicle system. If the vehicle system is in a working state, the memory occupancy rate of the vehicle system is monitored. At the same time, the running application process in the running state is obtained and the activity of the running application process is obtained using preset rules. After determining the interval level of the memory occupancy rate, the process processing strategy corresponding to the interval level is obtained as the target process processing strategy. According to the target process processing strategy, running application processes of different activity levels can be checked, killed or compressed. The above solution disclosed herein can, after determining the interval level of the vehicle system memory occupancy rate, use the corresponding target process processing strategy to check, kill or compress the running application process in combination with the activity level of the running application process to achieve memory recovery. This solution does not need to limit the scene or special conditions. As long as the vehicle system is in a working state, the memory of the vehicle system can be fundamentally recovered, thereby improving the memory status. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] FIG1 is a flow chart of a vehicle system process control method according to an embodiment of the present disclosure;
[0046] FIG2 is a flow chart of a vehicle system process control method according to another embodiment of the present disclosure;
[0047] FIG3 is a flow chart of a vehicle system process control method according to another embodiment of the present disclosure;
[0048] FIG4 is a structural block diagram of a vehicle system process control device according to an embodiment of the present disclosure;
[0049] FIG5 is a schematic diagram of the hardware connection relationship of the electronic device for executing the vehicle system process control method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0050] The specific embodiments of the present disclosure are further described below with reference to the accompanying drawings.
[0051] It is easy to understand that according to the technical solution of the present disclosure, a variety of structural methods and implementation methods can be replaced with each other by those skilled in the art without changing the essential spirit of the present disclosure. Therefore, the following specific embodiments and drawings are only exemplary descriptions of the technical solution of the present disclosure and should not be regarded as the entire disclosure or as a limitation or restriction on the technical solution of the application.
[0052] The directional terms such as up, down, left, right, front, back, front, back, top, and bottom mentioned or possibly mentioned in this specification are defined relative to the structure shown in the drawings. They are relative concepts and may vary depending on the location and usage of the device. Therefore, these or other directional terms should not be interpreted as restrictive.
[0053] The present disclosure discloses a vehicle system process control method, which is applied to a vehicle system. As shown in FIG1 , the method includes:
[0054] S10: Detect the current status of the vehicle system.
[0055] The operating status of the vehicle system may include off, on, dormant, working, etc. After the vehicle system is turned on, the operating status can be monitored in real time.
[0056] S20: If the current state is the working state, the memory occupancy rate of the vehicle system is obtained.
[0057] The memory occupancy rate may be a percentage of the occupied memory space to the total memory space.
[0058] S30: Obtain a running application process in a running state, and obtain the activity of the running application process according to a preset rule.
[0059] When the vehicle system is in working state, the system can automatically obtain a list of currently running application processes.
[0060] The calculation rules for the activity of each application process can be pre-stored in the vehicle system, and can be determined based on the duration of the application process in the current state, the frequency of use of the application process, the priority of the application process, etc.
[0061] S40: Determine the interval level of the memory occupancy rate and obtain a determination result; the interval level includes a plurality of pre-set interval levels, each of the interval levels corresponding to a different memory occupancy rate range.
[0062] The memory usage ranges corresponding to the multiple interval levels are different, so the memory usage ranges can be sorted, and the interval level division result can be obtained using the sorting result.
[0063] S50: Obtaining a process handling policy corresponding to the interval level in the judgment result as a target process handling policy, and performing killing or compression on the running application processes of different activity levels according to the target process handling policy; wherein each interval level corresponds to a different process handling policy. The process handling policies corresponding to different interval levels have different standards for killing and / or compressing the running application processes.
[0064] Specifically, if the memory usage interval level is high, for example, if the high memory usage is causing system lag, then more application processes may need to be checked and killed. On the other hand, if the memory usage interval level is low, and the system is simply responding slowly to certain services, fewer processes may need to be checked and killed, and compressing some application process data may suffice. Therefore, the process handling strategies corresponding to different interval levels have different standards for checking and / or compressing running application processes.
[0065] The solution disclosed in the present invention detects the current state of the vehicle-mounted system. If the vehicle-mounted system is in a working state, the memory occupancy rate of the vehicle-mounted system is monitored. At the same time, the running application processes in the running state are obtained and the activity of the running application processes is obtained using preset rules. After determining the interval level of the memory occupancy rate, the process processing strategy corresponding to the interval level is obtained as the target process processing strategy. According to the target process processing strategy, running application processes of different activity levels can be checked, killed or compressed. The above solution disclosed in the present invention can, after determining the interval level of the vehicle-mounted system memory occupancy rate, use the corresponding target process processing strategy and the activity of the running application processes to check, kill or compress them, thereby realizing memory recovery. This solution does not require limited scenarios or special conditions. As long as the vehicle-mounted system is in a working state, the memory of the vehicle-mounted system can be fundamentally recovered, thereby improving the memory status.
[0066] In some embodiments, in step S40, the interval level includes multiple interval levels set from high to low according to the memory occupancy range; the interval level in which the memory occupancy is located is determined based on the memory occupancy and the memory occupancy range corresponding to each interval level. For example, the interval level includes a high interval level, a median interval level, and a low interval level; the memory occupancy range corresponding to the high interval level is [first memory occupancy, 100%); the memory occupancy range corresponding to the median interval level is [second memory occupancy, first memory occupancy); the memory occupancy range corresponding to the low interval level is [third memory occupancy, second memory occupancy); the first memory occupancy corresponds to the memory occupancy that causes the vehicle system to stop running; the second memory occupancy corresponds to the memory occupancy that causes the vehicle system to freeze; and the third memory occupancy corresponds to the memory occupancy that causes the response speed of the vehicle system to be lower than a preset speed. When determining which interval level the memory occupancy rate is in, the memory occupancy rate can be compared with the memory occupancy rate range in each interval level in order from high to low or from low to high. Once the range of the memory occupancy rate is determined, its corresponding interval level can be determined.
[0067] In some embodiments, as shown in FIG2 , step S50 includes:
[0068] S501: If the judgment result indicates that the memory usage rate is in the high interval level, all running application processes whose activity is lower than a first activity level are checked and killed.
[0069] For example, if the memory usage is within the range of [first memory usage, 100%), that is, the memory usage is within the range of greater than or equal to the first memory usage and less than 100%, it indicates that the current vehicle system is at risk of stopping operation and urgently needs to free up more memory to ensure that the vehicle system can resume operation. Therefore, in this solution, all running application processes with the first activity level are checked and killed, thereby freeing up memory to the greatest extent possible. The first activity level can be either long-term inactive processes or short-term inactive processes. Long-term inactive processes mean that the process has been inactive for a long time and is unlikely to become active again. As previously described, the system determines the activity level by determining its importance based on the process priority, the duration of the process's current state, the process's memory usage, and user needs or user experience. Short-term inactive processes mean that the process is inactive but may still become active. As previously described, the system determines the activity level by determining its importance based on the process priority, the duration of the process's current state, the process's memory usage, and user needs or user experience.
[0070] S502: If the judgment result indicates that the interval level of the memory usage rate is the median interval level, compress the application process whose activity is lower than the second activity level by the first compression method, and the second activity level is greater than the first activity level.
[0071] For example, if the memory occupancy rate is within the range of [second memory occupancy rate, first memory occupancy rate), that is, the memory occupancy rate is within the range of greater than or equal to the second memory occupancy rate and less than the first memory occupancy rate, it means that the current vehicle system is already stuck, and its urgency for memory recovery is lower than that of the high interval level. At this time, the application process with an activity lower than the second activity level can be compressed in the first compression method, and the second activity level is greater than the first activity level. That is, in the high-level interval, all application processes with an activity level lower than the first activity level are killed. In this solution, some application processes with lower activity levels can be compressed. The activity level of the compressed application process in this process can be higher than the activity level of the application process killed in the high interval level, because the compression process has less impact on the application process than the killing process.
[0072] S503: If the determination result indicates that the memory usage rate is within the low interval level, compressing the application process having an activity level lower than a third activity level using a second compression method, wherein the third activity level is lower than the second activity level, and the compression ratio of the second compression method is lower than the compression ratio of the first compression method. When the compression ratio is lower, the difference in data size before and after compression is smaller.
[0073] For example, if the memory occupancy rate is within the range of [third memory occupancy rate, second memory occupancy rate), that is, the memory occupancy rate is within the range of greater than or equal to the third memory occupancy rate and less than the second memory occupancy rate, it means that the current vehicle system has a slow response speed, and its urgency for memory recovery is lower than that of the high interval level and the median interval level. At this time, the application process with an activity lower than the third activity level can be compressed using the second compression method, and the third activity level is lower than the second activity level, and the compression rate of the second compression method is lower than the compression rate of the first compression method. In other words, in this solution, some application processes with lower activity levels can be compressed, but the compression rate is lower than the compression rate of the median interval level, that is, the compression process has less impact on the application process, and the activity of the application process compressed in this process can be lower than the activity of the application process compressed in the median interval level. Because in this case, the operation of the vehicle system is at the median interval level, the number of application processes selected for compression can be less than the number of application processes compressed in the median interval level.
[0074] In the above scheme, the first compression method is full compression, and the second compression method is reverse page compression. That is, for compression operations at the mid-level interval, full compression can be directly selected to maximize memory space release. In other words, for compression operations at low intervals, reverse page compression is used. While reverse page compression has a lower compression ratio, it is more convenient when decompression is needed after the application process becomes active again.
[0075] In some embodiments, step S30 includes:
[0076] S301: Obtain user identification information, and extract historical data associated with the user identification information, wherein the historical data includes a historical startup frequency and a historical running time of the running application process in a set historical period.
[0077] The user identification information may be identity authentication information.
[0078] Each user has their own preferences for some function settings during vehicle use. The vehicle system can associate each user's setting data with the user's identity information and store it. In this way, when the user's identity is determined, the setting data that meets the user's preferences can be provided.
[0079] The historical start-up frequency and the historical operation duration can be directly determined based on the historical operation data of the vehicle system. In specific implementation, historical operation data within a period of time can be selected for query, such as data within the past week.
[0080] S302: Obtain the running time, memory usage information and importance data of the running application process, where the importance data represents the importance of the user service corresponding to the running application process.
[0081] When the vehicle-mounted system is activated, it can obtain real-time information about the runtime and memory usage of the running application process. The importance data is determined by the server, which can monitor the status of the service tasks corresponding to each application process and record the user's personalized requirements for each service task. Based on the user's personalized requirements, the server can determine the importance of each service task, and thus the importance of each application process.
[0082] S303: Obtain the activity of the running application process by weighted calculation of the historical startup frequency, the historical running time, the running time of the current run, the memory usage information and the importance data.
[0083] By pre-setting weights for each of the above parameters, activity is calculated by multiplying the weights by the numerical values corresponding to each parameter, and then using a pre-defined calculation algorithm to calculate the activity level. For example, the activity level can be directly calculated by multiplying the weights and parameters and adding the result.
[0084] In a specific example, if user A likes to play cloud music from 7:00 to 8:00 every Monday morning, then if the user is identified as user A, the music-playing related application processes will be considered application processes that should not be killed or fully compressed, because cleaning application processes will affect the opening speed, and compressing application processes will cause the system to run slowly, thus avoiding affecting the actual user experience. If the identified user is not user A, the application processes will be killed or compressed according to their activity level. If the new user resets or changes the vehicle functions, the user's settings and changes will be directly associated and stored with the new user's identification information, so that the application usage habits can be recorded on a user-by-user basis.
[0085] Optionally, the acquiring of user identification information in the above solution includes: detecting at least one biometric feature information of the user as the user identification information. The biometric feature information may include a face recognition result, a voice recognition result, or a fingerprint recognition result.
[0086] In some embodiments, as shown in FIG3 , if the current state is a dormant state, the method further includes:
[0087] S60: Detecting the remaining space size of a preset area reserved by the vehicle system for storing compressed process data.
[0088] The preset area is a storage area reserved by the vehicle system for storing compressed process data. This area is reserved in general operating systems. The remaining space in the preset area is directly accessible to the vehicle system and can usually be expressed as a size or percentage.
[0089] S70: Obtain the compression process activity of the application corresponding to each compression process data in the preset area.
[0090] Compressed process data is obtained by compressing the application process, while the vehicle-mounted system can obtain the activity of the running process in real time. Furthermore, the compression operation performed by the vehicle-mounted system can also determine the correspondence between the compressed process data and the application process. Therefore, the vehicle-mounted system can obtain the compressed process activity of the application process corresponding to the compressed process data in real time.
[0091] S80: Compare the remaining space size with a set value to obtain a comparison result.
[0092] The set value may be determined based on the size of general compressed process data, and may generally be several times the size of general compressed process data.
[0093] S90: If the comparison result shows that the remaining space size is lower than the set value, the application processes corresponding to the compressed process data are sequentially checked and killed in the order of compression process activity until the remaining space size is higher than or equal to the set value.
[0094] If the remaining space in the preset area is too small, it may affect the storage of compressed process data. Even if the vehicle system is slow or stuck, it will not be possible to free up memory space by compressing low-activity application processes. In this step, when the remaining space is less than the set value, the application processes corresponding to the compressed process data are checked and killed in order of activity, thereby reclaiming the storage space in the preset area.
[0095] The above solution ensures that the remaining free space in the reserved preset area is always sufficient, allowing the vehicle system to reclaim memory space at any time through memory compression, effectively improving the vehicle system's operating speed and avoiding lags. Furthermore, when the vehicle system enters sleep mode, the remaining free space in the preset area is detected and cleared, effectively reducing the system's memory pressure and minimizing the impact of memory compression and application process cleanup on system performance.
[0096] As an optional solution, the order of compressed process activity can be obtained as follows: the compressed process activity of the application corresponding to the compressed process data is sorted from low to high to obtain the order. In this way, when executing application process killing, the application process with low activity can be killed first. The lower the activity of the application process, the less frequently it is used, or even if it has not been used for a long time. Killing the application process will not have an adverse effect on the normal operation of the vehicle system. After killing the application process, its corresponding compressed process data is naturally cleared, thereby freeing up a portion of the space in the preset area. By sequentially releasing the space occupied by one or more compressed process data, the remaining space in the preset area can be made to meet the needs.
[0097] In some embodiments, step S70 may include: obtaining the priority, current state duration, memory usage, and importance of the application process corresponding to each compressed process data, wherein the importance is used to characterize the importance of the user service corresponding to the application process. The priority, current state duration, memory usage, and importance are weighted and calculated to obtain the compressed process activity of the application process corresponding to each compressed process data. The priority may be set manually. The current state duration and memory usage can be directly obtained by the vehicle system, because the vehicle system can monitor the status of each running application process when it is running, and can obtain the current state duration and memory usage of each application process at any time. The importance is determined by the server, which can monitor the status of the service tasks corresponding to each application process and record the user's personalized needs for each service task. Based on the user's personalized needs for each service task, the importance of each service task can be determined, and the importance of each application process can be determined. By pre-setting weights for each of the above parameters, activity is calculated by multiplying the weights by the numerical values corresponding to each parameter, and then using a pre-defined calculation algorithm to calculate the activity level. For example, the activity level can be directly calculated by multiplying the weights and parameters and adding the result.
[0098] In some schemes, the method for determining the priority of the application process corresponding to the compressed process data in step S70 may include: obtaining the historical running frequency and historical running time of the application process corresponding to the compressed process data. The priority is obtained by accumulating the product of the historical running frequency and the historical running time. The historical running frequency and the historical running time can be directly determined based on the historical running data of the vehicle system. In specific implementation, historical running data within a period of time can be selected for query, such as data within the past week. The greater the historical running frequency or the longer the historical running time, the more likely the user will use the application process, and the higher the possibility of the user using the application process, the higher the priority should be. In this scheme, the product of the historical running frequency and the historical running time can be directly added together, and the summed result is used as the priority. Alternatively, the summed results of each application process can be sorted, and the sorted serial number is used as the priority.
[0099] In some embodiments, after step S80, if the comparison result shows that the remaining space is greater than or equal to the set value, the method further includes S91: obtaining the running process activity of uncompressed application processes in a running state. Compressing the application processes whose running process activity is lower than a first set activity value to obtain compressed process data. The compressed process data is stored in the preset area. Specifically, by clearing some compressed process data in the preset area so that the remaining space in the preset area meets the conditions for storing further compressed process data, the activity of the currently uncompressed running application processes is screened to select further application processes for compression, thereby reclaiming memory space in the vehicle system. The first set activity value can be a long-term inactive process or a short-term inactive process. By continuing to compress and store a portion of the application processes in the preset area, the overall memory space of the vehicle system can be further released and reclaimed. When the vehicle system exits sleep mode and enters normal operation, it can achieve a higher operating speed.
[0100] Optionally, S91 in the above solution may include: performing reverse page compression on application processes whose running process activity is lower than the first set activity level and higher than a second set activity level to obtain compressed process data. Performing full compression on application processes whose running process activity is lower than the second set activity level to obtain compressed process data, wherein the second set activity level is lower than the first set activity level. In other words, application processes that are unlikely to return to an active state can be directly fully compressed to maximize space freeing up the preset area. Application processes that are likely to return to an active state are compressed using reverse page compression. The compression ratio of reverse page compression is higher than that of full compression technology, making it more convenient to decompress the application process when it returns to an active state. In a specific implementation, the long-term inactive processes and short-term inactive processes can be written into two separate lists. If compression is required for a specific application process, the type of application process can be efficiently determined through a table lookup, thereby quickly determining the compression strategy.
[0101] The present disclosure also provides a vehicle system process control device, as shown in FIG4 , including:
[0102] The state detection module 10 is configured to detect the current state of the vehicle system; the operating state of the vehicle system may include off, on, dormant, working, etc. After the vehicle system is turned on, the operating state can be monitored in real time.
[0103] The memory occupancy rate acquisition module 20 is configured to acquire the memory occupancy rate of the vehicle system if the current state is the working state; the memory occupancy rate may be a percentage of the occupied memory space to the total memory space.
[0104] The process activity acquisition module 30 is configured to acquire running application processes and determine their activity levels based on pre-set rules. When the vehicle-mounted system is in operation, the system automatically acquires a list of currently running application processes. The activity calculation rules for each application process can be pre-stored in the vehicle-mounted system and can be determined based on factors such as the duration of the application process's current state, its frequency of use, and its priority.
[0105] The interval level acquisition module 40 is configured to determine the interval level of the memory occupancy rate and obtain a determination result; the interval level includes a plurality of pre-set interval levels, each of which corresponds to a different memory occupancy rate range; the memory occupancy rate ranges corresponding to the plurality of interval levels are different, so the memory occupancy rate ranges can be sorted, and the interval level division result can be obtained using the sorting result.
[0106] The process control module 50 is configured to obtain a process handling policy corresponding to the interval level in the judgment result as a target process handling policy, and to perform killing or compression on the running application processes of different activity levels according to the target process handling policy; wherein each interval level corresponds to a different process handling policy. The process handling policies corresponding to different interval levels have different standards for killing and / or compressing the running application processes.
[0107] Specifically, if the memory usage interval level is high, for example, if the high memory usage is causing system lag, then more application processes may need to be checked and killed. On the other hand, if the memory usage interval level is low, and the system is simply responding slowly to certain services, fewer processes may need to be checked and killed, and compressing some application process data may suffice. Therefore, the process handling strategies corresponding to different interval levels have different standards for checking and / or compressing running application processes.
[0108] The solution disclosed in the present invention detects the current state of the vehicle system. If the vehicle system is in a working state, the memory occupancy rate of the vehicle system is monitored. At the same time, the running application process in the running state is obtained and the activity of the running application process is obtained using preset rules. After determining the interval level of the memory occupancy rate, the process processing strategy corresponding to the interval level is obtained as the target process processing strategy. According to the target process processing strategy, running application processes of different activity levels can be checked, killed or compressed. The above solution disclosed in the present invention can, after determining the interval level of the vehicle system memory occupancy rate, use the corresponding target process processing strategy and the activity of the running application process to check, kill or compress it to achieve memory recovery. This solution does not require limited scenarios or special conditions. As long as the vehicle system is in a working state, the memory of the vehicle system can be fundamentally recovered, thereby improving the memory status.
[0109] In some embodiments, the interval level acquisition module 40 is configured to: include multiple interval levels, each set from high to low according to a range of memory usage; and determine the interval level in which the memory usage belongs based on the memory usage and the memory usage range corresponding to each interval level. To determine which interval level the memory usage belongs to, the memory usage can be compared with the memory usage range in each interval level in order from high to low or from low to high. Once the memory usage range is determined, the corresponding interval level can be determined.
[0110] In some embodiments, the process control module 50 is configured to, if the judgment result indicates that the memory occupancy rate is in the high interval level, terminate all running application processes with an activity level lower than a first activity level. If the judgment result indicates that the memory occupancy rate is in the medium interval level, compress application processes with an activity level lower than a second activity level using a first compression method, where the second activity level is greater than the first activity level. If the judgment result indicates that the memory occupancy rate is in the low interval level, compress application processes with an activity level lower than a third activity level using a second compression method, where the third activity level is lower than the second activity level, and the compression ratio of the second compression method is lower than that of the first compression method. A lower compression ratio results in a smaller difference in data size before and after compression. For example, if the memory occupancy rate is within the range of [first memory occupancy rate, 100%), the vehicle-mounted system is at risk of shutting down and it is urgent to free up a large amount of memory as soon as possible to ensure that the vehicle-mounted system can resume operation. Therefore, in this embodiment, all running application processes with the first activity level are terminated, thereby freeing up memory to the greatest extent possible. If the memory occupancy rate is within the range of [second memory occupancy rate, first memory occupancy rate), it means that the current vehicle system has been stuck, and its urgency for memory recovery is lower than the high interval level. At this time, the application process with an activity lower than the second activity level can be compressed using the first compression method, and the second activity level is greater than the first activity level. That is, in the high-level interval, all application processes with an activity lower than the first activity level are killed. In this solution, some application processes with lower activity levels can be compressed. The activity level of the compressed application process in this process can be higher than the activity level of the application process killed in the high interval level, because the compression process has less impact on the application process than the killing process. If the memory occupancy rate is within the range of [third memory occupancy rate, second memory occupancy rate), it means that the current vehicle system has been slowed down in response speed, and its urgency for memory recovery is lower than the high interval level and the median interval level. At this time, the application process with an activity lower than the third activity level can be compressed using the second compression method, and the third activity level is less than the second activity level. The compression rate of the second compression method is less than the compression rate of the first compression method. In other words, this solution can compress some low-activity application processes, but the compression ratio is lower than the compression ratio of the median level. This means that the compression process has a smaller impact on the application processes, and the activity of the compressed application processes in this process can be lower than the activity of the application processes compressed in the median level. Because the vehicle system's operating conditions in this case are at the median level, the number of application processes selected for compression can be fewer than the number of application processes compressed in the median level.
[0111] In the above scheme, the first compression method is full compression, and the second compression method is reverse page compression. That is, for compression operations at the mid-level interval, full compression can be directly selected to maximize memory space release. In other words, for compression operations at low intervals, reverse page compression is used. While reverse page compression has a lower compression ratio, it is more convenient when decompression is needed after the application process becomes active again.
[0112] In some embodiments, the process activity acquisition module 30 is configured to obtain user identification information and extract historical data associated with the user identification information. The historical data includes the historical start frequency and historical run duration of the running application process during a set historical period. The module also obtains the runtime, memory usage information, and importance data of the running application process during the current run. The importance data indicates the importance of the user service corresponding to the running application process. The activity of the running application process is calculated by weighting the historical start frequency, historical run duration, the runtime of the current run, the memory usage information, and the importance data. The user identification information may be identity authentication information. Each user may have their own preferences for certain function settings during vehicle use. The vehicle-mounted system may associate each user's setting data with the user's identity information and store it. In this way, once the user's identity is determined, setting data that meets the user's preferences can be provided. The historical start frequency and historical run duration can be directly determined based on the vehicle-mounted system's historical operation data. In a specific implementation, historical operation data within a period of time can be selected for query, such as data from the past week. When the vehicle system is started, the vehicle system can obtain the running time of the running application process and the memory usage information in real time. The importance data is determined by the server, which can monitor the status of the service tasks corresponding to each application process, and can also record the user's personalized needs for each service task. According to the user's personalized needs for each service task, the importance of each service task can be determined, and then the importance of each application process can be determined. By setting weight values for the above parameters in advance, when calculating the activity, the weight value is multiplied by the numerical value corresponding to each parameter, and then the activity is obtained by using a pre-defined calculation algorithm. For example, the weight value and the parameter can be directly multiplied and the sum of the results can be used as the activity.
[0113] Optionally, the acquiring of user identification information in the above solution includes: detecting at least one biometric feature information of the user as the user identification information. The biometric feature information may include a face recognition result, a voice recognition result, or a fingerprint recognition result.
[0114] In some embodiments, the device further comprises:
[0115] The preset space recovery module is configured to detect the remaining space in a preset area reserved by the vehicle-mounted system for storing compressed process data. It obtains the compression process activity of each application corresponding to each compressed process data in the preset area. The remaining space is compared with a set value to obtain a comparison result. If the comparison result shows that the remaining space is less than the set value, the application processes corresponding to the compressed process data are sequentially terminated in order of compression process activity until the remaining space exceeds or equals the set value. The preset area is a storage area reserved by the vehicle-mounted system for storing compressed process data, and is commonly reserved in operating systems. The remaining space in the preset area is directly accessible to the vehicle-mounted system and can typically be expressed as a size or percentage. Compressed process data is obtained by compressing the application process, while the activity of the running process is accessible to the vehicle-mounted system in real time. Furthermore, the compression operation performed by the vehicle-mounted system can also determine the correspondence between the compressed process data and the application process. Therefore, the vehicle-mounted system can obtain the compression process activity of the application process corresponding to the compressed process data in real time. The set value can be determined based on the size of the typical compressed process data and can typically be several times the size of the typical compressed process data. If the remaining space in the preset area is too small, it may affect the storage of the compressed process data. Even if the vehicle system is experiencing slowness or lag, it will not be possible to free up memory space by compressing low-activity application processes. In this step, when the remaining space is less than the set value, the application processes corresponding to the compressed process data are checked and killed in order of activity, thereby reclaiming the storage space in the preset area.
[0116] The above solution ensures that the remaining free space in the reserved preset area is always sufficient, allowing the vehicle system to reclaim memory space at any time through memory compression, effectively improving the vehicle system's operating speed and avoiding lags. Furthermore, when the vehicle system enters sleep mode, the remaining free space in the preset area is detected and cleared, effectively reducing the system's memory pressure and minimizing the impact of memory compression and application process cleanup on system performance.
[0117] As an optional solution, in the above-mentioned preset space recovery module, the arrangement order of the compressed process activity can be obtained in the following way: the compressed process activity of the application corresponding to the compressed process data is sorted from low to high to obtain the arrangement order. In this way, when executing the application process killing, the application process with low activity can be killed first. The lower the activity of the application process, the less frequently it is used, or even it has not been used for a long time. Killing the application process will not have an adverse effect on the normal operation of the vehicle system. After killing the application process, its corresponding compressed process data will also be naturally cleared, thereby freeing up part of the space in the preset area. By sequentially releasing the space occupied by one or more compressed process data, the remaining space in the preset area can meet the needs.
[0118] In some embodiments, the preset space recovery module is further used to obtain the priority, current state duration, memory usage, and importance of the application process corresponding to each compressed process data, wherein the importance is used to represent the importance of the user service corresponding to the application process. The priority, current state duration, memory usage, and importance are weighted and calculated to obtain the compression process activity of the application process corresponding to each compressed process data. The priority can be set manually. The current state duration and memory usage can be directly obtained by the vehicle system because the vehicle system can monitor the status of each running application process when running and can obtain the current state duration and memory usage of each application process at any time. The importance is determined by the server, which can monitor the status of the service tasks corresponding to each application process and record the user's personalized needs for each service task. Based on the user's personalized needs for each service task, the importance of each service task can be determined, and the importance of each application process can be determined. By pre-setting weights for each of the above parameters, activity is calculated by multiplying the weights by the numerical values corresponding to each parameter, and then using a pre-defined calculation algorithm to calculate the activity level. For example, the activity level can be directly calculated by multiplying the weights and parameters and adding the result.
[0119] In some solutions, the preset space recovery module is also used to: obtain the historical running frequency and historical running time of the application process corresponding to the compressed process data. The priority is obtained by accumulating the product of the historical running frequency and the historical running time. The historical running frequency and the historical running time can be directly determined based on the historical running data of the vehicle system. The greater the historical running frequency or the longer the historical running time, the more likely it is that the user will use the application process, and the higher the possibility that the user will use the application process, the higher the priority should be. In this solution, the product of the historical running frequency and the historical running time can be directly added together, and the summed result is used as the priority. Alternatively, the summed results of each application process are sorted, and the sorted serial number is used as the priority.
[0120] In some embodiments, the preset space recovery module is further configured to: if the comparison result shows that the remaining space size is greater than or equal to the set value, obtain the running process activity of the uncompressed application processes in the running state. Compress the application processes whose running process activity is lower than a first set activity value to obtain compressed process data. Store the compressed process data in the preset area. That is, by clearing some compressed process data in the preset area so that the remaining space in the preset area meets the conditions for further storage of compressed process data, the activity of the currently uncompressed running application processes is screened to select further application processes for compression, thereby reclaiming the memory space of the vehicle system. The first set activity value can be a long-term inactive process or a short-term inactive process. By continuing to compress and store a portion of the application processes in the preset area, the overall memory space of the vehicle system can be further released and recovered. When the vehicle system exits the sleep state and enters the normal operating state, it can achieve a higher operating speed.
[0121] Optionally, the preset space recovery module is further configured to: perform reverse page compression on application processes whose running process activity is lower than the first set activity level and higher than a second set activity level to obtain compressed process data; and perform full compression on application processes whose running process activity is lower than the second set activity level to obtain compressed process data, where the second set activity level is lower than the first set activity level. In other words, application processes that are unlikely to return to an active state can be directly fully compressed to maximize space freeing up the preset area. Application processes that are likely to return to an active state are compressed using reverse page compression. This compression ratio is higher than that of full compression technology, making it more convenient to decompress the application processes when they return to an active state. In a specific implementation, the long-term inactive processes and short-term inactive processes can be written into two separate lists. If compression is required for a particular application process, the type of the application process can be efficiently determined through a table lookup, thereby enabling a quick determination of the compression strategy.
[0122] In some embodiments of the present disclosure, a storage medium is provided, in which program instructions are stored. After a computer calls the program instructions, the vehicle system process control method described in any one of the above embodiments is executed.
[0123] An embodiment of the present disclosure also provides an electronic device, as shown in FIG5 . The electronic device includes at least one processor 51 and at least one memory 52. At least one memory 52 stores program information. The at least one processor 51 reads the program information and executes the vehicle system process control method described in any of the above method embodiments. The device may also include an input device 53 and an output device 54. The processor 51, memory 52, input device 53, and output device 54 are communicatively connected. The memory 52, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The processor 51 executes the non-volatile software programs, instructions, and modules stored in the memory 52 to execute various functional applications and process data, thereby implementing the vehicle system process control method described in any of the above methods. The memory 52 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated by the vehicle system process control method. In addition, the memory 52 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 52 may optionally include a memory remotely located relative to the processor 51, and these remote memories may be connected to a device for executing the vehicle system process control method via a network. Examples of the above-mentioned network include but are not limited to the Internet, corporate intranet, local area network, mobile communication network and a combination thereof. The input device 53 may receive input user clicks, and generate signal inputs related to user settings and function controls of the vehicle system process control method. The output device 54 may include a display device such as a display screen. When the one or more modules are stored in the memory 52 and are executed by the one or more processors 51, the vehicle system process control method in any of the above-mentioned method embodiments is executed.
[0124] An embodiment of the present disclosure further provides a vehicle computer, which is configured with the vehicle computer system process control device or storage medium or electronic device described in the above solution.
[0125] An embodiment of the present disclosure also provides a vehicle, which includes the vehicle computer described in the above solution.
[0126] As needed, the above technical solutions can be combined to achieve the best technical effect.
[0127] The above are merely the principles and optional embodiments of the present disclosure. It should be noted that, for those skilled in the art, several other variations can be made based on the principles of the present disclosure, which should also be considered within the scope of protection of the present disclosure.
Claims
1. A vehicle system process control method, include: Detect the current status of the vehicle system; If the current state is a working state, obtaining the memory occupancy rate of the vehicle computer system; Obtaining a running application process in a running state, and obtaining the activity of the running application process according to a preset rule; Determine the interval level of the memory occupancy rate and obtain a determination result; the interval level includes a plurality of preset interval levels, each of the interval levels corresponds to a different memory occupancy rate range; The process processing strategy corresponding to the interval level in the judgment result is obtained as the target process processing strategy, and the running application processes of different activity levels are checked, killed or compressed according to the target process processing strategy; wherein each interval level corresponds to a different process processing strategy.
2. The vehicle system process control method according to claim 1, in, The interval level includes a plurality of interval levels set from high to low according to the range of memory usage; The determining the interval level of the memory usage rate and obtaining the determination result includes: The interval level to which the memory occupancy rate belongs is determined according to the memory occupancy rate and the memory occupancy rate range corresponding to each of the interval levels.
3. The vehicle system process control method according to claim 2, in, The interval level includes a high interval level, the process processing strategy corresponding to the interval level in the judgment result is obtained as a target process processing strategy, and the running application processes of different activity levels are checked and killed or compressed according to the target process processing strategy, including: If the judgment result indicates that the interval level of the memory usage rate is the high interval level, all running application processes whose activity level is lower than the first activity level are checked and killed.
4. The vehicle system process control method according to claim 3, in, The interval level includes a median interval level, the process processing strategy corresponding to the interval level in the judgment result is obtained as a target process processing strategy, and the running application processes of different activity levels are checked and killed or compressed according to the target process processing strategy, including: If the judgment result indicates that the interval level of the memory usage rate is the median interval level, the application process whose activity is lower than the second activity is compressed in the first compression mode, and the second activity is greater than the first activity.
5. The vehicle system process control method according to claim 4, in, The interval level includes a low interval level, the process processing strategy corresponding to the interval level in the judgment result is obtained as a target process processing strategy, and the running application processes of different activity levels are checked and killed or compressed according to the target process processing strategy, including: If the judgment result indicates that the interval level of the memory occupancy rate is the low interval level, the application process whose activity is lower than the third activity level is compressed using the second compression method, the third activity level is lower than the second activity level, and the compression rate of the second compression method is lower than the compression rate of the first compression method.
6. The vehicle system process control method according to claim 5, in: The first compression method is a full compression method, and the second compression method is a reverse page compression process.
7. The vehicle system process control method according to any one of claims 1 to 6, in, The acquiring the running application process in the running state and obtaining the activity of the running application process according to a preset rule includes: Obtain user identification information and extract historical data associated with the user identification information, the historical data including The historical start frequency and historical running time of the running application process in the set historical period; Obtaining the running time, memory usage information and importance data of the running application process, wherein the importance data represents the importance of the user service corresponding to the running application process; The activity of the running application process is obtained by weighted calculation of the historical startup frequency, the historical running time, the running time of the current running, the memory occupancy information and the importance data.
8. The vehicle system process control method according to claim 7, in, The obtaining of user identification information includes: At least one biometric feature information of the user is detected as the user identification information.
9. The vehicle system process control method according to any one of claims 1 to 8, in, If the current state is a dormant state, the method further includes: Detecting the remaining space size of a preset area reserved by the vehicle system for storing compressed process data; Obtaining the compression process activity of the application corresponding to each compression process data in the preset area; Compare the remaining space size with a set value to obtain a comparison result; If the comparison result is that the remaining space size is lower than the set value, the application processes corresponding to the compression process data are checked and killed in sequence according to the order of compression process activity until the remaining space size is higher than or equal to the set value.
10. A vehicle system process control device, include: A state detection module is configured to detect the current state of the vehicle system; A memory occupancy rate acquisition module is configured to acquire the memory occupancy rate of the vehicle system if the current state is a working state; A process activity acquisition module is configured to acquire a running application process in a running state and obtain the activity of the running application process according to a preset rule; An interval level acquisition module is configured to determine the interval level of the memory occupancy rate and obtain a determination result; the interval level includes a plurality of pre-set interval levels, each of which corresponds to a different memory occupancy rate range; The process control module is configured to obtain the process processing strategy corresponding to the interval level in the judgment result as the target process processing strategy, and to detect, kill or compress the running application processes of different activity levels according to the target process processing strategy; wherein each of the interval levels corresponds to a different process processing strategy.
11. A storage medium storing program instructions, wherein a computer calls the program instructions to execute the vehicle system process control method according to any one of claims 1 to 9.
12. An electronic device comprising at least one processor and at least one memory, wherein at least one of the memories stores program information, and at least one of the processors calls the program information to execute the vehicle system process control method according to any one of claims 1 to 9.
13. A vehicle computer, the vehicle computer being equipped with the vehicle computer system process control device according to claim 10 or the storage medium according to claim 11 or the electronic device according to claim 12.
14. A vehicle, comprising the vehicle computer according to claim 13.
Citation Information
Patent Citations
Memory recycle method and device
CN107220076A
Method and device for memory management, readable storage medium, and terminal
CN108932163A
Memory compression method and device, terminal and storage medium
CN110457235A
Memory compression method and device, terminal and storage medium
CN111367828A
Method and system for managing memory for applications in a computing system
US20220188145A1
