CN118733477A - A vehicle system process control method, device, electronic equipment and vehicle - Google Patents
A vehicle system process control method, device, electronic equipment and vehicle Download PDFInfo
- Publication number
- CN118733477A CN118733477A CN202310331782.6A CN202310331782A CN118733477A CN 118733477 A CN118733477 A CN 118733477A CN 202310331782 A CN202310331782 A CN 202310331782A CN 118733477 A CN118733477 A CN 118733477A
- Authority
- CN
- China
- Prior art keywords
- activity
- vehicle
- interval
- level
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0253—Garbage collection, i.e. reclamation of unreferenced memory
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3037—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a memory, e.g. virtual memory, cache
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Quality & Reliability (AREA)
- Mathematical Physics (AREA)
- Traffic Control Systems (AREA)
- Time Recorders, Dirve Recorders, Access Control (AREA)
Abstract
Description
技术领域Technical Field
本申请涉及车机系统内存管理技术领域,特别涉及一种车机系统进程控制方法、装置、电子设备及车辆。The present application relates to the technical field of vehicle system memory management, and in particular to a vehicle system process control method, device, electronic equipment and vehicle.
背景技术Background Art
在车辆中,车机系统是整车控制的核心,车机系统中运行的应用进程过多时,对车机系统的内存占用过高,可能会影响到车机系统的运行速度,甚至是出现卡顿的不利现象。因此,为了确保车机系统的运行速度,通常会在特定场景下压缩某几类符合条件的进程以释放部分内存,例如在车辆正常行驶过程中,可以压缩与车辆远程控制相关的进程。现有技术中的方案,由于压缩过程仅针对某几个特定场景,压缩条件也仅包含几类特殊条件,对于车机系统内存的回收效果并不明显,系统内存状态无法得到真正意义上的改善。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 running speed of the vehicle computer system and even cause unfavorable phenomena such as freezing. Therefore, in order to ensure the running speed of the vehicle computer system, certain types of qualified processes are usually compressed in specific scenarios to release some memory. For example, during normal driving of the vehicle, processes related to vehicle remote control can be compressed. In the solutions in the prior art, since the compression process is only for certain specific scenarios and the compression conditions only include a few special conditions, the memory recovery effect on the vehicle computer system is not obvious, and the system memory status cannot be truly improved.
发明内容Summary of the invention
本申请要解决的技术问题是现有车机系统的内存压缩方法,对车机系统内存状态改善效果不佳的技术问题,为此,本申请提出了一种车机系统进程控制方法、装置、电子设备及车辆。The technical problem to be solved by the present application is that the existing memory compression method of the vehicle system has a poor effect on improving the memory status of the vehicle system. To this end, the present application proposes a vehicle system process control method, device, electronic equipment and vehicle.
第一方面,本申请技术方案提供一种车机系统进程控制方法,包括:In a first aspect, the technical solution of the present application provides a vehicle system process control method, comprising:
检测车机系统的当前状态;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.
一些方案中所述的车机系统进程控制方法,所述区间等级包括按照内存占用率范围从高到低设定的多个区间等级;所述判断所述内存占用率所在区间等级,并得到判断结果,包括: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 occupancy rate range; the determining the interval level of the memory occupancy rate and obtaining the determination result include:
根据所述内存占用率和每个所述区间等级对应的内存占用率范围,确定所述内存占用率所在区间等级。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.
一些方案中所述的车机系统进程控制方法,所述区间等级包括高区间等级,所述获取与所述判断结果中所在区间等级对应的进程处理策略为目标进程处理策略,并按照所述目标进程处理策略对不同活跃度的所述运行中应用进程进行查杀或压缩,包括:In some embodiments, the vehicle system process control method, wherein 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.
一些方案中所述的车机系统进程控制方法,所述区间等级包括中位区间等级,所述获取与所述判断结果中所在区间等级对应的进程处理策略为目标进程处理策略,并按照所述目标进程处理策略对不同活跃度的所述运行中应用进程进行查杀或压缩,包括:In some embodiments, the vehicle system process control method, wherein 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 level is compressed in the first compression mode, and the second activity level is greater than the first activity level.
一些方案中所述的车机系统进程控制方法,所述区间等级包括低区间等级,所述获取与所述判断结果中所在区间等级对应的进程处理策略为目标进程处理策略,并按照所述目标进程处理策略对不同活跃度的所述运行中应用进程进行查杀或压缩,包括:In some embodiments, the vehicle system process control method, wherein 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 by 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.
一些方案中所述的车机系统进程控制方法,所述第一压缩方式为全压缩方式,所述第二压缩方式为逆向页压缩处理。In some schemes, the vehicle system process control method is described, wherein the first compression method is a full compression method, and the second compression method is a reverse page compression process.
一些方案中所述的车机系统进程控制方法,所述获取处于运行状态的运行中应用进程,根据预设规则得到所述运行中应用进程的活跃度,包括:In some embodiments, the vehicle system process control method, wherein 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:
获取用户识别信息,并提取与所述用户识别信息关联的历史数据,所述历史数据包括所述运行中应用进程在设定历史时段的历史开启频率和历史运行时长;Acquire 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 a 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.
一些方案中所述的车机系统进程控制方法,所述获取用户识别信息,包括:In some embodiments of the vehicle system process control method, the step of obtaining user identification information includes:
检测用户的至少一个生物特征信息作为所述用户识别信息。At least one biometric feature information of the user is detected as the user identification information.
一些方案中所述的车机系统进程控制方法,若所述当前状态为休眠状态,所述方法还包括:In some embodiments, if the current state is a dormant state, the vehicle system process control 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.
第二方面,本申请技术方案提供一种车机系统进程控制装置,包括:In a second aspect, the technical solution of the present application provides a vehicle system process control device, comprising:
状态检测模块,被配置为检测车机系统的当前状态;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 preset 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.
第三方面,本申请技术方案提供一种存储介质,所述存储介质中存储有程序指令,计算机调用所述程序指令后执行第一方面任一项技术方案所述的车机系统进程控制方法。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 process control method described in any technical solution of the first aspect is executed.
第四方面,本申请技术方案提供一种电子设备,所述电子设备包括至少一个处理器和至少一个存储器,至少一个所述存储器中存储有程序信息,至少一个所述处理器调用所述程序信息后执行第一方面任一项方案所述的车机系统进程控制方法。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, at least one of the memories storing program information, and at least one of the processors calling the program information executes the vehicle system process control method described in any one of the solutions of the first aspect.
第五方面,本申请技术方案提供一种车机,所述车机配置有第二方面技术方案所述的车机系统进程控制装置或第三方面技术方案所述的存储介质或第四方面技术方案所述的电子设备。In a fifth aspect, the technical solution of the present application provides a vehicle computer, which is configured with the vehicle computer system process control device described in the technical solution of the second aspect or the storage medium described in the technical solution of the third aspect or the electronic device described in the technical solution of the fourth aspect.
第六方面,本申请技术方案提供一种车辆,所述车辆包括第五方面技术方案中所述的车机。In a sixth aspect, the technical solution of the present application provides a vehicle, which includes the vehicle computer described in the technical solution of the fifth aspect.
采用上述技术方案,具有以下有益效果:The above technical solution has the following beneficial effects:
本申请技术方案提供的车机系统进程控制方法、装置、电子设备及车辆,通过检测车机系统的当前状态,如果车机系统为工作状态时,对车机系统的内存占用率进行监控,同时获取处于运行状态的运行中应用进程并利用预设规则得到运行中应用进程的活跃度,判断出内存占用率所在区间等级后,获取与所在区间等级对应的进程处理策略为目标进程处理策略,按照目标进程处理策略即可对不同活跃度的运行中应用进程进行查杀或压缩。本申请的以上方案,能够在确定车机系统内存占用率所在区间等级后,利用对应的目标进程处理策略,结合运行中应用进程的活跃度进行查杀或压缩,实现内存回收,本方案无需限定场景或者特殊条件,只要车机系统处于工作状态即可实现从根本上对车机系统的内存进行回收,提高了内存状态的改善效果。The vehicle system process control method, device, electronic device and vehicle provided by the technical solution of the present application detect the current state of the vehicle system. If the vehicle system is in working state, the memory occupancy rate of the vehicle system is monitored, and the running application process in the running state is obtained at the same time, and the activity of the running application process is obtained by 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, the running application processes of different activity levels can be checked or compressed. The above scheme of the present application can use the corresponding target process processing strategy after determining the interval level of the vehicle system memory occupancy rate, and check or compress the running application process in combination with the activity of the running application process to realize memory recovery. This scheme does not need to limit the scene or special conditions. As long as the vehicle system is in working state, the memory of the vehicle system can be fundamentally recovered, which improves the improvement effect of the memory state.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请一实施例中所述车机系统进程控制方法的流程图;FIG1 is a flow chart of a vehicle system process control method according to an embodiment of the present application;
图2为本申请另一实施例所述车机系统进程控制方法的流程图;FIG2 is a flow chart of a vehicle system process control method according to another embodiment of the present application;
图3为本申请又一实施例所述车机系统进程控制方法的流程图;FIG3 is a flow chart of a vehicle system process control method according to another embodiment of the present application;
图4为本申请一实施例所述车机系统进程控制装置的结构框图;FIG4 is a structural block diagram of a vehicle system process control device according to an embodiment of the present application;
图5为本申请一实施例所述用于执行车机系统进程控制方法的电子设备的硬件连接关系示意图。FIG. 5 is a schematic diagram of the hardware connection relationship of an electronic device for executing a vehicle system process control method according to an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面结合附图来进一步说明本申请的具体实施方式。The specific implementation of the present application is further described below with reference to the accompanying drawings.
容易理解,根据本申请的技术方案,在不变更本申请实质精神下,本领域的一般技术人员可相互替换的多种结构方式以及实现方式。因此,以下具体实施方式以及附图仅是对本申请的技术方案的示例性说明,而不应当视为本申请的全部或视为对申请技术方案的限定或限制。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 person skilled in the art can replace various structural modes and implementation modes 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.
在本说明书中提到或者可能提到的上、下、左、右、前、后、正面、背面、顶部、底部等方位用语是相对于各附图中所示的构造进行定义的,它们是相对的概念,因此有可能会根据其所处不同位置、不同使用状态而进行相应地变化。所以,也不应当将这些或者其他的方位用语解释为限制性用语。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.
本申请实施例公开一种车机系统进程控制方法,应用于车辆的车机中,如图1所示,所述方法包括:The embodiment of the present application discloses a vehicle system process control method, which is applied to a vehicle system. As shown in FIG1 , the method includes:
S10:检测车机系统的当前状态。S10: Detect the current status of the vehicle system.
所述车机系统的运行状态可以包括关闭、开启、休眠、工作等。车机系统开启后即可对运行状态进行实时监控。The operating state of the vehicle system may include closed, opened, dormant, working, etc. After the vehicle system is opened, the operating state can be monitored in real time.
S20:若所述当前状态为工作状态,则获取所述车机系统的内存占用率。S20: If the current state is a working state, the memory occupancy rate of the vehicle system is obtained.
所述内存占用率可以是内存被占用空间占内存总空间的百分比。The memory occupancy rate may be a percentage of the occupied memory space to the total memory space.
S30:获取处于运行状态的运行中应用进程,根据预设规则得到所述运行中应用进程的活跃度。S30: Acquire a running application process in a running state, and obtain the activity of the running application process according to a preset rule.
车机系统处于工作状态时,系统能够自动获取到当前处于运行中的应用进程的列表。When the vehicle system is in working state, the system can automatically obtain a list of currently running application processes.
每一应用进程的活跃度的运算规则可以预先存储在车机系统中,可以利用应用进程在当前状态的持续时长,应用进程的使用频率,应用进程的优先级等进行确定。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.
S40:判断所述内存占用率所在区间等级,并得到判断结果;所述区间等级包括预先设定的多个区间等级,每个所述区间等级分别对应于不同的内存占用率范围。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 corresponds to a different memory occupancy rate range.
多个所述区间等级对应的内存占用率范围不同,所以可以对内存占用率范围进行排序,利用排序结果即可得到区间等级的划分结果。The memory occupancy rate ranges corresponding to the multiple 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.
S50:获取与所述判断结果中所在区间等级对应的进程处理策略为目标进程处理策略,并按照所述目标进程处理策略对不同活跃度的所述运行中应用进程进行查杀或压缩;其中,每个所述区间等级分别对应不同的进程处理策略。其中,不同的区间等级对应的进程处理策略中,对所述运行中应用进程的查杀和/或压缩的标准不同。S50: Obtain the process processing strategy corresponding to the interval level in the judgment result as the target process processing strategy, and 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. wherein the process processing strategies corresponding to different interval levels have different standards for killing and/or compressing the running application processes.
具体地,如果所述内存占用率对应的区间等级是较高级别,例如内存占用率已经较高导致车机系统卡顿,则可能需要查杀的应用进程较多,而如果内存占用率对应的区间等级为较低级别,仅仅是车机系统针对某些服务响应较为缓慢,则可能需要查杀的进程较少,对一些应用进程数据进行压缩即可满足要求。所以,不同区间等级对应的进程处理策略中,对所述运行中应用进程的查杀和/或压缩的标准不同。Specifically, if the interval level corresponding to the memory occupancy rate is a higher level, for example, the memory occupancy rate is already high and causes the vehicle system to freeze, then more application processes may need to be checked and killed. If the interval level corresponding to the memory occupancy rate is a lower level, it is just that the vehicle system responds slowly to certain services, then fewer processes may need to be checked and killed, and compressing some application process data may meet the requirements. Therefore, in the process processing strategies corresponding to different interval levels, the standards for checking and/or compressing the running application processes are different.
本申请中的方案,通过检测车机系统的当前状态,如果车机系统为工作状态时,对车机系统的内存占用率进行监控,同时获取处于运行状态的运行中应用进程并利用预设规则得到运行中应用进程的活跃度,判断出内存占用率所在区间等级后,获取与所在区间等级对应的进程处理策略为目标进程处理策略,按照目标进程处理策略即可对不同活跃度的运行中应用进程进行查杀或压缩。本申请的以上方案,能够在确定车机系统内存占用率所在区间等级后,利用对应的目标进程处理策略,结合运行中应用进程的活跃度进行查杀或压缩,实现内存回收,本方案无需限定场景或者特殊条件,只要车机系统处于工作状态即可实现从根本上对车机系统的内存进行回收,提高了内存状态的改善效果。The solution in the present application detects the current state of the vehicle system. If the vehicle system is in 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 by 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, the running application processes with different activity levels can be checked or compressed. The above solution of the present application can, after determining the interval level of the memory occupancy rate of the vehicle system, use the corresponding target process processing strategy, combined with the activity of the running application process to check or compress, to achieve memory recovery. This solution does not need to limit the scene or special conditions. As long as the vehicle system is in working state, the memory of the vehicle system can be fundamentally recovered, which improves the improvement effect of the memory state.
一些方案中,在步骤S40中,所述区间等级包括按照内存占用率范围从高到低设定的多个区间等级;根据所述内存占用率和每个所述区间等级对应的内存占用率范围,确定所述内存占用率所在区间等级。例如,所述区间等级包括高区间等级、中位区间等级和低区间等级;所述高区间等级对应的所述内存占用率范围为[第一内存占用率,100%);所述中位区间等级对应的所述内存占用率范围为[第二内存占用率,第一内存占用率);所述低区间等级对应的所述内存占用率范围为[第三内存占用率,第二内存占用率);所述第一内存占用率对应于使所述车机系统停止运行的内存占用率;所述第二内存占用率对应于使所述车机系统出现卡顿的内存占用率;所述第三内存占用率对应于使所述车机系响应速度低于预设速度的内存占用率。在判断所述内存占用率在哪一个区间等级时,可以按照从高到低的顺序或者从低到高的顺序依次将内存占用率与每一个区间等级中的内存占用率范围进行比较即可,确定出内存占用率所在范围即可确定其对应的区间等级。In some schemes, in step S40, the interval level includes multiple interval levels set from high to low according to the memory occupancy range; the interval level where the memory occupancy is located is determined according to the memory occupancy and the memory occupancy range corresponding to each of the interval levels. 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; the third memory occupancy corresponds to the memory occupancy that causes the response speed of the vehicle system to be lower than the 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.
一些方案中,如图2所示,所述步骤S50中包括:In some embodiments, as shown in FIG2 , step S50 includes:
S501:若所述判断结果表示所述内存占用率所在区间等级为所述高区间等级,则查杀所述活跃度低于第一活跃度的全部运行中应用进程。S501: 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.
例如,所述内存占用率位于[第一内存占用率,100%)的范围内,则说明当前车机系统已经存在停止运行的风险了,亟需尽快释放出较多的内存以确保车机系统能够恢复运行。所以,本方案中将活跃度第一活跃度的全部运行中应用进程全部查杀,由此可以最大程度的释放出内存。其中,第一活跃度可以为长期不活跃进程或短期不活跃进程。长期不活跃进程即可以表示该进程已经较长时间处于不活跃状态,而且几乎不可能恢复为活跃状态的程度。如前所述,系统根据进程优先级、进程当前状态持续时间、进程内存占用大小和用户需求或用户体验判定其重要程度后即可确定活跃度。短期不活跃进程即该进程已经处于不活跃状态,但是仍然有可能恢复为活跃状态。如前所述,系统根据进程优先级、进程当前状态持续时间、进程内存占用大小和用户需求或用户体验判定其重要程度后即可确定活跃度。For example, if the memory occupancy rate is within the range of [first memory occupancy rate, 100%), it means that the current vehicle system is at risk of stopping operation, and it is urgent to release more memory as soon as possible 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 releasing memory to the maximum extent. Among them, the first activity level can be a long-term inactive process or a short-term inactive process. A long-term inactive process can indicate that the process has been inactive for a long time and it is almost impossible to restore to an active state. As mentioned above, the system can determine the activity level after determining its importance based on the process priority, the duration of the current state of the process, the memory usage of the process, and the user needs or user experience. A short-term inactive process means that the process is already in an inactive state, but it is still possible to restore to an active state. As mentioned above, the system can determine the activity level after determining its importance based on the process priority, the duration of the current state of the process, the memory usage of the process, and the user needs or user experience.
S502:若所述判断结果表示所述内存占用率所在区间等级为所述中位区间等级,则以第一压缩方式压缩活跃度低于第二活跃度的应用进程,所述第二活跃度大于所述第一活跃度。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.
例如,所述内存占用率位于[第二内存占用率,第一内存占用率)的范围内,则说明当前车机系统已经存在卡顿的情形,其对于内存回收的紧迫程度低于高区间等级,此时可以以第一压缩方式压缩活跃度低于第二活跃度的应用进程,且所述第二活跃度大于所述第一活跃度。也即,在高等级区间下,将活跃度低于第一活跃度的应用进程全部查杀,本方案中可以将一些具有较低活跃度的应用进程进行压缩。本过程中压缩的应用进程的活跃度可以高于高区间等级中查杀的应用进程的活跃度,因为压缩过程对于应用进程的影响小于查杀过程。For example, 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 is already stuck, and the 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 rate can be compressed in the first compression method, and the second activity rate is greater than the first activity rate. That is, in the high-level interval, all application processes with an activity rate lower than the first activity rate are killed, and some application processes with lower activity rates can be compressed in this solution. The activity of the compressed application process in this process can be higher than the activity 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.
S503:若所述判断结果表示所述内存占用率所在区间等级为所述低区间等级,则以第二压缩方式压缩活跃度低于第三活跃度的应用进程,所述第三活跃度小于所述第二活跃度,所述第二压缩方式的压缩率小于所述第一压缩方式的压缩率。压缩率较小时,压缩前后的数据大小差距更小。S503: If the judgment result indicates that the interval level of the memory occupancy rate is the low interval level, compress the application process whose activity is lower than the third activity level by 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. When the compression rate is lower, the difference in data size before and after compression is smaller.
例如,所述内存占用率位于[第三内存占用率,第二内存占用率)的范围内,则说明当前车机系统已经存在响应速度减缓的情形,其对于内存回收的紧迫程度低于高区间等级和中位区间等级,此时可以以第二压缩方式压缩活跃度低于第三活跃度的应用进程,且所述第三活跃度小于所述第二活跃度,所述第二压缩方式的压缩率小于所述第一压缩方式的压缩率。也即,本方案中可以将一些具有较低活跃度的应用进程进行压缩,但是压缩率要小于中位区间等级的压缩率,也即压缩过程对于应用进程的影响更小,本过程中压缩的应用进程的活跃度可以低于中位区间等级中压缩的应用进程的活跃度。因为此种情形下,车机系统的运行情况由于中位区间等级,所以压缩时选择的应用进程数量可以少于中位区间等级中压缩的应用进程的数量。For example, 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 a slow response speed, and the urgency of 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 can be compressed by the second compression method, and the third activity is less than the second activity, and the compression rate of the second compression method is less than the compression rate of the first compression method. That is, in this scheme, some application processes with lower activity can be compressed, but the compression rate is less 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 compressed application process in this process can be lower than the activity of the compressed application process 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.
以上方案中,所述第一压缩方式为全压缩方式,所述第二压缩方式为逆向页压缩处理。也即,针对中位区间等级的压缩操作可以直接选择全压缩,以最大程度的释放内存空间。也即,针对低区间等级的压缩操作,采用逆向页压缩的处理方式进行压缩,逆向页压缩的压缩率虽然较小,不过在应用进程再次恢复为活跃状态需要解压缩时更加方便。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 middle interval level, full compression can be directly selected to release memory space to the maximum extent. That is, for compression operations at the low interval level, reverse page compression is used for compression. Although the compression rate of reverse page compression is relatively small, it is more convenient when the application process needs to be decompressed when it is restored to an active state again.
一些方案中,上述步骤S30中包括:In some embodiments, the step S30 includes:
S301:获取用户识别信息,并提取与所述用户识别信息关联的历史数据,所述历史数据包括所述运行中应用进程在设定历史时段的历史开启频率和历史运行时长。S301: Acquire 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.
用户识别信息可以是身份认证信息。The user identification information may be identity authentication information.
每一个用户对于车辆使用过程中的一些功能设置会有自己的偏好,车机系统可以将每一个用户的设置数据与用户的身份认真信息关联存储。如此,当确定了用户的身份后就能够为用户提供满足其偏好的设置数据。Each user has his or her own preferences for some function settings during vehicle use. The vehicle computer system can associate and store each user's setting data with the user's identity information. In this way, when the user's identity is determined, the setting data that meets the user's preferences can be provided to the user.
所述历史开启频率和所述历史运行时长能够直接根据车机系统的历史运行数据确定。具体实现时,可以选择一段时间内的历史运行数据进行查询,例如近一周内的数据。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.
S302:获取所述运行中应用进程本次运行的运行时长、内存占用信息和重要度数据,所述重要度数据表征所述运行中应用进程对应的用户服务的重要程度。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.
当车机系统启动后,车机系统能够实时获取到所述运行中应用进程本次运行的运行时长和所述内存占用信息。所述重要度数据为服务端确定的,在服务端能够对各个应用进程的所对应的服务任务的状态进行监控,还能够对用户针对各个服务任务的个性化需求进行记录,依据用户对各服务任务的个性化需求能够确定每一个服务任务的重要程度,进而可以确定每一个应用进程的重要度。When the vehicle system is started, the vehicle system can obtain the running time and memory usage information of the running application process 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 record the personalized needs of the user for each service task. The importance of each service task can be determined based on the personalized needs of the user for each service task, and then the importance of each application process can be determined.
S303:将所述历史开启频率、所述历史运行时长、本次运行的所述运行时长、所述内存占用信息和所述重要度数据加权运算后得到所述运行中应用进程的活跃度。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 running, the memory occupancy information and the importance data.
通过预先为上述各参数设定权重值,在计算活跃度时,根据权重值乘以每一个参数对应的数值量,之后在利用预先规定好的运算算法进行计算即可得到活跃度。例如,可以直接将权重值和参数相乘并加和后的结果作为所述活跃度。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 result of the sum can be used as the activity.
在一个具体示例中,用户A喜欢在每周一早上七点到八点播放云音乐,则每周一的早上七点到八点,如果识别到用户就为用户A,则播放音乐相关的应用进程就会被认为不应被查杀或全压缩的应用进程,因为清理应用进程会影响打开速度,压缩应用进程会导致系统运行卡顿,从而避免影响用户的实际体验。而如果识别到的用户不是用户A,则按照应用进程的活跃度进行查杀或压缩,如果新用户对于车辆功能进行了重新设置或更改,则直接将用户的设置和更改与新用户识别信息进行关联存储,实现以用户为单位记录应用的使用习惯。In a specific example, user A likes to play cloud music from 7 to 8 a.m. every Monday. If the user is identified as user A, the application process related to playing music will be considered as an application process that should not be checked or fully compressed, because cleaning the application process will affect the opening speed, and compressing the application process will cause the system to run slowly, thus avoiding affecting the user's actual experience. If the identified user is not user A, the application process will be checked or compressed according to its activity. If the new user resets or changes the vehicle function, the user's settings and changes will be directly associated with the new user identification information and stored, so as to record the application usage habits by user.
优选地,上述方案中所述获取用户识别信息,包括:检测用户的至少一个生物特征信息作为所述用户识别信息。所述生物特征信息可以包括人脸识别结果、声音识别结果或者指纹识别结果等。Preferably, the acquiring of user identification information in the above solution includes: detecting at least one biometric information of the user as the user identification information. The biometric information may include a face recognition result, a voice recognition result, or a fingerprint recognition result.
一些方案中,如图3所示,若所述当前状态为休眠状态,所述方法还包括:In some embodiments, as shown in FIG3 , if the current state is a dormant state, the method further includes:
S60:检测所述车机系统预留的用于存储压缩进程数据的预设区域的剩余空间大小。S60: Detecting the remaining space size of a preset area reserved by the vehicle system for storing compressed process data.
预设区域为车机系统预留的用于存储压缩进程数据的存储区域,在一般的操作系统中均预留有该区域。预设区域的剩余空间大小是车机系统能够直接获取的,通常可以采用大小表示或通过百分比的方式来表示。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 size of the preset area can be directly obtained by the vehicle system, and can usually be expressed in size or percentage.
S70:获取所述预设区域中每一所述压缩进程数据对应的应用程序的压缩进程活跃度。S70: Obtain the compression process activity of the application corresponding to each compression process data in the preset area.
压缩进程数据是对应用进程进行压缩后得到的,而运行进程的活跃度是车机系统能够实时获取的。同时,车机系统执行的应用进程的压缩操作,也能够确定压缩进程数据与应用进程之间的对应关系。所以,车机系统能够实时获取到压缩进程数据对应的应用进程的压缩进程活跃度。The compressed process data is obtained by compressing the application process, and the activity of the running process is 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 compressed process activity of the application process corresponding to the compressed process data in real time.
S80:将所述剩余空间大小和设定值进行比较,得到比较结果。S80: Compare the remaining space size with a set value to obtain a comparison result.
设定值可以根据一般压缩进程数据的大小进行确定,通常可以为一般压缩进程数据的大小的几倍。The set value may be determined according to the size of general compressed process data, and may usually be several times the size of general compressed process data.
S90:若所述比较结果为所述剩余空间大小低于所述设定值,则按照压缩进程活跃度的排列顺序依次查杀所述压缩进程数据对应的应用进程,直到所述剩余空间大小高于或等于所述设定值。S90: If the comparison result is that the remaining space size is lower than the set value, then the application processes corresponding to the compression process data are sequentially checked and killed in the order of the compression process activity until the remaining space size is higher than or equal to the set value.
预设区域的剩余空间大小过小时,可能影响对压缩进程数据的存储,即便是车机系统出现了缓慢或者卡顿的情形,也无法通过压缩活跃度低的应用进程来释放内存空间了。本步骤中,能够在剩余空间大小小于设定值时,按照活跃度排列顺序查杀所述压缩进程数据对应的应用进程,从而对预设区域的存储空间进行回收。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 is impossible to release 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 can be checked and killed in the order of activity, thereby reclaiming the storage space of the preset area.
以上方案中,能够确保预留的预设区域的剩余空间始终保持充足的状态,保证车机系统随时可以通过内存压缩的方式对内存空间进行回收,可有效提升车机系统的运行速度,避免出现卡顿的情形。而且,在车机系统进入休眠状态时,对预设区域的剩余空间的大小进行检测以及清理释放,能够有效降低车机系统内存压力的同时,降低内存压缩和应用进程清理对车机系统性能带来的影响。In the above scheme, it can ensure that the remaining space in the reserved preset area is always sufficient, and the vehicle system can recycle the memory space at any time through memory compression, which can effectively improve the operation speed of the vehicle system and avoid freezing. Moreover, when the vehicle system enters the dormant state, the size of the remaining space in the preset area is detected and cleared and released, 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.
作为一种优选的方案,压缩进程活跃度的排列顺序可以通过如下方式得到:将所述压缩进程数据对应的应用程序的压缩进程活跃度由低到高进行排序得到所述排列顺序。如此,可以在执行应用进程查杀时,先查杀活跃度低的应用进程,活跃度越低的应用进程,说明其被使用频率越低,甚至是已经较长时间未被使用,查杀该应用进程对于车机系统的正常运行不会产生不利影响,而查杀该应用进程后其对应的压缩进程数据也自然地被清理了,从而释放了预设区域的一部分空间。通过依次的释放一个或多个压缩进程数据的占用空间,就能够使预设区域的剩余空间满足需要。As a preferred solution, 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 is naturally cleared, thereby releasing part of the space in the preset area. By releasing the space occupied by one or more compressed process data in sequence, the remaining space in the preset area can meet the needs.
在一些方案中,步骤S70可以包括:获取每一所述压缩进程数据对应的应用进程的优先级、当前状态持续时间、内存占用量和重要度,所述重要度用于表征应用进程对应的用户服务的重要程度。将所述优先级、所述当前状态持续时间、所述内存占用量和所述重要度加权运算后得到每一所述压缩进程数据对应的应用进程的压缩进程活跃度。其中,所述优先级可以是人为设定的。当前状态持续时间、内存占用量可以由车机系统直接获得,因为车机系统在运行时,能够对每一个运行中的应用进程的状态进行监控,能够随时获取到各个应用进程的当前状态持续时间和内存占用量。所述重要度为服务端确定的,在服务端能够对各个应用进程的所对应的服务任务的状态进行监控,还能够对用户针对各个服务任务的个性化需求进行记录,依据用户对各服务任务的个性化需求能够确定每一个服务任务的重要程度,进而可以确定每一个应用进程的重要度。通过预先为上述各参数设定权重值,在计算活跃度时,根据权重值乘以每一个参数对应的数值量,之后在利用预先规定好的运算算法进行计算即可得到活跃度。例如,可以直接将权重值和参数相乘并加和后的结果作为所述活跃度。In some schemes, step S70 may include: obtaining the priority, current state duration, memory usage and importance of the application process corresponding to each of the compressed process data, wherein the importance is used to characterize the importance of the user service corresponding to the application process. The priority, the current state duration, the memory usage and the importance are weighted to obtain the compressed process activity of the application process corresponding to each of the compressed process data. Among them, the priority may be set manually. 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 state 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 state of the service task corresponding to each application process, and can also record the personalized needs of the user for each service task. According to the personalized needs of the user 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 calculated using a pre-defined calculation algorithm. For example, the weight value and the parameter can be directly multiplied and the result of the sum can be used as the activity.
一些方案中,在所述步骤S70中的所述压缩进程数据对应的应用进程的优先级确定方法可以包括:获取所述压缩进程数据对应的应用进程的历史运行频次和历史运行时长。将所述历史运行频次与所述历史运行时长的乘积进行累积后得到所述优先级。所述历史运行频次和所述历史运行时长能够直接根据车机系统的历史运行数据确定。具体实现时,可以选择一段时间内的历史运行数据进行查询,例如近一周内的数据。历史运行频次越大或者历史运行时长越长,能够反映出用户使用该应用进程的可能性,而用户使用应用进程的可能性越高,则优先级应当越高。本方案中,历史运行频次与所述历史运行时长的乘积后可以直接相加,以相加求和结果作为所述优先级。或者,通过将各个应用进程的相加求和结果排序后,将排序的序号作为所述优先级。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 operation frequency and the historical operation 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. The historical operation frequency and the historical operation time 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. The greater the historical operation frequency or the longer the historical operation 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 operation frequency and the historical operation 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 sequence number is used as the priority.
一些方案中,在步骤S80之后,若所述比较结果为所述剩余空间大小大于或等于所述设定值,则所述方法中还包括S91:获取未压缩且处于运行状态的应用进程的运行进程活跃度。压缩所述运行进程活跃度低于第一设定活跃度的应用进程得到压缩后进程数据。将所述压缩后进程数据存储至所述预设区域。即通过对预设区域中的部分压缩进程数据进行清理,使得预设区域的剩余空间已经满足了继续存入压缩进程数据的条件时,对于当前处于未压缩状态的运行中的应用进程的活跃度进行筛选,目的是可以继续选择一些应用进程进行压缩,从而实现对车机系统的内存空间进行回收。其中,第一设定活跃度可以为长期不活跃进程或短期不活跃进程。通过继续将一部分应用进程进行压缩并存储到预设区域后,能够对车机系统的整体内存空间进一步释放和回收。当车机系统退出休眠状态进入正常运行状态时,可以具有更高的运行速度。In some schemes, after step S80, if the comparison result is that the remaining space size is greater than or equal to the set value, the method further includes S91: obtaining the running process activity of the uncompressed and running application process. 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 preset area. That is, by cleaning up part of the compressed process data in the preset area, when the remaining space in the preset area has met the condition 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. By continuing to compress and store a part 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 have a higher running speed.
进一步优选地,以上方案中的S91可以包括:将所述运行进程活跃度低于所述第一设定活跃度且高于第二设定活跃度的应用进程进行逆向页压缩处理得到所述压缩后进程数据。将所述运行进程活跃度低于所述第二设定活跃度的应用进程进行全压缩处理得到压缩后进程数据,其中,所述第二设定活跃度小于所述第一设定活跃度。也即,针对几乎不会恢复为活跃状态的应用进程可以直接全压缩,以最大程度的释放预设区域的空间。针对有可能再次恢复为活跃状态的应用进程,采用逆向页压缩的处理方式进行压缩,逆向页压缩的压缩比会高于全压缩技术的压缩比,所以在应用进程再次恢复为活跃状态需要解压缩时更加方便。具体实现时,可以将上述长期不活跃进程和短期不活跃进程分别写入两个列表中。如果需要对某一种应用进程进行压缩时,可以通过查表的方式高效地确定到应用进程是属于哪一种类型的,从而能够快速确定压缩策略。Further preferably, S91 in the above scheme may include: performing 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. Performing full compression processing on the application process whose running process activity is lower than the second set activity 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 will hardly be restored to the active state, full compression can be directly performed to release the space of the preset 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 adopted for compression, and 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.
本申请实施例还提供一种车机系统进程控制装置,如图4所示,包括:The embodiment of the present application further provides a vehicle system process control device, as shown in FIG4 , comprising:
状态检测模块10,被配置为检测车机系统的当前状态;所述车机系统的运行状态可以包括关闭、开启、休眠、工作等。车机系统开启后即可对运行状态进行实时监控。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.
内存占用率获取模块20,被配置为若所述当前状态为工作状态,则获取所述车机系统的内存占用率;所述内存占用率可以是内存被占用空间占内存总空间的百分比。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.
进程活跃度获取模块30,被配置为获取处于运行状态的运行中应用进程,根据预设规则得到所述运行中应用进程的活跃度;车机系统处于工作状态时,系统能够自动获取到当前处于运行中的应用进程的列表。每一应用进程的活跃度的运算规则可以预先存储在车机系统中,可以利用应用进程在当前状态的持续时长,应用进程的使用频率,应用进程的优先级等进行确定。The process activity acquisition module 30 is configured to acquire the running application process in the running state, and obtain the activity of the running application process according to the preset rules; when the vehicle system is in the working state, the system can automatically obtain the list of the currently running application processes. The calculation rules of the activity of each application process can be pre-stored in the vehicle system, and can be determined by 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.
区间等级获取模块40,被配置为判断所述内存占用率所在区间等级,并得到判断结果;所述区间等级包括预先设定的多个区间等级,每个所述区间等级分别对应于不同的内存占用率范围;多个所述区间等级对应的内存占用率范围不同,所以可以对内存占用率范围进行排序,利用排序结果即可得到区间等级的划分结果。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.
进程控制模块50,被配置为获取与所述判断结果中所在区间等级对应的进程处理策略为目标进程处理策略,并按照所述目标进程处理策略对不同活跃度的所述运行中应用进程进行查杀或压缩;其中,每个所述区间等级分别对应不同的进程处理策略。其中,不同的区间等级对应的进程处理策略中,对所述运行中应用进程的查杀和/或压缩的标准不同。The process control module 50 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 and 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. wherein the process processing strategies corresponding to different interval levels have different standards for detecting and killing and/or compressing the running application processes.
具体地,如果所述内存占用率对应的区间等级是较高级别,例如内存占用率已经较高导致车机系统卡顿,则可能需要查杀的应用进程较多,而如果内存占用率对应的区间等级为较低级别,仅仅是车机系统针对某些服务响应较为缓慢,则可能需要查杀的进程较少,对一些应用进程数据进行压缩即可满足要求。所以,不同区间等级对应的进程处理策略中,对所述运行中应用进程的查杀和/或压缩的标准不同。Specifically, if the interval level corresponding to the memory occupancy rate is a higher level, for example, the memory occupancy rate is already high and causes the vehicle system to freeze, then more application processes may need to be checked and killed. If the interval level corresponding to the memory occupancy rate is a lower level, it is just that the vehicle system responds slowly to certain services, then fewer processes may need to be checked and killed, and compressing some application process data may meet the requirements. Therefore, in the process processing strategies corresponding to different interval levels, the standards for checking and/or compressing the running application processes are different.
本申请中的方案,通过检测车机系统的当前状态,如果车机系统为工作状态时,对车机系统的内存占用率进行监控,同时获取处于运行状态的运行中应用进程并利用预设规则得到运行中应用进程的活跃度,判断出内存占用率所在区间等级后,获取与所在区间等级对应的进程处理策略为目标进程处理策略,按照目标进程处理策略即可对不同活跃度的运行中应用进程进行查杀或压缩。本申请的以上方案,能够在确定车机系统内存占用率所在区间等级后,利用对应的目标进程处理策略,结合运行中应用进程的活跃度进行查杀或压缩,实现内存回收,本方案无需限定场景或者特殊条件,只要车机系统处于工作状态即可实现从根本上对车机系统的内存进行回收,提高了内存状态的改善效果The solution in the present application detects the current state of the vehicle system. If the vehicle system is in 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 by 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, the running application processes of different activity levels can be checked or compressed. The above solution of the present application can, after determining the interval level of the memory occupancy rate of the vehicle system, use the corresponding target process processing strategy to check or compress the running application process in combination with the activity level to achieve memory recovery. This solution does not need to limit the scene or special conditions. As long as the vehicle system is in working state, the memory of the vehicle system can be fundamentally recovered, which improves the improvement effect of the memory state.
一些方案中,区间等级获取模块40,被配置为:所述区间等级包括按照内存占用率范围从高到低设定的多个区间等级;根据所述内存占用率和每个所述区间等级对应的内存占用率范围,确定所述内存占用率所在区间等级。在判断所述内存占用率在哪一个区间等级时,可以按照从高到低的顺序或者从低到高的顺序依次将内存占用率与每一个区间等级中的内存占用率范围进行比较即可,确定出内存占用率所在范围即可确定其对应的区间等级。In some schemes, the interval level acquisition module 40 is configured as follows: the interval level includes multiple interval levels set from high to low according to the memory occupancy range; according to the memory occupancy and the memory occupancy range corresponding to each interval level, the interval level in which the memory occupancy is located is determined. When determining which interval level the memory occupancy is in, the memory occupancy can be compared with the memory occupancy range in each interval level in order from high to low or from low to high, and the corresponding interval level can be determined by determining the range in which the memory occupancy is located.
一些方案中,所述进程控制模块50,被配置为若所述判断结果表示所述内存占用率所在区间等级为所述高区间等级,则查杀所述活跃度低于第一活跃度的全部运行中应用进程;若所述判断结果表示所述内存占用率所在区间等级为所述中位区间等级,则以第一压缩方式压缩活跃度低于第二活跃度的应用进程,所述第二活跃度大于所述第一活跃度。若所述判断结果表示所述内存占用率所在区间等级为所述低区间等级,则以第二压缩方式压缩活跃度低于第三活跃度的应用进程,所述第三活跃度小于所述第二活跃度,所述第二压缩方式的压缩率小于所述第一压缩方式的压缩率。压缩率较小时,压缩前后的数据大小差距更小。例如,所述内存占用率位于[第一内存占用率,100%)的范围内,则说明当前车机系统已经存在停止运行的风险了,亟需尽快释放出较多的内存以确保车机系统能够恢复运行。所以,本方案中将活跃度第一活跃度的全部运行中应用进程全部查杀,由此可以最大程度的释放出内存。所述内存占用率位于[第二内存占用率,第一内存占用率)的范围内,则说明当前车机系统已经存在卡顿的情形,其对于内存回收的紧迫程度低于高区间等级,此时可以以第一压缩方式压缩活跃度低于第二活跃度的应用进程,且所述第二活跃度大于所述第一活跃度。也即,在高等级区间下,将活跃度低于第一活跃度的应用进程全部查杀,本方案中可以将一些具有较低活跃度的应用进程进行压缩。本过程中压缩的应用进程的活跃度可以高于高区间等级中查杀的应用进程的活跃度,因为压缩过程对于应用进程的影响小于查杀过程。所述内存占用率位于[第三内存占用率,第二内存占用率)的范围内,则说明当前车机系统已经存在响应速度减缓的情形,其对于内存回收的紧迫程度低于高区间等级和中位区间等级,此时可以以第二压缩方式压缩活跃度低于第三活跃度的应用进程,且所述第三活跃度小于所述第二活跃度,所述第二压缩方式的压缩率小于所述第一压缩方式的压缩率。也即,本方案中可以将一些具有较低活跃度的应用进程进行压缩,但是压缩率要小于中位区间等级的压缩率,也即压缩过程对于应用进程的影响更小,本过程中压缩的应用进程的活跃度可以低于中位区间等级中压缩的应用进程的活跃度。因为此种情形下,车机系统的运行情况由于中位区间等级,所以压缩时选择的应用进程数量可以少于中位区间等级中压缩的应用进程的数量。In some schemes, the process control module 50 is configured to, if the judgment result indicates that the interval level of the memory occupancy rate is the high interval level, then kill all running application processes whose activity is lower than the first activity; if the judgment result indicates that the interval level of the memory occupancy rate is the median interval level, compress the application processes whose activity is lower than the second activity by the first compression method, and the second activity is greater than the first activity. If the judgment result indicates that the interval level of the memory occupancy rate is the low interval level, compress the application processes whose activity is lower than the third activity by the second compression method, and the third activity is less than the second activity, and the compression rate of the second compression method is less than the compression rate of the first compression method. When the compression rate is small, the difference in data size before and after compression is smaller. For example, if the memory occupancy rate is within the range of [first memory occupancy rate, 100%), it means that the current vehicle system is at risk of stopping operation, and it is urgent to release more memory as soon as possible to ensure that the vehicle system can resume operation. Therefore, in this scheme, all running application processes with the first activity are killed, thereby releasing memory to the greatest extent. 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 can be compressed in the first compression method, and the second activity is greater than the first activity. That is, in the high-level interval, all application processes with an activity lower than the first activity are checked and killed. In this solution, some application processes with lower activity can be compressed. The activity of the compressed application process in this process can be higher than the activity of the application process checked and killed in the high interval level, because the impact of the compression process on the application process is less 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 middle interval level. At this time, the application process with an activity lower than the third activity can be compressed in the second compression method, and the third activity is less than the second activity, and the compression rate of the second compression method is less than the compression rate of the first compression method. That is, in this solution, some application processes with lower activity 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 during compression can be less than the number of application processes compressed in the median interval level.
以上方案中,所述第一压缩方式为全压缩方式,所述第二压缩方式为逆向页压缩处理。也即,针对中位区间等级的压缩操作可以直接选择全压缩,以最大程度的释放内存空间。也即,针对低区间等级的压缩操作,采用逆向页压缩的处理方式进行压缩,逆向页压缩的压缩率虽然较小,不过在应用进程再次恢复为活跃状态需要解压缩时更加方便。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 middle interval level, full compression can be directly selected to release memory space to the maximum extent. That is, for compression operations at the low interval level, reverse page compression is used for compression. Although the compression rate of reverse page compression is relatively small, it is more convenient when the application process needs to be decompressed when it is restored to an active state again.
一些方案中,上述进程活跃度获取模块30,被配置为获取用户识别信息,并提取与所述用户识别信息关联的历史数据,所述历史数据包括所述运行中应用进程在设定历史时段的历史开启频率和历史运行时长。获取所述运行中应用进程本次运行的运行时长、内存占用信息和重要度数据,所述重要度数据表征所述运行中应用进程对应的用户服务的重要程度。将所述历史开启频率、所述历史运行时长、本次运行的所述运行时长、所述内存占用信息和所述重要度数据加权运算后得到所述运行中应用进程的活跃度。用户识别信息可以是身份认证信息。每一个用户对于车辆使用过程中的一些功能设置会有自己的偏好,车机系统可以将每一个用户的设置数据与用户的身份认真信息关联存储。如此,当确定了用户的身份后就能够为用户提供满足其偏好的设置数据。所述历史开启频率和所述历史运行时长能够直接根据车机系统的历史运行数据确定。具体实现时,可以选择一段时间内的历史运行数据进行查询,例如近一周内的数据。当车机系统启动后,车机系统能够实时获取到所述运行中应用进程本次运行的运行时长和所述内存占用信息。所述重要度数据为服务端确定的,在服务端能够对各个应用进程的所对应的服务任务的状态进行监控,还能够对用户针对各个服务任务的个性化需求进行记录,依据用户对各服务任务的个性化需求能够确定每一个服务任务的重要程度,进而可以确定每一个应用进程的重要度。通过预先为上述各参数设定权重值,在计算活跃度时,根据权重值乘以每一个参数对应的数值量,之后在利用预先规定好的运算算法进行计算即可得到活跃度。例如,可以直接将权重值和参数相乘并加和后的结果作为所述活跃度。In some schemes, the process activity acquisition module 30 is configured to acquire user identification information and extract historical data associated with the user identification information, wherein the historical data includes the historical start frequency and historical running time of the running application process in a set historical period. The running time, memory occupancy information and importance data of the running application process in this operation are acquired, and 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 operation of the historical start frequency, the historical running time, the running time of this operation, the memory occupancy information and the importance data. The user identification information may be identity authentication information. Each user may have his or her own preferences for some function settings during the use of the vehicle, and the vehicle system may associate and store the setting data of each user with the user's identity information. In this way, after the identity of the user is determined, the setting data that meets the user's preferences can be provided to the user. The historical start frequency and the historical running time 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. When the vehicle system is started, the vehicle system can obtain the running time and memory usage information of the running application process 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. 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. 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 added as the result as the activity.
优选地,上述方案中所述获取用户识别信息,包括:检测用户的至少一个生物特征信息作为所述用户识别信息。所述生物特征信息可以包括人脸识别结果、声音识别结果或者指纹识别结果等。Preferably, the acquiring of user identification information in the above solution includes: detecting at least one biometric information of the user as the user identification information. The biometric information may include a face recognition result, a voice recognition result, or a fingerprint recognition result.
一些方案中,所述装置还包括:In some embodiments, the device further comprises:
预设空间回收模块,被配置为检测所述车机系统预留的用于存储压缩进程数据的预设区域的剩余空间大小。获取所述预设区域中每一所述压缩进程数据对应的应用程序的压缩进程活跃度。将所述剩余空间大小和设定值进行比较,得到比较结果。若所述比较结果为所述剩余空间大小低于所述设定值,则按照压缩进程活跃度的排列顺序依次查杀所述压缩进程数据对应的应用进程,直到所述剩余空间大小高于或等于所述设定值。预设区域为车机系统预留的用于存储压缩进程数据的存储区域,在一般的操作系统中均预留有该区域。预设区域的剩余空间大小是车机系统能够直接获取的,通常可以采用大小表示或通过百分比的方式来表示。压缩进程数据是对应用进程进行压缩后得到的,而运行进程的活跃度是车机系统能够实时获取的。同时,车机系统执行的应用进程的压缩操作,也能够确定压缩进程数据与应用进程之间的对应关系。所以,车机系统能够实时获取到压缩进程数据对应的应用进程的压缩进程活跃度。设定值可以根据一般压缩进程数据的大小进行确定,通常可以为一般压缩进程数据的大小的几倍。预设区域的剩余空间大小过小时,可能影响对压缩进程数据的存储,即便是车机系统出现了缓慢或者卡顿的情形,也无法通过压缩活跃度低的应用进程来释放内存空间了。本步骤中,能够在剩余空间大小小于设定值时,按照活跃度排列顺序查杀所述压缩进程数据对应的应用进程,从而对预设区域的存储空间进行回收。The preset space recovery module is configured to detect the remaining space size of the preset area reserved by the vehicle system for storing compressed process data. Obtain the compression process activity of the application corresponding to each compressed process data in the preset area. Compare the remaining space size with the 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 compressed process data are checked and killed in sequence according to the arrangement order of the compression process activity until the remaining space size is higher than or equal to the set value. The preset 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 size of the preset area can be directly obtained by the vehicle system, and can usually be expressed in size or by percentage. The compressed process data is obtained after 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 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 general compressed process data, and can usually be several times the size of the general 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 slow or stuck, it is impossible to release memory space by compressing the application processes with low activity. In this step, when the remaining space is less than the set value, the application processes corresponding to the compressed process data can be checked and killed in the order of activity, thereby reclaiming the storage space of the preset area.
以上方案中,能够确保预留的预设区域的剩余空间始终保持充足的状态,保证车机系统随时可以通过内存压缩的方式对内存空间进行回收,可有效提升车机系统的运行速度,避免出现卡顿的情形。而且,在车机系统进入休眠状态时,对预设区域的剩余空间的大小进行检测以及清理释放,能够有效降低车机系统内存压力的同时,降低内存压缩和应用进程清理对车机系统性能带来的影响。In the above scheme, it can ensure that the remaining space in the reserved preset area is always sufficient, and the vehicle system can recycle the memory space at any time through memory compression, which can effectively improve the operation speed of the vehicle system and avoid freezing. Moreover, when the vehicle system enters the dormant state, the size of the remaining space in the preset area is detected and cleared and released, 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.
作为一种优选的方案,上述预设空间回收模块中,压缩进程活跃度的排列顺序可以通过如下方式得到:将所述压缩进程数据对应的应用程序的压缩进程活跃度由低到高进行排序得到所述排列顺序。如此,可以在执行应用进程查杀时,先查杀活跃度低的应用进程,活跃度越低的应用进程,说明其被使用频率越低,甚至是已经较长时间未被使用,查杀该应用进程对于车机系统的正常运行不会产生不利影响,而查杀该应用进程后其对应的压缩进程数据也自然地被清理了,从而释放了预设区域的一部分空间。通过依次的释放一个或多个压缩进程数据的占用空间,就能够使预设区域的剩余空间满足需要。As a preferred solution, in the above-mentioned preset space recovery module, the arrangement order of the compression process activity can be obtained in the following way: the compression process activity of the application corresponding to the compression process data is sorted from low to high to obtain the arrangement 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 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 compression process data is naturally cleaned up, thereby releasing part of the space in the preset area. By releasing the space occupied by one or more compression process data in sequence, the remaining space in the preset area can meet the needs.
在一些方案中,预设空间回收模块还用于:获取每一所述压缩进程数据对应的应用进程的优先级、当前状态持续时间、内存占用量和重要度,所述重要度用于表征应用进程对应的用户服务的重要程度。将所述优先级、所述当前状态持续时间、所述内存占用量和所述重要度加权运算后得到每一所述压缩进程数据对应的应用进程的压缩进程活跃度。其中,所述优先级可以是人为设定的。当前状态持续时间、内存占用量可以由车机系统直接获得,因为车机系统在运行时,能够对每一个运行中的应用进程的状态进行监控,能够随时获取到各个应用进程的当前状态持续时间和内存占用量。所述重要度为服务端确定的,在服务端能够对各个应用进程的所对应的服务任务的状态进行监控,还能够对用户针对各个服务任务的个性化需求进行记录,依据用户对各服务任务的个性化需求能够确定每一个服务任务的重要程度,进而可以确定每一个应用进程的重要度。通过预先为上述各参数设定权重值,在计算活跃度时,根据权重值乘以每一个参数对应的数值量,之后在利用预先规定好的运算算法进行计算即可得到活跃度。例如,可以直接将权重值和参数相乘并加和后的结果作为所述活跃度。In some schemes, the preset space recovery module is also used to: obtain the priority, current state duration, memory usage and importance of the application process corresponding to each of the compressed process data, and the importance is used to characterize the importance of the user service corresponding to the application process. The priority, the current state duration, the memory usage and the importance are weighted to obtain the compression process activity of the application process corresponding to each of the compressed process data. Among them, the priority can be set manually. 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 state 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 state of the service task corresponding to each application process, and can also record the personalized needs of the user for each service task. According to the personalized needs of the user 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 calculated using a pre-defined calculation algorithm. For example, the weight value and the parameter can be directly multiplied and the result of the sum can be used as the activity.
一些方案中,预设空间回收模块还用于:获取所述压缩进程数据对应的应用进程的历史运行频次和历史运行时长。将所述历史运行频次与所述历史运行时长的乘积进行累积后得到所述优先级。所述历史运行频次和所述历史运行时长能够直接根据车机系统的历史运行数据确定。历史运行频次越大或者历史运行时长越长,能够反映出用户使用该应用进程的可能性,而用户使用应用进程的可能性越高,则优先级应当越高。本方案中,历史运行频次与所述历史运行时长的乘积后可以直接相加,以相加求和结果作为所述优先级。或者,通过将各个应用进程的相加求和结果排序后,将排序的序号作为所述优先级。In some schemes, 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 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.
一些方案中,预设空间回收模块还用于:若所述比较结果为所述剩余空间大小大于或等于所述设定值,则获取未压缩且处于运行状态的应用进程的运行进程活跃度。压缩所述运行进程活跃度低于第一设定活跃度的应用进程得到压缩后进程数据。将所述压缩后进程数据存储至所述预设区域。即通过对预设区域中的部分压缩进程数据进行清理,使得预设区域的剩余空间已经满足了继续存入压缩进程数据的条件时,对于当前处于未压缩状态的运行中的应用进程的活跃度进行筛选,目的是可以继续选择一些应用进程进行压缩,从而实现对车机系统的内存空间进行回收。其中,第一设定活跃度可以为长期不活跃进程或短期不活跃进程。通过继续将一部分应用进程进行压缩并存储到预设区域后,能够对车机系统的整体内存空间进一步释放和回收。当车机系统退出休眠状态进入正常运行状态时,可以具有更高的运行速度。In some schemes, the preset space recovery module is also used for: if the comparison result is that the remaining space size is greater than or equal to the set value, then the running process activity of the uncompressed and running application process is obtained. The application process whose running process activity is lower than the first set activity is compressed to obtain compressed process data. The compressed process data is stored in the preset area. That is, by cleaning up part of the compressed process data in the preset area, when the remaining space in the preset 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. After continuing to compress and store a part 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 have a higher running speed.
进一步优选地,预设空间回收模块还用于:将所述运行进程活跃度低于所述第一设定活跃度且高于第二设定活跃度的应用进程进行逆向页压缩处理得到所述压缩后进程数据。将所述运行进程活跃度低于所述第二设定活跃度的应用进程进行全压缩处理得到压缩后进程数据,其中,所述第二设定活跃度小于所述第一设定活跃度。也即,针对几乎不会恢复为活跃状态的应用进程可以直接全压缩,以最大程度的释放预设区域的空间。针对有可能再次恢复为活跃状态的应用进程,采用逆向页压缩的处理方式进行压缩,逆向页压缩的压缩比会高于全压缩技术的压缩比,所以在应用进程再次恢复为活跃状态需要解压缩时更加方便。具体实现时,可以将上述长期不活跃进程和短期不活跃进程分别写入两个列表中。如果需要对某一种应用进程进行压缩时,可以通过查表的方式高效地确定到应用进程是属于哪一种类型的,从而能够快速确定压缩策略。Further preferably, the preset space recovery module is also 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. Perform full compression processing on the application process whose running process activity is lower than the second set activity 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, full compression can be directly performed to release the space of the preset area to the maximum extent. For the application process that is likely to be restored to the active state again, the reverse page compression processing method is adopted for compression, and 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, the type of the application process can be efficiently determined by looking up the table, so that the compression strategy can be quickly determined.
本申请一些实施例中提供一种存储介质,所述存储介质中存储有程序指令,计算机调用所述程序指令后执行以上实施例任一项所述的车机系统进程控制方法。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 process control method described in any one of the above embodiments is executed.
本申请实施例还提供一种电子设备,如图5所示,所述电子设备包括至少一个处理器51和至少一个存储器52,至少一个所述存储器52中存储有程序信息,至少一个所述处理器51读取所述程序信息后执行以上方法实施例任一项方案所述的车机系统进程控制方法。所述设备还可以包括:输入装置53和输出装置54。处理器51、存储器52、输入装置53和输出装置54可以通信连接。存储器52作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块。处理器51通过运行存储在存储器52中的非易失性软件程序、指令以及模块,从而执行各种功能应用以及数据处理,即实现上述任一方案提供的车机系统进程控制方法。存储器52可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据车机系统进程控制方法的使用所创建的数据等。此外,存储器52可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器52可选包括相对于处理器51远程设置的存储器,这些远程存储器可以通过网络连接至执行车机系统进程控制方法的装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。输入装置53可接收输入的用户点击,以及产生与车机系统进程控制方法的用户设置以及功能控制有关的信号输入。输出装置54可包括显示屏等显示设备。在所述一个或者多个模块存储在所述存储器52中,当被所述一个或者多个处理器51运行时,执行上述任意方法实施例中的车机系统进程控制方法。The embodiment of the present application 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 of the memories 52 stores program information, and at least one of the processors 51 reads the program information and executes the vehicle system process control method described in any one 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 may be communicatively connected. The memory 52, as a non-volatile computer-readable storage medium, may 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 process control method provided in any one 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 process control 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 process control 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 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, when they are run by the one or more processors 51, the vehicle system process control method in any of the above-mentioned method embodiments is executed.
本申请实施例还提供一种车机,所述车机配置有上述方案所述的车机系统进程控制装置或存储介质或电子设备。An embodiment of the present application also 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.
本申请实施例还提供一种车辆,所述车辆包括上述方案所述的车机。An embodiment of the present application also provides a vehicle, which includes the vehicle computer described in the above solution.
根据需要,可以将上述各技术方案进行结合,以达到最佳技术效果。As needed, the above technical solutions can be combined to achieve the best technical effect.
以上的仅是本申请的原理和较佳的实施例。应当指出,对于本领域的普通技术人员来说,在本申请原理的基础上,还可以做出若干其它变型,也应视为本申请的保护范围。The above are only the principles and preferred embodiments of the present application. It should be noted that, for those skilled in the art, 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 (14)
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310331782.6A CN118733477A (en) | 2023-03-30 | 2023-03-30 | A vehicle system process control method, device, electronic equipment and vehicle |
PCT/CN2024/083852 WO2024199231A1 (en) | 2023-03-30 | 2024-03-26 | Head unit system process control method and apparatus, and electronic device and vehicle |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310331782.6A CN118733477A (en) | 2023-03-30 | 2023-03-30 | A vehicle system process control method, device, electronic equipment and vehicle |
Publications (1)
Publication Number | Publication Date |
---|---|
CN118733477A true CN118733477A (en) | 2024-10-01 |
Family
ID=92846167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310331782.6A Pending CN118733477A (en) | 2023-03-30 | 2023-03-30 | A vehicle system process control method, device, electronic equipment and vehicle |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN118733477A (en) |
WO (1) | WO2024199231A1 (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120136850A1 (en) * | 2010-11-30 | 2012-05-31 | International Business Machines Corporation | Memory usage query governor |
CN107220076A (en) * | 2016-09-27 | 2017-09-29 | 华为技术有限公司 | A memory recovery method and device |
CN108932163A (en) * | 2018-06-15 | 2018-12-04 | 奇酷互联网络科技(深圳)有限公司 | EMS memory management process, device, readable storage medium storing program for executing and terminal |
CN110457235A (en) * | 2019-08-20 | 2019-11-15 | Oppo广东移动通信有限公司 | memory compression method, device, terminal and storage medium |
CN111045809A (en) * | 2019-12-17 | 2020-04-21 | Oppo广东移动通信有限公司 | Application control method and device, electronic equipment and computer readable medium |
CN111367828A (en) * | 2020-02-27 | 2020-07-03 | Oppo广东移动通信有限公司 | Memory compression method, device, terminal and storage medium |
US20220188145A1 (en) * | 2020-12-11 | 2022-06-16 | Samsung Electronics Co., Ltd. | Method and system for managing memory for applications in a computing system |
-
2023
- 2023-03-30 CN CN202310331782.6A patent/CN118733477A/en active Pending
-
2024
- 2024-03-26 WO PCT/CN2024/083852 patent/WO2024199231A1/en unknown
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120136850A1 (en) * | 2010-11-30 | 2012-05-31 | International Business Machines Corporation | Memory usage query governor |
CN107220076A (en) * | 2016-09-27 | 2017-09-29 | 华为技术有限公司 | A memory recovery method and device |
CN108932163A (en) * | 2018-06-15 | 2018-12-04 | 奇酷互联网络科技(深圳)有限公司 | EMS memory management process, device, readable storage medium storing program for executing and terminal |
CN110457235A (en) * | 2019-08-20 | 2019-11-15 | Oppo广东移动通信有限公司 | memory compression method, device, terminal and storage medium |
CN111045809A (en) * | 2019-12-17 | 2020-04-21 | Oppo广东移动通信有限公司 | Application control method and device, electronic equipment and computer readable medium |
CN111367828A (en) * | 2020-02-27 | 2020-07-03 | Oppo广东移动通信有限公司 | Memory compression method, device, terminal and storage medium |
US20220188145A1 (en) * | 2020-12-11 | 2022-06-16 | Samsung Electronics Co., Ltd. | Method and system for managing memory for applications in a computing system |
Also Published As
Publication number | Publication date |
---|---|
WO2024199231A1 (en) | 2024-10-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108345524B (en) | Application monitoring method and application monitoring device | |
CN109857592A (en) | Data recovery control method, server and storage medium | |
US8516499B2 (en) | Assistance in performing action responsive to detected event | |
US20070005926A1 (en) | Method for managing a memory in mobile terminal | |
CN106445604A (en) | Clearing method and device for applications | |
CN113590337B (en) | Method and device for automatically adjusting cloud host configuration in cloud environment | |
CN107943570B (en) | Application management method and device, storage medium and electronic equipment | |
CN112783725A (en) | Index acquisition method and device | |
CN117492662B (en) | Pre-reading determination method and device, storage medium and electronic equipment | |
CN106844655A (en) | Information processing method, device and computer equipment | |
CN115220912A (en) | System resource configuration method, device, electronic device and storage medium | |
CN112087771A (en) | Communication control method and device, electronic equipment and computer readable storage medium | |
CN112667467A (en) | Cluster self-adaptive current limiting method and device, computer equipment and storage medium | |
CN114756406B (en) | Application crash processing method, device and electronic device | |
CN114327022B (en) | Method and application of dynamic adjustment of cloud phone performance | |
CN107958024A (en) | Conversation combining method, device and computer equipment | |
CN114647550A (en) | Process control method, device, storage medium and electronic equipment | |
CN110837431A (en) | Service control method, service control device, computer equipment and computer-readable storage medium | |
CN107911229B (en) | Running state change reminding method and device, electronic equipment and storage medium | |
CN111132132A (en) | Traffic management method and device and terminal equipment | |
CN118733477A (en) | A vehicle system process control method, device, electronic equipment and vehicle | |
CN118838739A (en) | Data adjustment method and device, storage medium and electronic equipment | |
CN112506428A (en) | Storage defragmentation time adjustment method, system, terminal and storage medium | |
CN116126577B (en) | File handle monitoring and leakage analysis method and device and electronic equipment | |
CN107145495B (en) | Method and device for dynamically adjusting parameter rules |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |