CN113688048B - 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
CN113688048B
CN113688048B CN202110998536.7A CN202110998536A CN113688048B CN 113688048 B CN113688048 B CN 113688048B CN 202110998536 A CN202110998536 A CN 202110998536A CN 113688048 B CN113688048 B CN 113688048B
Authority
CN
China
Prior art keywords
information
module
function
target application
storage space
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110998536.7A
Other languages
Chinese (zh)
Other versions
CN113688048A (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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision 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 application stability detection method, the device, the electronic equipment and the storage medium can detect the stability of the application in the running process of the application, can acquire module information and store the module information through loading addresses when the function module calls the function call interface by taking over the function call interface aiming at the thread local storage space of the application, thereby realizing the positioning of abnormal conditions in the running process of the application stability detection, accurately analyzing the abnormal running part, being beneficial to timely countermeasures for the abnormal conditions, ensuring the effectiveness and the flexibility of the application stability detection, reducing the possibility of application breakdown and being beneficial to improving the stability of the application.

Description

Application stability detection method and device, electronic equipment and storage medium
Technical Field
The disclosure relates to the technical field of computers, and in particular relates to an application stability detection method, an application stability detection device, electronic equipment and a storage medium.
Background
At present, with the development of computer technology, in actual running, an application program will use a local storage space of a thread to store related data generated in the running process. Each application program entering the running is an independent process, a thread is an execution unit of the process, and the thread local storage is a storage space for storing related data of each thread. The storage of the relevant data is allocated at the beginning of a thread, reclaimed at the end of a thread, each thread having its own instance of the data. In the thread space, the system reserves a certain size space for each thread, and is used for storing the system itself and thread local variables required by the running of the application program.
In the process of application operation, especially in the application debugging test stage, due to problems existing in the bottom code or problems occurring in the operation link, the situation that the thread repeatedly calls the variable can occur, but for the thread local storage, the size of the thread local variable is fixed, the thread local variable repeatedly calls can cause that the thread local storage is not occupied, the application cannot be continued and new thread local variables can not be stored, the program logic is difficult to execute correctly, even the program is possibly 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, an application stability detection device, electronic equipment and a storage medium.
The embodiment of the disclosure provides an application stability detection method, which comprises the following steps:
under the condition that a target application is started and the target application accords with a stability detection condition, a first function call interface for adding function identification information in key mapping of the target application is taken over;
determining module information of a first function module under the condition that the first function module is detected to call the first function call interface;
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, transmitting the plurality of module information stored in the storage space to a server.
In an alternative embodiment, in the case that the target application is currently started and the target application meets a stability detection condition, before taking over the first function call interface for adding function identification information in the key map of the target application, the method includes:
in the process that the target application operates before the current starting, recording the storage quantity of function identification information in the key mapping in real time;
when the storage quantity exceeds a second preset information threshold value, abnormal operation information of the target application is sent to the server;
and 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 alternative embodiment, the determining module information of the first function module in the case that the first function module is detected to call the first function call interface includes:
Under the condition that the first function module is detected to call the first function call interface, acquiring a loading address corresponding to the position of the first function module;
backtracking to obtain a dynamic library corresponding to the loading address based on 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, before the storing the module information in the pre-applied 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 is the same as the storage size of the key map, and comprises a plurality of subspaces which correspond to a plurality of storage positions in the key map.
In an alternative embodiment, the storing the module information in a pre-applied 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 alternative embodiment, before the information storage amount of the storage space exceeds the first preset information threshold, the method includes:
taking over a second function interface for deleting function identification information in a key map of the target application under the condition that the target application is started and the target application meets a stability detection condition;
and deleting module information stored in the storage space and corresponding to the second function interface under the condition that the second function module is detected to call the second function interface.
In an optional implementation manner, after the information storage amount of the storage space exceeds the first preset information threshold and the plurality of module information stored in the storage space is sent to the server, the method includes:
under the condition that a repair file for the target application sent by a server is received, updating the target application based on the repair file;
traversing the storage space under the condition that the repair file sent by the server is not received, and screening out repeated module information; and deleting the function identification information corresponding to the repeated module information in the key mapping, and retaining the function identification information which is finally written in the time dimension.
The embodiment of the disclosure also provides an application stability detection device, which comprises:
the interface take-over module is used for 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 the target application accords with the stability detection condition;
the information determining module is used for determining module information of a first functional module under the condition that the first functional module is detected to call the first function call interface;
the information storage module is used for storing the module information in a pre-applied storage space;
and the information sending module is used for sending 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 value.
In an alternative embodiment, the apparatus further comprises an application recording module, the application recording module being configured to:
in the process that the target application operates before the current starting, recording the storage quantity of function identification information in the key mapping in real time;
when the storage quantity exceeds a second preset information threshold value, abnormal operation information of the target application is sent to the server;
And 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 alternative embodiment, the information determining module is specifically configured to:
under the condition that the first function module is detected to call the first function call interface, acquiring a loading address corresponding to the position of the first function module;
backtracking to obtain a dynamic library corresponding to the loading address based on 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 for:
and applying for a storage space for storing the module information in the running environment of the target application, wherein the storage space is the same as the storage size of the key map, and comprises a plurality of subspaces which correspond to a plurality of storage positions in the key map.
In an alternative embodiment, 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 alternative embodiment, the apparatus further comprises an information deletion module, where the information deletion module is configured to:
taking over a second function interface for deleting function identification information in a key map of the target application under the condition that the target application is started and the target application meets a stability detection condition;
and deleting module information stored in the storage space and corresponding to the second function interface under the condition that the second function module is detected to call the second function interface.
In an alternative embodiment, the apparatus further comprises an application update module, the application update module being configured to:
under the condition that a repair file for the target application sent by a server is received, updating the target application based on the repair file;
traversing the storage space under the condition that the repair file sent by the server is not received, and screening out repeated module information; and deleting the function identification information corresponding to the repeated module information in the key mapping, and retaining the function identification information which is finally written in the time dimension.
The embodiment of the disclosure also provides an electronic device, including: the system 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 disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the above-described application stability detection method.
According to the application stability detection method, the device, the electronic equipment and the storage medium, when the target application is started and the target application accords with the stability detection condition, a first function call interface for adding function identification information in key mapping of the target application is taken over; determining module information of a first function module under the condition that the first function module is detected to call the first function call interface; 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, transmitting the plurality of module information stored in the storage space to a server.
In this way, stability detection is carried out on the application in the running process, the function call interface is taken over aiming at the thread local storage space of the application, module information can be obtained and stored through loading addresses when the function module calls the function call interface, so that stability detection of the application can be effectively realized, abnormal conditions can be positioned in the stability detection process, the abnormal running part can be accurately analyzed, timely countermeasures can be taken for the abnormal conditions, the effectiveness and flexibility of application stability detection are ensured, the possibility of application breakdown is reduced, and the stability of the application is improved.
The foregoing objects, features and advantages of the disclosure will be more readily apparent from the following detailed description of the preferred embodiments taken in conjunction with the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings required for the embodiments are briefly described below, which are incorporated in and constitute a part of the specification, these drawings showing embodiments consistent with the present disclosure and together with the description serve to illustrate the technical solutions of the present disclosure. It is to be understood that the following drawings illustrate only certain embodiments of the present disclosure and are therefore not to be considered limiting of its scope, for the person of ordinary skill in the art may admit to other equally relevant drawings without inventive effort.
Fig. 1 illustrates an application scenario schematic diagram of an application stability detection method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a flow chart of an application stability detection method provided by an embodiment of the present disclosure;
FIG. 3 illustrates a flow chart of another application stability detection method provided by an embodiment of the present disclosure;
FIG. 4 illustrates one of the schematic diagrams of an application stability detection device provided by embodiments of the present disclosure;
FIG. 5 is a schematic diagram showing a second embodiment of an application stability detection device;
fig. 6 shows a schematic diagram of an electronic device provided by an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are only some embodiments of the present disclosure, but not all embodiments. The components of the embodiments of the present disclosure, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
It should be noted that: like reference numerals and letters denote like items in the following figures, and thus once an item is defined in one figure, no further definition or explanation thereof is necessary in the following figures.
The term "and/or" is used herein to describe only one relationship, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist together, 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.
According to research, in the process of application operation, due to the fact that problems exist in the bottom code or problems occur in the operation link, the situation that threads are repeatedly called for variables can occur, and for thread local storage, the size of the thread local variable is fixed, the thread local variable is repeatedly called to cause that the thread local storage is not occupied, new thread local variables cannot be continuously applied and stored, program logic is difficult to execute correctly, program breakdown even can be caused, and the stability of the program is reduced.
Based on the above study, the disclosure provides an application stability detection method, which can detect stability of an application in the running process of the application, take over a function call interface aiming at a thread local storage space of the application, acquire module information by loading an address and store the module information when the function module calls the function call interface, not only can effectively realize stability detection of the application, but also can realize positioning of abnormal conditions in the stability detection process, accurately analyze the abnormal running part, and is beneficial to timely countermeasures for the abnormal conditions, ensure validity and flexibility of application stability detection, reduce possibility of application breakdown and be beneficial to improving stability of the application.
The present invention is directed to a method for manufacturing a semiconductor device, and a semiconductor device manufactured by the method.
For the sake of understanding the present embodiment, first, a detailed description will be given of an application stability detection method disclosed in the embodiments of the present disclosure, where an execution body of the application stability detection method provided in the embodiments of the present disclosure is generally an electronic device with a certain computing capability, and the electronic device includes, for example: a terminal device or server or other processing device. In some possible implementations, the application stability detection method may be implemented by a processor invoking computer readable instructions stored in a memory.
The application stability detection method provided by the embodiment of the present disclosure is described below by taking an execution subject as an example.
Referring to fig. 1, fig. 1 is a schematic application scenario diagram of an application stability detection method according to an embodiment of the 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 implement communication connection with the server, in an application running process, a user may use a terminal such as a smart phone, a tablet computer, a wearable device, etc. to send running information generated in an application running process to the server, the server may send the running information to a developer, request the developer to analyze, and may send information of the developer 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 of a method for detecting application stability according to an embodiment of the disclosure. As shown in fig. 2, the application stability detection method provided by the embodiment of the present disclosure includes:
s201: and under the condition that the target application is started and the target application meets the stability detection condition, taking over a first function call interface for adding function identification information in the key mapping of the target application.
In this step, under the condition that the target application is started, whether the target application meets the stability detection condition may be detected, and under the condition that the target application is detected to meet the stability detection condition, a first function call interface for adding function identification information in the key map of the target application may be taken over.
The key map of the target application comprises a plurality of storage positions for storing the function identification information, the key map is the same as the thread local storage space of the target application in storage size, 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 map.
The key map is a key_map in a Linux system, and the expression form can be a group of static arrays in the system, and the static arrays are used as a set of storage positions mapped with the thread local storage space and comprise a plurality of storage positions for storing function identification information.
S202: and determining module information of the first functional module under the condition that the first functional module is detected to call the first function call interface.
In this step, after detecting that the first function module calls the first function call interface, specific information when the first function module calls the first function call interface in a time dimension may be taken over based on the first function module, so as to obtain module information of the first 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, when the module information is obtained, the module information may be stored in a storage space based on a previously applied storage space, and the storage space and the stored module information may be further processed.
The pre-applied storage space may be a storage space of a terminal running the target application, a storage space based on a wireless cloud of the terminal running the target application, a storage space provided on a virtual server hosted by a third party, or a storage space backed up to a memory card or a memory hard disk, which is not limited in any way.
S204: and when the information storage amount of the storage space exceeds a first preset information threshold value, transmitting 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 acquired 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 module information stored in the storage space may be sent to the server.
The information storage amount in the storage space may be a plurality of module information stored in one functional module, or may be a plurality of module information stored in a plurality of functional modules, which is not limited in any way.
The value of the first preset information threshold cannot be larger 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 accords with a stability detection condition, a first function call interface for adding function identification information in key mapping of the target application is taken over; determining module information of a first function module under the condition that the first function module is detected to call the first function call interface; 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, transmitting the plurality of module information stored in the storage space to a server.
In this way, stability detection is carried out on the application in the running process, the function call interface is taken over aiming at the thread local storage space of the application, module information can be obtained and stored through loading addresses when the function module calls the function call interface, so that stability detection of the application can be effectively realized, abnormal conditions can be positioned in the stability detection process, the abnormal running part can be accurately analyzed, timely countermeasures can be taken for the abnormal conditions, the effectiveness and flexibility of application stability detection are ensured, the possibility of application breakdown is reduced, and the stability of the application is improved.
Referring to fig. 3 at the same time, fig. 3 is a flowchart of another method for detecting application stability according to an embodiment of the disclosure. As shown in fig. 3, the application stability detection method provided by the embodiment of the present disclosure includes:
s301: and in the process that the target application runs before the current starting, determining that the target application accords with a stability detection condition according to the storage quantity of function identification information in the key mapping of the target application, which is recorded in real time.
In this step, in the process that the target application runs before the current start, it needs to determine whether the target application meets the stability detection condition, and therefore, the storage number of the function identification information in the key map of the target application can be recorded in real time, so as to determine whether the target application meets the stability detection condition.
S302: and under the condition that the target application is started and the target application meets the stability detection condition, taking over a first function call interface for adding function identification information in the key mapping of the target application.
S303: and determining module information of the first functional module under the condition that the first functional module is detected to call the first function call interface.
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, transmitting 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 may achieve the same technical effects and solve the same technical problems, which are not described herein.
Next, the present embodiment will be further described with reference to some specific embodiments.
In some possible embodiments, step S301 includes:
in the process that the target application operates before the current starting, recording the storage quantity of function identification information in the key mapping in real time;
when the storage quantity exceeds a second preset information threshold value, abnormal operation information of the target application is sent to the server;
And 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 the target application operates before the current start, it needs to determine whether the target application meets the stability detection condition, for this purpose, the storage number of the function identification information in the key mapping of the target application may be recorded in real time, and then compared with the second preset information threshold, when the storage number exceeds the second preset information threshold, the abnormal operation information of the target application may be sent to the server, and when the server receives the abnormal operation information sent by a plurality of terminals, after the number of the terminals exceeds the preset number, the stability detection instruction fed back by the server is determined, 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 in any way.
Wherein the value of the second preset information threshold cannot be greater than the value of the number of the plurality of storage locations included in the key map.
In some possible embodiments, step S303 includes:
under the condition that the first function module is detected to call the first function call interface, acquiring a loading address corresponding to the position of the first function module;
backtracking to obtain a dynamic library corresponding to the loading address based on 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 detecting that the first function module calls the first function call interface, the loading address corresponding to the position of the first function module when the first function module calls the first function call interface in the time dimension may be taken over, and based on the loading address, a dynamic library corresponding to the loading address may be obtained in a backtracking manner, so that dynamic library name information of the dynamic library and function name information corresponding to the loading address may be determined, so as to obtain module information of the first function module, 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, step S303 may further capture a call stack of the current thread as additional information to further refine the module information when determining the dynamic library name information of the dynamic library and the function name information corresponding to the loading address.
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 is the same as the storage size of the key map, and comprises a plurality of subspaces which correspond to a plurality of storage positions in the key map.
In this step, after the module information of the first functional module is obtained, the module information of the first functional module needs to be stored, so that a storage space may be applied in the operating environment of the target application, and the module information of the first functional module may be stored using the storage space.
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 previously applied storage space, and the storage space and the module information stored therein may be further processed.
In some possible embodiments, step S304 may further store the call stack of the current thread as additional information in the case of storing the dynamic library name information and the function name information, so as to further refine 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 a key map of the target application under the condition that the target application is started and the target application meets a stability detection condition;
and deleting module information stored in the storage space and corresponding to the second function interface under the condition that the second function module is detected to call the second function interface.
In this step, under the condition that the target application is started, whether the target application meets a stability detection condition can be detected, a second function call interface for deleting function identification information in a key mapping of the target application can be taken over under the condition that the target application meets the stability detection condition is detected, after the second function module is detected to call the second function call interface, specific information when the second function module calls the second function call interface in a time dimension can be taken over based on the second function module, so that module information which corresponds to the second function interface and is stored in the storage space can be deleted, and further the storage space and the module information stored in the storage space can be processed.
The second functional module may be the same functional module as the first functional module, or may be a different functional module, which is not limited in any way.
Further, in some possible embodiments, after step S305, the method further includes:
under the condition that a repair file for the target application sent by a server is received, updating the target application based on the repair file;
Traversing the storage space under the condition that the repair file sent by the server is not received, and screening out repeated module information; and deleting the function identification information corresponding to the repeated module information in the key mapping, and retaining the function identification information which is finally written in the time dimension.
In the step, after the information of a plurality of modules stored in the storage space is obtained and sent to a server, the information is sent to a research and development personnel through the server. And positioning the functional module by a developer based on the module information, and adjusting the functional module generating the abnormal condition, so as to develop a repair file. And receiving the repair file aiming at the target application through the transmission of the server, so that the target application can be updated.
Further, under the condition that the repair file sent by the server is not received, the storage space can be traversed, repeated module information is screened out, further function identification information in the key mapping corresponding to the repeated module information is obtained, and function identification information which is finally written in a time dimension is reserved in a mode of deleting the function identification information, so that the target application is updated.
According to the application stability detection method provided by the embodiment of the disclosure, stability detection can be performed on the application in the running process of the application, the function call interface is taken over aiming at the thread local storage space of the application, module information can be obtained and stored through loading addresses when the function module calls the function call interface, stability detection of the application can be effectively realized, abnormal conditions can be positioned in the stability detection process, the part with abnormal running can be accurately analyzed, timely countermeasures can be made on the abnormal conditions, effectiveness and flexibility of application stability detection are guaranteed, the possibility of application breakdown is reduced, and the stability of the application is improved.
It will be appreciated by those skilled in the art that in the above-described method of the specific embodiments, the written order of steps is not meant to imply a strict order of execution but rather should be construed according to the function and possibly inherent logic of the steps.
Based on the same inventive concept, the embodiment of the present disclosure further provides an application stability detection device corresponding to the application stability detection method, and since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to that of the application stability detection method in the embodiment of the present disclosure, the implementation of the device may refer to the implementation of the method, and the repetition is omitted.
Referring to fig. 4 and fig. 5, fig. 4 is a schematic diagram of a device for detecting stability of an application according to an embodiment of the disclosure, and fig. 5 is a schematic diagram of a device for detecting stability of an application according to an embodiment of the disclosure. As shown in fig. 4, an application stability detection apparatus 400 provided in an embodiment of the present disclosure includes:
an interface takeover module 410 is configured to, in a case where a target application is started and the target application meets a stability detection condition, take over a first function call interface for adding function identification information in a keymap of the target application.
And the information determining module 420 is configured to determine module information of the first function module when it is detected that the first function module calls the first function call interface.
And the information storage module 430 is configured to store the module information in a storage space applied in advance.
And the information sending module 440 is configured to send, to the server, the plurality of module information stored in the storage space when the information storage amount of the storage space exceeds a first preset information threshold.
In an alternative embodiment, the information determining module 420 is specifically configured to:
under the condition that the first function module is detected to call the first function call interface, acquiring a loading address corresponding to the position of the first function module;
Backtracking to obtain a dynamic library corresponding to the loading address based on 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 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 application stability detection 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:
and the application recording module 450 is used for recording the storage quantity of the function identification information in the key mapping of the target application in real time in the process of running the target application before the current starting and determining 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.
And an information deleting module 470, configured to take over a second function interface for deleting function identification information in a key map of the target application, and delete module information stored in the storage space corresponding to the second function interface, when the target application is started and the target application meets a stability detection condition.
An application update module 480 for repairing the target application based on the plurality of module information.
In an alternative embodiment, the application recording module 450 is specifically configured to:
in the process that the target application operates before the current starting, recording the storage quantity of function identification information in the key mapping in real time;
when the storage quantity exceeds a second preset information threshold value, abnormal operation information of the target application is sent to the server;
and 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 alternative embodiment, 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 is the same as the storage size of the key map, and comprises a plurality of subspaces which correspond to a plurality of storage positions in the key map.
In an alternative embodiment, the information deletion module 470 is specifically configured to:
taking over a second function interface for deleting function identification information in a key map of the target application under the condition that the target application is started and the target application meets a stability detection condition;
and deleting module information stored in the storage space and corresponding to the second function interface under the condition that the second function module is detected to call the second function interface.
In an alternative embodiment, the application update module 480 is specifically configured to:
under the condition that a repair file for the target application sent by a server is received, updating the target application based on the repair file;
traversing the storage space under the condition that the repair file sent by the server is not received, and screening out repeated module information; and deleting the function identification information corresponding to the repeated module information in the key mapping, and retaining the function identification information which is finally written in the time dimension.
The process flow of each module in the apparatus and the interaction flow between the modules may be described with reference to the related descriptions in the above method embodiments, which are not described in detail herein.
According to the application stability detection method provided by the embodiment of the disclosure, stability detection can be performed on the application in the running process of the application, the function call interface is taken over aiming at the thread local storage space of the application, module information can be obtained and stored through loading addresses when the function module calls the function call interface, stability detection of the application can be effectively realized, abnormal conditions can be positioned in the stability detection process, the part with abnormal running can be accurately analyzed, timely countermeasures can be made on the abnormal conditions, effectiveness and flexibility of application stability detection are guaranteed, the possibility of application breakdown is reduced, and the stability of the application is improved.
Corresponding to the above application stability detection method, the 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, including:
a processor 610, a memory 620, and a bus 630; memory 620 is used to store execution instructions, including memory 621 and external memory 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 the external memory 622 such as a hard disk, and 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 with each other through the bus 630, so that the processor 610 can perform the steps of the above-mentioned application stability detection method.
The specific execution process of the above instruction may refer to the steps of the application stability detection method described in the embodiments of the present disclosure, which are not described herein.
The disclosed embodiments also provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the application stability detection method described in the method embodiments above. Wherein the storage medium may be a volatile or nonvolatile computer readable storage medium.
The embodiments of the present disclosure further provide a computer program product, where the computer program product includes computer instructions, where the computer instructions, when executed by a processor, may perform the steps of the application stability detection method described in the foregoing method embodiments, and specifically, reference the foregoing method embodiments will not be described herein.
Wherein the above-mentioned computer program product may be realized in particular by means of hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied as a computer storage medium, and in another alternative embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK), or the like.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, for example, the division of the units is merely a logical function division, and there may be other manners of division in actual implementation, and for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, device or unit indirect coupling or communication connection, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in 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 essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Finally, it should be noted that: the foregoing examples are merely specific embodiments of the present disclosure, and are not intended to limit the scope of the disclosure, but the present disclosure is not limited thereto, and those skilled in the art will appreciate that while the foregoing examples are described in detail, it is not limited to the disclosure: any person skilled in the art, within the technical scope of the disclosure of the present disclosure, may modify or easily conceive changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features thereof; such modifications, changes or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the disclosure, and are intended to be included within the scope of the present disclosure. 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:
under the condition that a target application is started and the target application accords with a stability detection condition, a first function call interface for adding function identification information in key mapping of the target application is taken over; the key map comprises a plurality of storage positions for storing function identification information, and the plurality of storage positions contained in the key map correspond to a plurality of sub-storage spaces contained in the thread local storage space of the target application;
under the condition that the first function module is detected to call the first function call interface, determining module information of the first function module based on information when the first function module calls the first function call interface in a time dimension;
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, transmitting the plurality of module information stored in the storage space to a server.
2. The method according to claim 1, wherein in case the target application is currently started and the target application meets a stability detection condition, before taking over the first function call interface for adding function identification information in the key map of the target application, the method comprises:
In the process that the target application operates before the current starting, recording the storage quantity of function identification information in the key mapping in real time;
when the storage quantity exceeds a second preset information threshold value, abnormal operation information of the target application is sent to the server;
and 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 according to claim 1, wherein the determining module information of the first function module based on information when the first function module calls the first function call interface in a time dimension in a case that the first function module is detected to call the first function call interface comprises:
under the condition that the first function module is detected to call the first function call interface, acquiring a loading address corresponding to the position of the first function module;
backtracking to obtain a dynamic library corresponding to the loading address based on 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 is the same as the storage size of the key map, and comprises a plurality of subspaces which correspond 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 the plurality of module information stored in the storage space is transmitted to the 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 a key map of the target application under the condition that the target application is started and the target application meets a stability detection condition;
and deleting module information stored in the storage space and corresponding to the second function interface under the condition that the second function module is detected to call the second function interface.
7. The method according to claim 1, wherein after the plurality of module information stored in the storage space is transmitted 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 for the target application sent by a server is received, updating the target application based on the repair file;
traversing the storage space under the condition that the repair file sent by the server is not received, and screening out repeated module information; and deleting the function identification information corresponding to the repeated module information in the key mapping, and retaining the function identification information which is finally written in the time dimension.
8. An application stability detection apparatus, the apparatus comprising:
The interface take-over module is used for 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 the target application accords with the stability detection condition; the key map comprises a plurality of storage positions for storing function identification information, and the plurality of storage positions contained in the key map correspond to a plurality of sub-storage spaces contained in the thread local storage space of the target application;
the information determining module is used for determining module information of the first functional module based on information when the first functional module calls the first function call interface in a time dimension under the condition that the first functional module is detected to call the first function call interface;
the information storage module is used for storing the module information in a pre-applied storage space;
and the information sending module is used for sending 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 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 in communication over the bus when the electronic device is running, the machine readable instructions when executed by the processor performing the steps of the application stability detection method according to any of claims 1 to 7.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, performs the steps of the application stability detection method according to any 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 CN113688048A (en) 2021-11-23
CN113688048B true 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)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111756575B (en) * 2020-06-19 2023-08-11 北京星辰天合科技股份有限公司 Performance analysis method and device of storage server and electronic equipment
CN111782302B (en) * 2020-07-13 2021-05-14 腾讯科技(深圳)有限公司 Process updating method and device, storage medium and electronic equipment
CN112433877B (en) * 2020-12-01 2024-05-17 北京五八信息技术有限公司 Method and device for detecting application start-up crash, electronic equipment and storage medium

Also Published As

Publication number Publication date
CN113688048A (en) 2021-11-23

Similar Documents

Publication Publication Date Title
CN107832100B (en) APK plug-in loading method and terminal thereof
CN111680008B (en) Log processing method and system, readable storage medium and intelligent device
CN107908553B (en) Association testing method, application server and computer readable storage medium
CN110286997B (en) Multi-container application creation method, device, computer equipment and storage medium
CN109831351B (en) Link tracking method, device, terminal and storage medium
CN111752770A (en) Service request processing method, system, computer device and storage medium
US20180188990A1 (en) Method, apparatus and system for inserting disk
CN108241616B (en) Message pushing method and device
CN116743619B (en) Network service testing method, device, equipment and storage medium
CN113688048B (en) Application stability detection method and device, electronic equipment and storage medium
CN112966094A (en) Transaction data processing method, device and system
CN111159298B (en) Service request processing method and device, electronic equipment and storage medium
CN112256295A (en) Application program updating method, device, equipment and storage medium
CN113535580B (en) CTS test method, CTS test device and test equipment
CN111414270B (en) Exception handling method and device
CN112035379B (en) Method and device for using storage space, storage medium and electronic device
CN115310096A (en) Security vulnerability processing method, device, equipment and medium
CN108563578A (en) SDK compatibility detection method, device, equipment and readable storage medium storing program for executing
CN114217927A (en) Thread calling method and device, computer equipment and storage medium
CN113918373A (en) Memory leak monitoring method, memory leak detection method and corresponding devices
CN112231290A (en) Method, device and equipment for processing local log and storage medium
CN111026613B (en) Log processing method and device
CN110888686B (en) Application program starting method, device and storage medium
CN112631821A (en) Memory fault detection positioning method and device, computer equipment and storage medium
CN111538651A (en) Interface testing method, device, server 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

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.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant