CN106339273A - Application program restoration method, terminal and server - Google Patents

Application program restoration method, terminal and server Download PDF

Info

Publication number
CN106339273A
CN106339273A CN201510412416.9A CN201510412416A CN106339273A CN 106339273 A CN106339273 A CN 106339273A CN 201510412416 A CN201510412416 A CN 201510412416A CN 106339273 A CN106339273 A CN 106339273A
Authority
CN
China
Prior art keywords
instruction
terminal
application program
server
daily record
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
CN201510412416.9A
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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201510412416.9A priority Critical patent/CN106339273A/en
Publication of CN106339273A publication Critical patent/CN106339273A/en
Pending legal-status Critical Current

Links

Abstract

One embodiment of the application relates to the field of communication and especially relates to an application program restoration method, terminal and server for reducing the phenomenon that application programs running in abnormal situations must be reloaded. According to the embodiment of the application, a terminal obtains a log containing the information of abnormal execution of the application program, sends the log to the server and the terminal receives a restoration instruction sent from the server according to the log and executes the instruction. Therefore, the terminal only sends logs containing the information of abnormal execution of the application program without reloading the application program when abnormal execution of the application program occurs and then executes the obtained restoration instructions to restore the abnormal execution so that on-line restoration of application programs is fulfilled.

Description

A kind of application program repairing method, terminal and server
Technical field
The invention relates to the communications field, more particularly, to a kind of application program repairing method, terminal and clothes Business device.
Background technology
With the development of computer and electronic information technology, smart electronicses product becomes more and more popular, for example intelligently Mobile phone.After the developer of application program issues an application program, this application program can be arranged on by user In the terminal of user, such as the smart mobile phone of user, panel computer are first-class.
Even if an application program is made fully in exploitation test again, also always there is the scene that some are omitted, should The scene omitted may result in this application program and runs error in terminal.In prior art, when application journey When abnormal conditions occurring during sort run, can only be carried out extensive by way of reinstalling this application program Multiple.And later stage user can only feed back this application program by the feedback module of forum or program to developer and occur This kind of abnormal conditions.
In sum, a kind of application program repairing method, terminal and server are needed badly, for realizing repairing online Multiple process, reduces the phenomenon that must reset during application program emerged in operation abnormal conditions.
Content of the invention
The embodiment of the present application provides a kind of application program repairing method, terminal and server, online for realizing Repair process, reduces the phenomenon that must reset during application program emerged in operation abnormal conditions.
The embodiment of the present application provides a kind of application program repairing method, comprises the following steps:
Terminal obtains the daily record including the abnormal information of application program execution;
This terminal to server sends this daily record;
This terminal receives this server and is instructed according to the reparation that this daily record sends;
This terminal executes this reparation instruction.
Preferably, this terminal obtains the daily record including the abnormal information of application program execution, comprising:
This terminal captures, by hook function, the anomalous event that application program occurs, according to the exception of capture Event generates this daily record;Or
This terminal captures, by self-defining function, the anomalous event that application program occurs, according to the abnormal thing of capture Part generates this daily record.
Preferably, this terminal to server sends this daily record, comprising:
This terminal sends this daily record to server after obtaining this daily record immediately;Or
This terminal sends this daily record to server after being connected to WLAN;Or
This terminal, when sending request of data to server, this daily record is carried on this request of data and is sent to clothes Business device.
Preferably, this terminal receives this server being instructed according to the reparation that this daily record sends, comprising:
This terminal sends to this server repairs instruction and obtains request, and receives this server and referred to according to this reparation Order obtains the reparation instruction that request returns;Or
This terminal receives this server and is instructed according to the reparation that this daily record pushes, and wherein, this reparation instruction is this Server pushes to this terminal, or this reparation instruction is this server to comprising the multiple of this terminal The terminal push of this application program is installed.
Preferably, before this terminal executes this reparation instruction, also including:
This reparation of this terminal-pair instruction carries out legitimacy verifies;And/or
This terminal, according to the execution condition repairing instruction comprising in this reparation instruction, judges whether that meeting this holds Row condition.
Preferably, this terminal executes this reparation instruction, comprising:
This terminal is immediately performed this reparation instruction after receiving this reparation instruction;Or
This terminal enters row cache after receiving this reparation instruction, and executes caching when starting this application program This reparation instruction;Or
This terminal executes this reparation instruction when system is idle.
Preferably, this terminal to server send this daily record after, receive this server according to this daily record send Reparation instruction before, also include:
This terminal receives the data uploading instructions that described server sends;
This terminal uploads, to this server, all numbers that this application program is used according to this data uploading instructions According to.
Preferably, this reparation instructs the combination for an instruction or a plurality of instruction;
This instruct for indicate following operation one of:
Restart this application program, download and install the more redaction of this application program, increase this application program institute The data that uses, change the data that this application program used, delete the data that this application program used, Remove all data that this application program is used.
Preferably, comprising the identification information of this terminal in this daily record.
The embodiment of the present application provides a kind of application program repairing method, comprises the following steps:
What server receiving terminal sent includes the daily record of the abnormal information of application program execution;
This server sends to this terminal according to this daily record and repairs instruction, and this reparation instructs for repairing this application Program.
Preferably, this server sends to this terminal according to this daily record repairs instruction, comprising:
This server receives the reparation instruction acquisition request that this terminal sends, and please according to this reparation instruction acquisition Ask to return to this terminal and repair instruction;Or
This server pushes to this terminal and repairs instruction;Or
This server pushes reparation to the multiple terminals being provided with this application program comprising this terminal and refers to Order.
Preferably, this server receive this terminal transmission this daily record after, to this terminal send repair instruction Before, also include:
This server sends data uploading instructions to this terminal, this data uploading instructions be used for indicating this terminal to This server uploads the instruction of all data that this application program is used;
This server receives the institute that this terminal is used according to this application program that this data uploading instructions uploads There is data.
Preferably, comprising to repair the execution condition of instruction in this reparation instruction.
Preferably, this reparation instructs the combination for an instruction or a plurality of instruction;
This instruct for indicate following operation one of:
Restart this application program, download and install the more redaction of this application program, increase this application program institute The data that uses, change the data that this application program used, delete the data that this application program used, Remove all data that this application program is used.
Preferably, comprising the identification information of this terminal in this daily record;
This server sends to this terminal according to this daily record and repairs instruction, comprising:
This server according to identification information pair from the identification information of this terminal comprising in this daily record to this terminal This terminal answered pushes repairs instruction.
The application provides a kind of terminal, comprising:
Acquiring unit, for obtaining the daily record including the abnormal information of application program execution;
Transmitting element, for sending this daily record to server;
Receiving unit, instructs according to the reparation that this daily record sends for receiving this server;
Processing unit, for executing this reparation instruction.
Preferably, this acquiring unit, specifically for:
The anomalous event that application program occurs is captured by hook function, according to the anomalous event life of capture Become this daily record;Or
The anomalous event that application program occurs is captured by self-defining function, the anomalous event according to capture generates This daily record.
Preferably, this transmitting element, specifically for:
This daily record is sent to server immediately after obtaining this daily record;Or
Send this daily record to server after being connected to WLAN;Or
When sending request of data to server, this daily record is carried on this request of data and is sent to server.
Preferably, this transmitting element, it is additionally operable to send to this server and repairs instruction acquisition request, and pass through Receiving unit receives this server and obtains, according to this reparation instruction, the reparation instruction that request returns;Or
This receiving unit, is additionally operable to receive the reparation instruction that this server pushes according to this daily record, wherein, should Repairing instruction, to be this server push to this terminal, or this reparation instruction is this server to comprising this end End pushes in interior multiple terminals being provided with this application program.
Preferably, this processing unit, it is additionally operable to:
Legitimacy verifies are carried out to this reparation instruction;And/or
According to the execution condition repairing instruction comprising in this reparation instruction, judge whether to meet this execution bar Part.
Preferably, this processing unit, specifically for:
It is immediately performed this reparation instruction after receiving this reparation instruction;Or
Enter row cache after receiving this reparation instruction, and this of execution caching is repaiied when starting this application program Multiple instruction;Or
Execute this reparation instruction when system is idle.
Preferably, this receiving unit, it is additionally operable to:
Receive the data uploading instructions that described server sends;
This transmitting element, is additionally operable to:
Upload all data that this application program is used according to this data uploading instructions to this server.
Preferably, this reparation instructs the combination for an instruction or a plurality of instruction;
This instruct for indicate following operation one of:
Restart this application program, download and install the more redaction of this application program, increase this application program institute The data that uses, change the data that this application program used, delete the data that this application program used, Remove all data that this application program is used.
Preferably, comprising the identification information of this terminal in this daily record.
The application provides a kind of server, comprising:
Receiving unit, the daily record including the abnormal information of application program execution sending for receiving terminal;
Transmitting element, sends to this terminal according to this daily record for this server and repairs instruction, this reparation instructs For repairing this application program.
Preferably, this receiving unit, the reparation instruction being additionally operable to receive the transmission of this terminal obtains request, and root Obtain request according to this reparation instruction and instruction is repaired to the return of this terminal by transmitting element;Or
This transmitting element, is additionally operable to push to this terminal and repairs instruction;Or
This transmitting element, is additionally operable to push away to the multiple terminals being provided with this application program comprising this terminal Send reparation instruction.
Preferably, this transmitting element, it is additionally operable to:
Send data uploading instructions to this terminal, this data uploading instructions is used for indicating this terminal to this server Upload the instruction of all data that this application program is used;
This receiving unit, is additionally operable to:
Receive all data that this terminal is used according to this application program that this data uploading instructions uploads.
Preferably, comprising to repair the execution condition of instruction in this reparation instruction.
Preferably, this reparation instructs the combination for an instruction or a plurality of instruction;
This instruct for indicate following operation one of:
Restart this application program, download and install the more redaction of this application program, increase this application program institute The data that uses, change the data that this application program used, delete the data that this application program used, Remove all data that this application program is used.
Preferably, comprising the identification information of this terminal in this daily record;
This server sends to this terminal according to this daily record and repairs instruction, comprising:
This server according to identification information pair from the identification information of this terminal comprising in this daily record to this terminal This terminal answered pushes repairs instruction.
In the embodiment of the present application, terminal obtains the daily record including the abnormal information of application program execution, to clothes Business device sends this daily record, and terminal the reception server instructs and executes according to the reparation that this daily record sends.So, Terminal only can be passed through to send to server when application program execution is abnormal it is not necessary to reset this application program Include the daily record of the abnormal information of application program execution, thus the acquired reparation instruction of execution is different to executing Often carry out repairing and can reduce during application program runs it is achieved that the online function of repairing of this application program The phenomenon that must reset when now executing abnormal.Further, due to terminal obtain include application program execution different The daily record of normal information, and send daily record to server, it is achieved thereby that server can collect application journey automatically The function of the abnormal daily record of information of sequence execution, thus developer's further application program can be made.
Brief description
For the technical scheme being illustrated more clearly that in the embodiment of the present application, below will be to institute in embodiment description Need the accompanying drawing using to briefly introduce it should be apparent that, drawings in the following description are only the application Some embodiments, for those of ordinary skill in the art, in the premise not paying creative labor Under, other accompanying drawings can also be obtained according to these accompanying drawings.
A kind of configuration diagram of application program repair system that Fig. 1 is suitable for for the embodiment of the present application;
A kind of application program repairing method schematic flow sheet that Fig. 2 provides for the embodiment of the present application;
Another kind of application program repairing method schematic flow sheet that Fig. 3 provides for the embodiment of the present application;
A kind of structural representation of terminal that Fig. 4 provides for the embodiment of the present application;
A kind of structural representation of server that Fig. 5 provides for the embodiment of the present application.
Specific embodiment
In order that the purpose of the application, technical scheme and beneficial effect become more apparent, below in conjunction with accompanying drawing And embodiment, the application is further elaborated.It should be appreciated that described herein be embodied as Example only in order to explain the application, is not used to limit the application.
The framework that Fig. 1 illustrates a kind of application program repair system that the embodiment of the present application is suitable for is illustrated Figure.As shown in figure 1, including terminal 101 and server 102.Terminal 101 can be led to server 102 Cross communication network to be communicated.Described communication network can be the Internet or cordless communication network, such as the whole world Mobile communication system (global system for mobile communication, abbreviation gsm) network, length Phase evolution (long term evolution, abbreviation lte) network etc., here will not enumerate.
Server 102 is network side server.Preferably, this server can be for applying on cloud os platform Cloud server.Server 102 1 aspect can store the reparation instruction of multiple different application programs, separately On the one hand, after server 102 receives the daily record of terminal transmission, can be according to the data configuration reparation such as daily record Instruction.
Terminal 101 can be one or more, and terminal 101 applies journey by certain being arranged in terminal 101 Sequence is connected with server 102.Terminal 101 can for mobile phone, personal computer (personal computer, referred to as Pc), panel computer, intelligent terminal etc., described intelligent terminal can be intelligent home device etc..
On the one hand, in the embodiment of the present application, terminal obtains the day including the abnormal information of application program execution Will, sends this daily record to server, and terminal the reception server instructs and executes according to the reparation that this daily record sends, It is achieved thereby that the online function of repairing of this application program.
On the other hand, the server in the embodiment of the present application can collect the abnormal information of application program execution automatically Daily record, in being embodied as, the execution that developer is directed to some measurable this application programs arriving is abnormal Information structuring is corresponding to repair instruction, and this reparation instruction is stored in server.But, always have out Originator can not possibly predict the Run-time scenario of this application program, because developer may have access to server, therefore Developer can be directed to the application program execution abnormal formulation solution that failing collected by server predicts, Construction repairs instruction, and is stored in server, and then is sent to terminal by server, to complete end The reparation of this application program on end, thus improve this application program further.
Based on the system architecture shown in the above and Fig. 1, Fig. 2 illustrates the embodiment of the present application and provides A kind of application program repairing method schematic flow sheet.This flow process can be realized in terminal.Referring to Fig. 2, this Shen Please embodiment provide a kind of application program repairing method, comprise the following steps:
Step 201, terminal obtains the daily record including the abnormal information of application program execution;
Step 202, this terminal to server sends this daily record;
Step 203, this terminal receives this server and is instructed according to the reparation that this daily record sends;
Step 204, this terminal executes this reparation instruction.
Terminal only can be passed through to server when application program execution is abnormal it is not necessary to reset this application program Send the daily record including the abnormal information of application program execution, thus the acquired reparation instruction of execution is to holding Row is abnormal to be carried out repairing and can reduce application program and run it is achieved that the online function of repairing of this application program The middle phenomenon occurring must resetting when execution is abnormal.
Application program execution is abnormal generally two ways: application crash and effect of errors are shown.
Then terminal can be made to obtain by the method that the embodiment of the present application is provided for application crash to comprise There is the abnormal daily record of information of application program execution and be uploaded to server, and then referred to by the reparation getting Order is repaired.In step 201, terminal can be obtained by following two modes and include application program and hold The daily record of the abnormal information of row.
First kind of way, executes exception for the measurable application program arriving of developer, and terminal passes through hook Function captures the anomalous event that application program occurs, and generates this daily record according to the anomalous event of capture.Specifically come Say, hook function is a part for windows message processing facility, by arranging " hook ", application Program can filter to all message, event system-level, and access cannot access under normal circumstances Message.During the application is implemented, the capture of anomalous event during application crash can be by registering hook in thread The form of subfunction, when collapse (crash), the program that this hook points to is called.Specific journey Sequence language is:
The second way, the application program failing to predict for developer executes exception, can pass through self-defined Function captures the anomalous event that application program occurs, and generates this daily record according to the anomalous event of capture.
Specifically, there is a uncaughtexceptionhandler interface in the thread (thread) of java, When the anomalous event that program because fail predicts leads to run abort, place is called by this handler Reason program.As long as so here is buried next hook and can be executed abnormal in application program and lead to run abort When obtain notify.Code snippet is as follows:
And be directed to effect of errors and show, what such as application program expection was shown to user is a content, but shows For b content, now user can feed back the problem of this effect of errors displaying, on the other hand, exploitation by forum Person also can find, by the terminal unit of oneself, the problem that this effect of errors is shown, developer is according to acquisition afterwards The problem construction shown of effect of errors corresponding repair instruction, and by server to being provided with this application journey Other terminals of sequence are pushed, to solve the problems, such as the effect plays that this application program occurs.
In above-mentioned steps 202, this terminal can send this daily record to server in several ways, preferably has Several sending methods below.
Mode one, terminal sends this daily record to server after obtaining this daily record immediately.So, terminal can be made As early as possible situation abnormal for application program execution is reported server, thus faster obtain repairing instruction, so that Repair this application program as early as possible.
Mode two, this terminal sends this daily record to server after being connected to WLAN.So, then may be used Save flow for user, especially in the case that the data that need send is more, the effect saving flow is brighter Aobvious.
Mode three, this terminal, when sending request of data to server, this daily record is carried on this request of data It is sent to server.For example, terminal daily record can be carried on HTML (Hypertext Markup Language) (hypertext Transfer protocol, abbreviation http) in request of data, when sending http request of data, Ji Jiang Will has been also sent to server, so, then can reduce the transmission of signaling, reduces the complexity of signaling.
Mode four, this daily record of terminal-pair is compressed, and sends the daily record after compression to server.So, may be used Reduce the data volume of transmission between terminal and server, reduce flow consumption.
Mode five, this daily record of terminal-pair is encrypted, and sends the daily record after encryption to server.So, then The safety of data transfer can be improved.
Mode six, this daily record of terminal-pair is compressed, encrypts, and sends to server after compressing and encrypting Daily record.So, then can improve the safety of data transfer, and reduce the number of transmission between terminal and server According to amount, reduce flow consumption.
In the embodiment of the present application, server can be according to the day of the abnormal information of the application program execution of terminal to report Will construction repairs instruction, in some cases, only also cannot analyze the reason go wrong by these daily records, Cannot construct reparation instruction, now then after terminal to server sends this daily record, receive this server root According to before the reparation instruction that this daily record sends, terminal receives the data uploading instructions that described server sends, eventually End uploads, to this server, all data that this application program is used according to this data uploading instructions.So, The daily record of the information of application program execution exception that can be uploaded by terminal, and terminal is to the upload of this server All data configuration reparation instructions that this application program is used.
The data base that application program data storage is used includes database and sharedpreference, now Terminal is required to pack and upload this application program institute in data base's database database sharedpreference The all data using, preferably can just upload data, such as in terminal even when terminal connects WLAN Connect and just upload data during Wireless Fidelity (wireless fidelity, wi-fi), to save communication for user Flow.Specific instruction is as follows:
“cmd”:”package_data”,
" condition ": " network_type=wifi "
It is preferable that terminal can receive this server according to this by following several ways in above-mentioned steps 203 The reparation instruction that daily record sends.
First method, terminal to this server send repair instruction obtain request, and receive this server according to This reparation instruction obtains the reparation instruction that request returns.Specifically, terminal can when this application program is restarted, Or when terminal is connected to WLAN, terminal active sends to server repairs instruction acquisition request, In order to terminal active obtaining reparation instruction, the reparation instruction that server receives the transmission of this terminal obtains request, Server obtains request according to this reparation instruction and returns reparation instruction to this terminal.Preferably, repair instruction to obtain Take request can be http request.So, but terminal oneself select obtain repair instruction opportunity, have more Initiative, and also reduce data traffic consumption.
Second method, this terminal receives this server and is instructed according to the reparation that this daily record pushes, and this reparation instructs It is that this server pushes to the multiple terminals being provided with this application program comprising this terminal.Specifically come Say, when this application program there occurs the abnormal situation of execution in a terminal, then this application program may be Similar situation be there is also on other terminals, fails to send in time daily record because of certain reason, therefore when Server receives the day of the information of execution exception of this application program that some or certain several terminals send During will, server can push reparation to the multiple terminals being provided with this application program comprising this terminal and refer to Order, this application program perfect further.Server pushes the mode repairing instruction existing to all terminals Terminal in have a lot of services can support, such as aurora push, the system Push Service in cloud os system The notice service of cloud application program message (cloud application message notify service, referred to as cmns).
Third Way, this terminal receives this server and is instructed according to the reparation that this daily record pushes, and wherein, this is repaiied Multiple instruction is that this server pushes to this terminal.On the one hand, that is, server active refers to terminal push reparation Order, retransmits request to obtain reparation instruction without terminal.On the other hand, terminal is transported because of specific Row environment causes the abnormal situation of this application program execution in this terminal, comprises to answer when server receives this After daily record with the abnormal information of program performing, server can be targetedly to the terminal that execution exception occurs Send and repair instruction, to avoid for this reparation instruction issuing the terminal that other is provided with this application program by mistake.Excellent Selection of land, when terminal to server has reported the identification information of this terminal, such as terminal to server reporting terminal Device number, mobile device international identity code (international mobile equipment identity, referred to as Imei), account, general unique identifier in cloud os system (universally unique identifier, Abbreviation uuid) etc. can this terminal of unique mark identification information when, server can be according to the mark of this terminal Information sends to terminal corresponding to the identification information of this terminal and repairs instruction.Server pushes to this terminal and repairs The mode of instruction has a lot of services can support in existing terminal, and such as aurora push, cloud os system In system Push Service cmns.
It is preferable that the identification information of terminal to server reporting terminal in above-mentioned Third Way, specifically can have Following several ways:
First, comprise the identification information of this terminal in daily record, specifically, in the daily record sending, carry end The daily record of the identification information of carried terminal is sent to server by the identification information at end afterwards;
Second, send a piece of news to server, this message includes identification information and the daily record of terminal;
3rd, after daily record is sent to server by terminal, then send to server separately through other message The identification information of terminal;
4th, the source address that the carrier message being used during terminal to server transmission daily record includes can be made Identification information for this terminal.
Have sent the identification information of terminal by above-mentioned several ways to server, on the one hand this server then may be used Identification information according to this terminal comprising in this daily record pushes away to this terminal corresponding to the identification information of this terminal Send reparation instruction, so, server then can be accurately positioned the abnormal terminal of application program execution, so that clothes Business device is directed to this terminal server and pushes reparation instruction.On the other hand, server also can be taken repairing in instruction The identification information of tape terminal, so that when terminal receives reparation instruction, in carrying in this reparation instruction The identification information of terminal carries out legitimacy verifies, when determine repair the identification information of terminal carrying in instruction with During the identification information match of itself, just execute this reparation instruction, thus improve safety.
Skilled person will appreciate that, program is generally equivalent to algorithm addend evidence, during the use of user, Uniquely change is exactly the data in program, and therefore, when the data in program goes wrong, causing should During with program performing exception, the method that can be provided by the embodiment of the present application is real by way of being instructed by reparation Line reparation now, need not reinstall this application program.Therefore, the reparation instruction in the embodiment of the present application has A part is the reparation carrying out for the data that this application program is used.In program in the embodiment of the present application Data can store to two data bases, data base's database database sharedpreference.
Reparation instruction in the embodiment of the present application can be by multiple representations, that is, repairing instruction has polyglot, Only need the terminal in the embodiment of the present application can support to parse.As traditional json, xml, text, foot This etc. is the language that terminal can parse, and repairs instruction and also can be made by oneself using some in the embodiment of the present application The language of justice.For convenience of description, in the embodiment of the present application, with json language, following exemplary contents represent that reparation refers to Order, those skilled in the art can apply other any language to repair instruction to state.
The reparation instruction that in the embodiment of the present application, server sends to terminal can be an instruction or a plurality of instruction Combination.Issue multiple instruction, terminal can execute the set of this instruction in once executing, citing comes simultaneously Say, instruction combine show as array form can for [{ " cmd ": " update " ... }, { " cmd ": " add " ...].
In the above one instruct for indicate following operation one of:
Restart this application program, download and install the more redaction of this application program, increase this application program institute The data that uses, change the data that this application program used, delete the data that this application program used, Remove all data that this application program is used.The example code of concrete reparation instruction is as follows:
The first, restart this application program.
" cmd ": " restart ",
“condition”:”xx
Second, downloads and installs the more redaction of this application program, and this repairs instruction for this application current When the version of program cannot be repaired by other methods really, backstage can be first passed through and download this application program more Redaction, makes terminal install the more redaction of this application program afterwards and by repairing instruction.
“cmd”:”reinstall”,
" condition ": " network_type=wifi ",
“url”:”http://xx.aliapp.com/123.apk”,
Uniform resource locator (uniform resoure locator, abbreviation url) table in above-mentioned instruction Show the position of the installation kit (androidpackage, abbreviation apk) of the more redaction of this application program. In some cases, the execution of this instruction needs the support of system performance.
The third, increase the data in the data base database that this application program is used, change this application Data in the data base database that program is used, delete the data base that this application program is used Data in database.
" device ": " imei=xx ",
“sign”:”xxxxxxxx”,
“cmd”:“update”,
“dest”:”db”,
“condition”:”version>xxx”,
" select ": " data_id=xxx or ... and ... ",
" set ": " attr_x=val_x ... "
In above-mentioned reparation instruction, order (command, abbreviation cmd) represents instruction, can be modification (update), delete (delete), increase (add);Dest represents target subject, and at this moment db represents In data base database;Condition (condition) represents that will execute this repairs the condition that instruction needs to meet, Can fill in and also can not fill out.Select (select) to represent can retrieve in this, as the sub- name of where from data base The data item going out;Setting (set) represents the new value of setting.If delete clause does not then need set Sentence only need to be deleted according to select.If add then needs all key-value pairs in set clause (key-value, abbreviation kv) enumerates out.Device (device) represents target device, can be by eventually The identification information at end is specified or is represented all (all) of all terminals being provided with this application program. Signature (sign) indicates the signature algorithm that this repairs other all fields in instruction, can be used for making terminal be used for The server sending this reparation instruction to this carries out legitimacy verifies.
4th kind, increase the data in the data base sharedpreference that this application program is used, repair Change the data in the data base sharedpreference that this application program is used, delete this application program institute Data in the data base sharedpreference using.
" device ": " imei=xx ",
“sign”:”xxxxxxxx”,
“cmd”:”update”,
“dest”:”sharedpreference”,
“condition”:”…”,
“name”:”xxx”,
“value”:”xxx”
In the code of above-mentioned reparation instruction, name represents the field name in sharedpreference, value table Show new value to be arranged.If deleting the data base that (delete) this application program is used Data in sharedpreference, then do not need to provide value.
5th kind, remove all data in the data base database that this application program is used.
" device ": " imei=xx ",
" sign ": " xxxxxxxx ",
“cmd”:”clear”,
“dest”:”db”,
“condition”:”xx”
6th kind, remove all data in the data base sharedpreference that this application program is used.
“cmd”:”clear”,
“dest”:”sharedpreference”,
“condition”:”xx”
7th kind, dynamic script instructs.
General terminal has the environment supporting dynamic script execution, can set by way of dynamic script instructs Fixed more flexible reparation instructs.But to having access to the data in native environment in script environment, May need in some cases to increase some data-interfaces in native, to call for script.Below with As a example execution javascript:
" cmd ": " js ",
" code ": " if (get_sharedpref (name1)==1) then set_sharedpref (name2)==2);”
“condition”:”js_supported”
In above-mentioned dynamic script instruction, coding (code) is javascript code snippet.Get_sharedpref (), Set_sharedpref () is the interface of the read-write sharedpreference data providing in native.
In being embodied as, the instruction execution framework of terminal is in order to parse and to execute this reparation instruction.If number According to the reparation instruction of storehouse type, then call the corresponding sql sentence of execution.If script sentence (such as js), Webview etc. such as then can be called to execute js.Some execution repairing instruction need to rely on system and support, such as Download and install the more redaction of this application program, remove all data that this application program is used etc., this When, this needs to call the system interfaces such as packagemanager, now requires this application program in terminal There is this and call authority.
Preferably implementation is one kind, and before terminal executes this reparation instruction, this reparation of this terminal-pair instructs Carry out legitimacy verifies, instruction is repaired in the execution when this reparation instruction is by legitimacy verifies;Or terminal root According to the execution condition repairing instruction comprising in this reparation instruction, judge whether to meet this execution condition, repairing Multiple instruction meets execution during execution condition and repairs instruction;Or this reparation of this terminal-pair instruction carries out legitimacy school Test, and this terminal, according to the execution condition repairing instruction comprising in this reparation instruction, judges whether to meet This execution condition, that is, when this reparation instruction is by legitimacy verifies, and this reparation instruction meets execution condition When Shi Zhihang repairs instruction, instruction is repaired in just execution.
Meet it is preferable that repairing instruction and specifically referring to this reparation instruction by legitimacy verifies in the above Any one of herein below or appoint several.
First, repair instruction and carry server identification, and this reparation instructs entrained server identification and sends out Send the mark of this server repairing instruction consistent.Specifically, carry sign field in repairing instruction, This sign calculates value according to the ciphering signature algorithm of agreement in server, and terminal receives this reparation instruction Afterwards, calculate the value of sign with same ciphering signature algorithm, instruction is if both unanimously, think this reparation Sent by legal server;
Second, the form repairing instruction is the form that this application program is supported.Give an example, if repair referred to Order is json, then be legal json form first, repairs the form that instruction must be that terminal is supported;If Repairing instruction is update instruction, then repairing in instruction to have select, the field such as set.
3rd, repair instruction carried terminal mark, and the terminal iidentification that this reparation instruction carries is this terminal Terminal iidentification.Specifically, repairing in instruction has device field, instruction terminal, and this field may be configured as Uuid identifies, then the uuid of the identification information of present terminal is consistent with repairing the uuid carrying in instruction, Then think the legal terminal that this terminal is this reparation instruction.Repair the corresponding terminal of device field in instruction Identification information is in order to ensure to be issued to the terminal of other this daily record of non-sent, i.e. non-targeted terminal when reparation instruction When, non-targeted terminal, through legitimacy verifies, finds this reparation to instruct not and is destined to itself, therefore, What this reparation instructed issues the normal operation having no effect on this non-targeted terminal.
Specifically refer to repair the condition instructing completely it is preferable that repairing instruction and meeting execution condition in the above Any one of sufficient herein below or appoint several:
First, the version of the system that terminal is installed is equal to or higher than and executes required this of this reparation instruction and be The version of system.For example it is desirable to the version of system is more than 19, specific code fragment is version > 19.
Second, terminal connects WLAN.For example it is desirable to terminal is connected under wi-fi, specifically Code snippet is network_type=wifi.
3rd, terminal power is more than default charge value.
4th, the geographical position of terminal is in preset position area.
5th, the current time of terminal system is in preset time range.
It is preferred that in step 204, this terminal can execute this reparation by following several ways and instruct:
The first executive mode, terminal is immediately performed this reparation instruction after receiving this reparation instruction, so that Repair this application program as early as possible.
Second executive mode, terminal enters row cache after receiving this reparation instruction, and is starting this application This reparation instruction of execution caching during program, to make terminal obtain more initiatives, and save resources.
The third executive mode, terminal executes this reparation instruction when system is idle.Specifically, system is empty Execute this reparation instruction during not busy state, then can mitigate system loading amount.
Preferably, after terminal executes this reparation instruction, during implementing result is uploaded onto the server by terminal, with Make some row operations of this terminal of server record, further server can be sentenced by the implementing result of this upload What whether this terminal of breaking had repaired this application program executes exception.Another kind of implementation is that terminal is in execution After this reparation instruction, send for indicating whether this application program repairs the instruction of abnormality to server Information, in order to notification server itself whether recovered to normal operating conditions.If terminal is not also recovered, Then server need to be for further processing for this situation, send other reparation further and instruct in order to repair This application program in this terminal multiple.
It can be seen from the above: in the embodiment of the present application, it is different that terminal acquisition includes application program execution The daily record of normal information, sends daily record to server, and the reception server instructs simultaneously according to the reparation that daily record sends Execution.So, terminal only can be passed through when application program execution is abnormal it is not necessary to reset this application program Send the daily record including the abnormal information of application program execution to server, thus the acquired reparation of execution Instruction is abnormal to execution to carry out repairing and can reduce application it is achieved that the online function of repairing of this application program The phenomenon that the execution of program emerged in operation must reset when abnormal.Further, answer because terminal obtains to include With the daily record of the abnormal information of program performing, and send daily record to server, it is achieved thereby that server can from The dynamic function of collecting the abnormal daily record of information of application program execution, thus developer can be made to improve further should Use program.
Based on same idea, Fig. 3 illustrates a kind of application program reparation side of the embodiment of the present application offer Method schematic flow sheet.This flow process can be realized in server.The one kind providing referring to Fig. 3, the embodiment of the present application Application program repairing method, comprises the following steps:
Step 301, what server receiving terminal sent includes the daily record of the abnormal information of application program execution;
Step 302, this server sends to this terminal according to this daily record and repairs instruction, and this reparation instructs and is used for Repair this application program.
It is not necessary to reset this application program during the application program execution exception installed in terminal, only pass through to clothes Business device sends the daily record including the abnormal information of application program execution, thus the acquired reparation instruction of execution Abnormal to execution carry out repairing and can reduce application program it is achieved that the online function of repairing of this application program The phenomenon that emerged in operation execution must reset when abnormal.
It is preferred that server is sent to this terminal by following several ways according to this daily record repairs instruction:
First method, the reparation instruction that this server receives the transmission of this terminal obtains request, and according to this reparation Instruction obtains request and returns reparation instruction to this terminal.Specifically, terminal can when this application program is restarted, Or when terminal is connected to WLAN, terminal active sends to server repairs instruction acquisition request, In order to terminal active obtaining reparation instruction, the reparation instruction that server receives the transmission of this terminal obtains request, Server obtains request according to this reparation instruction and returns reparation instruction to this terminal.Preferably, repair instruction to obtain Take request can be http request.So, but terminal oneself select obtain repair instruction opportunity, have more Initiative, and also reduce data traffic consumption.
Second method, this server pushes away to the multiple terminals being provided with this application program comprising this terminal Send reparation instruction.Specifically, when this application program there occurs the abnormal situation of execution in a terminal, Then this application program may there is also similar situation in other terminals, fail because of certain reason and When send daily record, therefore when server receives holding of this application program that some or certain several terminals send During the daily record of information of row exception, server can be provided with this application program to comprising the multiple of this terminal Terminal push and repair instruction, this application program perfect further.Server pushes to all terminals and repairs The mode of instruction has a lot of services can support in existing terminal, and such as aurora push, cloud os system In system Push Service cmns.
Third Way, this server pushes to this terminal and repairs instruction.On the one hand, that is, server active to end End pushes repairs instruction, retransmits request to obtain reparation instruction without terminal.On the other hand, terminal may Because specific running environment causes the abnormal situation of this application program execution in this terminal, when server connects Receive after this comprises the abnormal daily record of information of application program execution, server can be targetedly to holding The abnormal terminal of row sends repairs instruction, is provided with this application journey to avoid for this reparation instruction issuing other by mistake The terminal of sequence.Preferably, when terminal to server has reported the identification information of this terminal, such as terminal is to clothes Uuid in business device reporting terminal device number, imei, account, cloud os system etc. can this end of unique mark During the identification information at end, server can be corresponding to the identification information of this terminal according to the identification information of this terminal Terminal sends repairs instruction.The mode that server pushes reparation instruction to this terminal has very in existing terminal Many services can be supported, such as system Push Service cmns in aurora push, cloud os system.
It is preferable that the identification information of terminal to server reporting terminal in above-mentioned Third Way, specifically can have Following several ways:
First, comprise the identification information of this terminal in daily record, specifically, in the daily record sending, carry end The daily record of the identification information of carried terminal is sent to server by the identification information at end afterwards;
Second, send a piece of news to server, this message includes identification information and the daily record of terminal;
3rd, after daily record is sent to server by terminal, then send to server separately through other message The identification information of terminal;
4th, the source address that the carrier message being used during terminal to server transmission daily record includes can be made Identification information for this terminal.
Have sent the identification information of terminal to server by above-mentioned several ways, on the one hand this server according to The identification information of this terminal comprising in this daily record pushes to this terminal corresponding to the identification information of this terminal and repaiies Multiple instruction, so, server then can be accurately positioned the abnormal terminal of application program execution, so that server Push for this terminal server and repair instruction.On the other hand, server also can carry end by repairing in instruction The identification information at end, so that when terminal receives reparation instruction, to the terminal in carrying in this reparation instruction Identification information carry out legitimacy verifies, when determine repair the identification information of terminal carrying in instruction and itself Identification information match when, just execute this reparation instruction, thus improve safety.
It is preferred that this server receive this terminal transmission this daily record after, to this terminal send repair instruction Before, also include:
This server sends data uploading instructions to this terminal, this data uploading instructions be used for indicating this terminal to This server uploads the instruction of all data that this application program is used;
This server receives the institute that this terminal is used according to this application program that this data uploading instructions uploads There is data.
In the embodiment of the present application, server can be according to the day of the abnormal information of the application program execution of terminal to report Will construction repairs instruction, in some cases, only also cannot analyze the reason go wrong by these daily records, Cannot construct reparation instruction, now then after terminal to server sends this daily record, receive this server root According to before the reparation instruction that this daily record sends, terminal receives the data uploading instructions that described server sends, eventually End uploads, to this server, all data that this application program is used according to this data uploading instructions.So, The daily record of the information of application program execution exception that can be uploaded by terminal, and terminal is to the upload of this server All data configuration reparation instructions that this application program is used.
It is preferred that comprising to repair the execution condition of instruction in this reparation instruction.Preferably, terminal executes this and repaiies Before multiple instruction, this reparation of this terminal-pair instruction carries out legitimacy verifies, passes through legitimacy in this reparation instruction During verification, instruction is repaired in execution;Or terminal is according to the execution bar repairing instruction comprising in this reparation instruction Part, judges whether to meet this execution condition, repairs instruction repairing execution when instruction meets execution condition;Or Person's this reparation of this terminal-pair instruction carries out legitimacy verifies, and this terminal is according to comprising in this reparation instruction Repair the execution condition of instruction, judge whether to meet this execution condition, pass through legitimacy in this reparation instruction During verification, and when this reparation instruction meets execution reparation instruction during execution condition, instruction is repaired in just execution.
In the above, repair instruction and pass through legitimacy verifies, and repair the tool that instruction meets execution condition Hold referring to foregoing teachings in vivo, will not be described here.
It is preferred that this reparation instructs the combination for an instruction or a plurality of instruction;
This instruct for indicate following operation one of:
Restart this application program, download and install the more redaction of this application program, increase this application program institute The data that uses, change the data that this application program used, delete the data that this application program used, Remove all data that this application program is used.
, referring to foregoing teachings, here is omitted for specific instruction content.
It can be seen from the above: in the embodiment of the present application, it is different that terminal acquisition includes application program execution The daily record of normal information, sends daily record to server, and the reception server instructs simultaneously according to the reparation that daily record sends Execution.So, terminal only can be passed through when application program execution is abnormal it is not necessary to reset this application program Send the daily record including the abnormal information of application program execution to server, thus the acquired reparation of execution Instruction is abnormal to execution to carry out repairing and can reduce application it is achieved that the online function of repairing of this application program The phenomenon that the execution of program emerged in operation must reset when abnormal.Further, answer because terminal obtains to include With the daily record of the abnormal information of program performing, and send daily record to server, it is achieved thereby that server can from The dynamic function of collecting the abnormal daily record of information of application program execution, thus developer can be made to improve further should Use program.
Based on same idea, Fig. 4 illustrates a kind of structural representation of terminal of the embodiment of the present application offer Figure.This terminal can be used for executing said method flow process.Referring to Fig. 4, it is a kind of whole that the embodiment of the present application provides End 400, terminal 400 includes acquiring unit 401, transmitting element 402, receiving unit 403, processing unit 404:
Acquiring unit 401, for obtaining the daily record including the abnormal information of application program execution;
Transmitting element 402, for sending this daily record to server;
Receiving unit 403, instructs according to the reparation that this daily record sends for receiving this server;
Processing unit 404, for executing this reparation instruction.
It is preferred that this acquiring unit 401, specifically for:
The anomalous event that application program occurs is captured by hook function, according to the anomalous event life of capture Become this daily record;Or
The anomalous event that application program occurs is captured by self-defining function, the anomalous event according to capture generates This daily record.
It is preferred that this transmitting element 402, specifically for:
This daily record is sent to server immediately after obtaining this daily record;Or
Send this daily record to server after being connected to WLAN;Or
When sending request of data to server, this daily record is carried on this request of data and is sent to server.
It is preferred that transmitting element 402, it is additionally operable to send to this server and repairs instruction acquisition request, and lead to Cross receiving unit 403 and receive the reparation instruction that this server obtains request return according to this reparation instruction;Or
Receiving unit 403, is additionally operable to receive the reparation instruction that this server pushes according to this daily record, wherein, This reparation instruction is this server to be pushed to this terminal, or this reparation instruction is this server to comprising this Terminal pushes in interior multiple terminals being provided with this application program.
It is preferred that this processing unit 404, it is additionally operable to:
Legitimacy verifies are carried out to this reparation instruction;And/or
According to the execution condition repairing instruction comprising in this reparation instruction, judge whether to meet this execution bar Part.
It is preferred that this processing unit 404, specifically for:
It is immediately performed this reparation instruction after receiving this reparation instruction;Or
Enter row cache after receiving this reparation instruction, and this of execution caching is repaiied when starting this application program Multiple instruction;Or
Execute this reparation instruction when system is idle.
It is preferred that this receiving unit 403, it is additionally operable to:
Receive the data uploading instructions that described server sends;
This transmitting element 402, is additionally operable to:
Upload all data that this application program is used according to this data uploading instructions to this server.
It is preferred that this reparation instructs the combination for an instruction or a plurality of instruction;
This instruct for indicate following operation one of:
Restart this application program, download and install the more redaction of this application program, increase this application program institute The data that uses, change the data that this application program used, delete the data that this application program used, Remove all data that this application program is used.
It is preferred that comprising the identification information of this terminal in this daily record.
It can be seen from the above: in the embodiment of the present application, it is different that terminal acquisition includes application program execution The daily record of normal information, sends daily record to server, and the reception server instructs simultaneously according to the reparation that daily record sends Execution.So, terminal only can be passed through when application program execution is abnormal it is not necessary to reset this application program Send the daily record including the abnormal information of application program execution to server, thus the acquired reparation of execution Instruction is abnormal to execution to carry out repairing and can reduce application it is achieved that the online function of repairing of this application program The phenomenon that the execution of program emerged in operation must reset when abnormal.Further, answer because terminal obtains to include With the daily record of the abnormal information of program performing, and send daily record to server, it is achieved thereby that server can from The dynamic function of collecting the abnormal daily record of information of application program execution, thus developer can be made to improve further should Use program.
Based on same idea, the structure that Fig. 5 illustrates a kind of server of the embodiment of the present application offer is shown It is intended to.This server can be used for executing said method flow process.Referring to Fig. 5, the embodiment of the present application provide one Kind of server 500, server 500 includes receiving unit 501, transmitting element 502:
Receiving unit 501, the day including the abnormal information of application program execution sending for receiving terminal Will;
Transmitting element 502, sends to this terminal according to this daily record for this server and repairs instruction, this reparation Instruct for repairing this application program.
It is preferred that receiving unit 501, it is additionally operable to receive the reparation instruction acquisition request of this terminal transmission, and Request is obtained according to this reparation instruction instruction is repaired to the return of this terminal by transmitting element 502;Or
Transmitting element 502, is additionally operable to push to this terminal and repairs instruction;Or
Transmitting element 502, is additionally operable to the multiple terminals being provided with this application program comprising this terminal Push and repair instruction.
It is preferred that this transmitting element 502, it is additionally operable to:
Send data uploading instructions to this terminal, this data uploading instructions is used for indicating this terminal to this server Upload the instruction of all data that this application program is used;
This receiving unit 501, is additionally operable to:
Receive all data that this terminal is used according to this application program that this data uploading instructions uploads.
It is preferred that comprising to repair the execution condition of instruction in this reparation instruction.
It is preferred that this reparation instructs the combination for an instruction or a plurality of instruction;
This instruct for indicate following operation one of:
Restart this application program, download and install the more redaction of this application program, increase this application program institute The data that uses, change the data that this application program used, delete the data that this application program used, Remove all data that this application program is used.
It is preferred that comprising the identification information of this terminal in this daily record;
This server sends to this terminal according to this daily record and repairs instruction, comprising:
This server according to identification information pair from the identification information of this terminal comprising in this daily record to this terminal This terminal answered pushes repairs instruction.
It can be seen from the above: in the embodiment of the present application, it is different that terminal acquisition includes application program execution The daily record of normal information, sends daily record to server, and the reception server instructs simultaneously according to the reparation that daily record sends Execution.So, terminal only can be passed through when application program execution is abnormal it is not necessary to reset this application program Send the daily record including the abnormal information of application program execution to server, thus the acquired reparation of execution Instruction is abnormal to execution to carry out repairing and can reduce application it is achieved that the online function of repairing of this application program The phenomenon that the execution of program emerged in operation must reset when abnormal.Further, answer because terminal obtains to include With the daily record of the abnormal information of program performing, and send daily record to server, it is achieved thereby that server can from The dynamic function of collecting the abnormal daily record of information of application program execution, thus developer can be made to improve further should Use program.
Those skilled in the art are it should be appreciated that embodiments herein can be provided as method or computer journey Sequence product.Therefore, the application using complete hardware embodiment, complete software embodiment or can combine software Form with the embodiment of hardware aspect.And, the application can adopt and wherein include meter one or more Calculation machine usable program code computer-usable storage medium (including but not limited to disk memory, Cd-rom, optical memory etc.) the upper computer program implemented form.
The application is to produce with reference to according to the method for the embodiment of the present application, equipment (system) and computer program The flow chart of product and/or block diagram are describing.It should be understood that can by computer program instructions flowchart and / or block diagram in each flow process and/or the flow process in square frame and flow chart and/or block diagram and/ Or the combination of square frame.These computer program instructions can be provided to general purpose computer, special-purpose computer, embed The processor of formula datatron or other programmable data processing device is to produce a machine so that passing through to calculate The instruction of the computing device of machine or other programmable data processing device produces for realizing in flow chart one The device of the function of specifying in individual flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions may be alternatively stored in and computer or other programmable datas can be guided to process and set So that being stored in this computer-readable memory in the standby computer-readable memory working in a specific way Instruction produce and include the manufacture of command device, the realization of this command device is in one flow process or multiple of flow chart The function of specifying in flow process and/or one square frame of block diagram or multiple square frame.
These computer program instructions also can be loaded in computer or other programmable data processing device, makes Obtain and series of operation steps is executed on computer or other programmable devices to produce computer implemented place Reason, thus the instruction of execution is provided for realizing in flow chart one on computer or other programmable devices The step of the function of specifying in flow process or multiple flow process and/or one square frame of block diagram or multiple square frame.
Although having been described for the preferred embodiment of the application, those skilled in the art once know base This creative concept, then can make other change and modification to these embodiments.So, appended right will Ask and be intended to be construed to including preferred embodiment and fall into being had altered and changing of the application scope.
Obviously, those skilled in the art can carry out various changes and modification without deviating from this Shen to the application Spirit and scope please.So, if the application these modification and modification belong to the application claim and Within the scope of its equivalent technologies, then the application is also intended to comprise these changes and modification.

Claims (30)

1. a kind of application program repairing method is it is characterised in that comprise the following steps:
Terminal obtains the daily record including the abnormal information of application program execution;
Described terminal to server sends described daily record;
Described terminal receives described server and is instructed according to the reparation that described daily record sends;
Described terminal execution is described to repair instruction.
2. the method for claim 1 includes application journey it is characterised in that described terminal obtains The daily record of the abnormal information of sequence execution, comprising:
Described terminal captures, by hook function, the anomalous event that application program occurs, different according to capture Ordinary affair part generates described daily record;Or
Described terminal captures, by self-defining function, the anomalous event that application program occurs, according to the exception of capture Event generates described daily record.
3. the method for claim 1 is it is characterised in that the transmission of described terminal to server is described Daily record, comprising:
Described terminal sends described daily record to server after obtaining described daily record immediately;Or
Described terminal sends described daily record to server after being connected to WLAN;Or
Described terminal, when sending request of data to server, described daily record is carried on described request of data and sends out Give server.
4. the method for claim 1 is it is characterised in that described terminal receives described server root The reparation instruction sending according to described daily record, comprising:
Described terminal sends to described server repairs instruction acquisition request, and receives described server according to institute State and repair the reparation instruction that instruction obtains request return;Or
Described terminal receives described server and is instructed according to the reparation that described daily record pushes, wherein, described reparation Instruction is that described server pushes to described terminal, or described reparation instruction is described server to comprising Described terminal pushes in interior multiple terminals being provided with described application program.
5. the method for claim 1 repairs instruction it is characterised in that the execution of described terminal is described Before, also include:
Repair instruction described in described terminal-pair and carry out legitimacy verifies;And/or
Described terminal, according to the described execution condition repairing instruction repaired and comprise in instruction, judges whether to meet Described execution condition.
6. the method for claim 1 repairs instruction it is characterised in that the execution of described terminal is described, Including:
Described terminal is immediately performed described reparation after receiving described reparation instruction and instructs;Or
Described terminal enters row cache after receiving described reparation instruction, and holds when starting described application program The described reparation instruction of row cache;Or
Described terminal executes described reparation and instructs when system is idle.
7. the method for claim 1 is it is characterised in that the transmission of described terminal to server is described After daily record, receive before the reparation that described server sends according to described daily record instructs, also include:
Described terminal receives the data uploading instructions that described server sends;
Described terminal uploads described application program according to described data uploading instructions to described server and is used All data.
8. the method as any one of claim 1 to 7 is it is characterised in that described reparation instructs Combination for an instruction or a plurality of instruction;
Described one instruct for indicate following operation one of:
Restart described application program, download and install the more redaction of described application program, increase described application Data that program is used, change the data that described application program used, delete described application program and made All data that data, the described application program of removing are used.
9. the method as any one of claim 1 to 7 is it is characterised in that wrap in described daily record Identification information containing described terminal.
10. a kind of application program repairing method is it is characterised in that comprise the following steps:
What server receiving terminal sent includes the daily record of the abnormal information of application program execution;
Described server sends to described terminal according to described daily record and repairs instruction, and described reparation instruction is used for repairing Multiple described application program.
11. methods as claimed in claim 10 are it is characterised in that described server is according to described daily record Send to described terminal and repair instruction, comprising:
Described server receives the reparation instruction acquisition request that described terminal sends, and repairs instruction according to described Obtain request and return reparation instruction to described terminal;Or
Described server pushes to described terminal and repairs instruction;Or
Described server pushes to the multiple terminals being provided with described application program comprising described terminal Repair instruction.
12. methods as claimed in claim 10 are it is characterised in that described server receives described terminal Send after the described daily record sending, to described terminal before repairing instruction, also include:
Described server sends data uploading instructions to described terminal, and described data uploading instructions are used for indicating institute State the instruction that terminal uploads all data that described application program is used to described server;
Described server receives the described application program institute that described terminal uploads according to described data uploading instructions The all data using.
13. methods as claimed in claim 10 are it is characterised in that comprise to repair in described reparation instruction The execution condition of instruction.
14. methods as any one of claim 10 to 13 are it is characterised in that described reparation refers to Make the combination for an instruction or a plurality of instruction;
Described one instruct for indicate following operation one of:
Restart described application program, download and install the more redaction of described application program, increase described application Data that program is used, change the data that described application program used, delete described application program and made All data that data, the described application program of removing are used.
Method any one of 15. such as claim 10 to 13 is it is characterised in that in described daily record Comprise the identification information of described terminal;
Described server sends to described terminal according to described daily record and repairs instruction, comprising:
Described server according to mark from the identification information of the described terminal comprising in described daily record to described terminal The corresponding described terminal of knowledge information pushes repairs instruction.
A kind of 16. terminals are it is characterised in that include:
Acquiring unit, for obtaining the daily record including the abnormal information of application program execution;
Transmitting element, for sending described daily record to server;
Receiving unit, instructs according to the reparation that described daily record sends for receiving described server;
Processing unit, instructs for executing described reparation.
17. terminals as claimed in claim 16 it is characterised in that described acquiring unit, specifically for:
The anomalous event that application program occurs is captured by hook function, according to the anomalous event life of capture Become described daily record;Or
The anomalous event that application program occurs is captured by self-defining function, the anomalous event according to capture generates Described daily record.
18. terminals as claimed in claim 16 it is characterised in that described transmitting element, specifically for:
Described daily record is sent to server immediately after obtaining described daily record;Or
Send described daily record to server after being connected to WLAN;Or
When sending request of data to server, described daily record is carried on described request of data and is sent to service Device.
19. terminals as claimed in claim 16 it is characterised in that
Described transmitting element, is additionally operable to send to described server and repairs instruction acquisition request, and by receiving Unit receives described server and repairs, according to described, the reparation instruction that instruction acquisition request returns;Or
Described receiving unit, is additionally operable to receive the reparation instruction that described server pushes according to described daily record, its In, described reparation instruction is that described server pushes to described terminal, or described reparation instruction is described Server pushes to the multiple terminals being provided with described application program comprising described terminal.
20. terminals as claimed in claim 16, it is characterised in that described processing unit, are additionally operable to:
Legitimacy verifies are carried out to described reparation instruction;And/or
According to the described execution condition repairing instruction repaired and comprise in instruction, judge whether to meet described execution Condition.
21. terminals as claimed in claim 16 it is characterised in that described processing unit, specifically for:
It is immediately performed described reparation after receiving described reparation instruction to instruct;Or
Row cache is entered after receiving described reparation instruction, and the execution caching when starting described application program Described reparation instructs;Or
Execute described reparation to instruct when system is idle.
22. terminals as claimed in claim 16, it is characterised in that described receiving unit, are additionally operable to:
Receive the data uploading instructions that described server sends;
Described transmitting element, is additionally operable to:
Upload all numbers that described application program is used according to described data uploading instructions to described server According to.
23. terminals as any one of claim 16 to 22 are it is characterised in that described reparation refers to Make the combination for an instruction or a plurality of instruction;
Described one instruct for indicate following operation one of:
Restart described application program, download and install the more redaction of described application program, increase described application Data that program is used, change the data that described application program used, delete described application program and made All data that data, the described application program of removing are used.
Terminal any one of 24. such as claim 16 to 22 is it is characterised in that in described daily record Comprise the identification information of described terminal.
A kind of 25. servers are it is characterised in that include:
Receiving unit, the daily record including the abnormal information of application program execution sending for receiving terminal;
Transmitting element, sends to described terminal according to described daily record for described server and repairs instruction, described Repair instruction to be used for repairing described application program.
26. servers as claimed in claim 25 it is characterised in that
Described receiving unit, is additionally operable to receive the reparation instruction acquisition request that described terminal sends, and according to institute State reparation instruction acquisition to ask to return to repair to described terminal by transmitting element to instruct;Or
Described transmitting element, is additionally operable to push to described terminal and repairs instruction;Or
Described transmitting element, is additionally operable to multiple be provided with described application program to comprise described terminal Terminal pushes repairs instruction.
27. servers as claimed in claim 25, it is characterised in that described transmitting element, are additionally operable to:
Send data uploading instructions to described terminal, described data uploading instructions are used for indicating described terminal to institute State the instruction that server uploads all data that described application program is used;
Described receiving unit, is additionally operable to:
Receive described terminal according to owning that the described application program that described data uploading instructions upload is used Data.
28. servers as claimed in claim 25 are it is characterised in that comprise to repair in described reparation instruction The execution condition of multiple instruction.
29. servers as any one of claim 25 to 28 are it is characterised in that described reparation Instruct the combination for an instruction or a plurality of instruction;
Described one instruct for indicate following operation one of:
Restart described application program, download and install the more redaction of described application program, increase described application Data that program is used, change the data that described application program used, delete described application program and made All data that data, the described application program of removing are used.
30. servers as any one of claim 25 to 28 are it is characterised in that described daily record In comprise the identification information of described terminal;
Described server sends to described terminal according to described daily record and repairs instruction, comprising:
Described server according to mark from the identification information of the described terminal comprising in described daily record to described terminal The corresponding described terminal of knowledge information pushes repairs instruction.
CN201510412416.9A 2015-07-14 2015-07-14 Application program restoration method, terminal and server Pending CN106339273A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510412416.9A CN106339273A (en) 2015-07-14 2015-07-14 Application program restoration method, terminal and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510412416.9A CN106339273A (en) 2015-07-14 2015-07-14 Application program restoration method, terminal and server

Publications (1)

Publication Number Publication Date
CN106339273A true CN106339273A (en) 2017-01-18

Family

ID=57827238

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510412416.9A Pending CN106339273A (en) 2015-07-14 2015-07-14 Application program restoration method, terminal and server

Country Status (1)

Country Link
CN (1) CN106339273A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951280A (en) * 2017-02-28 2017-07-14 努比亚技术有限公司 Mobile terminal and apply restorative procedure
CN107329781A (en) * 2017-06-21 2017-11-07 努比亚技术有限公司 The hot restorative procedure of software, terminal, system and computer-readable recording medium
CN107578394A (en) * 2017-10-11 2018-01-12 上海联影医疗科技有限公司 A kind of restorative procedure and device of image reconstruction failure
CN107783857A (en) * 2017-10-31 2018-03-09 珠海市魅族科技有限公司 A kind of abnormal restorative procedure and device, computer installation, readable storage medium storing program for executing
CN111190755A (en) * 2019-08-01 2020-05-22 腾讯科技(深圳)有限公司 Application program function exception handling method and device
CN111786814A (en) * 2020-06-05 2020-10-16 腾讯科技(深圳)有限公司 Log processing method and device
CN112286949A (en) * 2020-11-20 2021-01-29 深圳市和讯华谷信息技术有限公司 Application list updating method and device, computer equipment and storage medium
CN112328422A (en) * 2020-11-06 2021-02-05 深圳市锐尔觅移动通信有限公司 Abnormity repairing method and device, electronic equipment and storage medium
CN112865994A (en) * 2019-11-27 2021-05-28 Oppo广东移动通信有限公司 Remote auxiliary repair method and related device
CN113835912A (en) * 2020-06-24 2021-12-24 北京新氧科技有限公司 Application crash information processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103995715A (en) * 2014-05-06 2014-08-20 百度在线网络技术(北京)有限公司 Application program repairing method and device and server
CN104050058A (en) * 2014-06-27 2014-09-17 珠海市君天电子科技有限公司 Method and system for restoring data and related devices
CN104216811A (en) * 2013-05-30 2014-12-17 腾讯科技(深圳)有限公司 Log collecting method and system of application program
CN104378781A (en) * 2013-08-16 2015-02-25 中兴通讯股份有限公司 Method for detecting faults of mobile terminals and mobile terminals
CN104503892A (en) * 2014-12-19 2015-04-08 宇龙计算机通信科技(深圳)有限公司 Terminal exception processing method and device and terminal

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216811A (en) * 2013-05-30 2014-12-17 腾讯科技(深圳)有限公司 Log collecting method and system of application program
CN104378781A (en) * 2013-08-16 2015-02-25 中兴通讯股份有限公司 Method for detecting faults of mobile terminals and mobile terminals
CN103995715A (en) * 2014-05-06 2014-08-20 百度在线网络技术(北京)有限公司 Application program repairing method and device and server
CN104050058A (en) * 2014-06-27 2014-09-17 珠海市君天电子科技有限公司 Method and system for restoring data and related devices
CN104503892A (en) * 2014-12-19 2015-04-08 宇龙计算机通信科技(深圳)有限公司 Terminal exception processing method and device and terminal

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951280A (en) * 2017-02-28 2017-07-14 努比亚技术有限公司 Mobile terminal and apply restorative procedure
CN107329781A (en) * 2017-06-21 2017-11-07 努比亚技术有限公司 The hot restorative procedure of software, terminal, system and computer-readable recording medium
CN107578394A (en) * 2017-10-11 2018-01-12 上海联影医疗科技有限公司 A kind of restorative procedure and device of image reconstruction failure
CN107783857A (en) * 2017-10-31 2018-03-09 珠海市魅族科技有限公司 A kind of abnormal restorative procedure and device, computer installation, readable storage medium storing program for executing
CN111190755A (en) * 2019-08-01 2020-05-22 腾讯科技(深圳)有限公司 Application program function exception handling method and device
CN111190755B (en) * 2019-08-01 2022-03-08 腾讯科技(深圳)有限公司 Application program function exception handling method and device
CN112865994A (en) * 2019-11-27 2021-05-28 Oppo广东移动通信有限公司 Remote auxiliary repair method and related device
CN111786814A (en) * 2020-06-05 2020-10-16 腾讯科技(深圳)有限公司 Log processing method and device
CN113835912A (en) * 2020-06-24 2021-12-24 北京新氧科技有限公司 Application crash information processing method and device
CN113835912B (en) * 2020-06-24 2024-02-09 北京新氧科技有限公司 Crash information processing method and device for application program
CN112328422A (en) * 2020-11-06 2021-02-05 深圳市锐尔觅移动通信有限公司 Abnormity repairing method and device, electronic equipment and storage medium
CN112286949A (en) * 2020-11-20 2021-01-29 深圳市和讯华谷信息技术有限公司 Application list updating method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106339273A (en) Application program restoration method, terminal and server
CN110442524B (en) Method and device for testing web service interface with authentication authorization
CN106681924B (en) A kind of method for testing software and system
CN102708050B (en) Method and system for testing mobile application
CN112261118B (en) Multimedia data anomaly detection method, terminal and server
US9612812B2 (en) Method and system for distributed application stack test certification
CN104468843A (en) File uploading method and device
CN107800565B (en) Inspection method, inspection device, inspection system, computer equipment and storage medium
CN107896244B (en) Version file distribution method, client and server
CN107357571B (en) Maintenance method and system for equipment component program
US10019255B1 (en) Incremental software deployment in a service environment
CN112988485B (en) Simulation test method and device for electric power Internet of things equipment
US10250483B2 (en) System and method thereof for dynamically testing networked target systems through simulation by a mobile device
CN105302732A (en) Automatic mobile terminal testing method and device
CN113110864B (en) Application program updating method and device and storage medium
CN109391673A (en) A kind of method, system and the terminal device of management update file
US11636016B2 (en) Cloud simulation and validation system
CN105786636B (en) A kind of system repair and device
CN104424317B (en) A kind of method and system that application is provided to user terminal
US9935867B2 (en) Diagnostic service for devices that employ a device agent
CN115705190A (en) Method and device for determining dependence degree
CN110535919B (en) Network access method and device of concentrator and power peak regulation system
US10447807B1 (en) Dynamic middleware source selection for optimizing data retrieval from network nodes
CN112445507A (en) Equipment upgrading method and device
CN111930625B (en) Log acquisition method, device and system based on cloud service platform

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into 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: 20170118