CN114528157A - Database sensitive table backup method and device - Google Patents

Database sensitive table backup method and device Download PDF

Info

Publication number
CN114528157A
CN114528157A CN202210156153.XA CN202210156153A CN114528157A CN 114528157 A CN114528157 A CN 114528157A CN 202210156153 A CN202210156153 A CN 202210156153A CN 114528157 A CN114528157 A CN 114528157A
Authority
CN
China
Prior art keywords
sensitive
backup
target table
target
preset
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.)
Pending
Application number
CN202210156153.XA
Other languages
Chinese (zh)
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202210156153.XA priority Critical patent/CN114528157A/en
Publication of CN114528157A publication Critical patent/CN114528157A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process

Landscapes

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

Abstract

The invention provides a method and a device for backing up a sensitive table of a database, in particular to the field of big data, wherein the method comprises the following steps: obtaining the sensitive type of the target table according to the preset sensitive word bank and the field in the target table; and according to the sensitive type of the target table and preset backup standards for performing backup operations with different backup quantities aiming at tables with different sensitive types, performing backup operations on the target table to obtain a backup table. The method and the device can improve the accuracy and the speed of identifying the sensitive tables, and avoid carrying out all backups on the target tables of all types by carrying out different backup operations on the target tables of different sensitive types, thereby reducing the storage space required by the backup and further reducing the storage cost.

Description

Database sensitive table backup method and device
Technical Field
The invention relates to the field of disaster recovery backup, in particular to the field of big data, and particularly relates to a database sensitive table backup method and device.
Background
Data with different purposes and different properties in the database are often integrated into different data tables for storage, and in order to prevent the data in the database from being accidentally lost or damaged, disaster recovery backup is often performed on sensitive data tables (i.e., sensitive tables) in the database. In the existing backup method, a sensitive table in a database is often identified through manual operation, and different labels are respectively marked on the sensitive table and a non-sensitive table, so that a system can judge whether to backup a data table according to the labels on the data table during backup. However, when the sensitive table is manually identified, the speed is low, the efficiency is low, errors are easy to occur, and the accuracy is poor. Moreover, when the sensitive table is backed up, all the contents of the sensitive table are often backed up, so that the storage space required by the backup is large, the cost is high, and actually, the sensitivity of some sensitive tables is low, and only a small part of the contents in the tables need to be backed up. Therefore, it is necessary to provide a database sensitive table backup method to improve the accuracy and speed of sensitive table identification, and perform different backup operations on target tables of different sensitive types to avoid performing all backups on target tables of all types, thereby reducing the storage space required for backup and thus reducing the storage cost.
Disclosure of Invention
The invention aims to provide a database sensitive table backup method, which aims to solve the problems of poor identification accuracy and low speed of a sensitive table and large storage space occupied by backup in the conventional database sensitive table backup method. Another object of the present invention is to provide a database sensitive table backup apparatus. It is a further object of the present invention to provide a computer apparatus. It is a further object of this invention to provide such a readable medium.
In order to achieve the above object, an aspect of the present invention discloses a database sensitive table backup method, including:
obtaining the sensitive type of the target table according to the preset sensitive word stock and the field in the target table;
and according to the sensitive type of the target table and a preset backup standard for performing backup operation with different backup quantities aiming at tables with different sensitive types, performing backup operation on the target table to obtain a backup table.
Optionally, the obtaining the sensitive type of the target table according to the preset sensitive word bank and the field in the target table includes:
obtaining the number of sensitive fields in the target table according to the preset sensitive word stock and the fields in the target table;
and obtaining the sensitive type of the target table according to the number of the sensitive fields and a preset sensitive type classification standard.
Optionally, the obtaining the sensitive type of the target table according to the number of the sensitive fields and a preset sensitive type classification standard includes:
judging whether the number of the sensitive fields is 0 or not;
and if so, determining that the sensitive type of the target table is a non-sensitive table.
Optionally, when the number of the sensitive fields is judged not to be 0, the method further includes:
judging whether the number of the sensitive fields is less than or equal to a first threshold value;
and if so, determining that the sensitive type of the target table is a low sensitive table.
Optionally, when the number of sensitive fields is judged to be greater than the first threshold, the method further includes:
and determining the sensitive type of the target table as a high sensitive table.
Optionally, the performing backup operation on the target table according to the sensitive type of the target table and a preset backup standard for performing backup operation with different backup quantities on tables with different sensitive types to obtain a backup table includes:
judging whether the sensitive type of the target table is a non-sensitive table;
if yes, any content of the target table is not backed up, and an empty backup table is directly generated.
Optionally, the performing backup operation on the target table according to the sensitive type of the target table and a preset backup standard for performing backup operation with different backup quantities on tables with different sensitive types to obtain a backup table includes:
judging whether the sensitive type of the target table is a low sensitive table or not;
if so, extracting the primary key field and the sensitive field of the target table, and backing up the primary key field and the sensitive field of the target table to obtain a backup table.
Optionally, the performing backup operation on the target table according to the sensitive type of the target table and a preset backup standard for performing backup operation with different backup quantities on tables with different sensitive types to obtain a backup table includes:
judging whether the sensitive type of the target table is a high sensitive table or not;
and if so, backing up the target table to obtain a backup table.
Optionally, before performing the backup operation on the target table to obtain the backup table according to the sensitive type of the target table and the preset backup standard for performing the backup operation with different backup amounts on the tables with different sensitive types, the method further includes:
acquiring the table information of a target table according to the target table, and inputting the table information of the target table and the sensitive type of the target table into a summary table;
the performing backup operation on the target table to obtain a backup table includes:
obtaining the table information of the target table and the sensitive type of the target table according to the summary table;
and backing up the target table according to the table information of the target table and the sensitive type of the target table to obtain a backup table.
Optionally, after the performing the backup operation on the target table to obtain the backup table, the method further includes:
checking whether the existing duration of the backup table is greater than a second threshold value or not according to a preset time interval;
and if so, performing data cleaning operation on the backup table.
In order to achieve the above object, another aspect of the present invention discloses a database sensitive table backup apparatus, including:
the sensitive type determining module is used for obtaining the sensitive type of the target table according to the preset sensitive word stock and the field in the target table;
and the backup module is used for performing backup operation on the target table to obtain a backup table according to the sensitive type of the target table and a preset backup standard for performing backup operation with different backup quantities aiming at tables with different sensitive types.
The invention also discloses a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method when executing the program.
The invention also discloses a computer-readable medium, on which a computer program is stored which, when executed by a processor, implements a method as described above.
According to the database sensitive table backup method and device, the sensitive type of the target table is obtained according to the preset sensitive word stock and the field in the target table, so that the accuracy and the speed of sensitive table identification can be improved, the sensitive table is prevented from being identified manually, the sensitive table identification efficiency is improved, the sensitive type of the target table is subdivided, and a foundation is laid for the subsequent different backup operations of the target table according to different sensitive types of the target table; according to the sensitive type of the target table and the preset backup standard for performing backup operation with different backup quantities aiming at tables with different sensitive types, the backup operation is performed on the target table to obtain the backup table, different backup operations can be performed on the target tables with different sensitive types, and the target tables with all types are prevented from being completely backed up, so that the storage space required by backup is reduced, and the storage cost is reduced. In summary, the database sensitive table backup method and device of the present invention can improve the accuracy and speed of sensitive table identification, and avoid performing all backups on target tables of all types by performing different backup operations on target tables of different sensitive types, thereby reducing the storage space required for backup and reducing the storage cost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a database sensitive table backup method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating an optional step of target table sensitivity type determination according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating modules of a database sensitive table backup apparatus according to an embodiment of the present invention;
FIG. 4 shows a schematic block diagram of a computer device suitable for use in implementing embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
As used herein, the terms "first," "second," … …, etc. do not denote any order or order, nor are they used to limit the invention, but rather are used to distinguish one element from another element or operation described by the same technical terms.
As used herein, the terms "comprising," "including," "having," "containing," and the like are open-ended terms that mean including, but not limited to.
As used herein, "and/or" includes any and all combinations of the described items.
It should be noted that, in the technical solution of the present invention, the acquisition, storage, use, processing, etc. of the data all conform to the relevant regulations of the national laws and regulations.
The embodiment of the invention discloses a database sensitive table backup method, which specifically comprises the following steps as shown in figure 1:
s101: and obtaining the sensitive type of the target table according to the preset sensitive word bank and the field in the target table.
S102: and according to the sensitive type of the target table and a preset backup standard for performing backup operation with different backup quantities aiming at tables with different sensitive types, performing backup operation on the target table to obtain a backup table.
For example, the preset backup standard for performing backup operations with different backup amounts for tables with different sensitive types may be set by a person skilled in the art according to actual situations, and the embodiment of the present invention is not limited thereto. For example, the preset backup criteria for performing backup operations with different backup amounts for tables with different sensitive types may be as shown in table 1:
TABLE 1
Type of sensitivity Backup operations
Non-sensitive watch Non-backup
Low sensitive watch Backup primary key field, sensitive field
High sensitive watch Full backup
For example, if the sensitive type of the target table is a low sensitive table, according to the backup standard described in table 1, the backup operation performed on the target table is to backup the primary key field and the sensitive field of the target table.
According to the sensitive type of the target table and the preset backup standard for performing backup operation with different backup quantities aiming at the tables with different sensitive types, the backup operation is performed on the target table, so that the target tables with all types can be prevented from being completely backed up, the storage space required by backup is reduced, and the storage cost is reduced.
According to the database sensitive table backup method and device, the sensitive type of the target table is obtained according to the preset sensitive word stock and the field in the target table, so that the accuracy and the speed of sensitive table identification can be improved, the sensitive table is prevented from being identified manually, the sensitive table identification efficiency is improved, the sensitive type of the target table is subdivided, and a foundation is laid for the subsequent different backup operations of the target table according to different sensitive types of the target table; according to the sensitive type of the target table and the preset backup standard for performing backup operation with different backup quantities aiming at tables with different sensitive types, the backup operation is performed on the target table to obtain the backup table, different backup operations can be performed on the target tables with different sensitive types, and the target tables with all types are prevented from being completely backed up, so that the storage space required by backup is reduced, and the storage cost is reduced. In summary, the database sensitive table backup method and device of the present invention can improve the accuracy and speed of sensitive table identification, and avoid performing all backups on target tables of all types by performing different backup operations on target tables of different sensitive types, thereby reducing the storage space required for backup and reducing the storage cost.
In an optional embodiment, as shown in fig. 2, the obtaining the sensitive type of the target table according to the preset sensitive thesaurus and the field in the target table includes the following steps:
s201: and obtaining the number of the sensitive fields in the target table according to the preset sensitive word stock and the fields in the target table.
S202: and obtaining the sensitive type of the target table according to the number of the sensitive fields and a preset sensitive type classification standard.
For example, the sensitive word stock may be specifically established for the type, the purpose, the content and the like of data stored in the database, or may be an existing sensitive word stock. The sensitive word stock can be established or determined by those skilled in the art according to actual situations, and the embodiment of the present invention is not limited thereto.
For example, the names of the fields in the target table may be determined one by one, and if the name of the current field is included in the sensitive thesaurus, the field may be marked with a sensitive field tag SA, otherwise the field is marked with a non-sensitive field tag NSA. The number of the sensitive field labels SA in the target table is the number of the sensitive fields in the target table. It should be noted that, the specific implementation manner of obtaining the number of sensitive fields in the target table according to the preset sensitive word stock and the fields in the target table may be determined by those skilled in the art according to actual situations, and the above description of the embodiment of the present invention is only an example, and is not limited thereto.
For example, the preset classification criteria of the sensitivity types may be set by a person skilled in the art according to actual situations, and the embodiment of the present invention is not limited thereto. For example, the sensitivity type classification criteria may be as shown in table 2:
TABLE 2
Ratio of number of sensitive fields Type of sensitivity
0% Non-sensitive watch
(0%,70%) Low sensitive watch
[70%,100%] High sensitive watch
For example, if the total number of fields in the target table is 100 and the number of sensitive fields in the target table is 80, the percentage of the sensitive fields in the target table is 80%, and the sensitive type of the target table is a high sensitive table according to the sensitive type classification standard described in table 2.
The number of the sensitive fields in the target table is obtained according to the preset sensitive word stock and the fields in the target table, and the sensitive type of the target table is obtained according to the number of the sensitive fields and the preset sensitive type classification standard, so that the sensitive type of the target table can be automatically, accurately and quickly determined, the sensitive word stock and the sensitive type classification standard can be freely set or changed according to actual situations and application environments, and the flexibility is high.
According to the sensitive type of the target table and the preset backup standard of performing backup operation with different backup quantities aiming at tables with different sensitive types, performing backup operation on the target table to obtain a backup table,
in a preferred embodiment, before the performing a backup operation on the target table according to the sensitive type of the target table to obtain a backup, the method further includes:
if the sensitive type of the target table is a low sensitive table or a high sensitive table, collecting the attribute content information of the relevant attribute of the target table into a sensitive table number information table SA _ CODE _ TB. Illustratively, the attributes of the sensitive table number information table include a sensitive table number TB _ CODE, a USER TB _ USER to which the sensitive table belongs, a sensitive table NAME TB _ NAME, and a sensitive type FLAG TB _ SA _ FLAG. If the sensitive type of the target table is a high sensitive table, the TB _ SA _ FLAG of the target table is set to be 1, and if the sensitive type of the target table is a low sensitive table, the TB _ SA _ FLAG of the target table is set to be 0. The sensitive table number TB _ CODE is generated by a serial number generator of a database and is used for identifying a target table in the sensitive table number information table. The backup condition of the target table can be recorded by collecting the attribute content information of the related attributes of the target table into the sensitive table number information table SA _ CODE _ TB, so that the backup condition is convenient to look up and trace, and when the backup operation is performed on the target table, the target table can be directly positioned by accessing the sensitive table number information table, so that the speed is higher when the target table is linked.
In an optional embodiment, the obtaining the sensitive type of the target table according to the number of the sensitive fields and a preset sensitive type classification standard includes:
judging whether the number of the sensitive fields is 0 or not;
and if so, determining that the sensitive type of the target table is a non-sensitive table.
When the number of the sensitive fields is 0, the target table is not related to sensitive information.
In an optional implementation manner, when the number of the sensitive fields is judged to be not 0, the method further includes:
judging whether the number of the sensitive fields is less than or equal to a first threshold value;
and if so, determining that the sensitive type of the target table is a low sensitive table.
For example, the first threshold may be determined by a person skilled in the art according to practical situations, and the embodiment of the present invention is not limited thereto. For example, the first threshold may be determined to be 50 or 100, etc.
When the number of the sensitive fields is smaller than or equal to the first threshold value, the target table is indicated to relate to sensitive information, but the related sensitive information is not much.
In an optional embodiment, when determining that the number of sensitive fields is greater than the first threshold, the method further includes:
and determining the sensitive type of the target table as a high sensitive table.
For example, the first threshold may be determined by a person skilled in the art according to practical situations, and the embodiment of the present invention is not limited thereto. For example, the first threshold may be determined to be 50 or 100, etc.
And when the number of the sensitive fields is larger than a first threshold value, the target table is indicated to be more sensitive information.
In an optional embodiment, the performing, according to the sensitive type of the target table and a preset backup standard for performing backup operations with different backup amounts on tables with different sensitive types, a backup operation on the target table to obtain a backup table includes:
judging whether the sensitive type of the target table is a non-sensitive table;
if yes, any content of the target table is not backed up, and an empty backup table is directly generated.
When the target table is a non-sensitive table, it is described that the target table does not relate to sensitive information, and there is no value for performing backup in the scenario of the embodiment of the present invention, so that the target table is not backed up, and the content of the backup table is naturally also an empty set.
Any contents of the non-sensitive table are not backed up, so that unreasonable occupation of backup storage space is avoided.
In an optional embodiment, the performing, according to the sensitive type of the target table and a preset backup standard for performing backup operations with different backup amounts on tables with different sensitive types, a backup operation on the target table to obtain a backup table includes:
judging whether the sensitive type of the target table is a low sensitive table or not;
if so, extracting the primary key field and the sensitive field of the target table, and backing up the primary key field and the sensitive field of the target table to obtain a backup table.
When the target table is a low-sensitivity table, it is described that the target table has little sensitive information, and the value for backup is low in the context of the embodiment of the present invention, so that the backup is not performed on all the contents of the target table, but only on relatively important contents such as the primary key field and the sensitive field of the target table, and the backup table is obtained. It should be noted that, backing up the primary key field and the sensitive field of the target table to obtain the backup table may be directly implemented by those skilled in the art using the prior art, and details are not described here.
Only the main key field and the sensitive field are backed up for the target table with the sensitive type being the low sensitive table, and the storage space required by backup can be reduced while necessary information is backed up.
In an optional embodiment, the performing, according to the sensitive type of the target table and a preset backup standard for performing backup operations with different backup amounts on tables with different sensitive types, a backup operation on the target table to obtain a backup table includes:
judging whether the sensitive type of the target table is a high sensitive table or not;
and if so, backing up the target table to obtain a backup table.
When the target table is a high-sensitivity table, it is described that the target table has more sensitive information, and the value for backup is higher in the scenario of the embodiment of the present invention, so that all the contents of the target table are backed up.
In an optional implementation manner, before performing a backup operation on the target table to obtain a backup table according to the sensitive type of the target table and a preset backup standard for performing backup operations with different backup amounts for tables with different sensitive types, the method further includes:
acquiring the table information of a target table according to the target table, and inputting the table information of the target table and the sensitive type of the target table into a summary table;
the performing backup operation on the target table to obtain a backup table includes:
obtaining the table information of the target table and the sensitive type of the target table according to the summary table;
and backing up the target table according to the table information of the target table and the sensitive type of the target table to obtain a backup table.
Illustratively, the table information of the target table includes, but is not limited to, a number of the target table, user information to which the target table belongs, and the like, and the summary table is DBA _ packets in the database. The summary table has a function of recording backup conditions of different data tables and also has a hyperlink function, so that the user can directly access the target table by accessing the link in the summary table during subsequent lookup or tracing, and the target table is more conveniently accessed.
The backup table is obtained by backing up the target table according to the table information of the target table and the sensitive type of the target table, the check information of the target table can be obtained through the table information of the target table during backup, whether the check information is consistent with the information of a user sending a backup instruction or not is judged during backup, and if the check information is not consistent with the information of the user sending the backup instruction, the backup is rejected. Illustratively, the check information is the affiliated user information of the target table. By checking, the target table can be prevented from being backed up by an unauthorized user for illegal purposes and the backup table obtained by backing up the target table is taken away privately, so that the confidentiality can be improved.
In an optional implementation manner, after the performing the backup operation on the target table to obtain the backup table, the method further includes:
checking whether the existing duration of the backup table is greater than a second threshold value or not according to a preset time interval;
and if so, performing data cleaning operation on the backup table.
For example, the preset time interval may be determined by a person skilled in the art according to practical situations, and the embodiment of the present invention is not limited thereto. For example, the preset time interval may be 2 months.
For example, the second threshold may be determined by a person skilled in the art according to practical situations, and the embodiment of the present invention is not limited thereto. For example, the second threshold may be 2 months.
For example, the data cleaning operation may be determined by a person skilled in the art according to practical situations, and the embodiment of the present invention is not limited thereto. For example, the data scrubbing operation may be deleting the backup table.
By carrying out data cleaning operation on the backup table, the backup table which is possibly unavailable for a user can be cleaned in time, and the situation that the unused backup table continuously occupies the backup storage space is avoided.
Based on the same principle, the embodiment of the present invention discloses a database sensitive table backup apparatus 300, as shown in fig. 3, the database sensitive table backup apparatus 300 includes:
the sensitive type determining module 301 is configured to obtain a sensitive type of the target table according to a preset sensitive word bank and a field in the target table;
the backup module 302 is configured to perform a backup operation on the target table to obtain a backup table according to the sensitive type of the target table and a preset backup standard for performing a backup operation with different backup amounts for tables with different sensitive types.
In an optional implementation, the sensitivity type determining module 301 is configured to:
obtaining the number of sensitive fields in the target table according to fields in a preset sensitive word bank and the target table;
and obtaining the sensitive type of the target table according to the number of the sensitive fields and a preset sensitive type classification standard.
In an optional embodiment, the sensitivity type determining module 301 is configured to:
judging whether the number of the sensitive fields is 0 or not;
and if so, determining that the sensitive type of the target table is a non-sensitive table.
In an optional implementation, the sensitivity type determining module 301 is configured to:
judging whether the number of the sensitive fields is less than or equal to a first threshold value;
and if so, determining that the sensitive type of the target table is a low sensitive table.
In an optional implementation, the sensitivity type determining module 301 is configured to:
and determining the sensitive type of the target table as a high sensitive table.
In an optional embodiment, the backup module 302 is configured to:
judging whether the sensitive type of the target table is a non-sensitive table;
if yes, any content of the target table is not backed up, and an empty backup table is directly generated.
In an optional embodiment, the backup module 302 is configured to:
judging whether the sensitive type of the target table is a low sensitive table or not;
if so, extracting the primary key field and the sensitive field of the target table, and backing up the primary key field and the sensitive field of the target table to obtain a backup table.
In an optional embodiment, the backup module 302 is configured to:
judging whether the sensitive type of the target table is a high sensitive table or not;
if yes, backing up the target table to obtain a backup table.
In an optional embodiment, the system further comprises a summary table entry module, wherein the summary table entry module is configured to:
acquiring the table information of a target table according to the target table, and inputting the table information of the target table and the sensitive type of the target table into a summary table;
the performing backup operation on the target table to obtain a backup table includes:
obtaining the table information of the target table and the sensitive type of the target table according to the summary table;
and backing up the target table according to the table information of the target table and the sensitive type of the target table to obtain a backup table.
In an optional embodiment, the system further includes a backup table cleaning module, where the backup table cleaning module is configured to:
checking whether the existing duration of the backup table is greater than a second threshold value or not according to a preset time interval;
and if so, performing data cleaning operation on the backup table.
Since the principle of the database sensitive table backup apparatus 300 for solving the problem is similar to the above method, the implementation of the database sensitive table backup apparatus 300 can refer to the implementation of the above method, and is not described herein again.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer device, which may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
In a typical example, the computer device comprises in particular a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor implements the method as described above.
Referring now to FIG. 4, shown is a schematic block diagram of a computer device 400 suitable for use in implementing embodiments of the present application.
As shown in fig. 4, the computer apparatus 400 includes a Central Processing Unit (CPU)401 that can perform various appropriate works and processes according to a program stored in a Read Only Memory (ROM)402 or a program loaded from a storage section 408 into a Random Access Memory (RAM)) 403. In the RAM403, various programs and data necessary for the operation of the system 400 are also stored. The CPU401, ROM402, and RAM403 are connected to each other via a bus 404. An input/output (I/O) interface 405 is also connected to bus 404.
The following components are connected to the I/O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including a signal such as a Cathode Ray Tube (CRT), a liquid crystal feedback (LCD), and the like, and a speaker; a storage section 408 including a hard disk and the like; and a communication section 409 including a network interface card such as a LAN card, a modem, or the like. The communication section 409 performs communication processing via a network such as the internet. A driver 410 is also connected to the I/O interface 405 as needed. A removable medium 411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 410 as needed, so that a computer program read out therefrom is mounted as needed on the storage section 408.
In particular, the processes described above with reference to the flowcharts may be implemented as a computer software program according to an embodiment of the present invention. For example, embodiments of the invention include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 409, and/or installed from the removable medium 411.
Computer-readable media, including both permanent and non-permanent, removable and non-removable media, may implement the information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The application may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The application may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (13)

1. A database sensitive table backup method is characterized by comprising the following steps:
obtaining the sensitive type of the target table according to the preset sensitive word stock and the field in the target table;
and according to the sensitive type of the target table and a preset backup standard for performing backup operation with different backup quantities aiming at tables with different sensitive types, performing backup operation on the target table to obtain a backup table.
2. The method of claim 1, wherein obtaining the sensitive type of the target table according to the preset sensitive thesaurus and the field in the target table comprises:
obtaining the number of sensitive fields in the target table according to the preset sensitive word stock and the fields in the target table;
and obtaining the sensitive type of the target table according to the number of the sensitive fields and a preset sensitive type classification standard.
3. The method of claim 1, wherein obtaining the sensitivity type of the target table according to the number of the sensitivity fields and a preset sensitivity type classification standard comprises:
judging whether the number of the sensitive fields is 0 or not;
and if so, determining that the sensitive type of the target table is a non-sensitive table.
4. The method of claim 3, wherein when determining that the number of sensitive fields is not 0, further comprising:
judging whether the number of the sensitive fields is less than or equal to a first threshold value;
and if so, determining that the sensitive type of the target table is a low sensitive table.
5. The method of claim 4, wherein when determining that the number of sensitive fields is greater than the first threshold, further comprising:
and determining the sensitive type of the target table as a high sensitive table.
6. The method according to claim 3, wherein the performing backup operations on the target table according to the sensitive type of the target table and preset backup standards for performing backup operations with different backup amounts on tables with different sensitive types to obtain a backup table comprises:
judging whether the sensitive type of the target table is a non-sensitive table;
if yes, any content of the target table is not backed up, and an empty backup table is directly generated.
7. The method according to claim 4, wherein the performing backup operations on the target table according to the sensitive type of the target table and preset backup standards for performing backup operations with different backup amounts on tables with different sensitive types to obtain a backup table comprises:
judging whether the sensitive type of the target table is a low sensitive table or not;
if so, extracting the primary key field and the sensitive field of the target table, and backing up the primary key field and the sensitive field of the target table to obtain a backup table.
8. The method according to claim 5, wherein the performing backup operations on the target table according to the sensitive type of the target table and preset backup standards for performing backup operations with different backup amounts on tables with different sensitive types to obtain a backup table comprises:
judging whether the sensitive type of the target table is a high sensitive table or not;
and if so, backing up the target table to obtain a backup table.
9. The method according to claim 1, wherein before the obtaining the backup table by performing the backup operation on the target table according to the sensitive type of the target table and the preset backup standard for performing the backup operation with different backup amounts for tables with different sensitive types, the method further comprises:
acquiring the table information of a target table according to the target table, and inputting the table information of the target table and the sensitive type of the target table into a summary table;
the performing backup operation on the target table to obtain a backup table includes:
obtaining the table information of the target table and the sensitive type of the target table according to the summary table;
and backing up the target table according to the table information of the target table and the sensitive type of the target table to obtain a backup table.
10. The method of claim 1, wherein after the performing the backup operation on the target table results in a backup table, further comprising:
checking whether the existing duration of the backup table is greater than a second threshold value or not according to a preset time interval;
and if so, performing data cleaning operation on the backup table.
11. A database sensitive table backup apparatus, comprising:
the sensitive type determining module is used for obtaining the sensitive type of the target table according to the preset sensitive word stock and the field in the target table;
and the backup module is used for performing backup operation on the target table to obtain a backup table according to the sensitive type of the target table and a preset backup standard for performing backup operation with different backup quantities aiming at tables with different sensitive types.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-10 when executing the program.
13. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202210156153.XA 2022-02-21 2022-02-21 Database sensitive table backup method and device Pending CN114528157A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210156153.XA CN114528157A (en) 2022-02-21 2022-02-21 Database sensitive table backup method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210156153.XA CN114528157A (en) 2022-02-21 2022-02-21 Database sensitive table backup method and device

Publications (1)

Publication Number Publication Date
CN114528157A true CN114528157A (en) 2022-05-24

Family

ID=81623998

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210156153.XA Pending CN114528157A (en) 2022-02-21 2022-02-21 Database sensitive table backup method and device

Country Status (1)

Country Link
CN (1) CN114528157A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686939A (en) * 2022-10-27 2023-02-03 湖南长银五八消费金融股份有限公司 Data backup method and device, computer equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115686939A (en) * 2022-10-27 2023-02-03 湖南长银五八消费金融股份有限公司 Data backup method and device, computer equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109635276B (en) Information matching method and terminal
CN103810212A (en) Automated database index creation method and system
CN111061752B (en) Data processing method and device and electronic equipment
CN110175306A (en) A kind of processing method and processing device of advertising information
CN114528157A (en) Database sensitive table backup method and device
CN112181830B (en) Memory leak detection method, device, terminal and medium
CN114003568A (en) Data processing method and related device
CN105677677A (en) Information classification and device
CN113129121A (en) E-commerce platform financial reconciliation accounting method and device
CN110471764A (en) A kind of processing method and processing device of memory cleaning
CN113326211B (en) Test case generation method and device
CN107193721B (en) Method and device for generating log
CN109360019A (en) A kind of personal vehicles price evaluation method
CN115293932A (en) Intellectual property payment reminding method and device, electronic equipment and medium
CN113129071A (en) Method and device for analyzing product SKU of merchant
CN112650864A (en) Data processing method and device, electronic equipment and storage medium
CN111967767A (en) Business risk identification method, device, equipment and medium
CN111679973A (en) Software test scheduling method and device, computer equipment and readable storage medium
CN108073712A (en) Master data delet method, device and computer equipment in information system
CN111190986A (en) Map data comparison method and device
CN111753020A (en) Method and device for establishing relational network model
CN114880394B (en) SQL script sharing method, device and medium
CN111309623A (en) Coordinate data classification test method and device
CN117708857A (en) Method and device for detecting electronic file, electronic equipment and medium
CN115269064A (en) Service processing method and device

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