Large database algorithm based on two-factor encryption and decryption
By encrypting the content and structure of user record data, combined with a two-factor encryption algorithm, the problem of data leakage in the medical industry by domestically produced databases has been solved, achieving a higher level of data security and system efficiency.
Patent Information
- Application Number
- PCT/CN2025/106988
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-08-22
- Filing Date
- 2025-07-04
- Publication Date
- 2026-02-26
AI Technical Summary
Domestically produced databases in the medical industry suffer from data leakage and low system security, especially when facing hacker attacks, making it difficult to effectively protect data security.
The algorithm employs a two-factor encryption/decryption approach to encrypt user record data in terms of content and file structure. It also generates a database file using the two-factor encryption algorithm and combines this with user authentication to achieve multi-layered protection of the data.
It improved database security, reduced the risk of data leakage, improved system access efficiency, and enabled isolated management of users from different units.
Smart Images

Figure CN2025106988_26022026_PF_FP_ABST
Abstract
Description
A large database algorithm based on double-factor encryption and decryption TECHNICAL FIELD
[0001] The present application relates to the technical field of database, in particular to a large database algorithm based on double-factor encryption and decryption. BACKGROUND
[0002] As the key research content of information security, data security has always been the focus of attention of many scholars and software practitioners, and even ordinary people. The localization wave sweeps, and the domestic operating system based on LINUX and the domestic database based on MYSQL and POSTGRESQL are gradually accepted by the public.
[0003] Medical informationization is related to the life and health safety of everyone, and not only has large data volume, but also has relatively high safety requirements, which requires in-depth research on the database security of the medical industry. Because the domestic database is in the early stage of development, the data security industry still has problems such as data leakage, low system safety coefficient, and frequent data hacking attacks. At present, data encryption mainly has three ways: encryption in the system, client (DBMS outer layer) encryption, and server (DBMS kernel layer) encryption. The server and client encryption are both data content encryption, and the client encryption has the advantages of not increasing the load of the database server and realizing transmission encryption on the network. This encryption method usually uses a database outer tool to realize; and the server-side encryption needs to operate the database management system itself, which is core layer encryption, and its implementation difficulty is relatively large without the cooperation of the database developer. SUMMARY
[0004] In order to alleviate or solve at least one aspect or at least one point of the above problems, the present application is proposed.
[0005] The large database algorithm based on double-factor encryption and decryption of the present application comprises the following steps:
[0006] S1: obtaining content encryption factors by content encryption algorithm for user record data of character type, numerical type and time date type;
[0007] S2: processing the file storing the content encryption factors by text compression algorithm to obtain compressed files and compression information;
[0008] S3: obtaining structure encryption factors by structure encryption algorithm for disk sector information, file offset information and the compression information stored by the file;
[0009] S4: processing the compressed files and the structure encryption factors by double-factor encryption algorithm to complete the encryption process and generate database files;
[0010] S5: completing user identity authentication by verifying user information, and obtaining database access permission information of the user;
[0011] S6: reading the database file from the disk into a memory read-write buffer;
[0012] S7: decrypting the database file by a double-factor decryption algorithm to obtain a compressed file and a structure encryption factor;
[0013] S8: obtaining disk sector information, file offset information and the compressed information of the file storage by a structure decryption algorithm through the structure encryption factor;
[0014] S9: obtaining a content encryption factor by a text decompression algorithm through the disk sector information, the file offset information and the compressed information of the file storage;
[0015] S10: completing a decryption process by a content decryption algorithm through the content encryption factor to obtain user record data.
[0016] Preferably, the content encryption algorithm is used to generate the content encryption factor by encrypting the user record data of character type, numerical type and time date type after text processing.
[0017] Preferably, the text compression algorithm is a file processing algorithm using adjacent character shared storage space to save storage space and obtain related compressed information.
[0018] Preferably, the structure encryption algorithm is used to obtain the storage position of the user record data according to the disk sector information, the file offset information and the compressed information of the file storage, and then encrypt the storage position to obtain the structure encryption factor.
[0019] Preferably, the content encryption algorithm and the double-factor encryption algorithm adopt a symmetric encryption algorithm, including DES algorithm and AES algorithm; and the structure encryption algorithm includes an asymmetric algorithm.
[0020] Preferably, the user identity authentication adopts MD5 algorithm.
[0021] Preferably, the double-factor decryption algorithm corresponds to the double-factor encryption algorithm; the structure decryption algorithm corresponds to the structure encryption algorithm; the text decompression algorithm corresponds to the text compression algorithm; and the content decryption algorithm corresponds to the content encryption algorithm.
[0022] Preferably, the compressed information includes offset information of the content encryption factor before and after compression.
[0023] Preferably, the content encryption algorithm and the double-factor encryption algorithm replace the encryption and decryption key pairs to realize separate and isolated management of different unit users.
[0024] Advantages of the present application:
[0025] The present application solves the data security control problem of the disk and the memory buffer, increases the encryption of the data file structure on the basis of the traditional encryption of the data content, realizes the parallel processing and the buffer processing of the database data file, improves the system access efficiency, realizes the separate and isolated management of different unit users by replacing the encryption and decryption key pairs, improves the security of the database, and reduces the risk of data leakage. BRIEF DESCRIPTION OF DRAWINGS
[0026] Fig. 1 is a large database algorithm flowchart based on double-factor encryption and decryption of an exemplary embodiment of the present application.
[0027] Fig. 2 is a content encryption algorithm schematic diagram of an exemplary embodiment of the present application.
[0028] Fig. 3 is a structure encryption algorithm schematic diagram of an exemplary embodiment of the present application.
[0029] Fig. 4 is a double-factor encryption algorithm schematic diagram of an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0030] The following description of the embodiments of the present application with reference to the accompanying drawings is intended to explain the general inventive concept of the present application, and should not be understood as a limitation thereof. In the present application, the same reference numerals denote the same or similar components.
[0031] The features described herein can be implemented in different forms and should not be construed as limited to the examples described herein. Rather, these described examples have been provided so that this disclosure will be thorough, and will fully convey the scope of the methods, devices and / or systems that can be implemented in the present application, after fully understanding is made of the disclosure.
[0032] Although terms such as "first", "second" and "third" can be used herein to describe various components, assemblies, regions, layers or parts, these components, assemblies, regions, layers or parts should not be limited by these terms. Rather, these terms are only used to distinguish one component, assembly, region, layer or part from another component, assembly, region, layer or part.
[0033] In the description, when an element (such as a layer, a region, or a substrate) is referred to as being "on" another element, "connected to" or "coupled to" another element, it can be directly on, directly connected to, or directly coupled to the other element, or one or more other elements can be interposed therebetween. In contrast, when an element is referred to as being "directly on," "directly connected to," or "directly coupled to" another element, there are no other elements interposed therebetween.
[0034] The terminology used herein is for the purpose of describing various examples only and is not intended to be limiting of the disclosure. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. The terms "comprises," "comprising," "includes," "including," and "has," "having," and the like are inclusive of the stated features, numbers, operations, members, elements, and / or combinations thereof, but are not limited to them.
[0035] In order to enable a person skilled in the art to use the content of the present application, the following exemplary embodiments will be given below in conjunction with specific application scenarios, parameters of specific systems, devices and elements, and specific connection modes. However, for those skilled in the art, these embodiments are only examples, and the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of the present application.
[0036] According to one exemplary embodiment of the present application, as shown in FIGS. 1-4, a large database algorithm based on double-factor encryption and decryption includes the following steps:
[0037] S1: User record data of character type, numerical type, and time date type is obtained through a content encryption algorithm to obtain a content encryption factor;
[0038] S2: A file storing the content encryption factor is processed through a text compression algorithm to obtain a compressed file and compression information;
[0039] S3: Disk sector information, file offset information, and the compression information are processed through a structure encryption algorithm to obtain a structure encryption factor;
[0040] S4: The compressed file and the structure encryption factor are processed through a double-factor encryption algorithm to complete the encryption process and generate a database file;
[0041] S5: User identity authentication is completed through verification of user information to obtain user database access permission information;
[0042] S6: The database file is read from a disk into a memory read-write buffer;
[0043] S7: The database file is decrypted by a double-factor decryption algorithm to obtain a compressed file and a structure encryption factor;
[0044] S8: The structure encryption factor is processed by a structure decryption algorithm to obtain disk sector information, file offset information and the compression information of the file storage;
[0045] S9: The content encryption factor is obtained by a text decompression algorithm through the disk sector information, file offset information and compression information of the file storage;
[0046] S10: The content encryption factor is processed by a content decryption algorithm to complete the decryption process and obtain user record data.
[0047] According to an example embodiment of the present application, as shown in FIGS. 1 and 2, the content encryption algorithm is used to generate a content encryption factor by encrypting character type, numerical type and time date type user record data after text processing.
[0048] According to an example embodiment of the present application, as shown in FIGS. 1 and 3, the text compression algorithm uses a file processing algorithm of adjacent characters sharing storage space to save storage space and obtain related compression information. The compression ratio is large or small according to different character situations, and the user can selectively compress and restore to form personalized compression and decompression processing. The compression information includes offset information of the content encryption factor before and after compression, which facilitates the system to find the required data according to the information.
[0049] The structure encryption algorithm obtains the storage location of the user record data according to the disk sector information, file offset information and compression information of the file storage, and obtains a structure encryption factor after encryption. The file splicing storage is also a process from memory to disk, and the file header information control of the storage block can be performed in the middle. The file structure information is encrypted to make the file information into ciphertext, and the read-write permission of the file control and the anti-tampering are determined by the offset algorithm control and the structure decryption algorithm control of reading out information, which increases the difficulty of modifying the file for tamperers.
[0050] The content encryption and double-factor encryption algorithm includes a symmetric encryption algorithm, including DES algorithm and AES algorithm; the structure encryption algorithm includes an asymmetric algorithm, including RSA algorithm, which can effectively prevent the file structure information from being cracked and tampered; the key and encryption algorithm used in the encryption process need to follow the password basic algorithm designated by the National Cryptographic Administration.
[0051] The user identity authentication adopts MD5 algorithm, and the user information can require to provide other related security credentials such as terminal key according to system security requirements in addition to providing username and password.
[0052] The double-factor decryption algorithm corresponds to the double-factor encryption algorithm; the structure decryption algorithm corresponds to the structure encryption algorithm, the text decompression algorithm corresponds to the text compression algorithm, and the content decryption algorithm corresponds to the content encryption algorithm; in the data conversion process from memory to disk, the write operation of the database is realized, and the data needs to be encrypted, the text compression algorithm, the content encryption algorithm, the structure encryption algorithm and the double-factor encryption algorithm are used; in the data conversion process from disk to memory, the read operation of the database is required, and the text decompression algorithm, the content decryption algorithm, the structure decryption algorithm and the double-factor decryption algorithm are used.
[0053] The content encryption algorithm and the double-factor encryption algorithm replace the encryption and decryption key pair, realize the separate management of different unit users, ensure the logical correctness of the read and write of data by multiple users, and therefore give consideration to the throughput of the system and the isolation of data.
[0054] The algorithm of the application has a larger calculation amount than the ordinary database algorithm, so that in the system operation, parallel processing and buffer processing technology are very critical, can fully utilize CPU resources, realize fast processing of data input and output, and can improve the operation efficiency and processing speed of the system.
[0055] Application example:
[0056] A disease prevention and control center needs to process a large amount of information and data of suspected infectious diseases;
[0057] A large amount of personal information and medical information in a certain area is collected through medical software, the personal information needs to be processed in secret, and the medical information needs to be publicly queried and statistically reported;
[0058] The read and write logic of the database is: first, publicly process the data, and separate different buffer areas for preprocessing.
[0059] The write process of the database: the data that needs to be encrypted is stored separately, the file compression storage can be used, the asymmetric encryption algorithm is used for tamper-proof processing; meanwhile, the file content is encrypted, and on the basis of content encryption and file structure encryption, the encrypted database file is obtained through a double-factor algorithm, and is written to the disk for storage;
[0060] The reading process of the database: the database file is read from the disk into the memory different buffer storage, first the public data processing is carried out, for the encrypted data, using double factor decryption algorithm, content encryption algorithm and architecture encryption algorithm layer by layer encryption, obtain the original user record data before encryption;
[0061] Data is read in place, and simple SQL queries can be used to achieve full-text search.
[0062] Data needs to be read in different places, and can be transferred in file backup mode, and processed by the same algorithm in different places, supporting query and full-text search.
[0063] The application realizes higher level of database security by content encryption and structure encryption of the database, and achieves the purpose of protecting private data.
[0064] Although the embodiments of the application have been shown and described, it will be understood by those of ordinary skill in the art that changes, element combinations can be made to these embodiments without departing from the principles and spirits of the application, and the scope of the application is defined by the appended claims and their equivalents.
Claims
1. A large database algorithm based on two-factor encryption and decryption, characterized by, The method comprises the following steps: S1: obtaining a content encryption factor by encrypting character type, numerical type and time date type user record data through a content encryption algorithm; S2: processing a file storing the content encryption factor through a text compression algorithm to obtain a compressed file and compression information; S3: obtaining a structure encryption factor by encrypting disk sector information, file offset information and the compression information through a structure encryption algorithm; S4: completing an encryption process by processing the compressed file and the structure encryption factor through a double-factor encryption algorithm to generate a database file; S5: completing user identity verification by verifying user information to obtain user database access permission information; S6: reading the database file from a disk into a memory read-write buffer; S7: decrypting the database file through a double-factor decryption algorithm to obtain a compressed file and a structure encryption factor; S8: obtaining disk sector information, file offset information and the compression information by decrypting the structure encryption factor through a structure decryption algorithm; S9: obtaining a content encryption factor by processing the disk sector information, the file offset information and the compression information through a text decompression algorithm; S10: completing a decryption process by processing the content encryption factor through a content decryption algorithm to obtain user record data.
2. The double factor based encryption-decryption algorithm for large database as claimed in claim 1 wherein, The content encryption algorithm is used to generate a content encryption factor by encrypting character type, numerical type and time date type user record data after unified text processing.
3. The double factor based encryption and decryption large database algorithm according to claim 2, wherein, The text compression algorithm is a file processing algorithm that saves storage space by sharing storage space of adjacent characters and obtains related compression information.
4. The double factor based encryption and decryption large database algorithm according to claim 3, wherein, The structure encryption algorithm is used to obtain a storage location of user record data according to disk sector information, file offset information and the compression information, and then encrypt the storage location to obtain a structure encryption factor.
5. The double factor based encryption-decryption algorithm for large database as claimed in claim 4 wherein, The content encryption algorithm and the double-factor encryption algorithm adopt a symmetric encryption algorithm, including a DES algorithm and an AES algorithm; and the structure encryption algorithm includes an asymmetric algorithm.
6. The double factor based encryption and decryption algorithm for large database as claimed in claim 5 wherein, The user identity verification adopts an MD5 algorithm.
7. The double factor based encryption-decryption algorithm for large database as claimed in claim 6 wherein, The double-factor decryption algorithm corresponds to the double-factor encryption algorithm; the structure decryption algorithm corresponds to the structure encryption algorithm; the text decompression algorithm corresponds to the text compression algorithm; and the content decryption algorithm corresponds to the content encryption algorithm.
8. The double factor based encryption and decryption large database algorithm according to claim 7, wherein, The compression information includes offset information before and after compression of a content encryption factor stored in a text.
9. The double factor based encryption and decryption large database algorithm according to claim 8, wherein, The content encryption algorithm and the double-factor encryption algorithm replace encryption and decryption key pairs to realize separate and isolated management of different unit users.
Citation Information
Patent Citations
Database data encryption processing method
CN113792312A
Large database algorithm based on two-factor encryption and decryption
CN118690413A
Block store management for remote storage systems
US10809920B1
Compression of encrypted data in database management systems
US20080162521A1
Efficient solid state drive data compression scheme and layout
US20160378352A1