1. Technical Field
The present invention relates generally to an improved data processing system and in particular to a method and apparatus for managing data. Still more particularly, the present invention relates to a method, apparatus, and computer instructions for storing files from application sessions.
2. Description of Related Art
Computers are pervasive in today's society. Computers have many uses at work and at home. Users employ computers to design hardware and software systems as well as analyze those systems. Further, computers are used to generate documents and provide communications in both business and personal uses. A myriad of programs are available for users to perform almost any task. These programs include, for example, word processors, spreadsheet programs, computer aided design (CAD), compilers, and Web design programs.
Often times, a program, such as a word processor, is accidentally closed. When the program is closed through normal means, the information is lost. For example, when a user closes a word processing program, the program may prompt the user to save changes. If the user accidentally decides not to save the changes, those changes are lost. Additionally, other information in the program is lost. For example, information that may be used to undo or redo edits is lost.
In other situations, a document is edited several times and the changes are made and saved to disk that the user desires to undo. For example, a user creating a report with a word processor may delete a number of paragraphs and save those changes. If the user then desires to restore those paragraphs, the user is unable to recover those deleted paragraphs. With the current technology and standard operating system techniques, once a program is closed, only the persistent data stored on the disk by the individual application remains available for use.
Many applications, including word processors, may provide a backup system in which a backup of a file is made during a session periodically, such as every five minutes or every ten minutes. A session begins when the user initiates or executes an application and ends when the user closes the application through normal means. In some cases, a word processor may provide a backup in which a previous file is saved under another file name when the current document is saved. Such a system, however, does not provide the user any mechanism to recover data that has been taken out during several different edits with changes being saved to the disk during the session. Additionally, other information such as information used to undo edits is not saved to the disk. This information is lost when the user exits the application.
It would be advantageous to have an improved method, apparatus, and computer instructions for allowing a user to restore information from a program session.
The present invention provides a method, apparatus, and computer instructions for saving session data. Session data associated with an application in a file is placed in a location, such as a recycle bin or other container or folder, to form a stored file in response to a closing of a session for the application. An appropriate file name is associated to identify a specific instance of the session that has been packaged and stored in a recycle bin.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
With reference now to the figures and in particular with reference to
With reference now to
An operating system runs on processor 202 and is used to coordinate and provide control of various components within data processing system 200 in
Those of ordinary skill in the art will appreciate that the hardware in
For example, data processing system 200, if optionally configured as a network computer, may not include SCSI host bus adapter 212, hard disk drive 226, tape drive 228, and CD-ROM 230. In that case, the computer, to be properly called a client computer, includes some type of network communication interface, such as LAN adapter 210, modem 222, or the like. As another example, data processing system 200 may be a stand-alone system configured to be bootable without relying on some type of network communication interface, whether or not data processing system 200 comprises some type of network communication interface. As a further example, data processing system 200 may be a personal digital assistant (PDA), which is configured with ROM and/or flash ROM to provide non-volatile memory for storing operating system files and/or user-generated data.
The depicted example in
The processes of the present invention are performed by processor 202 using computer implemented instructions, which may be located in a memory such as, for example, main memory 204, memory 224, or in one or more peripheral devices 226-230.
The present invention provides a method, apparatus, and computer instructions for allowing a user to restore a session for an application. Upon closing a session or an indication to save data to a permanent storage, the data for the session is stored in a file. This file is stored in a persistent storage in an appropriate location, such as in a recycle bin with an identification to identify the specific instance of a stored file. A selection of the file in the recycle bin causes the session for the application to be restored using the information in the stored file.
In an illustrative embodiment, a user may indicate the closing or termination of a session through various user inputs. For example, a user may select an exit menu option or close the window in which the application is executing. Additionally, the user may press some combination of keys, such as alt-F4. In this illustrative embodiment, memory segments and process information related to the session are collected by the operating system. This information is packaged into an archive file suitable for complete recovery and restart of the session at a later time. That file is placed on the hard drive in a location, such as the recycle bin for the operating system with an appropriate identification.
As used herein, a recycle bin is a utility for storing files that are to be deleted. With this recycle bin, files are recoverable until the recycle bin is emptied. In the examples shown in the figures, the location for the archive file is depicted as being located in a recycle bin for purposes of illustration. Depending on the particular implementation, the archive file may be placed in other locations, such as other folders or bins. In fact, any type of paradigm that allows for a user to locate an archive file and select the archive file to restore a session may be used.
In the illustrative examples, these archive files containing the session data are stored in the recycle bin. Consequently, at any time in the future prior to emptying of the recycle bin, a user may simply open the item in the recycle bin to restore the session. In these illustrative examples, the existing operating system recycle bin may be used, or another separate bin offering similar function. The operating system uses the session information stored in the archive file to recreate the session at the identical point when the session was previously closed. Further, the creation of an archive file for recovery of a session also may be made in response to a command generated by the user to store data in a persistent or permanent storage.
With reference now to
In the illustrative examples, a session begins when a user initiates execution of application 300 and ends when the user closes application 300. In response to a closing of the session or an indication that data is to be saved to a persistent or permanent storage, application session process 304 takes data 302 and creates archive file 306. In these illustrative examples, this archive file is stored in a persistent storage, such as on a hard drive, in an appropriate location, such as within recycle bin 308. As used herein, a recycle bin is any process, utility, or function that is used to hold files deleted by a user in a manner that may be recovered prior to the files being emptied from the recycle bin. Data 302, in the illustrative example, includes all of the information needed to restore the session at the identical point when the session is closed or at the identical point when data is saved to a permanent or persistent storage. Data 302 includes, for example, data located in various memory segments in the data processing system as well as process information related to the session.
Turning now to
“Microsoft_Word_Session—11192003-202103GMT.saf” in this illustrative example.
Memory segments 402 may include both code segments and data segments. The code segments are the portions of the memory that contain the code used to execute the application. The data segments include all the information created or used by the application. This data may include, for example, the documents that are being worked on and any information used to undo or restore edits made to the document. In the illustrative example, memory segments 402 only contain the data segments.
The code segments may be included, depending on the implementation. Inclusion of this information may be useful in case the user has deleted or removed the program from the data processing system. With the code segments, the user may still be able to view and edit the file for the application session.
Process information 404 includes all of the information needed to recreate the environment for the session. This information may include, for example, register states in a processor and an identification of threads used to run the application. In these illustrative examples, the information may be, but is not required to be an instantaneous snapshot that could occur at any microsecond. In the illustrative embodiment, the operating system allows allow certain tasks to complete before the capturing of process information 404 to allow for a cleaner restart. In other words, the information saved for process information 404 is everything needed for an adequate restart and restore to an acceptable point in the application execution process such that relevant data is available as it was prior to close. Process information 404 may be obtained through processes similar to those used in hibernating data processing systems.
With reference now to
Turning now to
The process begins by receiving a user input indicating the closing of a session or saving data to a permanent storage (step 600). In response to this user input, memory segments associated with the application are identified (step 602). In this example, the memory segments identified are the data segments for the application.
Thereafter, the data from the memory segments is placed in an archive file (step 604). Next, process information for the application is identified (step 606). This process information also is placed into the archive file (step 608). This information is placed into the archive file in a manner suitable for restoring the session at a later time. Then, the archive file is placed in a suitable location, such as the recycle bin for the operating system (step 610) with the process terminating thereafter.
With reference now to
The process begins by receiving a request to re-establish a session (step 700). This request, in these illustrative examples, takes the form of opening an archive file located in an appropriate location, such as file 502 in recycle bin 500 in
In this manner, the session for the application may be restored to the state at which the application was closed. For example, with a word processing application, a document and the undo information is restored for use by the user. Further, information stored in a clipboard during the session also is restored through the restoration of process information.
Thus, the present invention provides an improved method, apparatus, and computer instructions for saving and restoring sessions for an application. The mechanism of the present invention stores session data for a program in a file in a recycle bin in response to a closing of the session or program or in response to an indication that data is to be saved to a permanent or persistent storage. The archive file is placed in a persistent storage in a suitable location, such as the recycle bin. This archive file may be opened at a later time to restore the session.
In response to opening this file, the session data stored in the file is used to initiate execution of the program and place the program back into the same state as when the session information was saved. As a result, a user may undo changes to data, such as a document even though the document may have been edited several times with changes being made and saved to the hard drive. This restoration of sessions may occur as long as the archive files are not emptied from the recycle bin.
It is important to note that while the present invention has been described in the context of a fully functioning data processing system, those of ordinary skill in the art will appreciate that the processes of the present invention are capable of being distributed in the form of a computer readable medium of instructions and a variety of forms and that the present invention applies equally regardless of the particular type of signal bearing media actually used to carry out the distribution. Examples of computer readable media include recordable-type media, such as a floppy disk, a hard disk drive, a RAM, CD-ROMs, DVD-ROMs, and transmission-type media, such as digital and analog communications links, wired or wireless communications links using transmission forms, such as, for example, radio frequency and light wave transmissions. The computer readable media may take the form of coded formats that are decoded for actual use in a particular data processing system.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. In the illustrative examples, the location for the archive files is shown as being a recycle bin. Other types of locations may be used. For example, the mechanism of the process may be configures to send each archive file by email to some selected email address. In that case, a user may use an email program to locate the email message with the archive file, detach the attached archive file to a temporary directory, and select that file to restore that session for the application. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.