Vehicle-mounted application process killing method and device, electronic equipment and storage medium

CN117632421BActive Publication Date: 2026-10-30CHONGQING JINKANG NEW ENERGY VEHICLE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311616086.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2026-10-30
Estimated Expiration
2043-11-29

AI Technical Summary

Technical Problem

[0003]有鉴于此,本申请实施例提供了一种车载应用进程查杀方法、装置、电子设备及存储介质,以解决现有技术中,释放应用进程内存灵活性差和准确率低的问题

Benefits of technology

[0008]本申请实施例与现有技术相比存在的有益效果至少包括:从多个应用进程中确定出对应内存大小大于内存最大值的一个或多个目标应用进程,向各个目标应用进程发送占用内存超标警告,以通知各个目标应用进程进行自主优化,释放所占用的部分内存,利用应用进程杀死机制杀死再次查询中对应内存大小大于内存最大值的目标应用进程,所以,采用上述技术手段,可以解决现有技术中释放应用进程内存灵活性差和准确率低的问题,进而提高释放应用进程内存的灵活性和准确率,避免安全隐患。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117632421B_ABST
    Figure CN117632421B_ABST
Patent Text Reader

Abstract

The application provides a vehicle-mounted application process killing method and device, electronic equipment and a storage medium. The method comprises the following steps: querying the memory size occupied by each application process running on a target vehicle by executing a polling task; obtaining the maximum memory size required by each application process; determining one or more target application processes with a memory size greater than the maximum memory size from a plurality of application processes; sending a memory occupation warning to each target application process to notify each target application process to perform autonomous optimization and release part of the occupied memory; after a polling cycle corresponding to the polling task, the polling task is executed again to query the memory size occupied by each target application process; and using an application process killing mechanism to kill the target application process with a memory size greater than the maximum memory size in the re-query. The above technical means solves the problems of poor flexibility and low accuracy in releasing application process memory in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of automotive technology, and in particular to a method, device, electronic device, and storage medium for detecting and killing in-vehicle application processes. Background Technology

[0002] For in-vehicle systems, memory is a crucial system resource. Insufficient memory during system operation can lead to system lag, malfunctions, and even system restarts, posing serious security risks. The causes of insufficient memory are varied, including hardware limitations that cannot be changed at the hardware level. However, memory can be released by handling applications that abnormally consume memory. Currently, the common method for handling application processes is to release those consuming more memory than a set limit. This method lacks flexibility and can lead to incorrect process releases, causing inconvenience and security risks for users. Summary of the Invention

[0003] In view of this, embodiments of this application provide a method, apparatus, electronic device, and storage medium for detecting and killing in-vehicle application processes, in order to solve the problems of poor flexibility and low accuracy in releasing application process memory in the prior art.

[0004] A first aspect of this application provides a method for killing in-vehicle application processes, comprising: querying the memory size occupied by each application process running on a target vehicle by executing a polling task; obtaining the maximum memory size required for each application process to run; identifying one or more target application processes from multiple application processes whose corresponding memory size is greater than the maximum memory size; sending a memory overrun warning to each target application process to notify each target application process to perform self-optimization and release the occupied memory; after one polling cycle corresponding to the polling task, executing the polling task again to query the memory size occupied by each target application process; and killing the target application processes whose corresponding memory size is greater than the maximum memory size in the second query using an application process killing mechanism.

[0005] A second aspect of this application provides an in-vehicle application process killing device, comprising: a first query module configured to query the memory size occupied by each application process running on a target vehicle by executing a polling task; an acquisition module configured to acquire the maximum memory size required for each application process to run; a determination module configured to determine one or more target application processes from multiple application processes whose corresponding memory size is greater than the maximum memory size; an optimization module configured to send a memory overage warning to each target application process to notify each target application process to perform self-optimization and release the occupied memory; a second query module configured to execute a polling task again to query the memory size occupied by each target application process after one polling cycle corresponding to the polling task; and a killing module configured to kill the target application processes whose corresponding memory size is greater than the maximum memory size in the second query using an application process killing mechanism.

[0006] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.

[0007] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described above.

[0008] The beneficial effects of this application embodiment compared with the prior art include at least the following: identifying one or more target application processes from multiple application processes whose corresponding memory size is greater than the maximum memory value, sending a memory overage warning to each target application process to notify each target application process to perform autonomous optimization and release the occupied part of the memory, and using the application process killing mechanism to kill the target application processes whose corresponding memory size is greater than the maximum memory value in subsequent queries. Therefore, by adopting the above technical means, the problems of poor flexibility and low accuracy in releasing application process memory in the prior art can be solved, thereby improving the flexibility and accuracy of releasing application process memory and avoiding security risks. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0010] Figure 1 This is a flowchart illustrating a method for detecting and killing in-vehicle application processes provided in an embodiment of this application;

[0011] Figure 2 This is a flowchart illustrating another method for detecting and killing in-vehicle application processes provided in an embodiment of this application;

[0012] Figure 3 This is a schematic diagram of the structure of an in-vehicle application process killing device provided in an embodiment of this application;

[0013] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0014] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0015] Figure 1 This is a flowchart illustrating a method for detecting and killing in-vehicle application processes provided in an embodiment of this application. Figure 1 The method for detecting and eliminating in-vehicle application processes can be executed by a computer or server, a processor on a computer or server, or software on a computer or ordinary server. This method includes:

[0016] S101, by executing a polling task, queries the memory size occupied by each application process running on the target vehicle;

[0017] S102, obtain the maximum memory required for each application process to run;

[0018] S103, Identify one or more target application processes from multiple application processes whose corresponding memory size is greater than the maximum memory value;

[0019] S104, send a memory usage warning to each target application process to notify each target application process to perform self-optimization and release the memory it occupies;

[0020] S105, After one polling cycle corresponding to the polling task, the polling task is executed again to query the memory size occupied by each target application process;

[0021] S106: Use the application process killing mechanism to kill the target application process whose memory size is greater than the maximum memory value in the next query.

[0022] An application process can be either a foreground or background application process. If the application process is a foreground application process, then the maximum memory required for its execution is the same as the maximum memory required for its foreground execution. If the application process is a background application process, then the maximum memory required for its execution is the same as the maximum memory required for its background execution.

[0023] For example, application processes A and B currently running on the target vehicle occupy 30MB and 35MB of memory respectively, while their maximum memory requirements are 40MB and 30MB respectively. Since application process B's memory usage exceeds the maximum, it is designated as the target application process. Application process A's memory usage is less than the maximum, so it is not the target application process. A memory usage exceedance warning is sent to application process B to notify it to optimize itself and release some of its occupied memory, reducing its total memory usage to less than 30MB. After one polling cycle, the polling task is executed again to check the memory usage of application process B. If application process B's memory usage is still greater than the maximum, application process kill mechanism is used to kill application process B.

[0024] According to the technical solution provided in this application embodiment, a polling task is executed to query the memory size occupied by each application process running on the target vehicle; the maximum memory size required for each application process to run is obtained; one or more target application processes with memory sizes greater than the maximum memory size are identified from multiple application processes; a memory overage warning is sent to each target application process to notify it to perform self-optimization and release the occupied memory; after one polling cycle corresponding to the polling task, the polling task is executed again to query the memory size occupied by each target application process; and the application process killing mechanism is used to kill the target application processes with memory sizes greater than the maximum memory size found in the second query. By employing the above technical means, the problems of poor flexibility and low accuracy in releasing application process memory in the prior art can be solved, thereby improving the flexibility and accuracy of releasing application process memory and avoiding security risks.

[0025] Furthermore, before querying the memory size occupied by each application process running on the target vehicle by executing a polling task, the method also includes: obtaining the total memory size that the vehicle's in-vehicle system can provide and the historical memory usage information of the in-vehicle system, wherein the historical memory usage information is the memory size occupied by the in-vehicle system at various times; statistically analyzing the frequency of the difference between the percentage of memory size occupied by the in-vehicle system and the total memory size in the historical memory usage information; determining the polling period based on the statistically obtained frequency of the difference between the percentage of memory size occupied by the in-vehicle system and the total memory size; and generating a polling task based on the polling period to query the memory size occupied by application processes running on the target vehicle.

[0026] Total memory size: The maximum memory that the vehicle system can provide. Statistical analysis of memory usage history: The frequency of the percentage of memory used by the vehicle system relative to the total memory size. For example, if the percentage of memory used by the vehicle system relative to the total memory size is 30% 100 times in the historical memory usage history, and the historical memory usage history is the memory usage data of the vehicle system over the past 3000 minutes, then the frequency of the percentage of memory used by the vehicle system relative to the total memory size being 30% is 1 / 30. A polling task is used to query the memory usage of each application process running on the target vehicle at regular polling intervals.

[0027] Furthermore, the polling period is determined based on the frequency of different proportions of the memory occupied by the vehicle system compared to the total memory size obtained from statistics. This includes: determining a first frequency in which the proportion of the memory occupied by the vehicle system compared to the total memory size in the statistically obtained historical memory usage information is greater than a first preset proportion; determining a second frequency in which the proportion of the memory occupied by the vehicle system compared to the total memory size in the statistically obtained historical memory usage information is greater than a second preset proportion; determining a third frequency in which the proportion of the memory occupied by the vehicle system compared to the total memory size in the statistically obtained historical memory usage information is greater than a third preset proportion; and determining the polling period based on the first frequency, the second frequency, and the second frequency.

[0028] The first preset percentage is less than the second preset percentage, and the second preset percentage is less than the third preset percentage. For example, if the first, second, and third preset percentages are 50%, 70%, and 90% respectively, then the frequencies in historical memory usage information where the percentage of memory occupied by the in-vehicle system relative to the total memory is greater than 50%, 70%, and 90% are one-third, one-tenth, and one-thirtieth respectively. In other words, the first, second, and third frequencies are one-third, one-tenth, and one-thirtieth respectively.

[0029] Furthermore, the polling period is determined based on the first frequency, the second frequency, and the second frequency, including: determining the period corresponding to each of the first frequency, the second frequency, and the second frequency; weighting and summing the periods corresponding to each of the first frequency, the second frequency, and the second frequency according to preset weights, and using the calculated result as the polling period.

[0030] For example, historical memory usage information represents the amount of memory used by the vehicle system over the past 3000 minutes. The first, second, and third frequencies are one-third, one-tenth, and one-thirtieth respectively. Therefore, the corresponding periods for the first, second, and third frequencies are three minutes, ten minutes, and thirty minutes respectively. The periods corresponding to the first, second, and third frequencies are weighted and summed according to preset weights, and the calculated result is used as the polling period.

[0031] Furthermore, before obtaining the maximum memory required for each application process to run, the method also includes: obtaining the historical memory usage information and usage frequency of each application process, wherein the historical memory usage information is the memory size occupied by the application process at each time; and determining the maximum memory required for each application process to run based on the historical memory usage information and usage frequency of each application process.

[0032] By analyzing the historical memory usage information of each application process, the maximum base memory value is determined based on the largest number of times each application process has used memory exceeding a preset number. For example, if the historical memory usage information of application process A shows that its memory usage at various times is 30M, 20M, 25M, etc., then 20M and 25M occur more frequently than the preset number of times, with 25M being the largest. Therefore, 25M is the maximum base memory value for application process A. Based on the usage frequency of each application process, the maximum base memory value for each application process is adjusted, and the adjusted maximum base memory value is used as the maximum memory required for that application process to run. For example, if the usage frequency of application process A is greater than the first preset frequency, its maximum base memory value is increased by 10%, meaning 27.5M is the maximum memory value for application process A. Conversely, if the usage frequency of application process A is less than the second preset frequency, its maximum base memory value is decreased by 10%.

[0033] Furthermore, to prevent application processes from temporarily releasing memory and causing multiple instances of unauthorized excessive memory usage, an accumulation mechanism is used to record the number of times each application process illegally occupies excessive memory. For example, when the number reaches 10 times, the application process will be killed, regardless of whether it is a foreground or background process, without issuing a warning. After an application process has been killed more than 10 times, its count will be reset to 0.

[0034] Furthermore, after one polling cycle corresponding to the polling task, the method further includes: re-executing the polling task to query the memory size occupied by each target application process running on the target vehicle and multiple other application processes besides the target application processes; using the application process killing mechanism to kill the target application processes whose corresponding memory size is greater than the maximum memory value in the re-query; re-identifying one or more target application processes whose corresponding memory size is greater than the maximum memory value from the multiple other application processes; sending a memory overage warning to each of the re-identified target application processes to notify them to perform self-optimization and release the occupied memory; and re-executing the polling task after one polling cycle corresponding to the polling task to achieve automatic detection and killing of each application process running on the target vehicle that occupies excessive memory.

[0035] In other words, by executing a polling task after each polling cycle, the system queries the memory usage of each target application process running on the target vehicle, as well as multiple other application processes besides the target application processes. Target application processes whose memory usage exceeds the maximum memory limit are killed, marked as target application processes, and a memory overage warning is sent to these target application processes. This embodiment of the application uses the above-described technical means to automatically detect and kill application processes running on the target vehicle that are consuming excessive memory.

[0036] Figure 2 This is a flowchart illustrating another method for detecting and killing in-vehicle application processes provided in an embodiment of this application, as shown below. Figure 2 As shown, it includes:

[0037] The following loop algorithm is executed according to the polling cycle:

[0038] S201, Execute a polling task to query the memory size occupied by each target application process running on the target vehicle and multiple other application processes besides each target application process. Among them, each target application process is the application process whose corresponding memory size is greater than the maximum memory value as determined by the last polling task and which has been given a memory overage warning.

[0039] S202, use the application process killing mechanism to kill the target application process whose memory size is greater than the maximum memory value in this query;

[0040] S203, re-identify one or more target application processes from multiple other application processes whose corresponding memory size is greater than the maximum memory value;

[0041] S204, send a memory overrun warning to each of the newly identified target application processes to notify them to perform self-optimization and release the memory they have occupied.

[0042] This application embodiment uses a loop algorithm to automatically detect and kill various application processes running on the target vehicle that are consuming excessive memory.

[0043] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.

[0044] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.

[0045] Figure 3 This is a schematic diagram of an in-vehicle application process killing device provided in an embodiment of this application. Figure 3 As shown, the in-vehicle application process detection and removal device includes:

[0046] The first query module 301 is configured to query the memory size occupied by each application process running on the target vehicle by executing a polling task;

[0047] The acquisition module 302 is configured to acquire the maximum memory required for each application process to run;

[0048] The determination module 303 is configured to determine one or more target application processes from multiple application processes whose corresponding memory size is greater than the maximum memory value;

[0049] The optimization module 304 is configured to send a memory overrun warning to each target application process to notify each target application process to perform self-optimization and release the memory it occupies.

[0050] The second query module 305 is configured to execute the polling task again to query the memory size occupied by each target application process after a polling cycle corresponding to the polling task.

[0051] The detection and removal module 306 is configured to use the application process killing mechanism to kill target application processes whose corresponding memory size is greater than the maximum memory value in subsequent queries.

[0052] According to the technical solution provided in this application embodiment, a polling task is executed to query the memory size occupied by each application process running on the target vehicle; the maximum memory size required for each application process to run is obtained; one or more target application processes with memory sizes greater than the maximum memory size are identified from multiple application processes; a memory overage warning is sent to each target application process to notify it to perform self-optimization and release the occupied memory; after one polling cycle corresponding to the polling task, the polling task is executed again to query the memory size occupied by each target application process; and the application process killing mechanism is used to kill the target application processes with memory sizes greater than the maximum memory size found in the second query. By employing the above technical means, the problems of poor flexibility and low accuracy in releasing application process memory in the prior art can be solved, thereby improving the flexibility and accuracy of releasing application process memory and avoiding security risks.

[0053] In some embodiments, the first query module 301 is further configured to obtain the total memory size that the vehicle system of the target vehicle can provide and the historical memory usage information of the vehicle system, wherein the historical memory usage information is the memory size occupied by the vehicle system at each time; to count the frequency of the difference between the memory size occupied by the vehicle system and the total memory size in the historical memory usage information; to determine the polling period based on the frequency of the difference between the memory size occupied by the vehicle system and the total memory size; and to generate a polling task based on the polling period for querying the memory size occupied by application processes running on the target vehicle.

[0054] In some embodiments, the first query module 301 is further configured to determine a first frequency in which the proportion of memory occupied by the vehicle system to the total memory size in the statistically obtained historical memory usage information is greater than a first preset proportion; determine a second frequency in which the proportion of memory occupied by the vehicle system to the total memory size in the statistically obtained historical memory usage information is greater than a second preset proportion; determine a third frequency in which the proportion of memory occupied by the vehicle system to the total memory size in the statistically obtained historical memory usage information is greater than a third preset proportion; and determine a polling period based on the first frequency, the second frequency, and the second frequency.

[0055] In some embodiments, the first query module 301 is further configured to determine the period corresponding to the first frequency, the second frequency and the second frequency respectively; to perform a weighted summation of the periods corresponding to the first frequency, the second frequency and the second frequency according to a preset weight, and to use the calculated result as the polling period.

[0056] In some embodiments, the acquisition module 302 is further configured to acquire historical memory usage information and usage frequency of each application process, wherein the historical memory usage information is the memory size occupied by the application process at each time; and to determine the maximum memory required for each application process to run based on the historical memory usage information and usage frequency of each application process.

[0057] In some embodiments, the killing module 306 is further configured to, to prevent application processes from repeatedly using excessively large amounts of memory due to temporary memory releases, record the number of times each application process illegally occupies excessively large amounts of memory through an accumulation mechanism. For example, when the number reaches 10 times, the application process will be killed, regardless of whether it is a foreground or background process, without issuing a warning. After killing an application process that has been killed more than 10 times, the count for that application process will be reset to 0.

[0058] In some embodiments, the detection and elimination module 306 is further configured to: re-execute the polling task to query the memory size occupied by each target application process running on the target vehicle and multiple other application processes besides the target application processes; use the application process killing mechanism to kill the target application processes whose corresponding memory size is greater than the maximum memory value in the re-query; re-identify one or more target application processes whose corresponding memory size is greater than the maximum memory value from the multiple other application processes; send a memory overage warning to each of the re-identified target application processes to notify each of the re-identified target application processes to perform self-optimization and release the occupied part of the memory; and execute the polling task again after one polling cycle corresponding to the polling task to achieve automatic detection and elimination of each application process running on the target vehicle that occupies excessive memory.

[0059] In some embodiments, the detection and killing module 306 is further configured to execute the following loop algorithm according to the polling cycle: execute a polling task to query the memory size occupied by each target application process running on the target vehicle and multiple other application processes besides the target application processes, wherein each target application process is an application process whose corresponding memory size is greater than the maximum memory value and which has been given a memory overage warning in the last polling task; kill the target application processes whose corresponding memory size is greater than the maximum memory value in this query using the application process killing mechanism; re-determine one or more target application processes whose corresponding memory size is greater than the maximum memory value from the multiple other application processes; send a memory overage warning to each of the re-determined target application processes to notify each of the re-determined target application processes to perform self-optimization and release the occupied part of the memory.

[0060] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0061] Figure 4 This is a schematic diagram of the electronic device 4 provided in an embodiment of this disclosure. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, it implements the steps in the various method embodiments described above. Alternatively, when the processor 401 executes the computer program 403, it implements the functions of each module / unit in the various device embodiments described above.

[0062] Electronic device 4 may include, but is not limited to, processor 401 and memory 402. Those skilled in the art will understand that... Figure 4 This is merely an example of electronic device 4 and does not constitute a limitation on electronic device 4. It may include more or fewer components than shown, or different components.

[0063] Processor 401 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0064] The memory 402 can be an internal storage unit of the electronic device 4, such as a hard disk or RAM of the electronic device 4. The memory 402 can also be an external storage device of the electronic device 4, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., equipped on the electronic device 4. The memory 402 can also include both internal and external storage units of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.

[0065] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0066] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0067] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for detecting and eliminating in-vehicle application processes, characterized in that, include: The polling task is used to query the memory usage of each application process currently running on the target vehicle. Obtain historical memory usage information and usage frequency of each application process, wherein the historical memory usage information is the memory size occupied by the application process at each time, and determine the maximum memory required for each application process to run based on the historical memory usage information and usage frequency of each application process. Identify one or more target application processes from multiple application processes whose corresponding memory size is greater than the maximum memory limit; Send a memory usage warning to each target application process to notify each target application process to perform self-optimization and release the memory it occupies; After one polling cycle corresponding to the polling task, the polling task is executed again to query the memory size occupied by each target application process; Use the application process killing mechanism to kill the target application process whose memory size is greater than the maximum memory value in subsequent queries.

2. The method according to claim 1, characterized in that, Before querying the memory usage of each application process running on the target vehicle by executing a polling task, the method further includes: Obtain the total memory size that the vehicle system of the target vehicle can provide and the historical memory usage information of the vehicle system, wherein the historical memory usage information is the memory size occupied by the vehicle system at each time. The frequency at which the percentage of memory occupied by the vehicle system differs from the total memory size in the historical memory usage information is statistically analyzed. The polling cycle is determined based on the frequency at which the memory size occupied by the vehicle system differs from the total memory size, obtained from statistics. The polling task is generated based on the polling period to query the memory size occupied by application processes running on the target vehicle.

3. The method according to claim 2, characterized in that, The polling cycle is determined based on the frequency of differences between the percentage of memory occupied by the in-vehicle system and the total memory size, obtained from statistics. A first frequency in which the proportion of the memory occupied by the vehicle system to the total memory size in the statistically obtained historical memory usage information is greater than a first preset proportion; A second frequency in which the proportion of the memory occupied by the vehicle system to the total memory size in the statistically obtained historical memory usage information is greater than a second preset proportion; A third frequency in which the proportion of the memory occupied by the vehicle system to the total memory size in the statistically obtained historical memory usage information is greater than a third preset proportion; The polling period is determined based on the first frequency, the second frequency, and the third frequency.

4. The method according to claim 3, characterized in that, Determining the polling period based on the first frequency, the second frequency, and the third frequency includes: Determine the period corresponding to the first frequency, the second frequency, and the second frequency respectively; The first frequency, the second frequency, and the corresponding periods of the second frequency are weighted and summed according to preset weights, and the calculated result is used as the polling period.

5. The method according to claim 1, characterized in that, After one polling cycle corresponding to the polling task, the method further includes: The polling task is executed again to query the memory size occupied by each target application process running on the target vehicle and multiple other application processes besides the target application processes; The application process killing mechanism is used to kill the target application process whose memory size is greater than the maximum memory value in subsequent queries. Re-identify one or more target application processes whose corresponding memory size is greater than the maximum memory value from among multiple other application processes; Send a memory overrun warning to each of the newly identified target application processes to notify them to perform self-optimization and release the memory they have occupied. The polling task is executed again after one polling cycle to automatically detect and kill application processes running on the target vehicle that are consuming excessive memory.

6. The method according to claim 1, characterized in that, The method further includes: The following loop algorithm is executed according to the stated polling period: The polling task is executed to query the memory size occupied by each target application process running on the target vehicle and multiple other application processes besides the target application processes. Each target application process is the application process whose corresponding memory size is greater than the maximum memory value as determined by the last execution of the polling task, and which has been sent the memory overage warning. The application process killing mechanism described above is used to kill the target application process whose memory size is greater than the maximum memory value in this query. Re-identify one or more target application processes whose corresponding memory size is greater than the maximum memory value from among multiple other application processes; A memory overage warning is sent to each of the newly identified target application processes to notify them to perform autonomous optimization and release the memory they are using.

7. A device for detecting and killing in-vehicle application processes, characterized in that, include: The first query module is configured to query the memory usage of each application process running on the target vehicle by executing a polling task; The acquisition module is configured to acquire historical memory usage information and usage frequency of each application process, wherein the historical memory usage information is the memory size occupied by the application process at each time; and based on the historical memory usage information and usage frequency of each application process, determine the maximum memory required for each application process to run. The determination module is configured to identify one or more target application processes from multiple application processes whose corresponding memory size is greater than the maximum memory value; The optimization module is configured to send a memory usage warning to each target application process to notify each target application process to perform self-optimization and release the memory it occupies. The second query module is configured to execute the polling task again after a polling cycle corresponding to the polling task to query the memory size occupied by each target application process; The detection and killing module is configured to use the application process killing mechanism to kill target application processes whose corresponding memory size is greater than the maximum memory value in subsequent queries.

8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Vehicle-mounted application background process searching and killing method and device, electronic equipment and storage medium

    CN117632423A