A method and system for encrypting database associated rows based on driver proxy technology
By intercepting the SQL of the JAVA database connection and parsing out information such as sensitive fields, and combining this with row association fields to encrypt the data table rows, the problem of dynamic and association encryption that cannot be performed in existing technologies is solved, and efficient database row encryption control is achieved.
Patent Information
- Application Number
- CN202410524427.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-28
- Publication Date
- 2024-11-01
- Estimated Expiration
- 2044-04-28
AI Technical Summary
Existing database driver proxy technologies cannot achieve dynamic encryption of data table rows, especially when performing multi-table operations, resulting in low encryption efficiency.
By intercepting the SQL of the JAVA database connection and parsing out sensitive fields, row encryption judgment condition fields, primary key fields and row association fields, the system determines whether a row needs to be encrypted based on these fields, identifies and encrypts related rows based on the row association fields, and uses the primary key pool to cache the encryption status, thereby achieving precise encryption of data table rows.
It achieves efficient encryption control over data table rows, improves encryption efficiency, enables association encryption in multi-table operations, requires no modification to the application program, and has wide applicability.
Smart Images

Figure CN118332580B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of new information security technology, and in particular to a method and system for encrypting database associated rows based on driver proxy technology. Background Art
[0002] Driver proxy technology is a service widely used in databases to optimize database access, enhance security, and expand databases. In terms of security, SQL queries can be filtered, rewritten, and optimized, as well as all database operations and related parameters can be recorded.
[0003] At present, the existing database access technology based on database-driven agent or network management agent mainly intercepts or adds decoration to the standard JAVA database connection interface by installing plug-ins on the application side, and parses the SQL statements executed by the JAVA database connection to analyze the application's operation behavior or access control on the database. Its related strategies are generally configured on the columns of the data table, that is, the database is encrypted according to the dimension of the column. This encryption method cannot apply dynamic encryption to rows, and cannot perform associated encryption when operating on multiple tables. Therefore, a method with more accurate encryption, higher encryption efficiency and associated encryption has higher development value. Summary of the invention
[0004] The main purpose of this application is to provide a method and system for encrypting database associated rows based on driver proxy technology, so as to achieve efficient associated encryption of data tables.
[0005] In order to achieve the above object, the present application provides: a method for encrypting database associated rows based on driver proxy technology, the method comprising:
[0006] Obtain the row encryption judgment condition of the application and cache it in the memory of the application;
[0007] Intercept the SQL executed by the JAVA database connection and obtain the SQL and all parameters;
[0008] According to the obtained SQL and parameters, the sensitive fields, row encryption judgment condition fields, primary key fields and row association fields of each row are parsed;
[0009] Determine whether the corresponding row meets the row encryption judgment condition according to the row encryption judgment condition field. If it does, encrypt the sensitive fields in the row, and the row is the encrypted row.
[0010] Identify the row associated with the row according to the row associated field of the encrypted row, and encrypt the sensitive field of the associated row, and the associated row is the encrypted row;
[0011] Cache the primary key fields corresponding to the row data into the primary key pool, define the primary key fields of the encrypted rows as encrypted, and define the primary key fields of the non-encrypted rows as not requiring encryption.
[0012] Furthermore, before obtaining the row encryption judgment condition of the application, it also includes:
[0013] Deploy the driver agent module; deploy the policy management platform, and configure the encryption parameters of sensitive fields, row encryption judgment conditions, and table associations related to row encryption.
[0014] Furthermore, while obtaining the row encryption judgment condition of the application, it also includes:
[0015] Get the relationship between tables and cache them in the application's memory.
[0016] Furthermore, according to the obtained SQL and parameters, sensitive fields, row encryption judgment condition fields, primary key fields and row association fields are parsed, including:
[0017] If SQL is precompiled and executed, the index values and meanings of sensitive fields, row encryption condition fields, primary key fields, and row-related fields must also be parsed.
[0018] Further, judging whether the corresponding row meets the row encryption condition according to the row encryption judgment condition field, and if so, encrypting the sensitive fields in the row, further comprising:
[0019] If the row in the current SQL does not contain the row encryption judgment condition field, then identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is the same as the value of a primary key field in the primary key pool, and the definition of the primary key field is encrypted, then the row is a row that needs to be encrypted, and the sensitive fields in the row are encrypted. Otherwise, the row does not need to be encrypted.
[0020] Further, judging whether the corresponding row meets the row encryption condition according to the row encryption judgment condition field, and if so, encrypting the sensitive fields in the row, further comprising:
[0021] If the row in the current SQL does not contain the row encryption judgment condition field, then identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is different from the value of the primary key field in the primary key pool, then through the association relationship between the tables, query whether the value of the primary key field of the corresponding row in the associated table is the same as the value of the logical foreign key field. If they are the same and the corresponding row is an encrypted row, encrypt the sensitive fields in the row, otherwise the row does not need to be encrypted.
[0022] This embodiment further discloses a system for encrypting database associated rows based on driver proxy technology, including:
[0023] A policy acquisition module is used to obtain the row encryption judgment conditions of the application;
[0024] The driver proxy engine module is used to intercept the SQL executed by the JAVA database connection and obtain the SQL and all parameters;
[0025] SQL syntax analysis module, used to parse out sensitive fields, row encryption judgment condition fields, primary key fields and row association fields of each row according to the acquired SQL and parameters;
[0026] The encryption module is used to determine whether the corresponding row meets the row encryption condition according to the row encryption judgment condition field. If it meets the condition, the sensitive fields in the row are encrypted, and the row is an encrypted row.
[0027] It is also used to identify a row associated with the row according to the row associated field of the encrypted row, and encrypt the sensitive field of the associated row, the associated row being the encrypted row;
[0028] The ID cache module is used to cache the primary key fields corresponding to the row data into the primary key pool, define the primary key fields of the encrypted row as encrypted, and define the primary key fields of the non-encrypted row as not requiring encryption.
[0029] Furthermore, the policy acquisition module is also used to acquire the association relationship between tables while acquiring the row encryption judgment condition of the application, and cache the row encryption judgment condition and the association relationship between tables into the memory of the application;
[0030] The SQL syntax analysis module is also used to parse out the index values and meanings of sensitive fields, row encryption judgment condition fields, primary key fields and row association fields if SQL is precompiled and executed.
[0031] Furthermore, the encryption module is also used to identify whether the row contains a logical foreign key field if the row in the current SQL does not contain a row encryption judgment condition field. If the value of the logical foreign key field is the same as the value of a primary key field in the primary key pool, and the primary key field is defined as encrypted, then the row is a row that needs to be encrypted, and the sensitive fields in the row are encrypted; otherwise, the row does not need to be encrypted.
[0032] Furthermore, the encryption module is also used to, if the row in the current SQL does not contain a row encryption judgment condition field, identify whether the row contains a logical foreign key field; if the value of the logical foreign key field is different from the value of the primary key field in the primary key pool, query whether the value of the primary key field of the corresponding row in the associated table is the same as the value of the logical foreign key field through the association relationship between the tables; if they are the same and the corresponding row is an encrypted row, encrypt the sensitive fields in the row; otherwise, the row does not need to be encrypted.
[0033] Compared with the prior art, the method and system for encrypting database-associated rows based on the driver proxy technology provided by the present invention have the following beneficial effects: by identifying the row data of the data table, the row data to be encrypted can be accurately located, and the data table data associated with the row data can be encrypted synchronously, so that the encryption control dimension of the data is more abundant and the judgment efficiency of the data to be encrypted in the database is higher. At the same time, no modification is required to the application end, and there is no intrusive design to the original program. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] The drawings constituting a part of this application are used to provide a further understanding of this application, so that other features, purposes and advantages of this application become more obvious. The schematic embodiment drawings and their descriptions of this application are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0035] Figure 1 This is a schematic diagram of the method flow for encrypting database associated rows in this embodiment;
[0036] Figure 2 This is a schematic diagram of the system structure for encrypting database associated rows in this embodiment. DETAILED DESCRIPTION
[0037] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0038] It should be noted that the terms "first", "second", etc. in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0039] In the present application, the terms "upper", "lower", "left", "right", "front", "back", "top", "bottom", "inner", "outer", "middle", "vertical", "horizontal", "lateral", "longitudinal" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the drawings. These terms are mainly used to better describe the present application and its embodiments, and are not used to limit the indicated devices, elements or components to have a specific orientation, or to be constructed and operated in a specific orientation.
[0040] In addition, some of the above terms may be used to express other meanings in addition to indicating orientation or positional relationship. For example, the term "on" may also be used to express a certain dependency or connection relationship in some cases. For those of ordinary skill in the art, the specific meanings of these terms in this application can be understood according to specific circumstances.
[0041] In addition, the term "plurality" shall mean two or more.
[0042] 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.
[0043] With the rapid development of information technology, databases are used more and more widely. Since the data stored in the database is related to the privacy and security of users, the encryption of sensitive data in the database is particularly important. Since the reading and writing of data in the database involves a large number of table data, it takes a lot of time and resources to analyze and encrypt the tables one by one. Encrypting by associating data in the table can quickly locate the data that needs to be encrypted. Specifically:
[0044] The method for encrypting database-related rows based on driver proxy technology is applied to an application server. First, a driver proxy module is deployed on the application server to proxy the JAVA database connection method driven by the database.
[0045] Before executing the method of encrypting database-associated rows, you must also deploy a policy management platform on the application server, and configure the encryption parameters of sensitive fields and row encryption judgment conditions. Sensitive fields are data involving user sensitive information, such as ID card, mobile phone number, birthday and other fields. Exemplarily, the row encryption judgment condition is: if a row in the table satisfies the value of its A field that contains "ID card" and the value of the B field is between 50 and 100, then the sensitive field of the row needs to be encrypted. Furthermore, it is necessary to configure the table association relationship related to row encryption, which can be associated through field association or associated query. Exemplarily, the T4 table is associated with the T5 table through the field PK1 field through the field PK21, and the T6 table can be associated with the A and B fields of the T7 table through the configured SQL.
[0046] Further, refer to Figure 1 , the methods for encrypting database associated rows specifically include:
[0047] S100: Obtaining the row encryption judgment condition of the application.
[0048] The row encryption judgment condition is designed based on the business needs and data sensitivity of the database. In this method, the local configuration file is read or the policy service is requested through the deployed policy management platform to obtain the row encryption judgment condition suitable for this system. Exemplarily, the row encryption judgment condition can be judged by matching one or more fields of the data row of the table data in the database through the value range: when the field value of the data row is within the data range, the row data is judged to be a row that needs to be encrypted. For another example, the field between the enumeration and the data row is matched. When it meets the enumeration, the row data is judged to be a row that needs to be encrypted, and the enumeration can be combined with the judgment method of the field range for judgment. For another example, the field between the defined regular expression and the data row is searched and matched. When the field matches the defined regular expression, the row data is judged to be a row that needs to be encrypted. Similarly, the matching method of the regular expression can be combined with the judgment method of the enumeration and / or field range for judgment. After obtaining the row encryption judgment condition of the application, the row encryption judgment condition is cached in the memory of the application for subsequent judgment of whether the row data needs to be encrypted.
[0049] S101: Obtain associations between tables and cache them in the memory of the application.
[0050] The local configuration file is read through the deployed policy management platform or the policy service is requested to obtain the association relationship between the associated data tables. For example, the association relationship between the tables is associated through a logical foreign key field. For another example, the association method between the tables is expressed through a SQL statement. After obtaining, the association relationship between the tables is cached in the memory of the application for subsequent judgment of the association relationship between the tables.
[0051] S200: intercepting the SQL executed by the JAVA database connection, and obtaining the SQL and all parameters.
[0052] Execute SQL to add or modify data in the database, and the JAVA database connection driver agent captures the SQL content and parameters. For the JAVA database connection method, you can flexibly choose according to the database and stored data. For example, you can choose the execute method of the Statement interface, the prepareStatement method of the Connection interface, and the setString method of the PreparedStatement interface.
[0053] S300: According to the obtained SQL, the sensitive fields, row encryption judgment condition fields, primary key fields and row association fields of each row are parsed.
[0054] Among them, the sensitive field is the data that needs to be encrypted in the row. The row encryption judgment condition field can be used together with the row encryption judgment condition to determine whether the row needs to be encrypted. The primary key field identifies the row data and is used to determine whether the associated rows are encrypted. The row association field is used to identify the associated rows of the encrypted row, which is convenient for encrypting the sensitive fields of the associated rows of the encrypted row, and the encryption efficiency is higher.
[0055] S301: If the JAVA database connection is to pre-compile and execute SQL, it is necessary to further parse each field parsed in step S300 to obtain the above field index value and meaning.
[0056] S400: judging whether the corresponding row meets the row encryption condition according to the row encryption judgment condition field; if so, encrypting the sensitive fields in the row, and the row is an encrypted row.
[0057] refer to Figure 2 For example, if the row encryption condition is: a row in the table satisfies both the value of field A containing "ID card" and the value of field B being between 50 and 100, then the row needs to be encrypted. Then, the row encryption judgment condition field parsed in step S300 is used to determine whether the row meets the row encryption condition. If it does, the sensitive fields of the parsed row are encrypted, and the encryption parameters are the encryption parameters obtained from the policy management platform.
[0058] S500: Identify rows associated with the encrypted row according to row-associated fields of the encrypted row, and encrypt sensitive fields of the associated rows, the associated rows being the encrypted rows.
[0059] Exemplarily, the query is performed through the association relationship. Specifically, the associated field that is the same as the primary key field of the encrypted row is queried, and the sensitive field of the row corresponding to the associated field is encrypted. For example, in the database, the row whose primary key field value is ID1 in table T1 needs to be encrypted, then the row whose associated field is ID1 in other tables is identified, and this row is the row that needs to be encrypted.
[0060] S600: Cache the primary key field corresponding to the row data into the primary key pool, define the primary key field of the encrypted row as encrypted, and define the primary key field of the non-encrypted row as not requiring encryption.
[0061] S601: If the row parsed by the current SQL does not contain the row encryption judgment condition field, then identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is the same as a value in the primary key pool, and the same primary key value is defined as encryption, then the behavior corresponding to the logical foreign key field is the row that needs to be encrypted, and the sensitive fields in the row are encrypting. If the value of the logical foreign key field is the same as a value in the primary key pool, but the same primary key value is defined as not encrypted, then the row does not need to be encrypted.
[0062] It should be noted that the primary key pool is used to store the values of all primary key fields of known row data, and each primary key field should also be defined as encrypted or unencrypted to form a key-value pair. Before the start of this method, some key-value pairs already exist in the primary key pool. After the start of this method, in step S400, when it is determined that a row needs to be encrypted, the primary key value of the row is cached in the primary key pool and defined as encrypted. If during the judgment process, it is determined that a row does not need to be encrypted, the primary key value of the row is cached in the primary key pool and defined as unencrypted.
[0063] S602: If the row parsed by the current SQL does not contain the row encryption judgment condition field, then identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is different from the value in the primary key pool, then through the association relationship between the tables, query whether the primary key of the corresponding row in the associated table is the same as the logical foreign key field. If they are the same and defined as encrypted, the sensitive fields in the row are encrypted. If they are different or defined as not encrypted, the sensitive fields in the row do not need to be encrypted.
[0064] By adding table associations, you can effectively prevent encryption failures caused by the inability to match logical foreign key fields due to failure to load the primary key pool successfully or incompletely.
[0065] In this embodiment, after executing the associated row encryption method described in this embodiment, for data rows that are judged not to need encryption, their primary key fields are also cached in the primary key pool and defined as unencrypted. This is used to assist in determining whether the edited data row is an associated row of the encrypted row when adding or modifying other data. The logical foreign key field of the current row can be matched with the primary key field in the primary key pool. When the same primary key field value is matched, whether the current row needs to be encrypted can be determined by defining the primary key field as encrypted or not. Specifically, only when the value of the logical foreign key field is simultaneously equal to the value of the primary key field and the primary key is defined as encrypted, the row corresponding to the foreign key field needs to be encrypted, thereby avoiding querying the entire database and greatly improving the speed of determining data rows.
[0066] refer to Figure 2 This embodiment further discloses a system for encrypting database associated rows based on driver proxy technology. Specifically, the system includes:
[0067] The policy acquisition module 31 is used to acquire the row encryption judgment condition of the application, and is also used to acquire the association relationship between tables while acquiring the row encryption judgment condition of the application, and cache the row encryption judgment condition and the association relationship between tables into the memory of the application.
[0068] The driver proxy engine module 32 is used to intercept the SQL executed by the JAVA database connection and obtain the SQL and all parameters.
[0069] The SQL syntax analysis module 33 is used to parse out the sensitive fields, row encryption judgment condition fields, primary key fields and row associated fields of each row according to the acquired SQL, and is also used to parse out the index values and meanings of the sensitive fields, row encryption judgment condition fields, primary key fields and row associated fields if the SQL is pre-compiled and executed.
[0070] The encryption module 34 is used to determine whether the corresponding row meets the row encryption condition according to the row encryption judgment condition field. If it does, the sensitive fields in the row are encrypted. It is also used to, if the row parsed by the current SQL does not contain the row encryption judgment condition field, identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is the same as a value in the primary key pool, and the same primary key value is defined as encryption, then the behavior corresponding to the logical foreign key field is a row that needs to be encrypted, and the sensitive fields in the row are encrypted. If the value of the logical foreign key field is the same as a value in the primary key pool, but the same primary key value is defined as not encrypted, then the row does not need to be encrypted; it is also used to, if the row parsed by the current SQL does not contain the row encryption judgment condition field, identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is different from the value in the primary key pool, then through the association relationship between the tables, query whether the primary key of the corresponding row in the associated table is the same as the logical foreign key field. If they are the same and defined as encryption, the sensitive fields in the row are encrypted. If they are different or defined as not encrypted, the sensitive fields of the row do not need to be encrypted.
[0071] The ID cache module 35 is used to cache the primary key fields corresponding to the data rows into the primary key pool, define the primary key fields of the encrypted rows as encrypted, and define the primary key fields of the non-encrypted rows as not requiring encryption.
[0072] In summary, the method for encrypting database-associated rows based on the driver proxy technology disclosed in this embodiment realizes the identification of sensitive fields in the row data in the data table, and cooperates with the row encryption judgment condition to effectively increase the row dimension encryption control for the row to be encrypted. At the same time, the row data in other data tables associated with the current row can be identified according to the associated fields of the row data, so as to realize the rapid positioning of other data rows to be encrypted in the case of once identifying the encrypted row, so as to improve the judgment efficiency of the data to be encrypted in the database. At the same time, the method for encrypting database-associated rows is based on the traditional driver proxy technology, and no modification is required to the application end, so as to improve the applicability. Further, by establishing a primary key pool, all primary key values and definitions of the data rows that have been operated can be collected in the primary key pool. By comparing the logical foreign key values of the target row in the primary key pool, when the primary key value that is the same as the logical foreign key value is compared, the definition of the primary key value is determined to be encrypted or not to determine whether the row corresponding to the logical foreign key value needs to be encrypted, thereby avoiding a wider range of searches in the database, and greatly reducing the judgment time of whether the row data needs to be encrypted.
[0073] The specific manner of executing the operation of each unit in the above embodiment has been described in detail in the embodiment of the method, and will not be elaborated here.
[0074] The above are only preferred embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A method for encrypting database association rows based on driver proxy technology, characterized in that: The method comprises: Obtain the row encryption judgment condition of the application and cache it in the memory of the application; Intercept the SQL executed by the JAVA database connection and obtain the SQL and all parameters; According to the obtained SQL and parameters, the sensitive fields, row encryption judgment condition fields, primary key fields and row association fields of each row are parsed; Determine whether the corresponding row meets the row encryption judgment condition according to the row encryption judgment condition field. If it does, encrypt the sensitive fields in the row, and the row is the encrypted row. If the row in the current SQL does not contain the row encryption judgment condition field, identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is the same as the value of a primary key field in the primary key pool, and the definition of the primary key field is encryption, then the row is a row that needs to be encrypted. Encrypt the sensitive fields in the row. Otherwise, the row does not need to be encrypted. Identify the row associated with the row according to the row associated field of the encrypted row, and encrypt the sensitive field of the associated row, and the associated row is the encrypted row; Cache the primary key fields corresponding to the row data into the primary key pool, define the primary key fields of the encrypted rows as encrypted, and define the primary key fields of the non-encrypted rows as not requiring encryption.
2. The method for encrypting database associated rows based on driver proxy technology according to claim 1, characterized in that: Before obtaining the row encryption judgment conditions for the application, it also includes: Deploy the driver agent module; Deploy the policy management platform and configure encryption parameters for sensitive fields, row encryption judgment conditions, and table associations related to row encryption.
3. The method for encrypting database associated rows based on driver proxy technology according to claim 1, characterized in that: When obtaining the row encryption judgment conditions for the application, it also includes: Get the relationship between tables and cache them in the application's memory.
4. The method for encrypting database associated rows based on driver proxy technology according to claim 1, characterized in that: According to the obtained SQL and parameters, sensitive fields, row encryption judgment condition fields, primary key fields and row association fields are parsed, including: If SQL is precompiled and executed, the index values and meanings of sensitive fields, row encryption condition fields, primary key fields, and row-related fields must also be parsed.
5. The method for encrypting database associated rows based on driver proxy technology as claimed in claim 3, characterized in that: According to the row encryption judgment condition field, it is judged whether the corresponding row meets the row encryption condition. If it meets the condition, the sensitive fields in the row are encrypted, which also includes: If the row in the current SQL does not contain the row encryption judgment condition field, then identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is different from the value of the primary key field in the primary key pool, then through the association relationship between the tables, query whether the value of the primary key field of the corresponding row in the associated table is the same as the value of the logical foreign key field. If they are the same and the corresponding row is an encrypted row, encrypt the sensitive fields in the row, otherwise the row does not need to be encrypted.
6. A system for encrypting database association rows based on driver proxy technology, characterized in that: include: A policy acquisition module is used to obtain the row encryption judgment conditions of the application and cache them in the memory of the application; The driver proxy engine module is used to intercept the SQL executed by the JAVA database connection and obtain the SQL and all parameters; SQL syntax analysis module, used to parse out sensitive fields, row encryption judgment condition fields, primary key fields and row association fields of each row according to the acquired SQL and parameters; The encryption module is used to determine whether the corresponding row meets the row encryption condition according to the row encryption judgment condition field. If it meets the condition, the sensitive fields in the row are encrypted, and this behavior is the encrypted row; it is also used to, If the row in the current SQL does not contain the row encryption judgment condition field, then identify whether the row contains a logical foreign key field. If the value of the logical foreign key field is the same as the value of a primary key field in the primary key pool, and the definition of the primary key field is encryption, then the row needs to be encrypted, and the sensitive fields in the row are encrypted. Otherwise, the row does not need to be encrypted. It is also used to identify the row associated with the row according to the row association field of the encrypted row, and encrypt the sensitive fields of the associated row. The associated row is an encrypted row. The ID cache module is used to cache the primary key fields corresponding to the row data into the primary key pool, define the primary key fields of the encrypted row as encrypted, and define the primary key fields of the non-encrypted row as not requiring encryption.
7. The system for encrypting database-associated rows based on driver proxy technology as claimed in claim 6, characterized in that: The policy acquisition module is further used to acquire the association relationship between tables while acquiring the row encryption judgment condition of the application, and cache the row encryption judgment condition and the association relationship between tables into the memory of the application; The SQL syntax analysis module is also used to parse out the index values and meanings of sensitive fields, row encryption judgment condition fields, primary key fields and row association fields if SQL is precompiled and executed.
8. The system for encrypting database-associated rows based on driver proxy technology as claimed in claim 6, characterized in that: The encryption module is also used to identify whether the row contains a logical foreign key field if the row in the current SQL does not contain a row encryption judgment condition field. If the value of the logical foreign key field is the same as the value of a primary key field in the primary key pool, and the primary key field is defined as encryption, then the row is a row that needs to be encrypted, and the sensitive fields in the row are encrypted. Otherwise, the row does not need to be encrypted.
