CN111008044A - Application program recovery method and system and electronic equipment - Google Patents

Application program recovery method and system and electronic equipment Download PDF

Info

Publication number
CN111008044A
CN111008044A CN201911200702.3A CN201911200702A CN111008044A CN 111008044 A CN111008044 A CN 111008044A CN 201911200702 A CN201911200702 A CN 201911200702A CN 111008044 A CN111008044 A CN 111008044A
Authority
CN
China
Prior art keywords
application program
page
app
state information
page stack
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
CN201911200702.3A
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.)
Advanced Nova Technology Singapore Holdings Ltd
Original Assignee
Alipay Labs Singapore Pte 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 Alipay Labs Singapore Pte Ltd filed Critical Alipay Labs Singapore Pte Ltd
Priority to CN201911200702.3A priority Critical patent/CN111008044A/en
Publication of CN111008044A publication Critical patent/CN111008044A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Retry When Errors Occur (AREA)
  • Stored Programmes (AREA)

Abstract

One or more embodiments of the present specification disclose a method of restoring an application program, including: after receiving a crash signal of an application program, temporarily keeping the application program alive so that the application program is restored to an operation state when the crash signal is received; recording running state information of the application program when the crash signal is received; and after the crash signal is released to cause the application program to crash, restarting the application program, and restoring the application program to the running state of the application program when the application program receives the crash signal according to the running information to finish the restoration of the application program.

Description

Application program recovery method and system and electronic equipment
Technical Field
The embodiment of the specification relates to the field of software, in particular to a method and a system for recovering an application program and electronic equipment.
Background
Along with the development of the internet, various application programs (APP for short) also come with it, in order to meet the use requirements of users, APPs with different functions are continuously developed, and great convenience is brought to the life and work of the users. For example, the APP of the mobile client includes a mobile phone APP and a tablet APP. While the user uses the mobile client APP in a large amount every day, in order to use the mobile client APP more conveniently, the function requirement on the mobile client APP is higher and higher, and the current mobile client APP cannot reach the function expected by the user to some extent. For example, when the APP of the mobile client is crashed, the APP of the mobile client will report the crash log to the server preferentially, so as to facilitate the research and development personnel to locate the problem. For the user, after the crash occurs, the APP can only be reopened again, and the APP is operated again, and there is no any relevant scheme to compensate for the loss of the user experience caused by the crash of the APP, which results in the user experience being greatly discounted.
Therefore, there is a need for a better way to handle the user experience of APP after a crash.
Disclosure of Invention
In order to solve the above technical problems, embodiments of the present disclosure mainly aim to provide a method, a system, and an electronic device for recovering an application program, so as to solve the technical problem in the prior art that when an application program is opened again after a crash occurs, the page before the crash of the application program cannot be recovered.
The technical scheme of one or more embodiments of the specification is realized by the following modes:
one or more embodiments of the present specification provide a method of restoring an application program, including:
after receiving a crash signal of an application program, temporarily keeping the application program alive so that the application program is restored to an operation state when the crash signal is received;
recording running state information of the application program when the crash signal is received;
and after the crash signal is released to cause the application program to crash, restarting the application program, and restoring the application program to the running state of the application program when the application program receives the crash signal according to the running state information to finish the restoration of the application program.
One or more embodiments of the present specification further provide a method for recovering an application program, where after receiving a crash signal of the application program, temporarily keeping alive the application program, specifically:
acquiring a crash signal of the application program sent by a system;
and restarting the running circulation corresponding to the main thread corresponding to the application program with the system closed, so that the application program is recovered to the running state when the crash signal is received, and finishing the temporary keep-alive of the application program.
One or more embodiments of the present specification further provide a method for recovering an application program, where the recording operation state information of the application program when receiving the crash signal specifically includes:
reading state information of a page stack and display pages in the page stack when the application program receives the crash signal, wherein the page stack comprises the display pages of different levels in the page stack of the application program, and the state information comprises information corresponding to the display pages in the page stack of the application program;
and saving the page stack and the state information of the display page in the page stack.
One or more embodiments of the present specification further provide a method for restoring an application program, where the method is to restart the application program, and restore the application program to an operation state of the application program when the application program receives the crash signal according to the operation information, and specifically includes:
restarting the application program;
reading the stored page stack and the state information of the display page in the page stack;
and restoring the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
One or more embodiments of the present specification further provide a method for recovering an application program, before releasing the crash signal, further including: registering a system notification to restart the application;
after the application program crashes, the method further comprises the following steps: and popping up the system notice.
One or more embodiments of the present specification further provide a method for restoring an application program, where the method is to restart the application program, and restore the application program to an operation state of the application program when the application program receives the crash signal according to the operation information, and specifically includes:
restarting the application program according to the popped system notification;
reading the stored page stack and the state information of the display page in the page stack;
and restoring the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
One or more embodiments of the present specification further provide a recovery system for an application program, including a capture module, where the capture module specifically includes:
the keep-alive module is used for temporarily keeping alive the application program after receiving a crash signal of the application program so as to restore the application program to the running state when the crash signal is received;
the recording module is used for recording the running state information of the application program when the crash signal is received;
and the recovery module restarts the application program after releasing the crash signal to cause the application program to crash, and recovers the application program to the running state of the application program when receiving the crash signal according to the running state information to finish the recovery of the application program.
One or more embodiments of the present specification further provide a recovery system of an application, where the keep-alive module includes:
the obtaining submodule is used for obtaining a crash signal of the application program sent by the system;
and the first restarting submodule restarts the running cycle corresponding to the main thread corresponding to the application program which is closed by the system, so that the application program is recovered to the running state when the crash signal is received, and the temporary keep-alive of the application program is completed.
One or more embodiments of the present specification further provide a recovery system of an application program, where the recording module includes:
the first reading sub-module is used for reading the state information of a page stack and a display page in the page stack when the application program receives the crash signal, wherein the page stack comprises the display pages of different levels in the page stack of the application program, and the state information comprises information corresponding to the display page in the page stack of the application program;
and the first saving sub-module is used for saving the page stack and the state information of the display page in the page stack.
One or more embodiments of the present specification further provide a recovery system of an application, the recovery module including:
a second restart sub-module that restarts the application;
the second reading sub-module reads the stored page stack and the state information of the displayed page in the page stack;
and the first restoring submodule restores the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
One or more embodiments of the present specification further provide a recovery system of an application program, the capture module further including:
a registration module to register a system notification to restart the application;
a pop-up module to pop-up the system notification after the application crashes.
One or more embodiments of the present specification further provide a recovery system of an application, the recovery module including:
the third re-starting sub-module is used for restarting the application program according to the popped system notification;
the third reading sub-module reads the stored page stack and the state information of the display page in the page stack;
and the second recovery sub-module is used for recovering the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
One or more embodiments of the present specification further provide an electronic device including:
a memory for storing program instructions;
a processor for executing the program instructions to implement the above to implement the recovery method described in one or more embodiments of this specification.
Compared with the prior art, at least one technical scheme adopted by one or more embodiments of the specification can achieve the following beneficial effects:
1. according to the technical scheme provided by one or more embodiments of the specification, after an application program crash signal sent by a system is received, the application program is temporarily kept alive, so that the application program is restored to the running state when the crash signal is received. After the application program is kept alive, recording running state information corresponding to the running state of the application program when the application program receives the crash signal, such as a display page used by the application program when the application program crashes, related information of the page and the like. And then releasing the crash signal of the application program, wherein the application program crashes after the crash signal is released. And restarting the application program, and restoring the application program to the running state when the application program is crashed according to the recorded running state information of the application program when the crash signal is received, so as to finish the restoration of the application program.
2. By the recovery after the application program crashes, the application program crashes can be recovered to the running state of the application program when the application program crashes after being opened again, for example, a page when the application program crashes or a previous page when the application program crashes. The method and the device solve the problems that after the application program crashes, the application program cannot directly enter the state when the application program crashes after entering the crashed application program again, so that the user experience is greatly reduced, and the user experience is reduced.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only some embodiments described in the present specification, and for those skilled in the art, other drawings can be obtained according to the drawings without any creative effort.
Fig. 1 is a flowchart illustrating a recovery method for an application according to an embodiment of the present disclosure;
fig. 2 is a flowchart illustrating another application recovery method according to an embodiment of the present disclosure;
FIG. 3 is a timing diagram illustrating a method for restoring an application according to an embodiment of the present disclosure;
fig. 4 is a schematic structural diagram of a recovery system of an application according to an embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a recovery system of another application according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any inventive step based on the embodiments of the present disclosure, shall fall within the scope of protection of the present application.
At present, mobile clients are used more and more, the great life and work which are convenient for the mobile clients are installed with various Applications (APP) which are used, and at present, when the APPs are used, some improper operations or other reasons cause APP breakdown, namely, the APPs are flashed off or are unavailable. After this occurs, the APP can only be opened again after it crashes and then re-entered. There are many reasons for APP crash, which are not described herein, but the APP crash needs to be further processed after it is crashed, so as to compensate for the loss of the user experience caused by APP crash. After the crash of the existing APP, the APP is reopened again and the APP enters the APP, the user who enters the APP is the homepage of the APP, the user can not directly enter the page of the APP which is used or operated when the crash occurs, if the user directly enters the homepage of the APP after restarting the APP, the user is required to operate the APP again to enter the page where the APP crashes, the operation is very inconvenient, and the user experience is greatly reduced.
The existing optimization scheme is only to upload the crash log to the server when the APP is reopened next time after the crash of the APP, so that research and development personnel can locate the problem of the crash and process the problem of the crash. There is no other process for the crashed APP that improves the user's experience of continuing or using the APP the next time.
One or more embodiments of the present disclosure provide a technical solution to solve the above technical problem, and greatly improve the user experience.
The technical solutions provided in one or more embodiments of the present specification are described in detail below with reference to the accompanying drawings.
As shown in fig. 1, a flowchart of a method for recovering an application according to one or more embodiments of the present disclosure (refer to fig. 3 at the same time) is provided, where the method mainly includes the following steps:
step S100, after receiving a crash signal of an application program, temporarily keeping the application program alive, and restoring the application program to the running state when receiving the crash signal so as to operate the temporarily kept alive application program. When an APP is used, various operations are performed, and it is worth to be noted that the APP includes all APPs in the mobile client, such as an instant messaging APP, a video APP, and a game APP. When the operation is improper or after the current APP performs an operation that is not allowed by an operating system, the operating system may send information to crash the APP, specifically, the information may be a crash signal that the operating system sends the crash to crash the APP. After the system sends out a crash signal for crashing the APP, the system closes the running loop corresponding to the main thread corresponding to the APP, and the running loop is RunLoop. The RunLoop is an operation mechanism of the APP in a mobile client operating system (including iOS and android), a main thread is started after the APP is started, the main thread runs out of the RunLoop corresponding to the main thread when the main thread is started, and the RunLoop ensures that the main thread corresponding to the APP cannot be destroyed, so that the continuous operation of the APP is also ensured. After the system closes the RunLoop corresponding to the main thread corresponding to the APP, the APP does not run any more, the user can not operate the APP any more, and even if the user operates the APP, the APP can not respond to the operation of the user.
After receiving a crash signal of the APP sent by a system, temporarily keeping the APP so as to restore the application program to the running state when receiving the crash signal. The step of temporarily keeping the APP specifically comprises:
the method comprises the steps of firstly obtaining a crash signal of the APP sent by a system, obtaining the crash signal of the APP, then obtaining that the APP can know that the system needs to crash the APP, and closing running loops (RunLoop) corresponding to main threads corresponding to the APP by the system, wherein the APP does not crash. Then, the APP needs to restart a run loop (RunLoop) corresponding to the main thread corresponding to the APP that the system is closed, where the step may be executed by a certain execution unit separately arranged in the APP, for example, a capture module arranged in the APP, where the execution unit may implement the above function, and a specific structure is not further limited. After the RunLoop corresponding to the main thread corresponding to the APP is restarted, the APP is temporarily kept alive, the RunLoop of the APP is restarted, the APP is recovered to the running condition before the system closes the RunLoop corresponding to the main thread corresponding to the APP, and the running condition of the APP running state before a crash signal sent by the system is received is kept. It should be noted that, because the operating mechanism of the RunLoop corresponding to the main thread corresponding to the APP and the operating state information storage mode of the APP corresponding to the operating mechanism, the operating state information corresponding to the APP during normal operation can be recorded locally, and when the APP receives a crash signal sent by the system, the operating state of the APP recorded locally is also the operating state when the crash signal is received, so after the RunLoop corresponding to the main thread corresponding to the APP is restarted, the operating state information of the APP recorded locally when the crash signal is received is directly read, that is, the APP can be restored to the operating state of the APP before the RunLoop corresponding to the main thread corresponding to the APP is closed by the system. So as to subsequently record, read and the like the operation condition of the APP before receiving the crash signal sent by the system. However, after the RunLoop corresponding to the main thread corresponding to the APP is restarted, the user cannot operate the APP, and even if the user operates the APP, the APP does not respond to the operation of the user. This step completes the temporary keep-alive of the APP for the execution of the subsequent steps.
Step S200, recording the running state information of the APP when receiving the crash signal after the APP is temporarily kept alive. The step of temporarily keeping the APP alive is to record the running information of the APP when the APP receives the crash signal, that is, record the state information of the APP when the crash occurs, or receive the state information of the previous operation or the specified operation of the crash signal, so as to recover the APP. This step may be performed by a certain execution unit separately provided within the APP, such as a capture module. The method specifically comprises the following steps:
and reading the state information of the page stack and the display page in the page stack when the APP receives the crash signal, namely the operation information of the APP when the APP receives the crash signal sent by the system comprises the page stack of the APP and the state information of the display page in the page stack. Each APP has a page stack, the page stack comprises display pages of different levels of the APP, a new page appears after each operation, the page stack stacks the new page, the new page is stored together with the previous page of the new page, the level of the new page is only on the level corresponding to the previous page, and the APP displays the page corresponding to the latest page level. The step is to restore the APP to the page with the highest page level in the page stack after the crash, that is, the page being displayed by the APP, or to a specified page in the page stack.
For example, when the payment of the payment bank is used, the payment bank APP is firstly opened to enter a home page of the payment bank APP, the home page is a page, when the payment is selected in the home page again, a payment page including a payment two-dimensional code is displayed, the payment page is also a page, and the home page and the payment page are two different pages. The page stack of the payment treasure APP is stored with the two pages, the page of the first page is stacked firstly, the payment page is stacked later, the level of the payment page is higher than that of the first page, and the payment treasure APP can display the page with the high level when being displayed, namely the payment page. For example, when chatting with an instant messenger APP (e.g., WeChat, nailing, etc.), a user is chatting with a friend, the user opens a home page of the instant messenger APP, then selects a chat object, and then enters a chat page with the chat object. The page stored by the page stack of the instant messaging APP comprises a home page, an address book page and a chat page, the corresponding level of the chat page is relatively high, and the current displayed page of the instant messaging APP is the chat page.
The state information of the display page in the page stack of the APP includes information corresponding to the display page of the APP, for example, content information corresponding to different pages when the APP is used may be included, including user information, operation behavior records of the user, and the like. Taking the WeChat as an example, if the user uses the WeChat to chat with a friend of the user, the state of the APP at this time includes which friend the user is chatting with, a chat record of the user with the friend of the user, and the like. For example, if the user is paying with the payment bank, the state of the APP of the payment bank includes the two-dimensional code information of the payment page, time (including display time of the two-dimensional code of the payment page, because the two-dimensional code has valid duration), use place, user information, and the like. Taking a browser as an example, the state of the browser APP includes a page link address of a currently browsed page, and the like. Taking office software as an example, the state of the APP is the currently stored information. The state information of the APP page stack and the display page in the page stack corresponding to different APPs may be different, and is not described one by one here.
After reading the state information of the page stack and the page displayed in the page stack when the APP receives the crash signal, the read state information of the page stack and the page displayed in the page stack when the APP receives the crash signal is stored, and in this embodiment, the read state information can be stored in a local storage unit, which facilitates reading in subsequent steps. Because the APP needs to be restored to the state information of the page stack and the display page in the page stack when the APP receives the crash signal, the state information of the page stack and the display page in the page stack when the APP receives the crash signal needs to be read and stored, and then restoration is performed according to the stored state information of the page stack and the display page in the page stack.
After the state information of the page stack and the page displayed in the page stack when the APP receives the crash signal is stored, the received APP crash signal sent by the system is released, and the APP crashes after the crash signal of the APP is released. The system closes the running loop (RunLoop) corresponding to the main thread corresponding to the APP, then the APP does not crash, but the user can not perform any operation, and the APP crashes after the crash signal of the APP is released, and then the APP exits.
Step S300, after the APP collapses, the collapsed APP is restarted, and the APP is recovered to the running state of the APP when the crash signal sent by the system is received according to the stored running state information of the APP when the crash signal sent by the system is received, so that the APP is recovered.
The method specifically comprises the following steps:
restarting the crashed APP, when the APP is being used, the user needs to continue to use the APP after the APP crashes, so the user needs to open the APP again, i.e. the user restarts the crashed APP. The step is only an action of clicking the APP and starting or pulling up the APP, and does not mean that the APP is opened to a place where the APP is opened in a normal mode and the content can be directly displayed, and the APP cannot display the corresponding content after the step. The step of clicking on the APP to start or pull up the APP may be performed by the user.
After the crashed APP is restarted, the state information of the page stack and the display page in the page stack when the stored APP receives the crash signal sent by the system needs to be read, and then recovery after crash is performed. After the crashed APP is restarted, the state information of the page displayed in the page stack and the page stack corresponding to the local APP can be directly read and stored.
And restoring the collapsed APP to the display page of the page stack when the collapsed APP receives a collapse signal sent by the system according to the read page stack corresponding to the APP stored in the last step and the state information of the display page in the page stack. According to the read state information of the page stack corresponding to the saved APP and the page displayed in the page stack, the APP can be recovered to the page (which can be the page operated by the user or the page displayed by the APP) where the APP is located when the APP receives the crash signal sent by the system, or the APP can be recovered to the specified page in the page stack after the crash of the APP is completed by the page previous page of the crash signal sent by the APP receiving system. The corresponding process after the APP is recovered includes a running loop (Runloop), and certainly includes other threads and the like which ensure normal running of the APP, which is not a key point in the embodiment of the present application and is not described in detail here.
The recovery after the crash of the APP is realized through the technical scheme, certain repeated operations before the crash of the APP can not be carried out again after the crash of the APP is re-entered, and then the page where the crash of the APP is located can be entered. Promptly after the APP collapses, the page that APP showed when can directly get into APP after this APP and receive the collapse signal again, perhaps other appointed pages of APP before receiving the collapse signal have promoted the user greatly and have used the experience degree of APP.
As an optimization or supplement to the method for recovering an application program provided in the foregoing embodiments, one or more embodiments of the present disclosure further provide another method for recovering an application program, as shown in fig. 2, which is a schematic flow chart of the method for recovering another application program, and refer to fig. 3 at the same time.
The difference between the method for restoring the application program in this embodiment and the method for restoring the application program provided in the foregoing embodiment is that the method for restoring the application program provided in this embodiment further includes: a step of registering a system notification of the restart application, the step being provided before releasing the crash signal; and popping up the registered system notice of restarting the APP after the APP crashes. The APP has the capability of local notification in the operating system, i.e. the APP sends a notification about the APP to the system, which the system displays (which may be in the form of a message pop, etc.). The method comprises the steps of starting up a system notification of the restart application program through a registered system notification of the restart application program, popping up the system notification of the restart application program after the APP crashes, and restarting the APP through the popped-up system notification.
The method for restoring the application program provided by the embodiment specifically comprises the following steps:
step S400, after receiving the crash signal of the application program, temporarily keeping the application program alive. This step is the same as step S100 in the restoration method of the application program in the above embodiment, and the description of step S100 in the above embodiment is referred to.
Step S500, recording the running state information of the application program when receiving the crash signal. This step is the same as step S200 in the restoration method of the application program in the above embodiment, and the description of step S200 in the above embodiment is referred to.
In step S600, a system notification of the restart application is registered. The APP can be notified by registering the system to restart the APP, the APP having the capability to notify locally in the operating system, and activating the capability by registering in the system. By this step a system notification of the restart APP is registered, so that the APP is restarted according to the system notification. The steps are not limited to the order of step S500, and step S500 may be executed first, and then step S600 is executed, or step S600 may be executed first, and then step S700 may be executed after steps S500 and S600 are executed after step S500 is executed. This step may also be performed by an execution unit capture module provided within the APP.
Releasing the crash signal, the application crashing after releasing the crash signal.
Step S700, pop up the registered system notification of the restart application. After the APP crashes, the system notification of the registered restart APP is popped up by the system, that is, after the APP crashes, the system may pop the system notification of the registered restart APP in a form of a popup window.
And step S800, restarting the application program according to the popped system notification, and restoring the application program to the running state of the application program when the application program receives the crash signal according to the running state information. The method specifically comprises the following steps:
the APP is restarted according to the system notification popped up in step S700. And after the system notification is popped up in the system, clicking the system notification to guide the user to operate, and when the user sees the system notification, clicking the system notification to restart the APP. The problem that the user is not guided to operate is avoided.
And reading the stored page stack and the state information of the display page in the page stack. This step is the same as the reading of the saved page stack and state in step S300, please refer to the description of this step in step S300.
And restoring the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack. This step is the same as the reading of the saved page stack and state in step S300, please refer to the description of this step in step S300.
The method for restoring the application program provided by this embodiment may guide the user to perform further operations through the system notification of the restart APP, and after the system notification of the restart APP pops up, the user restarts the APP according to the system notification, that is, by clicking the system notification, and the system notification plays a role in guiding the user to perform operations. After the guiding user restarts the APP, the APP is restored to a page when the APP receives a crash signal sent by the system or before the crash signal sent by the system.
The recovery method for different application programs provided by one or more embodiments of the present specification solves the technical problems existing in the prior art, and achieves corresponding technical effects. The above recovery method is implemented by a corresponding recovery system, and therefore one or more embodiments of the present specification further provide a system implementing the above method, and referring to fig. 4, the recovery system of the application includes a capture module, where the capture module specifically includes:
the keep-alive module 1 is used for keeping the application program alive temporarily after receiving a crash signal of the application program so as to restore the application program to the running state when the crash signal is received.
And the recording module 2 is used for recording the running information of the application program when the crash signal is received.
And the recovery module 3 is used for releasing the crash signal to crash the application program, restarting the application program, and recovering the application program to the running state of the application program when the crash signal is received according to the running information to finish the recovery of the application program.
Wherein, keep alive module 1 includes:
and the obtaining submodule is used for obtaining the crash signal of the application program sent by the system.
And the first restarting submodule restarts the running cycle corresponding to the main thread corresponding to the application program which is closed by the system, so that the application program is recovered to the running state when the crash signal is received, and the temporary keep-alive of the application program is completed.
The recording module 2 includes:
the first reading sub-module is used for reading the state information of the page stack and the display page in the page stack when the application program receives the crash signal, wherein the page stack comprises the display pages of different levels in the page stack of the application program, and the state information comprises information corresponding to the display page in the page stack of the application program.
And the first saving sub-module is used for saving the page stack and the state information of the display page in the page stack.
The recovery module 3 includes:
and the second restarting sub-module is used for restarting the application program.
And the second reading sub-module reads the stored page stack and the state information of the displayed page in the page stack.
And the first restoring submodule restores the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
Referring to fig. 5, in another recovery system, the capture module includes a keep-alive module 1, a recording module 2, and further includes:
and the registration module 4 registers the system notification for restarting the application program.
And the ejection module 5 ejects the system notification after the application program crashes.
The recovery module 6 includes:
and the third re-starting sub-module is used for restarting the application program according to the popped system notification.
And the third reading sub-module reads the stored page stack and the state information of the displayed page in the page stack.
And the second recovery sub-module is used for recovering the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
An embodiment of the present specification further provides an electronic device, including: more than one memory and more than one processor. Wherein the content of the first and second substances,
a memory (not shown) for storing program instructions, the memory may be transient or persistent.
And the processor (not shown in the figure) is used for executing the program instructions to realize the recovery method of the application program in the technical scheme.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Language Description Language), traffic, pl (core unified Programming Language), HDCal, JHDL (Java Hardware Description Language), langue, Lola, HDL, laspam, hardsradware (Hardware Description Language), vhjhd (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium which can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
Although the present invention has been described with reference to specific preferred embodiments, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the scope of protection of one or more embodiments of the present specification shall be subject to the scope of protection of the claims.

Claims (13)

1. A method of restoring an application, comprising:
after receiving a crash signal of an application program, temporarily keeping the application program alive so that the application program is restored to an operation state when the crash signal is received;
recording running state information of the application program when the crash signal is received;
and after the crash signal is released to cause the application program to crash, restarting the application program, and restoring the application program to the running state of the application program when the application program receives the crash signal according to the running state information to finish the restoration of the application program.
2. The recovery method according to claim 1, wherein after receiving a crash signal of an application, temporarily keeping alive the application, specifically:
acquiring a crash signal of the application program sent by a system;
and restarting the running circulation corresponding to the main thread corresponding to the application program with the system closed, so that the application program is recovered to the running state when the crash signal is received, and finishing the temporary keep-alive of the application program.
3. The recovery method of claim 2, wherein the recording the running state information of the application program when receiving the crash signal specifically comprises:
reading state information of a page stack and display pages in the page stack when the application program receives the crash signal, wherein the page stack comprises the display pages of different levels in the page stack of the application program, and the state information comprises information corresponding to the display pages in the page stack of the application program;
and saving the page stack and the state information of the display page in the page stack.
4. The recovery method according to claim 3, wherein restarting the application program and recovering the application program to the running state of the application program when receiving the crash signal according to the running state information specifically includes:
restarting the application program;
reading the stored page stack and the state information of the display page in the page stack;
and restoring the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
5. The recovery method of claim 3, further comprising, prior to releasing the crash signal:
registering a system notification to restart the application;
after the application program crashes, the method further comprises the following steps: and popping up the system notice.
6. The recovery method according to claim 5, wherein restarting the application program, and recovering the application program to the running state of the application program when receiving the crash signal according to the running state information specifically includes:
restarting the application program according to the popped system notification;
reading the stored page stack and the state information of the display page in the page stack;
and restoring the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
7. A recovery system of an application program comprises a capture module, wherein the capture module specifically comprises:
the keep-alive module is used for temporarily keeping alive the application program after receiving a crash signal of the application program so as to restore the application program to the running state when the crash signal is received;
the recording module is used for recording the running state information of the application program when the crash signal is received;
and the recovery module restarts the application program after releasing the crash signal to cause the application program to crash, and recovers the application program to the running state of the application program when receiving the crash signal according to the running state information to finish the recovery of the application program.
8. The recovery system of claim 7, the keep-alive module comprising:
the obtaining submodule is used for obtaining a crash signal of the application program sent by the system;
and the first restarting submodule restarts the running cycle corresponding to the main thread corresponding to the application program which is closed by the system, so that the application program is recovered to the running state when the crash signal is received, and the temporary keep-alive of the application program is completed.
9. The recovery system of claim 8, the logging module comprising:
the first reading sub-module is used for reading the state information of a page stack and a display page in the page stack when the application program receives the crash signal, wherein the page stack comprises the display pages of different levels in the page stack of the application program, and the state information comprises information corresponding to the display page in the page stack of the application program;
and the first saving sub-module is used for saving the page stack and the state information of the display page in the page stack.
10. The recovery system of claim 9, the recovery module comprising:
a second restart sub-module that restarts the application;
the second reading sub-module reads the stored page stack and the state information of the displayed page in the page stack;
and the first restoring submodule restores the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
11. The recovery system of claim 8, the capture module further comprising:
a registration module to register a system notification to restart the application;
a pop-up module to pop-up the system notification after the application crashes.
12. The recovery system of claim 11, the recovery module comprising:
the third re-starting sub-module is used for restarting the application program according to the popped system notification;
the third reading sub-module reads the stored page stack and the state information of the display page in the page stack;
and the second recovery sub-module is used for recovering the application program to the display page of the page stack according to the stored page stack and the state information of the display page in the page stack.
13. An electronic device, comprising:
a memory for storing program instructions;
a processor for executing the program instructions to implement the recovery method of any one of claims 1 to 6.
CN201911200702.3A 2019-11-29 2019-11-29 Application program recovery method and system and electronic equipment Pending CN111008044A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911200702.3A CN111008044A (en) 2019-11-29 2019-11-29 Application program recovery method and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911200702.3A CN111008044A (en) 2019-11-29 2019-11-29 Application program recovery method and system and electronic equipment

Publications (1)

Publication Number Publication Date
CN111008044A true CN111008044A (en) 2020-04-14

Family

ID=70112459

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911200702.3A Pending CN111008044A (en) 2019-11-29 2019-11-29 Application program recovery method and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN111008044A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022001504A1 (en) * 2020-06-28 2022-01-06 华为技术有限公司 Method and apparatus for restoring running state of application program, and storage medium
WO2022037725A1 (en) * 2020-08-21 2022-02-24 荣耀终端有限公司 System service recovery method and apparatus, and electronic device
WO2024077932A1 (en) * 2022-10-10 2024-04-18 京东科技信息技术有限公司 Page recovery method and apparatus and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1725187A (en) * 2005-04-30 2006-01-25 珠海金山软件股份有限公司 Method and device for storing user data on computer when software crashing
US20060200702A1 (en) * 2005-03-01 2006-09-07 Microsoft Corporation Method and system for recovering data from a hung application
CN105468478A (en) * 2015-11-26 2016-04-06 北京京东尚科信息技术有限公司 Recovery method and apparatus for business data after application crash
CN106502820A (en) * 2016-11-28 2017-03-15 深圳天珑无线科技有限公司 Application crashes processing method and processing device
CN107436777A (en) * 2016-05-27 2017-12-05 北京京东尚科信息技术有限公司 Mobile terminal, application crash processing method and processing device
CN109542689A (en) * 2018-11-30 2019-03-29 努比亚技术有限公司 Applied program processing method, terminal and computer readable storage medium
CN110032472A (en) * 2019-03-05 2019-07-19 视联动力信息技术股份有限公司 A kind of method for restarting and device of application program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060200702A1 (en) * 2005-03-01 2006-09-07 Microsoft Corporation Method and system for recovering data from a hung application
CN1725187A (en) * 2005-04-30 2006-01-25 珠海金山软件股份有限公司 Method and device for storing user data on computer when software crashing
CN105468478A (en) * 2015-11-26 2016-04-06 北京京东尚科信息技术有限公司 Recovery method and apparatus for business data after application crash
CN107436777A (en) * 2016-05-27 2017-12-05 北京京东尚科信息技术有限公司 Mobile terminal, application crash processing method and processing device
CN106502820A (en) * 2016-11-28 2017-03-15 深圳天珑无线科技有限公司 Application crashes processing method and processing device
CN109542689A (en) * 2018-11-30 2019-03-29 努比亚技术有限公司 Applied program processing method, terminal and computer readable storage medium
CN110032472A (en) * 2019-03-05 2019-07-19 视联动力信息技术股份有限公司 A kind of method for restarting and device of application program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022001504A1 (en) * 2020-06-28 2022-01-06 华为技术有限公司 Method and apparatus for restoring running state of application program, and storage medium
WO2022037725A1 (en) * 2020-08-21 2022-02-24 荣耀终端有限公司 System service recovery method and apparatus, and electronic device
WO2024077932A1 (en) * 2022-10-10 2024-04-18 京东科技信息技术有限公司 Page recovery method and apparatus and storage medium

Similar Documents

Publication Publication Date Title
CN111008044A (en) Application program recovery method and system and electronic equipment
WO2018127063A1 (en) Application data processing method and apparatus, and storage medium
CN108924029B (en) Method and device for sending customer service data
CN107066519B (en) Task detection method and device
CN110496395B (en) Component operation method, system and equipment for illusion engine
CN107479868B (en) Interface loading method, device and equipment
CN111796821A (en) Page updating method and device
US8468388B2 (en) Restoring programs after operating system failure
CN109144600B (en) Application program running method and device and computer readable medium
CN111240788A (en) Method, device and equipment for generating small program page
CN111861454A (en) Method and device for displaying unique identifier of digital object
CN108647112B (en) Data backup method and device and distributed transaction processing system
CN114691273A (en) User interface returning method and device, electronic equipment and storage medium
CN111414207A (en) Page construction method, device and equipment
CN108829498B (en) Service data access method and device
CN106970872B (en) Information point burying method and device
CN112015817A (en) Processing method, device and equipment of block chain data
CN108509252B (en) Virtual machine starting device and method and host
CN108733401B (en) Method and device for realizing browser compatibility
CN109522187B (en) Method and device for quickly extracting state information
CN108650165B (en) Communication data recovery method, device and equipment
CN108628615B (en) Method, device and equipment for detecting abandoned codes
CN111078374A (en) Task recovery method and device in multi-operating system environment and storage medium
CN110837433A (en) Performance optimization method and device and electronic equipment
CN111881212A (en) Method, device, equipment and storage medium for executing check point operation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20240228

Address after: 128 Meizhi Road, Guohao Times City # 20-01, Singapore 189773

Applicant after: Advanced Nova Technology (Singapore) Holdings Ltd.

Country or region after: Singapore

Address before: 45-01 Anson Building, 8 Shanton Avenue, Singapore 068811

Applicant before: Alipay laboratories (Singapore) Ltd.

Country or region before: Singapore

TA01 Transfer of patent application right