CN104424115B - Recover method, storage device and the electronic equipment of the preset state of electronic equipment - Google Patents
Recover method, storage device and the electronic equipment of the preset state of electronic equipment Download PDFInfo
- Publication number
- CN104424115B CN104424115B CN201310400098.5A CN201310400098A CN104424115B CN 104424115 B CN104424115 B CN 104424115B CN 201310400098 A CN201310400098 A CN 201310400098A CN 104424115 B CN104424115 B CN 104424115B
- Authority
- CN
- China
- Prior art keywords
- storage device
- state
- electronic equipment
- storage
- data
- 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
Links
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Provide a kind of method, storage device and the electronic equipment including the storage device of the preset state for being used to recover electronic equipment.The method of the preset state for recovering electronic equipment includes:After protection request is received, particular memory state of the storage device under the preset state of electronic equipment is determined;Retain the particular memory state of the storage device so that when the electronic equipment is not at the preset state and operates the storage device, the particular memory state do not change;When receiving recovery request, recover the preset state of the electronic equipment based on the particular memory state retained.In technical solution according to embodiments of the present invention, electronic equipment easily can be restored to default state while the operational efficiency of electronic equipment is ensured.
Description
Technical field
The present invention relates to information technology field, more particularly, to a kind of preset state for being used to recover electronic equipment
Method, storage device and the electronic equipment including the storage device.
Background technology
With the development of information technology, there are various application programs to meet the use demand of user.However,
The application program installed in the electronic equipment of computer, personal digital assistant etc. occupies the resource of electronic equipment, example
Memory space and memory are such as occupied, this may cause the operational efficiency of electronic equipment to reduce.In addition, different users usually has
There is different use demands, again by second user in use, some application programs pair after the first user uses electronic equipment
May be extra for second user.Therefore, in some electronic equipments, such as electronics in the environment such as Internet bar, teaching is set
, it is necessary to which electronic equipment to be restored to original or predetermined use state after user's use in standby, set so as to improve electronics
Standby service efficiency, and the potential hazard for avoiding user that from may being brought when loading various application programs.
At present, using sandbox(Sandbox)Technology realizes the recovery of electronic equipment.Sandbox technology is mainly from electronics
An idle specific region is isolated in the memory of equipment, times carried out in the electronic device is performed in the specific region
What is operated, and when closing sandbox, the specific region is cancelled, so as to recover.The sandbox technology mainly utilizes electronic equipment
Management program realize, including isolating the specific region, intercept and capture the operation of storage device and redirected, this
The operating load of the operating system of electronic equipment is substantially increased, its operational efficiency is reduced, and is when electronic equipment
Making electronic equipment during system upgrading, there are serious compatibility issues.
It is therefore desirable to be able to easily electronic equipment is restored to while the service efficiency for not reducing electronic equipment pre-
Fixed state.
The content of the invention
An embodiment of the present invention provides for recovering the method for the preset state of electronic equipment, storage device and deposited including this
Electronic equipment can be easily restored to pre- by the electronic equipment of storage device while the operational efficiency of electronic equipment is ensured
If state.
On the one hand, a kind of method for the preset state for being used to recover electronic equipment is provided, which includes storage
Device, this method include:After protection request is received, particular memory of the storage device under the preset state is determined
State;Retain the particular memory state of the storage device so that be not at the preset state in the electronic equipment
And when operating the storage device, the particular memory state do not change;It is specific based on what is retained when receiving recovery request
Storage state recovers the preset state of the electronic equipment.
Described in the method for the preset state for recovering electronic equipment, the particular memory state to may include described deposit
The protection memory space for being stored with data in address mapping table and the storage device of the storage device under the preset state.
Described in the method for the preset state for recovering electronic equipment, the storage device can to support snapshot functions,
The particular memory state determines and retains to realize by creating snapshot to the storage device.
Described in the method for the preset state for recovering electronic equipment, the spy for retaining the storage device
The step of determining storage state may include:Address mapping table of the storage device under the preset state is copied into preset areas
Domain;The protection memory space is marked to protect it from being wiped free of and write.
Described in the method for the preset state for recovering electronic equipment, when the electronic equipment be not at it is described default
State and when data are write in the storage device, the step of the particular memory state for retaining the storage device
Suddenly may include:Determine whether the write operation of the data is directed toward the protection memory space;If the write operation of the data refers to
To the protection memory space, then spare storage space is determined in the storage device;It will be for the write-in of the storage device
It is re-introduced into the spare storage space;The data are write in the spare storage space, so as to not change described deposit
The particular memory state of storage device.
Described in the method for the preset state for recovering electronic equipment, based on the particular memory state retained come extensive
The step of preset state of the multiple electronic equipment, may include:The current address mapping table of storage device is replaced with and is retained
Address mapping table;Erasing operation is performed to spare storage space.
Described in the method for the preset state for recovering electronic equipment, the storage device to be to include multiple memory blocks
Solid state disk, described the step of determining particular memory state of the storage device under the preset state may include:Really
In fixed each memory block that wherein there are data to store whether at least two memory blocks with free page, which is wherein to have
There is each storage that data store memory page in the block without preserving data;If at least two have the storage of data storage
There are free page in block, then Data Integration is carried out to each memory block with data storage, until at most in a tool
Have data store memory block in there are free pages;Memory block after integration is determined as to protect memory space.
Described in the method for the preset state for recovering electronic equipment, after protection request is received, may also include:
Start the dormancy instruction of the electronic equipment, the storage device is according to dormancy instruction and disabled;In the storage device quilt
In period before the execution of the dormancy instruction terminates after disabling, the particular memory state is determined.
On the other hand, a kind of storage device is provided, applied to the electronic equipment with preset state, the storage device
Including:Determination unit, for determining that specific under the preset state of the storage device is deposited after protection request is received
Storage state;Stick unit, for retaining the particular memory state of the storage device so that do not locate in the electronic equipment
When the preset state operates the storage device, the particular memory state do not change;Recovery unit, for receiving
During recovery request, recover the preset state of the electronic equipment based on the particular memory state retained.
In the storage device, the particular memory state may include the storage device under the preset state
The protection memory space for being stored with data in address mapping table and the storage device.
In the storage device, the storage device can support snapshot functions, and the determination unit can be by being directed to
The snapshot for stating storage device creates to determine the particular memory state, and the stick unit can be by being directed to the storage device
The snapshot create and retain the particular memory state.
In the storage device, the stick unit can retain the particular memory state by operating as follows:It will
Address mapping table of the storage device under the preset state copies to predeterminable area;The protection memory space is carried out
It marks to protect it from being wiped free of and write.
In the storage device, when the electronic equipment is not at the preset state and will be in the storage device
When writing data, the stick unit can write data by operating as follows:Determine whether the write operation of the data is directed toward
The protection memory space;When the protection memory space is directed toward in the write operation of the data, in the storage device really
Determine spare storage space;The spare storage space will be re-introduced into for the write-in of the storage device;It spare is deposited described
Storage writes the data in space, so as to not change the particular memory state of the storage device.
In the storage device, the recovery unit can recover the default shape of the electronic equipment by operating as follows
State:The current address mapping table of storage device is replaced with into retained address mapping table;Wiping is performed to spare storage space
Division operation.
In the storage device, the storage device can be the solid state disk for including multiple memory blocks, described to determine
Unit can determine the particular memory state by operating as follows:It is in definite each memory block that wherein there are data to store
No at least two memory block has free page, which is wherein to have each storage of data storage is in the block not preserve
The memory page of data;If at least two have in the memory block of data storage there are free page, deposited to described with data
Each memory block of storage carries out Data Integration, until there are free pages in the memory block at most having data storage at one;It will
Memory block after integration is determined as protecting memory space.
In the storage device, it may also include:Forbidden energy unit, for receiving dormancy from the operating system of electronic equipment
After instruction, start to forbid the use of the storage device.The determination unit can forbid the storage to fill in the forbidden energy unit
It determines the particular memory state during use put, and terminates to perform the dormancy and refer in the operating system of the electronic equipment
Determining for the particular memory state is completed before order.
On the other hand, a kind of electronic equipment is provided, including any one in storage device as described above.
In the method for the above-mentioned preset state for being used to recover electronic equipment of the embodiment of the present invention, storage device and including this
In the electronic equipment of storage device, by retaining particular memory state of the storage device under the preset state, and base
Recover the preset state of the electronic equipment in the particular memory state retained, so as to ensure the fortune of electronic equipment
Electronic equipment is easily restored to default state while line efficiency.
Description of the drawings
It in order to illustrate the technical solution of the embodiments of the present invention more clearly, below will be in embodiment or description of the prior art
Required attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some realities of the present invention
Example is applied, it for those of ordinary skill in the art, without creative efforts, can also be according to these attached drawings
Obtain other attached drawings.
Fig. 1 is to schematically illustrate the method for being used to recover the preset state of electronic equipment according to embodiments of the present invention
Flow chart;
Fig. 2 is schematically illustrated in the method for the preset state for recovering electronic equipment according to embodiments of the present invention
Particular memory state;
Fig. 3 is to illustrate to determine in the method for the preset state for recovering electronic equipment according to embodiments of the present invention
The flow chart of particular memory state;
Fig. 4 is the reservation illustrated in the method for the preset state for recovering electronic equipment according to embodiments of the present invention
The flow chart of particular memory state;
Fig. 5 is the block diagram for schematically illustrating storage device according to embodiments of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is part of the embodiment of the present invention, instead of all the embodiments.
Fig. 1 is to schematically illustrate the method for being used to recover the preset state of electronic equipment according to embodiments of the present invention
100 flow chart.
Information processing method according to embodiments of the present invention can be applied to various electronic equipments, include but not limited to intelligence electricity
Phone, computer, personal digital assistant or data storage server etc..As used in Internet bar, teaching exemplified by the electronic equipment
It waits in the electronic equipment in environment, it is necessary to which electronic equipment is restored to preset state after user's use.The tool of electronic equipment
Body type is not construed as limiting the invention.The preset state can be set by the manager of electronic equipment, be, for example, electronics
The application installation condition of the basic use demand that disclosure satisfy that user of equipment, and can be according to electronic equipment function, hardware
Configuration etc. it is different and different.
The method 100 for being used for the preset state for recovering electronic equipment includes:After protection request is received, determine described
Particular memory state of the storage device under the preset state(S110);Retain the particular memory shape of the storage device
State so that when the electronic equipment is not at the preset state and operates the storage device, the particular memory state
Do not change(S120);When receiving recovery request, recover the pre- of the electronic equipment based on the particular memory state retained
If state(S130).
In S110, after protection request is received, determine that specific under the preset state of the storage device is deposited
Storage state.The protection request is, for example, to be sent when the electronic equipment is in the preset state by its manager, is used for
The preset state of instruction protection electronic equipment, so as to electronic equipment is restored to the preset state.
When the type difference of the storage device, the concrete meaning of the particular memory state under the preset state
Also will change.As an example, the particular memory state may include that address of the storage device under the preset state is reflected
The protection memory space for being stored with data in firing table and the storage device, it is solid that this, which is typically applied in the storage device,
In the case of state hard disk, as shown in Figure 2.
Fig. 2 is schematically illustrated in the method for the preset state for recovering electronic equipment according to embodiments of the present invention
Particular memory state.It is illustrated in fig. 2 by taking solid state disk as an example, described address mapping table is used to represent the logic in data
Block address(LBA, Logical Block Address)With the physical block address of data(PBA, Physics Block
Address)Between correspondence, so as to logical block address according to pointed by the operating system of electronic equipment, storage is filled
The correspondence physical block address put is written and read operation.The black box in face shows protection memory space in figure 2 the lower, described
Protection memory space refers to the memory block that is stored with data of the solid state disk under the preset state, which usually wraps
Multiple memory pages are included, i.e., solid state disk is accessed in units of memory block.When electronic equipment is user-operably and to solid state disk
Write-in, erasing are performed when operations, described address mapping table and occupied memory block also all correspondingly change, i.e., they can be with
It the differences such as application installation, the operation of electronic equipment and changes.
In addition, what above-mentioned particular memory state was merely exemplary, it cannot function as limitation of the present invention.For example,
When the storage device is mechanical hard disk, the protection memory space can be the storage sector in mechanical hard disk, correspondingly
It is addressed to determine the storage location of data using other modes.For convenience of description, hereinafter with the storage device
To be described exemplified by solid state disk.
In the case of the storage device is to include the solid state disk of multiple memory blocks, each memory block includes multiple deposit
The page is stored up, the erasing operation of solid state disk is carried out in units of memory block, and to the read-write operation of solid state disk with memory block
In memory page be unit carry out.Therefore, there may be the memory pages of no preservation data in each memory block(It is i.e. idle
Page), and the complexity of the management of address mapping table increases, so as to reduce the storage efficiency of storage device.Therefore, it is desirable to it adopts
Measure is taken to reduce the complexity of the management of address mapping table and improve storage efficiency, exemplary description is carried out with reference to Fig. 3.
Fig. 3 is to illustrate to determine in the method for the preset state for recovering electronic equipment according to embodiments of the present invention
Particular memory state(S110)Flow chart.As shown in figure 3, receiving protection request(S111)Afterwards, institute can be determined as follows
State particular memory state:Determine in the storage device have data storage each DSB data store block in whether at least two number
There is free page according to memory block, which is wherein to have each storage depositing without preservation data in the block of data storage
Store up page(S112);If at least two memory blocks with data storage, there are free pages(In S112 is), then to described
Each memory block with data storage carries out Data Integration, exists until in the memory block at most having data storage at one
Free page(S113);Memory block after integration is determined as to protect memory space(S114).In S113, in each free page
Data are stored, so as to save out more memory blocks.Since these each memory blocks with data storage will be by as protection
Memory space protects, i.e., the operations such as no longer reads and writes, wipes to it, so can ensure by each operation of Fig. 3
The service efficiency of each protection memory space, and also allow for being stored in address mapping table.In addition, only exist when definite
It is present in each depositing with data storage with free page or no free page in one memory block with data storage
When storing up block(It is no in S112), then the integrated operation in S113 is not performed, and directly by the current storage with data storage
Block is determined as protecting memory space.It should be noted that flow chart shown in Fig. 3 is only schematical, when storage device structure and
Way to manage is not at the same time it can also taking other operations to improve the service efficiencies of storage device.
In S120, retain the particular memory state of the storage device so that be not in the electronic equipment
The preset state and when operating the storage device, the particular memory state do not change.Storage dress is determined in S110
It puts after the particular memory state under the preset state, it is necessary to retain or preserve the particular memory state, so as to basis
The particular memory state is come the preset state of recovering electronic equipment.It, can be by such as in the case of storage device is solid state disk
The lower particular memory state for operating to retain the storage device:By ground of the storage device under the preset state
Location mapping table copies to predeterminable area;The protection memory space is marked to protect it from being wiped free of and write.Here,
Address mapping table of the solid state disk under the preset state is technically stored, that is, backs up the address mapping table, it can also should
The address mapping table of backup is arranged to read-only, so as to which it be avoided to be changed due to maloperation.When electronic equipment is wanted by operation
Change described address mapping table, operated in currently used address mapping table, and to it is described protection memory space into
Line flag preserves operating status of the solid state disk under the preset state to protect it from being wiped free of and write.It should be noted that
For different types of storage device, the factor involved by operating status is also typically different, and can correspondingly be taken different
Measure preserves its operating status under the preset state.
In order to help to understand the embodiment of the present invention, the reservation of the particular memory state is illustrated with reference to Fig. 4
(S120).Fig. 4 is the reservation illustrated in the method for the preset state for recovering electronic equipment according to embodiments of the present invention
The flow chart of particular memory state.In Fig. 4, when the electronic equipment is not at the preset state and will be in the storage dress
When putting middle write-in data(S121);It is empty to determine whether the write operation of the data is directed toward the protection storage determined in S110
Between(S122);If the protection memory space is directed toward in the write operation of the data(In S122 is), then in the storage dress
Spare storage space is determined in putting(S123);The spare storage space will be re-introduced into for the write-in of the storage device
(S124);The data are write in the spare storage space, so as to not change the particular memory state of the storage device
(S125).If the write operation of the data is not directed to the protection memory space determined in S110(In S122
It is no), then write operation directly is performed to data.It in addition, in Fig. 4 can also be including other required steps to retain
Particular memory state is stated, copies to address mapping table of the storage device under the preset state for example, may also include
Predeterminable area.For different types of storage device, suitable operation can be taken.
In addition, recent snapshot(Snapshot)Technology, which is used in storage device, carries out data backup.In short, snapshot
Technology is a completely available duplication on specified data acquisition system, which includes corresponding data at some time point(It replicates
The time point of beginning)Image.Snapshot can be a duplication of a copy of the data represented by it or data
Product.It therefore, can be fast conveniently by being created to the storage device in the case where the storage device supports snapshot functions
According to come realize the particular memory state determine and retain(That is S110 and S120).For example, retain creating snapshot described
During particular memory state, if the memory block in created snapshot is directed toward in the write operation of data, filled in storage
The middle memory block for finding the free time is put to store the data to be write, and by write operation in currently used address mapping table
Found free memory blocks are mapped to, and perform write operation.
In S130, when receiving recovery request, recover the electronic equipment based on the particular memory state retained
Preset state.Due to remaining particular memory state of the storage device under the preset state of electronic equipment in the step 120,
It and application installation in electronic equipment, being all recorded in the storage device using information such as configurations, it is thus possible to based on being retained
Particular memory state recover the preset state of the electronic equipment.As an example, the S130 may include:By storage device
Current address mapping table replaces with retained address mapping table;Erasing operation is performed to spare storage space.As previously mentioned,
The spare storage space is the memory space that input is written into after the particular memory state of storage device is retained, and it is standby to wipe this
The record operated after the preset state of the electronic equipment is then eliminated with memory space, so that electronic equipment can
It is restored to the preset state.
Order with reference to the described each step of Fig. 1, Fig. 3, Fig. 4 is only schematical, in practice can basis
It needs to be adjusted.For example, after address mapping table of the storage device under the preset state is determined, it can be first
Described address mapping table first is copied to predeterminable area to protect, then performs the S112 to S114 in Fig. 3 to determine protection
Memory space.
In the above-mentioned for recovering in the technical solution of the method for the preset state of electronic equipment of the embodiment of the present invention, pass through
Retain particular memory state of the storage device under the preset state, and based on the particular memory state retained come extensive
The preset state of the multiple electronic equipment, so as to easily set electronics while the operational efficiency of electronic equipment is ensured
It is standby to be restored to default state.
In addition, in the method for being previously described for recovering the preset state of electronic equipment, if determining the storage dress
The electronic equipment performs read-write operation to storage device when putting the particular memory state under the preset state, then institute
Definite particular memory state may have uncertainty, even not be unpredictable.It is described above for this problem
In S110, the dormancy instruction of the electronic equipment after protection request is received, can be started, the storage device is according to dormancy
Instruction and it is disabled;In period before the execution of the dormancy instruction terminates after the storage device is disabled, really
The fixed particular memory state.It is that is, described specific under preset state of the storage device to be determined in electronic equipment
During storage state, stopped by dormancy instruction for operations such as write-in, the erasings of the storage device so that the institute of storage device
State particular memory state stablize it is constant, so as to obtain stable particular memory state.Alternatively, can also receive
After protection request, restarting instruction is sent to electronic equipment, in the restarting procedure of electronic equipment, is filled for storage
The operations such as write-in, the erasing put also are stopped, so as to utilize the basic input output system of electronic equipment(BIOS)Or specially
If system determine the particular memory state.
Fig. 5 is the block diagram for schematically illustrating storage device 500 according to embodiments of the present invention.The storage device 500 can
Applied to various electronic equipments, include but not limited to intelligent telephone set, computer, personal digital assistant or data storage service
Device etc..Electronic equipment is restored to preset state by the electronic equipment needs after user's use.The concrete kind of electronic equipment
Type is not construed as limiting the invention.The preset state can be set by the manager of electronic equipment, and can be set according to electronics
Standby function, hardware configuration etc. it is different and different.
The storage device 500 includes:Determination unit 510, for determining the storage dress after protection request is received
Put the particular memory state under the preset state;Stick unit 520 specific is deposited for retaining the described of the storage device
Storage state so that when the electronic equipment is not at the preset state and operates the storage device, the particular memory
State does not change;Recovery unit 530, for when receiving recovery request, based on the particular memory state retained to recover
State the preset state of electronic equipment.
The protection request that the determination unit 510 is received is, for example, when the electronic equipment is in the preset state
It is sent by its manager, is used to instruct the preset state of protection electronic equipment, is preset so as to electronic equipment is restored to this
State.Particular memory state of the storage device determined by determination unit 510 under the preset state will be with storage device
Type it is different and otherwise varied.As an example, the particular memory state may include the storage device in the default shape
The protection memory space for being stored with data in address mapping table and the storage device under state.It is solid-state on storage device
Particular memory state during hard disk may refer to combine the description that Fig. 2 is carried out.That is, described address mapping table is used for table
Show the correspondence between the logical block address of data and the physical block address of data, the protection memory space refers to solid
The memory block that is stored with data of the state hard disk under the preset state.Solid state disk is held when electronic equipment is user-operably
Row write enters, wipes when operations, and described address mapping table and occupied memory block also all correspondingly change, i.e., they can be with
Electronic equipment changes using differences such as installation, operations.What above-mentioned particular memory state was merely exemplary, it cannot make
For limitation of the present invention.For example, when the storage device is mechanical hard disk, the protection memory space can be mechanical hard
Storage sector in disk is correspondingly addressed to determine the storage location of data using others mode.Here mainly with institute
Storage device is stated to be described exemplified by solid state disk.
In the case of the storage device is to include the solid state disk of multiple memory blocks, each memory block includes multiple deposit
The page is stored up, the erasing operation of solid state disk is carried out in units of memory block, and to the read-write operation of solid state disk with memory block
In memory page be unit carry out.Therefore, there may be the memory pages of no preservation data in each memory block(It is i.e. idle
Page), the complexity of the management of address mapping table increases, and reduces the storage efficiency of storage device.The determination unit 510
The particular memory state can be determined by operating as follows:Whether extremely to determine in each memory block wherein with data storage
Few two memory blocks have free page, which is that each storage that wherein there are data to store is in the block without preserving data
Memory page;If at least two have in the memory block of data storage there are free page, have what data stored to described
Each memory block carries out Data Integration, until there are free pages in the memory block at most having data storage at one;It will integrate
Memory block afterwards is determined as protecting memory space.The determination unit 510 is by the integrated operation, by what is stored with data
Each storage free page in the block is written with input, and saves out more memory blocks.Since these are with each of data storage
A memory block will be protected as protection memory space, and the operations such as no longer read and write, wipes to it, so passing through
Each operation of determination unit 510 can ensure the service efficiency of each protection memory space, and also allow in address of cache
It is stored in table.In addition, when determination unit 510 was determined in the memory block only stored at one with data with the free time
When page or no free page are present in each memory block that there are data to store, then integrated operation is not performed, and directly ought
Preceding there is the memory block of data storage to be determined as protecting memory space.It should be noted that when the structure and way to manage of storage device
When different, determination unit 510 can also take other operations to improve the service efficiency of storage device.
After determination unit 510 determines particular memory state of the storage device under the preset state, the guarantor
Unit 520 is stayed to need to retain or preserve the particular memory state, to recover electronic equipment according to the particular memory state
Preset state.In the case of storage device is solid state disk, the stick unit 520 can be by operating as follows to retain
State particular memory state:Address mapping table of the storage device under the preset state is copied into predeterminable area;To institute
Protection memory space is stated to be marked to protect it from being wiped free of and write.Here, the stick unit 520 is preset using described
Region technically stores address mapping table of the solid state disk under the preset state, that is, backs up the address mapping table, may be used also
The address mapping table of the backup is arranged to read-only, so as to which it be avoided to be changed due to maloperation.It should be noted that for difference
The storage device of type, the factor involved by operating status are also typically different, and the stick unit 520 can correspondingly be taken
Different measures retains operating status of the storage device under preset state, i.e. particular memory state.
In order to help to understand the embodiment of the present invention, description below is not at the preset state and wants when the electronic equipment
When data are write in the storage device, how the stick unit retains the particular memory state.Specifically, the guarantor
Stay unit 520 that can write data by operating as follows:Determine whether the write operation of the data is directed toward the protection storage sky
Between;When the protection memory space is directed toward in the write operation of the data, spare storage space is determined in the storage device;
The spare storage space will be re-introduced into for the write-in of the storage device;In the spare storage space described in write-in
Data, so as to not change the particular memory state of the storage device.If the write operation of the data is not directed to the guarantor
Memory space is protected, then the stick unit 520 directly performs write operation to data.In addition, the stick unit 520 may be used also
Address mapping table of the storage device under the preset state is copied to predeterminable area.For different types of storage
Device, the stick unit 520 can take suitable operation to retain the particular memory state.
It, can be fast conveniently by being created to the storage device in the case where the storage device supports snapshot functions
According to come realize the particular memory state determine and retain.Specifically, the determination unit 510 can be by being directed to the storage
The snapshot of device creates to determine the particular memory state, and the stick unit 520 is by being directed to the institute of the storage device
Snapshot is stated to create to retain the particular memory state.For example, retain the process of the particular memory state creating snapshot
In, if the memory block in created snapshot is directed toward in the write operation of data, the stick unit 520 is in the storage device
Idle memory block is found to store the data to be write, and maps write operation in currently used address mapping table
To the free memory blocks found, and perform write operation.
The recovery unit 530 recovers the electricity based on the particular memory state retained when receiving recovery request
The preset state of sub- equipment.Since the stick unit 520 remains spy of the storage device under the preset state of electronic equipment
Determine storage state, and the application in electronic equipment is installed, is all recorded in the storage device using information such as configurations, it is thus possible to
Recover the preset state of the electronic equipment based on the particular memory state retained.As an example, the recovery unit 530
It can recover the preset state of the electronic equipment by operating as follows:The current address mapping table of storage device is replaced with
The address mapping table retained;Erasing operation is performed to spare storage space.As previously mentioned, the spare storage space is to retain
The memory space of input is written into after the particular memory state of storage device, the spare storage space is wiped and then eliminates in institute
The record operated after the preset state of electronic equipment is stated, so that electronic equipment can be restored to the preset state.
Optionally, which can also include forbidden energy unit 540(As shown in the dashed rectangle in Fig. 5), it is used for
After dormancy instruction is received from the operating system of electronic equipment, start to forbid the use of the storage device.The determination unit
510 can determine the particular memory state when the forbidden energy unit forbids the use of the storage device, and in the electricity
The operating system of sub- equipment terminates to complete determining for the particular memory state before performing the dormancy instruction.This is because such as
Fruit electronic equipment when determining particular memory state of the storage device under the preset state is filling storage
Execution read-write operation is put, then identified particular memory state there may be uncertainty, even not be unpredictable.The taboo
Energy unit 540 can forbid storage device to be written into, wipe during definite particular memory state, so as to obtain
Stable particular memory state.Alternatively, restarting can also be sent to electronic equipment and referred to after protection request is received
Order, in the restarting procedure of electronic equipment, the operations such as write-in, erasing for storage device are also stopped, so as to
Utilize the basic input output system of electronic equipment(BIOS)Or ad hoc system determines the storage device under preset state
Particular memory state.
In the technical solution of the above-mentioned storage device of the embodiment of the present invention, by retaining the storage device described pre-
If the particular memory state under state, and the default shape of the electronic equipment is recovered based on the particular memory state retained
State, so as to which electronic equipment easily is restored to default state while the operational efficiency of electronic equipment is ensured.
In addition, in the various electronic equipments including storage device according to embodiments of the present invention, it is also possible by means protect
Unit is stayed to retain particular memory state of the storage device under the preset state, and is based on being protected via recovery unit
The particular memory state stayed recovers the preset state of the electronic equipment, so as to ensure the operational efficiency of electronic equipment
While electronic equipment is easily restored to default state.Therefore, including storage device according to embodiments of the present invention
Electronic equipment is also in disclosure of the invention scope.
In addition, it is apparent to those skilled in the art that, for convenience and simplicity of description, foregoing description
Equipment, the specific work process of unit, may be referred to the corresponding process in preceding method embodiment, details are not described herein.
Those of ordinary skill in the art may realize that each exemplary lists described with reference to the embodiments described herein
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.Professional technician
Described function can be realized using distinct methods to each specific application, but this realization is it is not considered that exceed
The scope of the present invention.
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can readily occur in change or replacement, should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention described should be subject to the protection scope in claims.
Claims (17)
1. a kind of for recovering the method for the preset state of electronic equipment, which includes storage device, and this method includes:
After protection request is received, particular memory state of the storage device under the preset state is determined;
Retain the particular memory state of the storage device so that be not at the preset state in the electronic equipment and
When operating the storage device, the particular memory state do not change;
When receiving recovery request, recover the preset state of the electronic equipment based on the particular memory state retained.
2. the method according to claim 1, wherein, the particular memory state includes the storage device in the preset state
Under address mapping table and the storage device in the protection memory space for being stored with data.
3. the method according to claim 1, wherein, the storage device supports snapshot functions, and the particular memory state is really
Fixed and reservation is realized by creating snapshot to the storage device.
4. method according to claim 2, wherein, it is described retain the storage device the particular memory state the step of wrap
It includes:
Address mapping table of the storage device under the preset state is copied into predeterminable area;
The protection memory space is marked to protect it from being wiped free of and write.
5. method according to claim 2, wherein, when the electronic equipment is not at the preset state and will be in the storage
When data are write in device, it is described retain the storage device the particular memory state the step of include:
Determine whether the write operation of the data is directed toward the protection memory space;
If the protection memory space is directed toward in the write operation of the data, determine that slack storage is empty in the storage device
Between;
The spare storage space will be re-introduced into for the write-in of the storage device;
The data are write in the spare storage space, so as to not change the particular memory state of the storage device.
6. method according to claim 5, wherein, recover the pre- of the electronic equipment based on the particular memory state retained
If the step of state, includes:
The current address mapping table of storage device is replaced with into retained address mapping table;
Erasing operation is performed to the spare storage space.
7. method according to claim 2, wherein, the storage device is the solid state disk for including multiple memory blocks, described true
The step of determining particular memory state of the storage device under the preset state includes:
Determine whether at least two memory blocks are with free page in each memory block that wherein there are data to store, which is
Wherein there is each storage memory page in the block without preserving data of data storage;
If at least two have there are free page in the memory block of data storage, to each the depositing with data storage
It stores up block and carries out Data Integration, until there are free pages in the memory block at most having data storage at one;
Memory block after integration is determined as to protect memory space.
8. the method according to claim 1, wherein, after protection request is received, further include:
Start the dormancy instruction of the electronic equipment, the storage device is according to dormancy instruction and disabled;
In period before the execution of the dormancy instruction terminates after the storage device is disabled, determine described specific
Storage state.
9. a kind of storage device, applied to the electronic equipment with preset state, the storage device includes:
Determination unit, for determining particular memory of the storage device under the preset state after protection request is received
State;
Stick unit, for retaining the particular memory state of the storage device so that be not in the electronic equipment
The preset state and when operating the storage device, the particular memory state do not change;
Recovery unit, for when receiving recovery request, recovering the electronic equipment based on the particular memory state retained
Preset state.
10. storage device according to claim 9, wherein, the particular memory state includes the storage device described pre-
If the protection memory space for being stored with data in the address mapping table and the storage device under state.
11. storage device according to claim 9, wherein, the storage device supports snapshot functions,
The determination unit creates to determine the particular memory state by being directed to the snapshot of the storage device,
The stick unit creates to retain the particular memory state by being directed to the snapshot of the storage device.
12. storage device according to claim 10, wherein, the stick unit retains described specific deposit by operating as follows
Storage state:Address mapping table of the storage device under the preset state is copied into predeterminable area;The protection is deposited
Storage space is marked to protect it from being wiped free of and write.
13. storage device according to claim 10, wherein, when the electronic equipment is not at the preset state and will be in institute
When stating write-in data in storage device, the stick unit writes data by operating as follows:Determine the write-in behaviour of the data
Whether the protection memory space is directed toward;When the protection memory space is directed toward in the write operation of the data, deposited described
Spare storage space is determined in storage device;The spare storage space will be re-introduced into for the write-in of the storage device;
The data are write in the spare storage space, so as to not change the particular memory state of the storage device.
14. storage device according to claim 13, wherein, the recovery unit recovers the electronics by operating as follows and sets
Standby preset state:The current address mapping table of storage device is replaced with into retained address mapping table;To slack storage
Space performs erasing operation.
15. storage device according to claim 10, wherein, the storage device is the solid state disk for including multiple memory blocks,
The determination unit determines the particular memory state by operating as follows:Determine that wherein there is each storage of data storage
Whether at least two memory blocks have free page in block, which is wherein to have each storage of data storage is in the block not have
There is the memory page for preserving data;If at least two have in the memory block of data storage there are free page, have to described
Each memory block of data storage carries out Data Integration, until there is the free time in the memory block at most having data storage at one
Page;Memory block after integration is determined as to protect memory space.
16. storage device according to claim 9, further includes:Forbidden energy unit, for being received from the operating system of electronic equipment
After dormancy instruction, start to forbid the use of the storage device,
The determination unit determines the particular memory state when the forbidden energy unit forbids the use of the storage device, and
Determining for the particular memory state is completed before the operating system of the electronic equipment terminates to perform the dormancy instruction.
17. a kind of electronic equipment, including the storage device according to any one of claim 9-16.
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 CN104424115A (en) | 2015-03-18 |
CN104424115B true 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) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10420928B2 (en) * | 2015-12-14 | 2019-09-24 | Medtronic, Inc. | Implantable medical device having a scheme for managing storage of data |
CN106294007B (en) * | 2016-08-05 | 2020-03-24 | 联想(北京)有限公司 | Data recovery method and device |
JP6930278B2 (en) * | 2017-08-09 | 2021-09-01 | コニカミノルタ株式会社 | Multifunction device, reboot method, and computer program |
US11196875B2 (en) * | 2017-09-20 | 2021-12-07 | Fujifilm Business Innovation Corp. | Application apparatus, image processing apparatus, and non-transitory computer readable medium with plurality of recovery methods for applications switching to be in operation target state |
CN109471754A (en) * | 2018-10-31 | 2019-03-15 | 深信服科技股份有限公司 | Backup method, device, equipment and computer readable storage medium |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005258851A (en) * | 2004-03-12 | 2005-09-22 | Renesas Technology Corp | Memory card |
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 |
-
2013
- 2013-09-05 CN CN201310400098.5A patent/CN104424115B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN104424115A (en) | 2015-03-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8069191B2 (en) | Method, an apparatus and a system for managing a snapshot storage pool | |
CN104424115B (en) | Recover method, storage device and the electronic equipment of the preset state of electronic equipment | |
US8521949B2 (en) | Data deleting method and apparatus | |
EP2366152B1 (en) | Ruggedized memory device | |
KR101636870B1 (en) | Method and apparatus for generating minimal boot image | |
CN103593147B (en) | A kind of method and device of digital independent | |
US20120246390A1 (en) | Information processing apparatus, program product, and data writing method | |
CN109634775A (en) | Automatic continuous checkpoint | |
EP2989536B1 (en) | Management of access to a hybrid drive in power saving mode | |
US20070073783A1 (en) | Snapshot management apparatus and method, and storage system | |
JP4512638B2 (en) | Computer hard disk system data protection apparatus and method using system area information table and mapping table | |
JP6064608B2 (en) | Storage device, backup program, and backup method | |
CN104281538B (en) | It is a kind of store equipment dilatation and Snapshot Method and storage equipment | |
CN107291883A (en) | The Snapshot Method and device of a kind of distributed memory system | |
JP2011134293A (en) | Data control device and program | |
CN103294604A (en) | Flash memory device and electronic device employing thereof | |
CN106227621A (en) | The data back up method of logic-based volume management simplification volume and system | |
CN105320578A (en) | Method and apparatus for backing up and recovering APP | |
US9983826B2 (en) | Data storage device deferred secure delete | |
CN101149693A (en) | Computer hard disk data continuous time point storage and recovery method | |
CN109491605A (en) | A kind of date storage method based on COW, device and medium | |
CN109074308A (en) | The block conversion table (BTT) of adaptability | |
CN110704161A (en) | Virtual machine creation method and device and computer equipment | |
CN104915265B (en) | Data back up method and electronic equipment | |
CN103488586A (en) | Information processing apparatus and method and 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |