Detailed description of the invention
In order to make object of the present invention, technical scheme and advantage clearer, below in conjunction with accompanying drawing and realityExecute example, the present invention is further elaborated. Only should be appreciated that specific embodiment described hereinOnly, in order to explain the present invention, be not intended to limit the present invention.
The embodiment of the present invention, by the time of device power-up, is undertaken standby by the data message relevant to desktop starterPart; Initialization exception processor, and by the abnormal information of described exception handler detection desktop starter;In the time the abnormal information of desktop starter being detected by described exception handler, remove under assigned catalogue withThe data message that desktop starter is relevant, and backed up data message is copied under described assigned catalogue,Restart desktop starter. Thereby having realized smart machine automatically repairs desktop starter and can not normally startProblem, ensured the correctness that desktop starter starts, and can repair in the lump those be not detected butWhat still can cause that desktop starter can not normally start is abnormal, and reparation speed is fast. The embodiment of the present invention also providesCorresponding device, below be described in detail respectively. Desktop starter is can acute pyogenic infection of finger tip each in the present inventionThe desktop starter of the system of kind, for example, be Android system or windows system or other system,Be below that example describes with the desktop starter launcher of Android equipment, wherein in noun designate withThe desktop starter that launcher acute pyogenic infection of finger tip is above-mentioned, with the above-mentioned exception of launcher exception handler acute pyogenic infection of finger tipReason device.
Fig. 1 shows the realization flow of the method for the abnormal reparation that the embodiment of the present invention provides.
In embodiments of the present invention, the method for described abnormal reparation is applied to smart machine. Described smart machineFor Android equipment, include but not limited to smart mobile phone, panel computer, intelligent TV set, intelligent watch,Learning machine etc.
Consult Fig. 1, the method for described abnormal reparation comprises:
In step S101, in the time of device power-up, the data message relevant to launcher backed up.
In step S102, initialize launcher exception handler, and abnormal by described launcherProcessor detects the abnormal information of launcher.
In embodiments of the present invention, the described data message relevant to launcher comprise but be not limited toLauncher starts, normally moves required .xml file, theme package informatin, font format information, APPInterface information etc.
Smart machine, in the time of start, backs up the data message relevant to launcher. Wherein, backupMode comprise: in the time of device power-up, the data message relevant to launcher is saved to local storageIn to back up; Or, in the time of device power-up and interconnection network, by the data letter relevant to launcherBreath is sent to server to back up.
After backup completes, initialize launcher exception handler. The embodiment of the present invention has pre-defined oneIndividual CrashHandler class, realizes launcher exception handler (Handler), then realizes described placeAbnormality processing interface in reason device Handler. By the abnormality processing in described launcher exception handlerInterface is caught the abnormal information of launcher in real time. When collapsing by launcher, described abnormal information fed backError message, when launcher can not normally start feedback error message. Wherein preferred, this is abnormalProcessing Interface is not catch abnormal interface (UncaughtException), needs to arrange when initializationThe thread of CrashHandler class is defaulted as the processor of UncatchException.
In step S103, when detecting that by described launcher exception handler launcher's is abnormalWhen information, remove the data message relevant to launcher under assigned catalogue, and by backed up data messageCopy under described assigned catalogue, restart launcher.
In embodiments of the present invention, described assigned catalogue is used for loading while storing the current launcher of confession startupThe data message relevant to launcher, comprise data message that this launcher uses while startup withAnd the data message of user's setting. In the time there is collapse in launcher, by described launcher exceptionReason device can detect the abnormal information of launcher, now, then by described launcher abnormality processingDevice is removed the data message relevant to launcher under assigned catalogue, and obtain backup in advance withThe data message that launcher is relevant, copies to backed up data message under described assigned catalogue, to coverCover original data message relevant to launcher, then restart launcher, to makeThe data message that launcher reloads under described assigned catalogue starts. Because the embodiment of the present invention isThe backed up data message relevant to launcher is completely covered under assigned catalogue, can repairs in the lumpThose are not detected but still the abnormal conditions that can cause launcher normally not start.
Alternatively, in the abnormal information that launcher detected by described launcher exception handler,Described method can also comprise:
The abnormal information of described launcher is sent to server, for developer determine produce abnormal formerCause.
Here, the abnormal information when launcher is collapsed uploads onto the server, and makes the developer canTo determine abnormal problem place according to described abnormal information in advance, avoid processing after sale for a long time, effectivelySaved user's time cost.
In embodiments of the present invention, the data letter relevant to launcher that acquiescence backs up in the time of device power-upBreath is for allowing the normal data message starting of launcher. Smart machine is abnormal by described launcherProcessor detects the abnormal information of launcher, when collapse occurs launcher, removes and specifies orderThe lower data message relevant to launcher of record, and the data message that recovers to back up is to described assigned catalogueUnder, restart launcher; Thereby having realized smart machine automatically repairs launcher and can not normally openMoving problem, has ensured the correctness that launcher starts, and can repair in the lump those be not detected butWhat still can cause that launcher can not normally start is abnormal, and reparation speed is fast.
As another preferred exemplary of the present invention, Fig. 2 shows abnormal that another embodiment of the present invention providesThe realization flow of the method for repairing.
Consult Fig. 2, the method for described abnormal reparation comprises that step S201 is to step S203, wherein, and stepS201 to S203 is identical with the step S101 to S103 described in Fig. 1 embodiment respectively, specifically refers toThe narration of above-mentioned Fig. 1 embodiment repeats no more herein.
Further, in embodiments of the present invention, backed up data message is being copied to described appointment orderRecord descend and restart launcher after, described method also comprises:
In step S204, if launcher cannot start, equipment is reverted to Default Value, lay equal stress onNew starting device is to restart launcher.
Here, recover backup data message after, if launcher still can not normally start, normally because ofFor the data message relevant to launcher that user arranges in the process of use smart machine made mistakes, thisTime, equipment is reverted to Default Value, delete with the data message relevant to launcher that user is arranged.Reply after Default Value, under described assigned catalogue, store be equipment arrange while dispatching from the factory relevant to launcherData message. Then restart launcher, so that launcher is reloaded under described assigned catalogueData message start, thereby further ensured the correctness that launcher starts, and reparation speedHurry up.
As another preferred exemplary of the present invention, Fig. 3 shows abnormal that another embodiment of the present invention providesThe realization flow of the method for repairing.
Consult Fig. 3, the method for described abnormal reparation comprises that step S301 is to step S304, wherein, and stepS301 to S304 is identical with the step S201 to S204 described in Fig. 2 embodiment respectively, specifically refers toThe narration of above-mentioned Fig. 2 embodiment repeats no more herein.
Further, in embodiments of the present invention, equipment is being reverted to Default Value, and restarting and establishStandby to restart after launcher, described method also comprises:
In step S305, if launcher still cannot start, from server, obtain system upgrade bag,According to described system upgrade bag, the system of equipment is upgraded, and after system upgrade completes, restart and beSystem is to restart launcher.
After equipment to restore delivery arranges, if launcher still can not normally start, be judged as system here,The reason of aspect. Obtain system upgrade bag from server, according to described system upgrade bag to system andLauncher upgrades; And after upgrading startup system, thereby just reached launcher and systemThe normal object starting, has further ensured the correctness that launcher starts.
Fig. 4 shows the composition structure of the device of the abnormal reparation that the embodiment of the present invention provides, for the ease of sayingBright, only show the part relevant to the embodiment of the present invention.
In embodiments of the present invention, described device is used for realizing described in the arbitrary embodiment of above-mentioned Fig. 1 to Fig. 3The method of abnormal reparation, can be software unit, hardware cell or the software and hardware that is built in smart machineIn conjunction with unit. Described smart machine is Android equipment, includes but not limited to smart mobile phone, dull and stereotyped electricityBrain, intelligent TV set, intelligent watch, learning machine etc.
Consult Fig. 4, the device of described abnormal reparation comprises:
Backup module 41, for when the device power-up, is undertaken standby by the data message relevant to launcherPart.
Detection module 42, for initializing launcher exception handler, and different by described launcherNormal processor detects the abnormal information of launcher.
First repairs module 43, launcher detected for working as by described launcher exception handlerAbnormal information time, remove the data message relevant to launcher under assigned catalogue, and by backed up numberIt is believed that breath copies under described assigned catalogue, restarts launcher.
Further, described backup module 41 specifically for:
In the time of device power-up, the data message relevant to launcher is saved in local storage to carry outBackup; Or
In the time of device power-up and interconnection network, the data message relevant to launcher is sent to serverTo back up.
Further, described device also comprises:
Second repairs module 44, if cannot start for launcher, equipment is reverted to Default Value,And restart facility is to restart launcher.
Further, described device also comprises:
The 3rd repairs module 45, if still cannot start for launcher, from server, obtains systemAKU, upgrades to the system of equipment according to described system upgrade bag, and heavy after system upgrade completesNew startup system is to restart launcher.
Further, described device also comprises:
Sending module 46, for the abnormal information of described launcher is sent to server, for exploitationPerson determines the reason that generation is abnormal.
Further, described backup module 41 specifically for:
In the time of device power-up, the data message relevant to launcher is saved in local storage to carry outBackup; Or
In the time of device power-up and interconnection network, the data message relevant to launcher is sent to serverTo back up.
It should be noted that, the device in the embodiment of the present invention can be for realizing in said method embodimentAll technical schemes, the function of its each functional module can be concrete according to the method in said method embodimentRealize, its specific implementation process can, with reference to the associated description in above-mentioned example, repeat no more herein.
The embodiment of the present invention, by the time of device power-up, is undertaken standby by the data message relevant to launcherPart; Initialize launcher exception handler, and detect by described launcher exception handlerThe abnormal information of launcher; When detecting that by described launcher exception handler launcher's is differentWhen normal information, remove data message relevant to launcher under assigned catalogue, and by backed up dataInformation reproduction, under described assigned catalogue, restarts launcher. Thereby having realized smart machine repaiies automaticallyThe problem that multiple launcher can not normally start, has ensured the correctness that launcher starts, and can oneAnd repair those be not detected but still can cause that launcher can not normally start abnormal, reparation speedHurry up.
Those of ordinary skill in the art can recognize, in conjunction with respectively showing of embodiment description disclosed hereinUnit and the algorithm steps of example, can come with the combination of electronic hardware or computer software and electronic hardwareRealize. These functions are carried out with hardware or software mode actually, depend on the application-specific of technical schemeAnd design constraint. Professional and technical personnel can realize with distinct methods each specifically should being used forDescribed function, but this realization should not thought and exceeds scope of the present invention.
Those skilled in the art can be well understood to, for convenience and simplicity of description, and foregoing descriptionDevice and the specific works process of unit, can be with reference to the corresponding process in preceding method embodiment, at thisRepeat no more.
In the several embodiment that provide in the application, should be understood that the method for disclosed abnormal reparationAnd device, can realize by another way. For example, device embodiment described above only showsMeaning property, for example, the division of described module, unit, is only that a kind of logic function is divided, actual realizationTime can have other dividing mode, for example multiple unit or assembly can in conjunction with or can be integrated into anotherIndividual system, or some features can ignore, or do not carry out. Another point, each other shown or discussedCoupling or direct-coupling or communication connection can be by some interfaces, device or the INDIRECT COUPLING of unit orCommunication connection, can be electrically, machinery or other form.
The described unit as separating component explanation can or can not be also physically to separate, asThe parts that unit shows can be or can not be also physical locations, can be positioned at a place, orAlso can be distributed on multiple NEs. Can select according to the actual needs wherein some or all ofThe object of the present embodiment scheme is realized in unit.
In addition, the each functional unit in each embodiment of the present invention, module can be integrated in one and process listIn unit, can be also that the independent physics of unit, module exists, also can two or more unit,Module integration is in a unit.
If described function realizes also as independently production marketing or use using the form of SFU software functional unitTime, can be stored in a computer read/write memory medium. Based on such understanding, skill of the present inventionThe part that art scheme contributes to prior art in essence in other words or the part of this technical scheme can be withThe form of software product embodies, and this computer software product is stored in a storage medium, if compriseDry instruction in order to make a computer equipment (can be personal computer, server, or the network equipmentDeng) carry out all or part of step of method described in the present invention each embodiment. And aforesaid storage medium bagDraw together: USB flash disk, portable hard drive, read-only storage (ROM, Read-OnlyMemory), random access memoryDevice (RAM, RandomAccessMemory), magnetic disc or CD etc. are various can be program code storedMedium.
The above be only the specific embodiment of the present invention, but protection scope of the present invention is not limited toThis, any be familiar with those skilled in the art the present invention disclose technical scope in, can expect easilyChange or replace, within all should being encompassed in protection scope of the present invention. Therefore, protection scope of the present invention shouldThe described protection domain with claim is as the criterion.