CN110187836A - A kind of data-erasure method, device, computer and storage medium - Google Patents

A kind of data-erasure method, device, computer and storage medium Download PDF

Info

Publication number
CN110187836A
CN110187836A CN201910457514.2A CN201910457514A CN110187836A CN 110187836 A CN110187836 A CN 110187836A CN 201910457514 A CN201910457514 A CN 201910457514A CN 110187836 A CN110187836 A CN 110187836A
Authority
CN
China
Prior art keywords
data
mark
time
importance
identifier
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
CN201910457514.2A
Other languages
Chinese (zh)
Other versions
CN110187836B (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.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology 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 Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN201910457514.2A priority Critical patent/CN110187836B/en
Publication of CN110187836A publication Critical patent/CN110187836A/en
Application granted granted Critical
Publication of CN110187836B publication Critical patent/CN110187836B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • G06F3/0631Configuration or reconfiguration of storage systems by allocating resources to storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0646Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
    • G06F3/0652Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0653Monitoring storage devices or systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0674Disk device
    • G06F3/0676Magnetic disk device

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a kind of data-erasure method, device, computer and storage mediums, wherein, data-erasure method includes: the mark expired time for obtaining the data that importance is identified as first identifier, wherein, first identifier are as follows: indicate that data are the mark of significant data, whether the acquired mark expired time of monitoring is earlier than current time, if earlier than, the importance mark of the acquired corresponding data of mark expired time is then changed to second identifier, wherein, second identifier are as follows: indicate that data are the mark of insignificant data;It selects data corresponding to second identifier to delete data as pre-, carries out data deletion for pre- data of deleting.Data deletion is carried out using scheme provided in an embodiment of the present invention, the operating process of data deletion is can simplify, improves the efficiency that data are deleted.

Description

A kind of data-erasure method, device, computer and storage medium
Technical field
The present invention relates to Internet technical fields, more particularly to a kind of data-erasure method, device, computer and storage Medium.
Background technique
With the fast development of Internet technology, more and more by the data of the Internet transmission, the server of internet The data of middle storage are also more and more.Due to the limited storage space of server, when the overabundance of data stored in server, need A part of data are deleted to discharge memory space, so that new data be made to can store in the server.
It in the prior art, is usually that the method used is when deleting data: by significant data of high importance and important Property lower insignificant data be stored in different memory spaces respectively, for example, significant data and insignificant data are distinguished It is stored in different disks or is stored in different disk partition respectively, from the memory space for storing insignificant data Selection data are deleted, to guarantee that significant data is not deleted accidentally.
However, inventor has found in the implementation of the present invention, at least there are the following problems for the prior art: due to service The quantity of significant data changes frequent occurrence in device, in order to make significant data have enough memory spaces, timing is needed to be deposited Storage space is redistributed, and significant data and insignificant data are stored in the memory space redistributed again, in this way, just It will lead to and continually memory space is redistributed, and continually data are stored again, so that data The operating process of deletion is cumbersome, efficiency is lower.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of data-erasure method, device, computer and storage medium, with letter Change the operating process of data deletion, improve the efficiency that data are deleted.Specific technical solution is as follows:
In a first aspect, the embodiment of the invention provides a kind of data-erasure methods, which comprises
Obtain the mark expired time that importance is identified as the data of first identifier, wherein the importance mark indicates Whether data are significant datas, the first identifier are as follows: indicate that data are the mark of significant data;
Whether the acquired mark expired time of monitoring is earlier than current time;
If earlier than, the importance mark of the acquired corresponding data of mark expired time is changed to second identifier, In, the second identifier are as follows: indicate that data are the mark of insignificant data;
Data corresponding to the second identifier are selected to delete data as pre-;
Data deletion is carried out for the pre- deletion data.
Optionally, before the mark expired time of the acquisition importance data that are identified as first identifier the step of, The method also includes:
After data are downloaded, importance mark is added for the data, and identified for importance mark setting Time phase.
Optionally, after the step of data are downloaded, the method also includes:
Store downloaded data, wherein the disk of the downloaded data of storage is correspondingly provided with mapping table, the mapping table In include: the data stored in the disk mark, the importance of the data mark and the importance mark mark it is expired Time;
Importance mark is added for the data described, and is the step of importance mark setting mark expired time After rapid, this method further include:
By the mark expired time of added importance mark and importance mark, it is recorded and stores downloaded number According to the corresponding mapping table of disk in.
Optionally, the mark expired time for obtaining importance and being identified as the data of first identifier, comprising:
Acquisition importance is identified as the nearest of the data of first identifier and is accessed time and default effective time, wherein The accessed time recently are as follows: the time that data the last time is accessed;
By importance be identified as the data of first identifier time accessed recently and default effective time and, be determined as Importance is identified as the mark expired time of the data of first identifier.
It is optionally, described to carry out data deletion for the pre- deletion data, comprising:
Obtain the pre- nearest accessed time for deleting data, wherein the accessed time recently are as follows: data are nearest The once accessed time;
According to the acquired nearest accessed time, the data to be deleted of determination from the pre- deletion data, and delete Identified data.
Second aspect, the embodiment of the invention provides a kind of data deletion apparatus, described device includes:
Time acquisition unit, the mark expired time for being identified as the data of first identifier for obtaining importance, wherein institute State importance mark indicates whether data are significant datas, the first identifier are as follows: indicate that data are the mark of significant data;
Time supervision unit, for whether monitoring acquired mark expired time earlier than current time;
Mark modification unit, for when the monitoring result of the time supervision unit be when, by acquired mark The importance mark of time phase corresponding data is changed to second identifier, wherein the second identifier are as follows: indicates that data are insignificant The mark of data;
Data selection unit, for selecting data corresponding to the second identifier to delete data as pre-;
Data delete unit, for carrying out data deletion for the pre- deletion data.
Optionally, described device further include:
Data setting unit, for adding importance mark for the data, and be described important after data are downloaded Property mark setting mark expired time.
Optionally, described device further include:
Data storage cell, for storing downloaded data, wherein the disk of the downloaded data of storage is correspondingly provided with Mapping table, includes: the marks of the data stored in the disk, the importance of data mark in the mapping table and this is important Property mark mark expired time;
Information recording unit, for remembering the mark expired time of added importance mark and importance mark It records in the corresponding mapping table of disk for storing downloaded data.
Optionally, the time acquisition unit, comprising:
Time and duration obtain subelement, when being identified as data nearest of first identifier for obtaining importance and being accessed Between and default effective time, wherein the time accessed recently are as follows: accessed time data the last time;
Mark expired time determine subelement, for importance is identified as first identifier data it is nearest be accessed when Between with default effective time and, be determined as the mark expired time that importance is identified as the data of first identifier.
Optionally, the data delete unit, comprising:
Time obtains subelement, for obtaining the pre- nearest accessed time for deleting data, wherein the quilt recently Access time are as follows: the time that data the last time is accessed;
Data delete subelement, for being determined from the pre- deletion data according to the acquired nearest accessed time The data to be deleted, and delete identified data.
The third aspect, the embodiment of the invention provides a kind of computer, including processor, communication interface, memory and logical Believe bus, wherein the processor, the communication interface, the memory complete mutual communication by the bus;Institute Memory is stated, for storing computer program;The processor is realized for executing the program stored on the memory Method and step described in first aspect.
Fourth aspect, the embodiment of the invention provides a kind of computer readable storage medium, storage in the storage medium There is computer program, step described in first aspect is realized when the computer program is executed by processor.
5th aspect, the embodiment of the invention provides a kind of computer program products comprising instruction, when it is in computer When upper operation, so that computer executes video recommendation method described in first aspect.
Technical solution provided in an embodiment of the present invention is when deleting data, when monitoring that importance is identified as first identifier When the mark expired time of data is earlier than current time, the importance mark of the data monitored is changed to second identifier, due to First identifier is to indicate that data are the mark of significant data, and second identifier is to indicate that data are the mark of insignificant data, when giving After data markers first identifier or second identifier, so that it may judge that data are significant data according to importance mark, When the mark expired time of the corresponding data of first identifier is earlier than current time, illustrate that data are no longer significant datas, Second identifier is changed to by first identifier at this point, identifying the importance of data, that is, data are changed to by significant data non-heavy Data are wanted, when carrying out data deletion, carry out data deletion for data corresponding to second identifier, that is, for insignificant Data are deleted, to guarantee that significant data is not deleted accidentally.
Technical solution provided in an embodiment of the present invention distinguishes significant data and insignificant data with importance mark, is not necessarily to Significant data and insignificant data are respectively stored in different memory spaces, there is no need to carry out dividing again for memory space Match, stored again without to data, so as to simplify the operating process of data deletion, improve the effect of data deletion Rate.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described.
Fig. 1 is a kind of flow diagram of data-erasure method provided in an embodiment of the present invention;
Fig. 2 is another flow diagram of data-erasure method provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of data deletion apparatus provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of computer provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation description.
In order to simplify the operating process of data deletion, improve the efficiency of data deletion, the embodiment of the invention provides one kind Data-erasure method, device, computer and storage medium.
Data-erasure method is provided for the embodiments of the invention first below to be introduced.
It should be noted that data-erasure method provided by the embodiment of the present invention can be applied to Internet technology row Industry.For example, sound, video website or application, literature query website or application etc..Data-erasure method provided in an embodiment of the present invention Executing subject can be computer, which can be desktop computer, portable computer, intelligent mobile terminal, clothes Business device etc., specifically for example, the executing subject of data-erasure method provided in an embodiment of the present invention can be content distributing network (Content Delivery Network, abbreviation CDN) cache server.
In one embodiment, the application scenarios of technical solution provided in an embodiment of the present invention may is that data management Platform is after generating new data and new data is synchronized storage to video CD N cache server, video CD N cache server pair The method that its data stored is deleted.
As shown in Figure 1, data-erasure method provided by the embodiment of the present invention the following steps are included:
S110: the mark expired time that importance is identified as the data of first identifier is obtained, wherein importance mark indicates Whether data are significant data, first identifier are as follows: indicate that data are the mark of significant data.
In embodiments of the present invention, the data that computer is downloaded can be when carrying importance mark and identifying expired Between data, at this point, computer locally be just stored with data importance mark and mark expired time, computer can from this The mark expired time that importance is identified as the data of first identifier is obtained in ground storage.
Above-mentioned importance mark can be the mark indicated with numerical value, at this point, first identifier can be numerical value, for example, the One is identified as the numerical value such as " 1 ", " 0 ", " 2 ".Above-mentioned importance mark can be the mark indicated with letter, at this point, first identifier Can be alphabetical, for example, first identifier is the letters such as " a ", " b ".The concrete form present invention of importance mark and first identifier is real Example is applied not limit specifically.
The corresponding data of hot topic have the corresponding video data of the video of using names quotient etc., may be identified as being weight Data are wanted, after adding first identifier to these data, so that it may separate these data and insignificant data field.
In embodiments of the present invention, computer can be identified as first identifier by following any mode to obtain importance Data mark expired time:
The mark expired time that importance is identified as the data of first identifier is obtained by the first prefixed time interval;Wherein, First prefixed time interval can be determined according to the storage condition etc. of the renewal speed of data, computer, for example, when data When renewal speed is very fast, the first prefixed time interval can be set to short period of time, when computer storage occupancy compared with Gao Shi, the first prefixed time interval can be set to short period of time.For example, the first prefixed time interval can be 30 points Clock, 1 hour, 1 day constant duration, the embodiment of the present invention do not limit specifically.
After reaching specific time, importance is identified as the mark expired time of the data of first identifier;Specific time example It such as can be daily fixed time, for example, daily 12:00 and 01:00, are also possible to fixed time weekly, for example, often Sunday 01:00, those skilled in the art can specific time determines according to actual conditions the specific time, the embodiment of the present invention is not It is specific to limit.
Between when received after acquisition instruction, the mark expired time that importance is identified as the data of first identifier is obtained; Wherein, time acquisition instruction can be instruction that operator inputs in computer, being received by computer, and time acquisition refers to It enables and is also possible to instruction that computer receives, sending from other equipment, the embodiment of the present invention does not limit specifically.
After monitoring that storage occupancy reaches preset ratio, the mark that importance is identified as the data of first identifier is obtained Expired time;Preset ratio for example can be any value in 3/5~4/5, be also possible to other values for being not more than 1.
The mark expired time that importance is identified as the data of first identifier is obtained in real time.
S120: whether acquired mark expired time is monitored earlier than current time.
S130: if the monitoring result of step S120 be it is yes, by the weight of the acquired corresponding data of mark expired time The property wanted mark is changed to second identifier, wherein second identifier are as follows: indicates that data are the mark of insignificant data.
Above-mentioned second identifier are as follows: the mark different from above-mentioned first identifier.For example, being indicated when importance is identified as with numerical value Mark, first identifier be " 1 " when, second identifier can be the numerical value such as " 0 ", " 2 ", " 3 ", or other numerical value.When upper It states importance and is identified as the mark indicated with letter, when first identifier is " a ", second identifier can be the words such as " b ", " c ", " d " It is female.First identifier and second identifier can also respectively with various forms of symbol logos, for example, first identifier is indicated with numerical value, Second identifier is indicated with letter.In embodiments of the present invention, first identifier is different from second identifier, the tool of importance mark The body form embodiment of the present invention does not limit specifically.
S140: data corresponding to second identifier are selected to delete data as pre-.
S150: data deletion is carried out for pre- data of deleting.
Data deletion is carried out for pre- data of deleting, i.e., when carrying out data deletion, deletion is in pre- deletion data Data.In embodiments of the present invention, computer can select data to be deleted from pre- delete in data, in this way, can make institute The data of deletion are more targeted.
Data-erasure method provided in an embodiment of the present invention is when deleting data, since first identifier is to indicate that data are attached most importance to Want the mark of data, second identifier is to indicate that data are the mark of insignificant data, when to data markers first identifier or the After two marks, so that it may judge that data are significant data according to importance mark, when monitoring that importance is identified as the When the mark expired time of the data of one mark is earlier than current time, illustrate that data are no longer significant datas, at this point, will count According to importance identify second identifier be changed to by first identifier, that is, data are changed to insignificant data by significant data, When carrying out data deletion, data deletion is carried out for data corresponding to second identifier, that is, carry out for insignificant data It deletes, to guarantee that significant data is not deleted accidentally.Technical solution provided in an embodiment of the present invention is distinguished with importance mark Significant data and insignificant data, it is not necessary that significant data and insignificant data are respectively stored in different memory spaces, therefore It without carrying out redistributing for memory space, is stored again without to data, so as to simplify the behaviour that data are deleted Make process, improve the efficiency that data are deleted.
In one embodiment, as shown in Fig. 2, before step S110, the above method can also include the following steps S160:
S160: after data are downloaded, importance mark is added for the data, and identified for importance mark setting Time phase.
When the data that computer is downloaded are not carry the data of importance mark and mark expired time, or calculate When the mark of importance entrained by the data that machine is downloaded and mark expired time do not meet preset requirement, computer can be in number After being downloaded, importance mark is added for the data, and be importance mark setting mark expired time.In this way, can So that computer successfully gets the importance mark of data and the mark expired time of data.
In one embodiment, as shown in Fig. 2, after the step of data are downloaded in step S160, the above method It can also include the following steps S170:
S170: the downloaded data of storage, wherein the disk of the downloaded data of storage is correspondingly provided with mapping table, maps It include: the mark of the marks of the data stored in the disk, the importance of data mark and importance mark in table Time phase;
After step S160, the further comprising the steps of S180 of the above method:
S180: the mark expired time of added importance mark and importance mark is recorded under storage institute In the corresponding mapping table of the disk of the data of load.
In the present embodiment, the data downloaded can be stored in disk by computer.The mark of above-mentioned data can To be the unique identifier of data, the mark of data for example be can be " 121b60c99a446f7.f4v ", and the mark of data can also To be other for marking and identifying the mark of data.
In the present embodiment, specifically can by the mark of the data stored, for weight added by the data that are stored The mark expired time of the importance mark for the data that the property wanted is identified and stored, is recorded the magnetic for storing downloaded data In the corresponding mapping table of disk.
In present embodiment, when the disk that the importance mark of data is recorded to the storage data with mark expired time After in corresponding mapping table, data can be inquired and deleted by mapping table, in this way, data can be inquired more quickly, The efficiency that data are deleted is improved, and the scope of application and scalability of the data-erasure method of the embodiment of the present invention can be improved.
In embodiments of the present invention, can for each mapping table distribute a thread, thread be used to execute data modification, The operations such as insertion, inquiry, deletion.A thread is individually distributed for each mapping table, it is possible to reduce multiple threads operate simultaneously to be reflected The phenomenon that firing table, thus the phenomenon that mapping table outage probability increases caused by reducing because of frequent operation mapping table.In the present invention In embodiment, a message queue can also be arranged for per thread can be by this multiple operation when there is multiple operation tasks Task is put into message queue, and thread successively extracts and execute each operation task from message queue, to reduce multiple behaviour As task be performed simultaneously caused by mapping table outage probability increase the phenomenon that.For example, if a certain in the mapping table of disk reflect For the expired time that the relationship of penetrating includes earlier than current time, the importance for including in the mapping relations is identified as first identifier, then counts Calculation machine can correspond to the one modification task of message queue insertion of thread to the disk, and the importance for including by the mapping relations identifies It is revised as second identifier.
In one embodiment, step S110 can be realized with S111~S112 according to the following steps:
S111: acquisition importance is identified as the nearest of the data of first identifier and is accessed time and default effective time, Wherein, the accessed time recently are as follows: the time that data the last time is accessed;
S112: by importance be identified as the data of first identifier time accessed recently and default effective time and, It is determined as the mark expired time that importance is identified as the data of first identifier.
The default effective time of accessed time and data recently that can store data in computer, works as computer In be stored with data time accessed recently and data default effective time when, computer can obtain data from local Time accessed recently and data default effective time.Specifically, can store the attribute letter of data in computer It ceases, may include the default effective time of data in the attribute information, is accessed the time recently, can also include in attribute information The other information of data, such as the store path of data.Computer can be from the local attribute information for obtaining data, and from acquisition Attribute information in extract time accessed recently and the effective time of data of data.
When data are accessed in away from nearest accessed time certain time, illustrate that there are also user is emerging to the data sense Interest illustrates have user to the number very well when data are not visited in away from nearest accessed time certain time According to interested, present embodiment is dynamically determined the expired time of data according to the default effective time of data, can make institute Determining expired time more meets the actual access demand of user, so that the data deleted be made also more to meet the actual access of user Demand.
In one embodiment, step S150 can be realized with S151~S152 according to the following steps:
S151: the pre- nearest accessed time for deleting data is obtained, wherein the accessed time recently are as follows: data nearest one The secondary accessed time.
Computer locally can store the nearest accessed time of each data, when each data are locally stored in computer Recently when the accessed time, computer can obtain the pre- nearest accessed time for deleting data from local.
S152: according to the acquired nearest accessed time, the data to be deleted of determination in data are deleted from pre-, and delete Identified data.
In a specific embodiment, step S152 can be realized according to the following steps: be determined most from pre- delete in data The time interval of nearly accessed time interval current time is greater than the data of the second prefixed time interval, and deletes identified number According to.Second prefixed time interval can determine according to the storage condition etc. of the renewal speed of data, computer, can also basis Other actual conditions determine that, when the renewal speed of data is very fast, the second prefixed time interval can be set to the short period Interval, when the occupancy of computer storage is higher, the second prefixed time interval can be set to short period of time.For example, Second prefixed time interval can be any time interval in 1 day~10 days, be also possible to other times interval, and the present invention is real Example is applied not limit specifically.
When the time interval of the time interval current time accessed recently of data is greater than the second prefixed time interval, explanation The time that data the last time is accessed is more early, i.e., data are not visited within away from the current time long period, at this point, saying Bright data are not interested or when having been subjected to by user, delete these data to discharge the memory space of computer, can be with Data when those have been subjected to more accurately are deleted, influence of the data deletion to user is reduced.
In another embodiment specific implementation mode, step S152 can also be realized according to the following steps: according to each pre- deletion data The nearest accessed sequence of time from morning to night, successively select preset quantity data from each pre- deletion data, and delete The preset quantity data of selection.The occurrence of preset quantity can update demand store to computer, calculating according to data The actual conditions such as size, the storage occupancy situation of computer, the input/output pressure of computer storage of the data stored in machine To determine.For example, preset quantity can be set to the larger value, work as meter when the demand that data update stores computer is larger When the data stored in calculation machine take up space smaller, preset quantity can be set to the larger value.Those skilled in the art can root The occurrence of preset quantity is set according to actual conditions, and the embodiment of the present invention does not limit specifically.Most according to each pre- deletion data It is accessed the sequence of time from morning to night closely to delete data, the data deleted can be made more to be consistent with the preference of user, in this way Data when can more accurately delete the uninterested data of user or have been subjected to retain the interested data of user.
Nearest due to data is accessed the time can reflect out when whether data have been subjected to or whether data are to user Also attractive, present embodiment deletes data according to the nearest accessed time of data, can make the data and use deleted The preference at family is more consistent, so as to more targetedly carry out the deletion of data.
In one embodiment, step S110 may comprise steps of:
Judge that importance is identified as the data of first identifier and whether is accessed;
If so, acquisition importance is identified as the nearest interviewed of the data of first identifier from the accessed time of record Ask the time;
If not, the time that the data that importance is identified as first identifier are downloaded, which is determined as importance, is identified as first The nearest accessed time of the data of mark.
When the executing subject of data-erasure method provided in an embodiment of the present invention is CDN cache server, above-mentioned data The time being downloaded can be with are as follows: the time that data are downloaded from global storage, wherein the overall situation is stored as the source clothes that data are stored Business device.
After data are downloaded to computer, it can may just be accessed by the user, be downloaded in data after a period of time It not will record the accessed time of data after computer, before being accessed by the user, in computer, it in this case, can be by number It is determined as the nearest accessed time of data according to the time for being downloaded to computer, to keep computer available to each number According to the nearest accessed time.
Corresponding with above-mentioned data-erasure method, the embodiment of the invention also provides a kind of data deletion apparatus, such as Fig. 3 institute Show, which includes:
Time acquisition unit 310, the mark expired time for being identified as the data of first identifier for obtaining importance, In, the importance mark indicates whether data are significant datas, the first identifier are as follows: indicates that data are the mark of significant data Know;
Time supervision unit 320, for whether monitoring acquired mark expired time earlier than current time;
Mark modification unit 330, for when the monitoring result of the time supervision unit be when, by acquired mark The importance mark of the corresponding data of expired time is changed to second identifier, wherein the second identifier are as follows: indicates that data are non-heavy Want the mark of data;
Data selection unit 340, for selecting data corresponding to the second identifier to delete data as pre-;
Data delete unit 350, for carrying out data deletion for the pre- deletion data.
Data deletion apparatus provided in an embodiment of the present invention distinguishes significant data and insignificant data with importance mark, It is not necessary that significant data and insignificant data are respectively stored in different memory spaces, there is no need to carry out memory space again Distribution, is stored again without to data, so as to simplify the operating process of data deletion, improve the effect of data deletion Rate.
In one embodiment, described device can also include:
Data setting unit, for adding importance mark for the data, and be described important after data are downloaded Property mark setting mark expired time.
In one embodiment, described device can also include:
Data storage cell, for storing downloaded data, wherein the disk of the downloaded data of storage is correspondingly provided with Mapping table, includes: the marks of the data stored in the disk, the importance of data mark in the mapping table and this is important Property mark mark expired time;
Information recording unit, for remembering the mark expired time of added importance mark and importance mark It records in the corresponding mapping table of disk for storing downloaded data.
In one embodiment, the time acquisition unit 310 may include:
Time and duration obtain subelement, when being identified as data nearest of first identifier for obtaining importance and being accessed Between and default effective time, wherein the time accessed recently are as follows: accessed time data the last time;
Mark expired time determine subelement, for importance is identified as first identifier data it is nearest be accessed when Between with default effective time and, be determined as the mark expired time that importance is identified as the data of first identifier.
In one embodiment, the data delete unit 350, may include:
Time obtains subelement, for obtaining the pre- nearest accessed time for deleting data, wherein the quilt recently Access time are as follows: the time that data the last time is accessed;
Data delete subelement, for being determined from the pre- deletion data according to the acquired nearest accessed time The data to be deleted, and delete identified data.
The embodiment of the invention also provides a kind of computers, as shown in figure 4, including processor 401, communication interface 402, depositing Reservoir 403 and communication bus 404, wherein processor 401, communication interface 402, memory 403 are completed by communication bus 404 Mutual communication,
Memory 403, for storing computer program;
Processor 401 when for executing the program stored on memory 403, realizes following steps:
Obtain the mark expired time that importance is identified as the data of first identifier, wherein the importance mark indicates Whether data are significant datas, the first identifier are as follows: indicate that data are the mark of significant data;
Whether the acquired mark expired time of monitoring is earlier than current time;
If earlier than, the importance mark of the acquired corresponding data of mark expired time is changed to second identifier, In, the second identifier are as follows: indicate that data are the mark of insignificant data;
Data corresponding to the second identifier are selected to delete data as pre-;
Data deletion is carried out for the pre- deletion data.
Computer provided in an embodiment of the present invention is distinguished significant data and insignificant data with importance mark, is not necessarily to Significant data and insignificant data are respectively stored in different memory spaces, there is no need to carry out dividing again for memory space Match, stored again without to data, so as to simplify the operating process of data deletion, improve the effect of data deletion Rate.
The communication bus that above-mentioned computer is mentioned can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned server and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with instruction in storage medium, when run on a computer, so that computer executes any institute in above-described embodiment The data-erasure method stated.
In another embodiment provided by the invention, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that computer executes any data-erasure method in above-described embodiment.
For device/computer/storage medium/program product embodiment, implement since it is substantially similar to method Example, so being described relatively simple, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device/ For computer/storage medium embodiment, since it is substantially similar to the method embodiment, so be described relatively simple, it is related Place illustrates referring to the part of embodiment of the method.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (12)

1. a kind of data-erasure method, which is characterized in that the described method includes:
Obtain the mark expired time that importance is identified as the data of first identifier, wherein the importance mark indicates data It whether is significant data, the first identifier are as follows: indicate that data are the mark of significant data;
Whether the acquired mark expired time of monitoring is earlier than current time;
If earlier than the importance mark of the acquired corresponding data of mark expired time second identifier is changed to, wherein institute State second identifier are as follows: indicate that data are the mark of insignificant data;
Data corresponding to the second identifier are selected to delete data as pre-;
Data deletion is carried out for the pre- deletion data.
2. the method according to claim 1, wherein being identified as the data of first identifier in the acquisition importance Mark expired time the step of before, the method also includes:
After data are downloaded, when being identified for data addition importance, and identifying expired for importance mark setting Between.
3. according to the method described in claim 2, it is characterized in that, after the step of data are downloaded, the method Further include:
Store downloaded data, wherein the disk of the downloaded data of storage is correspondingly provided with mapping table, wraps in the mapping table It includes: the mark expired time that mark, the importance of data mark and importance of the data stored in the disk identify;
It is described for the data add importance mark, and for the importance mark setting mark expired time the step of it Afterwards, the method also includes:
By the mark expired time of added importance mark and importance mark, it is recorded and stores downloaded data In the corresponding mapping table of disk.
4. the method according to claim 1, wherein the acquisition importance is identified as the data of first identifier Identify expired time, comprising:
Acquisition importance is identified as the nearest of the data of first identifier and is accessed time and default effective time, wherein described The accessed time recently are as follows: the time that data the last time is accessed;
By importance be identified as the data of first identifier time accessed recently and default effective time and, be determined as important Property is identified as the mark expired time of the data of first identifier.
5. method according to claim 1 to 4, which is characterized in that described to carry out data for the pre- deletion data It deletes, comprising:
Obtain the pre- nearest accessed time for deleting data, wherein the accessed time recently are as follows: data are the last The accessed time;
According to the acquired nearest accessed time, the data to be deleted of determination from pre- the deletions data, and delete it is true Fixed data.
6. a kind of data deletion apparatus, which is characterized in that described device includes:
Time acquisition unit, the mark expired time for being identified as the data of first identifier for obtaining importance, wherein described heavy The property wanted mark indicates whether data are significant datas, the first identifier are as follows: indicates that data are the mark of significant data;
Time supervision unit, for whether monitoring acquired mark expired time earlier than current time;
Mark modification unit, for when the monitoring result of the time supervision unit, which is, is, when acquired mark is expired Between corresponding data importance mark be changed to second identifier, wherein the second identifier are as follows: expressions data be insignificant data Mark;
Data selection unit, for selecting data corresponding to the second identifier to delete data as pre-;
Data delete unit, for carrying out data deletion for the pre- deletion data.
7. device according to claim 6, which is characterized in that described device further include:
Data setting unit, for adding importance mark for the data, and be the importance mark after data are downloaded Know setting mark expired time.
8. device according to claim 7, which is characterized in that described device further include:
Data storage cell, for storing downloaded data, wherein the disk of the downloaded data of storage is correspondingly provided with mapping Table includes: the mark, the importance of data mark and the importance mark of the data stored in the disk in the mapping table The mark expired time of knowledge;
Information recording unit, for being recorded the mark expired time of added importance mark and importance mark In the corresponding mapping table of disk for storing downloaded data.
9. device according to claim 6, which is characterized in that the time acquisition unit, comprising:
Time and duration obtain subelement, for obtain importance be identified as first identifier data it is nearest be accessed the time with And default effective time, wherein the accessed time recently are as follows: the time that data the last time is accessed;
Mark expired time determines subelement, for importance is identified as the data of first identifier the nearest accessed time and The sum of default effective time, is determined as the mark expired time that importance is identified as the data of first identifier.
10. according to any device of claim 6-9, which is characterized in that the data delete unit, comprising:
Time obtains subelement, for obtaining the pre- nearest accessed time for deleting data, wherein described accessed recently Time are as follows: the time that data the last time is accessed;
Data delete subelement, for according to the acquired nearest accessed time, determination will to be deleted from the pre- deletion data The data removed, and delete identified data.
11. a kind of computer, which is characterized in that including processor, communication interface, memory and communication bus, wherein the place Reason device, the communication interface, the memory complete mutual communication by the bus;
The memory, for storing computer program;
The processor realizes any method of claim 1-5 for executing the program stored on the memory Step.
12. a kind of computer readable storage medium, which is characterized in that computer program is stored in the storage medium, it is described Claim 1-5 any method and step is realized when computer program is executed by processor.
CN201910457514.2A 2019-05-29 2019-05-29 Data deleting method and device, computer and storage medium Active CN110187836B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910457514.2A CN110187836B (en) 2019-05-29 2019-05-29 Data deleting method and device, computer and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910457514.2A CN110187836B (en) 2019-05-29 2019-05-29 Data deleting method and device, computer and storage medium

Publications (2)

Publication Number Publication Date
CN110187836A true CN110187836A (en) 2019-08-30
CN110187836B CN110187836B (en) 2022-09-02

Family

ID=67718478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910457514.2A Active CN110187836B (en) 2019-05-29 2019-05-29 Data deleting method and device, computer and storage medium

Country Status (1)

Country Link
CN (1) CN110187836B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111014A (en) * 2021-04-07 2021-07-13 山东英信计算机技术有限公司 Method, device and equipment for cleaning non-hot data in cache and storage medium
CN113849131A (en) * 2021-09-28 2021-12-28 咪咕文化科技有限公司 Data storage method and device, computing equipment and storage medium
CN114281250A (en) * 2021-12-01 2022-04-05 上海闪马智能科技有限公司 Method and device for cleaning storage file, storage medium and electronic device

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060242203A1 (en) * 2002-09-09 2006-10-26 Pferdekaeemper Thorsten Methods and systems for data moving using locks
CN104516792A (en) * 2013-10-08 2015-04-15 杰发科技(合肥)有限公司 Data backup method and device
CN104601675A (en) * 2014-12-29 2015-05-06 小米科技有限责任公司 Server load balancing method and device
CN107025289A (en) * 2017-04-14 2017-08-08 腾讯科技(深圳)有限公司 The method and relevant device of a kind of data processing
CN107451190A (en) * 2017-06-26 2017-12-08 北京五八信息技术有限公司 Can persistence non-relational database data processing method and device
CN108932236A (en) * 2017-05-22 2018-12-04 北京金山云网络技术有限公司 A kind of file management method, scratch file delet method and device
CN109213604A (en) * 2018-10-15 2019-01-15 北京奇艺世纪科技有限公司 A kind of management method and device of data source
CN109408469A (en) * 2018-09-05 2019-03-01 中国平安人寿保险股份有限公司 Stale data document handling method, device, electronic device and storage medium
CN112948363A (en) * 2021-02-03 2021-06-11 北京金山云网络技术有限公司 Data processing method and device, electronic equipment and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060242203A1 (en) * 2002-09-09 2006-10-26 Pferdekaeemper Thorsten Methods and systems for data moving using locks
CN104516792A (en) * 2013-10-08 2015-04-15 杰发科技(合肥)有限公司 Data backup method and device
CN104601675A (en) * 2014-12-29 2015-05-06 小米科技有限责任公司 Server load balancing method and device
CN107025289A (en) * 2017-04-14 2017-08-08 腾讯科技(深圳)有限公司 The method and relevant device of a kind of data processing
CN108932236A (en) * 2017-05-22 2018-12-04 北京金山云网络技术有限公司 A kind of file management method, scratch file delet method and device
CN107451190A (en) * 2017-06-26 2017-12-08 北京五八信息技术有限公司 Can persistence non-relational database data processing method and device
CN109408469A (en) * 2018-09-05 2019-03-01 中国平安人寿保险股份有限公司 Stale data document handling method, device, electronic device and storage medium
CN109213604A (en) * 2018-10-15 2019-01-15 北京奇艺世纪科技有限公司 A kind of management method and device of data source
CN112948363A (en) * 2021-02-03 2021-06-11 北京金山云网络技术有限公司 Data processing method and device, electronic equipment and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113111014A (en) * 2021-04-07 2021-07-13 山东英信计算机技术有限公司 Method, device and equipment for cleaning non-hot data in cache and storage medium
CN113849131A (en) * 2021-09-28 2021-12-28 咪咕文化科技有限公司 Data storage method and device, computing equipment and storage medium
CN114281250A (en) * 2021-12-01 2022-04-05 上海闪马智能科技有限公司 Method and device for cleaning storage file, storage medium and electronic device

Also Published As

Publication number Publication date
CN110187836B (en) 2022-09-02

Similar Documents

Publication Publication Date Title
AU2009220127B2 (en) Dynamic formulas for spreadsheet cells
CN110187836A (en) A kind of data-erasure method, device, computer and storage medium
WO2017096892A1 (en) Index construction method, search method, and corresponding device, apparatus, and computer storage medium
TW201237665A (en) Determining preferred categories based on user access attribute values
CN109861878A (en) The monitoring method and relevant device of the topic data of kafka cluster
CN107506376B (en) Client for acquiring data of information point in area
CN105608117A (en) Information recommendation method and apparatus
CN105869057B (en) Comment storage device, comment reading method and device, and comment writing method and device
CN104978324A (en) Data processing method and device
CN104281717B (en) A kind of method for setting up magnanimity ID mapping relations
CN106708912B (en) Junk file identification and management method, identification device, management device and terminal
CN112286459A (en) Data processing method, device, equipment and medium
CN103186660B (en) Information source selection system, information source system of selection
CN110737717B (en) Database migration method and device
CN110008197A (en) A kind of data processing method, system and electronic equipment and storage medium
CN104462577A (en) Data storing method and device
CN104144127A (en) Load balancing method and device
CN115438087A (en) Data query method and device based on cache library, storage medium and equipment
CN113760187B (en) Method, system, terminal and storage medium for generating deduplication IO thread
TWI534704B (en) Processing method for time series and system thereof
CN106961670B (en) Geo-fencing system and working method based on distributed structure/architecture
CN110187840A (en) A kind of data migration method, device, server and storage medium
CN107453950B (en) Information processing method and monitoring system
CN104933066A (en) Data processing method and system
CN109144960A (en) The method and system of data pre-fetching are carried out in mobile Internet according to regional scope

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