CN113434364B - Method and device for detecting memory of screen terminal equipment, storage medium and electronic device - Google Patents
Method and device for detecting memory of screen terminal equipment, storage medium and electronic device Download PDFInfo
- Publication number
- CN113434364B CN113434364B CN202110713725.5A CN202110713725A CN113434364B CN 113434364 B CN113434364 B CN 113434364B CN 202110713725 A CN202110713725 A CN 202110713725A CN 113434364 B CN113434364 B CN 113434364B
- Authority
- CN
- China
- Prior art keywords
- memory
- log information
- trend graph
- curve trend
- terminal equipment
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000001514 detection method Methods 0.000 claims abstract description 48
- 238000012360 testing method Methods 0.000 claims description 37
- 238000004590 computer program Methods 0.000 claims description 18
- 230000000630 rising effect Effects 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 8
- 238000004458 analytical method Methods 0.000 claims description 7
- 238000011161 development Methods 0.000 abstract description 8
- 238000005516 engineering process Methods 0.000 abstract description 4
- 230000005540 biological transmission Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 6
- 238000004891 communication Methods 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000015556 catabolic process Effects 0.000 description 1
- 230000001419 dependent effect Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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/3034—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a storage system, e.g. DASD based or network based
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3466—Performance evaluation by tracing or monitoring
- G06F11/3476—Data logging
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3636—Software debugging by tracing the execution of the program
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Quality & Reliability (AREA)
- General Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Mathematical Physics (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention provides a method and a device for detecting a memory of a screen end device, a storage medium and an electronic device, wherein the method comprises the following steps: acquiring the memory consumption condition of the screen terminal equipment, and generating a memory curve trend graph according to the memory consumption condition; acquiring log information according to the memory curve trend graph; performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result; under the condition that the memory detection result is that a memory problem exists, the type of the memory problem is determined according to the log information, the problem that whether the equipment has memory leakage or not can be only tested in the related technology, a detailed trace log of a development engineer cannot be accurately provided after the memory leakage is found can be solved, the memory consumption condition is monitored, the memory is detected based on the memory consumption condition and the log information, the trace log (namely the log information) can be accurately provided after the memory problem is found, and the type of the memory problem is determined based on the log information.
Description
Technical Field
The present invention relates to the field of communications, and in particular, to a method and apparatus for detecting a memory of a screen end device, a storage medium, and an electronic device.
Background
Memory Leak (Memory Leak) refers to the result that the heap Memory dynamically allocated in the program is not released or cannot be released for some reason, which may cause the waste of the system Memory, seriously resulting in the slow running speed of the program and even the system crash.
For network devices to be shipped, in order to ensure the quality of the network devices, it is necessary to test the network devices for memory leakage. At present, only whether the equipment has memory leakage or not can be tested, and a detailed tracking log of a development engineer cannot be accurately provided after the problem is found.
Aiming at the problem that in the related art, only whether the equipment has memory leakage or not can be tested, and a detailed tracking log of a development engineer cannot be accurately provided after the memory leakage is found, no solution is proposed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for detecting a memory of screen-end equipment, a storage medium and an electronic device, which at least solve the problem that in the related technology, only whether the equipment has memory leakage or not can be tested, and detailed tracking logs of development engineers cannot be accurately provided after the memory leakage is found.
According to an embodiment of the present invention, there is provided a method for detecting a memory of a device at a screen end, including:
acquiring the memory consumption condition of the screen terminal equipment, and generating a memory curve trend graph according to the memory consumption condition;
acquiring log information according to the memory curve trend graph;
performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result;
and under the condition that the memory detection result is that a memory problem exists, determining the type of the memory problem according to the log information.
Optionally, performing memory detection on the screen end device according to the memory curve trend graph and the log information includes:
judging whether the memory curve trend graph is in a continuously rising state in a preset time;
if the judgment result is yes, acquiring the log information in the continuous rising period in the memory curve trend graph through a log tracking engine;
and determining that the memory leakage or the memory exhaustion exists in the screen terminal equipment according to the log information.
Optionally, after performing memory detection on the screen end device according to the memory curve trend graph and the log information, the method further includes:
determining a target solution corresponding to the memory leakage or the memory exhaustion according to a pre-stored corresponding list of memory leakage or memory exhaustion and solutions;
and sending the memory leakage or the memory exhaustion and the target solution corresponding to the memory leakage or the memory exhaustion to one or more preset target accounts.
Optionally, generating the memory curve trend graph according to the memory consumption condition includes:
acquiring the total memory of the screen terminal equipment;
determining a memory occupation ratio according to the memory consumption condition and the total memory;
and generating the memory curve trend graph according to the memory occupation ratio.
Optionally, before acquiring the memory consumption condition of the screen end device, the method further includes:
determining a test scene of the screen terminal equipment;
and acquiring a test script preset for the test scene.
Optionally, the obtaining the memory consumption condition of the screen-end device includes:
and monitoring data generated in the process of running the Software Development Kit (SDK) process in the screen terminal equipment by running the test script to obtain the memory consumption condition.
According to another embodiment of the present invention, there is also provided an apparatus for detecting a memory of a device at a screen end, including:
the generating module is used for acquiring the memory consumption condition of the screen terminal equipment and generating a memory curve trend graph according to the memory consumption condition;
the first acquisition module is used for acquiring log information according to the memory curve trend graph;
the memory detection module is used for performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result;
the first determining module is used for determining the type of the memory problem according to the log information when the memory detection result is that the memory problem exists.
Optionally, the memory detection module includes:
the judging sub-module is used for judging whether the memory curve trend graph is in a continuous rising state in a preset time;
the first acquisition sub-module is used for acquiring the log information in the continuous rising period in the memory curve trend graph through a log tracking engine under the condition that the judgment result is yes;
and the determining submodule is used for determining that the memory leakage or the memory exhaustion exists in the screen end device according to the log information.
Optionally, the apparatus further comprises:
the second determining module is used for determining a target solution corresponding to the memory leakage or the memory exhaustion according to a corresponding list of the memory leakage or the memory exhaustion and the solutions stored in advance;
and the sending module is used for sending the memory leakage or the memory exhaustion and the target solution corresponding to the memory leakage or the memory exhaustion to one or more preset target accounts.
Optionally, the generating module includes:
the second acquisition sub-module is used for acquiring the total memory of the screen terminal equipment;
the determining submodule is used for determining a memory occupation ratio according to the memory consumption condition and the total memory;
and the generation submodule is used for generating the memory curve trend graph according to the memory occupation ratio.
Optionally, the apparatus further comprises:
the third determining module is used for determining the testing scene of the screen terminal equipment;
and the second acquisition module is used for acquiring the test script preset for the test scene.
Optionally, the generating module is further configured to
And monitoring data generated in the process of running the Software Development Kit (SDK) process in the screen terminal equipment by running the test script to obtain the memory consumption condition.
According to a further embodiment of the invention, there is also provided a computer-readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the invention, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the invention, the memory consumption condition of the screen terminal equipment is obtained, and a memory curve trend graph is generated according to the memory consumption condition; acquiring log information according to the memory curve trend graph; performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result; under the condition that the memory detection result is that a memory problem exists, the type of the memory problem is determined according to the log information, the problem that in the related technology, whether the equipment has memory leakage or not can only be tested, a detailed tracking log of a development engineer cannot be accurately provided after the memory leakage is found can be solved, the memory consumption condition is monitored, the memory is detected based on the memory consumption condition and the log information, and the tracking log (namely the log information) can be accurately provided after the memory problem is found.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile terminal of a memory detection method of a screen end device according to an embodiment of the present invention;
FIG. 2 is a flowchart of a method for detecting memory in an on-screen device according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a memory test according to an embodiment of the invention;
fig. 4 is a block diagram of an on-screen device memory detection apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the drawings in conjunction with embodiments. It should be noted that, in the case of no conflict, the embodiments and features in the embodiments may be combined with each other.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
Example 1
The method embodiment provided in the first embodiment of the present application may be executed in a mobile terminal, a computer terminal or a similar computing device. Taking a mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal according to an embodiment of the present invention, where, as shown in fig. 1, the mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data, and optionally, the mobile terminal may further include a transmission device 106 for a communication function and an input/output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store computer programs, such as software programs and modules of application software, such as computer programs corresponding to the on-screen device memory detection method in the embodiment of the present invention, and the processor 102 executes the computer programs stored in the memory 104 to perform various functional applications and data processing, that is, implement the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network INterface CoNtroller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio FrequeNcy (RF) module, which is configured to communicate with the internet wirelessly.
Based on the above mobile terminal or network architecture, in this embodiment, a method for detecting a memory of a screen end device is provided, and fig. 2 is a flowchart of a method for detecting a memory of a screen end device according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S202, obtaining the memory consumption condition of the screen terminal equipment, and generating a memory curve trend chart according to the memory consumption condition;
in the embodiment of the present invention, in the step S202, the obtaining the memory consumption condition may specifically include: acquiring the total memory of the screen terminal equipment; determining a memory occupation ratio according to the memory consumption condition and the total memory; and generating the memory curve trend graph according to the memory occupation ratio.
Step S204, acquiring log information according to the memory curve trend graph;
specifically, a part of log information is obtained according to the memory curve trend graph, and specifically, log information in a continuous rising period is obtained, but not all log information is obtained.
Step S206, performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result;
step S208, determining the type of the memory problem according to the log information when the memory detection result is that the memory problem exists.
In the embodiment of the present invention, the memory problem may specifically include memory leakage and memory exhaustion, and the step S208 may specifically include: judging whether the memory curve trend graph is in a continuously rising state in a preset time; if the judgment result is yes, acquiring the log information in the continuous rising period in the memory curve trend graph through a log tracking engine; the memory leakage or the memory exhaustion of the screen end device is determined according to the log information, the current implementation environment and the field information, and further, the memory leakage or the memory exhaustion can be determined according to the log information, the current implementation environment and the field information, wherein the current implementation environment comprises: the acceptance environment, the verification environment and the production environment, and the field information refers to the state of the UI after the memory leaks.
Through the steps S202 to S208, the memory consumption condition of the screen end device is obtained, and a memory curve trend chart is generated according to the memory consumption condition; acquiring log information according to the memory curve trend graph; performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result; under the condition that the memory detection result is that a memory problem exists, the type of the memory problem is determined according to the log information, the problem that in the related technology, whether the equipment has memory leakage or not can only be tested, a detailed tracking log of a development engineer cannot be accurately provided after the memory leakage is found can be solved, the memory consumption condition is monitored, the memory is detected based on the memory consumption condition and the log information, and the tracking log (namely the log information) can be accurately provided after the memory problem is found.
In an optional embodiment, after performing memory detection on the screen end device according to the memory curve trend graph and the log information, determining a target solution corresponding to the memory leak or the memory exhaustion according to a pre-stored corresponding list of memory leak or memory exhaustion and solutions; and sending the memory leakage or the memory exhaustion and the target solution corresponding to the memory leakage or the memory exhaustion to one or more preset target accounts.
In another optional embodiment, before acquiring the memory consumption condition of the screen end device, determining a test scene of the screen end device; and acquiring a test script preset for the test scene. Correspondingly, the step S202 may specifically include: and monitoring data generated in the process of running the Software Development Kit (SDK) process in the screen terminal equipment by running the test script to obtain the memory consumption condition.
The memory test in the embodiment of the invention comprises the following steps: acquiring the current occupation ratio of the memory of the android intelligent screen terminal equipment, repeatedly simulating an automatic test script to trigger the same function of the intelligent screen terminal equipment, and monitoring a memory curve trend graph in real time; and if the memory curve trend graph continuously rises, calling a log tracking engine to record the memory leakage log of the screen end device and generating a memory leakage analysis solution so as to test the memory of the intelligent screen end device. The embodiment of the invention not only can accurately find the memory leakage problem, but also can improve the memory leakage problem solving efficiency and effectively improve the testing efficiency and the BUG analysis efficiency, and specifically comprises the following steps:
step 1, determining a testing scene of intelligent equipment at a screen end;
and evaluating and determining a test scene together with the product, the development and the test according to the SDK requirements and the market feedback. And the test scenes were prioritized as shown in table 1.
TABLE 1
Step 2, the standard of the entry and exit of the test script is formulated and developed as shown in table 2.
TABLE 2
Test script = test data + operation, data configurable, operation is the python, java program.
Step 3, preparing tools and equipment, an Zhuobing intelligent equipment, wiFi module, household appliances and intelligent APP.
The software development kit (Software Development Kit, abbreviated as SDK) is installed on An Zhuobing-end intelligent equipment and intelligent home APP (Application), and the wifi & blue module and the household appliance are dependent equipment. The SDK controls the household appliance, and the internet of things module is connected to the household appliance.
Step 4, fig. 3 is a schematic diagram of a memory test according to an embodiment of the present invention, where, as shown in fig. 3, a Jenkins schedule script execution engine executes a script;
step 5, the memory monitoring engine starts to work, and obtains the active memory and the java memory of the intelligent equipment at the screen end at fixed time and generates a memory curve trend chart;
and 6, checking the phenomenon that the memory trend graph generated by monitoring rises in a straight line in N fixed time stages, if the memory trend graph does not have a descending trend, starting the log tracking engine to work, capturing log information, current implementation environment and field information of the intelligent screen terminal equipment in real time, and analyzing by a memory analysis tool based on the log information, the current implementation environment and the field information to determine memory leakage or memory exhaustion.
And 7, the log tracking engine stores solutions of memory leakage, system breakdown and the like of big data accumulation. If the memory trend graph rises in a straight line in N fixed time phases, the memory leakage or the memory collapse is found, the log is analyzed in time, and a guiding solution is given to a development engineer as a reference for modifying the bug. If there are a large number of garbage objects referenced in the program, a memory leak may occur. If the active memory is exhausted, the program crashes;
and 8, pushing the test result and the related information of the test log tracking to the team member through the mail.
The memory test of the embodiment of the invention can avoid unreleasing the program circulation new object on the android platform; strong references to objects that are no longer in use are avoided.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method according to the embodiments of the present invention.
Example 3
The embodiment also provides a device for detecting the memory of the screen end device, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 4 is a block diagram of an apparatus for detecting a memory of a screen end device according to an embodiment of the present invention, as shown in fig. 4, including:
the generating module 42 is configured to obtain a memory consumption condition of the screen end device, and generate a memory curve trend graph according to the memory consumption condition;
a first obtaining module 44, configured to obtain log information according to the memory curve trend graph;
the memory detection module 46 is configured to perform memory detection on the screen end device according to the memory curve trend graph and the log information, so as to obtain a memory detection result;
the first determining module 48 is configured to determine, according to the log information, a type of the memory problem if the memory detection result indicates that the memory problem exists.
Optionally, the memory detection module 46 includes:
the judging sub-module is used for judging whether the memory curve trend graph is in a continuous rising state in a preset time;
the first acquisition sub-module is used for acquiring the log information in the continuous rising period in the memory curve trend graph through a log tracking engine under the condition that the judgment result is yes;
and the determining submodule is used for determining that the memory leakage or the memory exhaustion exists in the screen end device according to the log information.
Optionally, the apparatus further comprises:
the second determining module is used for determining a target solution corresponding to the memory leakage or the memory exhaustion according to a corresponding list of the memory leakage or the memory exhaustion and the solutions stored in advance;
and the sending module is used for sending the memory leakage or the memory exhaustion and the target solution corresponding to the memory leakage or the memory exhaustion to one or more preset target accounts.
Optionally, the generating module 42 includes:
the second acquisition sub-module is used for acquiring the total memory of the screen terminal equipment;
the determining submodule is used for determining a memory occupation ratio according to the memory consumption condition and the total memory;
and the generation submodule is used for generating the memory curve trend graph according to the memory occupation ratio.
Optionally, the apparatus further comprises:
the third determining module is used for determining the testing scene of the screen terminal equipment;
and the second acquisition module is used for acquiring the test script preset for the test scene.
Optionally, the generating module 42 is further configured to
And monitoring data generated in the process of running the Software Development Kit (SDK) process in the screen terminal equipment by running the test script to obtain the memory consumption condition.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
Example 3
An embodiment of the invention also provides a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described storage medium may be configured to store a computer program for performing the steps of:
s1, acquiring the memory consumption condition of screen terminal equipment, and generating a memory curve trend chart according to the memory consumption condition;
s2, acquiring log information according to the memory curve trend graph;
s3, performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result;
and S4, determining the type of the memory problem according to the log information under the condition that the memory problem exists as the memory detection result.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-ONly Memory (ROM), a random access Memory (RaNdom Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
Example 4
An embodiment of the invention also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Alternatively, in the present embodiment, the above-described processor may be configured to execute the following steps by a computer program:
s1, acquiring the memory consumption condition of screen terminal equipment, and generating a memory curve trend chart according to the memory consumption condition;
s2, acquiring log information according to the memory curve trend graph;
s3, performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result;
and S4, determining the type of the memory problem according to the log information under the condition that the memory problem exists as the memory detection result.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the invention described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may alternatively be implemented in program code executable by computing devices, so that they may be stored in a memory device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps within them may be fabricated into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, but various modifications and variations can be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention should be included in the protection scope of the present invention.
Claims (8)
1. The method for detecting the memory of the screen terminal equipment is characterized by comprising the following steps of:
acquiring the memory consumption condition of the screen terminal equipment, and generating a memory curve trend graph according to the memory consumption condition;
acquiring log information according to the memory curve trend graph;
performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result;
under the condition that the memory detection result is that a memory problem exists, determining the type of the memory problem according to the log information; the performing memory detection on the screen end device according to the memory curve trend graph and the log information includes:
judging whether the memory curve trend graph is in a continuously rising state in a preset time;
if the judgment result is yes, acquiring the log information in the continuous rising period in the memory curve trend graph through a log tracking engine; the log tracking engine is used for logging memory leakage of the screen end equipment and generating a memory leakage analysis solution, or logging memory exhaustion and generating a memory exhaustion analysis solution;
and determining that the memory leakage or the memory exhaustion exists in the screen terminal equipment according to the log information.
2. The method of claim 1, wherein after performing memory detection on the on-screen device according to the memory curve trend graph and the log information, the method further comprises:
determining a target solution corresponding to the memory leakage or the memory exhaustion according to a pre-stored corresponding list of memory leakage or memory exhaustion and solutions;
and sending the memory leakage or the memory exhaustion and the target solution corresponding to the memory leakage or the memory exhaustion to one or more preset target accounts.
3. The method of claim 1, wherein generating the memory profile trend graph from the memory consumption situation comprises:
acquiring the total memory of the screen terminal equipment;
determining a memory occupation ratio according to the memory consumption condition and the total memory;
and generating the memory curve trend graph according to the memory occupation ratio.
4. A method according to any one of claims 1 to 3, wherein prior to obtaining the memory consumption profile of the on-screen device, the method further comprises:
determining a test scene of the screen terminal equipment;
and acquiring a test script preset for the test scene.
5. The method of claim 4, wherein obtaining the memory consumption of the on-screen device comprises:
and monitoring data generated in the process of running the Software Development Kit (SDK) process in the screen terminal equipment by running the test script to obtain the memory consumption condition.
6. The utility model provides a screen end equipment memory detection device which characterized in that includes:
the generating module is used for acquiring the memory consumption condition of the screen terminal equipment and generating a memory curve trend graph according to the memory consumption condition;
the first acquisition module is used for acquiring log information according to the memory curve trend graph;
the memory detection module is used for performing memory detection on the screen terminal equipment according to the memory curve trend graph and the log information to obtain a memory detection result;
the first determining module is used for determining the type of the memory problem according to the log information when the memory detection result is that the memory problem exists;
the memory detection module comprises:
the judging sub-module is used for judging whether the memory curve trend graph is in a continuous rising state in a preset time;
the first acquisition sub-module is used for acquiring the log information in the continuous rising period in the memory curve trend graph through a log tracking engine under the condition that the judgment result is yes; the log tracking engine is used for logging memory leakage of the screen end equipment and generating a memory leakage analysis solution, or logging memory exhaustion and generating a memory exhaustion analysis solution;
and the determining submodule is used for determining that the memory leakage or the memory exhaustion exists in the screen end device according to the log information.
7. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program, wherein the computer program is arranged to execute the method of any of the claims 1 to 5 when run.
8. An electronic device comprising a memory and a processor, characterized in that the memory has stored therein a computer program, the processor being arranged to run the computer program to perform the method of any of the claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110713725.5A CN113434364B (en) | 2021-06-25 | 2021-06-25 | Method and device for detecting memory of screen terminal equipment, storage medium and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110713725.5A CN113434364B (en) | 2021-06-25 | 2021-06-25 | Method and device for detecting memory of screen terminal equipment, storage medium and electronic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113434364A CN113434364A (en) | 2021-09-24 |
CN113434364B true CN113434364B (en) | 2024-03-22 |
Family
ID=77754697
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110713725.5A Active CN113434364B (en) | 2021-06-25 | 2021-06-25 | Method and device for detecting memory of screen terminal equipment, storage medium and electronic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113434364B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115114071A (en) * | 2022-06-30 | 2022-09-27 | 重庆长安汽车股份有限公司 | Memory analysis method, device, equipment and medium |
Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102262582A (en) * | 2010-05-25 | 2011-11-30 | 芯讯通无线科技(上海)有限公司 | Mobile terminal and method for detecting memory leakage thereof |
CN102955719A (en) * | 2011-08-31 | 2013-03-06 | 国际商业机器公司 | Determination method and device of suspected memory leak |
CN103473172A (en) * | 2013-09-05 | 2013-12-25 | 无敌科技(西安)有限公司 | System and method for checking leak of background program memories and positioning leak memory points |
CN104866409A (en) * | 2015-05-29 | 2015-08-26 | 小米科技有限责任公司 | Method and apparatus for monitoring memory leakage |
CN105204996A (en) * | 2015-09-24 | 2015-12-30 | 努比亚技术有限公司 | Memory leak detection device and method and terminal |
CN105224433A (en) * | 2014-06-23 | 2016-01-06 | 阿里巴巴集团控股有限公司 | A kind of internal memory monitoring method and server |
CN106802861A (en) * | 2015-11-26 | 2017-06-06 | 大唐移动通信设备有限公司 | A kind of method and apparatus for detecting RAM leakage |
CN107346285A (en) * | 2017-05-26 | 2017-11-14 | 郑州云海信息技术有限公司 | A kind of method for detecting memory leakage and device |
CN107357656A (en) * | 2017-06-27 | 2017-11-17 | 努比亚技术有限公司 | A kind of memory allocation method, mobile terminal and computer-readable recording medium |
CN107957941A (en) * | 2016-10-17 | 2018-04-24 | 腾讯科技(深圳)有限公司 | Mobile terminal memory overflow treating method and apparatus |
CN108073439A (en) * | 2016-11-11 | 2018-05-25 | 深圳业拓讯通信科技有限公司 | A kind of JVM RAM leakages automatic testing method and system |
CN108845934A (en) * | 2018-05-24 | 2018-11-20 | 深圳市腾讯网络信息技术有限公司 | The localization method and device in memory overflow source, storage medium, electronic device |
CN109101383A (en) * | 2018-08-09 | 2018-12-28 | 郑州云海信息技术有限公司 | A kind of test method and system of memory detection |
CN110210220A (en) * | 2018-07-19 | 2019-09-06 | 腾讯科技(深圳)有限公司 | A kind of information leakage detection method, device and storage medium |
CN110704217A (en) * | 2019-08-27 | 2020-01-17 | 努比亚技术有限公司 | Memory leak detection method, terminal and computer readable storage medium |
CN111274060A (en) * | 2020-02-10 | 2020-06-12 | 广州虎牙科技有限公司 | Method, device, equipment and storage medium for determining memory abnormity |
CN111984541A (en) * | 2020-08-31 | 2020-11-24 | 北京达佳互联信息技术有限公司 | Memory leak detection method and device and terminal |
-
2021
- 2021-06-25 CN CN202110713725.5A patent/CN113434364B/en active Active
Patent Citations (17)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102262582A (en) * | 2010-05-25 | 2011-11-30 | 芯讯通无线科技(上海)有限公司 | Mobile terminal and method for detecting memory leakage thereof |
CN102955719A (en) * | 2011-08-31 | 2013-03-06 | 国际商业机器公司 | Determination method and device of suspected memory leak |
CN103473172A (en) * | 2013-09-05 | 2013-12-25 | 无敌科技(西安)有限公司 | System and method for checking leak of background program memories and positioning leak memory points |
CN105224433A (en) * | 2014-06-23 | 2016-01-06 | 阿里巴巴集团控股有限公司 | A kind of internal memory monitoring method and server |
CN104866409A (en) * | 2015-05-29 | 2015-08-26 | 小米科技有限责任公司 | Method and apparatus for monitoring memory leakage |
CN105204996A (en) * | 2015-09-24 | 2015-12-30 | 努比亚技术有限公司 | Memory leak detection device and method and terminal |
CN106802861A (en) * | 2015-11-26 | 2017-06-06 | 大唐移动通信设备有限公司 | A kind of method and apparatus for detecting RAM leakage |
CN107957941A (en) * | 2016-10-17 | 2018-04-24 | 腾讯科技(深圳)有限公司 | Mobile terminal memory overflow treating method and apparatus |
CN108073439A (en) * | 2016-11-11 | 2018-05-25 | 深圳业拓讯通信科技有限公司 | A kind of JVM RAM leakages automatic testing method and system |
CN107346285A (en) * | 2017-05-26 | 2017-11-14 | 郑州云海信息技术有限公司 | A kind of method for detecting memory leakage and device |
CN107357656A (en) * | 2017-06-27 | 2017-11-17 | 努比亚技术有限公司 | A kind of memory allocation method, mobile terminal and computer-readable recording medium |
CN108845934A (en) * | 2018-05-24 | 2018-11-20 | 深圳市腾讯网络信息技术有限公司 | The localization method and device in memory overflow source, storage medium, electronic device |
CN110210220A (en) * | 2018-07-19 | 2019-09-06 | 腾讯科技(深圳)有限公司 | A kind of information leakage detection method, device and storage medium |
CN109101383A (en) * | 2018-08-09 | 2018-12-28 | 郑州云海信息技术有限公司 | A kind of test method and system of memory detection |
CN110704217A (en) * | 2019-08-27 | 2020-01-17 | 努比亚技术有限公司 | Memory leak detection method, terminal and computer readable storage medium |
CN111274060A (en) * | 2020-02-10 | 2020-06-12 | 广州虎牙科技有限公司 | Method, device, equipment and storage medium for determining memory abnormity |
CN111984541A (en) * | 2020-08-31 | 2020-11-24 | 北京达佳互联信息技术有限公司 | Memory leak detection method and device and terminal |
Non-Patent Citations (2)
Title |
---|
JavaScript中的内存泄漏检测方法研究;孙琳等;《计算机与数字工程》;第43卷(第12期);第2230-2233页 * |
Memory leak detection in android applications based on code patterns;Gayathri Santhanakrishnan et al.;《2016 International Conference on Information Society (i-Society)》;第133-134页 * |
Also Published As
Publication number | Publication date |
---|---|
CN113434364A (en) | 2021-09-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106557424B (en) | Memory test method, tested terminal, test client and system | |
CN107797923B (en) | Code coverage rate analysis method and application server | |
CN104978263A (en) | Mobile terminal application program test method and mobile terminal application program test system | |
JP2015534688A (en) | Application development, compilation, and debugging method and apparatus | |
CN110784879B (en) | Network mode switching test method, system, equipment and medium of communication module | |
CN106886493B (en) | Method and device for establishing automatic test system | |
CN110362460B (en) | Application program performance data processing method, device and storage medium | |
CN110647471A (en) | Interface test case generation method, electronic device and storage medium | |
CN111858113B (en) | Application program repairing method and device, service system and storage medium | |
CN104298602A (en) | Method and device for debugging application program | |
CN105302722A (en) | CTS automatic test method and apparatus | |
CN111258913A (en) | Automatic algorithm testing method and device, computer system and readable storage medium | |
CN113434364B (en) | Method and device for detecting memory of screen terminal equipment, storage medium and electronic device | |
CN113434396A (en) | Interface test method, device, equipment, storage medium and program product | |
CN112269746A (en) | Automatic testing method and related equipment | |
CN106972983B (en) | Automatic testing device and method for network interface | |
CN110750453A (en) | HTML 5-based intelligent mobile terminal testing method, system, server and storage medium | |
CN107094315B (en) | Channel scanning configuration method and device | |
CN115114141A (en) | Method, device and equipment for testing performance of application program and storage medium | |
CN112583617B (en) | Fault determination method, server, control terminal and storage medium | |
CN106951236B (en) | Plug-in development method and device | |
CN111679986B (en) | Software testing method and device and electronic equipment | |
CN113806231A (en) | Code coverage rate analysis method, device, equipment and medium | |
CN114817033A (en) | Product testing method and device for automatic production line, terminal equipment and storage medium | |
CN113110991A (en) | Page element positioning method and device, storage medium and electronic device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |