CN109753222A - Data-erasure method, server and computer-readable medium - Google Patents

Data-erasure method, server and computer-readable medium Download PDF

Info

Publication number
CN109753222A
CN109753222A CN201711057571.9A CN201711057571A CN109753222A CN 109753222 A CN109753222 A CN 109753222A CN 201711057571 A CN201711057571 A CN 201711057571A CN 109753222 A CN109753222 A CN 109753222A
Authority
CN
China
Prior art keywords
deleted
storage medium
data
task
target 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
CN201711057571.9A
Other languages
Chinese (zh)
Other versions
CN109753222B (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.)
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Tencent Cloud Computing Beijing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd, Tencent Cloud Computing Beijing Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201711057571.9A priority Critical patent/CN109753222B/en
Publication of CN109753222A publication Critical patent/CN109753222A/en
Application granted granted Critical
Publication of CN109753222B publication Critical patent/CN109753222B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a kind of data-erasure method, server and computer-readable mediums, belong to technical field of data storage.This method comprises: obtaining removal request, which is used to request the data in the target storage position of delete target storage medium;When target storage medium in a dormant state when, label target storage position be unoccupied state;Task to be deleted is recorded, which is used to indicate the data in target storage position and is not deleted;After target storage medium switches to wake-up states by dormant state, according to the data in task delete target storage location to be deleted;It can solve after server receives removal request, the problem of target storage position can not also be recycled in time;So that before practical deletion data, which can recycle in time, so as to improve the utilization rate of target storage position after receiving removal request.

Description

Data-erasure method, server and computer-readable medium
Technical field
The present embodiments relate to technical field of data storage, in particular to a kind of data-erasure method, server and meter Calculation machine readable medium.
Background technique
Data filing is to store data into one individually to store the process that equipment carries out long-term preservation.File data (that is, the data of filing into storage equipment) include but is not limited to: by returning for the maintenances such as government, enterprise, library, personal user Shelves record, backup file, media file etc..Server can delete the filing data in storage equipment by preset interface.
Storage equipment for storing filing data is usually centralised storage system, which includes more A storage medium, such as muti-piece hard disk.The state of storage medium includes dormant state and wake-up states.For depositing for wake-up states Storage media then can switch to dormant state from wake-up states when not visited in scheduled duration;Storage for dormant state Medium, when receiving access request, such as: read request, write request, inspection request etc. can then be switched to from dormant state and be called out The state of waking up.Wherein, when only storage medium is in wake-up states, server could delete the filing number stored in storage medium According to.
In a kind of typical method for deleting filing data, wake-up is switched in order to reduce storage medium from dormant state The number of state, if the removal request that server receives is used to request to delete the filing in storage medium in a dormant state Data, then server can cache the removal request, until the quantity of the corresponding removal request of the storage medium reaches request threshold value When, the storage medium is just waken up, and delete the filing data of each removal request instruction in the storage medium.For example, to being in The hard disk of dormant state wakes up the hard disk, and delete in the hard disk when the corresponding removal request of the hard disk is cached to 100 Data indicated by each removal request.
During server buffer removal request, since the filing data of removal request instruction are not situated between in storage always It is deleted in matter, therefore, corresponding memory space is occupied always in storage medium, and server is caused to recycle this part memory space Not in time the problem of.
Summary of the invention
The embodiment of the invention provides a kind of data-erasure method, server and computer readable storage mediums, can solve The problem of certainly memory space of storage medium can not be recycled in time.The technical solution is as follows:
In a first aspect, provide a kind of data-erasure method, applied to include multiple storage mediums storage system in, institute State storage medium in a dormant state or wake-up states, which comprises
Removal request is obtained, the removal request is used to request the number in the target storage position of delete target storage medium According to;
When the target storage medium in a dormant state when, mark the target storage position be unoccupied state;
Record task to be deleted, the task to be deleted be used to indicate the data in the target storage position not by It deletes;
After the target storage medium switches to the wake-up states by the dormant state, according to described to be deleted Task deletes the data in the target storage position.
Second aspect provides a kind of data deletion apparatus, applied to include multiple storage mediums storage system in, institute It states storage medium in a dormant state or wake-up states, described device includes:
Request module, for obtaining removal request, the removal request is for requesting delete target storage medium Data in target storage position;
Status indication module, for when the target storage medium in a dormant state when, mark target storage position It is set to unoccupied state;
Task record module, for recording task to be deleted, the task to be deleted is used to indicate target storage position The data in setting are not deleted;
Data removing module, for the target storage medium by the dormant state switch to the wake-up states it Afterwards, the data in the target storage position are deleted according to the task to be deleted.
The third aspect provides a kind of server, and the server includes processor and memory, stores in the memory Have at least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, The code set or instruction set are loaded by the processor and are executed the data-erasure method to realize first aspect offer.
Fourth aspect provides a kind of computer readable storage medium, be stored in the storage medium at least one instruction, At least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or refer to Collection is enabled to be loaded by the processor and executed the data-erasure method to realize first aspect offer.
Technical solution bring beneficial effect provided in an embodiment of the present invention includes:
By getting removal request, and the target storage medium of removal request instruction in a dormant state when, by this The target storage position of removal request instruction is labeled as unoccupied state, and records task to be deleted;In target storage medium After wake-up states are switched to from dormant state, in the target storage position for the target storage medium that task to be deleted is indicated Data are deleted;It can solve and receive removal request in server, after, deletion task wouldn't be executed, target storage position is caused The problem of can not recycling in time;After receiving removal request due to server, the target that can indicate removal request is stored Position mark is unoccupied state, at this point, target storage position recycles in time and supports to store other data, so as to To improve the utilization rate of target storage position.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing.
Fig. 1 is the structural schematic diagram of storage system provided by one embodiment of the present invention;
Fig. 2 is the flow chart of data-erasure method provided by one embodiment of the present invention;
Fig. 3 is the flow chart for the data-erasure method that another embodiment of the present invention provides;
Fig. 4 is the flow chart for the data-erasure method that another embodiment of the present invention provides;
Fig. 5 is the implementation diagram of data-erasure method provided by one embodiment of the present invention;
Fig. 6 is the block diagram of data deletion apparatus provided by one embodiment of the present invention;
Fig. 7 is the structural schematic diagram of server provided by one embodiment of the present invention.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present invention Formula is described in further detail.
Firstly, to the present embodiments relate to several nouns be introduced.
Storage medium: refer to the carrier of storing data.Storage medium includes but is not limited to: floppy disk, CD, digital multi It is CD (Digital Versatile Disc, DVD), hard disk, flash memory, USB flash drive (USB flash disk, USB flash disk), compact It is formula flash memory (Compact Flash, CF) card, safe digital card (Secure Digital Memory Card, SD card), more Media card (Multimedia Card, MMC), micro- storage (SmartMedia, SM) card, memory stick (MemoryStick), XD card (XD-PICTURE CARD) etc..
Optionally, storage medium includes: the storage medium with dormancy mechanism and the storage medium without dormancy mechanism.
For the storage medium with dormancy mechanism, the working condition of the storage medium includes dormant state and wake-up shape State.Dormant state refers to the state of storage medium operation suspension, such as: the dormant state of hard disk is that the motor of hard disk stalls, magnetic It is motionless, but to the state of the hard disk normal power supply;Wake-up states refer to the state that storage medium operates normally.Optionally, In addition to having special instruction, storage medium described below is the storage medium with dormancy mechanism.
For not having the storage medium (hereinafter referred to persistent storage medium) of dormancy mechanism, the storage medium is always In wake-up states (or presence), in other words, persistent storage medium refers to that the storage for being constantly in wake-up states is situated between Matter.Optionally, the application is illustrated so that the storage medium for not having dormancy mechanism is known as persistent storage medium as an example, in reality When border is realized, the storage medium without dormancy mechanism can also be known as other titles, such as: on-line storage medium is never stopped The storage medium etc. of dormancy, the present embodiment is not construed as limiting this.
Storage system: by setting for the various storage equipment of storage program and/or data, control unit and management information scheduling System composed by standby (hardware) and/or algorithm (software).Storage system includes multiple storage mediums.
Storage system includes: filing storage system, and filing storage system is for being stored and being managed to data.
Optionally, the data of storage system storage include filing data, wherein filing data, which refer to, to be carried out at data filing Data after reason.Data filing refers to that the data that will be not frequently used move on to one and individually store equipment progress long-term preservation Process.
Referring to FIG. 1, it illustrates the structural schematic diagrams of storage system provided by one embodiment of the present invention.The storage system System can be large enterprise's storage system, and being also possible to home-use NAS, (Network Attached Storage, network are attached Belong to storage) storage system.The system includes at least one server 110 and at least one storage medium 120.
Storage medium 120 is for storing data.Optionally, storage medium 120 is mounted in independent storage equipment 130, Schematically, storage equipment 130 can be disk cluster (Just a Bunch Of Disks, JBOD), Redundant Array of Inexpensive Disc (Redundant Array of Inexpensive Disks, RAID) etc.;Alternatively, storage medium 120 is mounted on server 110 In.Optionally, storage medium 120 is multiple, is arranged in array.
In the application, by storage medium 120 be mounted on in the mutually independent storage equipment 130 of server 110 for carry out Explanation.
Storage equipment 130 is connect with server 110 by storing network.Storing network includes: to be established by wired mode Communication network and/or the communication network wirelessly established.It stores network and is based on scheduled interface standard and/or agreement It establishes, such as: storage network is the network established based on serial SCSI (Serial Attached SCSI, SAS) technology.
Server 110 is used to be managed the storage medium 120 in storage equipment 130, such as: to storage medium 120 Write-in data, from read data in storage medium 120, delete data in storage medium 120, control storage medium 120 is from calling out Awake state switches to dormant state, control storage medium 120 and switches to wake-up states etc. from dormant state.
Optionally, the control instruction that server 110 is sent according at least one terminal 140 is to depositing in storage equipment 130 Storage media 120 is managed.Such as: the deletion instruction that server 110 is sent according to terminal 140 generates removal request, the deletion Request is for deleting the data in storage medium 120.For another example: the write command generation that server 110 is sent according to terminal 140 is write Request, write request can trigger storage equipment 130 and storage medium 120 in a dormant state switched to wake-up states, and Data are written in storage medium 120 in wake-up states.
Optionally, terminal 130 can be mobile phone, tablet computer, wearable device, pocket computer on knee and desk-top The electronic equipments such as computer.
Optionally, every server 110 is used to manage the storage medium 120 at least one storage equipment 130.For example, Server 110 is used to manage multiple storage mediums 120 in storage equipment 130.
Optionally, it is illustrated so that the executing subject of each embodiment is server 110 as an example in the application.
Referring to FIG. 2, it illustrates the flow charts of data-erasure method provided by one embodiment of the present invention.The data are deleted Except method is applied in storage system shown in FIG. 1, this method may include following steps:
Step 201, removal request is obtained, which is used to request the target storage position of delete target storage medium In data.
The removal request that server receiving terminal is sent.At this point, server provides the terminal with administration interface, the administration interface For being managed by server to storage medium for terminal, which can be web management interface.Server receives The removal request that terminal is sent by the administration interface.
Optionally, terminal can be mobile phone, tablet computer, wearable device, pocket computer on knee and desk-top meter The electronic equipments such as calculation machine.
Alternatively, server can also voluntarily generate removal request.At this point, server according to meet the data of deletion condition from Row generates removal request.Deletion condition includes but is not limited to: the data in storage medium have saved preset duration;Alternatively, storage Data in medium have saved preset duration, and the data not visited mistake in preset duration.Wherein, preset duration can be 6 months, 1 year, 10 years etc., the present embodiment did not limited the value of preset duration.
Optionally, removal request includes: the media identification of target storage medium and/or the position mark of target storage position Know.Wherein, media identification can be the number of storage medium, identification strings etc.;Station location marker can be Position Number, basis The numerical value etc. that the size of memory space corresponding to the storage location that start memory location is indicated to station location marker is determined, this reality Example is applied not limit the representation of the representation of media identification and station location marker.
Schematically, when the quantity of the storage medium managed when server is one, removal request can only include position Set mark;When the quantity for the storage medium that server is managed is at least two, removal request simultaneously include media identification with Station location marker;When the removal request that server is got is used to request to delete the total data in some storage medium, delete Request can only include media identification.
Optionally, target storage medium refers to storage medium indicated by removal request, and target storage medium is server At least one of storage medium managed.
Optionally, target storage position refers in target storage medium, and storage location indicated by removal request, Target storage position is used to indicate some memory space in target storage medium.
Step 202, when target storage medium in a dormant state when, label target storage position be unoccupied state.
Optionally, server is stored with the use state of each storage location in each storage medium, the use state packet Include unoccupied state and occupied state.Schematically, server stores the use shape of each storage location by bitmap State.The use state of storage location can indicate that the present embodiment is not made the representation of use state by number, letter etc. It limits.Schematically, unoccupied state is indicated by 0, has been used state by 1 to indicate.Optionally, each storage The use state of position is stored in the memory of server.
Optionally, it supports to store new data labeled as the first storage location of unoccupied state.In this way, when there are numbers According to needing to store in the first storage location, server can determine that first storage location can according to the unoccupied state With, and write the data into first storage location.
Optionally, data have been stored with labeled as the second storage location of occupied state, have not supported storing data.This Sample, when there are data needs to store in the second storage location, according to this, occupied state has determined that this second is deposited to server Storage space is set unavailable, is write data into other storage locations or is not stored the data.
Optionally, when server gets removal request, the working condition of target storage medium is detected;It is situated between when target stores Matter in a dormant state when, since server temporarily can not data in delete target storage medium.In order to enable target stores Target storage position in medium can recycle in time, when not yet deleting data, first set target storage position in server For unoccupied state.In this way, server can recycle the target storage position in time, multiplexing target storage position can be improved Timeliness.Other data refer to the data in addition to the data that removal request instruction is deleted.
Optionally, the number when target storage medium is in wake-up states, in the direct delete target storage location of server According to process terminates, without executing following step 203 and 204.
Optionally, the working condition of server detection target storage medium, comprising: server obtains the target storage prestored The working condition of medium detects whether the working condition is wake-up states, if so, determining the working condition of target storage medium For wake-up states;If not, it is determined that the working condition of target storage medium is dormant state;Alternatively, what server acquisition prestored The working condition of target storage medium detects whether the working condition is dormant state, if so, determining target storage medium Working condition is dormant state;If not, it is determined that the working condition of target storage medium is wake-up states.
Optionally, the working condition of server storage can be indicated by number, letter etc., and the present embodiment is not to work shape The storage form of state limits.Schematically, number 0 indicates dormant state, and number 1 indicates wake-up states.
Step 203, task to be deleted is recorded, task to be deleted is used to indicate the data in target storage position and is not deleted It removes.
Optionally, task to be deleted includes the station location marker of target storage position.
Optionally, server stores task to be deleted in persistent storage medium, which refers to one The straight storage medium for being in wake-up states.
Optionally, persistent storage medium is installed in the server, such as: persistent storage medium is hard in server Disk;Alternatively, persistent storage be mounted on in the mutually independent storage equipment of server, such as: persistent storage medium be disk Hard disk in cluster.
Optionally, step 203 can execute before step 202;Alternatively, can also execute after step 202;Or Person can also be performed simultaneously with step 202, and the present embodiment is not construed as limiting this.
Step 204, it after target storage medium switches to wake-up states by dormant state, is deleted according to task to be deleted Data in target storage position.
Optionally, server obtains access request, and sends the access request to target storage medium, and access request is used for It triggers target storage medium and switches to wake-up states from dormant state.Optionally, access request is the terminal being connected with server It sends;Alternatively, access request is that server generates in the process of running.Access request includes but is not limited to: read request is write At least one of request, inspection request.
Due to when target storage medium in a dormant state when, server only by the use state of target storage position from Occupied status modifier is unoccupied state.In fact, the data in target storage medium are not yet deleted.Therefore, The present embodiment when so that storage medium being in wake-up states, then deletes the deletion by recording task to be deleted in the server The data that task instruction is deleted, can not only guarantee server will not multiple wake up target storage medium, but also can guarantee that target is deposited Storage space, which is set, to be recycled in time.
In conclusion data-erasure method provided in this embodiment, by getting removal request, and removal request refers to The target storage medium shown in a dormant state when, target storage position which is indicated is labeled as unoccupied shape State, and record task to be deleted;After target storage medium switches to wake-up states from dormant state, task to be deleted is referred to Data in the target storage position for the target storage medium shown are deleted;It can solve after server receives removal request, The problem of target storage position can not recycle in time;After receiving removal request due to server, removal request can be referred to It is state that the target storage position shown, which first marks, at this point, target storage position has been recovered and has supported to store it Its data, so as to improve the utilization rate of target storage position.
Optionally, it in the application, after server is according to the data in task delete target storage location to be deleted, will hold Task to be deleted in longization storage medium is deleted.
Optionally, server deletes target and deposits according to all tasks to be deleted stored in persistent storage medium After data in storage media, all tasks to be deleted are deleted;Alternatively, server is every according to a task deletion pair to be deleted After the data answered, corresponding task to be deleted is deleted.
With reference to Fig. 3, an example is combined to be introduced above-mentioned data-erasure method below, in this example, with data It is illustrated for filing data instance.
Step 301, server receives removal request.
The related content of this step is detailed in step 201, and therefore not to repeat here for the present embodiment.
Step 302, whether the target storage medium of server detection removal request instruction is in wake-up states, if target Storage medium is in wake-up states, thens follow the steps 303;If target storage medium is not at wake-up states, then follow the steps 304。
Optionally, server obtains the working condition of target storage medium, detects the working condition of the target storage medium It whether is wake-up states;If it is (that is, the working condition of target storage medium is wake-up states), 303 are thened follow the steps;If No (that is, the working condition of target storage medium is dormant state), thens follow the steps 304.
Step 303, the filing number in target storage medium, in the target storage position that server indicates removal request According to deletion, process terminates.
Step 304, it is unoccupied state that server marks target storage position in memory, and is situated between in persistent storage Task to be deleted is recorded in matter.
Task to be deleted is used to indicate after target storage medium switches to wake-up states from dormant state, is appointed deleting The filing data being engaged in the target storage position of instruction are deleted.
Step 305, server sends access request to target storage medium, and access request is for triggering target storage medium Wake-up states are switched to from dormant state.
Step 306, after target storage medium switches to wake-up states from dormant state, server is according to be deleted Filing data in delete target storage location of being engaged in.
Optionally, in the above-described embodiments, server is according to the data in task delete target storage location to be deleted, packet It includes but is not limited to following methods:
First way, server is determined according to access request executes sequence between the first operation and the second operation, presses The first operation is executed according to execution sequence.
Wherein, the first operation is the operation for deleting data according to task to be deleted, and the second operation is visited for responding Ask the operation of request.
Optionally, server is determined according to access request executes sequence between the first operation and the second operation, comprising: Access request is write request, and in target storage medium in unoccupied state memory space be less than capacity-threshold when, really Fixed first operator precedence is executed in the second operation;Alternatively, access request be write request, and write request instruction writing position with When target storage position has overlapping, determine that the first operator precedence is executed in the second operation.
Data are written into target storage medium for requesting for write request.Optionally, write request includes target storage medium Media identification, target storage position station location marker and data;Alternatively, write request includes the station location marker of target storage position And data;Alternatively, write request only includes data.
Optionally, capacity-threshold can be fixed numerical value;Alternatively, being also possible to according to the data carried in write request The value that size determines.
When access request is write request, and the memory space in target storage medium in unoccupied state is (that is, remaining Memory space) be less than capacity-threshold when, illustrate the target storage medium without enough memory spaces accommodate write request in take The data of band, at this point, target storage medium can be increased first according to the data in task delete target storage location to be deleted Residual memory space, thus guarantee target storage medium can normal response write request, by write request data be written target Storage medium.
When access request is write request, and writing position and the target storage position of write request instruction there are it is Chong Die when, say It is bright to need preferentially to delete the data in the lap position in the target storage position, at this point, first deleting mesh according to task to be deleted Mark storage location in data, it is ensured that target storage medium can normal response write request, the data in write request are write Enter target storage position.
Optionally, when the first operator precedence is executed in the second operation, the first operation is executed;In the first operation of execution Afterwards, the second operation is executed.
Optionally, when access request is not write request;Alternatively, access request is write request, but in target storage medium Memory space in unoccupied state is greater than or equal to capacity-threshold;Alternatively, access request is write request, but write request When the writing position of instruction is not present Chong Die with target storage position, determine that the second operator precedence is executed in the first operation.Change sentence Talk about, server determine access request be unsatisfactory for the first operator precedence in second operation execute condition when, determine second Operator precedence is executed in the first operation.
Optionally, when the second operator precedence is executed in the first operation, the second operation is executed;In the second operation of execution Afterwards, the first operation is executed.
In conclusion data-erasure method provided in this embodiment, by the execution for determining the first operation and the second operation Sequentially, according to the data in execution sequence delete target storage location, so that server is not when needing preferentially to delete data, it is excellent Access request is first responded, the delay of server response access request can be reduced, improves the speed of server response access request.
With reference to Fig. 4, the data-erasure method that first way provides is introduced with an example below, in this example In, it is that filing data instance is illustrated with data.After step 203 or 304, this method further includes the following steps:
Step 401, server obtains access request, and sends the access request to target storage medium.
Access request switches to wake-up states from dormant state for triggering target storage medium.
Step 402, task to be deleted whether is stored in server detection persistent storage medium;If persistent storage It is not stored in medium to have task to be deleted, then follow the steps 403;If being stored with task to be deleted in persistent storage medium, Then follow the steps 404.
Step 403, server responds access request, executes step 409.
Step 404, server detects whether preferentially to execute the first operation;If so, thening follow the steps 405;If it is not, then Execute step 407.
It is write request in access request, and the memory space in target storage medium in unoccupied state is less than space When threshold value, server determines that the first operator precedence is executed in the second operation;Alternatively, being write request, and write request in access request The writing position of instruction and target storage position there are it is Chong Die when, server determines that the first operator precedence is executed in the second operation.
Step 405, according to the filing data in task delete target storage location to be deleted.
Step 406, after deleting filing data, access request is responded, executes step 409.
Step 407, access request is responded.
Step 408, after responding access request, according to the filing number in task delete target storage location to be deleted According to.
Step 409, the task to be deleted in persistent storage medium is deleted.
The second way, when storage system, which also records, at least one other task to be deleted, server determines access Request object block belonging to the access position of instruction;Belong to object block in the delete position of task to be deleted instruction, and it is other to When the delete position of deletion task instruction belongs to other pieces, the first operation is executed;Execution first operation after, according to it is other to Deletion task deletes the data of other task instructions to be deleted;Belong to other pieces in the delete position of task to be deleted instruction, and When the delete position of other task instructions to be deleted belongs to object block, according to other tasks to be deleted, other to be deleted are deleted The data of business instruction;After the data for deleting other task instructions to be deleted, the first operation is executed.
With reference to Fig. 5, storage medium 501 includes four blocks: block 1, block 2, block 3 and block 4;Server is in persistent storage medium In be stored with 3 tasks 501,502 and 503 to be deleted, task 501 and 502 to be deleted is used to indicate the data deleted in block 2, Task 503 to be deleted is used to indicate the data deleted in block 3.If the access position for the access request that server receives belongs to block 3, then server priority deletes the data in block 3 according to task 503 to be deleted;Delete block 3 in data and then according to Task 501 and 502 to be deleted deletes the data in block 2.
Optionally, target storage medium includes at least one block, which includes object block and other pieces.
Optionally, the size of the corresponding memory space of block different in target storage medium is identical or different, such as: target Storage medium includes 4 blocks, is respectively as follows: block 1, block 2, block 3 and block 4, wherein block 1, block 2 and the corresponding memory space of block 3 it is big It is small identical, the size memory space corresponding with other pieces of the corresponding memory space of block 4 it is of different sizes.
Optionally, server first determines preferential the first operation of execution still before deleting data according to task to be deleted Preferential the second operation of execution, according to the sequence that executes of the first operation and the second operation, deletion data.The associated description of this step is detailed See first way, therefore not to repeat here for the present embodiment.
In conclusion data-erasure method provided in this embodiment, is determined excellent by the access position according to access request The data of which task instruction to be deleted are first deleted, block belonging to the access position indicated as access request continues to access Probability it is larger, therefore, by preferentially deleting the data belonging to the access position of access request instruction in block, clothes can be improved Business device responds the speed of subsequently received access request.
The third mode, server is according to the data in task delete target storage location to be deleted, comprising:
When target storage medium is in wake-up states, server is deleted according to the record sequence for recording task to be deleted Data in target storage position.Such as: server has recorded 5 tasks to be deleted, then server is according to recording this 5 wait delete Data except the sequencing of task, in delete target storage location.
Optionally, server response access request refers in the application: according to access request, holding in target storage medium The corresponding access operation of row.Such as: when access request is write request, server executes write operation in target storage medium, The data that write request carries to be written in target storage medium;For another example: when access request is read request, server is in mesh Read operation is executed in mark storage medium, to read out data from target storage medium.
Following is apparatus of the present invention embodiment, can be used for executing embodiment of the present invention method.For apparatus of the present invention reality Undisclosed details in example is applied, embodiment of the present invention method is please referred to.
Referring to FIG. 6, the device has it illustrates the block diagram of data deletion apparatus provided by one embodiment of the present invention The exemplary function of the above method is executed, function can also be executed corresponding software realization by hardware realization by hardware.The dress Set may include: request module 610, status indication module 620, task record module 630 and data removing module 640.
Request module 610, for obtaining removal request, the removal request is for requesting delete target storage medium Target storage position in data;
Status indication module 620, for when the target storage medium in a dormant state when, mark the target to store Position is unoccupied state;
Task record module 630, for recording task to be deleted, the task to be deleted is used to indicate the target storage The data in position are not deleted;
Data removing module 640, for switching to the wake-up shape by the dormant state in the target storage medium After state, the data in the target storage position are deleted according to the task to be deleted.
Optionally, the data removing module 640, comprising: request transmitting unit, order determination unit and operation execute list Member.
Request transmitting unit, for sending access request to the target storage medium, the access request is for triggering The target storage medium switches to the wake-up states from the dormant state;
Order determination unit, for determining that the execution between the first operation and the second operation is suitable according to the access request Sequence, first operation are the operations for deleting the data according to the task to be deleted, and second operation is to be used for Respond the operation of the access request;
Operation execution unit, for executing first operation according to the execution sequence.
Optionally, the order determination unit, is used for:
It is write request in the access request, and is in the memory space of unoccupied state in the target storage medium When less than capacity-threshold, determine that first operator precedence is executed in second operation;
Alternatively,
It is write request in the access request, and the writing position of write request instruction is deposited with the target storage position In overlapping, determine that first operator precedence is executed in second operation.
Optionally, the operation execution unit, is used for:
When first operator precedence is executed in second operation, first operation is executed;Executing described the After one operation, second operation is executed.
When second operator precedence is executed in first operation, second operation is executed;Executing described the After two operations, first operation is executed.
Optionally, the storage system, which also records, at least one other task to be deleted, the operation execution unit, uses In:
Determine that object block belonging to the access position of the access request instruction, the target storage medium include at least one A block, at least one block include the object block and other pieces;
Belong to the object block, and other task instructions to be deleted in the delete position of the task instruction to be deleted Delete position when belonging to described other pieces, execute first operation;Execute it is described first operation after, according to it is described its Its task to be deleted deletes the data of other task instructions to be deleted;
Belong to described other pieces, and other task instructions to be deleted in the delete position of the task instruction to be deleted Delete position when belonging to the object block, according to other tasks to be deleted, delete other tasks instructions to be deleted Data;After the data for deleting other task instructions to be deleted, first operation is executed.
Optionally, the task record module 630, is used for:
The task to be deleted is stored in persistent storage medium, the persistent storage medium, which refers to, is constantly in institute State the storage medium of wake-up states.
Correlative detail can refer to above method embodiment.
Optionally, the application also provides a kind of computer readable storage medium, and at least one is stored in the storage medium Item instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code Collection or instruction set are loaded by the processor and are executed the data-erasure method to realize above method embodiment offer.
Optionally, the application additionally provides a kind of computer program product comprising instruction, when it is transported on computers When row, so that computer executes the data-erasure method that above-mentioned each embodiment of the method provides.
Fig. 7 is the structural schematic diagram of server provided by one embodiment of the present invention.Server 700 includes central processing list Member (English: Central Processing Unit, abbreviation: CPU) 701 including random access memory (English: random Access memory, referred to as: RAM) 702 and read-only memory (English: read-only memory, referred to as: ROM) 703 be System memory 704, and the system bus 705 of connection system storage 704 and central processing unit 701.The server 700 It further include the basic input/output (I/O system) 706 of information being transmitted between each device helped in computer, and use In the mass-memory unit 707 of storage program area 713, application program 714 and other program modules 717.
The basic input/output 706 includes display 708 for showing information and inputs letter for user The input equipment 709 of such as mouse, keyboard etc of breath.Wherein the display 708 and input equipment 709 are all by being connected to The i/o controller 710 of system bus 705 is connected to central processing unit 701.The basic input/output 706 Can also include input and output controller 710 with for receive and handle from keyboard, mouse or electronic touch pen etc. it is multiple its The input of his equipment.Similarly, i/o controller 710 also provides output to display screen, printer or other kinds of defeated Equipment out.
The mass-memory unit 707 is by being connected to the bulk memory controller (not shown) of system bus 705 It is connected to central processing unit 701.The mass-memory unit 707 and its associated computer-readable medium are server 700 provide non-volatile memories.That is, the mass-memory unit 707 may include such as hard disk or read-only light The computer-readable medium of disk (English: Compact Disc Read-Only Memory, abbreviation: CD-ROM) driver etc (not shown).
Without loss of generality, the computer-readable medium may include computer storage media and communication media.Computer Storage medium includes information such as computer readable instructions, data structure, program module or other data for storage The volatile and non-volatile of any method or technique realization, removable and irremovable medium.Computer storage medium includes RAM, ROM, Erasable Programmable Read Only Memory EPROM (English: erasable programmable read-only memory, letter Claim: EPROM), electrically erasable programmable read-only memory (English: electrically erasable programmable Read-only memory, referred to as: EEPROM), flash memory or other solid-state storages its technologies, CD-ROM, digital versatile disc (English Text: Digital Versatile Disc, referred to as: DVD) or other optical storages, cassette, tape, disk storage or other Magnetic storage device.Certainly, skilled person will appreciate that the computer storage medium be not limited to it is above-mentioned several.Above-mentioned System storage 704 and mass-memory unit 707 may be collectively referred to as memory.
Memory is stored with one or more programs, and one or more programs are configured to by one or more central processings Unit 701 executes, and one or more programs include the instruction for realizing above-mentioned data-erasure method, central processing unit 701 It executes the one or more program and realizes the data-erasure method that above-mentioned each embodiment of the method provides.
According to various embodiments of the present invention, the server 700 can also be arrived by network connections such as internets Remote computer operation on network.Namely server 700 can be by the network interface that is connected on the system bus 705 Unit 711 is connected to network 712, in other words, Network Interface Unit 711 also can be used be connected to other kinds of network or Remote computer system (not shown).
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardware It completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readable In storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention and Within principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.

Claims (14)

1. a kind of data-erasure method, which is characterized in that applied to include multiple storage mediums storage system in, the storage Medium is in a dormant state or wake-up states, which comprises
Removal request is obtained, the removal request is used to request the data in the target storage position of delete target storage medium;
When the target storage medium in a dormant state when, mark the target storage position be unoccupied state;
Task to be deleted is recorded, the task to be deleted is used to indicate the data in the target storage position and is not deleted It removes;
After the target storage medium switches to the wake-up states by the dormant state, according to the task to be deleted Delete the data in the target storage position.
2. the method according to claim 1, wherein it is described in the target storage medium by the dormant state It switches to after the wake-up states, the data in the target storage position is deleted according to the task to be deleted, wrap It includes:
Access request is sent to the target storage medium, the access request is for triggering the target storage medium from described Dormant state switches to the wake-up states;
The sequence that executes between the first operation and the second operation is determined according to the access request, and first operation is for root The operation of the data is deleted according to the task to be deleted, second operation is the operation for responding the access request;
First operation is executed according to the execution sequence.
3. according to the method described in claim 2, it is characterized in that, described determine the first operation and according to the access request Sequence is executed between two operations, comprising:
It is write request in the access request, and the memory space in the target storage medium in unoccupied state is less than When capacity-threshold, determine that first operator precedence is executed in second operation;
Alternatively,
It is write request in the access request, and the writing position of write request instruction and the target storage position have weight When folded, determine that first operator precedence is executed in second operation.
4. according to the method described in claim 2, it is characterized in that, described execute first behaviour according to the execution sequence Make, comprising:
When first operator precedence is executed in second operation, first operation is executed;Executing first behaviour After work, second operation is executed;
When second operator precedence is executed in first operation, second operation is executed;Executing second behaviour After work, first operation is executed.
5. method according to claim 2, which is characterized in that the storage system also record have it is at least one other to be deleted Task, it is described to execute first operation according to the execution sequence, comprising:
Determine object block belonging to the access position of the access request instruction, the target storage medium includes at least one Block, at least one block include the object block and other pieces;
In the delete position of the task to be deleted instruction belong to the object block, and other task instructions to be deleted are deleted When belonging to described other pieces except position, first operation is executed;Execute it is described first operation after, according to it is described it is other to Deletion task deletes the data of other task instructions to be deleted;
In the delete position of the task to be deleted instruction belong to described other pieces, and other task instructions to be deleted are deleted When belonging to the object block except position, according to other tasks to be deleted, the number of other task instructions to be deleted is deleted According to;After the data for deleting other task instructions to be deleted, first operation is executed.
6. method according to any one of claims 1 to 5, which is characterized in that described to record task to be deleted, comprising:
The task to be deleted is stored in persistent storage medium, the persistent storage medium, which refers to, is constantly in described call out The storage medium for the state of waking up.
7. a kind of data deletion apparatus, which is characterized in that applied to include multiple storage mediums storage system in, the storage Medium is in a dormant state or wake-up states, described device include:
Request module, for obtaining removal request, the removal request is used to request the target of delete target storage medium Data in storage location;
Status indication module, for when the target storage medium in a dormant state when, mark the target storage position to be Unoccupied state;
Task record module, for recording task to be deleted, the task to be deleted is used to indicate in the target storage position The data be not deleted;
Data removing module, for after the target storage medium switches to the wake-up states by the dormant state, The data in the target storage position are deleted according to the task to be deleted.
8. device according to claim 7, which is characterized in that institute's data removing module, comprising:
Request transmitting unit, for sending access request to the target storage medium, the access request is described for triggering Target storage medium switches to the wake-up states from the dormant state;
Order determination unit executes sequence, institute between the first operation and the second operation for determining according to the access request Stating the first operation is the operation for deleting the data according to the task to be deleted, and second operation is for responding State the operation of access request;
Operation execution unit, for executing first operation according to the execution sequence.
9. device according to claim 8, which is characterized in that the order determination unit is used for:
It is write request in the access request, and the memory space in the target storage medium in unoccupied state is less than When capacity-threshold, determine that first operator precedence is executed in second operation;
Alternatively,
It is write request in the access request, and the writing position of write request instruction and the target storage position have weight When folded, determine that first operator precedence is executed in second operation.
10. device according to claim 8, which is characterized in that the operation execution unit is used for:
When first operator precedence is executed in second operation, first operation is executed;Executing first behaviour After work, second operation is executed;
When second operator precedence is executed in first operation, second operation is executed;Executing second behaviour After work, first operation is executed.
11. device according to claim 8, which is characterized in that the storage system also record have it is at least one other wait delete Except task, the operation execution unit is used for:
Determine object block belonging to the access position of the access request instruction, the target storage medium includes at least one Block, at least one block include the object block and other pieces;
In the delete position of the task to be deleted instruction belong to the object block, and other task instructions to be deleted are deleted When belonging to described other pieces except position, first operation is executed;Execute it is described first operation after, according to it is described it is other to Deletion task deletes the data of other task instructions to be deleted;
In the delete position of the task to be deleted instruction belong to described other pieces, and other task instructions to be deleted are deleted When belonging to the object block except position, according to other tasks to be deleted, the number of other task instructions to be deleted is deleted According to;After the data for deleting other task instructions to be deleted, first operation is executed.
12. according to any device of claim 7 to 11, which is characterized in that the task record module is used for:
The task to be deleted is stored in persistent storage medium, the persistent storage medium, which refers to, is constantly in described call out The storage medium for the state of waking up.
13. a kind of server, which is characterized in that the server includes processor and memory, is stored in the memory At least one instruction, at least a Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, institute Code set or instruction set is stated to be loaded by the processor and executed to realize that the data as described in claim 1 to 6 is any are deleted Method.
14. a kind of computer readable storage medium, which is characterized in that be stored at least one instruction, extremely in the storage medium A few Duan Chengxu, code set or instruction set, at least one instruction, an at least Duan Chengxu, the code set or instruction Collection is loaded by the processor and is executed to realize the data-erasure method as described in claim 1 to 6 is any.
CN201711057571.9A 2017-11-01 2017-11-01 Data deleting method, server and computer readable medium Active CN109753222B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711057571.9A CN109753222B (en) 2017-11-01 2017-11-01 Data deleting method, server and computer readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711057571.9A CN109753222B (en) 2017-11-01 2017-11-01 Data deleting method, server and computer readable medium

Publications (2)

Publication Number Publication Date
CN109753222A true CN109753222A (en) 2019-05-14
CN109753222B CN109753222B (en) 2021-03-26

Family

ID=66397769

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711057571.9A Active CN109753222B (en) 2017-11-01 2017-11-01 Data deleting method, server and computer readable medium

Country Status (1)

Country Link
CN (1) CN109753222B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651122A (en) * 2020-05-20 2020-09-11 远景智能国际私人投资有限公司 Data deleting method, device, server and storage medium
CN113360095A (en) * 2021-06-04 2021-09-07 重庆紫光华山智安科技有限公司 Hard disk data management method, device, equipment and medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104461780A (en) * 2014-11-28 2015-03-25 华为技术有限公司 Data block release method and device
US20160224254A1 (en) * 2012-09-24 2016-08-04 International Business Machines Corporation Selective erasure of expired files or extents in deduplicating virutal media for efficient file reclamation
CN105843702A (en) * 2015-01-14 2016-08-10 阿里巴巴集团控股有限公司 Method and device for data backup

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160224254A1 (en) * 2012-09-24 2016-08-04 International Business Machines Corporation Selective erasure of expired files or extents in deduplicating virutal media for efficient file reclamation
CN104461780A (en) * 2014-11-28 2015-03-25 华为技术有限公司 Data block release method and device
CN105843702A (en) * 2015-01-14 2016-08-10 阿里巴巴集团控股有限公司 Method and device for data backup

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111651122A (en) * 2020-05-20 2020-09-11 远景智能国际私人投资有限公司 Data deleting method, device, server and storage medium
CN111651122B (en) * 2020-05-20 2023-07-28 远景智能国际私人投资有限公司 Data deleting method, device, server and storage medium
CN113360095A (en) * 2021-06-04 2021-09-07 重庆紫光华山智安科技有限公司 Hard disk data management method, device, equipment and medium

Also Published As

Publication number Publication date
CN109753222B (en) 2021-03-26

Similar Documents

Publication Publication Date Title
CN106055431B (en) The method and device of backup and recovery based on the online rollback of snapshot
US9298724B1 (en) Systems and methods for preserving deduplication efforts after backup-job failures
US8635422B1 (en) Systems and methods for reclaiming storage space from deleted volumes on thin-provisioned disks
EP2879040B1 (en) Data storage method, data storage apparatus, and storage device
CN103761053B (en) A kind of data processing method and device
US8984027B1 (en) Systems and methods for migrating files to tiered storage systems
CN105745624A (en) Virtual machine backup from storage snapshot
CN109960686A (en) The log processing method and device of database
CN102096561B (en) Hierarchical data storage processing method, device and storage equipment
CN103268252A (en) Virtualization platform system based on distributed storage and achieving method thereof
JP2008090741A (en) Computer system, data migration monitoring method, and data migration monitoring program
CN103617097B (en) File access pattern method and device
CN103761190A (en) Data processing method and apparatus
CN105144113A (en) Recovery of application from snapshot
CN107329704B (en) Cache mirroring method and controller
CN104461685A (en) Virtual machine processing method and virtual computer system
CN103221925A (en) Data processing method and storage equipment
US11461287B2 (en) Managing a file system within multiple LUNS while different LUN level policies are applied to the LUNS
CN104077380A (en) Method and device for deleting duplicated data and system
US11307789B2 (en) Storage system and storage control method
CN114637475A (en) Distributed storage system control method and device and readable storage medium
CN107544869A (en) A kind of data reconstruction method and device
JP4717922B2 (en) Information processing system, control method in information processing system, and management apparatus
CN109558213A (en) The method and apparatus for managing the virtual machine snapshot of OpenStack platform
CN113867645A (en) Data migration and data read-write method and device, computer equipment and storage medium

Legal Events

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