WO2024099586A1 - Method and system for handling application crash, and device for running application - Google Patents

Method and system for handling application crash, and device for running application Download PDF

Info

Publication number
WO2024099586A1
WO2024099586A1 PCT/EP2023/025441 EP2023025441W WO2024099586A1 WO 2024099586 A1 WO2024099586 A1 WO 2024099586A1 EP 2023025441 W EP2023025441 W EP 2023025441W WO 2024099586 A1 WO2024099586 A1 WO 2024099586A1
Authority
WO
WIPO (PCT)
Prior art keywords
crash
application
information
handling
configuration table
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/EP2023/025441
Other languages
French (fr)
Inventor
Zhe Wang
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mercedes Benz Group AG
Original Assignee
Mercedes Benz Group AG
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mercedes Benz Group AG filed Critical Mercedes Benz Group AG
Publication of WO2024099586A1 publication Critical patent/WO2024099586A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00—Error detection; Error correction; Monitoring
    • G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/079—Root cause analysis, i.e. error or fault diagnosis
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06F—ELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00—Error detection; Error correction; Monitoring
    • G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793—Remedial or corrective actions

Definitions

  • the present invention relates to the technical field of computers, and in particular, to a method for handling an application crash, a device for running an application, a system for handling an application crash, and a computer program product for performing steps of the method.
  • More and more applications are developed and deployed on smart terminals (e.g., computers, mobile terminals, in-vehicle infotainment systems of smart networked cars, etc.).
  • smart terminals e.g., computers, mobile terminals, in-vehicle infotainment systems of smart networked cars, etc.
  • smart networked cars e.g., computers, mobile terminals, in-vehicle infotainment systems of smart networked cars, etc.
  • smart networked cars e.g., computers, mobile terminals, in-vehicle infotainment systems of smart networked cars, etc.
  • the applications may crash due to different reasons. This presents challenges to the stability of the applications.
  • Solutions to application crashes proposed in the prior art mainly handle the application crashes by means of a single or fixed manner. For example, after monitoring a program crash, user data is cleared to resume or restart.
  • a single or fixed handling mode e.g., clearing the user data and restarting the application
  • a single or fixed handling mode does not flexibly address different kinds of application crash issues, with great application limitations, especially when the program crash cannot be eliminated after repeatedly clearing user data and restarting the program, or even uninstalling and reinstalling.
  • An objective of the present invention is to provide a method for handling an application crash, a device for running an application, a system for handling an application crash and a computer program product for performing steps of the method, so as to at least partially address the problem in the prior art.
  • the present invention is based on the following basic concepts: a configuration table of application crash handling strategies is pre-stored in a configuration table stored locally on a client device, and by continuously monitoring the occurrence of application crashes, when an application crash is detected, a crash handling strategy matching the occurred application crash is selected and executed.
  • the crash handling strategy can be automatically matched and executed according to the crash information of the application without user participation, thereby improving the efficiency of the application crash handling and the stability of the application operation.
  • a method for handling an application crash comprising:
  • the crash handling may be automatically performed on the basis of the crash handling strategy corresponding to the crash information of the application in the configuration table without being on the basis of user input.
  • the configuration table of application crash handling strategies may be stored locally on a client device running the application, and optionally, the configuration table may be remotely updated by a back end server.
  • the back end server may be queried whether the back end server has an updated configuration table of application crash handling strategies. If it is queried whether the back end server has an updated configuration table of application crash handling strategies, then the updated configuration table may be downloaded from the back end server, and the local configuration table of the client device where the application is located may be updated. In this way, it can be ensured that the latest configuration table participates in the matching, thereby avoiding crash handling strategy matching failure caused by failure to update the configuration table in time.
  • the crash information of the application may comprise type information and/or identification information of an application crash, wherein the type information, for example, comprises a crash type, and the identification information, for example, comprises a full class name, a method name, and/or a file name, and wherein the full class name comprises a class name and/or a packet name.
  • type information for example, comprises a crash type
  • identification information for example, comprises a full class name, a method name, and/or a file name
  • the full class name comprises a class name and/or a packet name.
  • the method may further comprise:
  • matching of the obtained crash information of the application and the crash information of the application in the configuration table may be performed by means of fuzzy judgment, wherein a judgment basis parameter on which the fuzzy judgment is based can be dynamically adjusted, especially added and/or removed, according to the obtained crash information of the application and/or the crash information of the application in the configuration table, thereby improving the flexibility and reliability of the matching.
  • the crash handling strategy may comprise, for example, one or more of the following strategies:
  • a crashed sub-function of the application may be determined on the basis of the crash information of the application, and the crashed sub-function of the application may be turned off on the basis of the first downgrade strategy until the application is restarted and/or execution of the first downgrade strategy is stopped, and the off sub-function is turned on again on the basis of the first upgrade strategy.
  • the application is downgraded by closing the crashed subfunction of the application, so that the user can continue to use other subfunctions that have not crashed.
  • the present invention it is judged whether the number of times the same type of application crash occurs over a preset period of time exceeds a preset threshold; if the number of times that the same type of application crash occurs over the preset period of time exceeds the preset threshold, it is judged, on the basis of the crash information of the application, whether the determined sub-function belongs to a pre-given sub-function; if the determined sub-function belongs to the pre-given subfunction, the crashed sub-function of the application is turned off on the basis of the second downgrade strategy until the application is upgraded or a back end service provided by a back end server is updated, and the off sub-function is turned on again on the basis of the second upgrade strategy.
  • each sub-function of the application is graded, and an important sub-function is turned off upon monitoring the crash of the important sub-function until the application is upgraded or the back end service provided by the back end server is updated, and the user can continue to use other important subfunctions that have not crashed.
  • the method may further comprise: obtaining, on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter from a back end server, and synchronously updating a configuration table stored locally in the client, wherein the parameter of the client comprises, for example, an operating system type, an operating system version, an application version, and/or a device model of the client, etc.
  • the method may further comprise:
  • a device for running an application may comprise the following components:
  • an application crash monitoring module configured to monitor the occurrence of an application crash, and to obtain crash information of the application
  • an application crash protection management module configured to enable and/or deactivate a corresponding application crash handling function on the basis of the crash information of the application and a configuration table of application crash handling strategies, and to enable and/or deactivate a remote update function of the configuration table;
  • a crash handling module configured to handle the application crash on the basis of a crash handling strategy corresponding to the obtained crash information of the application
  • a client local storage module configured to locally store the configuration table, the configuration table comprising a mapping relationship between crash information of applications and crash handling strategies.
  • the crash handling module may be configured to automatically perform the crash handling on the basis of the crash handling strategy corresponding to the crash information of the application in the configuration table without being on the basis of user input.
  • the configuration table of application crash handling strategies may be stored in the client local storage module, and optionally, the stored configuration table may be remotely updated by a back end server.
  • the application crash protection management module may be configured to: after the application is started and/or when the crash information of the application is not present in the configuration table of application crash handling strategies stored in the client local storage module, query whether the back end server has an updated configuration table of application crash handling strategies; if it is queried that the back end server has the updated configuration table of application crash handling strategies, download the updated configuration table from the back end server and update the configuration table stored in the client local storage module.
  • the crash information of the application may comprise type information and/or identification information of an application crash, wherein the type information, for example, comprises a crash type, and the identification information comprises a full class name, a method name, and/or a file name, and wherein the full class name comprises a class name and/or a packet name.
  • type information for example, comprises a crash type
  • identification information comprises a full class name, a method name, and/or a file name
  • the full class name comprises a class name and/or a packet name.
  • the application crash protection management module may be configured to: monitor whether a preset number of application crashes have occurred over a preset period of time, and stop performing the crash handling and report to the back end server when the preset number of application crashes have occurred over the preset period of time.
  • the application crash protection management module may be configured to perform matching of the obtained crash information of the application and the crash information of the application in the configuration table by means of fuzzy judgment, wherein a judgment basis parameter on which the fuzzy judgment is based can be dynamically adjusted, especially added and/or removed, according to the obtained crash information of the application and/or the crash information of the application in the configuration table, thereby improving the flexibility and reliability of the matching.
  • the crash handling strategy may comprise one or more of the following strategies: [0050] doing no operation;
  • the crash handling module may be configured to: determine a crashed subfunction of the application on the basis of the crash information of the application, and turn off the crashed sub-function of the application on the basis of the first downgrade strategy until the application is restarted and/or execution of the first downgrade strategy is stopped, and turn on the off subfunction again on the basis of the first upgrade strategy.
  • the crash handling module may be configured to: judge whether the number of times the same type of application crash occurs over a preset period of time exceeds a preset threshold; if the number of times that the same type of application crash occurs over the preset period of time exceeds the preset threshold, judge, on the basis of the crash information of the application, whether the determined sub-function belongs to a pre-given sub-function; if the determined sub-function belongs to the pre-given sub-function, turn off the crashed sub-function of the application on the basis of the second downgrade strategy until the application is upgraded or a back end service provided by a back end server is updated, and turn on the off sub-function again on the basis of the second upgrade strategy.
  • the crash handling module may be configured to: obtain, on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter from a back end server, and synchronously update a configuration table stored locally in the client, wherein the parameter of the client comprises, for example, an operating system type, an operating system version, an application version, and/or a device model of the client, etc.
  • the application crash monitoring module judges, on the basis of the monitored thread information crash of the application crash, whether the application crash is a main thread crash or a sub-thread crash, and if the application is the main thread crash, the crash handling of the main thread crash is performed.
  • a system for handling an application crash the system being used to perform the method according to the present invention.
  • the system may comprise the following components:
  • an application crash monitoring module configured to monitor the occurrence of an application crash, and to obtain crash information of the application
  • an application crash protection management module configured to enable and/or deactivate a corresponding application crash handling function on the basis of the crash information of the application and a configuration table of the application crash handling strategies, and to enable and/or deactivate a remote update function of the configuration table;
  • a crash handling module configured to handle the application crash on the basis of a crash handling strategy corresponding to the obtained crash information of the application
  • a client local storage module configured to locally store the configuration table at a client running the application, the configuration table comprising a mapping relationship between information of application crashes and downgrade strategies;
  • a back end server configured to remotely update the configuration table in the client local storage module.
  • a computer program product such as a computer-readable program carrier, comprising computer program instructions that, when executed by a processor, at least assist in implementing the steps of the method according to the present invention.
  • FIG. 1 shows a flowchart of a method for handling an application crash according to an exemplary embodiment of the present invention
  • FIG. 2 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention.
  • FIG. 3 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention
  • FIG. 4 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention
  • FIG. 5 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention
  • FIG. 6 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention
  • FIG. 7 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention.
  • FIG. 8 shows a block diagram of a device for running an application according to an exemplary embodiment of the present invention
  • FIG. 9 shows a block diagram of a system for handling an application crash according to an exemplary embodiment of the present invention.
  • FIG. 10 shows a timing diagram for explaining a program crash handling process according to an exemplary embodiment of the present invention.
  • FIG. 1 shows a flowchart of a method for handling an application crash according to an exemplary embodiment of the present invention.
  • the method may include steps S1 to S4.
  • step S1 it is monitored whether the application crash has occurred.
  • the application may include a main thread program.
  • at least one sub-thread program may also be included.
  • a crash of the main thread program and/or sub-thread program may be monitored by calling the Thread. setDefaultllncaughtExceptionHandler () function, and the crash is captured when the main thread crash and/or subthread crash occurs in the application.
  • crash information of the application is obtained in step S2.
  • a polling task may be executed by means of an application crash monitoring module 11 , and the polling task is implemented, for example, by calling the Looper. loop () function and may be executed cyclically, thereby continuously monitoring the running state of the main thread program.
  • the try catch () function may be called in time, and by means of the function, the crash information of the main thread crash may be captured.
  • the crash information of the application may include, for example, type information of the application crash, the type information including, for example, a crash type.
  • the crash information of the application may further include, for example, identification information of the application crash, the identification information including, for example, a full class name, a method name and/or a file name, etc.
  • identification information including, for example, a full class name, a method name and/or a file name, etc.
  • a program section for performing each sub-function of the application may be indicated.
  • the full class name may include a class name and/or a packet name, and a sub-function affected by the application crash may be determined by the class name and/or the packet name.
  • stack information of the main thread program of the application crash may be extracted by means of an application crash monitoring module 11 , and the stack information is parsed into crash information B of the application by means of a parsing unit 16, the crash information B being passed to an application crash protection management module 12, as shown in the timing diagram of FIG. 10.
  • step S3 it is judged whether the crash information B of the program is present in a configuration table of application crash handling strategies, wherein the configuration table may include a stored mapping relationship between crash information A of applications and crash handling strategies.
  • the configuration table of application crash handling strategies may be locally stored at a client device running the application.
  • the application crash protection management module 12 may obtain the locally stored configuration table from a client local storage module 14, and parse the configuration table into the crash information A of the application included in the configuration table by means of the parsing unit 16.
  • the obtained crash information B of the application is matched with the crash information A of the application in the configuration table, thereby judging whether the obtained crash information B of the application is present in the configuration table, and the judgment result thereof may be represented by a judgment truth value, for example.
  • the configuration table may include one or more of the following crash handling strategies:
  • Table 1 shows crash handling strategies included in the configuration table
  • matching of the obtained crash information B of the application and the crash information A of the application in the configuration table may be performed by means of fuzzy judgment.
  • a matching basis parameter of the fuzzy judgment may include one or more of a crash type, a full class name, a method name, and/or a file name.
  • Program codes for performing the matching process are illustratively shown below.
  • the matching basis parameter includes a crash type (exceptionType), a class name (className), and a file name (fileName).
  • the truth value information isNativeMethod
  • the matching strategy serial number is obtained when the truth value information is true.
  • the judgment basis parameter can be dynamically adjusted, especially added and/or removed, according to the obtained crash information B of the application and/or the crash information A of the application in the configuration table, thereby improving the flexibility and reliability of the matching.
  • a method name may be added, and the program section of the crash may be indicated by means of the method name.
  • the crash handling is performed in step S4 on the basis of a crash handling strategy corresponding to the crash information B of the application in the configuration table.
  • the crash handling may be automatically performed on the basis of the crash handling strategy corresponding to the crash information of the application in the configuration table without being on the basis of user input.
  • the majority of the crash handling strategies (e.g., crash handling strategies 2 to 6, 8, and 9, etc.) shown in Table 1 is to handle the application crash by clearing the user data, re-logging in the application, automatically restarting the application, re-initializing the software development kit, etc.
  • crash handling strategies 2 to 6, 8, and 9, etc. typically occur in the process of starting an updated application.
  • the user cannot use any sub-functions in the application, but after executing such a crash handling strategy, the user can use the application normally.
  • some sub-functions in the application have exceptions, especially display exceptions, which may be caused by the program codes corresponding to the sub-functions not being executed due to the application crash.
  • the exceptional sub-function has a smaller impact on the application, for example, the content in a page that is related to the exceptional subfunction displays an exception, the user is not able to see this part of content, whereas other content in the page still displays normal, in particular, other subfunctions of the application are still able to be put into use normally, so that crash handling strategy 1 of doing no operation can be adopted.
  • a page may also be displayed by means of crash handling strategy 7 to display a crash report, and the crash report may be sent to the development and testing personnel by email for analysis and reporting.
  • the crash handling strategy further includes a downgrade strategy and an upgrade strategy corresponding to the downgrade strategy.
  • “downgrade” may be understood as follows: when an application is exceptional, to control an exceptional impact range, some (e.g., non-important) sub-functions in the application are turned off, thereby ensuring that the important sub-functions of the application operates normally.
  • the sub-functions of the application may be graded on the basis of the priorities and/or dependence of the sub-functions. For example, if one subfunction has a high priority and/or a strong dependency relationship with other sub-functions, the sub-function may be divided into an important sub-function, such as a function of remotely manipulating a vehicle.
  • step S4 may include steps S411 to S413, as shown in FIG. 2.
  • step S411 a crashed sub-function of the application is determined on the basis of the crash information B of the application.
  • Program codes according to another optional embodiment of the present invention are shown below.
  • a program section where a crash occurs in the application can be determined according to the method name (methodName) in the crash information B of the application, and a sub-function affected by the crash can be determined according to the class name (fileName) in the crash information B of the application.
  • a toggle (toggle) name corresponding to the subfunction is issued to the client, and the function can be turned on and/or off by means of the state of the toggle.
  • the crashed sub-function of the application may be turned off on the basis of the first downgrade strategy.
  • crash handling strategy 10 on the basis of the parsed crash information of the application, it can be determined that crash handling strategy 10 is to be adopted, and the toggle state corresponding to the sub-function is set to the off state, so that a user entrance of the sub-function is no longer displayed in the display page of the application, thereby turning off the crashed sub-function of the application, and the user may continue to use other subfunctions that have not crashed.
  • the off sub-function may be turned on again on the basis of the first upgrade strategy corresponding to the first downgrade strategy in step S413, so that all sub-functions of the application recover normal.
  • step S4 may include steps S421 to S425, as shown in FIG. 3.
  • step S421 it is judged whether the number of times the same type of application crash occurs over a preset period of time exceeds a preset threshold.
  • an application crash type may be determined, and the number of times that the application crash type occurs in the preset period of time can be retrieved. If the application crash type is not retrieved, a crash record regarding the application crash type may be created, so that the crash record can be queried the next time this type of application crash occurs.
  • the crashed subfunction of the application may be determined on the basis of the crash information B of the application.
  • the crashed program section in the application may be determined according to the method name in the crash information B of the application, and the sub-function affected by the crash is determined according to the class name and/or packet name in the crash information B of the application. Then, the toggle name corresponding to the sub-function is issued to the client.
  • step S423 it is judged in step S423 whether the determined sub-function belongs to a pre-given sub-function, the pre-given sub-function including a function of remotely manipulating a vehicle, for example. If the determined sub-function belongs to the pre-given sub-function, it may be determined that crash handling strategy 11 is to be adopted, then in step S424, the crashed sub-function of the application is turned off on the basis of the second downgrade strategy.
  • the toggle state corresponding to the sub-function may be set to an off state, thereby turning off the crashed important sub-function of the application (e.g., a function of remotely manipulating a vehicle), and the user may continue to use other important subfunctions that have not crashed. While turning off the sub-function, optionally, it is also possible to send to the user prompt information regarding the current sub-function not available by means of a back end server 15.
  • step S425 the off sub-function is turned on again on the basis of the second upgrade strategy corresponding to the second downgrade strategy. This is different from executing the first upgrade strategy until the application is restarted and/or execution of the first downgrade strategy is stopped, because this type of application crash occurs frequently. Especially after restarting the application, this type of application crash may continue to occur. Therefore, the second upgrade strategy is executed only after the application has been repaired by means of an application upgrade or a back end service update.
  • crash handling strategy can be adjusted as needed, and is not limited to the above enumerated strategies.
  • the crash handling strategy can be automatically matched and executed according to the crash information of the application without user participation, thereby improving the efficiency of the application crash handling, and ensuring, as much as possible, that sub-functions of the application that have not crashed are still available for use.
  • FIG. 4 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention. Only differences from the embodiment shown in FIG. 1 are described below, and for brevity, the same steps will not be described again.
  • the method may further include steps S110 and S11.
  • step S110 it is judged whether the function of application crash handling is turned on. if the function of application crash handling is turned on, the configuration table of application crash handling strategies is remotely updated by the back end server 15 in step S11 .
  • a configuration table that can be adjusted in real-time according to actual requirements is stored in the back end server 15, and on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter may be obtained from the back end server 15, and a configuration table stored locally on the client is synchronously updated, wherein the parameter of the client may include, for example, an operating system type, an operating system version, an application version, and/or a device model of the client, etc. It can be understood that the configuration table information required for different operating system types, operating system versions, application versions, and/or device models of the client may differ from each other.
  • the locally stored configuration table can be synchronously updated to the latest state after starting the application program, and the synchronous update may also be performed after step S3.
  • the method may further include steps S10 and S11. If it is judged in step S3 that the crash information B of the application is not present in the configuration table of application crash handling strategies stored in the client local storage module, it is queried in step S10 whether the back end server 15 has an updated configuration table of application crash handling strategies. If it is queried whether the back end server 15 has the updated configuration table of application crash handling strategies, then the updated configuration table is downloaded from the back end server 15 in step S11 , and the local configuration table of the client device where the application is located is updated. In this way, it can be ensured that the latest configuration table participates in the matching, thereby avoiding crash handling strategy matching failure caused by failure to update the configuration table in time.
  • FIG. 6 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention. Only differences from the embodiment shown in FIG. 1 are described below, and for brevity, the same steps will not be described again.
  • the method may further include steps S5 and S6.
  • step S5 after performing crash handling of the application crash, it is monitored whether a preset number of application crashes have occurred over a preset period of time. If the preset number of application crashes have occurred over the preset period of time, the crash handling is stopped and reported to the back end server 15 in step S6.
  • three application crashes occur over a period of one minute, which means that the application crash is difficult to repair through the crash handling strategy in the current configuration table. Therefore, it may be reported to the back end server 15, so that the development personnel and/or maintenance personnel of the back end may add to the configuration table a crash handling strategy adapted to the application crash according to the content of the report. In this way, unresolvable application crashes can be reported to the back end personnel in a timely manner, thereby improving the applicability of the crash handling strategy.
  • FIG. 7 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention. Only differences from the embodiment shown in FIG. 1 are described below, and for brevity, the same steps will not be described again.
  • the method may further include steps S12 and S13.
  • step S12 it is judged, on the basis of the monitored thread information crash of the application crash, whether the application crash is a main thread crash or a sub-thread crash. If the application crash is the sub-thread crash, the crash information of the sub-thread crash is recorded in step S13. On the basis of the crash information, buried points and log information may be obtained without crash handling of the sub-thread program. If the application is a main thread crash, it proceeds to step S2 to perform crash handling according to the present invention of the main thread crash. The reliability of the application crash monitoring can be effectively improved by using two or more application crash monitoring modes simultaneously, and the crash occurring in the subthread program is recorded.
  • step number described herein does not necessarily represent an order, but is merely a reference numeral.
  • the order may be changed according to a specific situation, so long as the technical objective of the present invention can be achieved.
  • FIG. 8 shows a block diagram of a device for running an application according to an exemplary embodiment of the present invention.
  • the device 1 may include the following components: an application crash monitoring module 11 configured to monitor the occurrence of an application crash, and to obtain crash information of the application; an application crash protection management module 12 configured to enable and/or deactivate a corresponding application crash handling function on the basis of the crash information of the application and a configuration table of application crash handling strategies, and to enable and/or deactivate a remote update function of the configuration table; a crash handling module 13 configured to handle the application crash on the basis of a crash handling strategy corresponding to the obtained crash information of the application; and a client local storage module 14 configured to locally store the configuration table, the configuration table including a mapping relationship between crash information A of applications and crash handling strategies.
  • the device 1 further includes a parsing unit 16 configured to parse the stack information of the crashed application into crash information B of the application and/or parse the configuration table into crash information A of the application included in the configuration table.
  • FIG. 9 shows a block diagram of a system for handling an application crash according to an exemplary embodiment of the present invention.
  • the system 10 may include the device 1 and a back end server 15.
  • the back end server is configured to be able to remotely update the configuration table in the client local storage module.
  • the device 1 may likewise include an application crash monitoring module 11 , an application crash protection management module 12, a crash handling module 13, and a client local storage module 14, as shown in the embodiment shown in FIG. 8, which is not described herein again.
  • step S1 After starting the application, it is monitored in step S1 whether an application crash occurs, and at the same time, it is judged in step S110 whether the function of application crash handling is turned on. If the function of application crash handling is turned on, the application crash protection management module 12 may send an on signal to the application crash monitoring module 11. Upon receiving the on signal, the application crash monitoring module 11 may monitor the occurrence of the application crash, perform step S2 to obtain crash information B of the application, and send the obtained crash information to the application crash protection management module 12.
  • step S3 After the application crash protection management module 12 receives the crash information B of the application, it may be judged in step S3 whether the crash information B of the application is present in the configuration table of application crash handling strategies stored in the client local storage module 14, and step S4 is performed by the crash handling module 13 when the crash information B is present, that is, crash handling is performed on the basis of a crash handling strategy corresponding to the crash information B of the application in the configuration table.
  • step S11 the configuration table of application crash handling strategies is remotely updated by the back end server 15 in step S11.
  • an enable signal of a remote update function may be sent to the application crash protection management module 12, the application crash protection management module 12 obtains, on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter from the back end server 15, and synchronously updates the configuration table stored in the client local storage module 14, wherein the parameter of the client includes, for example, an operating system type, an operating system version, an application version, and/or a device model of the client, etc.
  • the parsing unit 16 may parse the updated configuration table into the crash information A of the application included in the configuration table, and send the parsed crash information A to the application crash protection management module 12, so that the crash information B and parsed crash information A of the application may be matched in the application crash protection management module 12.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Biomedical Technology (AREA)
  • Stored Programmes (AREA)

Abstract

The present invention relates to a method for handling an application crash, comprising: monitoring whether the application crash has occurred; if the crash is monitored, obtaining crash information of the application; and judging whether the crash information of the application is present in a configuration table of application crash handling strategies, the configuration table comprising a stored mapping relationship between crash information of applications and crash handling strategies; and if the crash information of the application is present, performing crash handling on the basis of a crash handling strategy corresponding to the crash information of the application in the configuration table. The present invention further relates to a device for running an application, a system for handling an application crash, and a computer program product. According to the present invention, the crash handling strategy can be automatically matched and executed according to the crash information of the application without user participation, thereby improving the efficiency of the application crash handling and the stability of the application operation.

Description

METHOD AND SYSTEM FOR HANDLING APPLICATION CRASH, AND DEVICE FOR RUNNING APPLICATION
TECHNICAL FIELD
[0001 ] The present invention relates to the technical field of computers, and in particular, to a method for handling an application crash, a device for running an application, a system for handling an application crash, and a computer program product for performing steps of the method.
BACKGROUND
[0002] More and more applications (Apps) are developed and deployed on smart terminals (e.g., computers, mobile terminals, in-vehicle infotainment systems of smart networked cars, etc.). For example, with the development of smart networked cars, more and more applications are developed and deployed on a user's mobile terminal and/or vehicle (in-vehicle infotainment) to provide or support various functions or services related to the vehicle. During use of these applications, the applications may crash due to different reasons. This presents challenges to the stability of the applications.
[0003] Solutions to application crashes proposed in the prior art mainly handle the application crashes by means of a single or fixed manner. For example, after monitoring a program crash, user data is cleared to resume or restart. However, a single or fixed handling mode (e.g., clearing the user data and restarting the application) does not flexibly address different kinds of application crash issues, with great application limitations, especially when the program crash cannot be eliminated after repeatedly clearing user data and restarting the program, or even uninstalling and reinstalling.
[0004] Therefore, how to flexibly efficiently handling various application crash issues becomes a technical challenge that needs to be solved currently.
SUMMARY
[0005] An objective of the present invention is to provide a method for handling an application crash, a device for running an application, a system for handling an application crash and a computer program product for performing steps of the method, so as to at least partially address the problem in the prior art. The present invention is based on the following basic concepts: a configuration table of application crash handling strategies is pre-stored in a configuration table stored locally on a client device, and by continuously monitoring the occurrence of application crashes, when an application crash is detected, a crash handling strategy matching the occurred application crash is selected and executed. According to certain embodiments of the present invention, the crash handling strategy can be automatically matched and executed according to the crash information of the application without user participation, thereby improving the efficiency of the application crash handling and the stability of the application operation.
[0006] According to a first aspect of the present invention, there is provided a method for handling an application crash, the method comprising:
[0007] monitoring whether an application crash has occurred;
[0008] if it is monitored that the application crash has occurred, obtaining crash information of the application; and
[0009] judging whether the crash information of the application is present in a configuration table of application crash handling strategies, wherein the configuration table comprises a stored mapping relationship between crash information of applications and crash handling strategies; and
[0010] if the crash information of the application is present in the configuration table, performing crash handling on the basis of a crash handling strategy corresponding to the crash information of the application in the configuration table.
[0011 ] According to an optional embodiment of the present invention, in particular, the crash handling may be automatically performed on the basis of the crash handling strategy corresponding to the crash information of the application in the configuration table without being on the basis of user input. [0012] According to an optional embodiment of the present invention, the configuration table of application crash handling strategies may be stored locally on a client device running the application, and optionally, the configuration table may be remotely updated by a back end server.
[0013] According to an optional embodiment of the present invention, after the application is started and/or when the crash information of the application is not present in the configuration table of application crash handling strategies stored in a client local storage module, it may be queried whether the back end server has an updated configuration table of application crash handling strategies. If it is queried whether the back end server has an updated configuration table of application crash handling strategies, then the updated configuration table may be downloaded from the back end server, and the local configuration table of the client device where the application is located may be updated. In this way, it can be ensured that the latest configuration table participates in the matching, thereby avoiding crash handling strategy matching failure caused by failure to update the configuration table in time.
[0014] According to an optional embodiment of the present invention, the crash information of the application, for example, may comprise type information and/or identification information of an application crash, wherein the type information, for example, comprises a crash type, and the identification information, for example, comprises a full class name, a method name, and/or a file name, and wherein the full class name comprises a class name and/or a packet name.
[0015] According to an optional embodiment of the present invention, the method may further comprise:
[0016] after performing crash handling of the application crash, monitoring whether a preset number of application crashes have occurred over a preset period of time; and
[0017] if the preset number of application crashes have occurred over the preset period of time, stopping performing the crash handling and reporting to a back end server.
[0018] According to an optional embodiment of the present invention, matching of the obtained crash information of the application and the crash information of the application in the configuration table may be performed by means of fuzzy judgment, wherein a judgment basis parameter on which the fuzzy judgment is based can be dynamically adjusted, especially added and/or removed, according to the obtained crash information of the application and/or the crash information of the application in the configuration table, thereby improving the flexibility and reliability of the matching.
[0019] According to an optional embodiment of the present invention, the crash handling strategy may comprise, for example, one or more of the following strategies:
[0020] doing no operation;
[0021 ] displaying an error page and directing a user to clear user data;
[0022] displaying an upgrade page and directing the user to upgrade the application;
[0023] displaying a page to display a recommended solution;
[0024] performing automatic restart;
[0025] performing automatic restart and clearing local user data;
[0026] displaying a page to display an application crash report;
[0027] exiting and re-logging in the application;
[0028] re-initializing a software development kit without restarting the application;
[0029] a first downgrade strategy and a first upgrade strategy corresponding to the first downgrade strategy; and/or
[0030] a second downgrade strategy and a second upgrade strategy corresponding to the second downgrade strategy.
[0031 ] According to an optional embodiment of the present invention, a crashed sub-function of the application may be determined on the basis of the crash information of the application, and the crashed sub-function of the application may be turned off on the basis of the first downgrade strategy until the application is restarted and/or execution of the first downgrade strategy is stopped, and the off sub-function is turned on again on the basis of the first upgrade strategy. The application is downgraded by closing the crashed subfunction of the application, so that the user can continue to use other subfunctions that have not crashed. [0032] According to an optional embodiment of the present invention, it is judged whether the number of times the same type of application crash occurs over a preset period of time exceeds a preset threshold; if the number of times that the same type of application crash occurs over the preset period of time exceeds the preset threshold, it is judged, on the basis of the crash information of the application, whether the determined sub-function belongs to a pre-given sub-function; if the determined sub-function belongs to the pre-given subfunction, the crashed sub-function of the application is turned off on the basis of the second downgrade strategy until the application is upgraded or a back end service provided by a back end server is updated, and the off sub-function is turned on again on the basis of the second upgrade strategy. Here, each sub-function of the application is graded, and an important sub-function is turned off upon monitoring the crash of the important sub-function until the application is upgraded or the back end service provided by the back end server is updated, and the user can continue to use other important subfunctions that have not crashed.
[0033] According to an optional embodiment of the present invention, the method may further comprise: obtaining, on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter from a back end server, and synchronously updating a configuration table stored locally in the client, wherein the parameter of the client comprises, for example, an operating system type, an operating system version, an application version, and/or a device model of the client, etc.
[0034] According to an optional embodiment of the present invention, the method may further comprise:
[0035] judging, on the basis of the monitored thread information crash of the application crash, whether the application crash is a main thread crash or a sub-thread crash;
[0036] if the application crash is the sub-thread crash, recording crash information of the sub-thread; and
[0037] if the application is a main thread crash, performing the crash handling of the main thread crash. [0038] According to a second aspect of the present invention, there is provided a device for running an application. The device may comprise the following components:
[0039] an application crash monitoring module configured to monitor the occurrence of an application crash, and to obtain crash information of the application;
[0040] an application crash protection management module configured to enable and/or deactivate a corresponding application crash handling function on the basis of the crash information of the application and a configuration table of application crash handling strategies, and to enable and/or deactivate a remote update function of the configuration table;
[0041 ] a crash handling module configured to handle the application crash on the basis of a crash handling strategy corresponding to the obtained crash information of the application; and
[0042] a client local storage module configured to locally store the configuration table, the configuration table comprising a mapping relationship between crash information of applications and crash handling strategies.
[0043] According to an optional embodiment of the present invention, the crash handling module may be configured to automatically perform the crash handling on the basis of the crash handling strategy corresponding to the crash information of the application in the configuration table without being on the basis of user input.
[0044] According to an optional embodiment of the present invention, the configuration table of application crash handling strategies may be stored in the client local storage module, and optionally, the stored configuration table may be remotely updated by a back end server.
[0045] According to an optional embodiment of the present invention, the application crash protection management module may be configured to: after the application is started and/or when the crash information of the application is not present in the configuration table of application crash handling strategies stored in the client local storage module, query whether the back end server has an updated configuration table of application crash handling strategies; if it is queried that the back end server has the updated configuration table of application crash handling strategies, download the updated configuration table from the back end server and update the configuration table stored in the client local storage module.
[0046] According to an optional embodiment of the present invention, the crash information of the application may comprise type information and/or identification information of an application crash, wherein the type information, for example, comprises a crash type, and the identification information comprises a full class name, a method name, and/or a file name, and wherein the full class name comprises a class name and/or a packet name.
[0047] According to an optional embodiment of the present invention, the application crash protection management module may be configured to: monitor whether a preset number of application crashes have occurred over a preset period of time, and stop performing the crash handling and report to the back end server when the preset number of application crashes have occurred over the preset period of time.
[0048] According to an optional embodiment of the present invention, the application crash protection management module may be configured to perform matching of the obtained crash information of the application and the crash information of the application in the configuration table by means of fuzzy judgment, wherein a judgment basis parameter on which the fuzzy judgment is based can be dynamically adjusted, especially added and/or removed, according to the obtained crash information of the application and/or the crash information of the application in the configuration table, thereby improving the flexibility and reliability of the matching.
[0049] According to an optional embodiment of the present invention, the crash handling strategy may comprise one or more of the following strategies: [0050] doing no operation;
[0051 ] displaying an error page and directing a user to clear user data;
[0052] displaying an upgrade page and directing the user to upgrade the application;
[0053] displaying a page to display a recommended solution; [0054] performing automatic restart;
[0055] performing automatic restart and clearing local user data;
[0056] displaying a page to display an application crash report;
[0057] exiting and re-logging in the application;
[0058] re-initializing a software development kit without restarting the application;
[0059] a first downgrade strategy and a first upgrade strategy corresponding to the first downgrade strategy; and/or
[0060] a second downgrade strategy and a second upgrade strategy corresponding to the second downgrade strategy.
[0061 ] According to an optional embodiment of the present invention, the crash handling module may be configured to: determine a crashed subfunction of the application on the basis of the crash information of the application, and turn off the crashed sub-function of the application on the basis of the first downgrade strategy until the application is restarted and/or execution of the first downgrade strategy is stopped, and turn on the off subfunction again on the basis of the first upgrade strategy.
[0062] According to an optional embodiment of the present invention, the crash handling module may be configured to: judge whether the number of times the same type of application crash occurs over a preset period of time exceeds a preset threshold; if the number of times that the same type of application crash occurs over the preset period of time exceeds the preset threshold, judge, on the basis of the crash information of the application, whether the determined sub-function belongs to a pre-given sub-function; if the determined sub-function belongs to the pre-given sub-function, turn off the crashed sub-function of the application on the basis of the second downgrade strategy until the application is upgraded or a back end service provided by a back end server is updated, and turn on the off sub-function again on the basis of the second upgrade strategy.
[0063] According to an optional embodiment of the present invention, the crash handling module may be configured to: obtain, on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter from a back end server, and synchronously update a configuration table stored locally in the client, wherein the parameter of the client comprises, for example, an operating system type, an operating system version, an application version, and/or a device model of the client, etc.
[0064] According to an optional embodiment of the present invention, the application crash monitoring module judges, on the basis of the monitored thread information crash of the application crash, whether the application crash is a main thread crash or a sub-thread crash, and if the application is the main thread crash, the crash handling of the main thread crash is performed.
[0065] According to a third aspect of the present invention, there is provided a system for handling an application crash, the system being used to perform the method according to the present invention. The system may comprise the following components:
[0066] an application crash monitoring module configured to monitor the occurrence of an application crash, and to obtain crash information of the application;
[0067] an application crash protection management module configured to enable and/or deactivate a corresponding application crash handling function on the basis of the crash information of the application and a configuration table of the application crash handling strategies, and to enable and/or deactivate a remote update function of the configuration table;
[0068] a crash handling module configured to handle the application crash on the basis of a crash handling strategy corresponding to the obtained crash information of the application;
[0069] a client local storage module configured to locally store the configuration table at a client running the application, the configuration table comprising a mapping relationship between information of application crashes and downgrade strategies; and
[0070] a back end server configured to remotely update the configuration table in the client local storage module. [0071] According to a fourth aspect of the present invention, there is provided a computer program product, such as a computer-readable program carrier, comprising computer program instructions that, when executed by a processor, at least assist in implementing the steps of the method according to the present invention.
BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The principles, features, and advantages of the present invention can be better understood via further detailed description of the present invention provided with reference to the accompanying drawings. The accompanying drawings show:
[0073] FIG. 1 shows a flowchart of a method for handling an application crash according to an exemplary embodiment of the present invention;
[0074] FIG. 2 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention.
[0075] FIG. 3 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention;
[0076] FIG. 4 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention;
[0077] FIG. 5 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention;
[0078] FIG. 6 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention;
[0079] FIG. 7 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention;
[0080] FIG. 8 shows a block diagram of a device for running an application according to an exemplary embodiment of the present invention;
[0081 ] FIG. 9 shows a block diagram of a system for handling an application crash according to an exemplary embodiment of the present invention; and [0082] FIG. 10 shows a timing diagram for explaining a program crash handling process according to an exemplary embodiment of the present invention. DETAILED DESCRIPTION
[0083] In order to make the technical problems to be solved by the present invention, the technical solutions, and the beneficial technical effects clearer, the present invention will be described below in further detail with reference to the accompanying drawings and a plurality of exemplary embodiments. It should be understood that specific embodiments described herein are merely used to explain the present invention, but are not used to limit the scope of protection of the present invention.
[0084] FIG. 1 shows a flowchart of a method for handling an application crash according to an exemplary embodiment of the present invention.
[0085] The method may include steps S1 to S4. In step S1 , it is monitored whether the application crash has occurred. In the present embodiment of the present invention, the application may include a main thread program. Optionally, at least one sub-thread program may also be included. Here, a crash of the main thread program and/or sub-thread program may be monitored by calling the Thread. setDefaultllncaughtExceptionHandler () function, and the crash is captured when the main thread crash and/or subthread crash occurs in the application.
[0086] If it is monitored that the application crash has occurred, crash information of the application is obtained in step S2. In this main thread program, a polling task may be executed by means of an application crash monitoring module 11 , and the polling task is implemented, for example, by calling the Looper. loop () function and may be executed cyclically, thereby continuously monitoring the running state of the main thread program. Upon monitoring the crash of the main thread program, the try catch () function may be called in time, and by means of the function, the crash information of the main thread crash may be captured. Here, the crash information of the application may include, for example, type information of the application crash, the type information including, for example, a crash type. The crash information of the application may further include, for example, identification information of the application crash, the identification information including, for example, a full class name, a method name and/or a file name, etc. Here, by means of the method name, a program section for performing each sub-function of the application may be indicated. The full class name may include a class name and/or a packet name, and a sub-function affected by the application crash may be determined by the class name and/or the packet name.
[0087] Illustratively, stack information of the main thread program of the application crash may be extracted by means of an application crash monitoring module 11 , and the stack information is parsed into crash information B of the application by means of a parsing unit 16, the crash information B being passed to an application crash protection management module 12, as shown in the timing diagram of FIG. 10.
[0088] In step S3, it is judged whether the crash information B of the program is present in a configuration table of application crash handling strategies, wherein the configuration table may include a stored mapping relationship between crash information A of applications and crash handling strategies. Here, the configuration table of application crash handling strategies may be locally stored at a client device running the application. The application crash protection management module 12 may obtain the locally stored configuration table from a client local storage module 14, and parse the configuration table into the crash information A of the application included in the configuration table by means of the parsing unit 16. By traversing the crash information A of the application in the configuration table, the obtained crash information B of the application is matched with the crash information A of the application in the configuration table, thereby judging whether the obtained crash information B of the application is present in the configuration table, and the judgment result thereof may be represented by a judgment truth value, for example.
[0089] As illustratively shown in Table 1 , the configuration table may include one or more of the following crash handling strategies:
Figure imgf000013_0001
Figure imgf000014_0001
Table 1 shows crash handling strategies included in the configuration table
[0090] In an optional embodiment of the present invention, matching of the obtained crash information B of the application and the crash information A of the application in the configuration table may be performed by means of fuzzy judgment. Here, a matching basis parameter of the fuzzy judgment may include one or more of a crash type, a full class name, a method name, and/or a file name. Program codes for performing the matching process are illustratively shown below. Here, the matching basis parameter includes a crash type (exceptionType), a class name (className), and a file name (fileName). On the basis of the matching basis parameter, the truth value information (isNativeMethod) about whether there is a matching crash handling strategy in the configuration table can be obtained by means of fuzzy judgment, and the matching strategy serial number is obtained when the truth value information is true.
[0091 ] {“data”:[{“exceptionType”:“java.lang.RuntimeException”, “className”:“io_realm_internal_OsSharedRealm”, “fileName”:“io_realm_internal_OsSharedRealm.cpp”, “isNativeMethod”: true, “methodName”:“nativeGetSharedRealm”, “downgradestrategy” :6,
“matchRules”:[ “exceptionType”, “fileName”, “isNativeMethod”, “methodName”] }]}
[0092] In addition, the judgment basis parameter can be dynamically adjusted, especially added and/or removed, according to the obtained crash information B of the application and/or the crash information A of the application in the configuration table, thereby improving the flexibility and reliability of the matching. In the matching basis parameter, for example, a method name may be added, and the program section of the crash may be indicated by means of the method name.
[0093] If the crash information B of the application is present in the configuration table (that is, the judgment truth value information is true), the crash handling is performed in step S4 on the basis of a crash handling strategy corresponding to the crash information B of the application in the configuration table. Here, the crash handling may be automatically performed on the basis of the crash handling strategy corresponding to the crash information of the application in the configuration table without being on the basis of user input. In contrast, there is a need in the prior art to notify a user about crash of the application with respect to the application, and automatically select the adapted crash handling strategy by the user, which not only reduces the handling efficiency of the application crash, but also requires the user to have certain handling experience.
[0094] Here, the majority of the crash handling strategies (e.g., crash handling strategies 2 to 6, 8, and 9, etc.) shown in Table 1 is to handle the application crash by clearing the user data, re-logging in the application, automatically restarting the application, re-initializing the software development kit, etc. These application crashes typically occur in the process of starting an updated application. In such application crashes, the user cannot use any sub-functions in the application, but after executing such a crash handling strategy, the user can use the application normally. [0095] Illustratively, some sub-functions in the application have exceptions, especially display exceptions, which may be caused by the program codes corresponding to the sub-functions not being executed due to the application crash. If the exceptional sub-function has a smaller impact on the application, for example, the content in a page that is related to the exceptional subfunction displays an exception, the user is not able to see this part of content, whereas other content in the page still displays normal, in particular, other subfunctions of the application are still able to be put into use normally, so that crash handling strategy 1 of doing no operation can be adopted.
[0096] For example, a page may also be displayed by means of crash handling strategy 7 to display a crash report, and the crash report may be sent to the development and testing personnel by email for analysis and reporting. [0097] The crash handling strategy further includes a downgrade strategy and an upgrade strategy corresponding to the downgrade strategy. In the sense of the present invention, “downgrade” may be understood as follows: when an application is exceptional, to control an exceptional impact range, some (e.g., non-important) sub-functions in the application are turned off, thereby ensuring that the important sub-functions of the application operates normally. The sub-functions of the application may be graded on the basis of the priorities and/or dependence of the sub-functions. For example, if one subfunction has a high priority and/or a strong dependency relationship with other sub-functions, the sub-function may be divided into an important sub-function, such as a function of remotely manipulating a vehicle.
[0098] In another optional embodiment of the present invention, for the first downgrade strategy and the first upgrade strategy corresponding to the first downgrade strategy, step S4 may include steps S411 to S413, as shown in FIG. 2. In step S411 , a crashed sub-function of the application is determined on the basis of the crash information B of the application. Program codes according to another optional embodiment of the present invention are shown below. A program section where a crash occurs in the application can be determined according to the method name (methodName) in the crash information B of the application, and a sub-function affected by the crash can be determined according to the class name (fileName) in the crash information B of the application. Then, a toggle (toggle) name corresponding to the subfunction is issued to the client, and the function can be turned on and/or off by means of the state of the toggle.
[0099] {“data”:[{“exceptionType”:“java.lang.RuntimeException”, “className”:“io_realm_internal_OsSharedRealm”, “fileName”:“io_realm_internal_OsSharedRealm.cpp”, “isNativeMethod”: true,
“methodName”:“nativeGetSharedRealm”, “downgradestrategy”: 10,
“toggle”: [“ris-mystar-camera”],
“matchRules”:[“exceptionType”, “fileName”, “isNativeMethod”, “methodName”]}]}
[0100] In step S412, the crashed sub-function of the application may be turned off on the basis of the first downgrade strategy. In the present embodiment of the present invention, on the basis of the parsed crash information of the application, it can be determined that crash handling strategy 10 is to be adopted, and the toggle state corresponding to the sub-function is set to the off state, so that a user entrance of the sub-function is no longer displayed in the display page of the application, thereby turning off the crashed sub-function of the application, and the user may continue to use other subfunctions that have not crashed.
[0101 ] Until the application is restarted and/or execution of the first downgrade strategy is stopped, the off sub-function may be turned on again on the basis of the first upgrade strategy corresponding to the first downgrade strategy in step S413, so that all sub-functions of the application recover normal.
[0102] In another optional embodiment of the present invention, for the second downgrade strategy and the second upgrade strategy corresponding to the second downgrade strategy, step S4 may include steps S421 to S425, as shown in FIG. 3. In step S421 , it is judged whether the number of times the same type of application crash occurs over a preset period of time exceeds a preset threshold. Here, on the basis of the crash information B of the application, an application crash type may be determined, and the number of times that the application crash type occurs in the preset period of time can be retrieved. If the application crash type is not retrieved, a crash record regarding the application crash type may be created, so that the crash record can be queried the next time this type of application crash occurs.
[0103] If the number of times the same type of application crash occurs over the preset period of time exceeds the preset threshold, which means that this type of application crash frequently occurs, then in step S422, the crashed subfunction of the application may be determined on the basis of the crash information B of the application. Likewise, the crashed program section in the application may be determined according to the method name in the crash information B of the application, and the sub-function affected by the crash is determined according to the class name and/or packet name in the crash information B of the application. Then, the toggle name corresponding to the sub-function is issued to the client.
[0104] After the sub-function is determined, it is judged in step S423 whether the determined sub-function belongs to a pre-given sub-function, the pre-given sub-function including a function of remotely manipulating a vehicle, for example. If the determined sub-function belongs to the pre-given sub-function, it may be determined that crash handling strategy 11 is to be adopted, then in step S424, the crashed sub-function of the application is turned off on the basis of the second downgrade strategy. Here, the toggle state corresponding to the sub-function may be set to an off state, thereby turning off the crashed important sub-function of the application (e.g., a function of remotely manipulating a vehicle), and the user may continue to use other important subfunctions that have not crashed. While turning off the sub-function, optionally, it is also possible to send to the user prompt information regarding the current sub-function not available by means of a back end server 15.
[0105] Until the application is upgraded or a back end service provided by the back end server 15 is updated, in step S425, the off sub-function is turned on again on the basis of the second upgrade strategy corresponding to the second downgrade strategy. This is different from executing the first upgrade strategy until the application is restarted and/or execution of the first downgrade strategy is stopped, because this type of application crash occurs frequently. Especially after restarting the application, this type of application crash may continue to occur. Therefore, the second upgrade strategy is executed only after the application has been repaired by means of an application upgrade or a back end service update.
[0106] It can be understood that the crash handling strategy can be adjusted as needed, and is not limited to the above enumerated strategies.
[0107] According to the present embodiment of the present invention, the crash handling strategy can be automatically matched and executed according to the crash information of the application without user participation, thereby improving the efficiency of the application crash handling, and ensuring, as much as possible, that sub-functions of the application that have not crashed are still available for use.
[0108] FIG. 4 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention. Only differences from the embodiment shown in FIG. 1 are described below, and for brevity, the same steps will not be described again.
[0109] The method may further include steps S110 and S11. In step S110, it is judged whether the function of application crash handling is turned on. if the function of application crash handling is turned on, the configuration table of application crash handling strategies is remotely updated by the back end server 15 in step S11 . In another optional embodiment of the present invention, a configuration table that can be adjusted in real-time according to actual requirements is stored in the back end server 15, and on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter may be obtained from the back end server 15, and a configuration table stored locally on the client is synchronously updated, wherein the parameter of the client may include, for example, an operating system type, an operating system version, an application version, and/or a device model of the client, etc. It can be understood that the configuration table information required for different operating system types, operating system versions, application versions, and/or device models of the client may differ from each other.
[0110] It should be noted that the locally stored configuration table can be synchronously updated to the latest state after starting the application program, and the synchronous update may also be performed after step S3. As shown in FIG. 5, the method may further include steps S10 and S11. If it is judged in step S3 that the crash information B of the application is not present in the configuration table of application crash handling strategies stored in the client local storage module, it is queried in step S10 whether the back end server 15 has an updated configuration table of application crash handling strategies. If it is queried whether the back end server 15 has the updated configuration table of application crash handling strategies, then the updated configuration table is downloaded from the back end server 15 in step S11 , and the local configuration table of the client device where the application is located is updated. In this way, it can be ensured that the latest configuration table participates in the matching, thereby avoiding crash handling strategy matching failure caused by failure to update the configuration table in time.
[0111 ] FIG. 6 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention. Only differences from the embodiment shown in FIG. 1 are described below, and for brevity, the same steps will not be described again.
[0112] The method may further include steps S5 and S6. In step S5, after performing crash handling of the application crash, it is monitored whether a preset number of application crashes have occurred over a preset period of time. If the preset number of application crashes have occurred over the preset period of time, the crash handling is stopped and reported to the back end server 15 in step S6. In another optional embodiment of the present invention, for example, three application crashes occur over a period of one minute, which means that the application crash is difficult to repair through the crash handling strategy in the current configuration table. Therefore, it may be reported to the back end server 15, so that the development personnel and/or maintenance personnel of the back end may add to the configuration table a crash handling strategy adapted to the application crash according to the content of the report. In this way, unresolvable application crashes can be reported to the back end personnel in a timely manner, thereby improving the applicability of the crash handling strategy.
[0113] FIG. 7 shows a flowchart of a method for handling an application crash according to another exemplary embodiment of the present invention. Only differences from the embodiment shown in FIG. 1 are described below, and for brevity, the same steps will not be described again.
[0114] The method may further include steps S12 and S13. In step S12, it is judged, on the basis of the monitored thread information crash of the application crash, whether the application crash is a main thread crash or a sub-thread crash. If the application crash is the sub-thread crash, the crash information of the sub-thread crash is recorded in step S13. On the basis of the crash information, buried points and log information may be obtained without crash handling of the sub-thread program. If the application is a main thread crash, it proceeds to step S2 to perform crash handling according to the present invention of the main thread crash. The reliability of the application crash monitoring can be effectively improved by using two or more application crash monitoring modes simultaneously, and the crash occurring in the subthread program is recorded.
[0115] In addition, it should be noted that the step number described herein does not necessarily represent an order, but is merely a reference numeral. The order may be changed according to a specific situation, so long as the technical objective of the present invention can be achieved.
[0116] FIG. 8 shows a block diagram of a device for running an application according to an exemplary embodiment of the present invention.
[0117] As shown in FIG. 8, the device 1 may include the following components: an application crash monitoring module 11 configured to monitor the occurrence of an application crash, and to obtain crash information of the application; an application crash protection management module 12 configured to enable and/or deactivate a corresponding application crash handling function on the basis of the crash information of the application and a configuration table of application crash handling strategies, and to enable and/or deactivate a remote update function of the configuration table; a crash handling module 13 configured to handle the application crash on the basis of a crash handling strategy corresponding to the obtained crash information of the application; and a client local storage module 14 configured to locally store the configuration table, the configuration table including a mapping relationship between crash information A of applications and crash handling strategies. Optionally, the device 1 further includes a parsing unit 16 configured to parse the stack information of the crashed application into crash information B of the application and/or parse the configuration table into crash information A of the application included in the configuration table.
[0118] FIG. 9 shows a block diagram of a system for handling an application crash according to an exemplary embodiment of the present invention. The system 10 may include the device 1 and a back end server 15. The back end server is configured to be able to remotely update the configuration table in the client local storage module. Here, the device 1 may likewise include an application crash monitoring module 11 , an application crash protection management module 12, a crash handling module 13, and a client local storage module 14, as shown in the embodiment shown in FIG. 8, which is not described herein again.
[0119] In the following, reference will be made to a timing diagram for explaining an application crash handling process according to an exemplary embodiment of the present invention shown in FIG. 10.
[0120] After starting the application, it is monitored in step S1 whether an application crash occurs, and at the same time, it is judged in step S110 whether the function of application crash handling is turned on. If the function of application crash handling is turned on, the application crash protection management module 12 may send an on signal to the application crash monitoring module 11. Upon receiving the on signal, the application crash monitoring module 11 may monitor the occurrence of the application crash, perform step S2 to obtain crash information B of the application, and send the obtained crash information to the application crash protection management module 12. After the application crash protection management module 12 receives the crash information B of the application, it may be judged in step S3 whether the crash information B of the application is present in the configuration table of application crash handling strategies stored in the client local storage module 14, and step S4 is performed by the crash handling module 13 when the crash information B is present, that is, crash handling is performed on the basis of a crash handling strategy corresponding to the crash information B of the application in the configuration table.
[0121 ] Meanwhile, if the function of application crash handling is judged in step S11 0, then the configuration table of application crash handling strategies is remotely updated by the back end server 15 in step S11. Here, an enable signal of a remote update function may be sent to the application crash protection management module 12, the application crash protection management module 12 obtains, on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter from the back end server 15, and synchronously updates the configuration table stored in the client local storage module 14, wherein the parameter of the client includes, for example, an operating system type, an operating system version, an application version, and/or a device model of the client, etc. The parsing unit 16 may parse the updated configuration table into the crash information A of the application included in the configuration table, and send the parsed crash information A to the application crash protection management module 12, so that the crash information B and parsed crash information A of the application may be matched in the application crash protection management module 12.
[0122] Although particular embodiments of the present invention are described in detail herein, the particular embodiments are merely for the purpose of explanation, and should not be considered to limit the scope of the present invention. Various replacement schemes and modification schemes may be provided without departing from the core and scope of the present invention.

Claims

1 . A method for handling an application crash, the method comprising: monitoring whether an application crash has occurred; if it is monitored that the application crash has occurred, obtaining crash information (B) of the application; judging whether the crash information (B) of the application is present in a configuration table of application crash handling strategies, wherein the configuration table comprises a stored mapping relationship between crash information (A) of applications and crash handling strategies; and if the crash information (B) of the application is present in the configuration table, performing crash handling on the basis of a crash handling strategy corresponding to the crash information (B) of the application in the configuration table.
2. The method according to claim 1 , wherein crash handling is automatically performed on the basis of the crash handling strategy corresponding to the crash information of the application in the configuration table without being on the basis of user input.
3. The method according to claim 1 or 2, wherein the configuration table of application crash handling strategies is stored locally on a client device running the application, and the configuration table is remotely updated by a back end server (15).
4. The method according to any one of claims 1 to 3, wherein after the application is started and/or when the crash information (B) of the application is not present in the configuration table of application crash handling strategies stored in a client local storage module, it is queried whether the back end server (15) has an updated configuration table of application crash handling strategies; and If there is an update, then the updated configuration table is downloaded from the back end server (15), and the local configuration table of the client device where the application is located is updated.
5. The method according to any one of claims 1 to 4, wherein the crash information (A, B) of the application comprises type information and/or identification information of an application crash, wherein the type information comprises a crash type, and the identification information comprises a full class name, a method name, and/or a file name, and wherein the full class name comprises a class name and/or a packet name.
6. The method according to any one of claims 1 to 5, wherein the method further comprises: after performing crash handling of the application crash, monitoring whether a preset number of application crashes have occurred over a preset period of time; and if the preset number of application crashes have occurred over the preset period of time, stopping performing the crash handling and reporting to the back end server (15).
7. The method according to any one of claims 1 to 6, wherein matching of the obtained crash information (B) of the application and the crash information (A) of the application in the configuration table is performed by means of fuzzy judgment, wherein a judgment basis parameter on which the fuzzy judgment is based can be dynamically adjusted according to the obtained crash information (B) of the application and/or the crash information (A) of the application in the configuration table.
8. The method according to any one of claims 1 to 7, wherein the crash handling strategy comprises one or more of the following strategies: doing no operation; displaying an error page and directing a user to clear user data; displaying an upgrade page and directing the user to upgrade the application; displaying a page to display a recommended solution; performing automatic restart; performing automatic restart and clearing local user data; displaying a page to display an application crash report; exiting and re-logging in the application; re-initializing a software development kit without restarting the application; a first downgrade strategy and a first upgrade strategy corresponding to the first downgrade strategy; and/or a second downgrade strategy and a second upgrade strategy corresponding to the second downgrade strategy.
9. The method according to any one of claims 1 to 8, wherein a crashed sub-function of the application is determined on the basis of the crash information (B) of the application, and the crashed sub-function of the application is turned off on the basis of the first downgrade strategy until the application is restarted and/or execution of the first downgrade strategy is stopped, and the off sub-function is turned on again on the basis of the first upgrade strategy.
10. The method according to any one of claims 1 to 9, wherein it is judged whether the number of times the same type of application crash occurs over a preset period of time exceeds a preset threshold; if the number of times that the same type of application crash occurs over the preset period of time exceeds the preset threshold, it is judged, on the basis of the crash information (B) of the application, whether the determined sub-function belongs to a pregiven sub-function; if the determined sub-function belongs to the pre-given sub-function, the crashed sub-function of the application is turned off on the basis of the second downgrade strategy until the application is upgraded or a back end service provided by a back end server (15) is updated, and the off sub-function is turned on again on the basis of the second upgrade strategy.
11. The method according to any one of claims 1 to 10, wherein the method further comprises: obtaining, on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter from the back end server (15), and synchronously updating a configuration table stored locally in the client, wherein the parameter of the client comprises an operating system type, an operating system version, an application version, and/or a device model of the client.
12. The method according to any one of claims 1 to 11 , wherein the method further comprises: judging, on the basis of the monitored thread information crash of the application crash, whether the application crash is a main thread crash or a sub-thread crash; if the application crash is the sub-thread crash, recording crash information of the sub-thread; and if the application is a main thread crash, performing the crash handling of the main thread crash.
13. A device (1 ) for running an application, characterized by comprising the following components: an application crash monitoring module (11 ) configured to monitor the occurrence of an application crash, and to obtain crash information of an application; an application crash protection management module (12) configured to enable and/or deactivate a corresponding application crash handling function on the basis of the crash information of the application and a configuration table of application crash handling strategies, and to enable and/or deactivate a remote update function of the configuration table; a crash handling module (13) configured to handle the application crash on the basis of a crash handling strategy corresponding to the obtained crash information of the application; and a client local storage module (14) configured to locally store the configuration table, the configuration table comprising a mapping relationship between crash information (A) of applications and crash handling strategies.
14. The device (1 ) according to claim 13, wherein the crash handling module (13) is configured to automatically perform the crash handling on the basis of the crash handling strategy corresponding to the crash information of the application in the configuration table without being on the basis of user input.
15. The device (1 ) according to claim 13 or 14, wherein the configuration table of application crash handling strategies is stored in the client local storage module (14), and the stored configuration table is remotely updated by a back end server (15).
16. The device (1 ) according to any one of claims 13 to 15, wherein the application crash protection management module (12) is configured to: after the application is started and/or when the crash information (B) of the application is not present in the configuration table of application crash handling strategies stored in the client local storage module, query whether the back end server (15) has an updated configuration table of application crash handling strategies; if there is an update, download the updated configuration table from the back end server (15) and update the configuration table stored in the client local storage module (14).
17. The device (1 ) according to any one of claims 13 to 16, wherein the crash information of the application comprises type information and/or identification information of an application crash, wherein the type information comprises a crash type, and the identification information comprises a full class name, a method name, and/or a file name, and wherein the full class name comprises a class name and/or a packet name.
18. The device (1 ) according to any one of claims 13 to 17, wherein the application crash protection management module (12) is configured to: monitor whether a preset number of application crashes have occurred over a preset period of time, and stop performing the crash handling and report to the back end server (15) when the preset number of application crashes have occurred over the preset period of time.
19. The device (1 ) according to any one of claims 13 to 18, wherein the application crash protection management module (12) is configured to perform matching of the obtained crash information (B) of the application and the crash information (A) of the application in the configuration table by means of fuzzy judgment, wherein a judgment basis parameter on which the fuzzy judgment is based can be dynamically adjusted according to the obtained crash information (B) of the application and/or the crash information (A) of the application in the configuration table.
20. The device (1 ) according to any one of claims 13 to 19, wherein the crash handling strategy comprises one or more of the following strategies: doing no operation; displaying an error page and directing a user to clear user data; displaying an upgrade page and directing the user to upgrade the application; displaying a page to display a recommended solution; performing automatic restart; performing automatic restart and clearing local user data; displaying a page to display an application crash report; exiting and re-logging in the application; re-initializing a software development kit without restarting the application; a first downgrade strategy and a first upgrade strategy corresponding to the first downgrade strategy; and/or a second downgrade strategy and a second upgrade strategy corresponding to the second downgrade strategy.
21. The device (1 ) according to any one of claims 13 to 20, wherein the crash handling module (13) is configured to: determine a crashed sub-function of the application on the basis of the crash information (B) of the application, and turn off the crashed sub-function of the application on the basis of the first downgrade strategy until the application is restarted and/or execution of the first downgrade strategy is stopped, and turn on the off sub-function again on the basis of the first upgrade strategy.
22. The device (1 ) according to any one of claims 13 to 21 , wherein the crash handling module (13) is configured to: judge whether the number of times the same type of application crash occurs over a preset period of time exceeds a preset threshold; if the number of times that the same type of application crash occurs over the preset period of time exceeds the preset threshold, judge, on the basis of the crash information (B) of the application, whether the determined sub-function belongs to a pre-given sub-function; if the determined sub-function belongs to the pre-given sub-function, turn off the crashed sub-function of the application on the basis of the second downgrade strategy until the application is upgraded or a back end service provided by the back end server (15) is updated, and turn on the off sub-function again on the basis of the second upgrade strategy.
23. The device (1 ) according to any one of claims 13 to 22, wherein the crash handling module (13) is configured to: obtain, on the basis of a parameter of a client, a configuration table of application crash handling strategies adapted to the parameter from the back end server (15), and synchronously update a configuration table stored locally in the client, wherein the parameter of the client comprises an operating system type, an operating system version, an application version, and/or a device model of the client.
24. The device (1 ) according to any one of claims 13 to 23, wherein the application crash monitoring module (11 ) judges, on the basis of the monitored thread information crash of the application crash, whether the application crash is a main thread crash or a sub-thread crash, and if the application is the main thread crash, the crash handling of the main thread crash is performed.
25. A system (10) for handling an application crash, the system (10) being used to perform the method according to any one of claims 1 to 12, characterized in that the system (100) comprises one or more of the following components: an application crash monitoring module (11 ) configured to monitor the occurrence of an application crash, and to obtain crash information (B) of the application; an application crash protection management module (12) configured to enable and/or deactivate a corresponding application crash handling function on the basis of the crash information (B) of the application and a configuration table of application crash handling strategies, and to enable and/or deactivate a remote update function of the configuration table; a crash handling module (13) configured to handle the application crash on the basis of a crash handling strategy corresponding to the obtained crash information (B) of the application; a client local storage module (14) configured to locally store the configuration table, the configuration table comprising a mapping relationship between information (A) of application crashes and downgrade strategies; and/or the back end server (15) configured to be able to remotely update the configuration table in the client local storage module.
26. A computer program product, such as a computer-readable program carrier, comprising computer program instructions that, when executed by a processor, at least assist in implementing the steps of the method according to any one of claims 1 to 12.
PCT/EP2023/025441 2022-11-10 2023-10-23 Method and system for handling application crash, and device for running application Ceased WO2024099586A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211409719.1 2022-11-10
CN202211409719.1A CN115934390A (en) 2022-11-10 2022-11-10 Method and system for processing application program crash and device for running application program

Publications (1)

Publication Number Publication Date
WO2024099586A1 true WO2024099586A1 (en) 2024-05-16

Family

ID=86653124

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/EP2023/025441 Ceased WO2024099586A1 (en) 2022-11-10 2023-10-23 Method and system for handling application crash, and device for running application

Country Status (2)

Country Link
CN (1) CN115934390A (en)
WO (1) WO2024099586A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120512288A (en) * 2025-06-13 2025-08-19 奇安信科技集团股份有限公司 Terminal protection method and device based on implantation behavior

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117555717B (en) * 2024-01-10 2024-04-26 深圳聚点互动科技有限公司 Application exception handling method, terminal and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150271008A1 (en) * 2014-03-24 2015-09-24 Microsoft Corporation Identifying troubleshooting options for resolving network failures
US20200241947A1 (en) * 2017-08-01 2020-07-30 Hitachi, Ltd. Management system of storage system
US20210067607A1 (en) * 2019-08-30 2021-03-04 Microstrategy Incorporated Providing updates for server environments

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150271008A1 (en) * 2014-03-24 2015-09-24 Microsoft Corporation Identifying troubleshooting options for resolving network failures
US20200241947A1 (en) * 2017-08-01 2020-07-30 Hitachi, Ltd. Management system of storage system
US20210067607A1 (en) * 2019-08-30 2021-03-04 Microstrategy Incorporated Providing updates for server environments

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN120512288A (en) * 2025-06-13 2025-08-19 奇安信科技集团股份有限公司 Terminal protection method and device based on implantation behavior

Also Published As

Publication number Publication date
CN115934390A (en) 2023-04-07

Similar Documents

Publication Publication Date Title
US12277024B2 (en) Method for managing ECU on vehicle, and ECU and readable storage medium
CN112099825B (en) Method, device, equipment and storage medium for upgrading component
US20070277167A1 (en) System and method for computer system maintenance
CN112905230B (en) Application management method, device, terminal equipment and storage medium
WO2024207807A1 (en) Upgrade progress display method and system for domain controller, upgrade exception handling method and system for domain controller, and device
CN114026537A (en) Method for carrying out a dialogue with a computer on a vehicle bus of a vehicle
CN111930561B (en) Streaming task automatic monitoring alarm restarting system and method
CN115934390A (en) Method and system for processing application program crash and device for running application program
JP2008033836A (en) Transmission apparatus and software automatic update method
CN113094280B (en) Upgrade method, system, and readable storage medium
CN114237722B (en) System starting method, device, equipment and engineering vehicle
CN107967192B (en) A system crash processing method and device for an intelligent terminal
CN113867767A (en) A kind of server component upgrade method and server
CN115599645B (en) Method and device for testing stability of linux driving module
US8776071B2 (en) Microprocessor operation monitoring system
CN113590420B (en) Cluster state supervision method and device
CN112698885B (en) Method and device for operating
CN113760409B (en) Service instance management method, device, equipment and storage medium
CN117707118A (en) Vehicle fault analysis processing system and method
CN114625603A (en) Abnormality prompting method, electronic device, and computer-readable storage medium
CN115756659A (en) Service assembly, deployment, operation and maintenance integration method and system
CN114217835A (en) A method for online upgrade of audio equipment and audio equipment
KR100803822B1 (en) Multithreaded system loading device in mobile communication system
CN107247642B (en) Method and device for determining executable mapping file during system startup
RU2816885C2 (en) Method of interacting with computing device on vehicle on-board bus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23798107

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23798107

Country of ref document: EP

Kind code of ref document: A1