CN113672562A - Data deleting method, device, equipment and storage medium - Google Patents

Data deleting method, device, equipment and storage medium Download PDF

Info

Publication number
CN113672562A
CN113672562A CN202010408886.9A CN202010408886A CN113672562A CN 113672562 A CN113672562 A CN 113672562A CN 202010408886 A CN202010408886 A CN 202010408886A CN 113672562 A CN113672562 A CN 113672562A
Authority
CN
China
Prior art keywords
document
field
failure
target
distributed
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
CN202010408886.9A
Other languages
Chinese (zh)
Other versions
CN113672562B (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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010408886.9A priority Critical patent/CN113672562B/en
Publication of CN113672562A publication Critical patent/CN113672562A/en
Application granted granted Critical
Publication of CN113672562B publication Critical patent/CN113672562B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2291User-Defined Types; Storage management thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Quality & Reliability (AREA)
  • Human Computer Interaction (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a data deleting method, a data deleting device, data deleting equipment and a storage medium. The method comprises the following steps: detecting a field failure characteristic of a target document field from a distributed document storage database, wherein the target document field is a field set by the distributed document storage database for a stored document; judging whether the field failure characteristics of the target document field meet the field failure rule or not; and deleting the target document field after determining that the field failure characteristics of the target document field meet the field failure rule. Therefore, the fields aiming at the documents in the database, namely the document fields, are deleted, and the long-term storage space occupation of the document fields is avoided.

Description

Data deleting method, device, equipment and storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a data deleting method, apparatus, device, and storage medium.
Background
MongoDB, based on a database stored in a distributed file, provides a data deletion function for a document, that is, a document is deleted at a specified Time by using a Time To Live (TTL) setting mode, but in practical application, not only a document is required To be deleted, but also document fields are required To be deleted, and particularly, after the document is deleted, the document fields corresponding To the deleted document are also required To be deleted, but the existing method is not realized, so that the document fields are stored for a long Time and occupy storage space.
Disclosure of Invention
In order to solve the above problems, the present invention provides a data deleting method, apparatus, device and storage medium, which can delete a field in a database for a document, that is, a document field, and effectively avoid that the document field occupies a storage space for a long time.
In a first aspect, an embodiment of the present application provides a data deletion method, including:
detecting a field failure characteristic of a target document field from a distributed document storage database, wherein the target document field is a field set by the distributed document storage database for a stored document;
judging whether the field failure characteristics of the target document field meet the field failure rule or not;
and deleting the target document field after determining that the field failure characteristics of the target document field meet the field failure rule.
Here, since the embodiment of the present application is provided with the field-level failure feature information, that is, the field failure feature is provided for the document field, in this way, the corresponding document field is deleted when it is determined that the field failure feature satisfies the field failure rule, so that the document field is prevented from occupying the storage space for a long time, and a foundation is laid for improving the utilization rate of the storage space.
In a specific embodiment, before the detecting the field failure feature of the target document field from the distributed document storage database, the method further includes:
detecting a target failure characteristic corresponding to a stored document from a distributed document storage database, wherein the target failure characteristic is determined based on a field failure characteristic of a document field corresponding to the document;
judging whether the target failure characteristics meet a document failure rule or not;
and after determining that the target failure characteristics meet the document failure rule, executing the field failure characteristics of the target document field detected from the distributed document storage database.
In the specific embodiment, the target failure characteristics are set for the document and are determined based on the field failure characteristics of the document field corresponding to the document, so that the field failure characteristics of the document field in the document are represented by the target failure characteristics, a foundation is laid for effectively screening out the document needing document field deletion processing, and a foundation is laid for subsequently deleting the document field.
Furthermore, the embodiment can effectively screen out the document which needs to be subjected to the document field deleting operation, and simultaneously can screen out the target document field which needs to be subjected to the deleting operation so as to delete the target document field, so that the document field is prevented from occupying the storage space for a long time, and a foundation is laid for improving the utilization rate of the storage space.
In another specific embodiment, the field failure characteristics indicate the failure time of the document field, and the target failure characteristics are the minimum value of the failure times of all document fields corresponding to the document.
Here, this embodiment provides a specific way to determine the target failure feature, that is, the minimum value of the failure time of all document fields in the document is used as the target failure feature, so that a simple and easy-to-implement method is provided for effectively screening out documents requiring document field deletion operation.
In another specific embodiment, the detecting field failure characteristics of the target document field from the distributed document storage database includes: and detecting the sub-field of the target document field from the distributed document storage database to obtain the field failure characteristic of the target document field.
In another specific embodiment, the detecting the target failure characteristics corresponding to the stored documents from the distributed document storage database includes: and detecting a characteristic field corresponding to the document from the distributed document storage database to obtain a target failure characteristic corresponding to the document.
The specific embodiment takes the field failure characteristics as the sub-fields of the document field, namely, the field failure characteristics are characterized by the field; or the target failure characteristics are used as the characteristic fields of the document, namely the characteristic fields are used for representing the target failure characteristics, so that the foundation is laid for maximizing the function improvement realization efficiency compatible with the existing database, the method is simple and convenient to realize, and the foundation is laid for the subsequent engineering application.
In another specific embodiment, the method further comprises: detecting an update operation for the target document field; and after the update operation is determined to be completed, updating the target failure characteristics of the document corresponding to the target document field, so that the updated target failure characteristics of the document are matched with the updated field failure characteristics of the target document field.
The target failure characteristics can be updated correspondingly according to the deletion operation of the target document field, so that the accuracy of the target failure characteristics is ensured, and a foundation is laid for effectively locking the document needing document field deletion again and deleting the target document field to the maximum extent and most accurately.
In another specific embodiment, the detecting the target failure characteristics corresponding to the stored documents from the distributed document storage database includes: and traversing the index of the distributed document storage database to obtain the target failure characteristics corresponding to the document.
In the method, the index aiming at the target failure characteristics is generated, so that the possibility is provided for quickly detecting the document needing to be subjected to document field deletion, and a foundation is laid for quickly realizing the scheme of the application.
In a second aspect, an embodiment of the present application provides a data deleting device, including:
a detection unit, configured to detect a field failure feature of a target document field from a distributed document storage database, where the target document field is a field set by the distributed document storage database for a stored document;
the judging unit is used for judging whether the field failure characteristics of the target document field meet the field failure rules or not;
and the deleting unit is used for deleting the target document field after determining that the field failure characteristics of the target document field meet the field failure rule.
The detection unit is further used for detecting a target failure characteristic corresponding to a stored document from a distributed document storage database, wherein the target failure characteristic is determined based on a field failure characteristic of a document field corresponding to the document;
the judging unit is also used for judging whether the target failure characteristics meet the document failure rule or not;
the detection unit is further configured to execute the field failure feature of the target document field detected from the distributed document storage database after determining that the target failure feature satisfies the document failure rule.
In a specific embodiment, the field failure characteristics indicate failure times of the document fields, and the target failure characteristics are a minimum value of the failure times of all document fields corresponding to the document.
In a specific embodiment, the detecting unit is further configured to detect a subfield of the target document field from the distributed document storage database, and obtain a field failure feature of the target document field.
In a specific embodiment, the detecting unit is further configured to detect a feature field corresponding to the document from the distributed document storage database, so as to obtain a target failure feature corresponding to the document.
In a specific embodiment, the detection unit is further configured to:
detecting an update operation for the target document field;
and after the update operation is determined to be completed, updating the target failure characteristics of the document corresponding to the target document field, so that the updated target failure characteristics of the document are matched with the updated field failure characteristics of the target document field.
In a specific embodiment, the detection unit is further configured to traverse an index of the distributed document storage database to obtain a target failure feature corresponding to the document.
In a third aspect, an embodiment of the present application provides a data deleting device, including:
one or more processors;
a memory communicatively coupled to the one or more processors;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method described above.
In this way, since the embodiment of the application is provided with the field-level failure feature information, that is, the field failure feature is set for the document field, in this way, the corresponding document field is deleted under the condition that the field failure feature is determined to meet the field failure rule, so that the document field is prevented from occupying the storage space for a long time, and a foundation is laid for improving the utilization rate of the storage space.
Drawings
FIG. 1 is a schematic diagram of a flow chart of a data deleting method according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of a data deleting device according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a data deletion apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In some of the flows described in the specification and claims of the present application and in the above-described figures, a number of operations are included that occur in a particular order, but it should be clearly understood that the flows may include more or less operations, and that the operations may be performed sequentially or in parallel.
In an actual scene, when a large number of temporary attributes need to be stored for an object, a temporary field is set, but in the prior art, deletion operation for a field level cannot be supported, that is, an effective mechanism cannot be set to delete a document field, so that a problem that the temporary field occupies a storage space for long-term storage exists, at this time, if the temporary field is deleted, a user needs to implement a system to complete cleaning work, obviously, extra workload is increased, and efficiency is reduced.
Based on this, the embodiment of the application provides a data deleting method, device, equipment and storage medium; specifically, fig. 1 is a schematic flow chart of an implementation process of a data deletion method according to an embodiment of the present invention, and as shown in fig. 1, the method includes:
step 101: detecting a field failure characteristic of a target document field from a distributed document storage database, wherein the target document field is a field set by the distributed document storage database for a stored document.
In a specific example, before detecting a field failure feature of a document field from a distributed document storage database, a target failure feature may be set for a document, where the target failure feature is determined based on the field failure feature of the document field corresponding to the document, and then the target failure feature corresponding to the stored document is detected from the distributed document storage database, and whether the target failure feature satisfies a document failure rule is determined, and after determining that the target failure feature satisfies the document failure rule, the field failure feature of the target document field is detected from the distributed document storage database. Here, a document whose target failure characteristics satisfy the document failure rule may be used as a target document, and then it may be detected whether field failure characteristics of a field of the target document in the target document satisfy the field failure rule.
In practical applications, the field failure feature may specifically include at least one of the following information: time to failure, timing of failure (e.g., failure conditions, etc.), manner of failure, etc. Accordingly, the target failure characteristics may also include at least one of the following information: time to failure, timing of failure (e.g., failure conditions, etc.), manner of failure, etc. Of course, in practical application, the target failure characteristics can be set according to actual requirements.
In a specific example, the field failure characteristics indicate failure times of the document fields, and the target failure characteristics are the minimum value of the failure times of all document fields corresponding to the document. Therefore, the method lays a foundation for maximizing and locking the target document field most quickly. At this time, the field failure rule may specifically be a preset failure time, and the document failure rule may specifically be a preset failure time, and in a specific example, the preset failure time indicated by the field failure rule is the same as the preset failure time indicated by the document failure rule.
In a specific example, the field failure feature may be characterized by a field, or the target failure feature may be characterized by a field, and specifically, the field failure feature is used as a subfield of a document field, so that the subfield can characterize the failure feature of the document field, at this time, the detecting the field failure feature of the target document field from the distributed document storage database includes: and detecting the sub-field of the target document field from the distributed document storage database to obtain the field failure characteristic of the target document field. Therefore, a specific feasible scheme is provided, a foundation is laid for subsequent engineering application, meanwhile, the functions of the existing database can be maximally compatible, the implementation efficiency is improved, and the method is simple and convenient to implement.
In another specific example, the target failure characteristics may be used as a characteristic field of the document, so that the characteristic field can characterize the failure characteristics of the document field in the document. At this time, the detecting the target failure characteristics corresponding to the stored documents from the distributed document storage database includes: and detecting a characteristic field corresponding to the document from the distributed document storage database to obtain a target failure characteristic corresponding to the document. Therefore, a specific feasible scheme is provided, a foundation is laid for subsequent engineering application, meanwhile, the functions of the existing database can be maximally compatible, the implementation efficiency is improved, and the method is simple and convenient to implement.
In practical application, considering that there is an operation of modifying a field failure feature of a document field, or adding or deleting a document field, at this time, in order to improve accuracy of the scheme of the present application, it is necessary to update the field failure feature synchronously, specifically, an update operation for a document is detected, where the update operation for the document includes: updating field failure characteristics of at least one document field corresponding to the document (for example, modifying, deleting or adding information and the like), and/or deleting or adding operation (for example, deleting a certain document field corresponding to the document or adding a document field newly); and then, after the update operation aiming at the document is determined to be completed, the target failure characteristics of the document are updated, so that the target failure characteristics of the updated document can be matched with the field failure characteristics of the document field corresponding to the updated document, and thus, a foundation is laid for deleting the target document field to the maximum extent and most accurately.
In practical application, there is also an updating operation for the document field, for example, deleting the target document field, on the basis of which, the method and the device for detecting the target document field to be deleted can ensure that the scheme of the application can continuously detect one or more (two or more) target document fields to be deleted, update the target failure characteristics of the target document, thus ensure the accuracy of the target failure characteristics, and lay the foundation for maximally and most accurately deleting the target document field. The specific implementation mode comprises the following steps: detecting an update operation for the target document field; and after the update operation is determined to be completed, updating the target failure characteristics of the document corresponding to the target document field, so that the updated target failure characteristics of the document are matched with the updated field failure characteristics of the target document field.
Step 102: and judging whether the field failure characteristics of the target document field meet the field failure rule.
Step 103: and deleting the target document field after determining that the field failure characteristics of the target document field meet the field failure rule.
In a specific example, the determining whether the field failure characteristics of the target document field satisfy the field failure rules may specifically be: judging whether the failure time of the target document field is less than the current time, if so, determining that a field failure rule is met, and deleting the target document field; otherwise, the field invalidation rule is not satisfied.
Of course, in another example, the determining whether the target failure feature satisfies the document failure rule may specifically be: judging whether the failure time indicated by the target failure feature is less than the current time, if so, determining that a document failure rule is met, taking the document corresponding to the target failure feature meeting the document failure rule as a target document, and further executing the step 101 to detect a target document field in the target document; otherwise, the document invalidation rules are not considered satisfied. In the process, the document field needing to be deleted can be quickly found by searching all documents with the minimum failure time and then judging whether the target failure characteristics of the document with the minimum failure time meet the document failure rule.
In a specific example, the scheme of the application can also consider deletion operation for the document, specifically, detect the document failure characteristics of the document in the distributed document storage database to obtain the document meeting the preset failure rule, and delete the document meeting the preset failure rule. Wherein the document failure characteristics may include at least one of the following information: time to failure, timing of failure (e.g., failure conditions, etc.), manner of failure, etc. Here, taking the case that the document expiration feature includes expiration time as an example, at this time, the expiration time of the document may be compared with the current expiration time, and the document whose expiration time is less than the current expiration time may be regarded as a document to be deleted and subjected to deletion processing.
In practical application, the index can be used to improve the detection efficiency, that is: generating an index aiming at the characteristic field of the document, thus, the document which accords with the document failure rule can be quickly detected by using the index; or generating an index aiming at the target failure characteristics, and traversing the index of the distributed document storage database, so as to quickly obtain the target failure characteristics corresponding to the document.
In this way, since the embodiment of the application is provided with the field-level failure feature information, that is, the field failure feature is set for the document field, in this way, the corresponding document field is deleted under the condition that the field failure feature is determined to meet the field failure rule, so that the document field is prevented from occupying the storage space for a long time, and a foundation is laid for improving the utilization rate of the storage space.
MongoDB is taken as an example below, and the TTL function of the document field level is provided by using the scheme of the application; in particular, the amount of the solvent to be used,
for a document field needing setting field failure characteristics, such as TTL, adding an associated hidden field (the hidden field is invisible to a user) during storage, namely an expiration timestamp (expired _ at), wherein the data type is int 64; when a document field is set, the associated hidden field, that is, the expired timestamp (expired _ at) ═ current time + TTL.
Setting a target failure characteristic for a document, namely adding an associated hidden field, such as a minimum failure timestamp (min _ expired _ at), wherein the minimum failure timestamp is the minimum value of failure timestamps (expired _ at) of all document fields of the document, and the data type is int 64.
Here, in an actual scenario, if all the attributes of the document have no expiration timestamp set, the default value is the maximum value (0x7 fffffffffffffffff) that the type int64 can store.
In practical applications, when it is necessary to update the attribute (i.e. document field) of a document, for example, adding, modifying, or deleting a document field, the min _ amplified _ at value of the document is recalculated and updated.
The set (containing at least two documents) in MongoDB creates a hidden index on min _ highlighted _ at (the hidden index is invisible to the user), so that the document with the minimum min _ highlighted _ at value can be searched within O (1) time complexity by using the hidden index.
After the hidden fields and the hidden indexes are built, the MongoDB starts a background thread, periodically queries a document (namely a target document) with the minimum min _ amplified _ at value, if the min _ amplified _ at value of the document is smaller than the current time, checks the amplified _ at value corresponding to each document field, deletes the document field with the amplified _ at value smaller than the current time, and updates the min _ amplified _ at of the document, thus periodically finishing the work of cleaning the document fields.
In this way, only 8 bytes of storage space need to be added for the temporary fields (i.e. document fields) of the document, and only 8 bytes of storage space need to be added for the document; meanwhile, on the basis of adding a background thread, the following functions can be realized:
firstly, the granularity supported by MongoDB for TTL is refined from the document level to the document field level, so that the improved flexibility greatly expands the use scene.
Secondly, MongoDB can regularly clean out-of-date temporary fields, so that storage space is saved, and development workload of database users is reduced.
An embodiment of the present application further provides a data deleting device, as shown in fig. 2, the device includes:
a detection unit 21 configured to detect a field failure feature of a target document field from a distributed document storage database, wherein the target document field is a field set by the distributed document storage database for a stored document;
a judging unit 22, configured to judge whether a field failure characteristic of the target document field satisfies a field failure rule;
and the deleting unit 23 is configured to delete the target document field after determining that the field failure feature of the target document field meets the field failure rule.
In a specific embodiment, the detecting unit 21 is further configured to detect a target failure feature corresponding to a stored document from a distributed document storage database, where the target failure feature is determined based on a field failure feature of a document field corresponding to the document;
the judging unit 22 is further configured to judge whether the target failure feature satisfies a document failure rule;
the detecting unit 21 is further configured to, after determining that the target failure feature satisfies the document failure rule, execute the field failure feature of the target document field detected from the distributed document storage database.
In a specific embodiment, the field failure characteristics indicate failure times of the document fields, and the target failure characteristics are a minimum value of the failure times of all document fields corresponding to the document.
In a specific embodiment, the detecting unit 21 is further configured to detect a subfield of the target document field from the distributed document storage database, so as to obtain a field failure feature of the target document field.
In a specific embodiment, the detecting unit 21 is further configured to detect a feature field corresponding to the document from the distributed document storage database, so as to obtain a target failure feature corresponding to the document.
In an embodiment, the detecting unit 21 is further configured to:
detecting an update operation for the target document field;
and after the update operation is determined to be completed, updating the target failure characteristics of the document corresponding to the target document field, so that the updated target failure characteristics of the document are matched with the updated field failure characteristics of the target document field.
In a specific embodiment, the detecting unit 21 is further configured to traverse an index of the distributed document storage database to obtain a target failure feature corresponding to the document.
Here, it should be noted that: the descriptions of the embodiments of the apparatus are similar to the descriptions of the methods, and have the same advantages as the embodiments of the methods, and therefore are not repeated herein. For technical details that are not disclosed in the embodiments of the apparatus of the present invention, those skilled in the art should refer to the description of the embodiments of the method of the present invention to understand, and for brevity, will not be described again here.
An embodiment of the present application further provides a data deleting device, including: one or more processors; a memory communicatively coupled to the one or more processors; one or more application programs; wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method described above.
In a specific example, the data deleting device according to the embodiment of the present application may be embodied as the structure shown in fig. 3, where the data deleting device at least includes a processor 31, a storage medium 32, and at least one external communication interface 33; the processor 31, the storage medium 32, and the external communication interface 33 are all connected by a bus 34. The processor 31 may be a microprocessor, a central processing unit, a digital signal processor, or a programmable logic array, etc. having processing functions. The storage medium has stored therein computer executable code capable of performing the method of any of the above embodiments. In practical applications, the detecting unit 21, the judging unit 22 and the deleting unit 23 can be implemented by the processor 31.
Here, it should be noted that: the description of the above device embodiment is similar to the description of the above method, and has the same beneficial effects as the method embodiment, and therefore, the description thereof is omitted. For technical details that are not disclosed in the embodiment of the data deleting device of the present invention, those skilled in the art should refer to the description of the embodiment of the method of the present invention to understand that, for the sake of brevity, detailed description is not repeated here.
Embodiments of the present application also provide a computer-readable storage medium, which stores a computer program, and when the program is executed by a processor, the computer program implements the method described above.
A computer-readable storage medium can be any means that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection (electronic device) having one or more wires, a portable computer diskette (magnetic device), a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable read-only memory (CDROM). Additionally, the computer-readable storage medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
It should be understood that all or part of the steps carried by the method for implementing the above embodiments can be implemented by hardware related to instructions of a program, which can be stored in a computer readable storage medium, and the program includes one or a combination of the steps of the method embodiments when the program is executed.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium. The storage medium may be a read-only memory, a magnetic or optical disk, or the like.
The embodiments described above are only a part of the embodiments of the present invention, and not all of them. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Claims (10)

1. A method for deleting data, the method comprising:
detecting a field failure characteristic of a target document field from a distributed document storage database, wherein the target document field is a field set by the distributed document storage database for a stored document;
judging whether the field failure characteristics of the target document field meet the field failure rule or not;
and deleting the target document field after determining that the field failure characteristics of the target document field meet the field failure rule.
2. The method of claim 1, wherein prior to said detecting a field failure characteristic of a target document field from a distributed document storage database, the method further comprises:
detecting a target failure characteristic corresponding to a stored document from a distributed document storage database, wherein the target failure characteristic is determined based on a field failure characteristic of a document field corresponding to the document;
judging whether the target failure characteristics meet a document failure rule or not;
and after determining that the target failure characteristics meet the document failure rule, executing the field failure characteristics of the target document field detected from the distributed document storage database.
3. The method of claim 2, wherein the field failure characteristics indicate failure times of the document fields, and the target failure characteristic is a minimum value of the failure times of all document fields corresponding to the document.
4. The method of any of claims 1 to 3, wherein detecting field failure characteristics of a target document field from a distributed document storage database comprises:
and detecting the sub-field of the target document field from the distributed document storage database to obtain the field failure characteristic of the target document field.
5. The method of claim 2, wherein detecting the target failure characteristics corresponding to the stored document from the distributed document storage database comprises:
and detecting a characteristic field corresponding to the document from the distributed document storage database to obtain a target failure characteristic corresponding to the document.
6. The method of claim 2, further comprising:
detecting an update operation for the target document field;
and after the update operation is determined to be completed, updating the target failure characteristics of the document corresponding to the target document field, so that the updated target failure characteristics of the document are matched with the updated field failure characteristics of the target document field.
7. The method of claim 2, wherein detecting the target failure characteristics corresponding to the stored document from the distributed document storage database comprises:
and traversing the index of the distributed document storage database to obtain the target failure characteristics corresponding to the document.
8. An apparatus for deleting data, the apparatus comprising:
a detection unit, configured to detect a field failure feature of a target document field from a distributed document storage database, where the target document field is a field set by the distributed document storage database for a stored document;
the judging unit is used for judging whether the field failure characteristics of the target document field meet the field failure rules or not;
and the deleting unit is used for deleting the target document field after determining that the field failure characteristics of the target document field meet the field failure rule.
9. A data deletion apparatus, comprising:
one or more processors;
a memory communicatively coupled to the one or more processors;
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1 to 7.
CN202010408886.9A 2020-05-14 2020-05-14 Data deleting method, device, equipment and storage medium Active CN113672562B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010408886.9A CN113672562B (en) 2020-05-14 2020-05-14 Data deleting method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010408886.9A CN113672562B (en) 2020-05-14 2020-05-14 Data deleting method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113672562A true CN113672562A (en) 2021-11-19
CN113672562B CN113672562B (en) 2024-01-16

Family

ID=78537331

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010408886.9A Active CN113672562B (en) 2020-05-14 2020-05-14 Data deleting method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113672562B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104239511A (en) * 2014-09-15 2014-12-24 西安交通大学 File system in user space implementation method oriented to MongoDB
US9047299B1 (en) * 2012-12-20 2015-06-02 Emc Corporation Reclaiming blocks from a directory
CN107402819A (en) * 2017-08-04 2017-11-28 郑州云海信息技术有限公司 The management method and system of a kind of client-cache
CN110018883A (en) * 2019-04-11 2019-07-16 苏州浪潮智能科技有限公司 A kind of virtual machine delet method, device, equipment and storage medium
CN110377616A (en) * 2019-07-30 2019-10-25 北京金山云网络技术有限公司 A kind of data-erasure method, device, electronic equipment and storage medium
CN110489433A (en) * 2019-07-11 2019-11-22 中国平安人寿保险股份有限公司 A kind of message treatment method and device, electronic equipment based on MongoDB
CN111061689A (en) * 2019-12-13 2020-04-24 北京金山云网络技术有限公司 File expiration processing method and device for object storage system and electronic equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9047299B1 (en) * 2012-12-20 2015-06-02 Emc Corporation Reclaiming blocks from a directory
CN104239511A (en) * 2014-09-15 2014-12-24 西安交通大学 File system in user space implementation method oriented to MongoDB
CN107402819A (en) * 2017-08-04 2017-11-28 郑州云海信息技术有限公司 The management method and system of a kind of client-cache
CN110018883A (en) * 2019-04-11 2019-07-16 苏州浪潮智能科技有限公司 A kind of virtual machine delet method, device, equipment and storage medium
CN110489433A (en) * 2019-07-11 2019-11-22 中国平安人寿保险股份有限公司 A kind of message treatment method and device, electronic equipment based on MongoDB
CN110377616A (en) * 2019-07-30 2019-10-25 北京金山云网络技术有限公司 A kind of data-erasure method, device, electronic equipment and storage medium
CN111061689A (en) * 2019-12-13 2020-04-24 北京金山云网络技术有限公司 File expiration processing method and device for object storage system and electronic equipment

Also Published As

Publication number Publication date
CN113672562B (en) 2024-01-16

Similar Documents

Publication Publication Date Title
CN108536745B (en) Shell-based data table extraction method, terminal, equipment and storage medium
CN103914439A (en) Method, device and system for online document edition
CN111190583A (en) Associated conflict block presenting method and equipment
CN110109867B (en) Method, apparatus and computer program product for improving online mode detection
CN113672562A (en) Data deleting method, device, equipment and storage medium
CN112433757A (en) Method and device for determining interface calling relationship
CN112000321A (en) Method and device for realizing undo and/or redo of three-dimensional detection software
CN114168119B (en) Code file editing method, device, electronic equipment and storage medium
CN116340318A (en) Method, device, equipment and storage medium for processing secondary index record
CN115544981A (en) Document processing method, document processing device, electronic device, storage medium, and program product
CN115480704A (en) Method, device and equipment for constructing data block group migration mapping table and storage medium
CN113676531B (en) E-commerce flow peak clipping method and device, electronic equipment and readable storage medium
CN111813749B (en) File filtering method and device, electronic equipment and storage medium
CN110532260B (en) Logic expression storage and reading method and device, electronic equipment and medium
CN110750268B (en) File cleaning method and device, computer readable storage medium and electronic equipment
US20220171788A1 (en) Data synchronization system, data synchronization apparatus, and data synchronization method
CN114741072B (en) Page generation method, device, equipment and storage medium
CN110896391A (en) Message processing method and device
CN112486404B (en) Method, apparatus and computer program product for managing memory blocks
CN114879889B (en) Processing method, processing device, revocation system, electronic equipment and storage medium
US20170139969A1 (en) Method for filtering and analyzing big data, electronic device, and non-transitory computer-readable storage medium
CN112783507B (en) Data stream guiding playback method and device, electronic equipment and readable storage medium
CN116881228A (en) Database system parameter migration method and device
CN111552667A (en) Data deleting method and device and electronic equipment
CN116149945A (en) Method, storage medium and device for collecting database statistical information

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
CB02 Change of applicant information

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Applicant before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant