CN104424115A - Method for restoring preset status of electronic device, memory device and electronic device - Google Patents

Method for restoring preset status of electronic device, memory device and electronic device Download PDF

Info

Publication number
CN104424115A
CN104424115A CN201310400098.5A CN201310400098A CN104424115A CN 104424115 A CN104424115 A CN 104424115A CN 201310400098 A CN201310400098 A CN 201310400098A CN 104424115 A CN104424115 A CN 104424115A
Authority
CN
China
Prior art keywords
storage
memory
state
electronic equipment
memory storage
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.)
Granted
Application number
CN201310400098.5A
Other languages
Chinese (zh)
Other versions
CN104424115B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201310400098.5A priority Critical patent/CN104424115B/en
Publication of CN104424115A publication Critical patent/CN104424115A/en
Application granted granted Critical
Publication of CN104424115B publication Critical patent/CN104424115B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a method for restoring the preset status of an electronic device, a memory device and the electronic device comprising the memory device. The method for restoring the preset status of the electronic device includes the following steps: after a protection request is received, the specific storage status of the memory device under the preset status of the electronic device is determined; the specific storage status of the memory device is so kept as not to change when the electronic device is not in the preset status and the memory device is operated; when a restoration request is received, the preset status of the electronic device is restored on the basis of the kept specific storage status. In the technical solution on the basis of the embodiment of the invention, while the operating efficiency of the electronic device can be ensured, the electronic device can be conveniently restored to the preset status.

Description

Recover the method for the preset state of electronic equipment, memory storage and electronic equipment
Technical field
The present invention relates to areas of information technology, more specifically, relate to a kind of method of the preset state for recovering electronic equipment, memory storage and comprise the electronic equipment of this memory storage.
Background technology
Along with the development of infotech, occur that various application program is to meet the user demand of user.Such as, but the application program of installing in the electronic equipment of such as computing machine, personal digital assistant etc. occupies the resource of electronic equipment, takies storage space and internal memory etc., this may cause the operational efficiency of electronic equipment to reduce.In addition, different users has different user demands usually, and when being used by the second user after first user uses electronic equipment, some application program may be unnecessary for the second user again.Therefore, in some electronic equipment, in such as, electronic equipment in the environment such as Internet bar, teaching, need, after user uses, electronic equipment is returned to original or predetermined using state, thus improve the service efficiency of electronic equipment, and avoid the potential hazard that user may bring when loading various application program.
At present, sandbox (Sandbox) technology can be utilized to realize the recovery of electronic equipment.Sandbox technology mainly isolates an idle specific region from the storer of electronic equipment, performs any operation carried out in the electronic device in this specific region, and when closing sandbox, described specific region is cancelled, thus recovers.Described sandbox technology mainly utilizes the supervisory routine of electronic equipment to realize, comprise the described specific region of isolation, intercept and capture the operation of memory storage and redirected, which greatly increases the operating load of the operating system of electronic equipment, reduce its operational efficiency, and make when the system upgrade of electronic equipment electronic equipment there is serious compatibility issue.
Therefore, expect while the service efficiency not reducing electronic equipment, easily electronic equipment to be returned to predetermined state.
Summary of the invention
Embodiments provide the method for the preset state for recovering electronic equipment, memory storage and comprise the electronic equipment of this memory storage, electronic equipment can be returned to default state easily by it while the operational efficiency ensureing electronic equipment.
On the one hand, provide a kind of method of the preset state for recovering electronic equipment, this electronic equipment comprises memory storage, and the method comprises: after receiving protection request, determine the particular memory state of described memory storage under described preset state; Retain the described particular memory state of described memory storage, make when described electronic equipment is not in described preset state and operates described memory storage, described particular memory state do not change; When receiving recovery request, recover the preset state of described electronic equipment based on retained particular memory state.
In the method for the described preset state for recovering electronic equipment, described particular memory state can comprise the address mapping table of described memory storage under described preset state and the protection storage space storing data in described memory storage.
In the method for the described preset state for recovering electronic equipment, described memory storage can support snapshot functions, and the determination of described particular memory state and reservation realize by creating snapshot to described memory storage.
In the method for the described preset state for recovering electronic equipment, the step of the described particular memory state of the described memory storage of described reservation can comprise: the address mapping table of described memory storage under described preset state is copied to predeterminable area; Mark to protect it be not wiped free of and write to described protection storage space.
In the method for the described preset state for recovering electronic equipment, when described electronic equipment is not in described preset state and will writes data in described memory storage, the step of the described particular memory state of the described memory storage of described reservation can comprise: determine whether the write operation of these data points to described protection storage space; If described protection storage space is pointed in the write operation of these data, then in described memory storage, determine spare storage space; Write for this memory storage is redirected to described spare storage space; In described spare storage space, write described data, thus do not change the particular memory state of described memory storage.
In the method for the described preset state for recovering electronic equipment, the step recovering the preset state of described electronic equipment based on retained particular memory state can comprise: the current address mapping table of memory storage is replaced with retained address mapping table; Erase operation is performed to spare storage space.
In the method for the described preset state for recovering electronic equipment, described memory storage is the solid state hard disc comprising multiple storage block, describedly determine that the step of the particular memory state of described memory storage under described preset state can comprise: determine wherein to have in each storage block that data store whether at least two storage blocks have free page, this free page wherein has the memory page not preserving data in each storage block that data store; If at least two have in the storage block of data storage and there is free page, then Data Integration is carried out to described each storage block with data storage, there is free page until have in the storage block of data storage at one at most; Storage block after integrating is defined as protecting storage space.
In the method for the described preset state for recovering electronic equipment, after receiving protection request, also can comprise: the dormancy instruction starting described electronic equipment, described memory storage is disabled according to dormancy instruction; After described memory storage is disabled the execution of described dormancy instruction terminate before time period in, determine described particular memory state.
On the other hand, provide a kind of memory storage, be applied to the electronic equipment with preset state, described memory storage comprises: determining unit, for determining the particular memory state of described memory storage under described preset state after receiving protection request; Stick unit, for retaining the described particular memory state of described memory storage, makes when described electronic equipment is not in described preset state and operates described memory storage, described particular memory state does not change; Recovery unit, for when receiving recovery request, recovers the preset state of described electronic equipment based on retained particular memory state.
In described memory storage, described particular memory state can comprise the address mapping table of described memory storage under described preset state and the protection storage space storing data in described memory storage.
In described memory storage, described memory storage can support snapshot functions, described determining unit is by determining described particular memory state for the snapshot creation of described memory storage, and described stick unit is by retaining described particular memory state for the described snapshot creation of described memory storage.
In described memory storage, described stick unit retains described particular memory state by operating as follows: the address mapping table of described memory storage under described preset state is copied to predeterminable area; Mark to protect it be not wiped free of and write to described protection storage space.
In described memory storage, when described electronic equipment is not in described preset state and will writes data in described memory storage, described stick unit writes data by operating as follows: determine whether the write operation of these data points to described protection storage space; When described protection storage space is pointed in the write operation of these data, in described memory storage, determine spare storage space; Write for this memory storage is redirected to described spare storage space; In described spare storage space, write described data, thus do not change the particular memory state of described memory storage.
In described memory storage, described recovery unit is by operating the preset state recovering described electronic equipment as follows: the current address mapping table of memory storage is replaced with retained address mapping table; Erase operation is performed to spare storage space.
In described memory storage, described memory storage can be the solid state hard disc comprising multiple storage block, described determining unit determines described particular memory state by operation as follows: determine wherein to have in each storage block that data store whether at least two storage blocks have free page, and this free page wherein has the memory page not preserving data in each storage block that data store; If at least two have in the storage block of data storage and there is free page, then Data Integration is carried out to described each storage block with data storage, there is free page until have in the storage block of data storage at one at most; Storage block after integrating is defined as protecting storage space.
In described memory storage, also can comprise: forbidden energy unit, for after receiving dormancy instruction from the operating system of electronic equipment, start the use forbidding this memory storage.Described determining unit can determine described particular memory state when described forbidden energy unit forbids the use of this memory storage, and completes the determination of described particular memory state before the operating system of described electronic equipment terminates to perform described dormancy instruction.
On the other hand, provide a kind of electronic equipment, comprise any one in memory storage as above.
The above-mentioned preset state for recovering electronic equipment of the embodiment of the present invention method, memory storage and comprise in the electronic equipment of this memory storage, by retaining the particular memory state of described memory storage under described preset state, and recover the preset state of described electronic equipment based on retained particular memory state, thus while the operational efficiency ensureing electronic equipment, easily electronic equipment can be returned to default state.
Accompanying drawing explanation
In order to be illustrated more clearly in the technical scheme of the embodiment of the present invention, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram of the method for the preset state for recovering electronic equipment schematically illustrated according to the embodiment of the present invention;
Fig. 2 schematically illustrates according to the particular memory state in the method for the preset state for recovering electronic equipment of the embodiment of the present invention;
Fig. 3 be a diagram that the process flow diagram according to the determination particular memory state in the method for the preset state for recovering electronic equipment of the embodiment of the present invention;
Fig. 4 be a diagram that the process flow diagram according to the reservation particular memory state in the method for the preset state for recovering electronic equipment of the embodiment of the present invention;
Fig. 5 is the block diagram of the memory storage schematically illustrated according to the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is the present invention's part embodiment, instead of whole embodiments.
Fig. 1 is the process flow diagram of the method 100 of the preset state for recovering electronic equipment schematically illustrated according to the embodiment of the present invention.
Can be applicable to various electronic equipment according to the information processing method of the embodiment of the present invention, include but not limited to intelligent telephone set, computing machine, personal digital assistant or data storage server etc.Described electronic equipment is such as be used in the electronic equipment in the environment such as Internet bar, teaching, needs, after user uses, electronic equipment is returned to preset state.The particular type of electronic equipment is not construed as limiting the invention.This preset state can be arranged by the supvr of electronic equipment, and it is such as the application installment state that can meet the basic user demand of user of electronic equipment, and can be different according to the difference of the function of electronic equipment, hardware configuration etc.
This method 100 being used for the preset state recovering electronic equipment comprises: after receiving protection request, determine the particular memory state (S110) of described memory storage under described preset state; Retain the described particular memory state of described memory storage, make when described electronic equipment is not in described preset state and operates described memory storage, described particular memory state do not change (S120); When receiving recovery request, recover the preset state (S130) of described electronic equipment based on retained particular memory state.
In S110, after receiving protection request, determine the particular memory state of described memory storage under described preset state.This protection request is such as sent by its supvr when described electronic equipment is in described preset state, and it is for the preset state of instruction protection electronic equipment, electronic equipment can be returned to this preset state.
When the type of described memory storage is different, the concrete meaning of its particular memory state under described preset state also will change.Exemplarily; described particular memory state can comprise the address mapping table of described memory storage under described preset state and the protection storage space storing data in described memory storage; this is typically applied in described memory storage is in the situation of solid state hard disc, as shown in Figure 2.
Fig. 2 schematically illustrates according to the particular memory state in the method for the preset state for recovering electronic equipment of the embodiment of the present invention.Be described for solid state hard disc in fig. 2, described address mapping table is for representing the LBA (Logical Block Addressing) (LBA in data, Logical Block Address) with the physical block address (PBA of data, Physics Block Address) between corresponding relation, thus the LBA (Logical Block Addressing) pointed by the operating system of electronic equipment, read-write operation is carried out to the corresponding physical block address of memory storage.In fig. 2; black box below shows protection storage space; described protection storage space refers to the storage block that store data of solid state hard disc under described preset state, and this storage block generally includes multiple memory page, namely in units of storage block, accesses solid state hard disc.When electronic equipment is user-operably and performs the operation such as write, erasing to solid state hard disc, described address mapping table and shared storage block also all correspondingly change, and namely they can change along with the difference such as application installation, operation of electronic equipment.
In addition, above-mentioned particular memory state is only exemplary, and it can not as limitation of the present invention.Such as, when described memory storage is mechanical hard disk, described protection storage space can be the memory sector in mechanical hard disk, correspondingly adopts other mode to carry out addressing to determine the memory location of data.For convenience of explanation, hereinafter for described memory storage for solid state hard disc is described.
When described memory storage is the solid state hard disc comprising multiple storage block, each storage block comprises multiple memory page, the erase operation of solid state hard disc is carried out in units of storage block, and carries out in units of memory page in storage block of the read-write operation of solid state hard disc.Therefore, the memory page (i.e. free page) not preserving data may be there is in each storage block, and the complexity of the management of address mapping table increases, thus reduce the storage efficiency of memory storage.Therefore, expect the complexity of the management taking measures to reduce address mapping table and improve storage efficiency, carrying out exemplary description below in conjunction with Fig. 3.
Fig. 3 be a diagram that the process flow diagram according to the determination particular memory state (S110) in the method for the preset state for recovering electronic equipment of the embodiment of the present invention.As shown in Figure 3, after receiving protection request (S111), described particular memory state can be determined as follows: determine in the storage device have data store each DSB data store block in whether at least two DSB data store block have free page, this free page be wherein have data store each storage block in the memory page (S112) not preserving data; If at least two have in the storage block that data store and there is free page (being in S112), then Data Integration is carried out to described each storage block with data storage, there is free page (S113) until have in the storage block of data storage at one at most; Storage block after integrating is defined as protection storage space (S114).In S113, in each free page, store data, thus save out more storage block.Each storage block having data storage due to these will be protected by as protection storage space; namely no longer it is read and write, the operation such as erasing; so the service efficiency of each protection storage space can be ensured by each operation of Fig. 3, and be also convenient to store in address mapping table.In addition; when determine only one have data store storage block in there is free page or do not have free page be present in each have data store storage block time (no in S112); then do not perform the integrated operation in S113, and directly the current storage block with data storage is defined as protecting storage space.It should be noted that the process flow diagram shown in Fig. 3 is only schematic, when the structure of memory storage is different with way to manage, other operation can also be taked to improve the service efficiency of memory storage.
In S120, retain the described particular memory state of described memory storage, make when described electronic equipment is not in described preset state and operates described memory storage, described particular memory state do not change.Determine the particular memory state of memory storage under described preset state in S110 after, need retain or preserve described particular memory state, to recover the preset state of electronic equipment according to this particular memory state.When memory storage is solid state hard disc, by operating the described particular memory state retaining described memory storage as follows: the address mapping table of described memory storage under described preset state is copied to predeterminable area; Mark to protect it be not wiped free of and write to described protection storage space.Here, ad hoc store the address mapping table of solid state hard disc under described preset state, namely back up this address mapping table, can also the address mapping table of this backup is set to read-only, thus avoid it to be changed due to maloperation.When electronic equipment will be changed described address mapping table by operating; at the enterprising line operate of the address mapping table of current use; and mark to protect it be not wiped free of and write to described protection storage space, namely preserve the running status of solid state hard disc under described preset state.It should be noted that for dissimilar memory storage, the factor involved by its running status is also usually different, can correspondingly take different measures to preserve its running status under described preset state.
In order to help to understand the embodiment of the present invention, be described the reservation (S120) of described particular memory state below in conjunction with Fig. 4.Fig. 4 be a diagram that the process flow diagram according to the reservation particular memory state in the method for the preset state for recovering electronic equipment of the embodiment of the present invention.In the diagram, when will write data in described memory storage when described electronic equipment is not in described preset state (S121); Determine whether the write operation of these data points to the described protection storage space (S122) determined in S110; If described protection storage space (being in S122) is pointed in the write operation of these data, then in described memory storage, determine spare storage space (S123); Write for this memory storage is redirected to described spare storage space (S124); In described spare storage space, write described data, thus do not change the particular memory state (S125) of described memory storage.If the write operation of these data is not point to the described protection storage space (no in S122) determined in S110, then direct to data execution write operation.In addition, step needed for other can also be comprised in the diagram to retain described particular memory state, such as, also can comprise and the address mapping table of described memory storage under described preset state is copied to predeterminable area.For dissimilar memory storage, suitable operation can be taked.
In addition, recent snapshot (Snapshot) technology is used in memory storage and carries out data backup.In brief, snapping technique availablely to copy about of specific data set is complete, and this copies and comprises the reflection of corresponding data certain time point (copying the time point of beginning).Snapshot can be a copy of the data represented by it, also can be a duplicate of data.Therefore, when snapshot functions supported by described memory storage, can create conveniently by described memory storage determination and the reservation (i.e. S110 and S120) that snapshot realizes described particular memory state.Such as, retain in the process of described particular memory state at establishment snapshot, if the storage block in the snapshot created is pointed in the write operation of data, then find idle storage block in the storage device and store the data that will write, and in the address mapping table of current use, write operation is mapped to found free memory blocks, and performs write operation.
In S130, when receiving recovery request, recover the preset state of described electronic equipment based on retained particular memory state.Owing to remaining the particular memory state of memory storage under the preset state of electronic equipment in the step 120, and the application in electronic equipment is installed, use the information such as configuration to be all recorded in the storage device, the preset state of described electronic equipment therefore may be recovered based on retained particular memory state.Exemplarily, this S130 can comprise: the current address mapping table of memory storage is replaced with retained address mapping table; Erase operation is performed to spare storage space.As previously mentioned, this spare storage space is the storage space being written into input after the particular memory state retaining memory storage, wipe this spare storage space then to eliminate by the record operated after the preset state of described electronic equipment, thus enable electronic equipment return to described preset state.
The order of each step described by composition graphs 1, Fig. 3, Fig. 4 is only schematic, can adjust as required in practice.Such as, after determining the address mapping table of described memory storage under described preset state, first described address mapping table can be copied to predeterminable area protection, then the S112 to S114 performed in Fig. 3 determines to protect storage space.
In the technical scheme of the method for the above-mentioned preset state for recovering electronic equipment of the embodiment of the present invention, by retaining the particular memory state of described memory storage under described preset state, and recover the preset state of described electronic equipment based on retained particular memory state, thus while the operational efficiency ensureing electronic equipment, easily electronic equipment can be returned to default state.
In addition, in the method for the aforesaid preset state for recovering electronic equipment, if described electronic equipment performs read-write operation to memory storage when determining the particular memory state of described memory storage under described preset state, then determined particular memory state may have uncertainty, is not even unpredictable.For this problem, in above-described S110, can after receiving protection request, start the dormancy instruction of described electronic equipment, described memory storage is disabled according to dormancy instruction; After described memory storage is disabled the execution of described dormancy instruction terminate before time period in, determine described particular memory state.That is, when the described particular memory state under the preset state of memory storage at electronic equipment will be determined, the operation such as write, erasing for described memory storage is stopped by dormancy instruction, make the described particular memory state of memory storage stablize constant, thus stable particular memory state can be obtained.Alternatively; can also after receiving protection request; restart indication is sent to electronic equipment; in the restart procedure of electronic equipment; the operation such as write, erasing for memory storage is also stopped, thus the Basic Input or Output System (BIOS) of electronic equipment (BIOS) or ad hoc system can be utilized to determine described particular memory state.
Fig. 5 is the block diagram of the memory storage 500 schematically illustrated according to the embodiment of the present invention.This memory storage 500 can be applicable to various electronic equipment, includes but not limited to intelligent telephone set, computing machine, personal digital assistant or data storage server etc.Described electronic equipment needs, after user uses, electronic equipment is returned to preset state.The particular type of electronic equipment is not construed as limiting the invention.This preset state can be arranged by the supvr of electronic equipment, and can be different according to the difference of the function of electronic equipment, hardware configuration etc.
Described memory storage 500 comprises: determining unit 510, for determining the particular memory state of described memory storage under described preset state after receiving protection request; Stick unit 520, for retaining the described particular memory state of described memory storage, makes when described electronic equipment is not in described preset state and operates described memory storage, described particular memory state does not change; Recovery unit 530, for when receiving recovery request, recovers the preset state of described electronic equipment based on retained particular memory state.
The protection request that described determining unit 510 receives is such as sent by its supvr when described electronic equipment is in described preset state, and it is for the preset state of instruction protection electronic equipment, electronic equipment can be returned to this preset state.Type difference along with memory storage is distinguished by the determined memory storage of the determining unit 510 particular memory state under described preset state to some extent.Exemplarily, described particular memory state can comprise the address mapping table of described memory storage under described preset state and the protection storage space storing data in described memory storage.Particular memory state when being solid state hard disc about memory storage, the description can carried out see composition graphs 2.That is, described address mapping table is for representing the corresponding relation between the LBA (Logical Block Addressing) and the physical block address of data of data, and described protection storage space refers to the storage block that store data of solid state hard disc under described preset state.When electronic equipment is user-operably and performs the operation such as write, erasing to solid state hard disc, described address mapping table and shared storage block also all correspondingly change, and namely they can change along with the difference such as application installation, operation of electronic equipment.Above-mentioned particular memory state is only exemplary, and it can not as limitation of the present invention.Such as, when described memory storage is mechanical hard disk, described protection storage space can be the memory sector in mechanical hard disk, correspondingly adopts other mode to carry out addressing to determine the memory location of data.Here main for described memory storage for solid state hard disc is described.
When described memory storage is the solid state hard disc comprising multiple storage block, each storage block comprises multiple memory page, the erase operation of solid state hard disc is carried out in units of storage block, and carries out in units of memory page in storage block of the read-write operation of solid state hard disc.Therefore, may there is the memory page (i.e. free page) not preserving data in each storage block, the complexity of the management of address mapping table increases, and reduces the storage efficiency of memory storage.Described determining unit 510 determines described particular memory state by operation as follows: determine wherein to have in each storage block that data store whether at least two storage blocks have free page, and this free page wherein has the memory page not preserving data in each storage block that data store; If at least two have in the storage block of data storage and there is free page, then Data Integration is carried out to described each storage block with data storage, there is free page until have in the storage block of data storage at one at most; Storage block after integrating is defined as protecting storage space.The free page had in each storage block of data storage, by described integrated operation, is written with input, and saves out more storage block by described determining unit 510.Each storage block having data storage due to these will be protected by as protection storage space; and no longer it is read and write, the operation such as erasing; so the service efficiency of each protection storage space can be ensured by each operation of determining unit 510, and be also convenient to store in address mapping table.In addition; when determining unit 510 determine only one have data store storage block in there is free page or do not have free page be present in each have data store storage block time; then do not perform integrated operation, and directly the current storage block with data storage is defined as protecting storage space.It should be noted that when the structure of memory storage is different with way to manage, determining unit 510 can also take other operation to improve the service efficiency of memory storage.
After determining unit 510 determines the particular memory state of memory storage under described preset state, described stick unit 520 needs retain or preserve described particular memory state, to recover the preset state of electronic equipment according to this particular memory state.When memory storage is solid state hard disc, described stick unit 520 retains described particular memory state by operating as follows: the address mapping table of described memory storage under described preset state is copied to predeterminable area; Mark to protect it be not wiped free of and write to described protection storage space.Here, described stick unit 520 utilizes described predeterminable area ad hoc to store the address mapping table of solid state hard disc under described preset state, namely back up this address mapping table, can also the address mapping table of this backup is set to read-only, thus avoid it to be changed due to maloperation.It should be noted that for dissimilar memory storage, the factor involved by its running status is also usually different, and described stick unit 520 can correspondingly take different measures to retain the running status of memory storage under preset state, i.e. particular memory state.
In order to help to understand the embodiment of the present invention, the following describes when described electronic equipment is not in described preset state and will writes data in described memory storage, how described stick unit retains described particular memory state.Particularly, described stick unit 520 writes data by operating as follows: determine whether the write operation of these data points to described protection storage space; When described protection storage space is pointed in the write operation of these data, in described memory storage, determine spare storage space; Write for this memory storage is redirected to described spare storage space; In described spare storage space, write described data, thus do not change the particular memory state of described memory storage.If the write operation of these data is not point to described protection storage space, then described stick unit 520 directly performs write operation to data.In addition, the address mapping table of described memory storage under described preset state can also be copied to predeterminable area by stick unit 520 described in this.For dissimilar memory storage, described stick unit 520 can take suitable operation to retain described particular memory state.
When snapshot functions supported by described memory storage, can create conveniently by described memory storage determination and the reservation that snapshot realizes described particular memory state.Particularly, described determining unit 510 is by determining described particular memory state for the snapshot creation of described memory storage, and described stick unit 520 is by retaining described particular memory state for the described snapshot creation of described memory storage.Such as, retain in the process of described particular memory state at establishment snapshot, if the storage block in the snapshot created is pointed in the write operation of data, then described stick unit 520 is found idle storage block in the storage device and is stored the data that will write, and in the address mapping table of current use, write operation is mapped to found free memory blocks, and performs write operation.
Described recovery unit 530, when receiving recovery request, recovers the preset state of described electronic equipment based on retained particular memory state.Because described stick unit 520 remains the particular memory state of memory storage under the preset state of electronic equipment, and the application in electronic equipment is installed, use the information such as configuration to be all recorded in the storage device, the preset state of described electronic equipment therefore may be recovered based on retained particular memory state.Exemplarily, described recovery unit 530 is by operating the preset state recovering described electronic equipment as follows: the current address mapping table of memory storage is replaced with retained address mapping table; Erase operation is performed to spare storage space.As previously mentioned, this spare storage space is the storage space being written into input after the particular memory state retaining memory storage, wipe this spare storage space then to eliminate by the record operated after the preset state of described electronic equipment, thus enable electronic equipment return to described preset state.
Alternatively, this memory storage 500 can also comprise forbidden energy unit 540(as shown in the dashed rectangle in Fig. 5), for after receiving dormancy instruction from the operating system of electronic equipment, start the use forbidding this memory storage.Described determining unit 510 can determine described particular memory state when described forbidden energy unit forbids the use of this memory storage, and completes the determination of described particular memory state before the operating system of described electronic equipment terminates to perform described dormancy instruction.If this is because described electronic equipment performs read-write operation to memory storage when determining the particular memory state of described memory storage under described preset state, then determined particular memory state may have uncertainty, is not even unpredictable.This forbidden energy unit 540 can in the process determining particular memory state forbidden storage device be written into, erasing etc., thus stable particular memory state can be obtained.Alternatively; can also after receiving protection request; restart indication is sent to electronic equipment; in the restart procedure of electronic equipment; the operation such as write, erasing for memory storage is also stopped, thus the Basic Input or Output System (BIOS) of electronic equipment (BIOS) or ad hoc system can be utilized to determine the particular memory state of memory storage under preset state.
In the technical scheme of the above-mentioned memory storage of the embodiment of the present invention, by retaining the particular memory state of described memory storage under described preset state, and recover the preset state of described electronic equipment based on retained particular memory state, thus while the operational efficiency ensureing electronic equipment, easily electronic equipment can be returned to default state.
In addition, comprising in the various electronic equipments according to the memory storage of the embodiment of the present invention, also the particular memory state of described memory storage under described preset state can be retained by means of stick unit, and recover the preset state of described electronic equipment based on retained particular memory state via recovery unit, thus while the operational efficiency ensureing electronic equipment, easily electronic equipment can be returned to default state.Therefore, comprise and be also all in open scope of the present invention according to the electronic equipment of the memory storage of the embodiment of the present invention.
In addition, those skilled in the art can be well understood to, and for convenience and simplicity of description, the equipment of foregoing description, the specific works process of unit, with reference to the corresponding process in preceding method embodiment, can not repeat them here.
Those of ordinary skill in the art can recognize, in conjunction with unit and the algorithm steps of each example of embodiment disclosed herein description, can realize with the combination of electronic hardware or computer software and electronic hardware.Professional and technical personnel can use distinct methods to realize described function to each specifically should being used for, but this realization should not thought and exceeds scope of the present invention.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, is anyly familiar with those skilled in the art in the technical scope that the present invention discloses; change can be expected easily or replace, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should described be as the criterion with the protection domain of claim.

Claims (17)

1., for recovering a method for the preset state of electronic equipment, this electronic equipment comprises memory storage, and the method comprises:
After receiving protection request, determine the particular memory state of described memory storage under described preset state;
Retain the described particular memory state of described memory storage, make when described electronic equipment is not in described preset state and operates described memory storage, described particular memory state do not change;
When receiving recovery request, recover the preset state of described electronic equipment based on retained particular memory state.
2. method according to claim 1, wherein, described particular memory state comprises the address mapping table of described memory storage under described preset state and the protection storage space storing data in described memory storage.
3. method according to claim 1, wherein, snapshot functions supported by described memory storage, and the determination of described particular memory state and reservation realize by creating snapshot to described memory storage.
4. method according to claim 2, wherein, the step of the described particular memory state of the described memory storage of described reservation comprises:
The address mapping table of described memory storage under described preset state is copied to predeterminable area;
Mark to protect it be not wiped free of and write to described protection storage space.
5. method according to claim 2, wherein, when described electronic equipment is not in described preset state and will writes data in described memory storage, the step of the described particular memory state of the described memory storage of described reservation comprises:
Determine whether the write operation of these data points to described protection storage space;
If described protection storage space is pointed in the write operation of these data, then in described memory storage, determine spare storage space;
Write for this memory storage is redirected to described spare storage space;
In described spare storage space, write described data, thus do not change the particular memory state of described memory storage.
6. method according to claim 5, wherein, the step recovering the preset state of described electronic equipment based on retained particular memory state comprises:
The current address mapping table of memory storage is replaced with retained address mapping table;
Erase operation is performed to described spare storage space.
7. method according to claim 2, wherein, described memory storage is the solid state hard disc comprising multiple storage block, describedly determines that the step of the particular memory state of described memory storage under described preset state comprises:
Determine wherein to have in each storage block that data store whether at least two storage blocks have free page, this free page wherein has the memory page not preserving data in each storage block that data store;
If at least two have in the storage block of data storage and there is free page, then Data Integration is carried out to described each storage block with data storage, there is free page until have in the storage block of data storage at one at most;
Storage block after integrating is defined as protecting storage space.
8. method according to claim 1, wherein, after receiving protection request, also comprises:
Start the dormancy instruction of described electronic equipment, described memory storage is disabled according to dormancy instruction;
After described memory storage is disabled the execution of described dormancy instruction terminate before time period in, determine described particular memory state.
9. a memory storage, is applied to the electronic equipment with preset state, and described memory storage comprises:
Determining unit, for determining the particular memory state of described memory storage under described preset state after receiving protection request;
Stick unit, for retaining the described particular memory state of described memory storage, makes when described electronic equipment is not in described preset state and operates described memory storage, described particular memory state does not change;
Recovery unit, for when receiving recovery request, recovers the preset state of described electronic equipment based on retained particular memory state.
10. memory storage according to claim 9, wherein, described particular memory state comprises the address mapping table of described memory storage under described preset state and the protection storage space storing data in described memory storage.
11. memory storages according to claim 9, wherein, snapshot functions supported by described memory storage,
Described determining unit by determining described particular memory state for the snapshot creation of described memory storage,
Described stick unit is by retaining described particular memory state for the described snapshot creation of described memory storage.
12. memory storages according to claim 10, wherein, described stick unit retains described particular memory state by operating as follows: the address mapping table of described memory storage under described preset state is copied to predeterminable area; Mark to protect it be not wiped free of and write to described protection storage space.
13. memory storages according to claim 10, wherein, when described electronic equipment is not in described preset state and will writes data in described memory storage, described stick unit writes data by operating as follows: determine whether the write operation of these data points to described protection storage space; When described protection storage space is pointed in the write operation of these data, in described memory storage, determine spare storage space; Write for this memory storage is redirected to described spare storage space; In described spare storage space, write described data, thus do not change the particular memory state of described memory storage.
14. memory storages according to claim 13, wherein, described recovery unit recovers the preset state of described electronic equipment by operating as follows: the current address mapping table of memory storage is replaced with retained address mapping table; Erase operation is performed to spare storage space.
15. memory storages according to claim 10, wherein, described memory storage is the solid state hard disc comprising multiple storage block, described determining unit determines described particular memory state by operating as follows: determine wherein to have in each storage block that data store whether at least two storage blocks have free page, and this free page wherein has the memory page not preserving data in each storage block that data store; If at least two have in the storage block of data storage and there is free page, then Data Integration is carried out to described each storage block with data storage, there is free page until have in the storage block of data storage at one at most; Storage block after integrating is defined as protecting storage space.
16. memory storages according to claim 9, also comprise: forbidden energy unit, for after receiving dormancy instruction from the operating system of electronic equipment, start the use forbidding this memory storage,
Described determining unit determines described particular memory state when described forbidden energy unit forbids the use of this memory storage, and completes the determination of described particular memory state before the operating system of described electronic equipment terminates to perform described dormancy instruction.
17. 1 kinds of electronic equipments, comprise the memory storage according to any one of claim 9-16.
CN201310400098.5A 2013-09-05 2013-09-05 Recover method, storage device and the electronic equipment of the preset state of electronic equipment Active CN104424115B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310400098.5A CN104424115B (en) 2013-09-05 2013-09-05 Recover method, storage device and the electronic equipment of the preset state of electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310400098.5A CN104424115B (en) 2013-09-05 2013-09-05 Recover method, storage device and the electronic equipment of the preset state of electronic equipment

Publications (2)

Publication Number Publication Date
CN104424115A true CN104424115A (en) 2015-03-18
CN104424115B CN104424115B (en) 2018-06-01

Family

ID=52973150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310400098.5A Active CN104424115B (en) 2013-09-05 2013-09-05 Recover method, storage device and the electronic equipment of the preset state of electronic equipment

Country Status (1)

Country Link
CN (1) CN104424115B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106294007A (en) * 2016-08-05 2017-01-04 联想(北京)有限公司 A kind of data reconstruction method and device
CN108367154A (en) * 2015-12-14 2018-08-03 美敦力公司 Implantable medical device with the scheme for managing data storage
CN109391743A (en) * 2017-08-09 2019-02-26 柯尼卡美能达株式会社 Compounding machine, method for restarting and recording medium
CN109471754A (en) * 2018-10-31 2019-03-15 深信服科技股份有限公司 Backup method, device, equipment and computer readable storage medium
CN109525743A (en) * 2017-09-20 2019-03-26 富士施乐株式会社 Application apparatus, image processing equipment and methods for using them

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050201177A1 (en) * 2004-03-12 2005-09-15 Renesas Technology Corp. Nonvolatile memory apparatus
CN1936866A (en) * 2006-08-18 2007-03-28 福昭科技(深圳)有限公司 Flash memory body storing mechanism with data restoring function
CN101667161A (en) * 2008-09-02 2010-03-10 联想(北京)有限公司 Method and device for protecting data of storage device and computer system
CN101840364A (en) * 2010-01-29 2010-09-22 成都市华为赛门铁克科技有限公司 Method for recovering data and storage device thereof
CN102207905A (en) * 2010-03-30 2011-10-05 群联电子股份有限公司 System recovery method, storage media controller and storage system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050201177A1 (en) * 2004-03-12 2005-09-15 Renesas Technology Corp. Nonvolatile memory apparatus
CN1936866A (en) * 2006-08-18 2007-03-28 福昭科技(深圳)有限公司 Flash memory body storing mechanism with data restoring function
CN101667161A (en) * 2008-09-02 2010-03-10 联想(北京)有限公司 Method and device for protecting data of storage device and computer system
CN101840364A (en) * 2010-01-29 2010-09-22 成都市华为赛门铁克科技有限公司 Method for recovering data and storage device thereof
CN102207905A (en) * 2010-03-30 2011-10-05 群联电子股份有限公司 System recovery method, storage media controller and storage system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108367154A (en) * 2015-12-14 2018-08-03 美敦力公司 Implantable medical device with the scheme for managing data storage
CN108367154B (en) * 2015-12-14 2021-10-29 美敦力公司 Implantable medical device with scheme for managing data storage
CN106294007A (en) * 2016-08-05 2017-01-04 联想(北京)有限公司 A kind of data reconstruction method and device
CN106294007B (en) * 2016-08-05 2020-03-24 联想(北京)有限公司 Data recovery method and device
CN109391743A (en) * 2017-08-09 2019-02-26 柯尼卡美能达株式会社 Compounding machine, method for restarting and recording medium
CN109525743A (en) * 2017-09-20 2019-03-26 富士施乐株式会社 Application apparatus, image processing equipment and methods for using them
CN109471754A (en) * 2018-10-31 2019-03-15 深信服科技股份有限公司 Backup method, device, equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN104424115B (en) 2018-06-01

Similar Documents

Publication Publication Date Title
US10235066B1 (en) Journal destage relay for online system checkpoint creation
CN108984335B (en) Method and system for backing up and restoring data
US8069191B2 (en) Method, an apparatus and a system for managing a snapshot storage pool
US8166247B2 (en) Data vaulting in emergency shutdown
US9501231B2 (en) Storage system and storage control method
US8464010B2 (en) Apparatus and method for data backup
JP4961319B2 (en) A storage system that dynamically allocates real areas to virtual areas in virtual volumes
US9335931B2 (en) System and method for making snapshots of storage devices
JP6064608B2 (en) Storage device, backup program, and backup method
US9354907B1 (en) Optimized restore of virtual machine and virtual disk data
US20090216973A1 (en) Computer system, storage subsystem, and data management method
EP2425344B1 (en) Method and system for system recovery using change tracking
US10572184B2 (en) Garbage collection in data storage systems
KR20090012821A (en) Method and apparatus for controlling i/o to optimize flash memory
US9524215B1 (en) Systems and methods for managing virtual machine backups
CN104424115A (en) Method for restoring preset status of electronic device, memory device and electronic device
CN106294007B (en) Data recovery method and device
CN114556310A (en) Garbage collection in a data storage system
JP5284604B2 (en) Method, system and computer program for storing transient state information
CN103176920A (en) Nor flash power down protection method and Nor flash power down protection device
CN104915265A (en) Data backup method and electronic equipment
US9367457B1 (en) Systems and methods for enabling write-back caching and replication at different abstraction layers
CN101916234A (en) Information maintenance method and system of storage equipment
US20100223442A1 (en) Computer system and data erasing method
KR101460452B1 (en) Apparatus of generating snapshot image based on hibernation and method of the same

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant