Information determination method, device and equipment and computer readable storage medium
Through the package management module monitoring and analyzing the running information of the page to be detected, and automatically identifying and outputting specific objects with memory leaks in the web system, solving the problems of low intelligence in the existing technology, unintuitive results and time-consuming and labor-consuming identification, and achieving efficient and intuitive memory leak recognition.
Patent Information
- Application Number
- CN202311076091.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-24
- Publication Date
- 2025-02-28
AI Technical Summary
The existing technology is less intelligent when identifying memory leaks in web systems, but the result is not intuitive and time-consuming enough. It is impossible to automatically monitor the page or whether the operation has caused memory leaks. The developer needs to analyze manually.
The package management module monitors the page to be detected, obtains running information, and automatically determines the target data that has memory leakage based on this information, and outputs specific objects that have memory leakage, rather than complex constructors.
It improves the intelligence and efficiency of obtaining operational information, displays the intuitiveness of the results, and overcomes the problems of low intelligence in identifying memory leaks, unintuitive results, and time-consuming and labor-consuming in the prior art.
Smart Images

Figure CN119537184A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an information determination method, device, equipment and computer-readable storage medium. Background Art
[0002] With the development of Internet technology, the problem of memory leaks in large web systems is becoming more and more serious, so quickly identifying memory leaks in web systems has become the current main task. Generally, the prior art uses a browser method to identify memory leaks in web systems, that is, according to known leak scenarios, combined with development tools (DevTools), while simulating leak scenarios, manually obtaining memory snapshots in different scenarios, and performing comparative analysis on the memory snapshots in different scenarios to obtain the constructor of the memory; however, in the process of implementation, the inventor found that there are at least the following problems in the prior art: only when the memory leak accumulates to a certain extent and causes an abnormality in the web system, the developer is notified, resulting in low intelligence in identifying memory leaks, and only the constructor can be obtained through the browser method, and the developer is required to locate the specific object with memory leaks in the source code of the web system through the constructor and the leak scenario, which is not only not intuitive but also time-consuming and labor-intensive. Summary of the invention
[0003] In order to solve the above-mentioned technical problems, the embodiments of the present application hope to provide an information determination method, device, equipment and computer-readable storage medium, which can solve the problems in the related technology that the intelligence of identifying memory leaks is low, the identification results are not intuitive enough, and it is time-consuming and labor-intensive, thereby improving the intelligence and efficiency of obtaining operation information and improving the intuitiveness of the displayed results.
[0004] The technical solution of this application is implemented as follows:
[0005] A method for determining information, the method comprising:
[0006] Monitor the page to be detected through the package management module, and obtain the operation information generated by the page to be detected during the operation process;
[0007] The target data of the memory leak in the running data of the page to be detected is determined based on the running information through the package management module; wherein the running data is used to generate the page to be detected.
[0008] In the above solution, monitoring the page to be detected by the package management module and obtaining the operation information generated by the page to be detected during the operation process includes:
[0009] Determine a communication channel between a current process corresponding to the page to be detected and a page parsing module in a running application corresponding to the page to be detected;
[0010] The page to be detected is monitored by the monitoring module in the package management module, and the operation information generated by the page to be detected during the operation is obtained through the communication channel based on the monitoring result.
[0011] In the above solution, the communication channel between the current process corresponding to the page to be detected and the page parsing module in the running application corresponding to the page to be detected includes:
[0012] Acquiring, through the package management module, a communication link between the current process and a page parsing module in the running application;
[0013] Based on the communication link, the communication channel between the current process and the page parsing module in the running application is established.
[0014] In the above solution, the step of obtaining the operation information generated by the page to be detected during operation through the communication channel based on the monitoring result includes:
[0015] Encapsulating the communication channel based on the communication link to obtain an encapsulated communication channel;
[0016] Based on the monitoring result, the operation information generated by the page to be detected during the operation is obtained through the encapsulated communication channel.
[0017] In the above solution, based on the monitoring result, obtaining the operation information generated by the page to be detected during operation through the encapsulated communication channel includes:
[0018] Based on the monitoring result, trigger an information acquisition instruction;
[0019] Based on the information acquisition instruction, the operation information is acquired through the encapsulated communication channel.
[0020] In the above solution, triggering the information acquisition instruction based on the monitoring result includes:
[0021] Obtaining a debugging protocol in the running application corresponding to the page to be detected;
[0022] Encapsulating the debugging protocol to obtain an encapsulated debugging protocol;
[0023] Based on the monitoring result, the information acquisition instruction is triggered through the encapsulated debugging protocol.
[0024] In the above solution, the step of determining, by means of the package management module, target data having a memory leak in the running data of the page to be detected based on the running information includes:
[0025] The running information is analyzed by the package management module to obtain a constructor of the page to be detected; wherein the constructor is used to characterize the memory leakage of the page to be detected;
[0026] The target data in the page to be detected is determined based on the attribute information of the constructor through the package management module.
[0027] An information determination device, the device comprising:
[0028] A processing unit, used to monitor the page to be detected through the package management module, and obtain the operation information generated by the page to be detected during the operation process;
[0029] A determination unit is used to determine, through a package management module, target data of memory leakage in the operation data of the page to be detected based on the operation information; wherein the operation data is used to generate the page to be detected.
[0030] An information determination device, the device comprising: a processor, a memory, and a communication bus;
[0031] The communication bus is used to realize the communication connection between the processor and the memory;
[0032] The processor is used to execute the information determination program stored in the memory to implement the steps of the above-mentioned information determination method.
[0033] A computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the above-mentioned information determination method.
[0034] Because the package management module is used to monitor the page to be detected and obtain the running information generated by the page to be detected during the running process, the package management module can automatically monitor the page to be detected and automatically obtain the running information, instead of being unable to automatically monitor the page to be detected as in the related art, which not only improves the intelligence of obtaining the running information but also improves the efficiency of obtaining the running information; then, the package management module is used to determine the target data with memory leaks in the running data of the page to be detected based on the running information, and the running data is used to generate the page to be detected, so that the result output by the package management module is the target data with specific memory leaks, instead of the constructor output as in the related art, which improves the intuitiveness of the displayed results and overcomes the problems in the prior art of low intelligence in identifying memory leaks, unintuitive identification results, and time-consuming and labor-intensive identification. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A flowchart of an information determination method provided in an embodiment of the present application;
[0036] Figure 2 A schematic diagram of a process for determining target data by a package management module in an information determination method provided in an embodiment of the present application;
[0037] Figure 3 A flowchart of another information determination method provided in an embodiment of the present application;
[0038] Figure 4 A flowchart of another information determination method provided in an embodiment of the present application;
[0039] Figure 5 A schematic diagram of modules used in an information determination method provided in an embodiment of the present application;
[0040] Figure 6 A schematic diagram of the structure of an information determination device provided in an embodiment of the present application;
[0041] Figure 7 A schematic diagram of the structure of an information determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0043] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] Memory leak is a kind of resource leak in computer science. It occurs in various computer programs, including web systems. However, since most web systems run in browsers, browsers are good at clearing pages that occupy too much memory, and browsers have the feature of accessing web systems on a use-as-you-go basis (that is, after closing a page in the web system, the memory corresponding to the page is immediately released). Therefore, in most web systems, there is no bad experience for users due to memory leaks.
[0045] However, with the development of e-commerce and the Internet in recent years, more and more complex and large-scale web systems have been born. As a result, users' access depth and access persistence to complex and large-scale web systems have also increased. Therefore, the performance requirements for web systems have become higher and higher. If there is a problem of increasing memory usage due to memory leaks in complex and large-scale web systems, it will affect the performance of the web system at the least, and even cause the web system to crash. Therefore, identifying memory leaks in complex and large-scale web systems has become one of the main tasks at present.
[0046] Currently, there are two methods to identify memory leaks: browser method and command line method. The browser method is to use browser tools to identify memory leaks, and the most common browser tool is to use the developer tools (DevTools) in Google Chrome to identify memory leaks. Specifically, select the "Heap snapshot" tool in the "Memory" tab in DevTools (it should be noted that the Heap snapshot tool allows memory capture of the main thread / webworkers / iframe), and then click the "Take snapshot" button to capture specific JavaScript on the web system. A memory snapshot of all active objects in the VM (it should be noted that a memory snapshot can represent a frozen moment of all memory used by all active objects in a web page), including objects referenced by window, objects referenced by setInterval callbacks, etc.; afterwards, developers can reproduce scenarios where they think there may be memory leaks based on their experience. For example, after opening a modal dialog box and then closing it, a memory snapshot can be obtained and compared with the previous memory snapshot (i.e., the initial memory snapshot of the modal dialog box) (i.e., while simulating a memory leak scenario, manually obtaining memory snapshots at different stages and comparing them); then, a leak constructor is output based on the comparison result, and developers can locate specific leaking objects (programs, variables, or functions) in the source code corresponding to the web system through the leak constructor and the leak scenario.
[0047] Among them, the command line method is to use the process.memoryUsage method provided by Node. Specifically, process.memoryUsage can return an object, and the returned object contains the memory usage information of the Node process. The object includes four fields: resident set size (rss), heapTotal, heapUsed, and external. The specific leaked object (program, variable or function) in the web system is mainly determined by heapUsed; it should be noted that the rss of the four fields contained in the object represents the memory occupied by the instruction area and stack, heapTotal represents the memory occupied by the "heap", including the memory occupied by the used "heap" and the memory occupied by the unused "heap", heapUsed represents the memory occupied by the used "heap", and external represents the memory occupied by the C++ object inside the engine (V8), and the units of the four fields are all bytes.
[0048] However, the browser method and the command line method, firstly, in the scenario of memory leak in the web system, cannot automatically monitor whether the page or operation generates memory leak. Only when the memory leak accumulates to a certain extent and causes the page to be abnormal can it be used as a signal to notify the developer. In some web systems, there are even exceptions caused by memory leaks. Users think that it is a network problem or a browser problem, which causes the developer to be unable to find the problem in the web system and unable to optimize the web system in the memory dimension. Secondly, the existing methods cannot accurately identify the object of memory leak, and the developer needs to rely on his own experience. Thirdly, the analysis time of the existing methods is long and the analysis efficiency is low. Fourthly, the output result (i.e., the constructor) of the existing method is not intuitive enough, and the developer needs to analyze and interpret it by himself. Moreover, it is not very easy to locate the specific object with memory leak through the constructor in a large and complex web system.
[0049] In summary, the cost of the analysis scheme for identifying memory leak objects in large and complex web systems in the existing methods is high, that is, developers need to spend a lot of time and energy to analyze and solve the memory leak problem, which is a constraint on rapid iteration and development; therefore, the present application provides a method for identifying memory leak objects, which can output specific objects with memory leaks in large and complex web systems in just a few minutes.
[0050] The present application embodiment provides an information determination method, which can be applied to an information determination device, referring to Figure 1 and Figure 2 As shown, the method comprises the following steps:
[0051] Step 101: monitor the page to be detected through the package management module, and obtain the operation information generated by the page to be detected during the operation process.
[0052] In an embodiment of the present application, the page to be detected may refer to a page in a web system, and one web system may correspond to multiple pages to be detected; the package management module may be used to manage various software packages; and the operation information refers to the information generated by the page to be detected during operation.
[0053] In an embodiment of the present application, before monitoring the page to be detected, it is necessary to manually introduce a package management module, and a monitoring module is provided in the package management module. Afterwards, the page to be detected can be automatically monitored by the monitoring module in the package management module. Specifically, the page to be detected can be monitored by monitoring the route, or by monitoring the click event. Afterwards, the running information generated by the page to be detected at different stages of the running process can be automatically obtained through the package management module (that is, the heap snapshot information of different stages is automatically collected). In this way, automatic monitoring and automatic collection of running information can be achieved.
[0054] In a feasible implementation, the package management module may refer to the Npm package, the package management module may refer to the yarn package, the package management module may refer to the Bower package, and of course, the package management module may also refer to other software packages; the running information may refer to the snapshot information; it should be noted that the Npm package is the standard package manager of Node.js, which manages the downloading of project dependencies.
[0055] Step 102: Determine, through the package management module, target data with memory leaks in the running data of the page to be detected based on the running information.
[0056] The operation data is used to generate the page to be detected.
[0057] In an embodiment of the present application, the running data refers to the data that generates the page to be detected, which may be a program that generates the page to be detected; the target data with the memory leak may be a program with the memory leak, a variable with the memory leak, or a function with the memory leak; the package management module may analyze the acquired running information at different stages, obtain a constructor about the memory leak of the page to be detected, and then determine the target data with the memory leak in the page to be detected according to the constructor of the page to be detected, and then output the target data with the memory leak (i.e., the program, variable or function). In this way, what is finally output is the specific program, variable or function with the memory leak, rather than a complex constructor, thereby improving the intuitiveness of the output result.
[0058] The information determination method provided in the embodiment of the present application can automatically monitor the page to be detected and automatically obtain the operation information through the package management module, instead of being unable to automatically monitor the page to be detected as in the related art. The result output by the package management module is the target data where the memory leak exists, instead of outputting the constructor as in the related art, which improves the intelligence and efficiency of obtaining the operation information and improves the intuitiveness of the displayed results.
[0059] Based on the above embodiments, the present application provides an information determination method, referring to Figure 3 As shown, the method comprises the following steps:
[0060] Step 201: The information determination device determines a communication channel between a current process corresponding to a page to be detected and a page parsing module in a running application corresponding to the page to be detected.
[0061] Among them, the running application may refer to an application that runs the page to be detected, that is, the page to be detected may run in the running application, the running application may include a page parsing module, the page parsing module may be used to render the page to be detected, and the same page to be detected may have different rendering effects in different page parsing modules; the communication channel may be used as a channel for data transmission between the client where the current process is located and the page parsing module in the running application corresponding to the page to be detected.
[0062] In an embodiment of the present application, the communication channel between the current process corresponding to the page to be detected and the page parsing module in the running application corresponding to the page to be detected can be determined based on the communication link between the current process corresponding to the page to be detected and the page parsing module in the running application corresponding to the page to be detected; in a feasible implementation method, the running application can refer to a browser, and when the running application specifically refers to Google Chrome, the page parsing module can refer to the Chromium kernel, and the communication channel can refer to the websocket channel.
[0063] It should be noted that step 201 can be implemented in the following ways:
[0064] Step 201a1: The information determination device obtains the communication link between the current process and the page parsing module in the running application through the package management module.
[0065] In a feasible implementation, after the package management module is introduced, when the web system is opened in the Chrome browser (i.e., the web system starts running), the communication link between the current process and the browser kernel can be obtained by modifying the startup configuration of the Chrome browser, and the communication link can refer to the websocket protocol.
[0066] Step 201a2: The information determination device establishes a communication channel between the current process and the page parsing module in the running application based on the communication link.
[0067] In an embodiment of the present application, the information determination device sends a request message to the server through the terminal, and the server sends response information to the request message. When the response information indicates that the request is successful, a communication channel is established between the current process and the page parsing module in the running application, and communication can be carried out through the communication channel.
[0068] Step 202: The information determination device monitors the page to be detected through the monitoring module in the package management module, and obtains the operation information generated by the page to be detected during the operation process through the communication channel based on the monitoring result.
[0069] In an embodiment of the present application, the monitoring module can be used to monitor the page to be detected; when the page to be detected is monitored by monitoring the route through the monitoring module (i.e., route monitoring), the monitoring result may refer to whether the monitored route has changed; when the page to be detected is monitored by monitoring the click event through the monitoring module (i.e., click event monitoring), the monitoring result may refer to whether a click operation is detected; then, the information acquisition instruction can be triggered according to whether the route has changed or whether the click operation is detected, and then the operation information of the page to be detected during the operation process is obtained through the communication channel based on the information acquisition instruction.
[0070] It should be noted that step 202 can be implemented in the following ways:
[0071] Step 202b1: The information determination device encapsulates the communication channel based on the communication link to obtain an encapsulated communication channel.
[0072] In the embodiment of the present application, the communication channel can be encapsulated by code to obtain the encapsulated communication channel.
[0073] Step 202b2: Based on the monitoring result, the information determining device obtains the operation information generated by the page to be detected during operation through the encapsulated communication channel.
[0074] In an embodiment of the present application, in the case of monitoring the route to be detected by the monitoring module, when the route change is monitored, the running information of the page to be detected during the running process is obtained based on the information acquisition instruction; in the case of monitoring the click event to be detected by the monitoring module (i.e. event click monitoring), when a click action is monitored, the running information of the page to be detected during the running process is obtained based on the information acquisition instruction.
[0075] Step 203: The information determination device analyzes the operation information through the package management module to obtain the constructor of the page to be detected.
[0076] The constructor is used to characterize the memory leak of the page to be detected.
[0077] In the embodiment of the present application, the obtained operation information of different stages is compared through the package management module, and then a constructor for the memory leak of the page to be detected is obtained.
[0078] Step 204: The information determination device determines the target data in the page to be detected based on the attribute information of the constructor through the package management module.
[0079] Among them, the attribute information of the constructor may refer to the size of the constructor and the percentage occupied by the constructor; the package management module may automatically output a detailed memory leak report based on the size of the constructor and the percentage occupied by the constructor, and the memory leak report intuitively describes the target data where the memory leak exists, so that the program, function or variable where the memory leak exists may be intuitively determined.
[0080] The information determination method provided in the embodiment of the present application can automatically monitor the page to be detected and automatically obtain the operation information through the package management module, instead of being unable to automatically monitor the page to be detected as in the related art. The result output by the package management module is the target data where the memory leak exists, instead of outputting the constructor as in the related art, which improves the intelligence and efficiency of obtaining the operation information and improves the intuitiveness of the displayed results.
[0081] Based on the above embodiments, the present application provides an information determination method, referring to Figure 4 As shown, the method comprises the following steps:
[0082] Step 301: The information determination device obtains the communication link between the current process and the page parsing module in the running application through the package management module.
[0083] Step 302: The information determination device establishes a communication channel between the current process and the page parsing module in the running application based on the communication link.
[0084] Step 303: The information determination device encapsulates the communication channel based on the communication link to obtain an encapsulated communication channel.
[0085] Step 304: trigger an information acquisition instruction based on the monitoring result.
[0086] The information acquisition instruction is used to obtain the operation information corresponding to the page to be detected.
[0087] In an embodiment of the present application, when the page to be detected is monitored by monitoring the route through the monitoring module, when the monitoring result indicates that the route change is monitored, the information acquisition instruction can be immediately triggered; when the page to be detected is monitored by monitoring the click event through the monitoring module (i.e. event click monitoring), when the monitoring result indicates that a click action is monitored, the information acquisition instruction can be immediately triggered.
[0088] In a feasible implementation, the information acquisition instruction may refer to a garbage collector (Garbage Collection, GC); the running information may refer to snapshot information.
[0089] It should be noted that step 304 can be implemented in the following ways:
[0090] Step 304c1: The information determination device obtains the debugging protocol in the running application corresponding to the page to be detected.
[0091] In an embodiment of the present application, the debugging protocol can be used to detect, inspect, debug and analyze the running application corresponding to the page to be detected; the running application can provide the debugging protocol, so the debugging protocol can be obtained directly from the running application corresponding to the page to be monitored; in a feasible implementation method, when the running application refers to Chrome, the debugging protocol can refer to the Chrome Devtools protocol.
[0092] Step 304c2: The information determining device encapsulates the debugging protocol to obtain an encapsulated debugging protocol.
[0093] In the embodiment of the present application, the debugging protocol can be encapsulated by a program to obtain the encapsulated debugging protocol.
[0094] Step 304c3: The information determination device triggers an information acquisition instruction through the encapsulated debugging protocol based on the monitoring result.
[0095] In a feasible implementation, when the running application is Chrome, when the page to be detected is monitored by listening to the route through the monitoring module, when the monitoring result indicates that the route change is monitored, the information acquisition instruction can be automatically triggered through the encapsulated Chrome Devtools protocol; when the page to be detected is monitored by listening to the click event through the monitoring module (i.e., event click monitoring), when the monitoring result indicates that a click action is monitored, the information acquisition instruction can be automatically triggered through the encapsulated Chrome Devtools protocol; in this way, the information acquisition instruction can be automatically triggered without manually triggering the information acquisition instruction, thereby improving the intelligence and efficiency of obtaining operation information.
[0096] Step 305: The information determination device obtains the operation information through the encapsulated communication channel based on the information acquisition instruction.
[0097] In the embodiment of the present application, the monitoring route is taken as an example for explanation. Under route A, the first operation information (i.e., the first memory snapshot) is obtained through the encapsulated communication channel based on the information acquisition instruction. When the route A is switched to the route B and then switched back to the route A, the second operation information (i.e., the second memory snapshot) is obtained through the encapsulated communication channel based on the information acquisition instruction.
[0098] Step 306: The information determination device analyzes the operation information through the package management module to obtain the constructor of the page to be detected.
[0099] The constructor is used to characterize the memory leak of the page to be detected.
[0100] Step 307: The information determination device determines the target data in the page to be detected based on the attribute information of the constructor through the package management module.
[0101] In other embodiments of the present application, the specific module for determining the target data can refer to Figure 5 As shown, it specifically includes a terminal, a running environment, an Nmp package and an output module, wherein the terminal includes a custom browser startup module and a communication link acquisition module, and specifically, the specified command can be input through the terminal to start the running application (i.e., the browser), and in this process, the communication link (websocket link) for the current web page process to communicate with the Chromium kernel will be obtained by modifying the browser startup configuration; the running environment may include a Chromium kernel browser environment module and a customized kernel browser environment module, which depends on the Chromium kernel browser environment on the web side and on the mobile side H5 / applet depends on the customized kernel browser environment; the nmp package includes a communication link encapsulation module (i.e., a websocket encapsulation module), a debugging protocol encapsulation module (i.e., a Chrome Devtools protocol encapsulation module), a monitoring module, a trigger module (i.e., a GC trigger), an operation information acquisition module (i.e., an heap snapshot information acquisition module) and an operation information analysis module (i.e., a heap snapshot information comparison module).
[0102] The information determination method provided in the embodiment of the present application can automatically monitor the page to be detected and automatically obtain the operation information through the package management module, instead of being unable to automatically monitor the page to be detected as in the related art. The result output by the package management module is the target data where the memory leak exists, instead of outputting the constructor as in the related art, which improves the intelligence and efficiency of obtaining the operation information and improves the intuitiveness of the displayed results.
[0103] Based on the above embodiments, the embodiments of the present application provide an information determination device, which can be applied to Figure 1 , 3 In the information determination method provided in the embodiment corresponding to 4, refer to Figure 6 As shown, the information determination device 4 may include: a processing unit 41 and a determination unit 42, wherein:
[0104] The processing unit 41 is used to monitor the page to be detected through the package management module and obtain the operation information generated by the page to be detected during the operation process;
[0105] The determination unit 42 is used to determine, through the package management module, target data with memory leaks in the operation data of the page to be detected based on the operation information; wherein the operation data is used to generate the page to be detected.
[0106] In the embodiment of the present application, the processing unit 41 is further configured to perform the following steps:
[0107] Determine a communication channel between the current process corresponding to the page to be detected and a page parsing module in the running application corresponding to the page to be detected;
[0108] The page to be detected is monitored through the monitoring module in the package management module, and based on the monitoring result, the operation information generated by the page to be detected during the operation is obtained through the communication channel.
[0109] In the embodiment of the present application, the processing unit 41 is further configured to perform the following steps:
[0110] Obtain the communication link between the current process and the page parsing module in the running application through the package management module;
[0111] Based on the communication link, a communication channel is established between the current process and the page parsing module in the running application.
[0112] In the embodiment of the present application, the processing unit 41 is further configured to perform the following steps:
[0113] Encapsulating the communication channel based on the communication link to obtain an encapsulated communication channel;
[0114] Based on the monitoring results, the operation information generated by the page to be detected during its operation is obtained through the encapsulated communication channel.
[0115] In the embodiment of the present application, the processing unit 41 is further configured to perform the following steps:
[0116] Based on the monitoring results, trigger information acquisition instructions;
[0117] Based on the information acquisition instruction, the operation information is obtained through the encapsulated communication channel.
[0118] In the embodiment of the present application, the processing unit 41 is further configured to perform the following steps:
[0119] Get the debugging protocol in the running application corresponding to the page to be detected;
[0120] Encapsulating the debugging protocol to obtain an encapsulated debugging protocol;
[0121] Based on the monitoring results, the information acquisition instruction is triggered through the encapsulated debugging protocol.
[0122] In the embodiment of the present application, the determining unit 42 is further configured to perform the following steps:
[0123] The running information is analyzed through the package management module to obtain the constructor of the page to be detected; wherein the constructor is used to characterize the memory leakage of the page to be detected;
[0124] The target data in the page to be detected is determined based on the attribute information of the constructor through the package management module.
[0125] It should be noted that the specific implementation process of the steps performed by each unit in this embodiment can be referred to Figure 1 , 3 The implementation process of the information determination method provided in the embodiment corresponding to 4 will not be repeated here.
[0126] The information determination device provided in the embodiment of the present application can automatically monitor the page to be detected and automatically obtain the operation information through the package management module, instead of being unable to automatically monitor the page to be detected as in the related art, and the result output by the package management module is the target data where the memory leak exists, instead of outputting the constructor as in the related art, thereby improving the intelligence and efficiency of obtaining the operation information and improving the intuitiveness of the displayed results.
[0127] Based on the above embodiments, the embodiments of the present application provide an information determination device, which can be applied to Figure 1 , 3 The information determination method provided in the embodiment corresponding to 4 is referred to Figure 7 As shown, the information determination device 5 may include a processor 51, a memory 52 and a communication bus 53;
[0128] The communication bus 53 is used to realize the communication connection between the processor 51 and the memory 52;
[0129] The processor 51 is used to execute the information determination program stored in the memory 52 to implement the following steps:
[0130] Monitor the page to be detected through the package management module and obtain the operation information generated by the page to be detected during the operation process;
[0131] Through the package management module, target data with memory leakage in the running data of the page to be detected is determined based on the running information; wherein the running data is used to generate the page to be detected.
[0132] In other embodiments of the present application, the processor 51 is used to execute the memory 52 to monitor the page to be detected through the package management module, and obtain the operation information generated by the page to be detected during the operation process, so as to implement the following steps:
[0133] Determine a communication channel between the current process corresponding to the page to be detected and a page parsing module in the running application corresponding to the page to be detected;
[0134] The page to be detected is monitored through the monitoring module in the package management module, and based on the monitoring result, the operation information generated by the page to be detected during the operation is obtained through the communication channel.
[0135] In other embodiments of the present application, the processor 51 is used to execute the communication channel between the current process corresponding to the page to be detected in the memory 52 and the page parsing module in the running application corresponding to the page to be detected, so as to implement the following steps:
[0136] Obtain the communication link between the current process and the page parsing module in the running application through the package management module;
[0137] Based on the communication link, a communication channel is established between the current process and the page parsing module in the running application.
[0138] In other embodiments of the present application, the processor 51 is used to execute the memory 52 to obtain the operation information generated by the page to be detected during the operation process through the communication channel based on the monitoring result, so as to implement the following steps:
[0139] Encapsulating the communication channel based on the communication link to obtain an encapsulated communication channel;
[0140] Based on the monitoring results, the operation information generated by the page to be detected during its operation is obtained through the encapsulated communication channel.
[0141] In other embodiments of the present application, the processor 51 is used to execute the memory 52 based on the monitoring result, and obtain the operation information generated by the page to be detected during the operation process through the encapsulated communication channel to implement the following steps:
[0142] Based on the monitoring results, trigger information acquisition instructions;
[0143] Based on the information acquisition instruction, the operation information is obtained through the encapsulated communication channel.
[0144] In other embodiments of the present application, the processor 51 is used to execute the information acquisition instruction based on the monitoring result in the memory 52 to implement the following steps:
[0145] Get the debugging protocol in the running application corresponding to the page to be detected;
[0146] Encapsulating the debugging protocol to obtain an encapsulated debugging protocol;
[0147] Based on the monitoring results, the information acquisition instruction is triggered through the encapsulated debugging protocol.
[0148] In other embodiments of the present application, the processor 51 is used to execute the package management module in the memory 52, and determine the target data with memory leakage in the running data of the page to be detected based on the running information, so as to implement the following steps:
[0149] The running information is analyzed through the package management module to obtain the constructor of the page to be detected; wherein the constructor is used to characterize the memory leakage of the page to be detected;
[0150] The target data in the page to be detected is determined based on the attribute information of the constructor through the package management module.
[0151] It should be noted that the specific implementation process of the steps executed by the processor in this embodiment can refer to Figure 1 , 3 The implementation process of the information determination method provided in the embodiment corresponding to 4 will not be repeated here.
[0152] The information determination device provided in the embodiment of the present application can automatically monitor the page to be detected through the package management module and automatically obtain the operation information, instead of being unable to automatically monitor the page to be detected as in the related art, and the result output by the package management module is the target data where the memory leak exists, instead of outputting the constructor as in the related art, thereby improving the intelligence and efficiency of obtaining the operation information and improving the intuitiveness of the displayed results.
[0153] Based on the foregoing embodiments, the embodiments of the present application provide a computer-readable storage medium, which stores one or more programs, and the one or more programs can be executed by one or more processors to implement Figure 1 , 3 and 4 corresponding to the steps in the information determination method provided in the embodiment.
[0154] It should be noted that the above-mentioned computer-readable storage medium can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory (Flash Memory), a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM) and other memories; it can also be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
[0155] It should be noted that, in this article, the terms "include", "comprises" or any other variations 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, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0156] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0158] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0159] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0160] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0161] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for determining information, characterized in that: The method comprises: Monitor the page to be detected through the package management module, and obtain the operation information generated by the page to be detected during the operation process; The target data of the memory leak in the running data of the page to be detected is determined based on the running information through the package management module; wherein the running data is used to generate the page to be detected.
2. The method according to claim 1, characterized in that The step of monitoring the page to be detected by means of a package management module and obtaining operation information generated by the page to be detected during operation includes: Determine a communication channel between a current process corresponding to the page to be detected and a page parsing module in a running application corresponding to the page to be detected; The page to be detected is monitored by the monitoring module in the package management module, and the operation information generated by the page to be detected during the operation is obtained through the communication channel based on the monitoring result.
3. The method according to claim 2, characterized in that The determining of the communication channel between the current process corresponding to the page to be detected and the page parsing module in the running application corresponding to the page to be detected includes: Acquiring, through the package management module, a communication link between the current process and a page parsing module in the running application; Based on the communication link, the communication channel between the current process and the page parsing module in the running application is established.
4. The method according to claim 2, characterized in that: The obtaining, through the communication channel, the operation information generated by the page to be detected during operation based on the monitoring result includes: Encapsulating the communication channel based on the communication link to obtain an encapsulated communication channel; Based on the monitoring result, the operation information generated by the page to be detected during the operation is obtained through the encapsulated communication channel.
5. The method according to claim 4, characterized in that The obtaining, based on the monitoring result, operation information generated by the to-be-detected page during operation through the encapsulated communication channel includes: Based on the monitoring result, trigger an information acquisition instruction; Based on the information acquisition instruction, the operation information is acquired through the encapsulated communication channel.
6. The method according to claim 5, characterized in that The triggering of the information acquisition instruction based on the monitoring result includes: Obtaining a debugging protocol in the running application corresponding to the page to be detected; Encapsulating the debugging protocol to obtain an encapsulated debugging protocol; Based on the monitoring result, the information acquisition instruction is triggered through the encapsulated debugging protocol.
7. The method according to claim 1, characterized in that The step of determining, by means of the package management module, target data having a memory leak in the running data of the to-be-detected page based on the running information includes: The running information is analyzed by the package management module to obtain a constructor of the page to be detected; wherein the constructor is used to characterize the memory leakage of the page to be detected; The target data in the page to be detected is determined based on the attribute information of the constructor through the package management module.
8. An information determination device, characterized in that: The device comprises: A processing unit, used to monitor the page to be detected through the package management module, and obtain the operation information generated by the page to be detected during the operation process; A determination unit is used to determine, through a package management module, target data of memory leakage in the operation data of the page to be detected based on the operation information; wherein the operation data is used to generate the page to be detected.
9. An information determination device, characterized in that The device comprises: a processor, a memory and a communication bus; The communication bus is used to realize the communication connection between the processor and the memory; The processor is used to execute the information determination program stored in the memory to implement the steps of the information determination method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the information determination method according to any one of claims 1 to 7.