In-vehicle infotainment system memory recovery method and device, electronic equipment and vehicle
By detecting signals and sorting activity to kill application processes, the problem of insufficient memory compression space in the vehicle system is solved, and efficient memory space recycling and system speed improvement are achieved.
Patent Information
- Application Number
- CN202310332047.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
Existing memory compression methods in vehicle systems are limited by storage space, which results in limited memory space recovery and cannot effectively improve system operating speed and avoid lags.
By obtaining the memory compression space detection signal, the remaining space in the reserved storage area and the activity of the application are obtained, and the application process is killed according to the activity from low to high until the remaining space reaches the set threshold to ensure that the storage area has sufficient space. .
It effectively improves the running speed of the vehicle system, avoids system freezes, ensures that the memory space is always sufficient, and achieves efficient memory space recycling.
Smart Images

Figure CN118733478A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of vehicle system management, and in particular to a vehicle system memory recovery method, device, electronic equipment and vehicle. Background Art
[0002] The vehicle computer is the core of vehicle control. The vehicle computer is connected to the electronic control units in the vehicle. The data detected by the electronic control units is sent to the vehicle computer for processing by the vehicle computer system. The vehicle computer system determines the vehicle control strategy based on the processing results and controls the vehicle operation according to the control strategy.
[0003] With the development of vehicle intelligence, the number of electronic control units in vehicles is increasing, and the amount of data that needs to be processed by the vehicle system is also increasing. Since the vehicle system needs to process data through application processes, the application processes will occupy memory. Therefore, if there are too many application processes running, the occupancy rate of the vehicle system memory is too high, which will cause the vehicle system to run slower or even freeze. At present, in order to improve the efficiency of the use of the vehicle system memory, some application processes are usually selected for compression according to the vehicle scenario, and the compressed data is stored in the reserved storage area. By taking advantage of the reduced space occupied by the compressed data, the purpose of reclaiming memory space is achieved. However, since the space of the storage area pre-planned by the system is also limited, when its space is insufficient, the memory compression operation cannot be continued, and the recovery of memory space is restricted. If the available space of the system memory is small or even insufficient at this time, the system will not be able to operate normally. Summary of the invention
[0004] The technical problem to be solved by the present application is the memory compression method of the existing vehicle system. The limitation of the compressed data storage space leads to the technical problem that the memory space recovery is limited. Therefore, the present application proposes a vehicle system memory recovery method, device, electronic equipment and vehicle.
[0005] In a first aspect, the technical solution of the present application provides a method for reclaiming memory of a vehicle system, comprising:
[0006] Get memory compression space detection signal;
[0007] In response to the memory compression space detection signal, obtaining the remaining space amount of the reserved storage area; the reserved storage area is a storage area reserved by the vehicle system for storing compression process data;
[0008] Acquire the activity of the application corresponding to each compressed process data in the reserved storage area;
[0009] Comparing the remaining space with a set threshold to obtain a comparison result;
[0010] If the comparison result is that the remaining space is less than the set threshold, the application processes corresponding to the compressed process data are checked and killed in the order of activity until the remaining space is greater than or equal to the set threshold.
[0011] In some embodiments, the vehicle system memory recovery method, wherein the activity of the application corresponding to each compressed process data in the reserved storage area is obtained, further comprising: sorting the activity of the application corresponding to the compressed process data from low to high; if the comparison result is that the remaining space is less than the set threshold, then killing the application processes corresponding to the compressed process data in the order of activity until the remaining space is greater than or equal to the set threshold, including:
[0012] The application processes corresponding to the compressed process data are checked and killed in an ascending order of activity until the remaining space is greater than or equal to the set threshold.
[0013] In some embodiments, the vehicle system memory recovery method, wherein obtaining the activity of the application corresponding to each compressed process data in the reserved storage area comprises:
[0014] Obtaining the priority, current state duration, memory usage and importance of each application process corresponding to the compressed process data, wherein the importance is used to characterize the importance of the user service corresponding to the application process;
[0015] The activity of the application process corresponding to each compressed process data is obtained by weighted calculation of the priority, the current state duration, the memory occupancy and the importance.
[0016] The vehicle system memory recovery method described in some solutions, the priority determination method of the application process corresponding to the compressed process data, includes:
[0017] Obtaining the historical running frequency and historical running time of the application process corresponding to the compressed process data;
[0018] The priority is obtained by accumulating the product of the historical operation frequency and the historical operation time.
[0019] In some embodiments, the vehicle system memory recovery method, the step of obtaining a memory compression space detection signal includes:
[0020] Monitoring the operating status of the vehicle system;
[0021] If the operating state of the vehicle system is a dormant state, the memory compression space detection signal is triggered.
[0022] In some embodiments, if the comparison result is that the remaining space is greater than or equal to the set threshold, the method further includes:
[0023] Get the running process activity of the uncompressed and running application process;
[0024] Compressing the application process whose running process activity is lower than the first set activity to obtain compressed process data;
[0025] The compressed process data is stored in the reserved storage area.
[0026] In some embodiments, the vehicle system memory recovery method, wherein compressing the application process whose running process activity is lower than the first set activity to obtain compressed process data, comprises:
[0027] The application process whose running process activity is lower than the first set activity and higher than the second set activity is subjected to reverse page compression processing to obtain the compressed process data; wherein the second set activity is lower than the first set activity.
[0028] In some embodiments, the vehicle system memory recovery method, wherein compressing the application process whose running process activity is lower than the first set activity to obtain compressed process data, comprises:
[0029] The application process whose running process activity is lower than the second set activity is fully compressed to obtain compressed process data.
[0030] In a second aspect, the technical solution of the present application provides a memory recovery device for a vehicle system, comprising:
[0031] A signal acquisition module is configured to acquire a memory compression space detection signal;
[0032] A signal response module is configured to obtain the remaining space of the reserved storage area in response to the memory compression space detection signal; the reserved storage area is a storage area reserved by the vehicle system for storing compression process data;
[0033] An activity acquisition module, configured to acquire the activity of the application corresponding to each compressed process data in the reserved storage area;
[0034] A comparison module is configured to compare the remaining space amount with a set threshold to obtain a comparison result;
[0035] The memory recovery module is configured to, if the comparison result is that the remaining space is less than the set threshold, kill the application processes corresponding to the compressed process data in order of activity until the remaining space is greater than or equal to the set threshold.
[0036] In a third aspect, the technical solution of the present application provides a storage medium, in which program instructions are stored. After a computer calls the program instructions, the vehicle system memory recovery method described in any one of the first aspects is executed.
[0037] In a fourth aspect, the technical solution of the present application 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 after calling the program information, at least one of the processors executes the vehicle system memory recovery method described in any one of the first aspects.
[0038] In a fifth aspect, the technical solution of the present application provides a vehicle computer, which is equipped with the vehicle computer system memory recovery device described in the second aspect or the storage medium described in the third aspect or the electronic device described in the fourth aspect.
[0039] In a sixth aspect, the technical solution of the present application provides a vehicle, which includes the vehicle computer described in the fifth aspect.
[0040] The above technical solution has the following beneficial effects:
[0041] The vehicle system memory recovery method, device, electronic device and vehicle provided by the technical solution of the present application detect the remaining space of the reserved storage area for storing compressed process data after obtaining and responding to the memory compression space detection signal, and obtain the activity of the application corresponding to each compressed process data in the reserved storage area. If the remaining space of the reserved storage area is less than the set threshold, the application process corresponding to the compressed process data is checked and killed in the order of activity until the remaining space of the reserved storage area is greater than or equal to the set threshold. Through this solution, it can ensure that the remaining space of the reserved storage area is always sufficient, and ensure that the vehicle system can recycle the memory space at any time by memory compression, which can effectively improve the operation speed of the vehicle system and avoid jamming. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 This is a flow chart of a method for reclaiming memory of a vehicle system in an embodiment of the present application;
[0043] Figure 2 A flowchart of a method for reclaiming memory of a vehicle system according to another embodiment of the present application;
[0044] Figure 3This is a structural block diagram of a memory recovery device for a vehicle system according to an embodiment of the present application;
[0045] Figure 4 This is a structural block diagram of a vehicle system memory recovery device according to another embodiment of the present application;
[0046] Figure 5 A schematic diagram of the hardware connection relationship of an electronic device for executing a method for reclaiming memory in a vehicle system according to an embodiment of the present application. DETAILED DESCRIPTION
[0047] The specific implementation of the present application is further described below with reference to the accompanying drawings.
[0048] It is easy to understand that according to the technical solution of the present application, without changing the essential spirit of the present application, a variety of structural modes and implementation modes that can be replaced by those skilled in the art can be replaced with each other. Therefore, the following specific implementation modes and drawings are only exemplary descriptions of the technical solution of the present application, and should not be regarded as the entirety of the present application or as a limitation or restriction on the technical solution of the application.
[0049] The directional terms such as up, down, left, right, front, back, front, back, top, bottom, etc. mentioned or may be mentioned in this specification are defined relative to the structures shown in the drawings. They are relative concepts and may change accordingly according to different positions and different usage conditions. Therefore, these or other directional terms should not be interpreted as restrictive terms.
[0050] The present application provides a method for recovering memory of a vehicle system, which can be applied to a vehicle system. Figure 1 As shown, the method includes:
[0051] S10: Obtain a memory compression space detection signal.
[0052] The memory compression space detection signal may be a trigger condition pre-set by the vehicle computer system. The vehicle computer system monitors some information on the system operation status. Once the trigger condition is met, it is determined that the memory compression space detection signal has been responded to.
[0053] The memory compression space detection signal can also be triggered manually by the user. The vehicle system reserves an interface for the user. For example, after the vehicle is started, the vehicle system is also started. Before the vehicle drives, the user can send a request through the reserved interface of the vehicle system. If the vehicle system receives the request sent by the user through the reserved interface, it is determined that the memory compression space detection signal has been responded to.
[0054] S20: In response to the memory compression space detection signal, obtaining the remaining space amount of the reserved storage area; the reserved storage area is a storage area reserved by the vehicle system for storing compression process data.
[0055] The reserved storage 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 reserved storage area can be directly obtained by the vehicle system. It can usually be expressed in size, for example, 1.5G means that there is 1.5G of remaining space in the reserved storage area. It can also be expressed in percentage, for example, 10% means that there is 10% remaining in the reserved storage area.
[0056] S30: Obtain the activity of the application corresponding to each compressed process data in the reserved storage area.
[0057] The compressed process data is obtained by compressing the application process, and the activity of the running process can be obtained by the vehicle system in real time. At the same time, the compression operation of the application process performed by the vehicle system can also determine the corresponding relationship between the compressed process data and the application process. Therefore, the vehicle system can obtain the activity of the application process corresponding to the compressed process data in real time.
[0058] S40: Compare the remaining space amount with a set threshold to obtain a comparison result.
[0059] The threshold value may be determined according to the size of the general compressed process data, and may usually be several times the size of the general compressed process data.
[0060] S50: If the comparison result is that the remaining space is less than the set threshold, then the application processes corresponding to the compressed process data are checked and killed in the order of activity until the remaining space is greater than or equal to the set threshold.
[0061] When the remaining space in the reserved storage area is too small, it may affect the storage of compressed process data. Even if the vehicle system is slow or stuck, it is impossible to release memory space by compressing the application process with low activity. In this step, when the remaining space is less than the set threshold, the application process corresponding to the compressed process data can be checked and killed in the order of activity, so as to reclaim the storage space of the reserved storage area.
[0062] In the above scheme of this embodiment, after obtaining and responding to the memory compression space detection signal, the remaining space of the reserved storage area for storing the compressed process data is detected, and the activity of the application corresponding to each compressed process data in the reserved storage area is obtained. If the remaining space of the reserved storage area is less than the set threshold, the application process corresponding to the compressed process data is checked and killed in the order of activity until the remaining space of the reserved storage area is greater than or equal to the set threshold. Through this scheme, it can be ensured that the remaining space of the reserved storage area is always sufficient, and the vehicle system can reclaim the memory space at any time through memory compression, which can effectively improve the operation speed of the vehicle system and avoid jamming.
[0063] Preferably, the step S20 includes: sorting the activity of the application corresponding to the compressed process data from low to high; the step S50 in the above scheme includes killing the application process corresponding to the compressed process data in the order of activity from low to high until the remaining space is greater than or equal to the set threshold. In this way, when executing the killing of the application process, the application process with low activity can be killed first. In the above scheme, the compressed process data stored in the reserved storage area is obtained by compressing the application process with low activity. Although the activity of each process corresponding to the compressed process data is relatively low, it can still be sorted according to the activity level. 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, and after killing the application process, the corresponding compressed process data is naturally cleaned up, thereby releasing part of the space in the reserved storage area. By releasing the occupied space of one or more compressed process data in sequence, the remaining space in the reserved storage area can meet the needs.
[0064] In some embodiments, the vehicle system memory recovery method, step S30 may include:
[0065] S301: Obtaining the priority, current state duration, memory usage and importance of each application process corresponding to the compressed process data, wherein the importance is used to represent the importance of the user service corresponding to the application process.
[0066] Among them, the priority can be set manually. For example, if the user likes to listen to music while driving, the priority of the application process related to music playback can be manually increased. If the user does not like to open the sunroof while driving, the priority of the application process related to the sunroof switch control can be lowered, etc.
[0067] The current state duration and memory usage can be directly obtained by the vehicle system, because when the vehicle system is running, it can monitor the status of each running application process and can obtain the current state duration and memory usage of each application process at any time.
[0068] 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. The importance of each service task can be determined based on the user's personalized needs for each service task, and then the importance of each application process can be determined.
[0069] S302: Perform a weighted calculation on the priority, the current state duration, the memory usage and the importance to obtain the activity of the application process corresponding to each compressed process data.
[0070] 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 calculated using a pre-defined calculation algorithm. For example, the weight value and the parameter can be directly multiplied and the summed result can be used as the activity.
[0071] In some embodiments, the method for determining the priority of the application process corresponding to the compressed process data in step S301 is as follows:
[0072] S3011: Obtain the historical running frequency and historical running time of the application process corresponding to the compressed process data.
[0073] The historical operation 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.
[0074] S3012: Accumulate the product of the historical operation frequency and the historical operation time to obtain the priority.
[0075] Obviously, the greater the historical running frequency or the longer the historical running time, the more likely the user is to use the application process, and the higher the possibility of the user using 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, and the summed result is used as the priority. Alternatively, the summed results of the application processes are sorted, and the sorted sequence number is used as the priority.
[0076] For example, if a user likes to play cloud music from 7 to 8 a.m. every Monday, then the application process related to playing music from 7 to 8 a.m. every Monday will be considered as an application process with a higher priority and should not be killed to avoid the cleaning operation affecting the user's actual experience.
[0077] In some schemes, such as Figure 2 As shown, the step S10 includes:
[0078] S101: Monitor the operating status of the vehicle system.
[0079] The operating status of the vehicle system may include closed, open, dormant, running, smooth, stuck, dead, etc. After the vehicle system is turned on, the operating status can be monitored in real time.
[0080] S102: If the operating state of the vehicle system is a dormant state, triggering the memory compression space detection signal.
[0081] That is, when the vehicle system enters the sleep state, the memory compression space detection signal is triggered, and the amount of remaining space in the reserved storage area is detected and cleared and released, which can effectively reduce the memory pressure of the vehicle system while reducing the impact of memory compression and application process clearing on the performance of the vehicle system.
[0082] In some schemes, such as Figure 2 As shown, if the comparison result is that the remaining space is greater than or equal to the set threshold, the method further includes:
[0083] S60: Obtain the running process activity of the uncompressed and running application process.
[0084] That is, after responding to the memory compression space detection signal, by clearing some compressed process data in the reserved storage area so that the remaining space in the reserved storage area has met the conditions for continuing to store the compressed process data, the activity of the running application processes that are currently in an uncompressed state is screened. The purpose is to continue to select some application processes for compression, thereby realizing the recovery of the memory space of the vehicle system.
[0085] S70: Compress the application process whose running process activity is lower than the first set activity to obtain compressed process data.
[0086] The first set activity level may be a long-term inactive process or a short-term inactive process.
[0087] A long-term inactive process means that the process has been inactive for a long time and it is almost impossible to restore it to an active state. As mentioned above, the system determines the activity level after determining its importance based on the process priority, the duration of the process's current state, the size of the process's memory usage, and user needs or user experience.
[0088] A short-term inactive process is a process that has been inactive but may still be restored to an active state. As mentioned above, the system determines the activity level after determining its importance based on the process priority, the duration of the process's current state, the size of the process's memory usage, and user needs or user experience.
[0089] S80: Storing the compressed process data in the reserved storage area.
[0090] By continuing to compress and store a portion of the application process in the reserved storage area, the overall memory space of the vehicle system can be further released and recycled. When the vehicle system exits the dormant state and enters the normal operating state, it can have a higher operating speed.
[0091] More preferably, if Figure 3 As shown, S70 in the above solution may include:
[0092] S701: Perform reverse page compression processing on the application process whose running process activity is lower than the first set activity and higher than the second set activity to obtain the compressed process data.
[0093] That is, application processes that are rarely restored to an active state can be directly fully compressed to release space in the reserved storage area to the greatest extent.
[0094] S702: Fully compress the application process whose running process activity is lower than the second set activity to obtain compressed process data, wherein the second set activity is lower than the first set activity.
[0095] That is, for application processes that may be restored to an active state again, the reverse page compression processing method is used for compression. The compression ratio of the reverse page compression will be higher than the compression ratio of the full compression technology, so it is more convenient when the application process needs to be decompressed when it is restored to an active state again. In specific implementation, the first set activity and the second set activity can both be set fixed values, such as the second set activity can be half of the first set activity, or the first set activity is a fixed value, and the size of the second activity is determined according to the number of application processes. For example, when the number of application processes with less than the first set activity is A, the range of the activity of the application processes with the smallest activity of A / 3 can be determined, and the maximum value within the range is taken as the second set activity.
[0096] In specific implementation, the long-term inactive processes and short-term inactive processes can be written into two lists respectively. If a certain application process needs to be compressed, the type of the application process can be efficiently determined by looking up the table, so that the compression strategy can be quickly determined.
[0097] The present application embodiment provides a vehicle system memory recovery device, such as Figure 3 As shown, including:
[0098] The signal acquisition module 10 is configured to acquire a memory compression space detection signal. The memory compression space detection signal may be a trigger condition pre-set by the vehicle system. The vehicle system monitors some information on the system operation status. Once the trigger condition is monitored to be met, it is determined that the memory compression space detection signal has been responded to. The memory compression space detection signal may also be triggered manually by the user. The vehicle system reserves an interface for the user. For example, after the vehicle is started, the vehicle system is also started. Before the vehicle drives, the user can send a request through the reserved interface of the vehicle system. If the vehicle system receives the request sent by the user through the reserved interface, it is determined that the memory compression space detection signal has been responded to.
[0099] The signal response module 20 is configured to obtain the remaining space of the reserved storage area in response to the memory compression space detection signal; the reserved storage area is a storage area reserved by the vehicle system for storing compressed process data. The reserved storage area is a storage area reserved by the vehicle system for storing compressed process data, and this area is reserved in general operating systems. The remaining space of the reserved storage area can be directly obtained by the vehicle system, and can usually be expressed in size or as a percentage.
[0100] The activity acquisition module 30 is configured to acquire the activity of the application corresponding to each compressed process data in the reserved storage area; the compressed process data is obtained by compressing the application process, and the activity of the running process can be acquired by the vehicle system in real time. At the same time, the compression operation of the application process performed by the vehicle system can also determine the corresponding relationship between the compressed process data and the application process. Therefore, the vehicle system can acquire the activity of the application process corresponding to the compressed process data in real time.
[0101] The comparison module 40 is configured to compare the remaining space with a set threshold to obtain a comparison result. The set threshold can be determined according to the size of the general compression process data, and can usually be several times the size of the general compression process data.
[0102] The memory recovery module 50 is configured to, if the comparison result is that the remaining space is less than the set threshold, kill the application process corresponding to the compressed process data in the order of activity until the remaining space is greater than or equal to the set threshold. When the remaining space in the reserved storage area is too small, it may affect the storage of the compressed process data. Even if the vehicle system is slow or stuck, it is impossible to release memory space by compressing the application process with low activity. In this step, when the remaining space is less than the set threshold, the application process corresponding to the compressed process data can be killed in the order of activity, thereby reclaiming the storage space of the reserved storage area.
[0103] In the above scheme of this embodiment, after obtaining and responding to the memory compression space detection signal, the remaining space of the reserved storage area for storing the compressed process data is detected, and the activity of the application corresponding to each compressed process data in the reserved storage area is obtained. If the remaining space of the reserved storage area is less than the set threshold, the application process corresponding to the compressed process data is checked and killed in the order of activity until the remaining space of the reserved storage area is greater than or equal to the set threshold. Through this scheme, it can be ensured that the remaining space of the reserved storage area is always sufficient, and the vehicle system can reclaim the memory space at any time through memory compression, which can effectively improve the operation speed of the vehicle system and avoid jamming.
[0104] Preferably, in the above-mentioned device, the signal response module 20 is also used to sort the activity of the application corresponding to the compressed process data from low to high; the memory recovery module 50 in the above-mentioned scheme is used to kill the application process corresponding to the compressed process data in the order of activity from low to high until the remaining space is greater than or equal to the set threshold. In this way, when executing the application process killing, the application process with low activity can be killed first. The less active 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, and after killing the application process, its corresponding compressed process data is naturally cleared, thereby releasing part of the space in the reserved storage area. By releasing the occupied space of one or more compressed process data in sequence, the remaining space in the reserved storage area can meet the needs.
[0105] The activity acquisition module 30 in some schemes is used to obtain the priority, current state duration, memory usage and importance of the application process corresponding to each compressed process data, and the importance is used to characterize the importance of the user service corresponding to the application process; the activity of the application process corresponding to each compressed process data is obtained after weighted operation of the priority, the current state duration, the memory usage and the importance. The priority can be set manually. For example, if the user likes to listen to music while driving, the priority of the application process related to music playback can be manually increased. If the user does not like to open the sunroof while driving, the priority of the application process related to the sunroof switch control can be lowered. The current state duration and memory usage can be directly obtained by the vehicle system, because when the vehicle system is running, it can monitor the status of each running application process 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 can also record the personalized needs of users for each service task. The importance of each service task can be determined based on the personalized needs of users for each service task, and then the importance of each application process can be determined. By setting weight values for the above parameters, when calculating the activity, the weight value is multiplied by the numerical value corresponding to each parameter, and then the activity is calculated using a pre-defined calculation algorithm. For example, the weight value and the parameter can be directly multiplied and added as the result as the activity.
[0106] In some schemes, the activity acquisition module 30 is 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. 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 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 scheme, the product of the historical running frequency and the historical running time can be directly added, 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.
[0107] In some schemes, such as Figure 4 As shown, the signal acquisition module includes:
[0108] The monitoring module 101 is used to monitor the operating status of the vehicle system. The operating status of the vehicle system may include off, on, dormant, running, smooth, stuck, dead, etc. After the vehicle system is turned on, the operating status can be monitored in real time.
[0109] The trigger module 102 is used to trigger the memory compression space detection signal if the operating state of the vehicle system is a dormant state. That is, when the vehicle system enters a dormant state, the memory compression space detection signal is triggered to detect the size of the remaining space in the reserved storage area and clean it up and release it, which can effectively reduce the memory pressure of the vehicle system and reduce the impact of memory compression and application process cleaning on the performance of the vehicle system.
[0110] In some schemes, the device further includes a process compression and storage module 60, which is used to obtain the running process activity of the uncompressed and running application process if the comparison result is that the remaining space amount is greater than or equal to the set threshold. Compress the application process whose running process activity is lower than the first set activity to obtain compressed process data. Store the compressed process data in the reserved storage area. That is, after responding to the memory compression space detection signal, by cleaning up part of the compressed process data in the reserved storage area, when the remaining space in the reserved storage area has met the conditions for continuing to store the compressed process data, the activity of the running application process currently in the uncompressed state is screened, so as to continue to select some application processes for compression, thereby realizing the recovery of the memory space of the vehicle system. Among them, the first set activity can be a long-term inactive process or a short-term inactive process. A long-term inactive process can mean that the process has been in an inactive state for a long time and it is almost impossible to restore to an active state. As mentioned above, the system can determine the activity after determining its importance based on the process priority, the duration of the current state of the process, the memory occupied by the process, and the user needs or user experience. A short-term inactive process is a process that is already inactive, but it is still possible to restore it to an active state. As mentioned earlier, the system determines the activity level after determining its importance based on the process priority, the duration of the current state of the process, the size of the process memory usage, and the user needs or user experience. By continuing to compress and store part of the application process in the reserved storage 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 have a higher operating speed.
[0111] In some schemes, the process compression and storage module 60 is used to perform reverse page compression processing on the application process whose running process activity is lower than the first set activity and higher than the second set activity to obtain the compressed process data. The application process whose running process activity is lower than the second set activity is fully compressed to obtain the compressed process data, wherein the second set activity is less than the first set activity. That is, for the application process that is almost never restored to the active state, it can be directly fully compressed to release the space of the reserved storage area to the maximum extent. For the application process that may be restored to the active state again, the reverse page compression processing method is used for compression. The compression ratio of the reverse page compression will be higher than the compression ratio of the full compression technology, so it is more convenient when the application process is restored to the active state again and needs to be decompressed. In specific implementation, the above-mentioned long-term inactive process and short-term inactive process can be written into two lists respectively. If a certain application process needs to be compressed, it can be efficiently determined by looking up the table to determine which type the application process belongs to, so that the compression strategy can be quickly determined.
[0112] In some embodiments of the present application, a storage medium is provided, in which program instructions are stored. After a computer calls the program instructions, the vehicle system memory recovery method described in any one of the above embodiments is executed.
[0113] The present application also provides an electronic device, such as Figure 5As shown, the electronic device includes at least one processor 51 and at least one memory 52, at least one of the memories 52 stores program information, and at least one of the processors 51 reads the program information and executes the vehicle system memory recovery 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, the memory 52, the input device 53 and the output device 54 can be connected in communication. 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 various functional applications and data processing by running the non-volatile software programs, instructions and modules stored in the memory 52, that is, the vehicle system memory recovery method provided by any of the above schemes is implemented. The memory 52 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the vehicle system memory recovery method, etc. 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 arranged relative to the processor 51, and these remote memories may be connected to a device for executing the vehicle system memory recovery method via a network. Examples of the above-mentioned network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and 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 memory recovery 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, when they are run by the one or more processors 51, the vehicle system memory recovery method in any of the above-mentioned method embodiments is executed.
[0114] An embodiment of the present application further provides a vehicle computer, which is configured with the vehicle computer system memory recovery device or storage medium or electronic device described in the above solution.
[0115] The embodiment of the present application also provides a vehicle, the vehicle comprising the vehicle computer described in the above solution. Under the memory state of the existing vehicle computer, the solution greatly reduces the memory pressure and reduces the impact on the user experience caused by low memory problems.
[0116] As needed, the above technical solutions can be combined to achieve the best technical effect.
[0117] The above are only the principles and preferred embodiments of the present application. It should be noted that, for ordinary technicians in this field, on the basis of the principles of the present application, several other modifications can be made, which should also be considered as the protection scope of the present application.
Claims
1. A method for reclaiming memory of a vehicle system, characterized in that: include: Get memory compression space detection signal; In response to the memory compression space detection signal, obtaining the remaining space amount of the reserved storage area; The reserved storage area is a storage area reserved by the vehicle system for storing compressed process data; Acquire the activity of the application corresponding to each compressed process data in the reserved storage area; Comparing the remaining space with a set threshold to obtain a comparison result; If the comparison result is that the remaining space is less than the set threshold, the application processes corresponding to the compressed process data are checked and killed in the order of activity until the remaining space is greater than or equal to the set threshold.
2. The vehicle system memory recovery method according to claim 1, characterized in that: The obtaining the activity of the application corresponding to each compressed process data in the reserved storage area further includes: sorting the activity of the application corresponding to the compressed process data from low to high; If the comparison result is that the remaining space is less than the set threshold, the application processes corresponding to the compressed process data are killed in order of activity until the remaining space is greater than or equal to the set threshold, including: killing the application processes corresponding to the compressed process data in order of activity from low to high until the remaining space is greater than or equal to the set threshold.
3. The vehicle system memory recovery method according to claim 1, characterized in that: The obtaining the activity of the application corresponding to each compressed process data in the reserved storage area includes: Obtaining the priority, current state duration, memory usage and importance of each application process corresponding to the compressed process data, wherein the importance is used to characterize the importance of the user service corresponding to the application process; The activity of the application process corresponding to each compressed process data is obtained by weighted calculation of the priority, the current state duration, the memory occupancy and the importance.
4. The vehicle system memory recovery method according to claim 3, characterized in that: The method for determining the priority of the application process corresponding to the compressed process data includes: 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 operation frequency and the historical operation time.
5. The vehicle system memory recovery method according to claim 1, characterized in that: The obtaining of the memory compression space detection signal comprises: Monitoring the operating status of the vehicle system; If the operating state of the vehicle system is a dormant state, the memory compression space detection signal is triggered.
6. The vehicle system memory recovery method according to any one of claims 1 to 5, characterized in that: If the comparison result is that the remaining space is greater than or equal to the set threshold, the method further includes: Get the running process activity of the uncompressed and running application process; Compressing the application process whose running process activity is lower than the first set activity to obtain compressed process data; The compressed process data is stored in the reserved storage area.
7. The vehicle system memory recovery method according to claim 6, characterized in that: The step of compressing the application process whose running process activity is lower than the first set activity to obtain compressed process data includes: The application process whose running process activity is lower than the first set activity and higher than the second set activity is subjected to reverse page compression processing to obtain the compressed process data; wherein the second set activity is lower than the first set activity.
8. The vehicle system memory recovery method according to claim 7, characterized in that: The step of compressing the application process whose running process activity is lower than the first set activity to obtain compressed process data includes: The application process whose running process activity is lower than the second set activity is fully compressed to obtain compressed process data.
9. A memory recovery device for a vehicle system, characterized in that: include: A signal acquisition module is configured to acquire a memory compression space detection signal; A signal response module is configured to obtain the remaining space of the reserved storage area in response to the memory compression space detection signal; the reserved storage area is a storage area reserved by the vehicle system for storing compression process data; An activity acquisition module, configured to acquire the activity of the application corresponding to each compressed process data in the reserved storage area; A comparison module is configured to compare the remaining space amount with a set threshold to obtain a comparison result; The memory recovery module is configured to, if the comparison result is that the remaining space is less than the set threshold, kill the application processes corresponding to the compressed process data in order of activity until the remaining space is greater than or equal to the set threshold.
10. A storage medium, characterized in that: The storage medium stores program instructions, and after the computer calls the program instructions, it executes the vehicle system memory recovery method according to any one of claims 1 to 8.
11. An electronic device, characterized in that: The electronic device includes at least one processor and at least one memory, 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 memory recovery method according to any one of claims 1-8.
12. A vehicle computer, characterized in that: The vehicle computer is configured with the vehicle computer system memory recovery device according to claim 9 or the storage medium according to claim 10 or the electronic device according to claim 10.
13. A vehicle, characterized in that: The vehicle comprises the vehicle machine according to claim 12.
