CN109324918A - Processing method and processing device, terminal and the storage medium of application exception - Google Patents

Processing method and processing device, terminal and the storage medium of application exception Download PDF

Info

Publication number
CN109324918A
CN109324918A CN201811068782.7A CN201811068782A CN109324918A CN 109324918 A CN109324918 A CN 109324918A CN 201811068782 A CN201811068782 A CN 201811068782A CN 109324918 A CN109324918 A CN 109324918A
Authority
CN
China
Prior art keywords
application program
exception
software version
abnormal
program
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.)
Pending
Application number
CN201811068782.7A
Other languages
Chinese (zh)
Inventor
张明云
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Genius Technology Co Ltd
Original Assignee
Guangdong Genius Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Genius Technology Co Ltd filed Critical Guangdong Genius Technology Co Ltd
Priority to CN201811068782.7A priority Critical patent/CN109324918A/en
Publication of CN109324918A publication Critical patent/CN109324918A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error 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/079Root cause analysis, i.e. error or fault diagnosis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error 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/0793Remedial or corrective actions

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 invention discloses a kind of processing method and processing device of application exception, terminal and storage mediums.This method comprises: obtaining the operation information of the application program when application program occurs abnormal;Processing is localized according to program or associated data of the operation information to the application program.By using above-mentioned technical proposal, the exception that can rapidly occur to application program is handled the embodiment of the present invention, reduces the application exception processing spent time, reduction is abnormal to use influence caused by application program to user.

Description

Processing method and processing device, terminal and the storage medium of application exception
Technical field
The present invention relates to field of computer technology more particularly to a kind of processing method and processing devices of application exception, end End and storage medium.
Background technique
With the development of computer technology and electronic information technology, the quantity of installed application program also exists on terminal device It is stepped up.Application program may be set in the use process of user because of system version, compatibility, hardware configuration, terminal The reasons such as the standby operation technique of current operating conditions and user occur abnormal.Currently used abnormality eliminating method mainly has Three kinds below:
Gray scale publication: before the publication of each official release of application program, fraction of subscribers is installed preferentially on probation, answers With the abnormal acquisition module acquisition user exception on probation occurred in the process in program and the server for being reported to application program, open Hair personnel repair the exception after receiving the exception that abnormal acquisition module reports, and so on, until application program Reach a relatively steady state, and will be relatively stable after software version issued as official release.
Hot repair is multiple: after application program is formally issued, abnormal acquisition module acquisition applications program in application program with The exception that generates in the use process of family and the server for reporting to application program, developer is on receiving abnormal acquisition device After the exception of report, quickly repair and by after reparation application program and preprosthetic application program comparison generate difference packet, will be poor Subpackage uploads to difference and assures in platform, and the hot repair module in application program is after detecting new difference packet, to the difference Subpackage is downloaded, and the difference packet based on downloading repairs application program.
Upgrading: after application program is formally issued, the abnormal acquisition module acquisition applications program in application program is in user The exception that generates in use process and the server for reporting to application program, developer report receiving abnormal acquisition device Exception after, quickly repair simultaneously the software version after reparation is uploaded to application upgrade plate or third-party application store so that Terminal device can the operation based on user the software version newly issued is downloaded and software version based on downloading is corresponding Upgraded with program.
But the exception handling procedure of various abnormality processing modes in the prior art is required to expend longer time, User is seriously affected to the normal use of application program.
Summary of the invention
In view of this, the embodiment of the present invention provides the processing method and processing device, terminal and storage of a kind of application exception Medium, to solve the technical issues of exception handling procedure of application program in the prior art takes a long time.
In a first aspect, the embodiment of the invention provides a kind of processing methods of application exception, comprising:
When application program occurs abnormal, the operation information of the application program is obtained;
Processing is localized according to program or associated data of the operation information to the application program.
Second aspect, the embodiment of the invention provides a kind of processing units of application exception, comprising:
Module is obtained, for obtaining the operation information of the application program when application program occurs abnormal;
Processing module, for being localized according to program or associated data of the operation information to the application program Processing.
The third aspect, the embodiment of the invention provides a kind of terminals, comprising:
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing Device realizes the processing method of application exception as described in the embodiments of the present invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer Program, the program realize the processing method of application exception as described in the embodiments of the present invention when being executed by processor.
In the technical solution of above-mentioned processing application exception, when application program occurs abnormal, application program is obtained Operation information, according to acquired operation information to application program or application program associated data be localized processing. By using above-mentioned technical proposal, the exception that can rapidly occur to application program is handled, is reduced the embodiment of the present invention It the application exception processing spent time, reduces exception and influence caused by application program is used to user.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, of the invention other Feature, objects and advantages will become more apparent upon:
Fig. 1 is a kind of flow diagram of the processing method for application exception that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of the processing method of application exception provided by Embodiment 2 of the present invention;
Fig. 3 is a kind of flow diagram of the processing method for application exception that the embodiment of the present invention three provides;
Fig. 4 is a kind of process signal of the processing method for preferred application exception that the embodiment of the present invention four provides Figure;
Fig. 5 is a kind of structural block diagram of the processing unit for application exception that the embodiment of the present invention five provides;
Fig. 6 is a kind of structural schematic diagram for terminal that the embodiment of the present invention six provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just In description, only some but not all contents related to the present invention are shown in the drawings.
Embodiment one
The embodiment of the present invention one provides a kind of processing method of application exception.This method can be by application exception Processing unit execute, wherein the device can generally be integrated in the terminal by software and or hardware realization, typically, It can integrate in the mobile terminals such as learning machine, smart phone, notebook, tablet computer.Fig. 1 is that the embodiment of the present invention one provides Application exception processing method flow diagram, as shown in Figure 1, this method comprises:
S101, when application program occurs abnormal, obtain the operation information of the application program.
In the present embodiment, all exceptions that can occur to application program are handled, can also be only to application program It is handled in special time period appearance and/or specific exceptions type exception.Correspondingly, the application program in this step goes out Any exception that existing exception can occur for application program;Or application program preset time period occur and/ Or the exception (being referred to extremely with target below) of specific exceptions type, it can such as be opened for what is occurred during application program launching After dynamic exception or start completion, using for occurring in the use process of application program is abnormal, and/or, caused by numerical value for sky Null value it is abnormal, as dividend or denominator be zero caused by except zero is abnormal or there is no caused callings exceptions etc. by file destination Deng.Wherein, abnormal affiliated abnormal type can be divided according to the reason of causing exception to occur.
Illustratively, when the exception is any exception of application program, it can detect that it is different that application program occurs After often, the period occurred extremely or abnormal affiliated abnormal type etc. is not distinguished, directly determine application program and go out Now exception and obtain the operation information of application program;When the exception is target exception, can go out detecting application program When now abnormal, judge whether the exception that application program occurs is target exception, if so, it is different to determine that target occurs in application program Often, and the operation information of application program is obtained, if not, it is determined that application program does not occur target exception.It is to open with the exception Dynamic exception for example, can judge whether the exception is starting exception when detecting that application program occurs abnormal, if so, It is abnormal then to determine that starting occurs in application program, and obtains the operation information of application program;If it is not, then determining that application program does not occur Starting is abnormal.Wherein, starting abnormal decision procedure can according to need selection, can such as be gone out in the application according to abnormal Whether a certain exception of existing location determination is that starting is abnormal.At this time, it is preferred that described to apply journey if the exception occurs The program startup interface of sequence is not yet normally shown, then it is abnormal that the exception can be determined as to starting.
In this step, the operation information of application program can locally be obtained from application program.Wherein, the operation of application program Information can be understood as such as may be used based on any information for the application program that its exception for application program occur is handled Think abnormal affiliated abnormal type, the abnormal position occurred in the current software version of application program, time occurred extremely The current software version information for operating normally number and/or application program of number, application program at abnormal occurrence location, etc. Deng the present embodiment does not limit the operation information of application program.
S102, processing is localized according to program or associated data of the operation information to the application program.
It, can be according to the difference of application program operation information, using different processing modes to using journey in the present embodiment The program or associated data of sequence are handled, such as can be abnormal in application program according to the difference of abnormal affiliated abnormal type The difference of the position occurred in current software version, the difference of abnormal frequency of occurrence, application program are at abnormal occurrence location The difference for operating normally the version information of the difference of number and/or the current software version of application program, locally using different Processing mode, such as remove associated data, change associated data, the current software version mode for changing application program, it is corresponding It is handled with the program of program or associated data.
Simplicity and validity when in view of being handled based on each operation information application program, it is preferred that can be with The version information for operating normally number and/or application program current software version based on application program at abnormal occurrence location The program or associated data of application program are handled.It such as can be when the normal operation number be zero, by application program It is downgraded to that version number is adjacent with the version number of application program current software version and issue date is located at before current software version Time new software version or issue date be located at the other software version before current software version;It is not in Current software number When zero, the user data of application program is removed.And/or current software version be the announced recent software version of application program This when, by application program be downgraded to version number with the version number of application program current software version adjacent and issue date be located at work as Time new software version or issue date before preceding software version are located at the other software version before current software version;Working as It is recent software version or hair by application program updating when preceding software version is not application program announced recent software version The cloth date is located at the other software version after current software version.At this point, correspondingly, the operation information preferably may include The version that operates normally number and/or the application program current software version of the application program at current running position Information, the current running position are the position that the exception occurs in the current software version of application program.
The processing method for the application exception that the embodiment of the present invention one provides is obtained when application program occurs abnormal The operation information of application program carries out local according to associated data of the acquired operation information to application program or application program Change processing.The embodiment of the present invention is by using above-mentioned technical proposal, at the exception that can rapidly occur to application program Reason, the reduction application exception processing spent time, reduction is abnormal to use influence caused by application program to user, mentions The usage experience of high user.
Embodiment two
Fig. 2 is a kind of flow diagram of the processing method of application exception provided by Embodiment 2 of the present invention.This reality Apply example " will carry out on the basis of the above embodiments according to program or associated data of the operation information to the application program Localization process " if be optimized for the normal operation number be zero and the current software version be the application program most New software version then obtains time new software version of the application program, and the current software version is downgraded to described time New software version;If the normal operation number is zero and the current software version is the non-current soft of the application program Part version then obtains the recent software version of the application program, and the current software version is upgraded to described newest soft Part version;If the normal operation number non-zero, deletes the user data of the application program.
Further, the current software version is downgraded to described after described new software version, can also be wrapped It includes: if detecting that the recent software version of the application program changes, the current software version being upgraded into change Recent software version after change.
Further, it is described the exception is handled according to the operation information after, can also include: by institute State the abnormal server for reporting to the application program.
Correspondingly, as shown in Fig. 2, the processing method of application exception provided in this embodiment includes:
S201, when application program occurs abnormal, obtain the operation information of the application program, the operation information includes The version letter that operates normally number and the application program current software version of the application program at current running position Breath, the position that the current running position occurs in the current software version of application program for the exception, execution S202, S203 or S205.
It in the present embodiment, can be simultaneously based on application program at abnormal occurrence location (at i.e. current running position) The version information of number and application program current software version is operated normally, in this prior running position difference and/or the version Information does not take different processing modes to handle the program or associated data of application program simultaneously, so as to complete in processing User can normally use application program afterwards.Wherein, which is to handle from last time identical exception Afterwards or after the installation of the current software version of self-application program, normal operation number of the application program at current running position.It examines The validity for operating normally number is considered, optionally, if it is different that application program first appears this from after current software version installation Often, then after the normal operation number is the current software version installation of self-application program, application program is at current running position Normal operation number;If application program is non-to first appear the exception, then the normal operation from after current software version installation Number is normal operation number of the application program at current running position after handling from last time identical exception.
If S202, the normal operation number is zero and the current software version is the non-current of the application program Software version then obtains the recent software version of the application program, and the current software version is upgraded to described newest Software version executes S206.
If S203, the normal operation number is zero and the current software version is the newest soft of the application program Part version, then obtain time new software version of the application program, and by the current software version be downgraded to described time it is new soft Part version.
In the present embodiment, if operating normally number is zero, after illustrating current software version installation, application program is first It runs to and occurs exception at current running position.There is exception due to running for the first time, can be determined that this is different in such cases It is often particularly likely that as caused by current software version, therefore, the side of the current software version of replacement application program can be passed through Formula avoids the appearance of the exception.Wherein, operate normally number whether be zero can be by records application program in each node Number of run and based on record result determine;Can also by judge whether to be stored in application program application program run to The use data generated at current running position determine.
In general, application issued date later software version can be to issue date software earlier in design The exception occurred in version is repaired, also, application issued date later performance, function of software version etc. is general It also can be better than its issue date software version earlier, therefore, in the present embodiment, in the current software version of replacement application program When, if the current software version of application program is not the announced recent software version of the application program, can preferably incite somebody to action The current software version of application program is changed to the recent software version that application program is currently issued;If application program is current Software version is the announced recent software version of the application program, then preferably can be by the current software version of the application program It is changed to time new software version of application program.
Here, being changed to when it should be noted that, although the present embodiment is using current software version as recent software version secondary It is illustrated for new software version, but in the other embodiments of the application, can be equally most in current software version Current software version is changed to the software version carried when time new stabilization software version or terminal dispatches from the factory when new software version, Such as current software version can be changed to this time newly when time new software version or secondary new stable software version can be got Software version or secondary new stable software version;When secondary new software version and secondary new stable software version can not be got, if Application program is the application program that carries when terminal is dispatched from the factory, then when the current software version of application program being changed to terminal and producing The software version of carrying;Otherwise, then it is replaced with any other version that can be got or application program is not replaced The operation of current software version, the embodiment of the present invention are limited not to this.Wherein, stablize software version and unstable software Version (such as beta release) can be determined by the relevant information of analysis software version;It is the recent software version of application program, secondary New software version and time new software version of stablizing can be obtained from the server of third-party application store or application program;Using The software version that program carries when dispatching from the factory can be obtained from terminal local.
If S204, detecting that the recent software version of the application program changes, by the Current software version Originally the recent software version after upgrading to variation executes S206.
In this step, if detecting that the recent software version of application program changes, can be determined that will apply certainly Program is downgraded to after time new version, and the developer of the application program has issued new software version, therefore, such situation Under, the current software version for reducing obtained application program can be replaced with into the software version that developer newly issues, that is, replaced Recent software version after being changed to variation, in order to which user can the optimum performance of experience application and newest function in time Energy.Wherein, the recent software version of application program whether change can compare degrade before application program version information with And the version information for the recent software version issued in current application program server or third-party platform determines.At this point, it is preferred that , after the current software version to application program degrades, the software version before degradation can be labeled as to abnormal version, and The version information of the exception version is recorded in local or server.
In the present embodiment, terminal can replace the Current software version of application program automatically according to the operation information of application program This (such as carries out upgrade or downgrade operation to the current software version of application program);It can also be replaced and be applied based on the operation of user The current software version of program, it can before replacing current software version, this is shown to user by terminal screen Information is replaced, and replaces the current software version of application program again after user confirms replacement, correspondingly, if user does not grasp Make or user's confirmation is without replacement, does not then execute the operation of replacement application program current software version.
It illustratively, can application journey to be installed in discharging terminal when replacing the current software version of application program The priginal soft version of sequence downloads target software release (such as above-mentioned recent software version or secondary new software version needed replacing This etc.), and the target software release is installed, the current software version of application program is changed to this by the priginal soft version Target software release.
If S205, the normal operation number non-zero, delete the user data of the application program.
In the present embodiment, if operating normally number non-zero, after illustrating Current software installation, application program is run for the first time Or preceding run several times does not occur exception, when access times increase, application program occurs abnormal, it is possible thereby to determine the exception pole It is likely to be as caused by user data, therefore, (can will apply journey by way of deleting part or all of user data Sequence is restored to state when installing) avoid the appearance of the exception.Wherein, user data can be understood as in user's use process The data of generation, such as usage record, the setting information of user, the account name of user and/or the login password of user, can be with Only include the user data for being stored in application program local, can also further include and be stored in the server of application program User data;Application program can voluntarily delete the user data of application program after occurring extremely, can also confirm in user Delete operation is carried out to the user data in application program again after deleting, herein with no restriction.
S206, the server that the exception is reported to the application program.
It, can be different by this after the completion of the program and its associated data localization process to application program in the present embodiment Often (position occurred in software program including exception and abnormal type etc.) reports to the server of application program, to open Hair personnel can in time repair the exception in the software version.
The processing method of application exception provided by Embodiment 2 of the present invention after exception occurs in application program, is being answered When with the normal operation number of program be zero and the current software version of application program is non-current software version, by application program Current software version upgrade to recent software version;The normal operation number of application program be zero and application program it is current When software version is recent software version, the current software version of application program is downgraded to time new software version;When using journey When the normal operation number non-zero of sequence, the user data of application program is deleted.The present embodiment is by using above-mentioned technical proposal, energy Enough ensure that user can rapidly reuse application program, improve the usage experience of user, avoids the loss of user.
Embodiment three
Fig. 3 is a kind of flow diagram of the processing method for application exception that the embodiment of the present invention three provides, this reality Example is applied to optimize on the basis of the above embodiments, further, the operation information for obtaining the application program it Before, further includes: determine that the exception is that unrepairable is abnormal;
Further, if it is that can repair exception that the method, which can also include: the exception, according to the exception institute The abnormal type to be repaired belonged to repairs the exception using the corresponding repair mode of the abnormal type to be repaired.
Correspondingly, as shown in figure 3, the processing method of application exception provided in this embodiment includes:
S301, detect that exception occurs in application program.
S302, judge whether the exception is unrepairable exception, if so, S303 is executed, if it is not, then executing S304.
In order to reduce the program of application program and the localization process of associated data to the performance of application program and user It is influenced caused by use, it, can be only when the exception that application program occurs is unrepairable exception based on application in the present embodiment The operation information of program is localized processing, and the exception occurred in application program to the program or associated data of application program It when for that can repair abnormal, directlys adopt preset repair mode and application program is repaired, carried out without being applied to program Upgrading, the operation for degrading or deleting associated data.
In the present embodiment, application program occur it is abnormal whether be that the judgment mode of unrepairable exception can according to need Setting.Illustratively, can be arranged in application program local or server in advance it is a variety of for repairing applications occur Abnormal repair mode, when application program occurs abnormal, the exception that is successively occurred using each repair mode to application program into Row is repaired, until this is repaired successfully or the unfinished reparation to the exception of each repair mode extremely.At this point, if it is abnormal repair at Function then can be determined that the exception that application program occurs is that can repair exception, and no longer execute S305;If each repair mode is not complete The reparation of the pairs of exception can then determine that the exception that application program occurs is unrepairable exception, execute S303.Alternatively, The abnormal type set of repairing of application program can also be preset, and when application program occurs abnormal, according to using journey There is abnormal affiliated abnormal type (abnormal type i.e. to be repaired) and whether is contained in this can repairing in abnormal type set in sequence To determine whether the exception is that can repair exception.
Time spent by simplicity and decision process in view of various decision procedures, it is preferred that can be according to preparatory Whether it is that can repair exception that is be arranged repairs the exception that abnormal type set determines that application program occurs.At this point, application program Appearance it is abnormal whether be can repair abnormal decision process can be with are as follows: obtain the affiliated abnormal type to be repaired of the exception with And the application program repairs abnormal type set, it is described repair abnormal type set can be voluntarily by the application program Each abnormal type composition repaired;If described, to repair abnormal type set do not include the abnormal type to be repaired, really The fixed exception is that unrepairable is abnormal.Correspondingly, if it is described repair abnormal type set include the exception to be repaired Type, it is determined that the exception is that can repair exception.
S303, the operation information for obtaining the application program.
S304, processing is localized according to program or associated data of the operation information to the application program, held Row S306.
S305, according to the affiliated abnormal type to be repaired of the exception, to be repaired abnormal type is corresponding repairs using described Compound formula repairs the exception.
In the present embodiment, can preset application program can self-healing repair abnormal type set, and for can Corresponding repair mode is arranged in the various recoverable abnormal types repaired in abnormal type set.At this point, correspondingly, in determination The exception that application program occurs is that after can repairing exception, can determine the exception affiliated abnormal type (exception i.e. to be repaired Type), obtain the corresponding repair mode of the pre-set abnormal type to be repaired, and using the repair mode to the exception into Row is repaired.
Wherein, abnormal affiliated abnormal type can be according to leading to abnormal the reason of occurring division, and can be according to the original Because corresponding repair mode is arranged in each recoverable abnormal type.It, then can be by its corresponding reparation such as null value exception Mode, which is set as will lead to the null value occurred extremely, is set as a default value;It is abnormal for removing zero, then it can be corresponding by its Repair mode is set as causing the denominator occurred extremely or dividend that the nonzero value of a default is arranged, or in default value A non-zero values are randomly selected in range, and using the zero of non-zero values replacement denominator or dividend;For file It is exception caused by sky, then can sets its corresponding repair mode to being written in leading to the empty file occurred extremely The numerical value or one section of text defaulted of one default;It, then can be in corresponding positions for file there is no caused calling exception The file, etc. of one default of place's addition is set, the present embodiment is limited not to this.At this point, it is optional, it is described according to institute Abnormal affiliated abnormal type to be repaired is stated, abnormal is carried out using the corresponding repair mode of the abnormal type to be repaired to described If it is that null value is abnormal that reparation, which may include: the exception, it will lead to the null value occurred extremely and be assigned a value of preset write from memory Recognize value;If the exception is to obtain random number in preset range, and will lead to the denominator occurred extremely except zero is abnormal Or dividend is assigned a value of the random number.Wherein, preset range is preferably close to the range in zero, such as can be (0,1] or (0, 0.5] etc.
S306, the server that the exception is reported to the application program.
The processing method for the application exception that the embodiment of the present invention three provides, when extremely for that can repair abnormal, according to The corresponding repair mode of the affiliated exception type of exception is repaired to abnormal, when being extremely unrepairable exception, according to application The operation information of program handles the program or associated data of application program, can be when that can repair extremely directly to exception It is repaired, without changing the program of application program or deleting associated data, reduces program or associated data to application program Number of processing is carried out, the usage experience of user is improved.
Example IV
The embodiment of the present invention four provides a kind of processing method of preferred application exception.The method of the present embodiment can be with It is executed, is suitable for when application program occurs abnormal during startup by the processing unit of application exception, to using journey The case where starting of sequence is handled extremely.Fig. 4 is the processing method for the application exception that the embodiment of the present invention four provides Flow diagram, as shown in figure 4, this method comprises:
S401, start to start application program.
S402, detection application program are with the presence or absence of exception, if so, executing S403;If it is not, then executing S411.
S403, judge whether the exception is that can repair exception, if it is not, then executing S404;If so, executing S410.
S404, judge whether normal operation number of the application program at abnormal occurrence location is zero, if so, executing S405,;If it is not, then executing S407.
S405, prompt user replace the current software version of application program, and detect whether user agrees to replace, if so, S406 is then executed, if it is not, then executing S409.
S406, the current software version for replacing application program return to S401.
Application recovery to state when installing is detected whether user agrees to restore by S407, prompt user, if It is then to execute S408, if it is not, then executing S409.
S408, by application recovery to install when state, return S401.
S409, application program, end operation are exited.
S410, according to the affiliated abnormal type to be repaired of the exception, to be repaired abnormal type is corresponding repairs using described Compound formula repairs the exception, and the exception is reported to the server of application program.
S411, continue startup program, and judge application program whether start completion, if so, end operation;If it is not, then Execute S412.
Whether S412, judgement currently reach the detection cycle of application exception, execute S402 if so, returning, if it is not, It then returns and executes S411.
The technical solution that the embodiment of the present invention four provides, being able to solve existing abnormal improvement plan can not very good solution The abnormal problem of the starting of application program reduces application program under the premise of solving the starting exception of application program appearance The number of processes of program or associated data improves the usage experience of user.
Embodiment five
The embodiment of the present invention five provides a kind of processing unit of application exception.The device can be by software and/or hard Part is realized, can generally be integrated in the terminal, typically, be can integrate in learning machine, smart phone, notebook, tablet computer etc. In mobile terminal.Fig. 5 is the structural block diagram of the processing unit for the application exception that the embodiment of the present invention five provides, such as Fig. 5 institute Show, which includes:
Module 501 is obtained, for obtaining the operation information of the application program when application program occurs abnormal;
Processing module 502, for carrying out this according to program or associated data of the operation information to the application program Groundization processing.
The processing unit for the application exception that the embodiment of the present invention five provides occurs by obtaining module in application program When abnormal, the operation information of application program is obtained, to application program or is answered by processing module according to acquired operation information Processing is localized with the associated data of program.The present embodiment, can be rapidly to application by using above-mentioned technical proposal The exception that program occurs is handled, and the application exception processing spent time is reduced, and reduction is abnormal to answer user's use The influence caused by program.
In the above scheme, the operation information may include normal fortune of the application program at current running position The version information of row number and/or the application program current software version, the current running position are that the exception is being answered With the position occurred in the current software version of program.
In the above scheme, the processing module 502 may include: degraded cell, in response to the normal operation Number be zero and the current software version be the application program recent software version event, obtain the application program Time new software version, and the current software version is downgraded to described new software version;First upgrade unit, for ringing Described in Ying Yu normal operation number be zero and the current software version be the application program non-current software version thing Part obtains the recent software version of the application program, and the current software version is upgraded to the recent software version; Unit is deleted, for deleting the user data of the application program in response to the event for operating normally number non-zero.
In the above scheme, the processing module 502 can also include: the second upgrade unit, for it is described will be described Current software version is downgraded to after described new software version, if detecting the recent software version hair of the application program The current software version is then upgraded to the recent software version after variation by changing.
In the above scheme, the acquisition module 501 may include: determination unit, for obtaining the application described Before the operation information of program, determine that the exception is that unrepairable is abnormal;
Further, described device can also include: repair module, abnormal for that can repair in response to the exception Event, according to the affiliated abnormal type to be repaired of the exception, using the corresponding repair mode pair of the abnormal type to be repaired The exception is repaired.
In the above scheme, the repair module may include: the first reparation unit, for being sky in response to the exception It is worth abnormal event, will lead to the null value occurred extremely and be assigned a value of preset default value;Second repairs unit, for responding Be in the exception obtain random number in preset range except zero abnormal event, and will lead to the denominator occurred extremely or Dividend is assigned a value of the random number.
In the above scheme, the determination unit may include: acquisition subelement, for obtain the exception it is affiliated to The abnormal type set of repairing of abnormal type and the application program is repaired, it is described to repair abnormal type set by described Application program can self-healing each abnormal type composition;Subelement is determined, for repairing abnormal type set not described When comprising the abnormal type to be repaired, determine that the exception is that unrepairable is abnormal.
In the above scheme, the exception can be abnormal for starting, and described device can also include: abnormal determining module, When for occurring in response to the exception, the event that the program startup interface of the application program is not yet normally shown will be described It is abnormal that exception is determined as starting.
Further, described device can also include: reporting module, be used for described according to the operation information to described After exception is handled, the exception is reported to the server of the application program.
The processing unit for the application exception that the embodiment of the present invention five provides can be performed any embodiment of that present invention and provide Application exception processing method, have executing application exception the corresponding functional module of processing method and beneficial to effect Fruit.The not technical detail of detailed description in the present embodiment, reference can be made to application program provided by any embodiment of the invention is different Normal processing method.
Embodiment six
Fig. 6 is a kind of structural schematic diagram for terminal that the embodiment of the present invention six provides, as shown in fig. 6, the terminal includes place Device 60 and memory 61 are managed, can also include input unit 62 and output device 63;The quantity of processor 60 can be in terminal One or more, in Fig. 6 by taking a processor 60 as an example;Processor 60, memory 61, input unit 62 and output in terminal Device 63 can be connected by bus or other modes, in Fig. 6 for being connected by bus.
Memory 61 is used as a kind of computer readable storage medium, can be used for storing software program, journey can be performed in computer Sequence and module, as the corresponding program instruction/module of the processing method of the application exception in the embodiment of the present invention (for example, Acquisition module 501 and processing module 502 in the processing unit of application exception).Processor 60 is stored in by operation Software program, instruction and module in reservoir 61 are realized thereby executing the various function application and data processing of terminal The processing method of above-mentioned application exception.
Memory 61 can mainly include storing program area and storage data area, wherein storing program area can store operation system Application program needed for system, at least one function;Storage data area, which can be stored, uses created data etc. according to terminal.This Outside, memory 61 may include high-speed random access memory, can also include nonvolatile memory, for example, at least a magnetic Disk storage device, flush memory device or other non-volatile solid state memory parts.In some instances, memory 61 can be further Including the memory remotely located relative to processor 60, these remote memories can pass through network connection to terminal.It is above-mentioned The example of network includes but is not limited to internet, intranet, local area network, mobile radio communication and combinations thereof.
Input unit 62 can be used for receiving the number or character information of input, and generate with the user setting of terminal and The related key signals input of function control.Output device 63 may include that display screen etc. shows equipment.
The embodiment of the present invention six also provides a kind of storage medium comprising computer executable instructions, and the computer can be held Row is instructed when being executed by computer processor for executing a kind of processing method of application exception, this method comprises:
When application program occurs abnormal, the operation information of the application program is obtained;
Processing is localized according to program or associated data of the operation information to the application program.
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present invention The method operation that executable instruction is not limited to the described above, can also be performed application program provided by any embodiment of the invention Relevant operation in abnormal processing method.
By the description above with respect to embodiment, it is apparent to those skilled in the art that, the present invention It can be realized by software and required common hardware, naturally it is also possible to which by hardware realization, but in many cases, the former is more Good embodiment.Based on this understanding, technical solution of the present invention substantially in other words contributes to the prior art Part can be embodied in the form of software products, which can store in computer readable storage medium In, floppy disk, read-only memory (Read-Only Memory, ROM), random access memory (Random such as computer Access Memory, RAM), flash memory (FLASH), hard disk or CD etc., including some instructions are with so that a computer is set Standby (can be personal computer, server or the network equipment etc.) executes method described in each embodiment of the present invention.
It is worth noting that, in the embodiment of the processing unit of above-mentioned application exception, included each unit and Module is only divided according to the functional logic, but is not limited to the above division, as long as corresponding functions can be realized ?;In addition, the specific name of each functional unit is also only for convenience of distinguishing each other, the protection being not intended to restrict the invention Range.
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation, It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.

Claims (12)

1. a kind of processing method of application exception characterized by comprising
When application program occurs abnormal, the operation information of the application program is obtained;
Processing is localized according to program or associated data of the operation information to the application program.
2. the method according to claim 1, wherein the operation information includes that the application program is transported currently Line position sets the version information for operating normally number and/or the application program current software version at place, the current operating position It is set to the position that the exception occurs in the current software version of application program.
3. according to the method described in claim 2, it is characterized in that, it is described according to the operation information to the application program Program or associated data are localized processing, comprising:
If the normal operation number is zero and the current software version is the recent software version of the application program, Time new software version of the application program is obtained, and the current software version is downgraded to described new software version;
If the normal operation number is zero and the current software version is the non-current software version of the application program, The recent software version of the application program is then obtained, and the current software version is upgraded into the recent software version;
If the normal operation number non-zero, deletes the user data of the application program.
4. according to the method described in claim 3, it is characterized in that, the current software version is downgraded to described time described After new software version, further includes:
If detecting that the recent software version of the application program changes, the current software version is upgraded into change Recent software version after change.
5. the method according to claim 1, wherein the operation information for obtaining the application program it Before, further includes:
Determine that the exception is that unrepairable is abnormal;
The method also includes:
If the exception is that can repair exception, according to the affiliated abnormal type to be repaired of the exception, using described to be repaired The corresponding repair mode of exception type repairs the exception again.
6. according to the method described in claim 5, it is characterized in that, described according to affiliated abnormal kind to be repaired of the exception Class repairs the exception using the corresponding repair mode of the abnormal type to be repaired, comprising:
If the exception is that null value is abnormal, it will lead to the null value occurred extremely and be assigned a value of preset default value;
If the exception is to obtain random number in preset range, and will lead to the denominator occurred extremely except zero is abnormal Or dividend is assigned a value of the random number.
7. according to the method described in claim 5, it is characterized in that, the determination exception is that unrepairable is abnormal, comprising:
The abnormal type set of repairing of the affiliated abnormal type to be repaired of the exception and the application program is obtained, it is described Can repair abnormal type set by the application program can each abnormal type of self-healing form;
If described, to repair abnormal type set do not include the abnormal type to be repaired, it is determined that the exception is that can not repair It is multiple abnormal.
8. the method according to claim 1, wherein the exception is that starting is abnormal, the method also includes:
If the exception occurs, the program startup interface of the application program is not yet normally shown, then the exception is true It is abnormal to be set to starting.
9. the method according to claim 1, wherein being carried out according to the operation information to the exception described After processing, further includes:
The exception is reported to the server of the application program.
10. a kind of processing unit of application exception characterized by comprising
Module is obtained, for obtaining the operation information of the application program when application program occurs abnormal;
Processing module, for being localized place according to program or associated data of the operation information to the application program Reason.
11. a kind of terminal characterized by comprising
One or more processors;
Memory, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real The now processing method of the application exception as described in any in claim 1-9.
12. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The processing method of the application exception as described in any in claim 1-9 is realized when execution.
CN201811068782.7A 2018-09-13 2018-09-13 Processing method and processing device, terminal and the storage medium of application exception Pending CN109324918A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811068782.7A CN109324918A (en) 2018-09-13 2018-09-13 Processing method and processing device, terminal and the storage medium of application exception

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811068782.7A CN109324918A (en) 2018-09-13 2018-09-13 Processing method and processing device, terminal and the storage medium of application exception

Publications (1)

Publication Number Publication Date
CN109324918A true CN109324918A (en) 2019-02-12

Family

ID=65265755

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811068782.7A Pending CN109324918A (en) 2018-09-13 2018-09-13 Processing method and processing device, terminal and the storage medium of application exception

Country Status (1)

Country Link
CN (1) CN109324918A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110221756A (en) * 2019-06-18 2019-09-10 Oppo广东移动通信有限公司 Method, apparatus, terminal and the storage medium of data are applied in processing
CN110704276A (en) * 2019-09-19 2020-01-17 爱钱进(北京)信息科技有限公司 APP exception handling method and device and storage medium
CN111813427A (en) * 2019-04-12 2020-10-23 杭州海康威视数字技术股份有限公司 Equipment repairing method and device, electronic equipment and storage medium
CN112114991A (en) * 2020-09-18 2020-12-22 北京百度网讯科技有限公司 Applet exception handling method and device, electronic device and storage medium
CN112906913A (en) * 2019-11-18 2021-06-04 英业达科技有限公司 Electronic device and detection method thereof

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324856A (en) * 2008-08-07 2008-12-17 金蝶软件(中国)有限公司 Method and system for upgrading data
CN102855181A (en) * 2011-07-01 2013-01-02 腾讯科技(深圳)有限公司 Software repairing method and system
CN103365732A (en) * 2012-03-29 2013-10-23 宇龙计算机通信科技(深圳)有限公司 Method and system for processing application program exception and mobile terminal
CN103377094A (en) * 2012-04-12 2013-10-30 金蝶软件(中国)有限公司 Abnormity monitoring method and abnormity monitoring device
US9098450B2 (en) * 2012-03-20 2015-08-04 Google Inc. Automated application update checks based on unexpected errors and crashes
CN106293987A (en) * 2016-08-15 2017-01-04 Tcl集团股份有限公司 A kind of method and apparatus repairing starting up of terminal exception
CN106502665A (en) * 2016-10-18 2017-03-15 广州视睿电子科技有限公司 A kind of restorative procedure of application program and device
CN107861738A (en) * 2017-11-06 2018-03-30 广东欧珀移动通信有限公司 Using abnormality eliminating method, device, storage medium and terminal device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101324856A (en) * 2008-08-07 2008-12-17 金蝶软件(中国)有限公司 Method and system for upgrading data
CN102855181A (en) * 2011-07-01 2013-01-02 腾讯科技(深圳)有限公司 Software repairing method and system
US9098450B2 (en) * 2012-03-20 2015-08-04 Google Inc. Automated application update checks based on unexpected errors and crashes
CN103365732A (en) * 2012-03-29 2013-10-23 宇龙计算机通信科技(深圳)有限公司 Method and system for processing application program exception and mobile terminal
CN103377094A (en) * 2012-04-12 2013-10-30 金蝶软件(中国)有限公司 Abnormity monitoring method and abnormity monitoring device
CN106293987A (en) * 2016-08-15 2017-01-04 Tcl集团股份有限公司 A kind of method and apparatus repairing starting up of terminal exception
CN106502665A (en) * 2016-10-18 2017-03-15 广州视睿电子科技有限公司 A kind of restorative procedure of application program and device
CN107861738A (en) * 2017-11-06 2018-03-30 广东欧珀移动通信有限公司 Using abnormality eliminating method, device, storage medium and terminal device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813427A (en) * 2019-04-12 2020-10-23 杭州海康威视数字技术股份有限公司 Equipment repairing method and device, electronic equipment and storage medium
CN110221756A (en) * 2019-06-18 2019-09-10 Oppo广东移动通信有限公司 Method, apparatus, terminal and the storage medium of data are applied in processing
CN110221756B (en) * 2019-06-18 2020-08-28 Oppo广东移动通信有限公司 Method, device, terminal and storage medium for processing application data
CN110704276A (en) * 2019-09-19 2020-01-17 爱钱进(北京)信息科技有限公司 APP exception handling method and device and storage medium
CN112906913A (en) * 2019-11-18 2021-06-04 英业达科技有限公司 Electronic device and detection method thereof
CN112114991A (en) * 2020-09-18 2020-12-22 北京百度网讯科技有限公司 Applet exception handling method and device, electronic device and storage medium
CN112114991B (en) * 2020-09-18 2024-01-16 北京百度网讯科技有限公司 Exception handling method and device for applet, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109324918A (en) Processing method and processing device, terminal and the storage medium of application exception
CN103458086B (en) A kind of smart mobile phone and fault detection method thereof
CN103902399B (en) Software system repair processing method and software system repair processing device
CN104461858A (en) Software Compatibility Pre-testing Method and System
CN105740093A (en) Backup Method, Pre-Testing Method For Environment Updating And System Thereof
CN103428333B (en) Mobile terminal, server and errors repair method
US20090204946A1 (en) Intelligent software code updater
CN101356499A (en) Method for secure in-service software upgrades
CN102681874B (en) A kind ofly guarantee the method that software normally runs and device
CN101334825A (en) Application program management and operation system and method
CN103389898A (en) Method for managing mobile terminal software and mobile terminal
CN107678875A (en) A kind of fault detect and self-repairing method, device, terminal and storage medium
CN104346279A (en) Method and device for software testing
CN112083971B (en) Component processing method, device and storage medium
CN105354102B (en) A kind of method and apparatus of file system maintenance and reparation
CN105868047A (en) Repairing method and device of data partition, and terminal
CN103559098A (en) Smart card test number control method, device and system
CN105573788A (en) Patch processing method and device as well as patch generation method and device
CN105224416B (en) Restorative procedure and related electronic device
CN109992492A (en) Log recording method, device, equipment and the readable storage medium storing program for executing of functional module
CN105718324A (en) Simulation testing method, apparatus and device for abnormal power-down of mobile terminal in upgrade process
CN110968456B (en) Method and device for processing fault disk in distributed storage system
CN110990177A (en) Fault repairing method, device, system, storage medium and electronic equipment
CN111130856A (en) Server configuration method, system, equipment and computer readable storage medium
CN102231684A (en) Interface board state detection method, multi-core central processing unit, interface board and router

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190212