CN113688048A - Application stability detection method and device, electronic equipment and storage medium - Google Patents

Application stability detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113688048A
CN113688048A CN202110998536.7A CN202110998536A CN113688048A CN 113688048 A CN113688048 A CN 113688048A CN 202110998536 A CN202110998536 A CN 202110998536A CN 113688048 A CN113688048 A CN 113688048A
Authority
CN
China
Prior art keywords
information
module
function
storage space
target application
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.)
Granted
Application number
CN202110998536.7A
Other languages
Chinese (zh)
Other versions
CN113688048B (en
Inventor
朴英敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202110998536.7A priority Critical patent/CN113688048B/en
Publication of CN113688048A publication Critical patent/CN113688048A/en
Application granted granted Critical
Publication of CN113688048B publication Critical patent/CN113688048B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/362Software debugging
    • G06F11/3644Software debugging by instrumenting at runtime
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The utility model provides an application stability detection method, device, electronic equipment and storage medium, can carry out stability detection to it in the in-process of application operation, to the thread local memory space of using, through taking over function call interface, can obtain module information and save through the loading address when function module calls function call interface, thereby realize fixing a position the abnormal condition in the in-process that detects application stability, can accurately analyze out the part that has the operation anomaly, help making timely countermeasure to the abnormal condition, guarantee the validity and the flexibility of application stability detection, reduce the possibility of application collapse, be favorable to improving the stability of using.

Description

Application stability detection method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to an application stability detection method and apparatus, an electronic device, and a storage medium.
Background
Currently, with the development of computer technology, during the actual operation of an application program, the application thread local storage space stores the related data generated during the operation process. Each application program entering operation is an independent process, a thread is an execution unit of the process, and a thread local storage is a storage space for storing data related to each thread. The storage of the associated data is allocated at the beginning of the thread and recycled at the end of the thread, each thread having its own instance of the data. In the thread space, the system reserves a certain space for each thread, and the space is used for storing the thread local variables required by the system and the running of the application program.
In the application running process, especially in the application debugging and testing stage, due to the problems of the bottom layer code or the problems occurring in the running link, the situation that the thread repeatedly calls the variables can occur, and for the thread local storage, the size of the thread local storage is fixed, the thread local storage is invalid and occupied due to the repeated calling of the thread local variables, new thread local variables cannot be continuously applied and stored, so that the program logic is difficult to correctly execute, the program can even be crashed, and the stability of the program is reduced.
Disclosure of Invention
The embodiment of the disclosure at least provides an application stability detection method and device, electronic equipment and a storage medium.
The embodiment of the disclosure provides an application stability detection method, which comprises the following steps:
when a target application is started and the target application meets a stability detection condition, taking over a first function call interface for adding function identification information in key mapping of the target application;
under the condition that a first function module calls the first function calling interface, determining module information of the function module;
storing the module information in a pre-applied storage space;
and when the information storage amount of the storage space exceeds a first preset information threshold value, sending the plurality of module information stored in the storage space to a server.
In an optional embodiment, before the first function call interface for adding function identification information to the key map of the target application is taken over in a case where the target application is currently started and meets a stability detection condition, the method includes:
the target application records the storage quantity of the function identification information in the key mapping in real time in the running process before the current start;
when the storage quantity exceeds a second preset information threshold value, sending abnormal operation information of the target application to the server;
when a stability detection instruction fed back by the server is received, determining that the target application meets a stability detection condition, wherein the stability detection instruction is an instruction sent by the server after the server receives abnormal operation information sent by a plurality of terminals and the number of the terminals exceeds a preset number.
In an optional embodiment, the determining module information of the function module in the case that it is detected that the first function module calls the first function call interface includes:
under the condition that a first function module calls the first function calling interface, acquiring a loading address corresponding to the position of the function module;
based on the loading address, backtracking to obtain a dynamic library corresponding to the loading address;
and determining dynamic library name information of the dynamic library and function name information corresponding to the loading address, wherein the module information comprises the dynamic library name information and the function name information.
In an optional embodiment, before the storing the module information in the pre-application storage space, the method includes:
and applying for a storage space for storing the module information in the running environment of the target application, wherein the storage space has the same storage size as the key map, and the storage space comprises a plurality of subspaces corresponding to a plurality of storage positions in the key map.
In an optional embodiment, the storing the module information in a pre-application storage space includes:
and storing the module information in a subspace corresponding to the storage position where the function identification information is stored in the storage space.
In an optional embodiment, before sending the plurality of module information stored in the storage space to a server when the information storage amount of the storage space exceeds a first preset information threshold, the method includes:
taking over a second function interface for deleting function identification information in the key mapping of the target application under the condition that the target application is started and meets the stability detection condition;
and deleting the module information which corresponds to the second function interface and is stored in the storage space under the condition that the second function module calls the second function interface is detected.
In an optional embodiment, after the sending of the plurality of module information stored in the storage space to the server when the information storage amount of the storage space exceeds a first preset information threshold, the method includes:
under the condition that a repair file aiming at the target application and sent by a server is received, updating the target application based on the repair file;
traversing the storage space and screening out repeated module information under the condition that the repair file sent by the server is not received; and deleting the function identification information corresponding to the repeated module information in the key mapping, and reserving the function identification information written last in the time dimension.
The embodiment of the present disclosure further provides an application stability detection apparatus, the apparatus includes:
the interface takeover module is used for taking over a first function call interface used for adding function identification information in key mapping of the target application under the condition that the target application is started and meets a stability detection condition;
the information determining module is used for determining module information of the functional module under the condition that a first functional module calls the first function calling interface;
the information storage module is used for storing the module information in a storage space which is applied in advance;
and the information sending module is used for sending the plurality of module information stored in the storage space to a server when the information storage amount of the storage space exceeds a first preset information threshold value.
In an optional implementation manner, the apparatus further includes an application recording module, and the application recording module is configured to:
the target application records the storage quantity of the function identification information in the key mapping in real time in the running process before the current start;
when the storage quantity exceeds a second preset information threshold value, sending abnormal operation information of the target application to the server;
when a stability detection instruction fed back by the server is received, determining that the target application meets a stability detection condition, wherein the stability detection instruction is an instruction sent by the server after the server receives abnormal operation information sent by a plurality of terminals and the number of the terminals exceeds a preset number.
In an optional implementation manner, the information determining module is specifically configured to:
under the condition that a first function module calls the first function calling interface, acquiring a loading address corresponding to the position of the function module;
based on the loading address, backtracking to obtain a dynamic library corresponding to the loading address;
and determining dynamic library name information of the dynamic library and function name information corresponding to the loading address, wherein the module information comprises the dynamic library name information and the function name information.
In an alternative embodiment, the apparatus further comprises a space application module configured to:
and applying for a storage space for storing the module information in the running environment of the target application, wherein the storage space has the same storage size as the key map, and the storage space comprises a plurality of subspaces corresponding to a plurality of storage positions in the key map.
In an optional implementation manner, the information storage module is specifically configured to:
and storing the module information in a subspace corresponding to the storage position where the function identification information is stored in the storage space.
In an optional implementation manner, the apparatus further includes an information deleting module, where the information deleting module is configured to:
taking over a second function interface for deleting function identification information in the key mapping of the target application under the condition that the target application is started and meets the stability detection condition;
and deleting the module information which corresponds to the second function interface and is stored in the storage space under the condition that the second function module calls the second function interface is detected.
In an optional embodiment, the apparatus further comprises an application update module, and the application update module is configured to:
under the condition that a repair file aiming at the target application and sent by a server is received, updating the target application based on the repair file;
traversing the storage space and screening out repeated module information under the condition that the repair file sent by the server is not received; and deleting the function identification information corresponding to the repeated module information in the key mapping, and reserving the function identification information written last in the time dimension.
An embodiment of the present disclosure further provides an electronic device, including: the device comprises a processor, a memory and a bus, wherein the memory stores machine readable instructions executable by the processor, the processor and the memory are communicated through the bus when the electronic device runs, and the machine readable instructions are executed by the processor to execute the steps of the application stability detection method.
The embodiment of the present disclosure further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned application stability detection method are executed.
According to the application stability detection method, the application stability detection device, the electronic equipment and the storage medium, when a target application is started and meets a stability detection condition, a first function call interface for adding function identification information in key mapping of the target application is taken over; under the condition that a first function module calls the first function calling interface, determining module information of the function module; storing the module information in a pre-applied storage space; and when the information storage amount of the storage space exceeds a first preset information threshold value, sending the plurality of module information stored in the storage space to a server.
Therefore, stability detection is carried out on the application in the running process, a function calling interface is taken over aiming at the thread local storage space of the application, module information can be obtained and stored through a loading address when the function calling interface is called by a function module, not only can the stability detection of the application be effectively realized, but also the abnormal situation can be positioned in the stability detection process, the part with running abnormity can be accurately analyzed, timely countermeasures can be made for the abnormal situation, the effectiveness and flexibility of the application stability detection are ensured, the possibility of application crash is reduced, and the application stability is favorably improved.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for use in the embodiments will be briefly described below, and the drawings herein incorporated in and forming a part of the specification illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the technical solutions of the present disclosure. It is appreciated that the following drawings depict only certain embodiments of the disclosure and are therefore not to be considered limiting of its scope, for those skilled in the art will be able to derive additional related drawings therefrom without the benefit of the inventive faculty.
Fig. 1 illustrates an application scenario diagram of an application stability detection method provided by an embodiment of the present disclosure;
fig. 2 shows a flowchart of an application stability detection method provided by an embodiment of the present disclosure;
FIG. 3 is a flow chart illustrating another method for detecting application stability provided by the embodiments of the present disclosure;
FIG. 4 is a schematic diagram of an application stability detection apparatus provided in an embodiment of the present disclosure;
fig. 5 is a second schematic diagram of an application stability detection apparatus provided in the embodiment of the present disclosure;
fig. 6 shows a schematic diagram of an electronic device provided by an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
Research shows that in the application running process, due to the fact that the bottom layer code has problems or problems occurring in the running link, the situation that the thread repeatedly calls the variables occurs, the size of the thread local storage is fixed, the thread local storage is invalid and occupied due to the repeated calling of the thread local variables, new thread local variables cannot be continuously applied and stored, program logic is difficult to correctly execute, even program crash can be caused, and the stability of the program is reduced.
Based on the research, the application stability detection method can be used for performing stability detection on the application in the application running process, and for the thread local storage space of the application, the function call interface is taken over, module information can be obtained and stored through a loading address when the function module calls the function call interface, so that the stability detection on the application can be effectively realized, the abnormal condition can be positioned in the stability detection process, the part with abnormal running can be accurately analyzed, timely response measures can be made on the abnormal condition, the effectiveness and flexibility of application stability detection are ensured, the possibility of application crash is reduced, and the application stability is favorably improved.
The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the present disclosure to the above-mentioned problems should be the contribution of the inventor in the process of the present disclosure.
To facilitate understanding of the present embodiment, first, an application stability detection method disclosed in the embodiments of the present disclosure is described in detail, where an execution subject of the application stability detection method provided in the embodiments of the present disclosure is generally an electronic device with certain computing capability, and the electronic device includes, for example: terminal equipment or servers or other processing devices. In some possible implementations, the application stability detection method may be implemented by a processor calling computer readable instructions stored in a memory.
The following describes an application stability detection method provided by the embodiment of the present disclosure by taking an execution subject as a terminal.
Referring to fig. 1, fig. 1 is a schematic view of an application scenario in which a stability detection method is applied according to an embodiment of the present disclosure. As shown in fig. 1, in an application scenario using the application stability detection method, the application scenario includes a server and a plurality of terminals that can be in communication connection with the server, in an application running process, a user may send running information generated in the application running process to the server using a terminal such as a smart phone, a tablet computer, and a wearable device, the server may send the running information to a research and development staff to request the research and development staff to analyze, and may send information of the research and development staff to the user, and the user may receive the information sent by the server through the terminal.
Referring to fig. 2, fig. 2 is a flowchart illustrating an application stability detection method according to an embodiment of the disclosure. As shown in fig. 2, an application stability detection method provided by the embodiment of the present disclosure includes:
s201: and taking over a first function call interface for adding function identification information in the key mapping of the target application under the condition that the target application is started and meets the stability detection condition.
In this step, in a case that the target application is started, it may be detected whether the target application meets a stability detection condition, and in a case that it is detected that the target application meets the stability detection condition, a first function call interface for adding function identification information in the key mapping of the target application may be taken over.
The key mapping of the target application comprises a plurality of storage positions for storing the function identification information, the key mapping is the same as the storage size of a thread local storage space of the target application, the thread local storage space comprises a plurality of sub-storage spaces, and the plurality of sub-storage spaces correspond to the plurality of storage positions in the key mapping.
The key map is a key _ map in the Linux system, and the representation form may be a set of static arrays in the system, which is a set of storage locations mapped with the thread local storage space and includes a plurality of storage locations for storing function identification information.
S202: and under the condition that a first function module calls the first function calling interface, determining module information of the function module.
In this step, after it is detected that a first function module calls the first function call interface, the specific information of the function module when the first function call interface is called in the time dimension may be taken over based on the function module, so as to obtain the module information of the function module, and further, the module information may be processed.
S203: and storing the module information in a pre-applied storage space.
In this step, in the case of obtaining the module information, the module information may be stored in the storage space based on a storage space applied in advance, and the storage space and the stored module information thereof may be further processed.
The pre-applied storage space may be a storage space resident in a terminal running the target application, a storage space based on a wireless cloud of the terminal running the target application, a storage space set on a virtual server hosted by a third party, or a storage space backed up on a memory card or a storage hard disk, which is not limited herein.
S204: and when the information storage amount of the storage space exceeds a first preset information threshold value, sending the plurality of module information stored in the storage space to a server.
In this step, the information storage amount in the storage space may be obtained first, and then compared with the first preset information threshold, and when the information storage amount in the storage space exceeds the first preset information threshold, the plurality of pieces of module information stored in the storage space may be sent to the server.
The information storage amount in the storage space may be information of a plurality of modules stored by one functional module, or information of a plurality of modules stored by a plurality of functional modules, which is not limited herein.
The value of the first preset information threshold cannot be greater than the value of the number of the plurality of subspaces included in the storage space.
According to the application stability detection method provided by the embodiment of the disclosure, when a target application is started and the target application meets a stability detection condition, a first function call interface for adding function identification information in key mapping of the target application is taken over; under the condition that a first function module calls the first function calling interface, determining module information of the function module; storing the module information in a pre-applied storage space; and when the information storage amount of the storage space exceeds a first preset information threshold value, sending the plurality of module information stored in the storage space to a server.
Therefore, stability detection is carried out on the application in the running process, a function calling interface is taken over aiming at the thread local storage space of the application, module information can be obtained and stored through a loading address when the function calling interface is called by a function module, not only can the stability detection of the application be effectively realized, but also the abnormal situation can be positioned in the stability detection process, the part with running abnormity can be accurately analyzed, timely countermeasures can be made for the abnormal situation, the effectiveness and flexibility of the application stability detection are ensured, the possibility of application crash is reduced, and the application stability is favorably improved.
Referring to fig. 3, fig. 3 is a flowchart illustrating another method for detecting application stability according to an embodiment of the disclosure. As shown in fig. 3, an application stability detection method provided by the embodiment of the present disclosure includes:
s301: and in the process of running the target application before the current start, determining that the target application meets the stability detection condition according to the storage quantity of the function identification information in the key mapping of the target application recorded in real time.
In this step, in the process of running the target application before the current start, it is necessary to determine whether the target application meets the stability detection condition, and for this reason, the storage quantity of the function identification information in the key mapping of the target application may be recorded in real time, so as to determine whether the target application meets the stability detection condition.
S302: and taking over a first function call interface for adding function identification information in the key mapping of the target application under the condition that the target application is started and meets the stability detection condition.
S303: and under the condition that a first function module calls the first function calling interface, determining module information of the function module.
S304: and storing the module information in a pre-applied storage space.
S305: and when the information storage amount of the storage space exceeds a first preset information threshold value, sending the plurality of module information stored in the storage space to a server.
The descriptions of step S302 to step S305 may refer to the descriptions of step S201 to step S204, and the same technical effect and the same technical problem can be achieved, which are not described herein again.
Next, this embodiment will be further described with reference to some specific embodiments.
In some possible embodiments, step S301 includes:
the target application records the storage quantity of the function identification information in the key mapping in real time in the running process before the current start;
when the storage quantity exceeds a second preset information threshold value, sending abnormal operation information of the target application to the server;
when a stability detection instruction fed back by the server is received, determining that the target application meets a stability detection condition, wherein the stability detection instruction is an instruction sent by the server after the server receives abnormal operation information sent by a plurality of terminals and the number of the terminals exceeds a preset number.
In this step, in the process that a target application is running before being started, it needs to be determined whether the target application meets a stability detection condition, for this reason, the storage quantity of function identification information in key mapping of the target application can be recorded in real time, and then compared with the second preset information threshold, when the storage quantity exceeds the second preset information threshold, abnormal running information of the target application can be sent to the server, when the server receives abnormal running information sent by a plurality of terminals, and when the quantity of the plurality of terminals exceeds the preset quantity, it is determined that a stability detection instruction fed back by the server is received, and based on the stability detection instruction, it is further determined that the target application meets the stability detection condition.
The value of the second preset information threshold may be the same as or different from the value of the first preset information threshold, and is not limited herein.
Wherein a numerical value of the second preset information threshold cannot be greater than a numerical value of a number of the plurality of storage locations included in the key map.
In some possible embodiments, step S303 includes:
under the condition that a first function module calls the first function calling interface, acquiring a loading address corresponding to the position of the function module;
based on the loading address, backtracking to obtain a dynamic library corresponding to the loading address;
and determining dynamic library name information of the dynamic library and function name information corresponding to the loading address, wherein the module information comprises the dynamic library name information and the function name information.
In this step, after it is detected that a first function module calls the first function call interface, a load address corresponding to a location where the function module is located when the function module calls the first function call interface in a time dimension may be taken over based on the function module, and based on the load address, a dynamic library corresponding to the load address may be obtained by backtracking, so that dynamic library name information of the dynamic library and function name information corresponding to the load address may be determined, and thus module information of the function module may be obtained, where the module information includes the dynamic library name information and the function name information, and further the module information may be processed.
In some possible embodiments, in step S303, in the case of determining the dynamic library name information of the dynamic library and the function name information corresponding to the load address, the call stack of the current thread may also be captured as additional information, so as to further improve the module information.
Further, in some possible embodiments, before step S304, the method further includes:
and applying for a storage space for storing the module information in the running environment of the target application, wherein the storage space has the same storage size as the key map, and the storage space comprises a plurality of subspaces corresponding to a plurality of storage positions in the key map.
In this step, after the module information of the functional module is acquired, the module information of the functional module needs to be stored, and therefore, a storage space can be applied in the operating environment of the target application, and the storage space can be used to store the module information of the functional module.
In some possible embodiments, step S304 includes:
and storing the module information in a subspace corresponding to the storage position where the function identification information is stored in the storage space.
In this step, when the module information is obtained, the dynamic library name information and the function name information included in the module information may be stored in a subspace corresponding to a storage location where the function identification information is stored in the storage space based on a storage space applied in advance, and the storage space and the stored module information thereof may be further processed.
In some possible embodiments, in the step S304, in the case of storing the dynamic library name information and the function name information, a call stack of the current thread may also be stored as additional information, so as to further improve the storage space.
Further, in some possible embodiments, before step S305, the method further includes:
taking over a second function interface for deleting function identification information in the key mapping of the target application under the condition that the target application is started and meets the stability detection condition;
and deleting the module information which corresponds to the second function interface and is stored in the storage space under the condition that the second function module calls the second function interface is detected.
In this step, when the target application is started, it may be detected whether the target application meets a stability detection condition, and when it is detected that the target application meets the stability detection condition, it may take over a second function call interface for deleting function identification information in the key mapping of the target application, and after it is detected that a second function module calls the second function call interface, it may take over specific information of the function module when calling the second function call interface in a time dimension based on the function module, so as to delete module information stored in the storage space corresponding to the second function interface, and further may process the storage space and the module information stored therein.
The second functional module may be the same as the first functional module, or may be a different functional module, which is not limited herein.
Further, in some possible embodiments, after step S305, the method further includes:
under the condition that a repair file aiming at the target application and sent by a server is received, updating the target application based on the repair file;
traversing the storage space and screening out repeated module information under the condition that the repair file sent by the server is not received; and deleting the function identification information corresponding to the repeated module information in the key mapping, and reserving the function identification information written last in the time dimension.
In the step, after the information of the plurality of modules stored in the storage space is obtained and sent to the server, the information is sent to research personnel through the server. And the research personnel positions the functional modules based on the information of the modules, and then adjusts the functional modules generating abnormal conditions, thereby developing the repair files. And receiving a repair file aiming at the target application through the transmission of the server, so that the target application can be updated.
Furthermore, under the condition that the repair file sent by the server is not received, the storage space can be traversed to screen out the repeated module information, so that the function identification information in the key mapping corresponding to the repeated module information is obtained, and the function identification information written last in the time dimension is reserved in a mode of deleting the function identification information, so that the target application is updated.
The application stability detection method provided by the embodiment of the disclosure can perform stability detection on the application in the application running process, and take over the function calling interface aiming at the thread local storage space of the application, and can acquire and store module information through the loading address when the function module calls the function calling interface, thereby not only effectively realizing the stability detection on the application, but also positioning abnormal conditions in the stability detection process, accurately analyzing the part with abnormal running, being beneficial to making timely response measures on the abnormal conditions, ensuring the validity and flexibility of the application stability detection, reducing the possibility of application crash, and being beneficial to improving the stability of the application.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same inventive concept, an application stability detection device corresponding to the application stability detection method is also provided in the embodiments of the present disclosure, and since the principle of solving the problem of the device in the embodiments of the present disclosure is similar to that of the application stability detection method in the embodiments of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are not described again.
Referring to fig. 4 and 5, fig. 4 is a first schematic diagram of an application stability detection apparatus provided in an embodiment of the present disclosure, and fig. 5 is a second schematic diagram of an application stability detection apparatus provided in an embodiment of the present disclosure. As shown in fig. 4, an application stability detection apparatus 400 provided by the embodiment of the present disclosure includes:
an interface takeover module 410, configured to take over a first function call interface used for adding function identification information in a key map of a target application when the target application is started and the target application meets a stability detection condition.
An information determining module 420, configured to determine module information of the function module when it is detected that the function module calls the first function call interface.
And an information storage module 430, configured to store the module information in a pre-applied storage space.
An information sending module 440, configured to send the module information stored in the storage space to a server when an information storage amount of the storage space exceeds a first preset information threshold.
In an optional implementation manner, the information determining module 420 is specifically configured to:
under the condition that a functional module calls the first function calling interface, acquiring a loading address corresponding to the position of the functional module;
based on the loading address, backtracking to obtain a dynamic library corresponding to the loading address;
and determining dynamic library name information of the dynamic library and function name information corresponding to the loading address, wherein the module information comprises the dynamic library name information and the function name information.
In an optional implementation manner, the information storage module 430 is specifically configured to:
and storing the module information in a subspace corresponding to the storage position where the function identification information is stored in the storage space.
In an alternative embodiment, as shown in fig. 5, the numerical processing apparatus 400 further includes an application recording module 450, a space application module 460, an information deletion module 470, and an application update module 480, where the application recording module 450, the space application module 460, the information deletion module 470, and the application update module 480 are configured to:
the application recording module 450 is configured to record, in real time, the storage amount of the function identification information in the key mapping of the target application in the process that the target application runs before the current start, and determine that the target application meets the stability detection condition.
A space application module 460, configured to apply for a storage space for storing the module information in the running environment of the target application.
An information deleting module 470, configured to take over a second function interface used for deleting function identification information in the key mapping of the target application and delete the module information stored in the storage space corresponding to the second function interface when the target application is started and the target application meets the stability detection condition.
An application update module 480, configured to repair the target application based on the module information.
In an optional implementation manner, the application recording module 450 is specifically configured to:
the target application records the storage quantity of the function identification information in the key mapping in real time in the running process before the current start;
when the storage quantity exceeds a second preset information threshold value, sending abnormal operation information of the target application to the server;
when a stability detection instruction fed back by the server is received, determining that the target application meets a stability detection condition, wherein the stability detection instruction is an instruction sent by the server after the server receives abnormal operation information sent by a plurality of terminals and the number of the terminals exceeds a preset number.
In an optional implementation manner, the space application module 460 is specifically configured to:
and applying for a storage space for storing the module information in the running environment of the target application, wherein the storage space has the same storage size as the key map, and the storage space comprises a plurality of subspaces corresponding to a plurality of storage positions in the key map.
In an optional implementation manner, the information deleting module 470 is specifically configured to:
taking over a second function interface for deleting function identification information in the key mapping of the target application under the condition that the target application is started and meets the stability detection condition;
and deleting the module information which corresponds to the second function interface and is stored in the storage space under the condition that the second function module calls the second function interface is detected.
In an optional implementation manner, the application update module 480 is specifically configured to:
under the condition that a repair file aiming at the target application and sent by a server is received, updating the target application based on the repair file;
traversing the storage space and screening out repeated module information under the condition that the repair file sent by the server is not received; and deleting the function identification information corresponding to the repeated module information in the key mapping, and reserving the function identification information written last in the time dimension.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
The application stability detection method provided by the embodiment of the disclosure can perform stability detection on the application in the application running process, and take over the function calling interface aiming at the thread local storage space of the application, and can acquire and store module information through the loading address when the function module calls the function calling interface, thereby not only effectively realizing the stability detection on the application, but also positioning abnormal conditions in the stability detection process, accurately analyzing the part with abnormal running, being beneficial to making timely response measures on the abnormal conditions, ensuring the validity and flexibility of the application stability detection, reducing the possibility of application crash, and being beneficial to improving the stability of the application.
Corresponding to the above application stability detection method, an embodiment of the present disclosure further provides an electronic device 600, as shown in fig. 6, which is a schematic structural diagram of the electronic device 600 provided in the embodiment of the present disclosure, and includes:
a processor 610, a memory 620, and a bus 630; the storage 620 is used for storing execution instructions and includes a memory 621 and an external storage 622; the memory 621 is also referred to as an internal memory, and is used for temporarily storing operation data in the processor 610 and data exchanged with an external memory 622 such as a hard disk, the processor 610 exchanges data with the external memory 622 through the memory 621, and when the electronic device 600 operates, the processor 610 and the memory 620 communicate through the bus 630, so that the processor 610 can execute the steps of the application stability detection method described above.
For the specific execution process of the instruction, reference may be made to the steps of the application stability detection method described in the embodiments of the present disclosure, and details are not described here.
The embodiments of the present disclosure also provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the application stability detection method described in the above method embodiments are executed. The storage medium may be a volatile or non-volatile computer-readable storage medium.
An embodiment of the present disclosure further provides a computer program product, where the computer program product includes computer instructions, and the computer instructions, when executed by a processor, may perform the steps of the application stability detection method in the foregoing method embodiment.
The computer program product may be implemented by hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (10)

1. An application stability detection method, the method comprising:
when a target application is started and the target application meets a stability detection condition, taking over a first function call interface for adding function identification information in key mapping of the target application;
under the condition that a first function module calls the first function calling interface, determining module information of the function module;
storing the module information in a pre-applied storage space;
and when the information storage amount of the storage space exceeds a first preset information threshold value, sending the plurality of module information stored in the storage space to a server.
2. The method according to claim 1, wherein before taking over a first function call interface for adding function identification information in a key map of a target application in a case where the target application is currently started and the target application meets a stability detection condition, the method comprises:
the target application records the storage quantity of the function identification information in the key mapping in real time in the running process before the current start;
when the storage quantity exceeds a second preset information threshold value, sending abnormal operation information of the target application to the server;
when a stability detection instruction fed back by the server is received, determining that the target application meets a stability detection condition, wherein the stability detection instruction is an instruction sent by the server after the server receives abnormal operation information sent by a plurality of terminals and the number of the terminals exceeds a preset number.
3. The method of claim 1, wherein determining module information of the functional module in the case that it is detected that the first functional module calls the first function call interface comprises:
under the condition that a first function module calls the first function calling interface, acquiring a loading address corresponding to the position of the function module;
based on the loading address, backtracking to obtain a dynamic library corresponding to the loading address;
and determining dynamic library name information of the dynamic library and function name information corresponding to the loading address, wherein the module information comprises the dynamic library name information and the function name information.
4. The method of claim 1, wherein prior to said storing said module information in a pre-applied storage space, said method comprises:
and applying for a storage space for storing the module information in the running environment of the target application, wherein the storage space has the same storage size as the key map, and the storage space comprises a plurality of subspaces corresponding to a plurality of storage positions in the key map.
5. The method of claim 4, wherein storing the module information in a pre-applied storage space comprises:
and storing the module information in a subspace corresponding to the storage position where the function identification information is stored in the storage space.
6. The method according to claim 1, wherein before sending the plurality of module information stored in the storage space to a server when the information storage amount of the storage space exceeds a first preset information threshold, the method comprises:
taking over a second function interface for deleting function identification information in the key mapping of the target application under the condition that the target application is started and meets the stability detection condition;
and deleting the module information which corresponds to the second function interface and is stored in the storage space under the condition that the second function module calls the second function interface is detected.
7. The method according to claim 1, wherein after the sending of the plurality of module information stored in the storage space to the server when the information storage amount of the storage space exceeds a first preset information threshold, the method comprises:
under the condition that a repair file aiming at the target application and sent by a server is received, updating the target application based on the repair file;
traversing the storage space and screening out repeated module information under the condition that the repair file sent by the server is not received; and deleting the function identification information corresponding to the repeated module information in the key mapping, and reserving the function identification information written last in the time dimension.
8. An application stability detection apparatus, the apparatus comprising:
the interface takeover module is used for taking over a first function call interface used for adding function identification information in key mapping of the target application under the condition that the target application is started and meets a stability detection condition;
the information determining module is used for determining module information of the functional module under the condition that a first functional module calls the first function calling interface;
the information storage module is used for storing the module information in a storage space which is applied in advance;
and the information sending module is used for sending the plurality of module information stored in the storage space to a server when the information storage amount of the storage space exceeds a first preset information threshold value.
9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of applying the stability detection method of any one of claims 1 to 7.
10. A computer-readable storage medium, having stored thereon a computer program which, when being executed by a processor, carries out the steps of the application stability detection method according to any one of claims 1 to 7.
CN202110998536.7A 2021-08-27 2021-08-27 Application stability detection method and device, electronic equipment and storage medium Active CN113688048B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110998536.7A CN113688048B (en) 2021-08-27 2021-08-27 Application stability detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110998536.7A CN113688048B (en) 2021-08-27 2021-08-27 Application stability detection method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113688048A true CN113688048A (en) 2021-11-23
CN113688048B CN113688048B (en) 2023-06-09

Family

ID=78583573

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110998536.7A Active CN113688048B (en) 2021-08-27 2021-08-27 Application stability detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113688048B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756575A (en) * 2020-06-19 2020-10-09 星辰天合(北京)数据科技有限公司 Performance analysis method and device of storage server and electronic equipment
CN111782302A (en) * 2020-07-13 2020-10-16 腾讯科技(深圳)有限公司 Process updating method and device, storage medium and electronic equipment
CN112433877A (en) * 2020-12-01 2021-03-02 北京五八信息技术有限公司 Application startup crash detection method and device, electronic equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756575A (en) * 2020-06-19 2020-10-09 星辰天合(北京)数据科技有限公司 Performance analysis method and device of storage server and electronic equipment
CN111782302A (en) * 2020-07-13 2020-10-16 腾讯科技(深圳)有限公司 Process updating method and device, storage medium and electronic equipment
CN112433877A (en) * 2020-12-01 2021-03-02 北京五八信息技术有限公司 Application startup crash detection method and device, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113688048B (en) 2023-06-09

Similar Documents

Publication Publication Date Title
CN110908865A (en) Memory leakage monitoring method and device and electronic equipment
CN108734304B (en) Training method and device of data model and computer equipment
CN107908553B (en) Association testing method, application server and computer readable storage medium
CN111680008B (en) Log processing method and system, readable storage medium and intelligent device
CN107608609B (en) Event object sending method and device
CN112306833A (en) Application program crash statistical method and device, computer equipment and storage medium
CN105574026A (en) Method and device for service supporting by using non-relational database
CN112269665B (en) Memory processing method and device, electronic equipment and storage medium
CN108228611B (en) Document information copying method and device
CN117033058A (en) Analysis method, device, equipment and medium for software crash data
CN113688048A (en) Application stability detection method and device, electronic equipment and storage medium
CN114217927A (en) Thread calling method and device, computer equipment and storage medium
CN112084028B (en) Memory detection method and device
CN113485846A (en) Memory processing method and device
CN110324845B (en) Resource allocation method and device
CN113641628A (en) Data quality detection method, device, equipment and storage medium
CN112631821A (en) Memory fault detection positioning method and device, computer equipment and storage medium
CN112231290A (en) Method, device and equipment for processing local log and storage medium
CN113535580A (en) CTS (clear to send) testing method, device and testing equipment
CN113094052A (en) Application construction method and device, computer equipment and storage medium
US20210397498A1 (en) Information processing apparatus, control method, and program
CN116414722B (en) Fuzzy test processing method and device, fuzzy test system and storage medium
CN111240956A (en) Memory leakage monitoring method and device, electronic equipment and computer storage medium
EP4148577A2 (en) Method and apparatus of responding to client fault detection with update operation, electronic device, and storage medium
CN111008131A (en) Automatic testing method and device, computer equipment and storage medium

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant