Vehicle-mounted terminal memory leak processing method and device, equipment and medium

By detecting kernel-state memory leaks in the on-board terminal system and opening the memory debugging node, combining the probe to capture process information, the problems of performance degradation and low debugging efficiency caused by memory leaks in the on-board terminal system are solved, and efficient memory leak location and resolution are achieved.

CN119690727APending Publication Date: 2025-03-25FIBOCOM AUTO SOFTWARE INC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411834747.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In-vehicle terminals often experience system memory leaks in the early stages of actual vehicle road test and mass production, resulting in system performance degradation and inexpensive debugging efficiency. The existing technology requires long-term opening of memory debugging nodes, consuming system resources.

Method used

By detecting kernel-state memory leaks in the on-board terminal system, we can determine whether the memory leak rate and quantity meet the preset conditions. If it is met, open the kernel-state memory debugging node, restart the system, and grab process information through the probe, track abnormal application processes, print logs and restart the system.

Benefits of technology

This avoids the performance consumption of turning on the kernel state memory debugging node for a long time, saves time and manpower, improves debugging efficiency, and reduces the need for joint inspections with customers and version iterative retesting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119690727A_ABST
    Figure CN119690727A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle-mounted terminal memory leak processing method, device and equipment and a medium, and relates to the technical field of vehicle tests.The method comprises the steps that in the running process of a vehicle-mounted terminal system, if it is detected that kernel mode memory leak exists in the vehicle-mounted terminal system, whether the memory leak rate and the memory leak amount meet preset leak conditions or not is judged; if the preset leakage condition is met, a kernel mode memory debugging node is opened, a vehicle-mounted terminal system is restarted, and then process information is grabbed through a probe embedded in a kernel mode memory application call stack; the abnormal application process is tracked according to the process information, the process information is printed in a page application log of a kernel mode, then a kernel mode memory debugging node is closed, and the vehicle-mounted terminal system is restarted. Visibly, the method and the device can avoid long-time opening of a kernel mode memory debugging node, do not need to be combined with a client for troubleshooting, do not need to iterate a compiled version for long-time retest, save a lot of time and manpower, and improve the debugging efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vehicle testing technology, and in particular to a method, device, equipment and medium for processing memory leakage of a vehicle terminal. Background Art

[0002] During the actual vehicle road test and the early stage of mass production, the vehicle terminal (TBOX, Telematics Box) will frequently report system memory leak problems. Such problems require adding a memory leak location mechanism in the software and require a long time to capture logs. Opening the memory debugging mechanism for a long time will consume system memory and CPU (Central Processing Unit) resources, affecting the system performance of TBOX.

[0003] Considering the system performance, the software version released in mass production later will cut the debugging tools for the memory part. If TBOX has a memory leak problem, it is often necessary to add a debugging mechanism in a targeted manner based on the preliminary analysis results, and re-iterate the compiled version for a long time for retesting. This will consume a lot of time and manpower, affecting the debugging efficiency and project progress. If the application process causes a kernel memory leak, it is often necessary to jointly investigate with the customer, adopt the reverse investigation idea of ​​closing the application process, and continuously compile the version for verification, which leads to low debugging efficiency. Therefore, the above problems urgently need to be solved by those skilled in the art. Summary of the invention

[0004] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for handling memory leaks in a vehicle terminal, which can avoid opening the kernel state memory debugging node for a long time, without the need for joint investigation with customers, and without the need for re-iteration of compiled versions for a long time, thus saving a lot of time and manpower and improving debugging efficiency. The specific scheme is as follows:

[0005] In a first aspect, the present application discloses a method for processing a memory leak in a vehicle terminal, comprising:

[0006] During the operation of the vehicle terminal system, if a kernel-state memory leak is detected in the vehicle terminal system, determining whether the memory leak rate and the memory leak amount meet a preset leak condition;

[0007] If the preset leakage condition is met, the kernel state memory debugging node is opened, the vehicle terminal system is restarted, and then the process information is captured by a probe embedded in the kernel state memory application call stack;

[0008] The abnormal application process is tracked according to the process information, and the process information is printed in the log of the page application in the kernel state, the kernel state memory debugging node is closed and the vehicle terminal system is restarted.

[0009] Optionally, the determining whether the memory leakage rate and the memory leakage amount meet a preset leakage condition includes:

[0010] Determine whether the time difference between the vehicle power-on time and the current time is less than a preset time difference, and determine whether the memory difference between the initial available memory and the current available memory is greater than a preset memory threshold;

[0011] If the time difference between the vehicle power-on time and the current time is less than the preset time difference, and the memory difference between the initial available memory and the current available memory is greater than the preset memory threshold, it is determined that the memory leakage rate and the memory leakage amount meet the preset leakage condition.

[0012] Optionally, after determining whether the memory leakage rate and the memory leakage amount meet a preset leakage condition, the method further includes:

[0013] If the memory leakage rate and the memory leakage amount do not meet the preset leakage condition, opening the kernel state memory debugging node is prohibited, and the vehicle terminal system is restarted through a scheduled restart operation.

[0014] Optionally, opening the kernel-mode memory debugging node includes:

[0015] A boot loader is determined, and a memory debugging command corresponding to the kernel state is determined, and then a startup command sequence variable is modified based on the memory debugging command to open the kernel state memory debugging node.

[0016] Optionally, the kernel-mode memory application call stack includes a call stack related to network data, a call stack related to serial port data, and a call stack related to global positioning system data.

[0017] Optionally, during the operation of the vehicle terminal system, the following steps are also included:

[0018] The memory usage of each application process and the impact of each application process on the kernel state memory are displayed through a graphical interface, and the display content of the graphical interface is updated at preset intervals.

[0019] Optionally, the process information includes a process serial number and a process name.

[0020] In a second aspect, the present application discloses a vehicle-mounted terminal memory leakage processing device, comprising:

[0021] A leakage judgment module is used to judge whether the memory leakage rate and the memory leakage amount meet the preset leakage conditions if a kernel memory leakage is detected in the vehicle terminal system during the operation of the vehicle terminal system;

[0022] A process information capture module, used to open the kernel state memory debugging node and restart the vehicle terminal system if the preset leakage condition is met, and then capture the process information through a probe embedded in the kernel state memory application call stack;

[0023] The abnormal process positioning module is used to track the abnormal application process according to the process information, print the process information in the log of the kernel state page application, close the kernel state memory debugging node and restart the vehicle terminal system.

[0024] In a third aspect, the present application discloses an electronic device, comprising:

[0025] Memory, used to store computer programs;

[0026] The processor is used to execute the computer program to implement the aforementioned disclosed method for handling memory leakage of the vehicle terminal.

[0027] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed vehicle-mounted terminal memory leak processing method is implemented.

[0028] It can be seen that the present application proposes a method for handling memory leaks in vehicle terminals, including: during the operation of the vehicle terminal system, if a kernel-state memory leak is detected in the vehicle terminal system, then judging whether the memory leak rate and the memory leak amount meet the preset leak condition; if the preset leak condition is met, then opening the kernel-state memory debugging node, restarting the vehicle terminal system, and then capturing the process information through a probe embedded in the kernel-state memory application call stack; tracking the abnormal application process according to the process information, and printing the process information in the log of the kernel-state page application, closing the kernel-state memory debugging node and restarting the vehicle terminal system. It can be seen that the present application will open the kernel-state memory debugging node only when it is detected that there is a kernel-state memory leak in the vehicle terminal system, and the memory leak rate and the memory leak amount meet the preset leak condition, so as to avoid consuming system memory and CPU resources by opening the kernel-state memory debugging node for a long time, thereby avoiding affecting the system performance of the vehicle terminal. Furthermore, the present application captures process information through probes embedded in the kernel-mode memory application call stack, and directly tracks abnormal application processes based on the process information. In this way, there is no need to jointly investigate with customers, nor is there any need to re-iterate and compile versions for long-term retesting, which saves a lot of time and manpower and improves debugging efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0030] Figure 1 A flow chart of a method for handling memory leakage in a vehicle terminal disclosed in this application;

[0031] Figure 2 A flowchart of a specific method for handling memory leakage in a vehicle terminal disclosed in this application;

[0032] Figure 3 This is a schematic diagram of the structure of a vehicle terminal memory leakage processing device disclosed in this application;

[0033] Figure 4 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0035] Considering system performance, the software version released in mass production later will cut out the debugging tools for memory. If a memory leak occurs in the vehicle terminal, it is often necessary to add a debugging mechanism based on the preliminary analysis results, re-iterate the compiled version and retest it for a long time, which will consume a lot of time and manpower, affecting debugging efficiency and project progress. If the application process causes kernel memory leaks, it is often necessary to jointly investigate with the customer and continuously compile the version for verification, which leads to low debugging efficiency.

[0036] To this end, an embodiment of the present application proposes a memory leak processing solution for a vehicle terminal, which can avoid opening the kernel-state memory debugging node for a long time. There is no need to jointly investigate with customers, nor is there a need to re-iterate the compiled version for long-term retesting, which saves a lot of time and manpower and improves debugging efficiency.

[0037] The present application embodiment discloses a method for processing a memory leak in a vehicle terminal. Figure 1 As shown, including:

[0038] Step S11: during the operation of the vehicle terminal system, if a kernel memory leak is detected in the vehicle terminal system, it is determined whether the memory leak rate and the memory leak amount meet a preset leak condition.

[0039] Memory leaks in vehicle terminals include application-state memory leaks and kernel-state memory leaks. Application-state memory leaks refer to the situation in which dynamically allocated memory space is not correctly released when it is no longer needed due to defects in the program code or improper design during the operation of the application, thereby causing memory waste. Kernel-state memory leaks refer to the situation in which memory resources are incorrectly occupied and cannot be properly recovered due to driver problems or improper resource management within the operating system kernel. In response to the problem of kernel-state memory leaks, this embodiment locates abnormal applications by dynamically opening and closing kernel-state memory debugging nodes and embedding probes in the kernel-state memory application call stack, solving the problem of low efficiency in locating memory leaks and limited log analysis in actual vehicle road testing and the initial stage of mass production.

[0040] If a kernel-mode memory leak is detected in the vehicle terminal system, a comprehensive evaluation process for the memory leak is started to accurately determine whether the memory leak rate and the amount of memory leak meet the preset leak conditions. Specifically, the time difference between the vehicle power-on time and the current time is calculated first. The acquisition of this time difference is of key significance for measuring the speed of memory leaks. At the same time, a detailed comparison is made between the initial available memory and the current available memory to obtain the memory difference between the two, which can intuitively reflect the amount of memory leak that has occurred. Further, if the time difference between the vehicle power-on time and the current time is less than the preset time difference, and the memory difference between the available memory and the current available memory is greater than the preset memory threshold, the memory leak rate and the amount of memory leak are determined to meet the preset leak conditions. For example, if the initial available memory is 200MB, the current available memory is 50MB, and the time difference between the vehicle power-on time and the current time does not reach the daily restart time, the memory leak rate and the amount of memory leak are determined to meet the preset leak conditions.

[0041] Step S12: If the preset leakage condition is met, the kernel state memory debugging node is opened, and the vehicle terminal system is restarted, and then the process information is captured through the probe embedded in the kernel state memory application call stack.

[0042] If the preset leakage conditions are met, the kernel state memory debugging node is opened, and the vehicle terminal system is restarted, and then the process information is captured through the probe embedded in the kernel state memory application call stack, and the process information includes the process sequence number and process name. It should be pointed out that the specific method of opening the kernel state memory debugging node is: determine the boot loader, and determine the memory debugging command corresponding to the kernel state, and then modify the startup command sequence variable based on the memory debugging command to open the kernel state memory debugging node.

[0043] In order to reduce unnecessary performance loss, this embodiment may choose to embed probes in the call stack related to network data, the call stack related to serial port data, and the call stack related to global positioning system data.

[0044] In addition, if the memory leakage rate and the memory leakage amount do not meet the preset leakage conditions, in order to avoid consuming system memory and CPU resources by opening the kernel state memory debugging node for a long time, this embodiment prohibits opening the kernel state memory debugging node and restarts the vehicle terminal system through a scheduled restart operation. Among them, the scheduled restart operation is, for example, a daily restart operation of the vehicle terminal system, that is, an operation of restarting at a frequency of once a day. This restart method can usually be configured through the system settings of the vehicle terminal, so that the memory occupancy state of the system can be restored to ensure stable operation of the system.

[0045] Step S13: Tracking the abnormal application process according to the process information, and printing the process information in the log of the kernel state page application, closing the kernel state memory debugging node and restarting the vehicle terminal system.

[0046] In this embodiment, the abnormal application process is tracked according to the process information, and the process information is printed in the log of the kernel-state page application, the kernel-state memory debugging node is closed and the vehicle-mounted terminal system is restarted. Specifically, in this embodiment, the process information is printed in the log of the kernel-state page application. The log has detailed time stamps and a clear classification record format, which is convenient for subsequent tracing and review. Furthermore, the kernel-state memory debugging node is closed, and the vehicle-mounted terminal system is restarted. During the restart period, the system can efficiently restore the normal operation of each module. Since the process information has been clearly recorded in the log, the technician can directly analyze the anomaly based on the process information in the log. Therefore, there is no need for customers to participate in joint investigations, nor is there any need to re-perform complex iterative compilation and long-term retesting, which greatly improves the efficiency of problem solving.

[0047] It should be noted that the present embodiment can display the memory usage of each application process and the impact of each application process on the kernel state memory through a graphical interface, and update the display content of the graphical interface at preset intervals. For example, in the graphical interface, the memory capacity occupied by each running application process is listed in detail in the form of intuitive and easy-to-understand charts or data lists, including key information such as the usage of physical memory and virtual memory. At the same time, the impact of each application process on the kernel state memory will also be accurately presented, such as how much memory space a certain application process has applied for in the kernel state for specific data interaction, system calls and other operations, and the changes brought about by the operation of the process to the kernel state memory resource allocation, scheduling and other aspects, can all be clearly reflected in the graphical interface. In order to ensure that the displayed information is always kept up to date and accurate, the system will automatically update the display content of the graphical interface at a preset time interval. This preset interval can be flexibly set according to actual monitoring needs and system resources and other factors. For example, it can be set to update every 5 seconds. In this way, users can understand the memory usage of each application process and its dynamic changes in the impact on kernel memory in real time. When memory-related abnormalities occur, they can quickly analyze and troubleshoot the problem based on the latest display content, and then take effective countermeasures.

[0048] Figure 2 A specific flow chart of a method for handling memory leaks in vehicle terminals is disclosed. When the system is running, if a kernel-state memory leak is detected in the system and the preset leak conditions are met, the system opens the kernel-state memory debugging node through instructions and restarts the vehicle terminal system. Then, the probe embedded in the kernel-state memory application call stack is used to capture process information and perform information statistics to track the processes used by this call stack, and the process number and process name are synchronously printed to the log. In addition, for application-state memory leaks, the abnormal process can be directly located by capturing process memory information, see Figure 2As shown in ①; for memory leaks caused by the kernel state itself, they can be directly located through the debugging node log, as shown in ②; for kernel state memory leaks caused by application processes, the cause of the exception can be directly located, as shown in ③. Compared with traditional technologies, the improvement of this application lies in optimizing the software using the idea of ​​ftrace (a tracing tool inside Linux), burying points in the kernel memory application interface to track the information of the called application process and print out the relevant information of the process. Secondly, the debugging mechanism of the software version function is not directly tailored, and the memory debugging mechanism is dynamically opened by passing parameters through bootcmd (startup command sequence variable). That is, this application is based on the idea of ​​dynamic configuration and function stack tracing during the startup process of the Linux system, relying on the judgment of the memory leak scenario, and by capturing complete log information when the memory leak occurs, the mass production version has achieved the function of completely locating the memory leak problem, and improved the efficiency of locating the problem when the memory leak occurs. It is understandable that in order to ensure the performance of the vehicle terminal system and the available system resources, the memory debugging mechanism is normally in a closed state. When a memory leak is detected and the leak occurs in the kernel and the preset leak conditions are met, the memory leak debugging node is turned on and the vehicle terminal system is restarted. Furthermore, the present application embeds probes in the code corresponding to the debugging information so that the kernel memory application part can track the called application process and print out the serial number and name of the process.

[0049] For example, suppose that when a car's in-car entertainment system is in hibernation, a kernel-state driver in its audio processing module has a vulnerability. When the vehicle enters hibernation, the driver should release some temporarily occupied kernel-state memory resources. However, due to a logical error in the code, the memory release operation is not performed correctly during the hibernation process. When the vehicle is awakened and the in-car entertainment system restarts the audio-related functions, the driver will continue to apply for new kernel-state memory to process new audio tasks, and the previously unreleased memory is still occupied. As the vehicle goes through multiple sleep-wake cycles, more and more kernel-state memory is invalidly occupied by the audio processing driver. For example, after the vehicle wakes up from sleep for the first time, the driver occupies an additional 5MB of kernel-state memory and does not release it; after the second sleep wake-up, the cumulative occupation reaches 12MB, and so on. As time goes by, the system kernel-state available memory gradually decreases, which may eventually cause the system to run slowly, such as audio playback jams, other kernel-state memory-related functions (such as some security monitoring functions that rely on kernel-state memory to store temporary data) abnormalities, or even system crashes, which seriously affect the normal use of the vehicle and driving experience. In order to solve the above problems, this solution is used for processing. Specifically, when the memory leakage rate and memory leakage amount meet the preset leakage conditions, the kernel state memory debugging node is opened, and the in-vehicle entertainment system is restarted. Then, the process information is captured by the probe embedded in the kernel state memory application call stack, and the abnormal application process is tracked according to the process information. Then, the process information is printed in the log of the kernel state page application, and the kernel state memory debugging node is closed and the in-vehicle entertainment system is restarted. In this way, the technicians can analyze the abnormal application process based on the process information in the log, without the need to jointly investigate with the customer, and without the need to re-iterate the compiled version for a long time for retesting, saving a lot of time and manpower.

[0050] It can be seen that the present application proposes a method for handling memory leaks in vehicle terminals, including: during the operation of the vehicle terminal system, if a kernel-state memory leak is detected in the vehicle terminal system, then judging whether the memory leak rate and the memory leak amount meet the preset leak condition; if the preset leak condition is met, then opening the kernel-state memory debugging node, restarting the vehicle terminal system, and then capturing the process information through a probe embedded in the kernel-state memory application call stack; tracking the abnormal application process according to the process information, and printing the process information in the log of the kernel-state page application, closing the kernel-state memory debugging node and restarting the vehicle terminal system. It can be seen that the present application will open the kernel-state memory debugging node only when it is detected that there is a kernel-state memory leak in the vehicle terminal system, and the memory leak rate and the memory leak amount meet the preset leak condition, so as to avoid consuming system memory and CPU resources by opening the kernel-state memory debugging node for a long time, thereby avoiding affecting the system performance of the vehicle terminal. Furthermore, the present application captures process information through probes embedded in the kernel-mode memory application call stack, and directly tracks abnormal application processes based on the process information. In this way, there is no need to jointly investigate with customers, nor is there any need to re-iterate and compile versions for long-term retesting, which saves a lot of time and manpower and improves debugging efficiency.

[0051] Correspondingly, the embodiment of the present application also discloses a vehicle terminal memory leakage processing device, see Figure 3 As shown, the device comprises:

[0052] The leakage judgment module 11 is used to judge whether the memory leakage rate and the memory leakage amount meet the preset leakage conditions if a kernel memory leakage is detected in the vehicle terminal system during the operation of the vehicle terminal system;

[0053] The process information capture module 12 is used to open the kernel state memory debugging node and restart the vehicle terminal system if the preset leakage condition is met, and then capture the process information through the probe embedded in the kernel state memory application call stack;

[0054] The abnormal process positioning module 13 is used to track the abnormal application process according to the process information, print the process information in the kernel state page application log, close the kernel state memory debugging node and restart the vehicle terminal system.

[0055] Among them, for more specific working processes of the above-mentioned modules, please refer to the corresponding contents disclosed in the aforementioned embodiments, which will not be repeated here.

[0056] It can be seen that the present application proposes a method for handling memory leaks in vehicle terminals, including: during the operation of the vehicle terminal system, if a kernel-state memory leak is detected in the vehicle terminal system, then judging whether the memory leak rate and the memory leak amount meet the preset leak condition; if the preset leak condition is met, then opening the kernel-state memory debugging node, restarting the vehicle terminal system, and then capturing the process information through a probe embedded in the kernel-state memory application call stack; tracking the abnormal application process according to the process information, and printing the process information in the log of the kernel-state page application, closing the kernel-state memory debugging node and restarting the vehicle terminal system. It can be seen that the present application will open the kernel-state memory debugging node only when it is detected that there is a kernel-state memory leak in the vehicle terminal system, and the memory leak rate and the memory leak amount meet the preset leak condition, so as to avoid consuming system memory and CPU resources by opening the kernel-state memory debugging node for a long time, thereby avoiding affecting the system performance of the vehicle terminal. Furthermore, the present application captures process information through probes embedded in the kernel-mode memory application call stack, and directly tracks abnormal application processes based on the process information. In this way, there is no need to jointly investigate with customers, nor is there any need to re-iterate and compile versions for long-term retesting, which saves a lot of time and manpower and improves debugging efficiency.

[0057] Furthermore, an embodiment of the present application also provides an electronic device. Figure 4 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.

[0058] Figure 4 A schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a display screen 23, an input / output interface 24, a communication interface 25, a power supply 26, and a communication bus 27. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the vehicle-mounted terminal memory leakage processing method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0059] In this embodiment, the power supply 26 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 25 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 24 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.

[0060] In addition, the memory 22, as a carrier for storing resources, may be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon may include a computer program 221, and the storage method may be temporary storage or permanent storage. In addition to including a computer program that can be used to complete the vehicle-mounted terminal memory leakage processing method executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 221 may further include a computer program that can be used to complete other specific tasks.

[0061] Furthermore, an embodiment of the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed vehicle-mounted terminal memory leak processing method is implemented.

[0062] For the specific steps of the method, reference may be made to the corresponding contents disclosed in the aforementioned embodiments, which will not be described in detail here.

[0063] The various embodiments in this application are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0064] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0065] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0066] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0067] The above is a detailed introduction to the vehicle-mounted terminal memory leak processing method, device, equipment, and storage medium provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for processing memory leakage of a vehicle terminal, characterized in that: include: During the operation of the vehicle terminal system, if a kernel-state memory leak is detected in the vehicle terminal system, determining whether the memory leak rate and the memory leak amount meet a preset leak condition; If the preset leakage condition is met, the kernel state memory debugging node is opened, the vehicle terminal system is restarted, and then the process information is captured by a probe embedded in the kernel state memory application call stack; The abnormal application process is tracked according to the process information, and the process information is printed in the log of the page application in the kernel state, the kernel state memory debugging node is closed and the vehicle terminal system is restarted.

2. The method for processing memory leakage of a vehicle terminal according to claim 1, characterized in that: The determining whether the memory leakage rate and the memory leakage amount meet the preset leakage condition includes: Determine whether the time difference between the vehicle power-on time and the current time is less than a preset time difference, and determine whether the memory difference between the initial available memory and the current available memory is greater than a preset memory threshold; If the time difference between the vehicle power-on time and the current time is less than the preset time difference, and the memory difference between the initial available memory and the current available memory is greater than the preset memory threshold, it is determined that the memory leakage rate and the memory leakage amount meet the preset leakage condition.

3. The method for processing memory leakage of a vehicle terminal according to claim 2, characterized in that: After determining whether the memory leakage rate and the memory leakage amount meet the preset leakage condition, the method further includes: If the memory leakage rate and the memory leakage amount do not meet the preset leakage condition, opening the kernel state memory debugging node is prohibited, and the vehicle terminal system is restarted through a scheduled restart operation.

4. The method for processing memory leakage of a vehicle terminal according to claim 1, characterized in that: The step of opening the kernel-mode memory debugging node includes: A boot loader is determined, and a memory debugging command corresponding to the kernel state is determined, and then a startup command sequence variable is modified based on the memory debugging command to open the kernel state memory debugging node.

5. The vehicle terminal memory leak processing method according to claim 1, characterized in that: The kernel-mode memory application call stack includes a call stack related to network data, a call stack related to serial port data, and a call stack related to global positioning system data.

6. The vehicle terminal memory leak processing method according to claim 1, characterized in that: During the operation of the vehicle terminal system, it also includes: The memory usage of each application process and the impact of each application process on the kernel state memory are displayed through a graphical interface, and the display content of the graphical interface is updated at preset intervals.

7. The method for processing a memory leak in a vehicle terminal according to any one of claims 1 to 6, characterized in that: The process information includes a process serial number and a process name.

8. A vehicle terminal memory leak processing device, characterized in that: include: A leakage judgment module is used to judge whether the memory leakage rate and the memory leakage amount meet the preset leakage conditions if a kernel memory leakage is detected in the vehicle terminal system during the operation of the vehicle terminal system; A process information capture module, used to open the kernel state memory debugging node and restart the vehicle terminal system if the preset leakage condition is met, and then capture the process information through a probe embedded in the kernel state memory application call stack; The abnormal process positioning module is used to track the abnormal application process according to the process information, print the process information in the log of the kernel state page application, close the kernel state memory debugging node and restart the vehicle terminal system.

9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the vehicle terminal memory leakage processing method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the vehicle-mounted terminal memory leakage processing method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Method and apparatus for processing memory leak in vehicle-mounted terminal, device, and medium

    WO2026123554A1