Data masking coding method and system based on Gaussian database

By initializing the function of the low-sensitive data table fields in the Gaussian database and using the encoding function to generate coded values, the problem of low-sensitive data storage in the Gaussian database consumes a large amount of computing resources, and efficient data protection and security enhancement are achieved.

CN119848921AActive Publication Date: 2025-04-18福建新意科技有限公司
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202411871154.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-18
Publication Date
2025-04-18
Estimated Expiration
2044-12-18

AI Technical Summary

Technical Problem

In Gaussian databases, the storage of medium and low-sensitive data will consume a lot of computing resources or cannot meet security requirements. The existing general database data protection solutions are expensive and have poor flexibility, and lack effective solutions.

Method used

A data mask encoding method based on Gaussian database is proposed. By initializing the function of the low-sensitive data table fields in the Gaussian database, encoding the fields to be encoded using the encoding function, generating the encoding value, and storing it in the Gaussian database table fields when data is stored. The encoding function includes the process of converting the input string or table field into an encoded value. The encoding value consists of prefix, separator, digest, original value encoding and check bits.

Benefits of technology

This method effectively prevents attackers from restoring data through brute force cracking, enhances data security, ensures the integrity of data storage, reduces the risk of sensitive information leakage, and meets the needs of enterprises in protecting private data and compliance requirements, while also having high performance and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119848921A_ABST
    Figure CN119848921A_ABST
Patent Text Reader

Abstract

The invention provides a data masking coding method and system based on a Gaussian database, and the method comprises the steps: carrying out the initialization registration of functions of a medium-low sensitive data table field in the Gaussian database, and enabling the functions to comprise a coding function and a decoding function; when data is written into or updated in a data table field of a Gaussian database, a coding function is used for coding a specified field to be coded to generate a coded value, the coded value is stored in the table field of the Gaussian database, the coding function comprises a process of converting an input character string or table field into the coded value, and the coded value is stored in the table field of the Gaussian database. The coded value consists of a prefix, a separator, an abstract, an original value code and a check bit; and when the data is acquired from the Gaussian database table field, performing decoding processing on the specified to-be-decoded field by using the decoding function to acquire the original data before encoding. The data can be effectively protected in the storage process, so that the risk of sensitive information leakage is reduced, and the requirement of an enterprise for protecting private data is met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data coding, and in particular to a data masking coding method and system based on a Gaussian database. Background Art

[0002] Gaussian Database is an efficient and organized data collection system designed for storage, management and fast retrieval of information. As a leading enterprise-level database solution in China, Gaussian Database is widely used in many industries such as finance, telecommunications, government, and scientific research, and can effectively support large-scale data storage and complex data processing tasks.

[0003] The data stored in the database can usually be divided into three levels according to the sensitivity: highly sensitive data, medium sensitive data and low sensitive data. Highly sensitive data includes personal identity information, financial data, etc.; medium sensitive data includes customer information, internal reports, etc.; low sensitive data is public business information, etc. In the Gaussian database, highly sensitive data is protected by high-intensity encryption and decryption algorithms (such as RSA, ECC, etc.), while medium and low sensitive data are mainly protected by role-based access control (RBAC).

[0004] In daily database operation and maintenance, it is required to regularly maintain and upgrade the table structure in the Gaussian database, so the operation and maintenance personnel will be exposed to the stored data. In order to improve data security and privacy protection, the customer requires that some table fields of low- and medium-sensitivity data be masked to reduce the risk of sensitive information leakage.

[0005] As for the storage of medium and low-sensitivity data, if masking and protection are required, considering the large amount and wide range of data involved, the use of high-intensity encryption algorithms will consume a lot of computing resources, which is obviously inappropriate.

[0006] In application scenarios with large amounts of data, such as when the number of rows stored in a database table reaches tens of millions, traditional encryption methods can meet security requirements but cannot meet high performance requirements.

[0007] At present, the common database data protection solutions on the market have high performance overhead and poor flexibility. They are not suitable for large-scale data protection and lack effective solutions for scenarios that require large-scale data masking and processing.

[0008] In view of this, the present invention proposes a data masking coding method and system based on a Gaussian database to ensure that data is effectively protected during storage. Summary of the invention

[0009] In order to solve the problem that the storage of low-sensitivity data in a Gaussian database consumes a lot of computing resources or fails to meet security requirements, the present application provides a data masking encoding method, system, device and storage medium based on a Gaussian database to solve the above-mentioned technical defects.

[0010] According to the first aspect of the present application, a data masking coding method based on a Gaussian database is proposed, the method comprising the following steps:

[0011] S1. In the Gaussian database, functions are initialized and registered for the fields of medium and low sensitivity data tables, where the functions include encoding functions and decoding functions;

[0012] S2. When writing or updating data to a data table field of the Gaussian database, use an encoding function to encode the specified field to be encoded, generate an encoding value, and store the encoding value in the Gaussian database table field, wherein the encoding function includes a process of converting an input string or table field into an encoding value, and the encoding value consists of a prefix, a separator, a summary, an original value encoding, and a check digit;

[0013] S3. When obtaining data from the Gaussian database table field, a decoding function is used to decode the specified field to be decoded to obtain the original data before encoding.

[0014] Preferably, in step S2, the encoding process specifically includes the following sub-steps:

[0015] S21. The user submits a data write or update request to the Gaussian database system through an SQL statement, wherein the request specifies a database table to be written or updated, a field in the table, and at least one field to be encoded;

[0016] S22, the Gaussian database system receives and parses the SQL statement, and obtains the data to be written or updated and the information of the field to be encoded;

[0017] S23, encoding the value or string of the field to be encoded using a preset encoding function;

[0018] S24. Store the encoded value into the specified database table field to complete the data writing or updating operation.

[0019] Preferably, in step S3, the decoding process specifically includes the following sub-steps:

[0020] S31. The user queries the database table data through an SQL query statement and specifies the database table field to be decoded in the query statement;

[0021] S32, according to the database table field information specified by the user, use a preset decoding function to decode the value of the field;

[0022] S33. Determine whether the decoding is successful. If the decoding is successful, return the decoded value as part of the query result; if the decoding fails, return a null value as the value of the corresponding field in the query result.

[0023] Preferably, in step S2, the input of the encoding function is a string or a table field, and the output is a coded value, and the coded value includes a fixed 3-bit prefix ENC, a separator #, a 1-bit summary, an original value code and a check digit, and the total length is the sum of a fixed length of 6 bits and the original string length multiplied by 133%.

[0024] Preferably, in step S2, the encoding process includes: randomly selecting a group of digests, converting characters into binary data, dividing them into groups of 6 bits, and mapping them into printable ASCII characters according to the digests, thereby encoding the data.

[0025] Preferably, in step S2, the check bit is calculated based on the ASCII binary value of the encoded character string and is used to detect whether the data has been tampered with.

[0026] Preferably, the data masking coding method based on Gaussian database proposed in the present application also includes:

[0027] Receive the input coded value and extract the last digit of the coded value as the check digit;

[0028] Recalculate the part of the coded value except the check digit to obtain a calculated check digit;

[0029] Compare the calculated check digit with the check digit of the coded value. If the two are the same, the check passes and proceeds to the next step.

[0030] After the verification is passed, the summary information corresponding to the encoded value is obtained according to the information contained in the encoded string;

[0031] Using the summary information, a decoding operation is performed on the encoded value, wherein the decoding operation includes grouping the encoded character string into four characters each and converting each group of characters into corresponding three-byte binary data;

[0032] By searching for the corresponding conversion rules in the summary information, the converted binary data is restored to its original value before encoding.

[0033] In a second aspect, the present application proposes a data masking coding system based on a Gaussian database, the system comprising:

[0034] The initialization registration module is configured in the Gaussian database to perform function initialization registration on the fields of medium and low sensitivity data tables, where the functions include encoding functions and decoding functions;

[0035] The encoding module is configured to use the encoding function to encode the specified field to be encoded when writing or updating data to the data table field of the Gaussian database, generate an encoded value, and store the encoded value in the Gaussian database table field, wherein the encoding function includes a process of converting an input string or table field into an encoded value, and the encoded value consists of a prefix, a separator, a summary, an original value encoding, and a check digit;

[0036] The decoding module is configured to use a decoding function to decode the specified field to be decoded when obtaining data from the Gaussian database table field to obtain the original data before encoding.

[0037] In a third aspect, the present application proposes a terminal device, comprising a processor, a memory, and a computer program stored in the memory, wherein the computer program is executed by the processor to implement a data masking coding method based on a Gaussian database as described in any one of the above.

[0038] In a fourth aspect, the present application proposes a computer-readable storage medium, wherein the medium stores a computer program, and when the computer program is executed by a processor, the data masking coding method based on the Gaussian database as described in any one of the above is implemented.

[0039] Compared with the prior art, the beneficial results of the present invention are:

[0040] (1) Enhanced security: During the encoding process, a set of summaries is randomly selected to increase the complexity of the encoding, thereby increasing the difficulty of cracking. This method effectively prevents attackers from restoring data through brute force cracking, thereby enhancing data security.

[0041] (2) Data integrity: A check bit is added at the end of the encoded value to detect whether the data has been tampered with, thereby ensuring the integrity of data storage and preventing data corruption or tampering, thereby improving the overall security and reliability of the system.

[0042] (3) Flexibility: The present invention does not require the addition of new database fields, nor does it affect the storage design of the user's existing tables. It only requires the expansion of the length of the table fields. It has high flexibility and is easy to maintain.

[0043] (4) Ease of use: The method provided by the present invention can be seamlessly connected with the Gaussian database, reducing development costs, and providing a simple database API interface to facilitate rapid deployment and promotion, thereby improving data security.

[0044] (5) High performance: The algorithm operates efficiently, can quickly convert and process binary data, facilitates storage, supports large-scale data operations, and maintains low processing overhead and low latency, ensuring fast response and high throughput. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0046] Figure 1 is a flow chart of a data masking encoding method based on a Gaussian database according to the present application;

[0047] Figure 2 It is a schematic diagram of the execution flow of initializing registration of the encoding and decoding functions according to the present application;

[0048] Figure 3 is a schematic diagram of the execution flow of the encoding operation according to the present application;

[0049] Figure 4 is a schematic diagram of the execution flow of the decoding operation according to the present application;

[0050] Figure 5 is a structural diagram of a data masking coding system based on a Gaussian database according to the present application;

[0051] Figure 6 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION

[0052] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0053] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0054] Figure 1 The flowchart of the data masking encoding method based on Gaussian database of the present application is shown as follows: Figure 1 As shown, the method comprises the following steps:

[0055] S1. In the Gaussian database, functions are initialized and registered for the fields of medium and low sensitive data tables, where the functions include encoding functions and decoding functions.

[0056] That is, before using the encoding and decoding functions, you need to register the functions into the Gaussian database, and after successful registration, you can always use them.

[0057] S2. When writing or updating data to a data table field of a Gaussian database, an encoding function is used to encode the specified field to be encoded, generate an encoding value, and store the encoding value in a Gaussian database table field, wherein the encoding function includes a process of converting an input string or table field into an encoding value, and the encoding value consists of a prefix, a separator, a summary, an original value encoding, and a check digit.

[0058] In this embodiment, the encoding process specifically includes the following sub-steps:

[0059] S21. The user submits a data write or update request to the Gaussian database system through an SQL statement, wherein the request specifies a database table to be written or updated, a field in the table, and at least one field to be encoded;

[0060] S22, the Gaussian database system receives and parses the SQL statement, and obtains the data to be written or updated and the information of the field to be encoded;

[0061] S23, encoding the value or string of the field to be encoded using a preset encoding function;

[0062] S24. Store the encoded value into the specified database table field to complete the data writing or updating operation.

[0063] Preferably, the function name of the encoding function is: ShineBaseEncode, the input is: a string or a table field, and the output is: an encoded value.

[0064] The encoding function described in this application is developed based on the Gaussian database interface and supports use as a database function to encode the input string or table field, generate the encoded value and write it into the database field. The encoding description is as follows:

[0065] The encoded value consists of a prefix, a separator, a digest, an original value encoding, and a check digit.

[0066] Prefix: Use a fixed 3-bit prefix "ENC" to indicate that the field is encoded data.

[0067] Separator: Use "#" as the separator.

[0068] Summary: One bit is used to represent summary information. The range is: A, B, C, D, E. Each letter represents a group of summaries. The system provides five different groups of summaries. The summaries are composed of visible ASCII characters. One group of summaries is used for each encoding.

[0069] Raw value encoding: Get a set of random digests, encode the data by converting the characters into binary data, dividing them into groups of 6 bits, and mapping them to printable ASCII characters according to the digests.

[0070] Check digit: Get the ASCII binary value according to the encoded string, shift the odd digits to the left and take the remainder, return the decimal value for the even digits, add up the decimal value of each digit, get the accumulated value and take the remainder with respect to 10 to get the check code. The check code is a number between 0 and 9.

[0071] Total length: The sum of the fixed length of 6 bits and the original string length multiplied by 133%.

[0072] Continue to refer Figure 1 The data masking encoding method based on the Gaussian database provided in the present application also includes the following steps:

[0073] S3. When obtaining data from the Gaussian database table field, a decoding function is used to decode the specified field to be decoded to obtain the original data before encoding.

[0074] In this embodiment, the decoding process specifically includes the following sub-steps:

[0075] S31. The user queries the database table data through an SQL query statement and specifies the database table field to be decoded in the query statement;

[0076] S32, according to the database table field information specified by the user, use a preset decoding function to decode the value of the field;

[0077] S33. Determine whether the decoding is successful. If the decoding is successful, return the decoded value as part of the query result; if the decoding fails, return a null value as the value of the corresponding field in the query result.

[0078] Preferably, the function name of the decoding function is: ShineBaseDecode, the input is: the encoded string or field, and the output is: the original value before encoding.

[0079] The decoding function described in this application is developed based on the high-level database interface and supports use as a database function to decode the input encoded string or field and return the decoded value. The decoding process is as follows:

[0080] Verification code: Enter the code value, obtain the last check digit, recalculate the check digit for the encoded original value, compare the calculated check digit with the encoded check digit, and if they are the same, the verification passes.

[0081] Decoding: After verification, the summary information corresponding to the coded value is obtained according to the coded string information, and the coded value is decoded according to the summary information. The value obtained by decoding is the original value before encoding. Decoding is to group the coded string into four characters and convert it into three-byte binary data, and restore it to the original content by looking up the summary information.

[0082] The present invention can realize the encoding and decoding of the stored values ​​of the Gaussian database table fields. When used as a function of the Gaussian database, it needs to be initialized and registered, and the access to the encoding function and the decoding function is managed through role-based access control (RBAC). The use scenario of encoding is when writing or updating database field data, encoding processing is performed. The use scenario of decoding is when querying database fields, decoding processing is performed.

[0083] Figure 2 The schematic diagram of the execution flow of initialization registration of encoding and decoding functions is shown as follows: Figure 2 As shown, first, copy the compiled function file to Gauss's working directory. Second, execute the function registration instruction. As follows:

[0084] Register the encoding function:

[0085] CREATE OR REPLACE FUNCTION ShineBaseEncode(text)RETURNS text AS'libXyEncrypt.so','ShineBaseEncode'LANGUAGE CSTRICT;

[0086] Register the decoding function:

[0087] CREATE OR REPLACE FUNCTION ShineBaseDecode(text)RETURNS text AS'libXyEncrypt.so','ShineBaseDecode'LANGUAGE CSTRICT;

[0088] Finally, verify whether the function is successfully registered. The verification encoding function is: select ShineBaseEncode('abc'); the verification decoding function is: select ShineBaseDecode('ENC#E8g9v4').

[0089] When writing or updating database table field data, use the encoding function to encode the specified fields for the medium and low sensitivity fields to be protected. Figure 3 The schematic diagram of the execution flow of the encoding operation of the present application is shown as follows: Figure 3 As shown, this application completes the encoding operation through the following steps:

[0090] (1) When a user uses SQL statements to update or write to a database field, the user specifies the field to be encoded.

[0091] (2) Encode the value or string of a given database field.

[0092] (3) Store the encoded value into the specified database table field.

[0093] Example: Take the DICT_INFO table as an example. The DICT_INFO table has three fields: DICT_KEY, DICT_NAME, and DICT_REMARK. The basic information is as follows:

[0094] Field Name length type DICT_KEY 10 String DICT_NAME 30 String DICT_REMARK 128 String

[0095] DICT_KEY DICT_NAME DICT_REMARK 001 INIT_PWD Initial Value

[0096] When inserting a piece of data, its value is as follows:

[0097] Write scene:

[0098] INSERT INTO DICT_INFO VALUES('001',ShineBaseEncode('INIT_PWD'),'initial value')

[0099] The following is the DICT_INFO table information:

[0100] Note: "ENC#CGXSUF6uZFbZ2" is the value after INIT_PWD encoding.

[0101]

[0102] Update scenario: UPDATE DICT_INFO SET DICT_NAME = ShineBaseEncode ('INIT_PAWD') WHERE DICT_KEY = '001'

[0103] The following is the DICT_INFO table information:

[0104] DICT_KEY DICT_NAME DICT_REMARK 001 ENC#DHkYNVaOAV6A0 Initial Value

[0105] When querying database table field data, specify the field to be decoded and decode the field value. Figure 4 The schematic diagram of the execution flow of the decoding operation of the present application is shown as follows: Figure 4 As shown, the decoding operation is completed through the following steps:

[0106] (1) The user uses an SQL query statement to query database table data and specifies the database table field to be decoded.

[0107] (2) Use the decoding function to decode according to the given database table field information.

[0108] (3) If the decoding is successful, the decoded value is returned. If the decoding fails, a null value is returned.

[0109] Example: Taking the encoded table DICT_INFO as an example, the information stored is as follows, and DICT_NAME is the encoded value.

[0110] DICT_KEY DICT_NAME DICT_REMARK 001 ENC#DHkYNVaOAV6A0 Initial Value

[0111] Query DICT_INFO information:

[0112] SELECT DICT_KEY,ShineBaseDecode(DICT_NAME),DICT_REMA RK FROM DICT_INFO

[0113] The query results are as follows:

[0114] DICT_KEY DICT_NAME DICT_REMARK 001 INIT_PWD Initial Value

[0115] Encoding and decoding performance:

[0116] function length Time consumed (million times) coding 500 bytes 993ms / million times decoding 673 (500-byte coded value) 1174ms / million times

[0117] Note: "Time (million times)" is the cumulative time of executing encoding one million times. Taking "Encoding" as an example, it takes a total of 993 milliseconds to execute encoding 1 million times for 500 bytes.

[0118] The present invention is mainly used to encode and decode medium and low sensitivity data stored in a Gaussian database to ensure that the data is effectively protected during the storage process, thereby reducing the risk of sensitive information leakage and meeting the needs of enterprises in protecting privacy data and compliance requirements.

[0119] Further references Figure 5 As an implementation of the above method, in the second aspect, the present application provides a structural diagram of an embodiment of a data masking coding system 500 based on a Gaussian database, which can be specifically applied to various electronic devices. The system 500 includes the following modules:

[0120] The initialization registration module 510 is configured to perform function initialization registration on the medium and low sensitivity data table fields in the Gaussian database, wherein the functions include encoding functions and decoding functions;

[0121] The encoding module 520 is configured to use the encoding function to encode the specified field to be encoded when writing or updating data to the data table field of the Gaussian database, generate an encoded value, and store the encoded value in the Gaussian database table field, wherein the encoding function includes a process of converting an input string or table field into an encoded value, and the encoded value consists of a prefix, a separator, a summary, an original value code, and a check digit;

[0122] The decoding module 530 is configured to use a decoding function to decode the specified field to be decoded when acquiring data from the Gaussian database table field, so as to acquire the original data before encoding.

[0123] In a third aspect, the present application proposes a terminal device, comprising a processor, a memory, and a computer program stored in the memory, wherein the computer program is executed by the processor to implement a data masking coding method based on a Gaussian database as described in any one of the above.

[0124] In a fourth aspect, the present application proposes a computer-readable storage medium, wherein the medium stores a computer program, and when the computer program is executed by a processor, the data masking coding method based on the Gaussian database as described in any one of the above is implemented.

[0125] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 of a terminal device or server suitable for implementing an embodiment of the present application. Figure 6 The terminal device or server shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0126] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the computer system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0127] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0128] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above functions defined in the method of the present application are executed. It should be noted that the computer-readable medium described in the present application can be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, an apparatus or a device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0129] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0130] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. A data masking coding method based on Gaussian database, characterized in that: The method comprises the following steps: S1. In the Gaussian database, functions are initialized and registered for the fields of the medium and low sensitivity data tables, wherein the functions include encoding functions and decoding functions; S2. When writing or updating data to a data table field of the Gaussian database, the encoding function is used to encode the specified field to be encoded, generate an encoding value, and store the encoding value in the Gaussian database table field, wherein the encoding function includes a process of converting an input string or table field into an encoding value, and the encoding value consists of a prefix, a separator, a summary, an original value encoding, and a check digit; S3. When acquiring data from the Gaussian database table field, use the decoding function to decode the specified field to be decoded to acquire the original data before encoding.

2. The data masking coding method based on Gaussian database according to claim 1 is characterized in that: In step S2, the encoding process specifically includes the following sub-steps: S21. The user submits a data write or update request to the Gaussian database system through an SQL statement, wherein the request specifies a database table to be written or updated, a field in the table, and at least one field to be encoded; S22, the Gaussian database system receives and parses the SQL statement to obtain the data to be written or updated and the information of the field to be encoded; S23, encoding the value or character string of the field to be encoded using a preset encoding function; S24. Store the encoded value into the specified database table field to complete the data writing or updating operation.

3. The data masking coding method based on Gaussian database according to claim 1 is characterized in that: In step S3, the decoding process specifically includes the following sub-steps: S31, the user queries the database table data through an SQL query statement, and specifies the database table field to be decoded in the query statement; S32, according to the database table field information specified by the user, use a preset decoding function to decode the value of the field; S33. Determine whether the decoding is successful. If the decoding is successful, return the decoded value as part of the query result; if the decoding fails, return a null value as the value of the corresponding field in the query result.

4. The data masking coding method based on Gaussian database according to claim 1 is characterized in that: In step S2, the input of the encoding function is a string or a table field, and the output is a coded value, and the coded value includes a fixed 3-bit prefix ENC, a separator #, a 1-bit summary, an original value code and a check digit, and the total length is the sum of a fixed length of 6 bits and the original string length multiplied by 133%.

5. The data masking coding method based on Gaussian database according to claim 1 is characterized in that: In step S2, the encoding process includes: randomly selecting a group of digests, converting characters into binary data, dividing them into groups of 6 bits, and mapping them into printable ASCII characters according to the digests, thereby encoding the data.

6. The data masking coding method based on Gaussian database according to claim 1 is characterized in that: In step S2, the check bit is calculated based on the ASCII binary value of the encoded character string and is used to detect whether the data has been tampered with.

7. The data masking coding method based on Gaussian database according to claim 1 is characterized in that: Also includes: Receive an input code value, and extract the last digit of the code value as a check digit; Recalculating the portion of the coded value except the check digit to obtain a calculated check digit; Compare the calculated check digit with the check digit of the coded value. If the two are the same, the check passes and proceeds to the next step. After the verification is passed, the summary information corresponding to the encoded value is obtained according to the information contained in the encoded string; Using the summary information, a decoding operation is performed on the encoded value, wherein the decoding operation includes grouping the encoded character string into four characters each, and converting each group of characters into corresponding three-byte binary data; By searching for the corresponding conversion rules in the summary information, the converted binary data is restored to its original value before encoding.

8. A data masking coding system based on Gaussian database, characterized in that: The system comprises: An initialization registration module is configured in the Gaussian database to perform function initialization registration on medium and low sensitivity data table fields, wherein the functions include encoding functions and decoding functions; An encoding module, configured to use the encoding function to encode the specified field to be encoded when writing or updating data to the data table field of the Gaussian database, generate an encoding value, and store the encoding value in the Gaussian database table field, wherein the encoding function includes a process of converting an input string or table field into an encoding value, and the encoding value consists of a prefix, a separator, a summary, an original value encoding, and a check digit; The decoding module is configured to use the decoding function to decode the specified field to be decoded when acquiring data from the Gaussian database table field, so as to acquire the original data before encoding.

9. A terminal device, characterized in that: The method comprises a processor, a memory and a computer program stored in the memory, wherein the computer program is executed by the processor to implement the data masking coding method based on the Gaussian database as claimed in any one of claims 1 to 7.

10. A computer-readable storage medium, wherein a computer program is stored in the medium, and when the computer program is executed by a processor, the data masking coding method based on the Gaussian database as claimed in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • A method and a system for improving the safety of sensitive information of a database

    CN109271797A

  • Secure transmission of sensitive data

    CN109478221A

  • Data masking method and device, electronic equipment and storage medium

    CN111832070A

  • Data processing acceleration method and device, electronic equipment and storage medium

    CN113238821A

  • Data processing method and device based on Gaussian database

    CN115238010A