Data deletion method and device, equipment, medium and product
By deleting a data field in the database and deleting its associated log records at the same time, it solves the problem of incomplete erasure of storage traces after deleting a data field, improves data security, and prevents data recovery.
Patent Information
- Application Number
- CN202410413021.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2024-10-18
AI Technical Summary
In the existing technology, after the data fields in the database are deleted, the storage traces are not completely erased, and attackers can use these records to recover the data, resulting in poor data security.
After receiving a request to delete a data field in the database, obtain and delete the log records associated with the data field to ensure that the data field and its associated log records are deleted at the same time to avoid data recovery through log records.
Improved data security, prevented the recovery of data fields through log records, and enhanced database security.
Smart Images

Figure CN118796775A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of database technology, and in particular relates to a data deletion method, device, equipment, medium and product. Background Art
[0002] With the advent of the big data era and the development of cloud computing and deep learning, more efficient data processing technologies have brought higher productivity while also causing a data security crisis. In particular, the deletion of a data field in the database does not mean that the storage traces of the data field are completely erased.
[0003] In the related art, in order to ensure data security, it is usually determined whether the sensitive field exists in the preset data security standard. If the sensitive field exists in the preset data security standard, the sensitive field is evaluated for data security to obtain the data security evaluation result. However, this method ignores the records of the data field itself in the database. Attackers may use these records to restore the deleted data field, and the data security is poor. Summary of the invention
[0004] The embodiments of the present application provide a data deletion method, device, equipment, medium and product, which can improve data security.
[0005] In a first aspect, an embodiment of the present application provides a data deletion method, comprising:
[0006] receiving a deletion request for a target data field in a target database;
[0007] In response to the deletion request, obtaining a log record associated with the target data field in a log of the target database;
[0008] Delete the target data field and log record.
[0009] In a second aspect, an embodiment of the present application provides a data deletion device, including:
[0010] A receiving module, used for receiving a deletion request for a target data field in a target database;
[0011] A first acquisition module, configured to acquire, in response to a deletion request, a log record associated with a target data field in a log of a target database;
[0012] The deletion module is used to delete target data fields and log records.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the steps of the data deletion method provided in the embodiment of the present application are implemented.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the data deletion method provided in the embodiment of the present application are implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes computer program instructions, and when the computer program instructions are executed by a processor, the steps of the data deletion method provided in the embodiment of the present application are implemented.
[0016] In an embodiment of the present application, after receiving a request to delete a target data field in a target database, a log record associated with the target data field in the log of the target database is obtained; and the target data field and the log record are deleted. In this way, the log record associated with the target data field in the log of the target database is deleted while the target data field is deleted, so that the target data field can be avoided from being restored through the log record associated with the target data field in the log of the target database, and data security can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 It is a flowchart of a data deletion method provided in an embodiment of the present application;
[0019] Figure 2 It is a structural diagram of a data deletion device provided in an embodiment of the present application;
[0020] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0022] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0023] The data deletion method, device, equipment, medium and product provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0024] Figure 1 Schematic diagram of the data deletion method provided in the embodiment of the present application. Figure 1 As shown, the data deletion method may include:
[0025] Step 101: receiving a deletion request for a target data field in a target database;
[0026] In some possible implementations of the embodiments of the present application, the monitoring function of the data storage system can be used to monitor deletion requests for data fields in the target database. After the deletion request is monitored, the data field to be deleted is extracted from the deletion request.
[0027] Step 102: In response to the deletion request, obtaining a log record associated with the target data field in the log of the target database;
[0028] In some possible implementations of the embodiments of the present application, the log records in the log of the target database in the embodiments of the present application that are associated with the target data field may be: all log records in the log of the target database that include the target data field.
[0029] In some possible implementations of the embodiments of the present application, the target data field may be used as a keyword, the log of the target database may be used as a search scope, and all log records including the target data field may be searched in the log of the target database.
[0030] In some possible implementations of the embodiments of the present application, when searching for all log records including the target data field in the log of the target database, the search may be performed by an exact search method or a fuzzy search method.
[0031] Step 103: Delete the target data field and log record.
[0032] After finding the log record associated with the target data field in the log of the target database, the target data field and the log record associated with the target data field in the log of the target database can be deleted.
[0033] In an embodiment of the present application, after receiving a request to delete a target data field in a target database, a log record associated with the target data field in the log of the target database is obtained; and the target data field and the log record are deleted. In this way, the log record associated with the target data field in the log of the target database is deleted while the target data field is deleted, so that the target data field can be avoided from being restored through the log record associated with the target data field in the log of the target database, and data security can be improved.
[0034] In some possible implementations of the embodiments of the present application, before step 103, the data deletion method provided by the embodiments of the present application may also include: obtaining the data volume of the log record; determining the recoverability risk value of the target data field based on the data volume of the log record, wherein the recoverability risk value is used to measure the probability of the target data field being recovered; accordingly, step 103 may include: when the recoverability risk value is greater than a first threshold, deleting the target data field and the log record.
[0035] In some possible implementations of the embodiments of the present application, the greater the recoverability risk value of the target data field, the greater the probability that the target data field is recovered, that is, the more likely the target data field is to be recovered.
[0036] In some possible implementations of the embodiments of the present application, the first threshold can be set according to actual needs.
[0037] In some possible implementations of the embodiments of the present application, when the recoverability risk value is less than or equal to a first threshold value, it indicates that the probability of recovering the target data field through log records in the log of the target database that are associated with the target data field is low, that is, the target data field cannot be recovered through log records in the log of the target database that are associated with the target data field, and at this time, only the target data field can be deleted.
[0038] In some possible implementations of the embodiments of the present application, determining the recoverability risk value of the target data field according to the amount of data recorded in the log includes:
[0039] According to the following formula (1), the recoverability risk value of the target data field is determined:
[0040] K=S×D (1)
[0041] Wherein, in formula (1), K is the recoverability risk value of the target data field, S is the data volume of the log record, and D is the risk level of the log record, which is determined according to the vulnerability risk level of the target database.
[0042] In some possible implementations of the embodiments of the present application, before determining the recoverability risk value of the target data field, the data deletion method provided by the embodiments of the present application may also include: determining the vulnerability risk of the target database based on the number of successful attacks on the target database in history and the total number of attacks on the target database in history; and using the vulnerability risk of the target database as the risk of the log record.
[0043] In some possible implementations of the embodiments of the present application, the ratio of the number of successful attacks on the target database in history to the total number of attacks on the target database in history may be used as the vulnerability risk of the target database.
[0044] In some possible implementations of the embodiments of the present application, the data volume of the log record includes the data volume of each data field associated with the target data field; accordingly, determining the recoverability risk value of the target data field according to the data volume of the log record may include: determining the recoverability risk value of the target data field according to the following formula (2):
[0045]
[0046] Wherein, in formula (2), K is the recoverability risk value of the target data field, S i is the data volume of the i-th data field associated with the target data field, D i is the risk of the i-th data field, the risk of the i-th data field is determined according to the vulnerability risk of the data table where the i-th data field is located, and n is the number of data fields associated with the target data field.
[0047] In some possible implementations of the embodiments of the present application, the data volume of a data field may be the number of times the data field appears in a log record associated with the target data field.
[0048] In some possible implementations of the embodiments of the present application, the data fields that have an association relationship with the target data field include but are not limited to: a data field that has an index relationship with the target data field, a data field that has a primary key relationship with the target data field, a data field that has a foreign key relationship with the target data field, and the like.
[0049] In some possible implementations of the embodiments of the present application, before determining the recoverability risk value of the target data field, the data deletion method provided by the embodiments of the present application may also include: determining the vulnerability risk of the data table based on the number of successful attacks on the data table where the i-th data field is located and the total number of attacks in history; and using the vulnerability risk of the data table as the risk of the i-th data field.
[0050] In some possible implementations of the embodiments of the present application, the ratio of the number of successful attacks on the data table where the i-th data field is located to the total number of attacks can be used as the vulnerability risk of the data table where the i-th data field is located.
[0051] For example, it is assumed that a deletion request for data field A is received, and 100 log records associated with data field A are obtained from the log of the database. Among them, data field B and data field C associated with data field A are determined from the 100 log records associated with data field A, the data volume of data field B is 50, and the data volume of data field C is 40.
[0052] The data table where data field B is located has been successfully attacked 3 times in history, and has been attacked 30 times in total; the data table where data field C is located has been successfully attacked once in history, and has been attacked 50 times in total. The risk of data field B is 0.1, and the risk of data field C is 0.02.
[0053] The recoverability risk value of data field A is 50*0.1+40*0.02=5.8.
[0054] Assuming that the first threshold is 5, the data field A is deleted, and when the data field A is deleted, the 100 log records associated with the data field A are deleted at the same time.
[0055] Assuming the first threshold is 10, only data field A is deleted.
[0056] Corresponding to the above method embodiment, the present application embodiment also provides a data deletion device, such as Figure 2 shown. Figure 2 2 is a schematic diagram of the structure of a data deletion device provided in an embodiment of the present application. The data deletion device 200 may include:
[0057] The receiving module 201 is used to receive a deletion request for a target data field in a target database;
[0058] A first acquisition module 202, configured to acquire, in response to the deletion request, a log record associated with the target data field in the log of the target database;
[0059] The deletion module 203 is used to delete the target data field and the log record.
[0060] In some possible implementations of the embodiments of the present application, the data deletion device 200 provided in the embodiments of the present application may further include:
[0061] A second acquisition module is used to obtain the data volume of the log record;
[0062] A first determination module, configured to determine a recoverability risk value of the target data field according to the amount of data recorded in the log, wherein the recoverability risk value is used to measure the probability of the target data field being recovered;
[0063] Accordingly, the deletion module 203 may be specifically used for:
[0064] When the recoverability risk value is greater than a first threshold, the target data field and the log record are deleted.
[0065] In some possible implementations of the embodiments of the present application, the first determining module may be specifically used to:
[0066] According to the above formula (1), the recoverability risk value of the target data field is determined.
[0067] In some possible implementations of the embodiments of the present application, the data deletion device 200 provided in the embodiments of the present application may further include:
[0068] A second determination module is used to determine the vulnerability risk of the target database according to the number of successful attacks on the target database in history and the total number of attacks on the target database in history;
[0069] The third determination module is used to use the vulnerability risk level of the target database as the risk level of the log record.
[0070] In some possible implementations of the embodiments of the present application, the data volume of the log record includes the data volume of each data field associated with the target data field;
[0071] Accordingly, the first determination module may be specifically used for:
[0072] According to the above formula (2), the recoverability risk value of the target data field is determined.
[0073] In some possible implementations of the embodiments of the present application, the data deletion device 200 provided in the embodiments of the present application may further include:
[0074] A fourth determination module, used to determine the vulnerability risk of the data table according to the number of successful attacks in the history of the data table where the i-th data field is located and the total number of attacks in the history;
[0075] The fifth determination module is used to use the vulnerability risk of the data table as the risk of the i-th data field.
[0076] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0077] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.
[0078] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0079] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory 302 may include a removable or non-removable (or fixed) medium. Where appropriate, the memory 302 may be inside or outside the electronic device. In some specific embodiments, the memory 302 is a non-volatile solid-state memory.
[0080] In some specific embodiments, the memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Therefore, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the data deletion method according to the present application.
[0081] The processor 301 implements the steps of the data deletion method provided in the embodiment of the present application by reading and executing the computer program instructions stored in the memory 302.
[0082] In one example, the electronic device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0083] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0084] The bus 310 includes hardware, software or both, coupling the components of the electronic device to each other. For example, but not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a Micro channel architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus or other suitable buses or a combination of two or more of these. Where appropriate, the bus 310 may include one or more buses. Although embodiments of the present application describe and illustrate a particular bus, the present application contemplates any suitable bus or interconnect.
[0085] The electronic device can execute the data deletion method provided in the embodiment of the present application, thereby achieving the corresponding technical effects of the data deletion method provided in the embodiment of the present application.
[0086] In addition, in combination with the data deletion method in the above embodiment, the embodiment of the present application also provides a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, the steps of the data deletion method provided in the embodiment of the present application are implemented. Examples of computer-readable storage media include non-transitory computer-readable media, such as ROM, RAM, magnetic disk or optical disk, etc.
[0087] An embodiment of the present application provides a computer program product, which includes computer program instructions. When the computer program instructions are executed by a processor, the steps of the data deletion method provided in the embodiment of the present application are implemented, and the same technical effect can be achieved. To avoid repetition, they are not repeated here.
[0088] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0089] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable read-only memory (Erasable Read Only Memory, EROM), floppy disks, compact discs (Compact Disc Read-Only Memory, CD-ROM), optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0090] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0091] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0092] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. A data deletion method, characterized in that: The method comprises: receiving a deletion request for a target data field in a target database; In response to the deletion request, obtaining a log record associated with the target data field in a log of the target database; The target data field and the log record are deleted.
2. The method according to claim 1, characterized in that Before deleting the target data field and the log record, the method further includes: Obtaining the amount of data recorded in the log; Determining a recoverability risk value of the target data field according to the amount of data recorded in the log, wherein the recoverability risk value is used to measure the probability of the target data field being recovered; The deleting the target data field and the log record includes: When the recoverability risk value is greater than a first threshold, the target data field and the log record are deleted.
3. The method according to claim 2, characterized in that The determining, according to the amount of data recorded in the log, the recoverability risk value of the target data field includes: The recoverability risk value of the target data field is determined according to the following formula: K=S×D Among them, K is the recoverability risk value of the target data field, S is the data volume of the log record, and D is the risk level of the log record. The risk level of the log record is determined according to the vulnerability risk level of the target database.
4. The method according to claim 3, characterized in that Before determining the recoverability risk value of the target data field, the method further includes: Determine the vulnerability risk of the target database according to the number of successful attacks on the target database in history and the total number of attacks on the target database in history; The vulnerability risk level of the target database is used as the risk level of the log record.
5. The method according to claim 2, characterized in that: The data volume of the log record includes the data volume of each data field associated with the target data field; The determining, according to the amount of data recorded in the log, the recoverability risk value of the target data field includes: The recoverability risk value of the target data field is determined according to the following formula: Where K is the recoverability risk value of the target data field, S i is the data volume of the i-th data field associated with the target data field, D i is the risk of the i-th data field, the risk of the i-th data field is determined according to the vulnerability risk of the data table where the i-th data field is located, and n is the number of data fields associated with the target data field.
6. The method according to claim 5, characterized in that Before determining the recoverability risk value of the target data field, the method further includes: Determine the vulnerability risk of the data table according to the number of successful attacks in the history and the total number of attacks in the history of the data table where the i-th data field is located; The vulnerability risk of the data table is used as the risk of the i-th data field.
7. A data deletion device, characterized in that: The device comprises: A receiving module, used for receiving a deletion request for a target data field in a target database; A first acquisition module, configured to acquire, in response to the deletion request, a log record associated with the target data field in the log of the target database; A deletion module is used to delete the target data field and the log record.
8. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the steps of the data deletion method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the steps of the data deletion method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises computer program instructions, and when the computer program instructions are executed by a processor, the steps of the data deletion method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data recovery method and device, electronic equipment and storage medium
CN113760608A
Trusted third-party auditing method and system for personal information deletion
CN116346592A
Data processing activity-oriented data security risk assessment method and system
CN117473509A
Security system for electronic commerce and method thereof
KR101308703B1
Verifiable data destruction in a database
US20170132429A1
