Application crash handling method and apparatus, and electronic device and readable storage medium
By reading flag bit information at the application startup, identifying the last crash, switching to historical configuration and restricting functional module updates, solving frequent crashes during the application startup phase, improving user experience and reducing customer churn.
Patent Information
- Application Number
- PCT/CN2025/070849
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-02-07
- Filing Date
- 2025-01-06
- Publication Date
- 2025-08-14
AI Technical Summary
The application frequently crashes during the startup phase, resulting in bad user experience. The existing trycatch protection mechanism cannot fully protect the Native layer from crashing, and configuration updates may cause repeated crashes.
By reading flag bit information when the application starts, identifying the last crash, switching to the historical configuration, closing the functional module that caused the crash, setting the limit time limit for the functional module to update the configuration, restarting the application in time, and avoiding frequent crashes.
Reduce the frequency of crashes when application startup, improve user experience, reduce customer churn, simplify back-end transformation, and reduce application startup time and performance impact.
Smart Images

Figure CN2025070849_14082025_PF_FP_ABST
Abstract
Description
Application crash processing method, device, electronic device and readable storage medium
[0001] This application claims priority to Chinese patent application No. 2024101725789, filed on February 7, 2024, entitled “Application crash handling method, device, electronic device and readable storage medium”. The contents disclosed in the above-mentioned Chinese patent application are hereby cited in their entirety as part of this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to an application crash processing method, device, electronic device, and readable storage medium. Background Art
[0003] If an app crashes after turning on the startup switch, the app will not be able to obtain the new configuration from the configuration platform. If the crash is not handled promptly, the app may crash repeatedly during startup, and even more seriously, it may cause severe user loss. Summary of the Invention
[0004] The purpose of this application is to provide an application crash processing method, device, electronic device and readable storage medium, which can improve the situation where crashes frequently occur during the application startup phase.
[0005] In a first aspect, the present invention provides an application crash processing method, comprising: obtaining flag information of the application when the application is started, wherein the flag information is read through a preset tracking point when the application is started; if the flag information of the application is a first value, switching the application from the current configuration to the historical configuration, and executing the historical configuration, wherein the flag information is the first value indicating that the application crashed during the last startup phase.
[0006] In the method of the embodiment of the present application, by setting the flag information, it can be discovered at startup whether a crash occurred during the previous startup. If a crash occurred, the switching configuration can be started in time to execute the historical configuration, thereby reducing the probability of a crash occurring again and improving the user experience.
[0007] In an optional embodiment, the method further includes: identifying, through application monitoring, the first functional module that caused the application to crash during the last startup phase; and sending a processing request for the first functional module to the configuration platform, wherein the processing request is used to instruct the configuration platform to stop issuing configuration items corresponding to the first functional module.
[0008] In the above implementation, the function module that crashed can be closed in time, which can prevent the function module from causing a crash again, reduce the crash frequency of the application, and improve user experience.
[0009] In an optional embodiment, the method further includes: executing the latest configuration of the second functional module corresponding to the configuration obtained by the application that crashed in the last startup phase after waiting for a limited time limit, wherein the second functional module is the updated functional module corresponding to the configuration obtained in the last startup phase, and the second functional module is different from the first functional module.
[0010] In an optional implementation manner, the time limit includes: a real-time timestamp and a time limit.
[0011] In an optional embodiment, the time limit includes: a countdown timer.
[0012] In the above implementation, a time limit is set for the latest configuration when a crash may occur, limiting the effectiveness of the latest configuration to stop the crash during application startup and prevent the application from crashing again.
[0013] In an optional implementation, when the application is started, if the application monitoring identifies that the application has crashed, the application is restarted.
[0014] In the above implementation, if a crash is detected when the application is started, the application can be automatically restarted, which can reduce the user experience of the crash.
[0015] In an optional implementation, the method further includes: if the flag information of the application is a second value, obtaining the latest configuration of the application, wherein the flag information being the second value indicates that the application did not crash during the last startup phase.
[0016] In the above embodiment, even if the flag information indicates that the application did not crash last time, it is still possible to identify whether the latest configuration has restrictions, thereby reducing the probability of crashes and improving user experience.
[0017] In an optional embodiment, the method further includes: when the application is started, if it is detected that the application has crashed, updating the flag information to the first value; when the application is started, if the application has not crashed and the latest configuration of the application is obtained from the configuration platform, updating the flag information to the second value.
[0018] In an optional implementation manner, when the application is started, if the flag information of the application is not obtained, the configuration file of the application is read from the local computer and the configuration file is executed.
[0019] In an optional embodiment, the method further includes: reading a third functional module from a configuration file of the application, wherein the third functional module is a functional module in the application that is updated, and the third functional module includes the second functional module and does not include the first functional module; if the current time is within a time limit of the third functional module, loading the historical configuration of the third functional module and executing the historical configuration of the third functional module, wherein the time limit of the third functional module is the time limit set when obtaining the current configuration of the third functional module.
[0020] In a second aspect, the present invention provides an application crash processing device, comprising an acquisition module for acquiring flag information of the application when the application is started, wherein the flag information is read when the application is started through a preset tracking point; an execution module for switching the application from the current configuration to the historical configuration and executing the historical configuration if the flag information of the application is a first value, wherein the flag information being the first value indicates that the application crashed during the last startup phase.
[0021] In a third aspect, the present invention provides an electronic device comprising: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method described in any of the aforementioned embodiments.
[0022] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which executes the steps of the method described in any of the aforementioned embodiments when the computer program is executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.
[0024] FIG1 is a schematic diagram of an operating environment of an application crash processing method provided in an embodiment of the present application;
[0025] FIG2 is a block diagram of an electronic device provided in an embodiment of the present application;
[0026] FIG3 is a flow chart of an application crash processing method provided by an embodiment of the present application;
[0027] FIG4 is a schematic diagram of the functional modules of the application crash processing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application.
[0029] It should be noted that similar reference numerals and letters represent similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and should not be understood as indicating or implying relative importance.
[0030] Currently, applications add many features during their updates and iterations. Due to the uncertainty of new features and the inability to fully test them, a bug may go undetected, leading to the bug being introduced online. This can cause online crashes and a poor user experience. Considering that the application startup phase performs important tasks such as initializing basic libraries, crashes during this phase are likely to lead to subsequent crashes or functional anomalies. If left unaddressed, this can cause repeated app startup crashes, resulting in a very negative user experience.
[0031] To address this, the current approach to crashes during application startup is to add trycatch protection to the code. Trycatch is an error handling mechanism that catches and handles exceptions within a program. Within the try block, you write code that may cause exceptions. If an exception occurs within the try block, the program jumps to the catch block. Within the catch block, you write code to handle the exception, such as printing an error message or performing other actions. This mechanism prevents program crashes and provides better error handling and user experience. However, trycatch protection only applies to Java-layer code.
[0032] Based on this, the present application provides an application crash processing method, device, electronic device, and readable storage medium that can reduce the frequency of application crashes at startup. Furthermore, there are various function on and off options in the configuration platform. When the online crash monitoring platform detects a crash, it promptly sends the shutdown configuration of the relevant function through the configuration platform. The application side pulls the latest configuration and switches to the original logic, avoiding crashes caused by the new configuration of the execution function, thereby reducing the probability of a crash the next time the application is started.
[0033] To facilitate understanding of this embodiment, the operating environment of an application crash handling method disclosed in the embodiment of this application is first introduced in detail.
[0034] As shown in Figure 1, a schematic diagram of the operating environment of the application crash processing method provided in an embodiment of the present application is shown. The operating environment of the application crash processing method includes a server 110 and an electronic device 120. A configuration platform runs in the server 110, and an application runs in the electronic device 120. The server 110 is connected to one or more electronic devices 120 via a network for data communication or interaction. The server 110 can be a network server, a database server, etc. The electronic device 120 can be a personal computer (PC), a tablet computer, a smart phone, a personal digital assistant (PDA), etc.
[0035] Figure 2 is a block diagram of an electronic device. Electronic device 120 may include a memory 121, a storage controller 122, a processor 123, a peripheral interface 124, an input / output unit 125, and a display unit 126. Those skilled in the art will appreciate that the structure shown in Figure 2 is merely illustrative and does not limit the structure of electronic device 120. For example, electronic device 120 may include more or fewer components than shown in Figure 2, or may have a configuration different from that shown in Figure 2.
[0036] The aforementioned memory 121, storage controller 122, processor 123, peripheral interface 124, input / output unit 125, and display unit 126 are electrically connected to each other, directly or indirectly, to enable data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines. The aforementioned processor 123 is used to execute the executable modules stored in the memory.
[0037] The memory 121 may be, but is not limited to, a random access memory (RAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc. The memory 121 is used to store programs, and the processor 123 executes the programs after receiving an execution instruction. The method executed by the electronic device 120 defined by the process disclosed in any embodiment of the present application can be applied to the processor 123 or implemented by the processor 123.
[0038] The processor 123 may be an integrated circuit chip with signal processing capabilities. The processor 123 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gates or transistor logic devices, or discrete hardware components. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application may be implemented or executed. The general-purpose processor may be a microprocessor or any conventional processor.
[0039] The peripheral interface 124 couples various input / output devices to the processor 123 and the memory 121. In some embodiments, the peripheral interface 124, the processor 123, and the memory controller 122 can be implemented in a single chip. In other embodiments, they can be implemented in separate chips.
[0040] The input / output unit 125 is used to provide input data to the user and can be, but not limited to, a mouse and a keyboard.
[0041] The display unit 126 provides an interactive interface (e.g., a user interface) between the electronic device 120 and the user or is used to display image data for the user's reference. In this embodiment, the display unit can be a liquid crystal display or a touch display. If it is a touch display, it can be a capacitive touch screen or a resistive touch screen that supports single-point and multi-point touch operations. Supporting single-point and multi-point touch operations means that the touch display can sense touch operations generated simultaneously from one or more locations on the touch display and pass the sensed touch operations to the processor for calculation and processing.
[0042] The electronic device 120 in this embodiment can be used to execute each step in each method provided in the embodiments of the present application. The following describes in detail the implementation process of the application crash handling method through several embodiments.
[0043] Please refer to Figure 3, which is a flow chart of the application crash handling method provided in an embodiment of the present application. The application crash handling method in this embodiment can be applied to an electronic device in which an application is running. The specific process shown in Figure 3 will be described in detail below.
[0044] Step 210: When the application is started, obtain the flag information of the application.
[0045] Among them, the flag information is read through the preset tracking point when the application starts.
[0046] Optionally, the preset tracking location may be at the start of the application code. For example, the start of the code may represent the location of the first line of code when the application is executed.
[0047] The first value of the flag bit information indicates that the application crashed during the last startup.
[0048] The first value and the second value of the flag information can be set as needed, and can be set according to usage habits. For example, the first value can be flag1, and the second value can be flag2. For another example, the first value can also be 1, and the second value can also be 0.
[0049] In other cases, if the flag information of the application is empty, or the flag information of the application does not exist, it may indicate that the application is currently started for a newly added user device, and the local default configuration file of the current device may be directly read.
[0050] Optionally, if the flag information of the application is not assigned a value, an initial value may be set for the flag information of the application. The initial value may be a value different from the first value and the second value. For example, the initial value may be flag0.
[0051] Optionally, if the flag information of the application is empty, a value can be set for the flag information. The value can be determined based on whether the application crashes when it is started this time. If no crash occurs, the flag information can be set to the second value. If a crash occurs, the flag information can be set to the first value.
[0052] Step 220: If the flag information of the application is the first value, switch the application from the current configuration to the historical configuration, and execute the historical configuration.
[0053] If the flag information of the application is the first value, it can indicate that a crash occurred when the application was last started in the current device. In order to avoid a crash caused by obtaining and executing the latest configuration this time, the historical configuration of the application can be executed this time.
[0054] The historical configuration may represent a configuration that the application has successfully started and run in history. For example, the historical configuration may be a configuration that the application used to run before the application crashed.
[0055] In this embodiment, when the application is started, after it is detected that the application has crashed and the flag information has been identified, the flag information may be updated to the first value.
[0056] Considering that crash processing can be performed based on the flag information only after the flag information is identified, the flag information is updated at a timing determined after the flag information is identified.
[0057] When the application is started, if the application has not crashed and the latest configuration of the application is obtained from the configuration platform, the flag information is updated to a second value. The second value can be used to mark that the application has not crashed when it is started.
[0058] Through the above settings, if it is detected that the application has crashed last time, in order to avoid repeated crashes, the latest configuration of the application can be not executed first. From the user's point of view, repeated crashes when the application is started can be avoided, which can also reduce the customer churn rate caused by application crashes.
[0059] Considering that the functional module that causes the crash may be persistent and will not disappear due to the restart of the application, for this situation, the application crash processing method provided by the present application may also include steps 230 and 240.
[0060] Step 230: Identify, through application monitoring, the first functional module that caused the application to crash during the last startup phase.
[0061] For example, the startup of the application can be monitored by application monitoring. When the monitoring finds that the first functional module causes the application to crash, step 240 is performed.
[0062] Exemplarily, the first functional module may be a function in the application, for example, the first functional module may be a login functional module, a data acquisition functional module, etc.
[0063] Step 240: Send a processing request of the first functional module to the configuration platform.
[0064] The processing request is used to instruct the configuration platform to stop issuing configuration items corresponding to the first functional module. For example, after receiving the processing request from the first functional module, the configuration platform can shut down the first functional module, so that the electronic device will no longer issue the corresponding updated configuration items of the first functional module after sending a configuration acquisition request for the application next time.
[0065] Optionally, when a crash is detected, you can click Close on the configuration platform.
[0066] Through the above method, the function module that causes the crash can be closed in time, and the configuration platform will no longer issue updated configurations of the function module, reducing the occurrence of frequent crashes caused by abnormalities in a function module.
[0067] If an application crashes during startup, it may be caused by an anomaly in the updated configuration of some functional modules, or it may be caused by a delay in the effectiveness of the updated configuration of the functional modules. Based on this, the application crash processing provided by the embodiment of the present application may also include: for the second functional module corresponding to the configuration obtained by the application that crashed during the previous startup phase, executing the latest configuration of the second functional module after waiting for a limited time.
[0068] The second functional module is an updated functional module corresponding to the configuration obtained in the last startup phase, and the second functional module is different from the first functional module.
[0069] For example, a time limit may be set for the second functional module corresponding to the latest configuration obtained during the last startup of the application that crashed during the last startup.
[0070] The time limit can be used to limit the effective time of the updated configuration. If the updated configuration time of the functional module is still within the time limit, it means that the updated configuration of the functional module has not yet taken effect. In this case, you can wait until the updated configuration of the functional module takes effect before using the updated configuration of the functional module.
[0071] In one embodiment, the time limit can be implemented by a real-time timestamp and a time limit. Setting a time limit for the functional module corresponding to the latest configuration of the crashed application may include setting a real-time timestamp and a time limit for a second functional module of the application.
[0072] For the second functional module, when the second functional module generates the current latest configuration or obtains the current latest configuration, a real-time timestamp and a time limit are set for the second functional module.
[0073] The real-time timestamp may be the real-time time when the current latest configuration is generated or obtained.
[0074] The time limit can be set as needed, for example, the time limit is 5 minutes, 6 minutes, 7 minutes, etc.
[0075] When the second function module needs to be used, when the function module of the application is read from the configuration file, first identify whether the function module has a real-time timestamp. After identifying the real-time timestamp of the second function module, determine whether the time difference between the current time and the real-time timestamp is greater than the limited time. If the time difference between the current time and the real-time timestamp is greater than the limited time, the update configuration of the function module can be enabled. If the time difference between the current time and the real-time timestamp is not greater than the limited time, the update configuration of the second function module can be disabled first, and the historical configuration of the second function module can still be used to reduce the probability of a crash in the startup phase caused by the second function module.
[0076] In one embodiment, the time limit may be implemented by a countdown timer. Setting a time limit for the functional module corresponding to the latest configuration of the application that crashed may include setting a countdown timer for the update functional module corresponding to the latest configuration of the application.
[0077] For the second functional module, when the latest configuration of the second functional module is obtained, a countdown timer is set for the target functional module.
[0078] When the application is started, when the functional module of the application is read from the configuration file, it is first identified whether the functional module has a countdown timer. After identifying the countdown timer of the functional module, it is determined whether the countdown timer has expired. If the countdown timer has expired, the updated configuration of the functional module can be enabled. If the countdown timer has not expired, the updated configuration of the functional module can be disabled first, and the historical configuration of the target functional module can still be used to reduce crashes in the startup phase caused by the functional module.
[0079] By setting this time limit, you can delay the effective time of the updated configuration of the functional modules in the application, and reduce the crash of the application during the startup phase caused by the delayed effectiveness of the updated configuration.
[0080] If the application crashed during the last startup, the above process can be used to reduce the probability of a crash during the next startup, thereby reducing the occurrence of application crashes. It is understandable that if the application did not crash during the last startup, the configuration file can be obtained by following the conventional process. Based on this, the method provided in the embodiment of the present application also includes: Step 250, if the flag information of the application is the second value, obtaining the latest configuration of the application.
[0081] Among them, the second value of the flag information of the application indicates that no crash occurred when the application was last started. The fact that no crash occurred when the application was last started may indicate that the application successfully obtained the latest configuration from the configuration platform when it was last started.
[0082] Optionally, each time any functional module of the application is enabled, it may be determined whether the functional module has a time limit. Based on this, the application crash processing method provided by the embodiment of the present application may further include steps 260 to 270.
[0083] Step 260: Read the third functional module from the configuration file of the application.
[0084] Among them, the third functional module is the updated functional module in the application.
[0085] Considering that the aforementioned first functional module may not be executed temporarily, the third functional module may include the aforementioned second functional module but not the aforementioned first functional module.
[0086] If a time limit is set for the third functional module and the current time is within the time limit, it may indicate that the latest configuration of the third functional module has not yet taken effect, and step 270 may be executed.
[0087] Step 270 : If the current time is within the time limit of the third functional module, the historical configuration of the third functional module is loaded and executed.
[0088] In this embodiment, the restricted time limit of the third functional module is a time limit set when obtaining the current configuration of the third functional module.
[0089] Optionally, the historical configuration of the third functional module may be the configuration of the third functional module used when the application was normally started last time.
[0090] In some cases, the application may experience some unknown crashes during the startup phase, and the above-mentioned processing method cannot improve the occurrence of the crash. The application crash processing method provided in the embodiment of the present application may also include: when the application is started, the application monitoring recognizes that the application has crashed, and the application can be restarted.
[0091] Optionally, when application monitoring detects a program crash, a restart count can be set as needed. Within this restart count, if a program crash is detected, the application can be restarted. If a program crash is detected and the application is restarted the restart count times, and a crash is still detected, a prompt can be output to remind the user that the application is faulty.
[0092] Optionally, the content of the fault in the application can be output to prompt the user. For example, the fault content can be incorrect application version, incorrect data source, etc.
[0093] By automatically restarting the application, users can start the application without being aware of the application crash. The only thing they can perceive is that the application startup time is relatively long. There is also no need to handle it through complicated methods such as clearing the application cache or uninstalling and reinstalling the application, thereby reducing user loss.
[0094] In the method provided in the embodiment of the present application, by identifying the flag information and adaptively adjusting the startup strategy of the application based on the value of the flag information, it is possible to alleviate the situation where the application repeatedly crashes at startup and can only clear the application cache or uninstall and reinstall, thereby avoiding user loss. After a crash occurs, an automatic restart operation can be performed, so that the user cannot actually observe the crash from the user's perspective, but will only feel that the startup time is relatively less than usual, thereby improving the user experience. Compared to the Native layer that trycatch cannot protect, the solution provided in the embodiment of the present application adds a significantly effective protection mechanism, which reduces the crash of the application startup. Moreover, the logic of the method provided in the embodiment of the present application can be completed in the application, and there is no need for secondary modification of the backend, which reduces the difficulty of implementation. Moreover, the method provided in the embodiment of the present application has a relatively smaller impact on the time and performance of application startup.
[0095] Based on the same application concept, an application crash processing device corresponding to the application crash processing method is also provided in the embodiment of the present application. Since the principle of solving the problem by the device in the embodiment of the present application is similar to that in the aforementioned application crash processing method embodiment, the implementation of the device in this embodiment can refer to the description in the embodiment of the above method, and the repeated parts will not be repeated.
[0096] Please refer to Figure 4, which is a functional module diagram of the application crash processing device provided in an embodiment of the present application. The various modules in the application crash processing device in this embodiment are used to execute the various steps in the above method embodiment. The application crash processing device includes: an acquisition module 310 and an execution module 320; wherein the contents of each module are as follows: the acquisition module 310 is used to obtain the flag information of the application when the application is started, wherein the flag information is read when the application is started through a preset tracking point; the execution module 320 is used to switch the application from the current configuration to the historical configuration and execute the historical configuration if the flag information of the application is the first value, wherein the flag information is the first value indicating that the application crashed during the last startup phase.
[0097] In one possible implementation, the application crash processing device provided in this embodiment may further include: a determination module, used to identify through application monitoring the first functional module that caused the application to crash during the last startup phase; a request module, used to send a processing request for the first functional module to the configuration platform, and the processing request is used to instruct the configuration platform to stop issuing configuration items corresponding to the first functional module.
[0098] In one possible implementation, the application crash processing device provided in this embodiment may further include: an execution module for executing the latest configuration of the second functional module corresponding to the configuration obtained for the application that crashed in the last startup phase after waiting for a limited time limit, wherein the second functional module is the updated functional module corresponding to the configuration obtained in the last startup phase, and the second functional module is different from the first functional module.
[0099] In a possible implementation, the application crash processing apparatus provided in this embodiment may further include: a restart module, configured to restart the application if application monitoring identifies that the application has crashed when the application is started.
[0100] In a possible implementation, the application crash processing device provided in this embodiment may further include: if the flag information of the application is a second value, obtaining the latest configuration of the application, wherein the flag information being the second value indicates that the application did not crash during the last startup phase.
[0101] In one possible implementation, the application crash processing device provided in this embodiment may further include: an update module for updating the flag information to the first value when the application is started and if it is detected that the application has crashed; and for updating the flag information to the second value when the application is started and if the application has not crashed and the latest configuration of the application is obtained from the configuration platform.
[0102] In a possible implementation, the application crash handling apparatus provided in this embodiment may further include: an execution module, further configured to read the application configuration file from a local computer and execute the configuration file if the flag information of the application is not obtained when the application is started.
[0103] In one possible implementation, the application crash handling apparatus provided in this embodiment may further include: a reading module configured to read a third functional module from a configuration file of the application, wherein the third functional module is a functional module in the application that is updated, and the third functional module includes the second functional module and does not include the first functional module;
[0104] The execution module is used to load the historical configuration of the third function module and execute the historical configuration of the third function module if the current time is within the time limit of the third function module, wherein the time limit of the third function module is the time limit set when obtaining the current configuration of the third function module.
[0105] In addition, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the application crash handling method described in the above method embodiment are executed.
[0106] The computer program product of the application crash handling method provided in the embodiment of the present application includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the application crash handling method described in the above method embodiment. For details, please refer to the above method embodiment and will not be repeated here.
[0107] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or can be implemented using a combination of dedicated hardware and computer instructions.
[0108] In addition, the functional modules in each embodiment of the present application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0109] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0110] The foregoing description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included within the scope of protection of the present application. It should be noted that similar reference numerals and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined or explained in subsequent figures.
[0111] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for handling application crashes, characterized in that: include: When the application is started, the flag information of the application is obtained, wherein the flag information is read when the application is started through a preset embedding point; If the flag information of the application is a first value, the application is switched from a current configuration to a historical configuration, and the historical configuration is executed, wherein the flag information being the first value indicates that the application crashed during the last startup phase.
2. The method according to claim 1, characterized in that The method further comprises: Identifying, through application monitoring, a first functional module that caused the application to crash during a previous startup phase; A processing request for the first functional module is sent to a configuration platform, where the processing request is used to instruct the configuration platform to stop issuing configuration items corresponding to the first functional module.
3. The method according to claim 2, characterized in that The method further comprises: For the second functional module corresponding to the configuration obtained by the application that crashed in the last startup phase, the latest configuration of the second functional module is executed after waiting for a limited time limit, wherein the second functional module is the updated functional module corresponding to the configuration obtained in the last startup phase, and the second functional module is different from the first functional module.
4. The method according to claim 1, wherein The method further comprises: When the application is started, if the application monitoring identifies that the application has crashed, the application is restarted.
5. The method according to claim 1, characterized in that The method further comprises: If the flag information of the application is a second value, the latest configuration of the application is obtained, wherein the flag information being the second value indicates that the application did not crash during the last startup phase.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the application is started, if it is detected that the application crashes, updating the flag information to the first value; When the application is started, if the application does not crash and the latest configuration of the application is obtained from the configuration platform, the flag information is updated to the second value.
7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: When the application is started, if the flag information of the application is not obtained, the configuration file of the application is read from the local computer and the configuration file is executed.
8. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Reading a third functional module from a configuration file of the application, wherein the third functional module is a functional module in the application that is updated, and the third functional module includes the second functional module and does not include the first functional module; If the current time is within the time limit of the third functional module, load the historical configuration of the third functional module and execute the historical configuration of the third functional module, wherein the time limit of the third functional module is the time limit set when obtaining the current configuration of the third functional module.
9. An application crash processing device, characterized in that: include: An acquisition module, configured to acquire flag information of the application when the application is started, wherein the flag information is read by a preset embedding point when the application is started; The execution module is used to switch the application from the current configuration to the historical configuration and execute the historical configuration if the flag information of the application is a first value, wherein the flag information being the first value indicates that the application crashed during the last startup phase.
10. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the machine-readable instructions are executed by the processor to perform the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Software system repair processing method and software system repair processing device
CN103902399A
Watchdog monitoring method, system and device and storage medium
CN109582486A
Software system repair processing method
CN109976931A
Client starting method and device, terminal and storage medium
CN112114988A
Crash processing method and device, computer equipment and medium
CN112559234A