CN100432949C - Method and device for storing user data on computer when software crashing - Google Patents

Method and device for storing user data on computer when software crashing Download PDF

Info

Publication number
CN100432949C
CN100432949C CNB2005100344433A CN200510034443A CN100432949C CN 100432949 C CN100432949 C CN 100432949C CN B2005100344433 A CNB2005100344433 A CN B2005100344433A CN 200510034443 A CN200510034443 A CN 200510034443A CN 100432949 C CN100432949 C CN 100432949C
Authority
CN
China
Prior art keywords
software
user data
automated back
detected module
collapse
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.)
Active
Application number
CNB2005100344433A
Other languages
Chinese (zh)
Other versions
CN1725187A (en
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.)
Zhuhai Kingsoft Software Co Ltd
Original Assignee
Zhuhai Kingsoft Software Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Kingsoft Software Co Ltd filed Critical Zhuhai Kingsoft Software Co Ltd
Priority to CNB2005100344433A priority Critical patent/CN100432949C/en
Publication of CN1725187A publication Critical patent/CN1725187A/en
Application granted granted Critical
Publication of CN100432949C publication Critical patent/CN100432949C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention discloses a method and a device for storing user's data in a computer when the software of the computer crashes. The method and the device only store the data which is in the process of processing when the software crashes, which not only can fully protect the data, but also saves computer resources. The method comprises the steps of a detection step, an automatically backing up step and a prompt information display step in the software, wherein the detection step is to answer the abnormal feedback sent from an operating system, or to detect whether a running detected module (an application program) crashes, and then to notify the automatically backing up step about abnormal feedback information or a software crash message; the automatically backing up step stores valid data at this point (when the crash occurs); the information display step then displays the information for prompting the user to examine an automatically backing up file; when the application program is started again, the user can use the files to fleetly recover working. The present invention is applied to the computer field.

Description

When software crash, preserve the method and the device of user data on computers
Technical field
The present invention relates to a kind of method and the device of protection user data when software crash on computers.
Background technology
Because a variety of causes such as the conflicting of software and operating system, software self program composition; software may run into various mistakes when operation; some also can make calling program occur unusual and can not continue operation; thereby the ejection operation system-level errors, or application program carries out a certain operational order, the user is after waiting for one period long period; find that application program is still at this operational order of execution; be in busy non-responsive state, but in fact application program is very slow still in operation.Above-mentioned situation can be called software crash.In case these situations occur, the user can not operate software again, has no chance the current content of handling is preserved, and so, the data of not preserving will be lost as yet, thereby cause damage to the user.
At present, the method for timed backup is mainly adopted in Data Protection measure during at software crash.
Timed backup is meant, every one period fixed time, automatically the data backup of handling in the program is stored under the specified path of computer accessible.Like this, in case software crash takes place, when starting this software once more, can read apart from the backup file of time point the last time of software crash and offer the user.This method realizes going up fairly simple, but exists following deficiency: the first, software crash takes place interval time midway in the preservation of appointment, and during this moment to the last time preserved constantly, the operation that the user carries out must be lost; The second, every the preservation interval time of appointment, program is all preserved operation, and this needs the outer computer resource (as central processing unit, internal memory and disk space etc.) of occupying volume.And also there is such contradiction between above-mentioned 2: promptly,, will cause bigger performance impact, waste user's resource to a certain extent to computing machine if preservation setting interval time of appointment is shorter; If preservation setting interval time of appointment is long, data can not be protected again fully so.
Summary of the invention
Technical matters to be solved by this invention is to overcome the deficiencies in the prior art; a kind of method of protection user data when software crash on computers is provided; this method does not need regularly to preserve data; only when collapse takes place software, the user data of handling is preserved; can adequately protect to user data, save computer resource again.
Another technical matters to be solved by this invention is that a kind of device of protection user data when software crash on computers is provided.
The present invention preserves the method employing of user data on computers when software crash technical scheme is: computing machine of the present invention comprises CPU and operating system module, and described software comprises detected module, and described software also comprises following steps:
(1) detects step;
(2) automated back-up step;
(3) display reminding information step;
Described detection step is used for when described detected module is being moved, and whether the described detected module of active detecting has collapse to take place, and takes place if detected collapse, then enters described automated back-up step;
Described automated back-up step is used for checking calculator memory just at processed user data, and will be wherein discernible user data be saved in the assigned catalogue of computer accessible with the form of automated back-up file;
When described display reminding information step was used for the automated back-up file of described automated back-up step preservation is arranged on finding described computer accessible, display message was checked with the prompting user.
Whether described detection step adopts the method for monitoring process and application program communication to detect described detected module has collapse to take place;
When described detected module takes place partly to collapse, described automated back-up step adopts the method for invokes application second development interface method or transmission message to notify described detected module to preserve user data, and perhaps described automated back-up step is recovered backup by the method for sharing user data in the calculator memory; When whole collapse took place described detected module, described automated back-up step was recovered backup by the method for sharing user data in the calculator memory;
Described display reminding information step adopts the method that shows immediately or notify described detected module to show when the next operation of described software to come display reminding information.
The present invention preserves user data on computers when software crash the technical scheme that device adopted is: software of the present invention comprises the device of detected module and described preservation user data, this device comprises pick-up unit, automatic backup device and display reminding massaging device, described pick-up unit is used for when described detected module is being moved, whether the described detected module of active detecting has collapse to take place, when having detected the collapse generation, notify described automatic backup device, the discernible user data of after described automatic backup device is used for having notice calculator memory being edited is saved in the assigned catalogue of computer accessible with the form of automated back-up file, when described display reminding massaging device is used for having the automated back-up file that described automatic backup device preserves on finding described computer accessible, display message or notify detected module display message when software operation next time to check immediately with the prompting user.
The invention has the beneficial effects as follows: because the present invention preserves the method for user data on computers when software crash is to comprise the detection step in described software; automated back-up step and display reminding information step; whether the detected module (application program) that detection step active detecting is being moved has collapse to take place; give the automated back-up step with the message informing of software crash then; the automated back-up step is promptly preserved the valid data of this moment (when collapse takes place); the display message step then demonstrates the information that the prompting user checks the file of automated back-up; when starting this application program once more; the user can use these files to resume work fast; the negative effect that software crash is brought is reduced to minimum; so the data information that can protect the user not preserve as yet to the full extent; and in most uptime of program; do not need regularly to protect user data, can not take resource too much and influence the performance of computing machine.
The present invention also provides a kind of device of preserving user data on computers when software crash in addition, makes said method can obtain concrete enforcement.
Description of drawings
Fig. 1 is the present invention preserves the method for user data on computers when software crash a main flow synoptic diagram;
Fig. 2 is the present invention preserves the method for user data on computers when software crash a general flow chart;
Fig. 3 is the present invention preserves the method for user data on computers when software crash a schematic flow sheet;
Fig. 4 is the present invention preserves the device of user data on computers when software crash a structural representation.
Embodiment
As Fig. 1, Fig. 2, shown in Figure 3, the present invention preserves the computing machine described in the method for user data on computers and comprises CPU and operating system module when software crash, and described software comprises detected module, and described software also comprises following three steps:
(1) detect step: this step is when described detected module is being moved, and whether the described detected module of active detecting has collapse to take place, and takes place if detected collapse, then enters described automated back-up step.
Whether the method that detects step employing monitoring process and application program communication detects described detected module has collapse to take place.
The method of described monitoring process and application program communication is to start a monitoring facilities, regularly with the application program communication.Described communication can be adopted the active request communication, the step that is described communication is initiatively to send request to application program by monitoring facilities earlier, provide response by application program again, show that current operation conditions is good, and can inform the internal data situation of response, carry out the backup of data when being used to abnormal conditions occur.When monitoring facilities does not have at certain time intervals just can determine that abnormal conditions have appearred in application program, enter the automated back-up step when notified;
Described communication also can be adopted the passive response communication, by application program proactive notification monitoring facilities, shows that current operation conditions is good, and can inform the internal data situation of response, carries out the backup of data when being used to abnormal conditions occur.When monitoring facilities does not have at certain time intervals just can determine that abnormal conditions have appearred in application program, enter the automated back-up step when notified.
Detection step of the present invention can detect the common system exception of response equally.System exception is meant the incident that something unexpected happened or process can not normally be carried out, and can be divided into two kinds of hardware and softwares, for example: and visit a page or leaf of not submitting to as yet and can cause hardware anomalies, and invalid parameter or removed by 0 and can cause software anomaly.No matter be that hardware anomalies or software anomaly can cause software (the detected module of moving) collapse.
(2) automated back-up step, when this step receives the software crash information of described detection step transmission, check in the calculator memory just at processed user data, and wherein discernible user data is saved in the assigned catalogue of computer accessible with the form of automated back-up file easy to identify.
When described detected module took place partly to collapse, the automated back-up step can take the method for invokes application second development interface to notify detected module to carry out the data preservation.
Second development interface be application program with one group of function that forms such as function, interface provide, can be employed uses such as other programs outside program itself or the application program, script.Generally speaking, this group function is that application program realizes.Other application program can realize the more applications function on the basis of this group function.
Capture when unusual at software, in abnormality processing, just can call preserve file one class method with under all document storing in the current application program.
If software itself does not provide second development interface, the preservation document method of inside can be derived, use for exception handling code.As use following code:
// captured unusual after
int?nDocs=m_pDocs->GetCount();
while(nDocs--)
{
if(m_pDocs->IsDirty())
m_pDocs->GetDoc(nDocs)->Save();
}
Except the method for above-mentioned calling program second development interface, can also adopt the mode that sends message to notify detected module to preserve user data:
Message mechanism is the characteristic feature of modern operating system, is exactly the operating system that adopts the event driven of message mechanism as Windows.In the Windows environment, between application program and the application program, between application program and the operating system, all communicate between all kinds of driver by message.Usually these message are incidents that input equipment produces, as forms, keyboard, mouse event.
For common Windows operating system, total system is a system message queue.This message queue is retrieved by application program by system, gives other tasks control, and allows this task to move with cooperation mode.If a certain application program searching message failure is not perhaps checked message queue according to system convention, thereby stoped the retrieval of other application programs to message queue, so, system will hang up other application programs, finishes up to the application program of makeing mistakes.
So when detecting unusual the generation, can come to send message, carry out data backup with notification application by giving Windows Api PostMessage to unusual thread occurring.This method is fit to monitoring facilities can find the situation that external system is unusual in advance.
Below being one is the example procedure code snippet at center with the Message Processing typically:
// one, message processing function
// parameter: window handle, message, message parameter, message parameter
LRESULT?CALLBACK?WndProc(HWND?hwnd,UINT?message,WPARAM?wParam,
LPARAM?lParam)
{
// handle interested message
switch(message)
{
case?WM_DESTROY:
// closing window as the user, window is destroyed, and program need finish, and sends out and withdraws from message, disappears to withdraw from
The breath circulation
PostQuitMessage(0);
return?0;
}
// other message are provided by the default process that is provided by system function
return::DefWindowProc(hwnd,message,wParam,lParam);
}
// two, application program principal function
int?WINAPI?WinMain(HINSTANCE?hInstance,HINSTANCE?hPrevInstance,
PSTR?szCmdLine,int?iCmdShow)
{
// message circulation
MSG msg;
While (GetMessage (﹠amp; Msg, NULL, 0,0)) // cancellation breath from message queue
{
TranslateMessage (﹠amp; Msg); // transforming message
DispatchMessage (﹠amp; Msg); // distribute message
}
return?msg.wParam;
}
Above-mentioned two kinds of methods are more common in actual applications, in addition can also come restoring user data by automatic backup device according to core image by sharing the method for user data in the calculator memory, to reach the purpose of backup user data.
And when whole collapse took place detected module, the automated back-up step just can only be come restoring user data by automatic backup device according to core image by sharing the method for user data in the calculator memory.
Use which kind of method no matter be, for application program can also be pointed out user's recovery file when restarting, in Backup Data, also need write extraneous information in a specific place, as in the configuration file of system registry or application program, writing backup data information, it can be the time that abnormal data occurs, also can be old file name, or both combinations.Its objective is in order to allow the user be easy to discern its corresponding raw data according to information.Be exemplified below: at first be that the file of editing is traveled through, call API and check whether file needs to preserve, do not preserve if do not need, then directly check next file, otherwise, with a new filename of rule generation of " old file name+current system time ", (rename is all not to be kept under the path because will preserve file to be saved in assigned catalogue, avoid file to bear the same name), traversal is finished, and preserves and has also just finished.
After described automated back-up step is finished, enter following display message step.
(3) display reminding information step, when this step is used for the automated back-up file of described automated back-up step preservation is arranged on finding described computer accessible, adopt method that shows immediately or the method for notifying detected module when start next time, to show to have under the display reminding user specified path data message of automated back-up file, make the file that the user knows automated back-up at present, thereby when the user starts application program once more, can check these automated back-up files from computer accessible.
Display message can adopt multiple means, as methods such as the screen prompt that can provide with dialog box, system, auditory tone cueses.
Dialog box is that graphic user interface (GUI) is used to carry out one of modal method of man-machine interaction, it can be designed to a modal dialog box, the user can read top literal, content can comprise the mistake that current procedure runs into, illustrate that the file of user having been edited is saved under the file path of computer accessible of an appointment, like this, the user has promptly clearly known the existence of automated back-up file and can go to and check these automated back-up files under this document path.
As shown in Figure 4, the device of preserving user data on computers when the software crash corresponding to said method, described software comprises detected module and described device, described device comprises pick-up unit, automatic backup device and display reminding massaging device, described pick-up unit is used for when described detected module is being moved, whether detect described detected module with the mode of active request communication detection or passive response communication detection has collapse to take place, when having detected the collapse generation, then notify described automatic backup device to carry out automated back-up; Automatic backup device just adopts the method for calling second development interface or the method that sends message, notify detected module registration to preserve at editor's user data, perhaps the method cause automatic backup device of preserving automatically according to core image is preserved the user data of editing; The display reminding massaging device conducts interviews to automatic backup device frequently, when finding that automatic backup device has the backup user data, adopt mode that shows immediately or the mode of notifying detected module when start next time, to show to demonstrate the information that the prompting user checks the automated back-up file.
The present invention is merged handling procedure illegal operation and user data protection to get up the data information of having protected the user not preserve as yet to the full extent by the step and the device of the foregoing description; In time notify the user after preservation work is finished, be convenient to user's viewing files to continue operation.

Claims (3)

1, a kind of method of when software crash, preserving user data on computers, described computing machine comprises CPU and operating system module, described software comprises detected module, it is characterized in that, also includes following steps in described software:
(1) detects step;
(2) automated back-up step;
(3) display reminding information step;
Described detection step is used for when described detected module is being moved, and whether the described detected module of active detecting has collapse to take place, and takes place if detected collapse, then enters described automated back-up step;
Described automated back-up step is used for checking calculator memory just at processed user data, and will be wherein discernible user data be saved in the assigned catalogue of computer accessible with the form of automated back-up file;
When described display reminding information step was used for the automated back-up file of described automated back-up step preservation is arranged on finding described computer accessible, display message was checked with the prompting user.
2, the method for protection user data when software crash on computers according to claim 1 is characterized in that, whether described detection step adopts the method for monitoring process and application program communication to detect described detected module has collapse to take place;
When described detected module takes place partly to collapse, described automated back-up step adopts the method for invokes application second development interface method or transmission message to notify described detected module to preserve user data, and perhaps described automated back-up step is recovered backup by the method for sharing the user data in the calculator memory; When whole collapse took place described detected module, described automated back-up step was recovered backup by the method for sharing the user data in the calculator memory;
Described display reminding information step adopts the method that shows immediately or notify described detected module to show when the next operation of described software to come display reminding information.
3, a kind of device of when software crash, preserving user data on computers, described software comprises detected module, it is characterized in that: described software also comprises described device, described device comprises pick-up unit, automatic backup device and display reminding massaging device, described pick-up unit is used for when described detected module is being moved, whether the described detected module of active detecting has collapse to take place, when having detected the collapse generation, notify described automatic backup device, after described automatic backup device is used for having notice calculator memory just is being saved in the assigned catalogue of computer accessible with the form of automated back-up file at processed discernible user data, when described display reminding massaging device is used for having the automated back-up file that described automatic backup device preserves on finding described computer accessible, display message or notify detected module display message when software operation next time to check immediately with the prompting user.
CNB2005100344433A 2005-04-30 2005-04-30 Method and device for storing user data on computer when software crashing Active CN100432949C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100344433A CN100432949C (en) 2005-04-30 2005-04-30 Method and device for storing user data on computer when software crashing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100344433A CN100432949C (en) 2005-04-30 2005-04-30 Method and device for storing user data on computer when software crashing

Publications (2)

Publication Number Publication Date
CN1725187A CN1725187A (en) 2006-01-25
CN100432949C true CN100432949C (en) 2008-11-12

Family

ID=35924669

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100344433A Active CN100432949C (en) 2005-04-30 2005-04-30 Method and device for storing user data on computer when software crashing

Country Status (1)

Country Link
CN (1) CN100432949C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714861A (en) * 2013-12-16 2015-06-17 阿里巴巴集团控股有限公司 Scene recovery data saving method and application running method, device and system

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101373450B (en) * 2007-08-21 2010-09-29 联想(北京)有限公司 Method and system for processing CPU abnormity
CN102033823B (en) * 2009-09-27 2014-03-19 中兴通讯股份有限公司 Method and device for storing data
CN102262571B (en) * 2011-07-25 2013-01-30 福建星网锐捷网络有限公司 Method, device and equipment for processing system crash
CN103279393B (en) * 2012-10-17 2016-05-04 厦门雅迅网络股份有限公司 The crash-free method of navigator application program based on extrapolation storage card
CN102929761B (en) * 2012-11-16 2015-10-28 赛尔网络有限公司 A kind of system and method for tackling collapsibility mistake
CN103870356B (en) * 2012-12-11 2017-12-01 联想(北京)有限公司 A kind of information processing method and electronic equipment
CN103678091A (en) * 2013-12-19 2014-03-26 北京奇虎科技有限公司 Method and device for processing crash data of application software
CN104978352B (en) * 2014-04-10 2019-05-24 腾讯科技(深圳)有限公司 The method and client of information processing
CN105320615B (en) * 2014-07-30 2020-02-21 宇龙计算机通信科技(深圳)有限公司 Data storage method and data storage device
CN105512008B (en) * 2014-09-22 2018-05-11 华为技术有限公司 A kind of method and device for obtaining fault message
CN105718791B (en) * 2014-12-01 2019-08-02 Tcl集团股份有限公司 A kind of method and apparatus for protecting application data
CN104915603A (en) * 2015-04-30 2015-09-16 努比亚技术有限公司 Terminal equipment data storage method and terminal equipment
CN106446700A (en) * 2016-10-20 2017-02-22 上海理工大学 Automatic file saving method achieving power failure preventing
CN107729180B (en) * 2017-09-30 2020-07-03 珠海市魅族科技有限公司 Abnormal information processing method and device, computer device and readable storage medium
CN108181857B (en) * 2018-01-22 2020-07-28 珠海格力电器股份有限公司 Method and device for controlling operation of equipment unit, display panel and equipment unit
CN110851294B (en) * 2019-10-10 2023-06-30 上海上湖信息技术有限公司 Method and device for remedying program running crash
CN111008044A (en) * 2019-11-29 2020-04-14 支付宝实验室(新加坡)有限公司 Application program recovery method and system and electronic equipment
CN114679391A (en) * 2022-02-23 2022-06-28 网宿科技股份有限公司 Method for collecting network traffic of docker container, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020194528A1 (en) * 2001-05-22 2002-12-19 Nigel Hart Method, disaster recovery record, back-up apparatus and RAID array controller for use in restoring a configuration of a RAID device
US6701454B1 (en) * 2000-06-05 2004-03-02 Microsoft Corporation Method and system for recovering information during a program failure
US6816984B1 (en) * 2000-06-23 2004-11-09 Microsoft Corporation Method and system for verifying and storing documents during a program failure

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6701454B1 (en) * 2000-06-05 2004-03-02 Microsoft Corporation Method and system for recovering information during a program failure
US6816984B1 (en) * 2000-06-23 2004-11-09 Microsoft Corporation Method and system for verifying and storing documents during a program failure
US20020194528A1 (en) * 2001-05-22 2002-12-19 Nigel Hart Method, disaster recovery record, back-up apparatus and RAID array controller for use in restoring a configuration of a RAID device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104714861A (en) * 2013-12-16 2015-06-17 阿里巴巴集团控股有限公司 Scene recovery data saving method and application running method, device and system

Also Published As

Publication number Publication date
CN1725187A (en) 2006-01-25

Similar Documents

Publication Publication Date Title
CN100432949C (en) Method and device for storing user data on computer when software crashing
KR102268355B1 (en) Cloud deployment infrastructure validation engine
KR101021394B1 (en) Programmatic computer problem diagnosis and resolution and automated reporting and updating of the same
CN100498725C (en) Method and system for minimizing loss in a computer application
US8140908B2 (en) System and method of client side analysis for identifying failing RAM after a user mode or kernel mode exception
CN110413432B (en) Information processing method, electronic equipment and storage medium
US7783742B2 (en) Dynamic process recovery in a distributed environment
CN111581021B (en) Application program starting abnormality repairing method, device, equipment and storage medium
CN101968835A (en) Method and system for safely deleting information from a computer
CN101145983B (en) A self-diagnosis and self-discovery subsystem and method of network management system
JP2006338445A (en) Abnormality information storage apparatus
JP6238221B2 (en) Apparatus, method and program for monitoring execution of software
CN100337211C (en) Method for safeguarding the continuous safety operation of computers
CN102929761A (en) System and method for responding corruption error
JP2018180982A (en) Information processing device and log recording method
WO2013104964A1 (en) Thread based dynamic data collection
US20120272103A1 (en) Software operability service
JP2007207213A (en) Diagnostic information collecting method applied to real-time diagnosis of wireless device
CN108762999A (en) A kind of kernel failure collection method and device
US20080018651A1 (en) Method and system for capturing image frame
JP4271612B2 (en) Fault detection system and method
JP2009187189A (en) Stall detection device, stall detection method and stall detection program
JP2007133604A (en) Computer system, operational state determination program and operational state determination method
CN117827500A (en) Log acquisition method and device and electronic equipment
JP2017151511A (en) Information processing device, operation log acquisition method and operation log acquisition program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: ZHUHAI KINGSOFT SOFTWARE CO., LTD.

Free format text: FORMER NAME: ZHUHAI JINSHAN SOFTWARE CO. LTD.

CP01 Change in the name or title of a patent holder

Address after: Jinshan computer Building No. 8 Jingshan Hill Road, Lane 519000 Lianshan Jida Zhuhai city in Guangdong Province

Patentee after: Zhuhai Kingsoft Software Co., Ltd.

Address before: Jinshan computer Building No. 8 Jingshan Hill Road, Lane 519000 Lianshan Jida Zhuhai city in Guangdong Province

Patentee before: Zhuhai Jinshan Software Co., Ltd.