Crash capture method and device, electronic equipment and storage medium

By setting time thresholds based on module frequency and adjusting check intervals, the method improves crash detection and handling efficiency in Windows applications by addressing third-party component interference.

CN120216235APending Publication Date: 2025-06-27ZHUHAI SEASUN MOBILE GAME TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510224913.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-27
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In Windows operating system environments, existing crash capture systems fail to detect application crashes due to third-party components registering the crash handling functions, leading to missed crash signals in applications.

Method used

A method involving setting time thresholds based on the frequency of module usage to check for third-party component registration of crash handling functions using timers, adjusting the check intervals based on module frequency, load times, and application performance to improve crash detection.

Benefits of technology

Enhances the probability of capturing application crashes by timely detection and handling, reducing resource consumption and improving crash handling efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120216235A_ABST
    Figure CN120216235A_ABST
Patent Text Reader

Abstract

The invention discloses a crash capture method and device, electronic equipment and a storage medium, and relates to the technical field of computers.The method comprises the steps that a corresponding time threshold value is set according to the occurrence frequency of each module; wherein each module is used for representing a third-party component needing to be called by a target application; and utilizing the timer to check whether a crash processing function of the crash processor is registered by the third-party component at a first time interval corresponding to the time threshold to obtain a crash capture result of the target application. The time threshold value is set according to the occurrence frequency of the modules of the third-party component, and then the timer is adjusted to check the time interval of the crashed processor, so that the timer regularly detects whether the crashed processing function of the crashed processor is registered by the third-party component or not at a proper first time interval period; therefore, the probability of capturing the crash of the target application is improved, the crash can be found more timely, and the timeliness of processing the crash can be further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method, apparatus, electronic device, and storage medium for crash capture. Background Art

[0002] Currently, in the environment of the Windows operating system, it is inevitable that an application crashes during operation. Existing crash capture systems register the corresponding crash capture APIs (application programming interfaces) in Windows so as to handle crash situations in the most appropriate way when the application crashes. However, the crash handling function for capturing crash signals in the Windows operating system environment is a chained structure, that is, the application or component that registers the crash handling function latest is most likely to handle the crash signal.

[0003] During the daily use of applications, there is a problem that the application has crashed but the in-application crash capture system has not received the crash capture signal. This is because the application may also load third-party components during operation, and the third-party components also register the crash handling function, resulting in the in-application crash capture system being unable to handle the crash. Summary of the Invention

[0004] The main purpose of the embodiments of this application is to propose a method, apparatus, electronic device, and storage medium for crash capture, so as to increase the probability of capturing application crashes, and further improve the timeliness of handling application crashes.

[0005] To achieve the above object, on the one hand, an embodiment of this application proposes a method for crash capture, and the method includes the following steps:

[0006] Set corresponding time thresholds according to the occurrence frequencies of each module; where each of the modules is used to represent third-party components that the target application needs to call;

[0007] Use a timer to check whether the crash handling function of the crash processor is registered by the third-party component at a first time interval corresponding to the time threshold, and obtain the crash capture result of the target application.

[0008] In some embodiments, after using the timer to check whether the crash handling function of the crash processor is registered by the third-party component at a first time interval corresponding to the time threshold and obtaining the crash capture result of the target application, the method further includes the following steps:

[0009] Determine a second time interval; the second time interval is different from the first time interval;

[0010] The step of using the timer to execute at the second time interval to check whether the crash handling function of the crash handler is registered by the third-party component, and obtaining the crash capture result of the target application.

[0011] In some embodiments, the determining the second time interval includes the following steps:

[0012] Obtain the identifier of the module loaded by the target application during runtime;

[0013] Enable the corresponding function check system according to the identifier of each module;

[0014] Use each function check system to record the loading times and existence time of the third-party component corresponding to each module;

[0015] Determine the second time interval according to the loading times and the existence time of each third-party component.

[0016] In some embodiments, after using the timer to check at the first time interval corresponding to the time threshold whether the crash handling function of the crash handler is registered by the third-party component and obtaining the crash capture result of the target application, the method further includes the following steps:

[0017] Determine the correlation between the running duration of the target application and the crash probability;

[0018] Determine the third time interval according to the correlation;

[0019] Use the timer to execute at the third time interval to check whether the crash handling function of the crash handler is registered by the third-party component, and obtain the crash capture result of the target application.

[0020] In some embodiments, before setting the corresponding time threshold according to the occurrence frequency of each module, the method further includes the following steps:

[0021] Obtain the occurrence frequency of the identifier of each module through the feedback system of the server of the target application to determine the occurrence frequency of each module.

[0022] In some embodiments, the checking whether the crash handling function of the crash handler is registered by the third-party component and obtaining the crash capture result of the target application includes the following steps:

[0023] When starting the target application or setting the crash handler for the first time, store the initial return value of the crash handler as the first return value;

[0024] Obtain the current return value of the crash handler as the second return value;

[0025] Compare whether the first return value is consistent with the second return value;

[0026] If they are consistent, it is determined that the crash handling function of the crash processor is registered by the target application, and the crash capture result of the target application is obtained as a crash signal that can be captured;

[0027] If they are inconsistent, it is determined that the crash handling function of the crash processor is registered by the third-party component, and the crash capture result of the target application is obtained as a crash signal that cannot be captured.

[0028] In some embodiments, the method further includes the following steps:

[0029] If it is detected by the timer that the crash handling function of the crash processor is registered by the third-party component, replace the registration party of the crash handling function of the crash processor with the target application.

[0030] In some embodiments, the target application includes a game application;

[0031] The method further includes at least one of the following steps:

[0032] Determine a fourth time interval according to the performance parameters of the device running the game application; use the timer to execute the step of checking whether the crash handling function of the crash processor is registered by the third-party component at the fourth time interval to obtain the crash capture result of the target application;

[0033] Or, determine a fifth time interval according to the game scenario of the game application; use the timer to execute the step of checking whether the crash handling function of the crash processor is registered by the third-party component at the fifth time interval to obtain the crash capture result of the target application.

[0034] In some embodiments, the setting of the corresponding time threshold according to the occurrence frequency of each module includes at least one of the following steps:

[0035] Set the corresponding time threshold according to the occurrence frequency corresponding to several modules of the third-party voice component called by the game application;

[0036] Or, set the corresponding time threshold according to the occurrence frequency corresponding to several modules of the third-party input method component called by the game application;

[0037] Or, set the corresponding time threshold according to the occurrence frequency corresponding to several modules of the graphics card driver component called by the game application.

[0038] To achieve the above object, on the other hand, an embodiment of the present application provides a crash capture device, which includes:

[0039] A time threshold setting unit, configured to set a corresponding time threshold according to the occurrence frequency of each module; wherein each of the modules is used to represent a third-party component required to be called by the target application;

[0040] A first crash check unit, configured to use a timer to check whether the crash handling function of the crash processor is registered by the third-party component at a first time interval corresponding to the time threshold, so as to obtain the crash capture result of the target application.

[0041] To achieve the above object, on the other hand, an embodiment of the present application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the above-mentioned crash capture method is implemented.

[0042] To achieve the above object, on the other hand, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned crash capture method is implemented.

[0043] The embodiments of the present application at least include the following beneficial effects:

[0044] The present application can set a corresponding time threshold according to the occurrence frequency of each module; wherein each module is used to represent a third-party component required to be called by the target application; use a timer to check whether the crash handling function of the crash processor is registered by the third-party component at a first time interval corresponding to the time threshold, so as to obtain the crash capture result of the target application. The present application sets the time threshold according to the occurrence frequency of the modules of the third-party component, and then adjusts the time interval for the timer to check the crash processor, so that the timer periodically detects whether the crash handling function of the crash processor is registered by the third-party component at a suitable first time interval, thereby increasing the probability of capturing the crash of the target application, being able to detect the crash more timely, and further improving the timeliness of handling the crash. Description of the Drawings

[0045] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required to be used in the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0046] Figure 1 It is a schematic flowchart of a crash capture method provided by an embodiment of the present application;

[0047] Figure 2 This is a schematic structural diagram of a crash capture device provided by an embodiment of the present application;

[0048] Figure 3 This is a schematic hardware structure diagram of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0049] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0050] It can be understood that the terms "first", "second", etc. used in the present application may be used herein to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if", "when" as used herein may be interpreted as "when...", "when...", or "in response to determining".

[0051] The terms "at least one", "multiple", "each", "any one", etc. used in the present application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any one refers to any one of the multiple.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the technical field to which the present application belongs. The terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0053] The embodiments of the present application provide a crash capture method, apparatus, electronic device, and storage medium, which relate to the field of computer technology. The crash capture method, apparatus, electronic device, and storage medium provided by the embodiments of the present application can be applied to terminals, can also be applied to servers, or can also be software running on terminals or servers. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, etc., but is not limited thereto; the server side can be configured as an independent physical server, can also be configured as a server cluster or a distributed system composed of multiple physical servers, or can also be configured as a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network; the software can be an application implementing a crash capture method, etc., but is not limited to the above forms.

[0054] The present application can be used in many general or specific computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multi-processor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, and so on. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0055] Referring to Figure 1 , the embodiments of the present application provide a crash capture method, which may include but is not limited to S110 to S120, specifically as follows:

[0056] S110: Set corresponding time thresholds according to the occurrence frequencies of each module; wherein, each of the modules is used to represent a third-party component required to be called by the target application.

[0057] First, the target application of the embodiments of the present application is described. The target application can be any application program on a computer system, and the application program that needs to be monitored and captured for crashes is selected as the target application. It can be understood that the third-party components in the embodiments of the present application are relative to the target application. In some cases, an application program can be the target application, but in other cases, the application program can be called by other application programs, that is, the application program can be a third-party component of other application programs.

[0058] In some embodiments, the target application can be an application program on the Windows system, such as an input method application, a music player application, a game application, or a live broadcast application, etc.; when the application programs in the above examples are called by other application programs, the application programs in the above examples can be used as third-party components.

[0059] Then, the modules of the embodiments of the present application are described. The relationship between the third-party component and the module can be one-to-one or one-to-many, that is, one third-party component can correspond to one module or multiple modules. For example, the third-party component is a voice component, and the voice component may include modules such as speech-to-text conversion, voice changer, and voice communication; or, the third-party component is an input method component, and the input method component may include modules such as an input method framework, input word prompt, and generative dialogue.

[0060] Specifically, when the target application runs, it may call each module in each third-party component. Therefore, the embodiments of the present application can obtain the occurrence frequency of each module and then determine the call frequency of the corresponding third-party component according to the occurrence frequency of each module. It can be understood that the more frequently the third-party component is called, the greater the probability that the crash handling function of the crash processor is registered by the third-party component, and thus the smaller the probability that the target application captures the crash signal. To increase the probability that the target application captures the crash signal, the embodiments of the present application can set corresponding time thresholds according to the occurrence frequency of each module. For example, the greater the occurrence frequency of each module, the smaller the corresponding event threshold is set.

[0061] S120: Use a timer to check whether the crash handling function of the crash processor is registered by the third-party component at a first time interval corresponding to the time threshold, and obtain the crash capture result of the target application.

[0062] Specifically, the running states of the target program may be different under different usage scenarios. Therefore, when the target program is started, it is difficult to predict the subsequent running state, and it is thus difficult to determine the call frequencies of each third-party component within a short period of time after startup. To address the above problems, embodiments of the present application may use the determined time threshold as a reference value, and then set a first time interval according to the reference value. Exemplarily, the duration of the first time interval may be longer than the time threshold, or the same or shorter. The specific setting may be determined according to the type and usage scenario of the target application.

[0063] After determining the first time interval, embodiments of the present application may set a timer. Based on this timer, after each duration of the first time interval has elapsed, it is checked whether the crash handling function of the crash handler is registered by a third-party component, and thus the crash capture result of the target application is obtained. Specifically, if it is checked that the crash handling function of the crash handler is registered by a third-party component, then in this case, when the target application crashes, the target application cannot capture the crash signal. Therefore, the crash capture result of the target application is that the crash signal cannot be captured. If it is checked that the crash handling function of the crash handler is not registered by a third-party component, but is registered by the target application, then in this case, when the target application crashes, the target application can capture the crash signal. Therefore, the crash capture result of the target application is that the crash signal can be captured.

[0064] In summary of the above implementation solutions, the beneficial effects of this embodiment include:

[0065] Regularly check whether the crash handling function of the crash handler is registered by a third-party component to determine whether the target application can capture a crash. Thus, when a crash occurs, the probability of the target application capturing the crash signal can be increased, and timely detection results can be provided for handling the crash.

[0066] In some embodiments, before S110, embodiments of the present application may further include the step of determining the occurrence frequencies of each module. S100 may include the following steps:

[0067] S100: Obtain the occurrence frequencies of the identifiers of each of the modules through the feedback system of the server of the target application to determine the occurrence frequencies of each of the modules.

[0068] It can be understood that the target application of this embodiment may communicate with the server, and the server may record each third-party component and each module called by the target application. Thus, in this embodiment, the occurrence frequencies of the identifiers of each module can be obtained through the feedback system of the server. Among them, each module of the third-party component may be set with its corresponding identifier, and the form of the identifier may include a name, a string, a number, a label, etc. Obtaining the identifier of the module may indicate that the module is called by the target application.

[0069] Exemplarily, if the identifier of a module appears once, it can indicate that the module is called once by the target application. Therefore, by determining the occurrence frequency of the identifier of the module, the occurrence frequency of each module can be determined.

[0070] In summary of the above implementation solutions, the beneficial effects of this embodiment include:

[0071] Through the feedback system of the server, the occurrence frequency of the identifier of each module can be accurately obtained, and then the occurrence frequency of each module can be accurately determined, that is, the frequency of each module being called by the target application. This embodiment can achieve efficient and accurate acquisition of the occurrence frequency of each module.

[0072] Furthermore, considering that in the case of the target application running for a long time in the future, the running state of the target application may be different from the running state at the initial startup, and the third-party components called and the calling frequency will also change. At this time, it may not be appropriate to continue using the first time interval determined when the target application is initially started to check the registration party of the crash handling function of the crash handler. To further improve the success rate of capturing crashes, after step S120, the embodiment of the present application may further include the following steps S131 to S132:

[0073] S131: Determine a second time interval; the second time interval is different from the first time interval.

[0074] It can be understood that in this embodiment, the second time interval can be determined according to the current running state of the target application. If the current running state of the target application is busier than that at the initial startup, and more third-party components and modules are called, the duration of the second time interval can be set shorter than the first time interval to increase the probability of the target application capturing the crash signal; if the current running state of the target application is more stable than that at the initial startup, and fewer third-party components and modules are called, the duration of the second time interval can be set longer than the first time interval to reduce the hardware resource consumption caused by checking whether the crash handling function of the crash handler is registered by a third-party component.

[0075] S132: Use the timer to execute the step of checking whether the crash handling function of the crash handler is registered by the third-party component at the second time interval to obtain the crash capture result of the target application.

[0076] It can be understood that in step S132, the timer is used to check whether the crash handling function of the crash handler is registered by a third-party component at a time interval different from that in step S120 (i.e., the second time interval), so as to obtain the crash capture result of the target application.

[0077] In summary of the above implementation solutions, the beneficial effects of this embodiment include:

[0078] In this embodiment, by updating the time interval (i.e., the second time interval) for timer checking to adapt to the current actual running state of the target application, the checking time can be shortened to increase the probability of capturing a crash signal, or the checking time can be increased to reduce the consumption of hardware resources.

[0079] As a further optional implementation manner, the step of S131 for determining the second time interval includes the following steps S1311 to S1314:

[0080] S1311: Obtain the identifier of the module loaded by the target application during operation.

[0081] Exemplarily, each module of the third-party component can be set with its corresponding identifier. The form of the identifier can include a name, a string, a number, a label, etc. Obtaining the identifier of the module indicates that the module is called by the target application.

[0082] S1312: Enable the corresponding function checking system according to the identifiers of the respective modules.

[0083] First, the function checking system is described. The function checking system of a module refers to the process of checking a module (or library, package) in programming to determine whether it contains specific functions, coroutines, or methods. This process is usually used to verify the integrity of the module, the availability of functions, and the correctness of the code. Specifically, the function checking system of a module can ensure whether the module is correctly installed and configured, avoiding application crashes or functional abnormalities caused by missing or incorrect modules. In addition, it can improve the reliability of the code, ensure the availability of the functions of the modules relied on in the code, and reduce errors caused by calling non-existent functions or methods.

[0084] Specifically, each module of the third-party component can be set with its corresponding function checking system, and this embodiment can enable the corresponding function checking system according to the identifiers of the respective modules.

[0085] S1313: Use each function checking system to record the loading times and existence times of the third-party component corresponding to each module.

[0086] Exemplarily, in this embodiment, each function check system can be used to determine whether each module responds to certain operations, and then determine whether each module is loaded, and then record the number of loading times. For example, for the speech-to-text module in the third-party component, this embodiment can use the function check system corresponding to the speech-to-text module to check whether the button of the speech-to-text module is pressed, so as to determine whether the speech-to-text module is loaded, and then record the total duration of the speech for performing speech conversion as the existence time of the speech-to-text module, that is, the time when speech-to-text is called by the target application. Or for the driver class module in the third-party component, this embodiment can use the function check system corresponding to the driver class module to check the number of times the driver class module is started as the number of loading times, and record the duration of the driver class module performing services as the existence time.

[0087] S1314: Determine the second time interval according to the number of loading times and the existence time of each of the third-party components.

[0088] In some embodiments, as long as a third-party component is loaded by the target application once, it is possible to register the crash handling function of the crash handler. And the longer the existence time of the third-party component, the more likely it is to register the crash handling function of the crash handler. Therefore, in order to increase the probability that the target application captures the crash signal and enable the target application to register the crash handling function of the crash handler, this embodiment can adaptively set the second time interval according to the number of loading times and the existence time of each third-party component, so as to reasonably use the timer to check whether the crash handling function of the crash handler is registered by the third-party component based on the second time interval, and then obtain the crash capture result of the target application.

[0089] In summary of the above implementation solutions, the beneficial effects of this embodiment include:

[0090] By determining the number of loading times and the existence time of the third-party component, and then adaptively setting the second time interval, it can better match the current actual running state of the target application. Then, the inspection time can be shortened to increase the probability of capturing the crash signal, or the inspection time can be increased to reduce the hardware resource consumption.

[0091] Based on the existing application crash statistics, it can be known that generally, when the running duration of the application exceeds a certain time, the probability of application crash will increase accordingly. To solve the above problem, as another further optional method, after S120, the embodiment of the present application may further include the following steps S141 to S143:

[0092] S141: Determine the correlation between the running duration of the target application and the crash probability.

[0093] It can be understood that the usage scenarios of different applications are different, resulting in different consumption of hardware resources by different applications. Therefore, different applications may have their corresponding crash probabilities under the same running duration. Thus, this embodiment can determine the correlation between the running duration and the crash probability of the target application. For example, the correlation between the running duration and the crash probability is determined through the historical statistical information of the target application, or the correlation between the running duration and the crash probability is determined through a predetermined usage plan.

[0094] S142: Determine a third time interval according to the correlation.

[0095] It can be understood that once the correlation between the running duration and the crash probability is obtained, the check interval of the timer can be adaptively adjusted, and the adjusted check interval is used as the third time interval.

[0096] S143: Use the timer to execute the step of checking whether the crash handling function of the crash handler is registered by the third-party component at the third time interval to obtain the crash capture result of the target application.

[0097] Specifically, this embodiment can use the timer to check whether the crash handling function of the crash handler is registered by the third-party component at the third time interval adjusted according to the correlation between the running duration and the crash probability, so as to obtain the crash capture result of the target application.

[0098] In summary of the above implementation, the beneficial effects of this embodiment include:

[0099] By adjusting the check interval of the timer according to the correlation between the running duration and the crash probability, the longer the running duration, the third time interval can be correspondingly shortened, thereby increasing the frequency of checking the crash handling function of the crash handler, and effectively solving the problem that when the running duration of the application exceeds a certain time, the crash probability of the application will increase accordingly.

[0100] In a further implementation manner, the step of checking whether the crash handling function of the crash handler is registered by the third-party component in the embodiment of the present application to obtain the crash capture result of the target application includes the following steps S201 to S205:

[0101] S201: When starting the target application or setting the crash handler for the first time, store the initial return value of the crash handler as the first return value.

[0102] It can be understood that when the target application is started or when the crash handler is set for the first time, at this time, the target application has not yet called the third-party component. The crash handling function of the crash handler is registered by the target application. In this case, the target application can capture the crash signal. Therefore, in this embodiment, the return value of the crash handler in the above case can be stored, and this return value is used as the first return value. It can be understood that different return values correspond to the crash handling functions of the crash handler being registered by different registrars. Therefore, if the return value of the crash handler is the first return value, it can indicate that the crash handling function of the crash handler is registered by the target application.

[0103] S202: Obtain the current return value of the crash handler as the second return value.

[0104] Specifically, the target application at the current time may have called the third-party component. Therefore, in this embodiment, the step is to obtain the current return value of the crash handler, and this return value is used as the second return value.

[0105] S203: Compare whether the first return value is consistent with the second return value.

[0106] Specifically, in this embodiment, it can be determined whether the return value of the crash handler when the target application is started or when the crash handler is set for the first time is consistent with the current return value of the crash handler.

[0107] S204: If they are consistent, it is determined that the crash handling function of the crash handler is registered by the target application, and the crash capture result of the target application is obtained as that the crash signal can be captured.

[0108] It can be understood that if the return values of the crash handler are consistent before and after, it can indicate that the crash handling function of the crash handler is registered by the target application. In this case, the target application can capture the crash signal through the crash handler. Therefore, it is determined that the crash capture result of the target application is that the crash signal can be captured.

[0109] S205: If they are inconsistent, it is determined that the crash handling function of the crash handler is registered by the third-party component, and the crash capture result of the target application is obtained as that the crash signal cannot be captured.

[0110] It can be understood that if the return values of the crash handler are inconsistent before and after, it can indicate that the crash handling function of the crash handler is not registered by the target application. In this case, the target application cannot capture the crash signal through the crash handler. Therefore, it is determined that the crash capture result of the target application is that the crash signal cannot be captured.

[0111] In summary of the implementation solutions, the beneficial effects of this embodiment include:

[0112] In this embodiment, by determining whether the return values of the crash handler at different times are consistent, it is possible to determine that the current registrant of the crash handling function of the crash handler has changed from the target application to a third-party component, thus implementing an efficient determination scheme.

[0113] To further increase the probability of the target application capturing a crash signal, the embodiments of the present application may further include the following steps:

[0114] S150: If it is detected by the timer that the crash handling function of the crash handler is registered by the third-party component, replace the registrant of the crash handling function of the crash handler with the target application.

[0115] It can be understood that when it is detected that the crash handling function of the crash handler is registered by a third-party component, if the target application crashes at this time, since the target application is not registered to the crash handling function of the crash handler and cannot capture the crash signal, to increase the probability of the target application capturing the crash signal, this embodiment can replace the registrant of the crash handling function of the crash handler with the target application, so that the target application can capture the crash signal through the crash handler, thereby increasing the probability of capturing the crash.

[0116] In summary of the implementation solutions, the beneficial effects of this embodiment include:

[0117] Keep the registrant of the crash handling function of the crash handler as the target application all the time, increasing the probability of the target application capturing the crash signal.

[0118] In some embodiments of the present application, it is mentioned that the target application may be a game application. Next, the solution of the present application will be described by taking the implementation manner where the target application is a game application as an example.

[0119] Specifically, this embodiment may further include at least one of the steps S161 or S162:

[0120] S161: Determine a fourth time interval according to the performance parameters of the device running the game application; use the timer to execute the step of checking whether the crash handling function of the crash handler is registered by the third-party component at the fourth time interval to obtain the crash capture result of the target application.

[0121] Exemplarily, the performance parameters of the device in this embodiment may include at least one of the following parameters:

[0122] Processor (CPU) parameters: The number of cores and main frequency of the processor determine the operation speed and processing ability of running the game application. A multi-core processor can process multiple tasks simultaneously, improving the smoothness and response speed of the game; a higher main frequency can quickly load game scenes and process various instructions in the game.

[0123] Graphics Processing Unit (GPU) Parameters: The GPU is a key factor affecting the quality and smoothness of game graphics. The GPU can convert the image data in the game into the graphics that players see. The performance of the GPU directly determines the quality and frame rate of the game graphics. A high-performance GPU can provide better image rendering effects, making the game graphics more realistic, while accelerating the rendering speed and reducing frame drops and latency.

[0124] Random Access Memory (RAM) Parameters: The size of the RAM directly affects the device's ability to run multiple programs. For games, a large amount of RAM can improve the smoothness of game operation, reducing frame drops and latency.

[0125] Storage (Hard Disk) Speed Parameters: A fast Solid State Drive (SSD) can greatly improve game loading speed.

[0126] In addition, for some devices (such as laptops), the resolution, refresh rate, and response time of the display also affect the smoothness and visual effects of the game.

[0127] In some embodiments, to match the actual running state of the game application, this embodiment can calculate a fourth time interval based on the above performance parameters, and then use a timer to check whether the crash handling function of the crash processor is registered by a third-party component at the fourth time interval, and then obtain the crash capture result of the target application.

[0128] S162: Determine a fifth time interval according to the game scenario of the game application; use the timer to execute the step of checking whether the crash handling function of the crash processor is registered by the third-party component at the fifth time interval, and obtain the crash capture result of the target application.

[0129] Exemplarily, the game scenario of this embodiment may include at least one of the following: open-world scenario, linear level scenario, board game scenario, battle scenario, dynamic environment scenario, interactive scenario, or virtual space social scenario.

[0130] It can be understood that different game scenarios may require different hardware resources (such as the computing resources of the CPU, the rendering resources of the GPU, and the storage and reading resources of the disk). For example, the board game scenario may require fewer hardware resources, while the battle scenario may require more hardware resources. The more hardware resources are called, the greater the probability of a crash.

[0131] Therefore, to solve the problem of different crash incidence rates brought by different game scenarios, this embodiment specifically determines the corresponding fifth time interval for different game scenarios, and then uses a timer to check whether the crash handling function of the crash processor is registered by a third-party component at the fifth time interval, and then obtains the crash capture result of the target application.

[0132] In summary of the above implementation solutions, the beneficial effects of this embodiment include:

[0133] By specifically setting corresponding time intervals for the device performance parameters and game scenarios that affect the crash probability of the game application, and then using a timer to detect the registration party of the crash handling function of the crash processor at the corresponding time intervals obtained, the probability of the game application capturing crash signals can be improved. In addition, specifically setting a time threshold can also reduce the hardware resource consumption caused by continuously monitoring the crash processor.

[0134] Considering that a game application may call multiple third-party components during operation, and the timing and frequency of registering crash handling functions for each module in each third-party component are different due to different loading times, existence times, or occupied hardware resources, resulting in a fixed time interval may not be suitable for all third-party components. To solve the above problems, in some embodiments of the present application, step S110 may include at least one of steps S111 to S113:

[0135] S111: Set a corresponding time threshold according to the occurrence frequencies corresponding to several modules of the third-party voice component called by the game application.

[0136] Exemplarily, the third-party voice component called by the game application may include modules such as speech-to-text conversion, voice changer, and voice communication. Then, in this embodiment, corresponding time thresholds can be set according to the occurrence frequencies of the above-mentioned respective modules.

[0137] S112: Set a corresponding time threshold according to the occurrence frequencies corresponding to several modules of the third-party input method component called by the game application.

[0138] Exemplarily, the third-party input method component called by the game application may include modules such as an input method framework, input word prompt, and generative dialogue. Then, in this embodiment, corresponding time thresholds can be set according to the occurrence frequencies of the above-mentioned respective modules.

[0139] S113: Set a corresponding time threshold according to the occurrence frequencies corresponding to several modules of the graphics card driver component called by the game application.

[0140] Exemplarily, the graphics card driver component called by the game application may include the following modules:

[0141] Kernel Driver module: This module is the core part of the graphics card driver component, directly interacts with the kernel of the operating system, and is responsible for handling low-level operations of the graphics card, such as memory management, hardware control, and task scheduling, to ensure that the graphics card can efficiently execute operations such as graphics rendering, video playback, and computing tasks.

[0142] User Mode Driver Module: This module provides an interface for interacting with user applications, processes calls to graphics APIs (such as DirectX, OpenGL, etc.), simplifies the development process, and allows applications to communicate with the graphics card through high-level APIs.

[0143] Graphics API Interface Module: Graphics card driver components typically implement support for various graphics APIs, such as DirectX, OpenGL, Vulkan, etc. These APIs provide standardized methods for interacting with the graphics card, allowing developers to write graphics applications without directly interacting with the graphics card hardware.

[0144] Control Panel and Configuration Tools: The graphics card driver component can come with a control panel or configuration tools. Users can adjust the settings of the graphics card, such as resolution, refresh rate, anti-aliasing, shadow quality, etc., through the control panel or configuration tools, providing a user-friendly interface that enables users to optimize the performance of the graphics card according to their needs.

[0145] Installation Program and Update Management Module: Graphics card driver components usually include an installation program for installing the graphics card driver component into the operating system and managing updates to the graphics card driver component, ensuring that the graphics card driver component is correctly installed and can detect old versions of the driver in the operating system for updates.

[0146] Documentation and Support File Module: Provides information about the functions, installation steps, and troubleshooting of the graphics card driver component, helping users understand how to use the graphics card driver component and solve possible problems.

[0147] Error Reporting and Logging Module: The graphics card driver component can have error reporting and logging functions. This module can record the operating status and error information of the graphics card driver component, helping to diagnose problems and provide support.

[0148] It can be understood that in this embodiment, the corresponding time threshold can be set according to the occurrence frequency of any of the above modules, and then the check interval when the game application calls the graphics card driver component can be adaptively adjusted.

[0149] In summary, the beneficial effects of this embodiment include:

[0150] In the embodiment of the present application, the corresponding time threshold can be determined according to each third-party component called by the game application, and then this time threshold can be used as a reference value. Then, the first time interval can be set according to this reference value, which can solve the problem that it is difficult to determine the call frequency of each third-party component in a short time after the game application starts, resulting in the inability to check the crash handling function at an appropriate time interval.

[0151] Next, specific application examples will be combined to introduce and explain the solutions of the embodiments of the present application in detail.

[0152] Specifically, this embodiment may include the following solutions:

[0153] 1. Obtain the module name of the third-party component according to the feedback system of the game application server, and set the corresponding time threshold according to the frequency of the module name; wherein, the time threshold can be dynamically adjusted according to the results feedback by the server.

[0154] Specifically, the higher the frequency of the module name appears, the more likely it is to be registered to the crash handling function of the crash handler, which indicates that the corresponding module is very likely to cause the game application to not receive a crash signal after crashing at this time. Therefore, the higher the frequency of the module name appears, the more frequently the timer needs to check, that is, the time threshold can be set smaller.

[0155] The relationship between the third-party component and the module name may be one-to-one or one-to-many. For example, the third-party components of the game application: the voice component, which may include modules such as speech-to-text conversion, voice changer, and voice communication; the input method component: the input method component may include modules such as the input method framework, input word hint, and generative dialogue.

[0156] Specifically, this time threshold can be used as a reference value when the game application starts running. According to this reference value, a suitable time interval is set, and then the timer is used to check whether the crash handling function of the crash handler is registered by the third-party component at this time interval, and then the crash capture result of the game application is obtained.

[0157] The time interval for the timer to check regularly is not necessarily equal to this time threshold. The shorter the time threshold is, the shorter the time interval for the timer to check regularly can be.

[0158] In the actual execution process of the application, it takes a certain amount of time to count the loading frequency and existence time of the third-party component. At this time, the timer needs this time threshold to maintain the stable execution of the application within a certain period of time, that is, this time threshold is similar to the role of a buffer pool.

[0159] 2. When the game application is running, check the module name of the loaded third-party component, start the corresponding function check system according to the module name, and record the loading times and existence time of the called third-party component.

[0160] Exemplarily, if the loading times of the third-party component feedback by the server decrease, the time interval for checking the registration party of the crash handling function of the crash handler can be increased accordingly to minimize the impact on the running performance of the game application itself caused by the crash handler.

[0161] Among them, each module of the third-party component may have its corresponding function checking system.

[0162] In some embodiments, for example, a certain input method is loaded 10 times during the operation of a game application, and the running duration is 30 minutes. The corresponding timer originally checks once every 15 minutes. To prevent the input method from registering to the crash handling function and causing the game application to be unable to capture the crash signal, in this embodiment, after the first loading of the input method, the game application can immediately re-register to the crash handling function, and during the entire loading duration of the input method, change the original check once every 15 minutes to once every 1 minute or 2 minutes. In this case, in actual operation, the performance of the device running the game application at this time and the scene where the game is running may also need to be considered. If the device performance is low or the game is in an important scene, the timing detection time may be adjusted to once every 3 minutes or 4 minutes. Exemplarily, loading 10 times within 30 minutes belongs to high-frequency triggering, and the time interval for the timer to check can be appropriately shortened.

[0163] 3. In the game application, according to the inspection result of the inspection system (for example, for the input method, it can monitor whether the chat box of the game is pulled in the game, when the chat box is closed), each time the third-party component is loaded, it may re-register to the crash handling function of the crash handler. To increase the probability of the game application capturing the crash signal, this embodiment can reconfigure the time interval for checking the crash handler according to this inspection result.

[0164] Exemplarily, the inspection result may include: when the chat box in the game application is pulled up or closed, record the loading times and existence time of the chat box; when the third-party component is a speech-to-text module, it can check the number of times the button of the speech-to-text module is pressed and the total speech duration of performing speech conversion to text; or when the third-party component is a graphics card driver component, it can check the number of times the service of the graphics card driver component is started and the service execution duration of the driver, etc.

[0165] 4. Set the time interval of the timer according to the time threshold obtained when the game application is initially started, and then use the timer to check whether the crash handling function of the crash handler is registered by the third-party component according to this time interval.

[0166] In some embodiments, this embodiment can also first use the function checking system of each module to record the loading times and existence time of each module, and then adjust the time interval of the timer according to the loading times and existence time of each module, that is, the more frequently the third-party component is loaded and the longer its existence time, the higher the frequency of timing checks.

[0167] In addition, this embodiment can also adjust the time interval of the timer according to the correlation between the game running duration and the crash probability feedback by the server.

[0168] In some embodiments, based on the crash statistics collected by the server, when the running duration of the game application exceeds a certain time, the probability of crashing will increase. To increase the probability of the game application capturing crash signals, the longer the running duration of the game application, the inspection frequency of the timer can be appropriately increased according to the device performance and the game scenario. For game scenarios with a relatively high crash rate, the inspection frequency of the timer can also be adjusted.

[0169] Regarding how to reduce the probability of the game application crashing, the reason for crashing during long-term operation of the game application is crucial because the crash rate increases with the increase in game duration. To solve the above problems, the correlation between the game running duration and the crash probability is required to adjust the time interval of the timer, so that the game application can register the crash handling function and thus be able to capture crash signals.

[0170] When the crash handling function of the crash handler is registered by a third-party component, this embodiment can obtain the pre-stored return value, which is the initial return value of the crash handler when the game application is started or when the crash handler is first set. At the same time, this embodiment can also obtain the current return value of the crash handler, and then compare whether the initial return value and the current return value are consistent. If they are consistent, it means that the crash handling function of the crash handler is registered by the game application, and the game application can capture crash signals; if they are inconsistent, it means that the crash handling function of the crash handler is registered by a third-party component. At this time, the registration party of the crash handling function can be replaced by the game application, so that the game application can capture crash signals.

[0171] In summary of the above implementation solutions, the beneficial effects of this embodiment include:

[0172] This embodiment can significantly increase the probability of the game application capturing crash signals, minimize the capture of crash signals by third-party components, and at the same time set a time threshold to periodically check the registration party of the crash handling function, which can also reduce the hardware resource consumption caused by continuously monitoring the crash handling function.

[0173] Referring to Figure 2 , this application embodiment also provides a crash capture device, which can implement the above-mentioned crash capture method. The device includes:

[0174] A time threshold setting unit for setting corresponding time thresholds according to the occurrence frequencies of each module; wherein each of the modules is used to represent a third-party component that the target application needs to call;

[0175] A first crash inspection unit for using a timer to check whether the crash handling function of the crash handler is registered by the third-party component at a first time interval corresponding to the time threshold, and obtaining the crash capture result of the target application.

[0176] In some embodiments, the device further includes:

[0177] A first timing setting unit, configured to determine a second time interval; the second time interval is different from the first time interval;

[0178] A second crash check unit, configured to use the timer to execute, at the second time interval, a step of checking whether a crash handling function of the crash handler is registered by the third-party component, so as to obtain a crash capture result of the target application.

[0179] In some embodiments, the first timing setting unit includes:

[0180] An identifier acquisition unit, configured to acquire an identifier of the module loaded during the operation of the target application;

[0181] A system startup check unit, configured to start a corresponding function check system according to the identifiers of the respective modules;

[0182] A data recording unit, configured to use each of the function check systems to record the loading times and existence times of the third-party components corresponding to the respective modules;

[0183] A first timing setting subunit, configured to determine the second time interval according to the loading times and the existence times of the respective third-party components.

[0184] In some embodiments, the device further includes:

[0185] An association relationship determination unit, configured to determine an association relationship between the running duration of the target application and the crash probability;

[0186] A second timing setting unit, configured to determine a third time interval according to the association relationship;

[0187] A third crash check unit, configured to use the timer to execute, at the third time interval, a step of checking whether a crash handling function of the crash handler is registered by the third-party component, so as to obtain a crash capture result of the target application.

[0188] In some embodiments, the device further includes:

[0189] A frequency determination unit, configured to obtain the occurrence frequencies of the identifiers of the respective modules through a feedback system of the server of the target application to determine the occurrence frequencies of the respective modules before setting corresponding time thresholds according to the occurrence frequencies of the respective modules.

[0190] In some embodiments, the device includes a crash check subunit, which is configured to check whether the crash handling function of the crash handler is registered by the third-party component to obtain the crash capture result of the target application;

[0191] Checking whether the crash handling function of the crash handler is registered by the third-party component to obtain the crash capture result of the target application includes the following steps:

[0192] When starting the target application or setting the crash handler for the first time, store the initial return value of the crash handler as the first return value;

[0193] Obtain the current return value of the crash handler as the second return value;

[0194] Compare whether the first return value is consistent with the second return value;

[0195] If they are consistent, it is determined that the crash handling function of the crash handler is registered by the target application, and the crash capture result of the target application is a crash signal that can be captured;

[0196] If they are inconsistent, it is determined that the crash handling function of the crash handler is registered by the third-party component, and the crash capture result of the target application is a crash signal that cannot be captured.

[0197] In some embodiments, the device further includes:

[0198] A registration replacement unit, which is configured to replace the registrant of the crash handling function of the crash handler with the target application if it is detected by the timer that the crash handling function of the crash handler is registered by the third-party component.

[0199] In some embodiments, the target application includes a game application;

[0200] The device further includes:

[0201] A fourth crash check unit, which is configured to determine a fourth time interval according to the performance parameters of the device running the game application; use the timer to execute the step of checking whether the crash handling function of the crash handler is registered by the third-party component at the fourth time interval to obtain the crash capture result of the target application;

[0202] A fifth crash check unit, which is configured to determine a fifth time interval according to the game scenario of the game application; use the timer to execute the step of checking whether the crash handling function of the crash handler is registered by the third-party component at the fifth time interval to obtain the crash capture result of the target application.

[0203] In some embodiments, the time threshold setting unit includes:

[0204] A first time threshold setting subunit, configured to set a corresponding time threshold according to the occurrence frequencies corresponding to several modules of the third-party voice component called by the game application;

[0205] A second time threshold setting subunit, configured to set a corresponding time threshold according to the occurrence frequencies corresponding to several modules of the third-party input method component called by the game application;

[0206] A third time threshold setting subunit, configured to set a corresponding time threshold according to the occurrence frequencies corresponding to several modules of the graphics card driver component called by the game application.

[0207] It can be understood that the content in the above method embodiments is applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0208] An embodiment of the present application further provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the above-mentioned crash capture method. The electronic device can be any intelligent terminal including a tablet computer, an in-vehicle computer, etc.

[0209] It can be understood that the content in the above method embodiments is applicable to the device embodiments. The functions specifically implemented by the device embodiments are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0210] Please refer to Figure 3 , Figure 3 which schematically shows the hardware structure of an electronic device in another embodiment. The electronic device includes:

[0211] A processor 301, which can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is configured to execute relevant programs to implement the technical solutions provided by the embodiments of the present application;

[0212] The memory 302 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), etc. The memory 302 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 302 and are called by the processor 301 to execute a crash capture method according to an embodiment of this application;

[0213] The input / output interface 303 is used to implement information input and output;

[0214] The communication interface 304 is used to implement communication interaction between this device and other devices. Communication can be achieved through a wired manner (such as USB, network cable, etc.) or through a wireless manner (such as mobile network, WIFI, Bluetooth, etc.);

[0215] The bus 305 transmits information between various components of the device (such as the processor 301, the memory 302, the input / output interface 303, and the communication interface 304);

[0216] Among them, the processor 301, the memory 302, the input / output interface 303, and the communication interface 304 are communicatively connected to each other inside the device through the bus 305.

[0217] An embodiment of this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned crash capture method is implemented.

[0218] It can be understood that the content in the above method embodiments is applicable to this storage medium embodiment. The functions specifically implemented by this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those in the above method embodiments.

[0219] As a non-transitory computer-readable storage medium, the memory can be used to store non-transitory software programs and non-transitory computer-executable programs. In addition, the memory can include high-speed random access memory, and can also include non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely set relative to the processor, and these remote memories can be connected to the processor through a network. Examples of the above networks include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0220] The embodiments described in the embodiments of the present application are for more clearly illustrating the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. Those skilled in the art will know that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present application are equally applicable to similar technical problems.

[0221] Those skilled in the art can understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or combine certain steps, or different steps.

[0222] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0223] Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, and their appropriate combinations.

[0224] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0225] It should be understood that in this application, "at least one (item)" means one or more, and "a plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" may represent: only A exists, only B exists, and both A and B exist simultaneously. Here, A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item) of the following" or its similar expression refers to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0226] In several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the above division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of devices or units can be in electrical, mechanical, or other forms.

[0227] The units described above as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0228] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.

[0229] When an integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes: various media that can store programs, such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.

[0230] The preferred embodiments of the embodiments of this application have been described above with reference to the accompanying drawings, which does not limit the scope of rights of the embodiments of this application. Any modifications, equivalent replacements, and improvements made by those skilled in the art without departing from the scope and essence of the embodiments of this application shall be within the scope of rights of the embodiments of this application.

Claims

1. A crash capture method, characterized in that: The method comprises the following steps: Setting a corresponding time threshold according to the frequency of occurrence of each module; wherein each of the modules is used to characterize a third-party component that needs to be called by the target application; A timer is used to check whether a crash processing function of a crash processor is registered by the third-party component at a first time interval corresponding to the time threshold, so as to obtain a crash capture result of the target application.

2. A crash capture method according to claim 1, characterized in that: After using the timer to check whether the crash handling function of the crash handler is registered by the third-party component at the first time interval corresponding to the time threshold and obtaining the crash capture result of the target application, the method further includes the following steps: determining a second time interval; the second time interval being different from the first time interval; The step of checking whether the crash handling function of the crash handler is registered by the third-party component is performed by using the timer at the second time interval to obtain the crash capture result of the target application.

3. A crash capture method according to claim 2, characterized in that: Determining the second time interval comprises the following steps: Obtaining an identifier of the module loaded by the target application at runtime; Open the corresponding function checking system according to the identification of each module; Using each of the function inspection systems to record the number of times the third-party components corresponding to each of the modules are loaded and the existence time; The second time interval is determined according to the loading times and the existence time of each of the third-party components.

4. A crash capture method according to claim 1, characterized in that: After using the timer to check whether the crash handling function of the crash handler is registered by the third-party component at the first time interval corresponding to the time threshold and obtaining the crash capture result of the target application, the method further includes the following steps: Determine a correlation between the running time of the target application and the crash probability; Determine a third time interval according to the association relationship; The step of checking whether the crash handling function of the crash handler is registered by the third-party component is performed by using the timer at the third time interval to obtain the crash capture result of the target application.

5. A crash capture method according to claim 1, characterized in that: Before setting the corresponding time threshold according to the occurrence frequency of each module, the method further includes the following steps: The occurrence frequency of the identifier of each module is obtained through the feedback system of the server of the target application to determine the occurrence frequency of each module.

6. A crash capture method according to claim 1, characterized in that: The step of checking whether the crash handling function of the crash handler is registered by the third-party component and obtaining the crash capture result of the target application comprises the following steps: When the target application is started or the crash handler is set for the first time, storing an initial return value of the crash handler as a first return value; Obtaining a current return value of the crash handler as a second return value; Compare whether the first return value is consistent with the second return value; If they are consistent, it is determined that the crash handling function of the crash handler is registered by the target application, and the crash capture result of the target application is a captureable crash signal; If they are inconsistent, it is determined that the crash processing function of the crash handler is registered by the third-party component, and the crash capture result of the target application is that the crash signal cannot be captured.

7. A crash capture method according to claim 1, characterized in that: The method further comprises the following steps: If it is detected by the timer that the crash processing function of the crash handler is registered by the third-party component, the registration party of the crash processing function of the crash handler is replaced with the target application.

8. A crash capture method according to any one of claims 1 to 7, characterized in that: The target application includes a game application; The method further comprises at least one of the following steps: Determine a fourth time interval according to the performance parameters of the device running the game application; use the timer to perform the step of checking whether the crash handling function of the crash processor is registered by the third-party component at the fourth time interval to obtain the crash capture result of the target application; Alternatively, the fifth time interval is determined according to a game scenario of the game application; The step of checking whether the crash handling function of the crash handler is registered by the third-party component is performed by using the timer at the fifth time interval to obtain the crash capture result of the target application.

9. A crash capture method according to claim 8, characterized in that: The step of setting the corresponding time threshold according to the occurrence frequency of each module includes at least one of the following steps: Setting the corresponding time threshold according to the occurrence frequencies corresponding to the plurality of modules of the third-party voice component called by the game application; Alternatively, the corresponding time threshold is set according to the occurrence frequencies corresponding to the plurality of modules of the third-party input method component called by the game application; Alternatively, the corresponding time threshold is set according to the occurrence frequency corresponding to the several modules of the graphics card driver component called by the game application.

10. A crash capture device, characterized in that: The device comprises: A time threshold setting unit, used to set a corresponding time threshold according to the frequency of occurrence of each module; wherein each of the modules is used to represent a third-party component that needs to be called by the target application; The first crash checking unit is used to use a timer to check whether a crash processing function of a crash processor is registered by the third-party component at a first time interval corresponding to the time threshold, so as to obtain a crash capture result of the target application.

11. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements a crash capture method as claimed in any one of claims 1 to 9 when executing the computer program.

12. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, a crash capture method according to any one of claims 1 to 9 is implemented.