Startup application crash processing method and device, equipment and storage medium

By monitoring the number of crashes in real time after the application starts and stopping when the number exceeds a threshold and configuring environment variables, the problem of users being unable to use the application normally due to startup wizard crashes has been resolved, ensuring user experience and reducing complaint rates.

CN120973616APending Publication Date: 2025-11-18YIBIN XGIMI OPTOELECTRONIC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410609925.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-16
Publication Date
2025-11-18

AI Technical Summary

Technical Problem

The lack of solutions in the current technology for dealing with startup wizard crashes causes electronic devices to cycle through startup wizard crashes, restarts, and further crashes, making them unusable for users and affecting the user experience.

Method used

After the startup application is launched, the number of crashes is monitored in real time. If the number exceeds a preset threshold, the startup application is stopped from running. Environment variables are configured, and a startup completion message is broadcast to trigger the relevant application to start, so that the user can enter the desktop normally.

Benefits of technology

This solution resolved the issue of users being unable to access the desktop due to application crashes upon startup, thus ensuring a better user experience and reducing complaint and churn rates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120973616A_ABST
    Figure CN120973616A_ABST
Patent Text Reader

Abstract

The invention provides a crash processing method and device for a startup application, equipment and a storage medium, and the method comprises the steps: monitoring the crash frequency of the startup application in real time after the startup application of electronic equipment is started and runs; and if the crash frequency is greater than or equal to a preset threshold value, stopping running the startup application, configuring an environment variable of the electronic equipment and broadcasting startup completion information to related applications in the electronic equipment so as to trigger the related applications to start and run. The crash frequency of the startup application is judged, if the crash frequency is larger than or equal to the preset threshold value, running of the startup application is stopped, the environment variables of the electronic equipment are configured, and the startup completion information is broadcasted to the related applications in the electronic equipment, so that the related applications are triggered to start running; the problem that the user cannot normally enter the desktop to use the electronic equipment due to the crash of the startup application is solved, the use experience of the user is ensured, and the complaint rate and the churn rate of the user are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of exception handling, in particular to a startup application crash processing method and device, equipment and storage medium. BACKGROUND

[0002] The startup guide is a series of guiding steps provided to help users set and configure the device when the electronic device is started. Through the running of the startup guide, the user can be familiar with the use of the electronic device, and the initialization setting of the device can be completed, thereby improving the use efficiency and user experience of the electronic device.

[0003] In the prior art, when using the startup guide, the startup guide is usually deployed in the electronic device, so that the user can trigger the running of the startup guide when using the electronic device for the first time.

[0004] However, the prior art lacks a response scheme for the crash of the startup guide, so that when the startup guide crashes, the electronic device is always in a cycle of startup guide crash, restart and re-crash, eventually leading to the user being unable to normally use the electronic device, resulting in complaints or return of the machine, and affecting the user experience. SUMMARY

[0005] The purpose of the present application is to provide a startup application crash processing method, device, equipment and storage medium to solve the problem of lack of response scheme for the crash of the startup guide in the prior art.

[0006] To achieve the above purpose, the technical scheme adopted by the embodiments of the present application is as follows:

[0007] In a first aspect, an embodiment of the present application provides a startup application crash processing method, which comprises:

[0008] After the startup application of the electronic device is started and runs, the number of crashes of the startup application is monitored in real time;

[0009] If the number of crashes is greater than or equal to a preset threshold, the startup application is stopped, and the environment variable of the electronic device is configured and the startup completion information is broadcast to the related applications in the electronic device to trigger the startup and running of each related application.

[0010] In a possible implementation, the number of crashes of the startup application is monitored in real time, which comprises:

[0011] register and run a monitoring component, when the monitoring component is running, respectively monitor running crash information of a Java layer of the booting application and running crash information of a Native layer of the booting application, and determine a crash number of the booting application according to the running crash information of the Java layer of the booting application and the running crash information of the Native layer of the booting application.

[0012] In a possible implementation, the respectively monitoring the running crash information of the Java layer of the booting application and the running crash information of the Native layer of the booting application comprises:

[0013] monitoring the running crash information of the Java layer based on a preset abnormality monitoring function;

[0014] monitoring the running crash information of the Native layer based on a registered signal processor.

[0015] In a possible implementation, the determining the crash number of the booting application according to the running crash information of the Java layer of the booting application and the running crash information of the Native layer of the booting application comprises:

[0016] reading and updating the crash number according to the running crash information of the Java layer;

[0017] reading and updating the crash number according to the running crash information of the Native layer.

[0018] In a possible implementation, the crash number is stored in a system attribute in an environment variable of the booting application.

[0019] In a possible implementation, the stopping running the booting application, and configuring an environment variable of the electronic device and broadcasting booting completion information to a related application in the electronic device comprises:

[0020] running a target service, when the target service is running, ending the booting application, so that the booting application stops running, and when the target service is running, configuring an environment variable of the electronic device and broadcasting booting completion information to a related application in the electronic device.

[0021] In a possible implementation, the method further comprises:

[0022] when the target service is running, modifying the crash number to an initial value.

[0023] In a second aspect, another embodiment of the present application provides a crash processing device of a booting application, the device comprising:

[0024] a monitoring module, configured to monitor a crash number of a booting application of an electronic device in real time after the booting application starts running.

[0025] If the number of crashes is greater than or equal to a preset threshold, the processing module is used to stop the running of the boot application, configure the environment variables of the electronic device, and broadcast boot completion information to the relevant applications in the electronic device to trigger the startup and running of each relevant application.

[0026] In one possible implementation, the monitoring module is specifically used for:

[0027] Register and run a monitoring component. When the monitoring component is running, it monitors the Java layer crash information and the Native layer crash information of the boot application, and determines the number of crashes of the boot application based on the Java layer crash information and the Native layer crash information.

[0028] In one possible implementation, the monitoring module is specifically used for:

[0029] Listen for runtime crash information in the Java layer based on a pre-defined exception monitoring function;

[0030] The registered signal processor listens for runtime crash information in the Native layer.

[0031] In one possible implementation, the monitoring module is specifically used for:

[0032] Based on the crash information from the Java layer, read and update the crash count;

[0033] Based on the crash information of the Native layer, read and update the number of crashes.

[0034] In one possible implementation, the number of crashes is stored in a system property within the environment variables of the boot application.

[0035] In one possible implementation, the processing module is specifically used for:

[0036] The target service is run. When the target service is running, the boot application is terminated so that the boot application stops running. When the target service is running, the environment variables of the electronic device are configured and boot completion information is broadcast to the relevant applications in the electronic device.

[0037] In one possible implementation, the device further includes:

[0038] The modification module is used to modify the number of crashes to an initial value when the target service is running.

[0039] In a third aspect, another embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine readable instructions executable by the processor, when the electronic device is running, the processor and the storage medium communicate through the bus, the processor executes the machine readable instructions to perform the steps of any of the methods of the first aspect.

[0040] In a fourth aspect, another embodiment of the present application provides a storage medium, the storage medium storing a computer program, when the computer program is run by a processor, performing the steps of any of the methods of the first aspect.

[0041] The beneficial effects of the present application are: by monitoring the crash number of the boot application in real time after the boot application is started and run at boot, and judging the crash number of the boot application, if the crash number is greater than or equal to the preset threshold, the boot application is stopped, and the environment variable of the electronic device is configured and the boot completion information is broadcast to the related applications in the electronic device to trigger the start and run of each related application, so that the user can normally enter the desktop of the electronic device and use the electronic device, solving the problem that the user cannot normally enter the desktop and use the electronic device due to the crash of the boot application, ensuring the user experience, and reducing the user complaint rate and the user loss rate. BRIEF DESCRIPTION OF DRAWINGS

[0042] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiments. It should be understood that the following drawings only show some embodiments of the present application, and therefore should not be considered as limiting the scope. For those skilled in the art, other related drawings can also be obtained without creative labor.

[0043] Figure 1 A flowchart of a boot application crash processing method provided by an embodiment of the present application;

[0044] Figure 2 A flowchart of monitoring the crash number of the boot application in real time in the boot application crash processing method provided by an embodiment of the present application;

[0045] Figure 3 A flowchart of listening to the running crash information of the Java layer and the running crash information of the Native layer of the boot application respectively in the boot application crash processing method provided by an embodiment of the present application;

[0046] Figure 4 A flowchart of determining the crash number of the boot application in the boot application crash processing method provided by an embodiment of the present application;

[0047] Figure 5 A schematic diagram of a crash processing device for a boot application according to an embodiment of the present application is provided;

[0048] Figure 6 A structural schematic diagram of an electronic device according to an embodiment of the present application is provided. DETAILED DESCRIPTION

[0049] To make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described below in conjunction with the accompanying drawings in the embodiments of the present application. It should be understood that the accompanying drawings in the present application are only intended to illustrate and describe the present application, and are not intended to limit the scope of the present application. In addition, it should be understood that the accompanying drawings are not drawn to scale. The flowcharts show the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts can not be implemented in order, and the steps without logical context relationship can be reversed in order or implemented simultaneously. In addition, one or more other operations can be added to the flowcharts or one or more operations can be removed from the flowcharts under the guidance of the content of the present application.

[0050] In addition, the described embodiments are only some of the embodiments of the present application, not all the embodiments. The components of the embodiments of the present application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0051] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.

[0052] In the prior art, when using a boot wizard, the boot wizard is usually deployed into an electronic device, so that the user can trigger the running of the boot wizard when using the electronic device for the first time. The boot wizard refers to a set of guidelines or processes provided by the operating system in the electronic device when starting, helping the user to complete the initial settings and configurations of the electronic device, usually including steps such as selecting system language, region, agreeing to user agreement, setting data privacy, connecting to network, logging in account, selecting enhanced services, etc.

[0053] However, the prior art lacks a solution to the crash of the boot wizard, so that when the boot wizard crashes, the electronic device is always in a cycle of crash, restart and re-crash of the boot wizard, eventually leading to the user being unable to normally use the electronic device, specifically, being unable to complete the initial settings and configurations, thereby leading to complaints or returns, affecting the user's experience.

[0054] Based on the above problems, the present application provides a boot application crash processing method, which monitors the number of crashes of the boot application in real time after the boot application of the electronic device is started and runs, and judges the number of crashes of the boot application. If the number of crashes is greater than or equal to a preset threshold, the boot application is stopped, and the environment variables of the electronic device are configured and the boot completion information is broadcast to the related applications in the electronic device to trigger the start and running of each related application, thereby solving the problem that the user cannot normally enter the desktop to use the electronic device due to the crash of the boot application, thereby ensuring the user's experience and reducing the user complaint rate and user loss rate.

[0055] First, the related background involved in the boot application crash processing method provided by the present application is introduced.

[0056] It can be understood that the boot application in the present application is the boot wizard, which is used to provide guidance for the user when the electronic device starts, and helps the user to complete the initial settings and configurations of the electronic device, wherein the initial settings include: selecting the language, region, network, privacy settings and account settings used by the user, and the configurations include: the configuration of environment variables, etc. The electronic device can be a smart phone, a tablet computer, a smart television, a smart watch, a projector and a smart sound, etc.

[0057] For example, during the first booting of the electronic device, various problems may exist in the electronic device, leading to the crash of the running of the boot application. The boot application crash processing method provided by the present application can be used to process the crash of the boot application, thereby solving the problem that the user cannot normally enter the desktop to use the electronic device due to the crash of the boot application, thereby ensuring the user's experience and reducing the user complaint rate and user loss rate. The problems that may exist in the electronic device include, for example: software conflict, insufficient system resources, device incompatibility, damaged installation files, operating system problems, security software interference and external storage problems.

[0058] The boot application crash processing method provided by the present application is described in detail below.

[0059] Figure 1 A flowchart of the boot application crash processing method provided by the present application is shown in FIG. 1. Figure 1As shown, the boot-up application crash processing method provided by the embodiments of the present application is executed by any electronic device, and the method comprises the following steps.

[0060] S101, after the boot-up application of the electronic device is started and runs, the number of crashes of the boot-up application is monitored in real time.

[0061] It can be understood that when the user uses the electronic device for the first time, the electronic device is powered on, and the boot-up application is started to enable the user to use the electronic device after the boot-up application is run.

[0062] Optionally, after the boot-up application of the electronic device is started and runs, the electronic device can monitor the number of crashes of the boot-up application, wherein the number of crashes of the boot-up application can be monitored by a task manager, a registry, a configuration file, and a third-party tool.

[0063] For example, after the boot-up application of the electronic device is started and runs, the electronic device can monitor the crash information of the boot-up application in real time by listening to components, so as to obtain the number of crashes of the boot-up application.

[0064] By monitoring the number of crashes of the boot-up application in real time, the electronic device can quickly respond to the crash of the boot-up application, so that the user can normally enter the desktop of the electronic device and use the electronic device.

[0065] S102, if the number of crashes is greater than or equal to a preset threshold, the boot-up application is stopped, the environment variable of the electronic device is configured, and the boot-up completion information is broadcast to related applications in the electronic device to trigger the related applications to start and run.

[0066] It can be understood that during the running of the boot-up application, when the boot-up application crashes, the current situation of the boot-up application can be determined by the number of crashes. If the number of crashes of the boot-up application is less than the preset threshold, it means that the boot-up application may have the possibility to eliminate the crash by restarting. Therefore, when the number of crashes of the boot-up application is less than the preset threshold, the boot-up application is not processed, so that the boot-up application can process the crash according to the preset running logic in the boot-up application.

[0067] Correspondingly, if the number of crashes of the boot-up application is greater than or equal to the preset threshold, it means that the boot-up application does not have the possibility to eliminate the crash by restarting, that is, the crash of the boot-up application needs to be intervened, so as to solve the problem that the user cannot normally enter the desktop to use the electronic device due to the crash of the boot-up application, thereby ensuring the user experience and reducing the user complaint rate and the user loss rate.

[0068] Optionally, after obtaining the number of crashes of the boot-up application, the electronic device can determine the number of crashes of the boot-up application. If the number of crashes is greater than or equal to a preset threshold, the electronic device stops running the boot-up application to intervene in the running of the boot-up application, configures the environment variable of the electronic device, and broadcasts boot-up completion information to the related applications in the electronic device to trigger the related applications to start running, so that the user can normally enter the desktop of the electronic device and use the electronic device.

[0069] In the embodiment, by monitoring the number of crashes of the boot-up application in real time after the boot-up application starts running, and determining the number of crashes of the boot-up application, if the number of crashes is greater than or equal to a preset threshold, the boot-up application is stopped, and the environment variable of the electronic device is configured and the boot-up completion information is broadcast to the related applications in the electronic device to trigger the related applications to start running, so that the user can normally enter the desktop of the electronic device and use the electronic device, which solves the problem that the user cannot normally enter the desktop to use the electronic device due to the crash of the boot-up application, ensures the user experience, and reduces the user complaint rate and the user loss rate.

[0070] In a possible implementation manner, Figure 2 A flowchart for monitoring the number of crashes of the boot-up application in real time in the crash processing method of the boot-up application provided by the embodiment is shown in FIG. 1. Figure 2 The step of monitoring the number of crashes of the boot-up application in real time in the step S101 can be performed according to the following steps, and specifically includes:

[0071] S201, register and run a listening component. When the listening component runs, the running crash information of the Java layer of the boot-up application and the running crash information of the Native layer are listened to respectively.

[0072] It can be understood that when the boot-up application is listened to, the boot-up application can be listened to according to the type of the boot-up application. When the boot-up application is a software program running on an Android platform, the Java layer and the Native layer of the boot-up application can be listened to through the listening component, that is, when the listening component listens to the running crash of the Java layer of the boot-up application or the running crash of the Native layer, the running crash information of the Java layer or the running crash information of the Native layer can be obtained.

[0073] Optionally, after the boot-up application starts running, the listening component can be registered and run, so that when the listening component runs, the running crash information of the Java layer of the boot-up application and the running crash information of the Native layer are listened to respectively.

[0074] Optionally, after the startup application is started, the monitoring component can be registered and run to monitor the running information of the Java layer and the Native layer of the startup application respectively, and obtain the running crash information of the Java layer and the running crash information of the Native layer.

[0075] S202, determine the crash number of the startup application according to the running crash information of the Java layer and the running crash information of the Native layer of the startup application.

[0076] Optionally, after obtaining the running crash information of the Java layer and the running crash information of the Native layer of the startup application, the crash number of the startup application can be obtained according to the number of occurrences of the running crash information of the Java layer and the running crash information of the Native layer of the startup application. The crash number of the startup application indicates the total number of crashes of the Java layer and the Native layer in this run.

[0077] By registering and running the monitoring component and monitoring the running crash information of the Java layer and the running crash information of the Native layer of the startup application respectively, the crash number of the startup application can be determined according to the running crash information of the Java layer and the running crash information of the Native layer of the startup application. The crash number of the startup application can be determined, and the startup application can be quickly responded to, so that the user can normally enter the desktop of the electronic device and use the electronic device.

[0078] In a possible implementation manner, Figure 3 A flowchart for monitoring the running crash information of the Java layer and the running crash information of the Native layer of the startup application in the crash processing method of the startup application provided by the embodiments of the present application is shown in Figure 3 The monitoring of the running crash information of the Java layer and the running crash information of the Native layer of the startup application in step S201 can be performed according to the following steps, and specifically includes:

[0079] S301, monitor the running crash information of the Java layer based on a preset exception monitoring function.

[0080] Optionally, when monitoring the running crash information of the Java layer, the running crash information of the Java layer can be monitored based on a preset exception monitoring function.

[0081] Exemplarily, when the running crash information of the Java layer is monitored, the UncaughtExceptionHandler() mode can be adopted, and when the crash occurs, the corresponding error log information is acquired through the logcat command, and the callback reporting is performed through the system / proc file to collect the file handle and the memory information.

[0082] Exemplarily, after the running crash information of the Java layer is monitored, the JavaCallback callback or the NativeCallback callback can be adopted for the upward throwing.

[0083] Exemplarily, the boot wizard can also store the running crash information of the Java layer. Exemplarily, the boot wizard can create the tombstones folder and the tombstone file in the files folder under the boot wizard private directory, and store the running crash information of the Java layer.

[0084] The preset exception monitoring function is adopted to monitor the running crash information of the Java layer, so that the crash information occurring during the running of the Java layer can be captured and responded in real time, and the developer can also quickly locate the root cause of the problem, reduce the troubleshooting time, and help improve the maintainability of the system, because the developer can more easily identify and solve potential problems, instead of performing tedious debugging after the problem occurs, so that the rapid response to the boot application crash condition can be realized, and the user can normally enter the desktop of the electronic device and use the electronic device.

[0085] S302, based on the registered signal processor, the running crash information of the Native layer is monitored.

[0086] Optionally, when the running crash information of the Native layer is monitored, the running crash information of the Native layer can be monitored based on the pre-registered signal processor.

[0087] Exemplarily, when the running crash information of the Native layer is monitored, the new signal processor can be registered first and the old signal processor can be saved. When the running crash information of the Native layer is monitored, the new process is started to collect the crash environment information and write to the tombstone file, and the boot application is also informed through the callback upward throwing. Finally, the problem signal is sent again, and the old signal processor saved and restarted is given to process.

[0088] The signal processor listens to the running crash information of the Native layer, so that the signal processor can immediately capture the running crash information of the Native layer, and can execute some resource cleaning logic before the program crashes, so as to ensure that the resources are correctly released, prevent resource leakage and potential security problems, so as to realize the rapid response to the boot application crash, so that the user can normally enter the desktop of the electronic device and use the electronic device.

[0089] Optionally, the execution order of steps S301-S302 is not unique, and the steps can be executed in parallel.

[0090] In a possible implementation manner, Figure 4 A flowchart for determining the number of crashes of a boot application in the crash processing method of the boot application provided by the embodiments of the present application is shown in FIG. 2. Figure 4 The step S202 of determining the number of crashes of the boot application according to the running crash information of the Java layer and the running crash information of the Native layer includes the following steps.

[0091] S401, reading and updating the number of crashes according to the running crash information of the Java layer.

[0092] Optionally, after the boot application is started, a variable for storing the number of crashes can be initialized in the memory. Each time the running crash information of the Java layer is obtained, the previously stored number of crashes can be read, the number of crashes can be increased by 1 based on the previously stored number of crashes, and the number of crashes can be stored again, so as to update the number of crashes.

[0093] S402, reading and updating the number of crashes according to the running crash information of the Native layer.

[0094] Optionally, after the boot application is started, a variable for storing the number of crashes can be initialized in the memory. Each time the running crash information of the Native layer is obtained, the previously stored number of crashes can be read, the number of crashes can be increased by 1 based on the previously stored number of crashes, and the number of crashes can be stored again, so as to update the number of crashes.

[0095] It can be understood that, for the boot application, the number of crashes includes the number of crashes of the Java layer and the number of crashes of the Native layer.

[0096] In a possible implementation manner, the number of crashes is stored in a system attribute in an environment variable of the boot application.

[0097] Optionally, the number of crashes can also be stored in a system attribute in an environment variable of the boot application.

[0098] Exemplarily, the number of crashes can be stored in a system attribute Prop, specifically, recorded in a boot.crash.count variable in the system prop.

[0099] Storing the number of crashes in the system attribute in the environment variable of the boot-up application has the advantages of being very fast in reading and writing values, not being affected by the crash of the boot-up application, and being able to ensure that the number of crashes is accurately read and recorded. At the same time, the value of the recorded number of crashes does not need to be manually cleared. After the electronic device is powered off, the number of crashes will be automatically emptied by the Android system, and the next time the electronic device is powered on, the number of crashes will be counted again.

[0100] In a possible implementation, when the boot-up application is stopped running and the environment variable of the electronic device is configured and the boot-up completion information is broadcast to the related applications in the electronic device in the step S102, the following steps can be performed, specifically including:

[0101] The target service is run, when the target service is running, the boot-up application is ended, so that the boot-up application is stopped running, and when the target service is running, the environment variable of the electronic device is configured and the boot-up completion information is broadcast to the related applications in the electronic device.

[0102] It can be understood that when the number of crashes is greater than or equal to the preset threshold, if the boot-up application is skipped and the desktop of the electronic device is directly entered, other applications in the electronic device cannot be normally used, because the environment variable related to the boot-up application and the related data are not normally set.

[0103] Optionally, when the number of crashes is greater than or equal to the preset threshold, the electronic device runs a target service, wherein the target service can be a service process that is set by a user in advance to perform environment variable configuration and broadcasting.

[0104] Optionally, when the target service is running, the boot-up application is stopped running, and the electronic device configures the environment variable through the target service, and broadcasts the boot-up completion information to other applications in the electronic device, so that the user can be unaware of the crash of the boot-up application, thereby being able to silently complete the boot-up setting of the electronic device when the electronic device is used for the first time.

[0105] Exemplarily, the electronic device can start a SkipBootService service process of a new process configured as android:process=":remote" when the number of crashes is greater than or equal to the preset threshold. The SkipBootService is a service inherited from the original Android, which can make the user unaware, thereby silently setting the boot-up wizard related data. Specifically, the SkipBootService process and the process of the original boot-up application form a dual-process existence.

[0106] Exemplarily, after the SkipBootService service process is started, the electronic device initiatively pulls up the system desktop through the SkipBootService service process, lets the desktop data start loading, and notifies other applications that the boot application has been completed through the broadcast of the action BOOTWIZARS_FINISH, so that other applications can start initial loading, for example, the start initialization of the system settings of the electronic device, the start initialization of the system services of the electronic device, set the environment variable that the boot application is completed, set the system data that the boot application is completed, including: device_provisioned, user_setup_complete, tv_user_setup_complete and the like are all set to 1, and finally the page of the boot application is set to the disable state through the system interface of the electronic device, to prevent the boot application from being started again when the electronic device is started next time.

[0107] Exemplarily, after the SkipBootService service process completes the above setting, the SkipBootService service process is automatically destroyed and the process of the boot application is ended, so as to avoid affecting the use of the remaining process applications that judge the boot application, so that the user can naturally enter the desktop and normally use the related services provided by the electronic device.

[0108] By running the target service and running the target service, the boot application is ended, the environment variable of the electronic device is configured, and the boot completion information is broadcasted to the related applications in the electronic device, so that the user can be unaware of the crash of the boot application, thereby the boot setting for the first use of the electronic device can be completed silently, the problem that the user cannot normally enter the desktop and use the electronic device due to the crash of the boot application is solved, the user experience is ensured, and the user complaint rate and the user loss rate are reduced.

[0109] In a possible implementation manner, the method further includes:

[0110] When the target service is running, the crash number is modified to the initial value.

[0111] It can be understood that when the target service is running, the electronic device does not need to read and update the crash number of the boot application, and then the crash number can be modified to the initial value, so as to avoid the problem of running error due to variable reading error in the subsequent use process of the electronic device.

[0112] Optionally, during the running of the target service, the electronic device can modify the crash number to the initial value through the running of the target service.

[0113] Based on the same inventive concept, the application further provides a device for handling the crash of the boot application, which has the same principle as the method for handling the crash of the boot application, and the implementation of the device can be referred to the implementation of the method, and the repeated parts will not be described here.

[0114] Figure 5 A schematic diagram of a device for handling the crash of the boot application is provided in the application, as shown in Figure 5 The device comprises a monitoring module 501, a processing module 502 and a modifying module 503.

[0115] The monitoring module 501 is configured to monitor the number of crashes of the boot application in real time after the boot application of the electronic device is started and runs.

[0116] If the number of crashes is greater than or equal to a preset threshold, the processing module 502 is configured to stop running the boot application, configure the environment variable of the electronic device and broadcast the boot completion information to the related applications in the electronic device, so as to trigger the start and running of each related application.

[0117] In a possible implementation, the monitoring module 501 is specifically configured to:

[0118] register and run a listening component, the listening component listens to the running crash information of the Java layer and the running crash information of the Native layer of the boot application respectively when running, and determines the number of crashes of the boot application according to the running crash information of the Java layer and the running crash information of the Native layer of the boot application.

[0119] In a possible implementation, the monitoring module 501 is specifically configured to:

[0120] listen to the running crash information of the Java layer based on a preset abnormality monitoring function;

[0121] listen to the running crash information of the Native layer based on a registered signal processor.

[0122] In a possible implementation, the monitoring module 501 is specifically configured to:

[0123] read and update the number of crashes according to the running crash information of the Java layer;

[0124] read and update the number of crashes according to the running crash information of the Native layer.

[0125] In a possible implementation, the number of crashes is stored in the system attribute in the environment variable of the boot application.

[0126] In a possible implementation, the processing module 502 is specifically configured to:

[0127] running a target service, wherein when the target service is running, the boot application is ended so that the boot application stops running, and when the target service is running, an environment variable of the electronic device is configured and boot completion information is broadcast to a related application in the electronic device.

[0128] In a possible implementation, the apparatus further includes:

[0129] The modifying module 503 is configured to modify the number of crashes to an initial value when the target service is running.

[0130] The description of the processing procedure of each module in the apparatus and the interaction procedure between the modules can refer to the related description in the method embodiments, and will not be repeated here.

[0131] The embodiments of the present application further provide an electronic device, such as Figure 6 as shown in the figure, Figure 6 A structural schematic diagram of the electronic device provided by the embodiments of the present application includes a processor 61, a memory 62, and optionally, a bus 63. The memory 62 stores machine readable instructions (such as the execution instructions of the monitoring module 501, the processing module 502, and the modifying module 503 in the apparatus in the foregoing method embodiments) executable by the processor 61, and when the electronic device is running, the processor 61 and the memory 62 communicate through the bus 63, and the machine readable instructions are executed by the processor 61 to perform the steps of the boot application crash processing method described above. Figure 5

[0132] The embodiments of the present application further provide a computer readable storage medium, and the computer readable storage medium stores a computer program, and when the computer program is run by a processor, the steps of the boot application crash processing method described above are performed.

[0133] ​Those skilled in the art can clearly understand the specific working process of the system and the device described above for the convenience and brevity of description, which can refer to the corresponding process in the method embodiment, and will not be repeated herein. In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other ways. The device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and the actual implementation can have another division, for example, a plurality of modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some communication interface, device or module, which can be electrical, mechanical or other forms.

[0134] In addition, each functional unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. When the functions are realized in the form of software functional units and sold or used as independent products, they can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or say the parts that make contributions to the prior art or parts of the technical solutions can be embodied in the form of software products, which are stored in a storage medium and include a plurality of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0135] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical scope disclosed in the present application, which should be covered within the protection scope of the present application.

Claims

1. A crash handling method for a startup application, characterized in that, include: After the startup application of the electronic device starts running, monitor the number of crashes of the startup application in real time; If the number of crashes is greater than or equal to a preset threshold, the startup application will stop running, and the environment variables of the electronic device will be configured, and startup completion information will be broadcast to the relevant applications in the electronic device to trigger the startup and running of each relevant application.

2. The crash handling method for a bootable application according to claim 1, characterized in that, The real-time monitoring of the number of crashes of the application upon startup includes: Register and run a monitoring component. When the monitoring component is running, it monitors the Java layer crash information and the Native layer crash information of the boot application, and determines the number of crashes of the boot application based on the Java layer crash information and the Native layer crash information.

3. The crash handling method for a bootable application according to claim 2, characterized in that, The process of monitoring the runtime crash information of the Java layer and the native layer of the application at startup includes: Listen for runtime crash information in the Java layer based on a pre-defined exception monitoring function; The registered signal processor listens for runtime crash information in the Native layer.

4. The crash handling method for a bootable application according to claim 2, characterized in that, Determining the number of crashes of the boot application based on the Java layer crash information and the Native layer crash information of the boot application includes: Based on the crash information from the Java layer, read and update the crash count; Based on the crash information of the Native layer, read and update the number of crashes.

5. The crash handling method for a bootable application according to claim 4, characterized in that, The number of crashes is stored in the system properties of the environment variables of the boot application.

6. The crash handling method for a bootable application according to claim 1, characterized in that, The steps of stopping the startup application, configuring the environment variables of the electronic device, and broadcasting startup completion information to relevant applications in the electronic device include: The target service is run. When the target service is running, the boot application is terminated so that the boot application stops running. When the target service is running, the environment variables of the electronic device are configured and boot completion information is broadcast to the relevant applications in the electronic device.

7. The crash handling method for a bootable application according to claim 6, characterized in that, The method further includes: When the target service is running, the number of crashes is modified to the initial value.

8. A crash handling device for a bootable application, characterized in that, include: The monitoring module is used to monitor the number of crashes of the boot application in real time after the boot application of the electronic device starts running; If the number of crashes is greater than or equal to a preset threshold, the processing module is used to stop the running of the boot application, configure the environment variables of the electronic device, and broadcast boot completion information to the relevant applications in the electronic device to trigger the startup and running of each relevant application.

9. An electronic device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when the electronic device is running, are executed by the processor to perform the steps of the crash handling method for a boot application as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the crash handling method for a boot application as described in any one of claims 1 to 7.