CN113742340B - Database table processing method and related equipment - Google Patents

Database table processing method and related equipment Download PDF

Info

Publication number
CN113742340B
CN113742340B CN202110940396.8A CN202110940396A CN113742340B CN 113742340 B CN113742340 B CN 113742340B CN 202110940396 A CN202110940396 A CN 202110940396A CN 113742340 B CN113742340 B CN 113742340B
Authority
CN
China
Prior art keywords
information
database table
encryption
encryption information
decryption
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.)
Active
Application number
CN202110940396.8A
Other languages
Chinese (zh)
Other versions
CN113742340A (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.)
Shenzhen TCL New Technology Co Ltd
Original Assignee
Shenzhen TCL New 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 Shenzhen TCL New Technology Co Ltd filed Critical Shenzhen TCL New Technology Co Ltd
Priority to CN202110940396.8A priority Critical patent/CN113742340B/en
Publication of CN113742340A publication Critical patent/CN113742340A/en
Application granted granted Critical
Publication of CN113742340B publication Critical patent/CN113742340B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • 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/2282Tablespace storage structures; 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/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application provides a database table processing method and related equipment, which can acquire a source code file for encrypting and decrypting a database table, and extract first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information; updating the security level of the first encryption information and the security level of the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, wherein the security level of the second encryption information is higher than that of the first encryption information; encrypting the database table according to the second encryption information, and decrypting the database table according to the second decryption information when the database table needs to be read; the embodiment of the application can update the original first encryption information and first decryption information of the database table by adopting the second encryption information and the second decryption information with higher security level, thereby improving the security of the database table and further improving the security of the database.

Description

Database table processing method and related equipment
Technical Field
The application relates to the technical field, in particular to a database table processing method and related equipment.
Background
With the rapid development of intelligent televisions, the safety problem of intelligent television data is increasingly prominent. In recent years, in order to solve the security problem of smart television data, smart television factories in various countries and regions around the world continuously strengthen privacy protection of data.
Currently, the security problem of the intelligent television data is solved, and field-level encryption is generally adopted in the database of the intelligent television, namely, key characters in the data are encrypted and stored in the database, and then are decrypted when the key characters are used. In this way, when the data storage reaches a certain level, the encryption and decryption speeds of key characters of the data are slow, and the memory overhead is also high; in addition, the security level of data is limited by the encryption algorithm, which is less secure and risks being broken to expose the data.
Disclosure of Invention
The embodiment of the application provides a database table processing method and related equipment, wherein the related equipment comprises a database table processing device, computer equipment and a computer readable storage medium, so that the safety of a database can be improved.
A database table processing method, comprising:
Acquiring a source code file for encrypting and decrypting a database table, and extracting first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information;
Updating the security level of the first encryption information and the security level of the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, wherein the security level of the second encryption information is higher than that of the first encryption information;
Encrypting the database table according to the second encryption information, and decrypting the database table according to the second decryption information when the database table needs to be read.
Accordingly, an embodiment of the present application provides a database table processing apparatus, including:
the acquisition unit can be used for acquiring a source code file for encrypting and decrypting the database table, and extracting first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information;
The updating unit can be used for updating the security level of the first encryption information and the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, and the security level of the second encryption information is higher than that of the first encryption information;
and the encryption unit can be used for encrypting the database table according to the second encryption information and decrypting the database table according to the second decryption information when the database table needs to be read.
In some embodiments, the updating unit may be specifically configured to receive a modification instruction for the first encryption information and the first decryption information; and updating the first encryption information and the first decryption information according to the modification instruction to obtain second encryption information and second decryption information corresponding to the second encryption information.
In some embodiments, the updating unit may be specifically configured to obtain pre-stored target encryption information matched with the first encryption information, and target decryption information matched with the first decryption information, where the target decryption information corresponds to the target encryption information; updating the first encryption information based on the target encryption information to obtain second encryption information; updating the first decryption information based on the target decryption information to obtain second decryption information.
In some embodiments, the updating unit may be specifically configured to determine a second security level according to the first security level of the first encrypted information, where the second security level is higher than the first security level; and extracting the pre-stored target encryption information matched with the first encryption information and the target decryption information matched with the first decryption information according to the second security level.
In some embodiments, the database table processing apparatus further comprises a decryption unit operable to encrypt the new database table according to the second encryption information when the new database table is generated; and when the new database table needs to be read, decrypting the new database table according to the second decryption information.
In some embodiments, the database table processing apparatus further includes a generating unit operable to generate an initial table backup file corresponding to the new database table when generating the new database table; when the new database table is updated, the initial table backup file is updated corresponding to the updated new database table, and the updated table backup file is obtained.
In some embodiments, the database table processing apparatus further includes an overlay unit operable to overlay the updated table backup file with the initial table backup file.
In some embodiments, the database table processing device further includes a reading unit, which may be configured to, when reading the new database table fails, read a main database table in which information of the new database table is recorded; reading the backup file of the initial table according to the information of the new database table in the main database table to generate a target database table; and updating the data which are failed to be read in the new database table according to the target database table.
In some embodiments, the reading unit may be specifically configured to traverse the new database table, and extract the data successfully read in the new database table; and inserting the data which is successfully read into the target database table so as to update the data which is failed to be read in the new database table.
In addition, the embodiment of the application also provides computer equipment, which comprises a memory and a processor; the memory stores a computer program, and the processor is configured to run the computer program in the memory to execute any one of the database table processing methods provided by the embodiments of the present application.
In addition, the embodiment of the application also provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute any database table processing method provided by the embodiment of the application.
The embodiment of the application can acquire the source code file for encrypting and decrypting the database table, and extract the first encryption information of the database table in the source code file and the first decryption information corresponding to the first encryption information; updating the security level of the first encryption information and the security level of the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, wherein the security level of the second encryption information is higher than that of the first encryption information; encrypting the database table according to the second encryption information, and decrypting the database table according to the second decryption information when the database table needs to be read; the embodiment of the application can update the original first encryption information and first decryption information of the database table by adopting the second encryption information and the second decryption information with higher security level, thereby improving the security of the database table and further improving the security of the database.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic view of a database table processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of a database table processing method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a database table processing device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
The embodiment of the application provides a database table processing method, a database table processing device, computer equipment and a computer readable storage medium. The database table processing device may be integrated in a computer device, and the computer device may be a server or a terminal.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), basic cloud computing services such as big data and an artificial intelligent platform. The terminal may be, but is not limited to, a smart television, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, etc. The terminal and the server may be directly or indirectly connected through wired or wireless communication, and the present application is not limited herein.
For example, referring to fig. 1, taking a database table processing device as an example, the database table processing device is integrated in a computer device, the computer device is a smart television, and the smart television obtains a source code file for encrypting and decrypting a database table, and extracts first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information; updating the security level of the first encryption information and the security level of the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, wherein the security level of the second encryption information is higher than that of the first encryption information; encrypting the database table according to the second encryption information, and decrypting the database table according to the second decryption information when the database table needs to be read.
The source code file is used for generating encryption information and decryption information of the database table, and the embodiment of the application can decrypt and decrypt the database table through the source code file.
The second encryption information may be an improvement based on the first encryption information or an improvement not based on the first encryption information.
The security level is generally determined by the number of bits of the encrypted information and the complexity of the algorithm, and the security level can be predetermined.
The following will describe in detail. The following description of the embodiments is not intended to limit the preferred embodiments.
The present embodiment will be described from the perspective of a database table processing apparatus, which may be specifically integrated in a computer device, and the computer device may be a server or a device such as a terminal; the terminal may include a smart television, a tablet computer, a notebook computer, a personal computer (PC, personal Computer), a wearable device, a virtual reality device, or other devices capable of acquiring data.
As shown in fig. 2, the specific flow of the database table processing method is as follows:
101. and acquiring a source code file for encrypting and decrypting the database table, and extracting first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information.
The source code file is used for generating encryption information and decryption information of the database table, and the embodiment of the application can decrypt and decrypt the database table through the source code file. The source code file may be sqlciper source code files.
The embodiment of the application can extract the source code file for encrypting and decrypting the database table based on the file identification of the source code file.
The first encryption information may carry a first encryption information tag, and the first decryption information may carry a first decryption information tag. Or the first encryption information and the first decryption information corresponding to the first encryption information may all carry table identifiers of the database table.
102. And carrying out security level updating on the first encryption information and the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information.
Wherein the security level of the second encrypted information is higher than the security level of the first encrypted information.
The security level is generally determined by the number of bits of the encrypted information and the complexity of the algorithm, and the security level can be predetermined.
The second encryption information may be an improvement based on the first encryption information or an improvement not based on the first encryption information.
Specifically, in the embodiment of the present application, security level updating is performed on the first encrypted information and the first decrypted information to obtain the second encrypted information and the second decrypted information corresponding to the second encrypted information may have various manners.
For example, the computer device receives modification instructions for the first encryption information and the first decryption information; and updating the first encryption information and the first decryption information according to the modification instruction to obtain second encryption information and second decryption information corresponding to the second encryption information.
Wherein the modification instruction may be an instruction triggered by a developer executing a modification operation on the computer device for the first encryption information and the first decryption information.
Wherein the second encryption information and the second decryption information corresponding to the second encryption information may be packaged into a so file, so that the second encryption information and the second decryption information corresponding to the second encryption information are conveniently exposed to the application for use.
Based on the modification instruction, the embodiment of the application can modify the first encryption information and the first decryption information corresponding to the first encryption information into more complex information so as to form the second encryption information and the second decryption information corresponding to the second encryption information, thereby improving the security level of the database table.
Based on the modification instruction, the embodiment of the application can modify the code language of the second encryption information and the code language of the second decryption information corresponding to the second encryption information to obtain a simpler code language, for example, the second encryption information and the second decryption information are converted from Java language to C language, and Java is compiled into a class file from the aspect of compiling, and the class file is further compiled into corresponding machine codes by a Java virtual machine when the class file is operated so as to facilitate instruction calling of computer equipment. The C language is precompiled into precompiled files, and the precompiled files are compiled into binary files which can be recognized by computer equipment, so that a plurality of steps can be saved. Therefore, the embodiment of the application converts the second encryption information and the second decryption information from Java language to C language, so that the speed of encrypting the second encryption information by the computer equipment and the speed of decrypting the second decryption information by the computer equipment can be improved.
For example, the computer device acquires target encryption information matched with the first encryption information stored in advance and target decryption information matched with the first decryption information, the target decryption information corresponding to the target encryption information; updating the first encryption information based on the target encryption information to obtain second encryption information; updating the first decryption information based on the target decryption information to obtain second decryption information.
Wherein the security level of the target encryption information is higher than the first encryption information.
The embodiment of the application can replace the first encryption information with the target encryption information so as to update the first encryption information; the embodiment of the application can replace the second decryption information with the target decryption information so as to update the second decryption information.
For example, the embodiment of the application can extract the target encryption information matched with the first encryption information according to the identification of the target encryption information, and can extract the target decryption information matched with the first decryption information according to the identification of the target decryption information.
For example, the embodiment of the application can determine a second security level according to the first security level of the first encrypted information, wherein the second security level is higher than the first security level; and extracting the pre-stored target encryption information matched with the first encryption information and the target decryption information matched with the first decryption information according to the second security level.
Wherein at least one of the encrypted information corresponding to the second security level. When only one piece of encryption information corresponding to the second security level exists, the encryption information is second target encryption information. When there are at least two pieces of encryption information corresponding to the second security level, the target encryption information matched with the first encryption information can be extracted according to the identification of the target encryption information.
Wherein at least one of the decryption information corresponding to the second security level. When only one piece of decryption information corresponding to the second security level is provided, the decryption information is the second target decryption information. When there are at least two decryption information corresponding to the second security level, the target decryption information matched with the first decryption information may be extracted according to the identification of the target decryption information.
The embodiment of the application can split the opensl library originally used for the database table from the source code level in a multi-level manner, extract the algorithm library, and split the algorithm library into a symmetric encryption algorithm library, an asymmetric encryption library and a summary algorithm library. The symmetrical encryption algorithm library comprises AES, DES, RC, RC5 and other encryption information and decryption information corresponding to the encryption information; the asymmetric encryption library comprises encryption information such as RSA, DSA and the like and decryption information corresponding to the encryption information; the summary algorithm library comprises encryption information such as MD5, SHA and the like and decryption information corresponding to the encryption. The embodiment of the application can modify the encryption information and the decryption information in the symmetrical encryption algorithm library, the asymmetrical encryption library and the abstract algorithm library according to the modification instruction to obtain the encryption information and the decryption information with higher security level. The embodiment of the application can also optimize the character String encryption type of the encryption information in the symmetrical encryption algorithm library, the asymmetrical encryption library and the abstract algorithm library from String to Char array type according to the modification instruction, carry out pointer-level encryption, and correspondingly modify the decryption information corresponding to the encryption information based on the modification instruction. Therefore, the embodiment of the application can improve the encryption speed and encryption security of the character string, reduce the cost, and reduce the volume of each application when the algorithm library is used due to the splitting of the algorithm library.
The embodiment of the application can extract the target encryption information from the symmetrical encryption algorithm library, the asymmetrical encryption library and the abstract algorithm library and the target decryption information corresponding to the target encryption information.
103. Encrypting the database table according to the second encryption information, and decrypting the database table according to the second decryption information when the database table needs to be read.
In addition, the embodiment of the application updates the security level of the first encryption information and the first decryption information, and encrypts the new database table according to the second encryption information when the new database table is generated after obtaining the second encryption information and the second decryption information corresponding to the second encryption information; and when the new database table needs to be read, decrypting the new database table according to the second decryption information.
When a new database table is generated, generating an initial table backup file corresponding to the new database table; when the new database table is updated, the initial table backup file is updated corresponding to the updated new database table, and the updated table backup file is obtained.
The embodiment of the application sets the initial table backup file and the updated table backup file, and can avoid data loss and damage.
After the updated table backup file is obtained, the computer equipment of the embodiment of the application covers the updated table backup file with the initial table backup file. Thus, the computer equipment only keeps one table backup file, and the storage space can be saved.
According to the embodiment of the application, after the initial table backup file is generated corresponding to the new database table when the new database table is generated, when the new database table is read out, the main database table is read out, and the information of the new database table is recorded in the main database table; reading the backup file of the initial table according to the information of the new database table in the main database table to generate a target database table; and updating the data which are failed to be read in the new database table according to the target database table.
Wherein a failure to read a new database table indicates that the new database table is corrupted.
The main database table may be a sqlite_master table, where the sqlite_master table stores all contents such as indexes, table names, table building sentences, and the like, and it can be said that the sqlite_master table records all information of the new database table.
Specifically, the updating of the data with failed reading in the new database table according to the target database table comprises the following steps: traversing the new database table, and extracting the data successfully read from the new database table; and inserting the data which is successfully read into the target database table so as to update the data which is failed to be read in the new database table.
The data read successfully in the new database table refers to the uncorrupted data in the new database table.
The embodiment of the application can acquire the source code file for encrypting and decrypting the database table, and extract the first encryption information of the database table in the source code file and the first decryption information corresponding to the first encryption information; updating the security level of the first encryption information and the security level of the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, wherein the security level of the second encryption information is higher than that of the first encryption information; encrypting the database table according to the second encryption information, and decrypting the database table according to the second decryption information when the database table needs to be read; the embodiment of the application can update the original first encryption information and first decryption information of the database table by adopting the second encryption information and the second decryption information with higher security level, thereby improving the security of the database table and further improving the security of the database.
In order to better implement the above method, the embodiment of the present application further provides a database table processing apparatus, where the database table processing apparatus may be integrated into a computer device, such as a server or a terminal, where the terminal may include a tablet computer, a notebook computer, and/or a personal computer.
For example, as shown in fig. 3, the database table processing apparatus may include an acquisition unit 301, an update unit 302, an encryption unit 303, as follows:
(1) An acquisition unit 301;
The obtaining unit 301 may be configured to obtain a source code file for encrypting and decrypting a database table, and extract first encryption information of the database table in the source code file, and first decryption information corresponding to the first encryption information.
(2) An updating unit 302;
the updating unit 302 may be configured to update the security level of the first encrypted information and the first decrypted information to obtain second encrypted information and second decrypted information corresponding to the second encrypted information, where the security level of the second encrypted information is higher than the security level of the first encrypted information.
The updating unit 302 may be specifically configured to receive a modification instruction for the first encryption information and the first decryption information; and updating the first encryption information and the first decryption information according to the modification instruction to obtain second encryption information and second decryption information corresponding to the second encryption information.
The updating unit 302 may be specifically configured to obtain pre-stored target encryption information matched with the first encryption information, and target decryption information matched with the first decryption information, where the target decryption information corresponds to the target encryption information; updating the first encryption information based on the target encryption information to obtain second encryption information; updating the first decryption information based on the target decryption information to obtain second decryption information.
The updating unit 302 may specifically be configured to determine a second security level according to the first security level of the first encrypted information, where the second security level is higher than the first security level; and extracting the pre-stored target encryption information matched with the first encryption information and the target decryption information matched with the first decryption information according to the second security level.
(3) An encryption unit 303;
The encrypting unit 303 may be configured to encrypt the database table according to the second encryption information, and decrypt the database table according to the second decryption information when the database table needs to be read.
In some embodiments, the database table processing apparatus further comprises a decryption unit 304, which may be configured to encrypt the new database table according to the second encryption information when the new database table is generated; and when the new database table needs to be read, decrypting the new database table according to the second decryption information.
In some embodiments, the database table processing apparatus further includes a generating unit 305, which may be configured to generate an initial table backup file corresponding to the new database table when generating the new database table; when the new database table is updated, the initial table backup file is updated corresponding to the updated new database table, and the updated table backup file is obtained.
In some embodiments, the database table processing apparatus further includes an overlay unit 306 that may be used to overlay the updated table backup file with the initial table backup file.
In some embodiments, the database table processing apparatus further includes a reading unit 307, which may be configured to, when reading the new database table fails, read a main database table in which information of the new database table is recorded; reading the backup file of the initial table according to the information of the new database table in the main database table to generate a target database table; and updating the data which are failed to be read in the new database table according to the target database table.
The reading unit 307 may be specifically configured to traverse the new database table, and extract data successfully read in the new database table; and inserting the data which is successfully read into the target database table so as to update the data which is failed to be read in the new database table.
As can be seen from the above, the obtaining unit 301 according to the embodiment of the present application may obtain a source code file for encrypting and decrypting a database table, and extract first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information; the updating unit 302 may update the security level of the first encrypted information and the first decrypted information to obtain second encrypted information and second decrypted information corresponding to the second encrypted information, where the security level of the second encrypted information is higher than the security level of the first encrypted information; the encryption unit 303 may encrypt the database table according to the second encryption information, and decrypt the database table according to the second decryption information when the database table needs to be read; the embodiment of the application can update the original first encryption information and first decryption information of the database table by adopting the second encryption information and the second decryption information with higher security level, thereby improving the security of the database table and further improving the security of the database.
The embodiment of the application also provides a computer device, as shown in fig. 4, which shows a schematic structural diagram of the computer device according to the embodiment of the application, specifically:
The computer device may include one or more processors 401 of a processing core, memory 402 of one or more computer readable storage media, a power supply 403, and an input unit 404, among other components. Those skilled in the art will appreciate that the computer device structure shown in FIG. 4 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components. Wherein:
The processor 401 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 402, and calling data stored in the memory 402, thereby performing overall monitoring of the computer device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, a computer program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The memory 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and database table processing by executing the software programs and modules stored in the memory 402. The memory 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, a computer program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
The computer device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of charge, discharge, and power consumption management may be performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 404, which input unit 404 may be used to receive input digital or character information communications and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 401 in the computer device loads executable files corresponding to the processes of one or more computer programs into the memory 402 according to the following instructions, and the processor 401 executes the computer programs stored in the memory 402, so as to implement various functions, as follows:
Acquiring a source code file for encrypting and decrypting a database table, and extracting first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information; updating the security level of the first encryption information and the security level of the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, wherein the security level of the second encryption information is higher than that of the first encryption information; encrypting the database table according to the second encryption information, and decrypting the database table according to the second decryption information when the database table needs to be read.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a computer readable storage medium having stored therein a computer program that can be loaded by a processor to perform any of the database table processing methods provided by the embodiment of the present application.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Because the instructions stored in the computer readable storage medium may execute the steps in any database table processing method provided by the embodiments of the present application, the beneficial effects that any database table processing method provided by the embodiments of the present application may be achieved are detailed in the previous embodiments, and are not described herein.
Wherein according to an aspect of the application, a computer program product or a computer program is provided, the computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the methods provided in the various alternative implementations provided in the above embodiments.
The foregoing describes in detail a database table processing device, a computer device, and a computer readable storage medium, and applies specific examples to illustrate the principles and embodiments of the present application, where the foregoing examples are only used to help understand the method and core idea of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (10)

1. A database table processing method, comprising:
Acquiring a source code file for encrypting and decrypting a database table, and extracting first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information;
Updating the security level of the first encryption information and the security level of the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, wherein the security level of the second encryption information is higher than that of the first encryption information;
encrypting the database table according to the second encryption information, and decrypting the database table according to the second decryption information when the database table needs to be read;
The step of updating the security level of the first encryption information and the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information includes:
Receiving a modification instruction for the first encryption information and the first decryption information; updating the first encryption information and the first decryption information according to the modification instruction to obtain second encryption information and second decryption information corresponding to the second encryption information, and modifying the code language corresponding to the second encryption information and the second decryption information according to the modification instruction; or alternatively
Splitting a source database corresponding to the database table to obtain a symmetric encryption algorithm library, an asymmetric encryption library and a summary algorithm library; acquiring target encryption information matched with the first encryption information and target decryption information matched with the first decryption information, which are stored in advance, from the symmetrical encryption algorithm library, the asymmetrical encryption library and the abstract algorithm library, wherein the target decryption information corresponds to the target encryption information; updating the first encryption information based on the target encryption information to obtain the second encryption information; updating the first decryption information based on the target decryption information to obtain the second decryption information;
The extracting the first encryption information of the database table in the source code file and the first decryption information corresponding to the first encryption information includes:
extracting first encryption information according to the first encryption information mark, and extracting first decryption information according to the first decryption information mark; or alternatively
And extracting the first encryption information and the first decryption information corresponding to the first encryption information according to the table identifier carried by the database table.
2. The database table processing method according to claim 1, wherein the acquiring the pre-stored target encryption information matching the first encryption information and the target decryption information matching the first decryption information includes:
Determining a second security level according to the first security level of the first encrypted information, wherein the second security level is higher than the first security level;
and extracting the pre-stored target encryption information matched with the first encryption information and the target decryption information matched with the first decryption information according to the second security level.
3. The method for processing a database table according to claim 1, wherein after the security level update is performed on the first encrypted information and the first decrypted information to obtain second encrypted information and second decrypted information corresponding to the second encrypted information, the method further comprises:
encrypting a new database table according to the second encryption information when the new database table is generated;
And when the new database table needs to be read, decrypting the new database table according to the second decryption information.
4. A database table processing method according to claim 3, wherein the method further comprises:
when a new database table is generated, generating an initial table backup file corresponding to the new database table;
and when the new database table is updated, updating the initial table backup file corresponding to the updated new database table to obtain an updated table backup file.
5. The method for processing a database table according to claim 4, wherein when the new database table is updated, updating the initial table backup file corresponding to the updated new database table, after obtaining the updated table backup file, comprises:
And covering the updated list backup file with the initial list backup file.
6. The method of claim 4, wherein when generating a new database table, after generating an initial table backup file corresponding to the new database table, the method further comprises:
When the reading of the new database table fails, reading a main database table, wherein the information of the new database table is recorded in the main database table;
Reading the initial table backup file according to the information of the new database table in the main database table to generate a target database table;
And updating the data which is failed to be read in the new database table according to the target database table.
7. The database table processing method according to claim 6, wherein updating the data of the new database table that has failed to be read according to the target database table comprises:
traversing the new database table, and extracting successfully read data from the new database table;
and inserting the data which is successfully read into the target database table so as to update the data which is failed to be read in the new database table.
8. A database table processing apparatus, comprising:
the acquisition unit is used for acquiring a source code file for encrypting and decrypting a database table, and extracting first encryption information of the database table in the source code file and first decryption information corresponding to the first encryption information;
the updating unit is used for updating the security level of the first encryption information and the first decryption information to obtain second encryption information and second decryption information corresponding to the second encryption information, and the security level of the second encryption information is higher than that of the first encryption information;
The encryption unit is used for encrypting the database table according to the second encryption information and decrypting the database table according to the second decryption information when the database table needs to be read;
The updating unit is further configured to:
receiving a modification instruction for the first encryption information and the first decryption information;
updating the first encryption information and the first decryption information according to the modification instruction to obtain second encryption information and second decryption information corresponding to the second encryption information, and modifying the code language corresponding to the second encryption information and the second decryption information according to the modification instruction; or alternatively
Splitting a source database corresponding to the database table to obtain a symmetric encryption algorithm library, an asymmetric encryption library and a summary algorithm library; acquiring target encryption information matched with the first encryption information and target decryption information matched with the first decryption information, which are stored in advance, from the symmetrical encryption algorithm library, the asymmetrical encryption library and the abstract algorithm library, wherein the target decryption information corresponds to the target encryption information; updating the first encryption information based on the target encryption information to obtain the second encryption information; updating the first decryption information based on the target decryption information to obtain the second decryption information;
The extracting the first encryption information of the database table in the source code file and the first decryption information corresponding to the first encryption information includes:
extracting first encryption information according to the first encryption information mark, and extracting first decryption information according to the first decryption information mark; or alternatively
And extracting the first encryption information and the first decryption information corresponding to the first encryption information according to the table identifier carried by the database table.
9. A computer device comprising a memory and a processor; the memory stores a computer program, and the processor is configured to execute the computer program in the memory to perform the database table processing method according to any one of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program adapted to be loaded by a processor for performing the database table processing method of any of claims 1 to 7.
CN202110940396.8A 2021-08-17 2021-08-17 Database table processing method and related equipment Active CN113742340B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110940396.8A CN113742340B (en) 2021-08-17 2021-08-17 Database table processing method and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110940396.8A CN113742340B (en) 2021-08-17 2021-08-17 Database table processing method and related equipment

Publications (2)

Publication Number Publication Date
CN113742340A CN113742340A (en) 2021-12-03
CN113742340B true CN113742340B (en) 2024-06-04

Family

ID=78731361

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110940396.8A Active CN113742340B (en) 2021-08-17 2021-08-17 Database table processing method and related equipment

Country Status (1)

Country Link
CN (1) CN113742340B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114357488B (en) * 2022-01-04 2022-09-16 深圳市智百威科技发展有限公司 Data encryption system and method

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000025474A1 (en) * 1998-10-26 2000-05-04 Bradley Madison Company Doing Business As Evolv Adaptive Technology Cryptographic protocol for financial transactions
CN101504706A (en) * 2009-03-03 2009-08-12 中国科学院软件研究所 Database information encryption method and system
CN101615150A (en) * 2009-07-24 2009-12-30 中兴通讯股份有限公司 Data processing method and device based on embedded database
CN103279715A (en) * 2013-05-22 2013-09-04 李凤华 Database data encryption and decryption method and device
CN103885855A (en) * 2012-12-20 2014-06-25 航天信息股份有限公司 Data backup and recovery method and data backup and recovery device
CN104636444A (en) * 2015-01-13 2015-05-20 大唐移动通信设备有限公司 Database encryption and decryption method and device
CN107423631A (en) * 2016-05-23 2017-12-01 上海神计信息系统工程有限公司 A kind of database encipher-decipher method and device
CN107579962A (en) * 2017-08-24 2018-01-12 中积有限公司 A kind of method and device of source code encryption and decryption
CN109543366A (en) * 2017-09-22 2019-03-29 中国移动通信集团浙江有限公司 A kind of source code encryption method and its device and system
CN111177749A (en) * 2019-12-18 2020-05-19 深圳市金蝶天燕云计算股份有限公司 Encrypted source code file processing method and device, computer equipment and storage medium
WO2020101087A1 (en) * 2018-11-16 2020-05-22 (주) 더존비즈온 Encryption system and method for handling personal information
WO2021027134A1 (en) * 2019-08-14 2021-02-18 平安科技(深圳)有限公司 Data storage method, apparatus and device and computer storage medium
CN112685755A (en) * 2020-12-30 2021-04-20 石化盈科信息技术有限责任公司 Database encryption and decryption method and device, storage medium and electronic equipment
CN113158210A (en) * 2021-04-21 2021-07-23 建信金融科技有限责任公司 Database encryption method and device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013145627A1 (en) * 2012-03-29 2013-10-03 日本電気株式会社 Encrypted database system, client terminal, database server, data linking method, and program
US20140258720A1 (en) * 2013-03-11 2014-09-11 Barracuda Networks, Inc. Systems and methods for transparent per-file encryption and decryption via metadata identification
US10977383B2 (en) * 2016-10-05 2021-04-13 Snowflake Inc. Systems, methods, and devices for encrypting database data
US9992020B1 (en) * 2016-11-21 2018-06-05 Sap Se Online change of encryption root keys in a distributed database management system
US10291594B2 (en) * 2017-08-31 2019-05-14 Fmr Llc Systems and methods for data encryption and decryption

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2000025474A1 (en) * 1998-10-26 2000-05-04 Bradley Madison Company Doing Business As Evolv Adaptive Technology Cryptographic protocol for financial transactions
CN101504706A (en) * 2009-03-03 2009-08-12 中国科学院软件研究所 Database information encryption method and system
CN101615150A (en) * 2009-07-24 2009-12-30 中兴通讯股份有限公司 Data processing method and device based on embedded database
CN103885855A (en) * 2012-12-20 2014-06-25 航天信息股份有限公司 Data backup and recovery method and data backup and recovery device
CN103279715A (en) * 2013-05-22 2013-09-04 李凤华 Database data encryption and decryption method and device
CN104636444A (en) * 2015-01-13 2015-05-20 大唐移动通信设备有限公司 Database encryption and decryption method and device
CN107423631A (en) * 2016-05-23 2017-12-01 上海神计信息系统工程有限公司 A kind of database encipher-decipher method and device
CN107579962A (en) * 2017-08-24 2018-01-12 中积有限公司 A kind of method and device of source code encryption and decryption
CN109543366A (en) * 2017-09-22 2019-03-29 中国移动通信集团浙江有限公司 A kind of source code encryption method and its device and system
WO2020101087A1 (en) * 2018-11-16 2020-05-22 (주) 더존비즈온 Encryption system and method for handling personal information
WO2021027134A1 (en) * 2019-08-14 2021-02-18 平安科技(深圳)有限公司 Data storage method, apparatus and device and computer storage medium
CN111177749A (en) * 2019-12-18 2020-05-19 深圳市金蝶天燕云计算股份有限公司 Encrypted source code file processing method and device, computer equipment and storage medium
CN112685755A (en) * 2020-12-30 2021-04-20 石化盈科信息技术有限责任公司 Database encryption and decryption method and device, storage medium and electronic equipment
CN113158210A (en) * 2021-04-21 2021-07-23 建信金融科技有限责任公司 Database encryption method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于AES加密算法的数据库二级密钥技术;苗杰等;《计算机系统应用》;第22卷(第4期);全文 *

Also Published As

Publication number Publication date
CN113742340A (en) 2021-12-03

Similar Documents

Publication Publication Date Title
US11120018B2 (en) Spark query method and system supporting trusted computing
EP2897074B1 (en) Application code obfuscation device based on self-conversion and method therefor
CN111143869B (en) Application package processing method and device, electronic equipment and storage medium
CN109995523B (en) Activation code management method and device and activation code generation method and device
US9513762B1 (en) Static content updates
EP3374858B1 (en) Creating and modifying applications from a mobile device
CN109241707A (en) Application program obscures method, apparatus and server
CN113742340B (en) Database table processing method and related equipment
CN112036125A (en) Document management method and device and computer equipment
CN110020272B (en) Caching method and device and computer storage medium
CN110457869B (en) Program compiling and encrypting method and device, storage medium and electronic equipment
CN105447349A (en) Method and device for protecting derived symbol in so file
CN113342918B (en) Forest resource one-image quality inspection logic rule updating method and system and cloud platform
CN109543366B (en) Source code encryption method, device and system
CN117786726A (en) Source code file processing method and device, electronic equipment and storage medium
CN111984293A (en) Information processing method, device and storage medium
CN111400771A (en) Target partition checking method and device, storage medium and computer equipment
CN105975860B (en) A kind of trust file management method, device and equipment
CN115589316A (en) Data encryption transmission method and device, electronic equipment and storage medium
CN115203674A (en) Automatic login method, system, device and storage medium for application program
CN113672261A (en) Cloud software updating method, electronic device and storage medium
CN113568867B (en) File encryption migration method and device and electronic equipment
CN111459459A (en) Game client resource allocation method and system
US11509701B2 (en) Extended relationship signaling between events in event message tracks
CN116383780A (en) Code data processing method and device, computer medium and electronic equipment

Legal Events

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