Database privacy network security protection method fusing dynamic desensitization

By dynamically adjusting permissions based on user job title and access behavior, combined with binary data and sensitive matrix encryption, the problems of low security and insufficient applicability of database de-identification are solved, achieving more efficient data protection.

CN121302435BActive Publication Date: 2026-03-31SHENZHEN ANLUO TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-12
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing database desensitization and security protection technologies have low security, fixed criteria for identifying sensitive data, which makes sensitive data easy to leak and has insufficient applicability.

Method used

Based on the user's job information and access behavior, permissions are dynamically adjusted. Sensitive fields are converted into binary data and a sensitivity matrix is ​​constructed using a dynamic desensitization algorithm. Graphical encryption is then applied to display the desensitized data.

Benefits of technology

It improves the security and applicability of database desensitization security protection, resists algorithm-level cracking, and ensures data security and the rationality of sensitive data judgment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121302435B_ABST
    Figure CN121302435B_ABST
Patent Text Reader

Abstract

The application discloses a database privacy network security protection method fusing dynamic desensitization, relates to the technical field of database desensitization security protection, and comprises the following steps: giving a position permission to a user based on the position information of the user; analyzing the access range of the position permission; analyzing whether the access behavior is credible; dynamically adjusting the sensitivity of the field name in the database based on the analysis result, so that different sensitive fields are obtained; dynamically desensitizing the sensitive fields in the database through a dynamic desensitization algorithm, so that desensitized data is obtained; hiding the desensitized data in the data accessed by the user and showing the remaining data to the user; and the application is used for solving the problems that the existing database desensitization security protection technology has low security of the desensitization means for sensitive data and the determination for the sensitive data is relatively fixed, so that the sensitive data is prone to be leaked and the applicability of the desensitization protection technology is insufficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of database de-identification and security protection technology, specifically to a database privacy and network security protection method that integrates dynamic de-identification. Background Technology

[0002] Database desensitization security protection technology refers to a security technology system that, under the premise of ensuring the normal operation of database business functions, processes sensitive privacy data or trade secret data stored in the database through a series of data transformation and masking rules, transforming it into fictitious but realistic non-sensitive data. This prevents the leakage of privacy information and meets data compliance requirements in non-production environments such as development, testing, analysis, and sharing, or when facing internal users with different permissions.

[0003] Existing database data masking and security protection technologies typically employ direct hiding or replacement of sensitive data. However, this method is inherently insecure, as the original data can still be easily found at the code level. Furthermore, existing technologies often rely on fixed conditions for identifying sensitive data, failing to dynamically adjust to different usage scenarios. This reduces the applicability of the masking and protection. For instance, patent application CN115935434A discloses a "Multi-feature Matching and Recognition Method for Radar Targets Based on Priority and Weight," which involves online masking, transformation, or character replacement of sensitive data in the database. This approach is extremely insecure and cannot guarantee the security of the data within the database. In addition, existing database data masking and security protection technologies suffer from low security in their methods and fixed criteria for identifying sensitive data, leading to susceptibility to data leakage and insufficient applicability. Summary of the Invention

[0004] This invention aims to at least partially address one of the technical problems in existing technologies. It assigns job permissions to users based on their job information, then retrieves field names from the database, analyzes the correlation between field names and job information based on historical operation records, and includes the field names within the access scope of job permissions based on this correlation. It then retrieves the user's IP address and access time to the database, analyzes the trustworthiness of the access behavior, sets trust levels based on the analysis results, and dynamically adjusts the sensitivity of field names in the database based on the trust levels to obtain different sensitive fields. These sensitive fields are converted into binary data and a sensitivity matrix is ​​constructed. The sensitive fields in the database are then dynamically anonymized based on the sensitivity matrix to obtain anonymized data. Finally, the anonymized data in the user's accessed data is hidden, and the remaining data is displayed to the user. This addresses the problems of existing database anonymization security protection technologies, such as low security of anonymization methods for sensitive data, fixed criteria for determining sensitive data, susceptibility to sensitive data leakage, and insufficient applicability of anonymization protection technologies.

[0005] To achieve the above objectives, this application provides a database privacy and network security protection method that integrates dynamic anonymization, comprising the following steps:

[0006] Assign job permissions to users based on their job information;

[0007] Retrieve field names from the database, analyze the correlation between field names and job information based on historical operation records, and include field names in the access scope of job permissions based on the correlation.

[0008] Obtain the IP address and time of user access to the database, analyze whether the access behavior is trustworthy, and dynamically adjust the sensitivity of field names in the database based on the analysis results to obtain different sensitive fields;

[0009] The sensitive fields in the database are dynamically de-identified using a dynamic de-identification algorithm to obtain de-identified data.

[0010] Hide the anonymized data in the data accessed by the user and show the user the remaining data.

[0011] Furthermore, granting job permissions to users based on their job information includes the following sub-steps:

[0012] Get the number of positions available within the company and name it "Position Count";

[0013] Set the number of job positions and permission levels. The permission level corresponding to the job information is the job permission.

[0014] Furthermore, the process involves retrieving field names from the database, analyzing the correlation between field names and job information based on historical operation records, and then including the field names within the access scope of job permissions based on this correlation. This includes the following sub-steps:

[0015] Retrieve field names from the database and read historical operation records;

[0016] Retrieve the field names called by the user and the user's job information from the historical operation records, and name them "Called Field" and "Operation Job" respectively;

[0017] The invoked field is associated with the operation position and the invoked field is included in the access scope of the operation position. Each position has an access scope.

[0018] Furthermore, the IP address and time of user access to the database are obtained, the trustworthiness of the access behavior is analyzed, and the sensitivity of field names in the database is dynamically adjusted based on the analysis results to obtain different sensitive fields, including the following sub-steps:

[0019] Obtain the IP address and time of user access to the database, analyze whether the access behavior is trustworthy, and set the trust level based on the analysis results;

[0020] Based on trust levels, the sensitivity of field names in the database is dynamically adjusted to obtain different sensitive fields.

[0021] Furthermore, obtaining the IP address and time of user access to the database, analyzing whether the access behavior is trustworthy, and setting the trust level based on the analysis results includes the following sub-steps:

[0022] Obtain the IP address and time of the user's access to the database, and name them "Access IP" and "Access Time" respectively;

[0023] Obtain the company's IP address and working hours, and name them "Company IP" and "Working Hours" respectively.

[0024] Determine whether the accessing IP is a corporate IP and whether the access time is within the working hours. If both are yes, output the first security signal. If one condition is no, output the second security signal. If both are no, output the third security signal.

[0025] If the first security signal is output, the trust level for this access will be set to Level 1 trust; if the second security signal is output, the trust level for this access will be set to Level 2 trust; and if the third security signal is output, the trust level for this access will be set to Level 3 trust.

[0026] Furthermore, based on trust levels, the sensitivity of field names in the database is dynamically adjusted to obtain different sensitive fields, including the following sub-steps:

[0027] Name the fields within the access scope corresponding to the job permissions as trusted fields, and name the remaining fields as sensitive fields;

[0028] If the trust level is Level 1, then the trusted fields and sensitive fields are retained;

[0029] If the trust level is level 2, then all trust fields containing numbers will be renamed to sensitive fields.

[0030] If the trust level is level 3, then rename all trusted fields to sensitive fields.

[0031] Furthermore, the sensitive fields in the database are dynamically de-identified using a dynamic de-identification algorithm to obtain de-identified data, including the following sub-steps:

[0032] Convert sensitive fields into binary data and construct a sensitivity matrix;

[0033] Dynamically desensitize sensitive fields in the database based on the sensitivity matrix to obtain desensitized data.

[0034] Furthermore, converting sensitive fields into binary data and constructing a sensitivity matrix includes the following sub-steps:

[0035] Based on UTF-8 encoding, the data in the sensitive fields is converted into binary format numbers and named binary data;

[0036] The number of bits in binary data is counted and named the encoding bit length; the factor of the encoding bit length is calculated and named the bit factor.

[0037] Obtain the first factor and the second factor, and label them Q1 and Q2 respectively, where Q1 × Q2 equals the number of bits in the code;

[0038] Calculate |Q1-Q2|, name the result as the difference between the vertical and horizontal axes, and obtain Q1 and Q2 with the smallest difference between the vertical and horizontal axes, and label them as E1 and E2 respectively.

[0039] Construct an E1×E2 matrix and name it the sensitivity matrix, where E1 is the number of rows and E2 is the number of columns. Enter the binary data bit by bit into the sensitivity matrix in the order of first from left to right and then from top to bottom.

[0040] The number in the E1 row and E2 column of the sensitivity matrix is ​​marked as G(E1,E2), and each G(E1,E2) in the sensitivity matrix is ​​in a square, that is, the sensitivity matrix is ​​a square array after visualization.

[0041] Furthermore, based on the sensitivity matrix, the sensitive fields in the database are dynamically de-identified to obtain de-identified data, which includes the following sub-steps:

[0042] Mark the square where G(E1,E2) is located as F(E1,E2). If two adjacent G(E1,E2) are 1 and 0 respectively, mark the boundary line of their F(E1,E2) as a dividing line. At the same time, mark the line segments on the boundary of the sensitive matrix as dividing lines as well. Count all the dividing lines and highlight them.

[0043] Hide all F(E1,E2) where G(E1,E2) is 0, extract the contour of the remaining F(E1,E2) to obtain the matrix contour, name the closed region enclosed by the matrix contour as the Number One Region, name the dividing line on the matrix contour as the contour line, and show all F(E1,E2) where G(E1,E2) is 0.

[0044] Starting with E1=E2=1, determine whether G(E1,E2) is 1. If yes, output the region analysis signal. If no, increment E2 by 1 and re-determine. If E2 reaches its maximum value, reset E2 to 1, increment E1 by 1, and re-determine.

[0045] If the output region is to be analyzed, then the region to which F(E1,E2) belongs is named the region to be analyzed. Extract E1 and add any symbols before and after E1 to form a string, which is marked as DH. Extract E2 and add any symbols before and after E2 to form a string, which is marked as DW.

[0046] Starting with the contour line above F(E1,E2), we name it the starting line. Beginning with the starting line, we search for the contour lines of the region to be analyzed in a clockwise direction, marking them as L according to the search order. h Where h is a positive integer and h is the index of L, and L1 is the starting line;

[0047] Starting with h=1, obtain L h The direction of the line segment, including the left-right direction and the up-down direction, if L h With L h+1 If the line segments have the same direction, they are grouped into a group of line segments in the same direction. If two groups of line segments in the same direction have an intersection, the two line segments in the same direction are combined. h is incremented by one and all groups of line segments in the same direction are analyzed.

[0048] According to the L in the same direction line segment group h In the middle, the line segments in the same direction are numbered in ascending order of h, using the symbol K. g This indicates that, where g is a positive integer and g is the index of K, we obtain K. g L h The quantity, labeled S g ;

[0049] If Kg+1 Compared to K g If it is in a 90° clockwise direction, then at S g Add any lowercase letter to get C g If K g+1 Compared to K g If it is in a 90° counterclockwise direction, then at S g Add any uppercase letter to get C g ;

[0050] C in ascending order of g g Combine the strings and label the resulting strings as BU. Combine the strings in the order of DH, DW, and BU and name the resulting strings as region codes. Analyze the region codes of all data regions and combine the region codes in a random order. Name the resulting strings as desensitized data.

[0051] Furthermore, hiding the anonymized data from the user-accessed data and displaying the remaining data to the user includes the following sub-steps:

[0052] Name the data accessed by users as access data, and convert all data in the access data that belongs to sensitive fields into de-identified data;

[0053] Display access data to users, where anonymized data is uniformly displayed as the symbol "*", without quotation marks.

[0054] The beneficial effects of this invention are as follows: This invention assigns job permissions to users based on their job information, then obtains field names from the database, analyzes the correlation between field names and job information based on historical operation records, and includes the field names in the access scope of job permissions based on the correlation. It then obtains the user's IP address and access time to the database, analyzes the trustworthiness of the access behavior, sets trust levels based on the analysis results, and dynamically adjusts the sensitivity of field names in the database based on the trust levels to obtain different sensitive fields. The advantage lies in setting basic sensitive data based on the user's job, and then confirming the security of the user's environment through the user's IP address and access time, thereby dynamically adjusting the sensitive data. In high-risk situations, all data in the database is considered sensitive data, thus ensuring the security of the data in the database and improving the security of data and the rationality of sensitive data judgment in database desensitization security protection.

[0055] This invention converts sensitive fields into binary data and constructs a sensitive matrix. Then, based on this sensitive matrix, it dynamically de-identifies the sensitive fields in the database to obtain de-identified data. Finally, it hides the de-identified data from the user's accessed data and displays the remaining data to the user. The advantage lies in the fact that, unlike traditional cryptographic calculations, this invention converts sensitive fields into a sensitive matrix and then encrypts them graphically. It transforms encryption from a computationally-based approach to a graphical one, thus resisting all algorithm-level cracking methods and improving the security and effectiveness of database de-identification security protection. Attached Figure Description

[0056] Figure 1 This is a flowchart illustrating the steps of the method of the present invention;

[0057] Figure 2 This is a schematic diagram of the sensitivity matrix of the present invention;

[0058] Figure 3 This is a schematic diagram of the matrix outline and the number of regions of the present invention;

[0059] Figure 4 For the present invention Figure 3 A schematic diagram showing the replacement of solid lines with dashed lines for the central outline.

[0060] Figure 5 This is a schematic diagram of the region to be analyzed in this invention;

[0061] Figure 6 This is a schematic diagram illustrating the present invention of finding the outline of the region to be analyzed along a clockwise direction;

[0062] Figure 7 This is a schematic diagram of K1 and K2 of the present invention. Detailed Implementation

[0063] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0064] Example 1, please refer to Figure 1 As shown, this application provides a database privacy and network security protection method that integrates dynamic de-identification, including the following steps:

[0065] Step S1: Assign job permissions to the user based on their job information; Step S1 includes the following sub-steps:

[0066] Step S101: Obtain the number of positions within the company and name it "Position Count";

[0067] Step S102: Set the number of job positions and permission levels. The permission level corresponding to the job information is the job permission.

[0068] In practice, for example, a company may have 5 positions, including CEO, finance, software engineer, operations engineer, and customer service. Thus, there are 5 positions in total. 5 permission levels are set up to correspond to the 5 positions. The CEO's position permission is the CEO permission, the finance position permission is the finance permission, the software engineer's position permission is the software permission, the operations engineer's position permission is the operations permission, and the customer service position permission is the customer service permission.

[0069] Step S2 involves retrieving field names from the database, analyzing the correlation between field names and job information based on historical operation records, and then including the field names within the access scope of job permissions based on this correlation. Step S2 includes the following sub-steps:

[0070] Step S201: Obtain the field names from the database and read the historical operation records.

[0071] Step S202: Obtain the field names called by the user and the user's job information from the historical operation records, and name them as the called field and the operation job respectively;

[0072] Step S203: Associate the called field with the operation position and include the called field in the access scope of the operation position. Each position has an access scope.

[0073] In practice, for example, some data from a company's personnel information database is shown in Table 1 below:

[0074] Table 1. Partial data from the personnel information database

[0075] Name Telephone ID card Salary Start date Years of service Zhang San 13111111111 12345 5000 2023-4-12 2 Li Si 13222222222 12456 5000 2023-4-12 2 Wang Wu 13333333333 12789 6000 2022-4-12 3

[0076] In this system, the field names are name, phone number, ID card number, salary, date of employment, and length of service. The historical operation records are the operation logs of the company's internal system. For example, if the historical operation records show that Zhang San accessed the content under the field name "salary" 388 times, and Zhang San's position is finance, then the operation position is finance and the accessed field is salary. Therefore, the field name "salary" is included in the access scope of finance. Similarly, by analyzing the field names of all databases within the company, the access scope of different positions can be obtained. Taking Table 1 as an example, the company's CEO has the highest authority and has the right to view any data. Therefore, the CEO's access scope includes name, phone number, ID card number, salary, date of employment, and length of service. Through correlation, it is found that the access scope of finance includes name, phone number, ID card number, salary, date of employment, and length of service. The access scope of software engineers and operations engineers is name, and the access scope of customer service is name and phone number.

[0077] Step S3 involves obtaining the IP address and time of user access to the database, analyzing the trustworthiness of the access behavior, and dynamically adjusting the sensitivity of field names in the database based on the analysis results to obtain different sensitive fields. Step S3 includes the following sub-steps:

[0078] Step S301: Obtain the IP address and time of the user's access to the database, analyze whether the access behavior is trustworthy, and set the trust level based on the analysis results;

[0079] Step S301 includes the following sub-steps:

[0080] Step S3011: Obtain the IP address and time of the user's access to the database, and name them as Access IP and Access Time, respectively;

[0081] Step S3012: Obtain the company's IP address and working hours, and name them as "Company IP" and "Working Hours" respectively.

[0082] Step S3013: Determine whether the accessing IP is an enterprise IP and whether the access time is within the working hours. If both are yes, output the first security signal. If one condition is no, output the second security signal. If both are no, output the third security signal.

[0083] Step S3014: If the first security signal is output, the trust level of this access is set to Level 1 trust; if the second security signal is output, the trust level of this access is set to Level 2 trust; if the third security signal is output, the trust level of this access is set to Level 3 trust.

[0084] In practice, the accessing IP is 192.192.0.2, the access time is 23:36, and the enterprise IP is 192.192.0.1, with a working time of 9:00-18:00. Since the accessing IP is different from the enterprise IP and the access time is outside the working hours, a third security signal is output, setting the trust level of this access to Level 3 trust, indicating a high risk of user behavior. It's important to note that if the user is working overtime, approval is required. In this case, the user's working hours are adjusted to overtime status. For example, if the original working hours are 9:00-18:00, and the user submits an overtime application with a specified timeframe of 4 hours, the working hours are changed to 9:00-22:00. If no timeframe is specified, the access time is not considered. It's also important to note that multiple enterprise IPs can be added according to the company's office needs, and the accessing IP only needs to match one of them.

[0085] Step S302: Dynamically adjust the sensitivity of field names in the database based on the trust level to obtain different sensitive fields;

[0086] Step S302 includes the following sub-steps:

[0087] Step S3021: Name the fields within the access scope corresponding to the job permissions as trusted fields, and name the remaining fields as sensitive fields;

[0088] Step S3022: If the trust level is Level 1 Trust, then retain the trust field and the sensitive field;

[0089] Step S3023: If the trust level is Level 2 trust, then rename all trust fields containing numbers to sensitive fields.

[0090] Step S3024: If the trust level is level three, rename all trusted fields to sensitive fields.

[0091] In practice, taking finance as an example, the scope of access for finance includes name, phone number, ID card number, salary, date of employment, and length of service. Therefore, name, phone number, ID card number, salary, date of employment, and length of service are all named as "trust fields." If the trust level is Level 1, the trust fields and sensitive fields remain unchanged. If the trust level is Level 2, all trust fields containing numbers are renamed as sensitive fields. Specifically, the cells corresponding to phone number, ID card number, salary, date of employment, and length of service all contain numbers. Numbers, whether used for monetary amounts, personal information, or addresses, are highly sensitive; that is, data of this type typically has highly sensitive characteristics. Therefore, all trusted fields containing numbers are renamed as sensitive fields. At this point, trusted fields include name, and sensitive fields include phone number, ID number, salary, date of employment, and length of employment. If the trust level is level three, all trusted fields are renamed as sensitive fields because the user's access behavior is highly suspicious and constitutes abnormal access. Therefore, name, phone number, ID number, salary, date of employment, and length of employment are all named as sensitive fields. It should be noted that if a user wants to access trusted fields that were used in level one trust when the user is at level two or three trust, an access request must be submitted to the CEO or manager. Once the request is approved, the sensitive fields can be restored as trusted fields and access can be granted.

[0092] Step S4 involves dynamically desensitizing sensitive fields in the database using a dynamic desensitization algorithm to obtain desensitized data. Step S4 includes the following sub-steps:

[0093] Step S401: Convert the sensitive fields into binary data and construct a sensitive matrix;

[0094] Step S401 includes the following sub-steps:

[0095] Step S401: Convert the data in the sensitive field into binary format numbers based on UTF-8 encoding, and name them binary data;

[0096] Step S402: Count the number of bits in the binary data, named the encoding bit length, and calculate the factor of the encoding bit length, named the bit factor;

[0097] Step S403: Obtain the first factor and the second factor, labeled as Q1 and Q2 respectively, where Q1 × Q2 equals the number of bits in the encoding;

[0098] Step S404: Calculate |Q1-Q2|, name the calculation result as the difference between the vertical and horizontal axes, and obtain Q1 and Q2 with the smallest difference between the vertical and horizontal axes, and mark them as E1 and E2 respectively;

[0099] Step S405: Construct an E1×E2 matrix and name it the sensitivity matrix, where E1 is the number of rows and E2 is the number of columns. Enter the binary data bit by bit into the sensitivity matrix in the order of first from left to right and then from top to bottom.

[0100] Please see Figure 2 In step S406, the number in the E1 row and E2 column of the sensitivity matrix is ​​marked as G(E1,E2), and each G(E1,E2) in the sensitivity matrix is ​​in a square, that is, the sensitivity matrix is ​​a square array after visualization.

[0101] In practice, taking the name Zhang San as an example, the converted binary data is 111001011011110010100000111001001011100010001001. The encoding length is 48. The factors of 48 include 1, 2, 3, 4, 6, 8, 12, 16, 24, and 48. Since 6 × 8 = 48 and |6 - 8| = 2, the difference between the horizontal and vertical axes is minimized. Therefore, E1 is 6 and E2 is 8. Typically, the smaller number is used as E1 and the larger number as E2, constructing a 6 × 8 matrix to obtain the sensitivity matrix. Each row has 8 data points, for a total of 6 rows. Therefore, the first 8 digits of the binary data are entered into the first row from left to right, the 9th to 16th digits are entered into the second row from left to right, and so on, ultimately obtaining the sensitivity matrix as shown below. Figure 2 As shown.

[0102] Step S402: Dynamically desensitize sensitive fields in the database based on the sensitivity matrix to obtain desensitized data;

[0103] Step S402 includes the following sub-steps:

[0104] Step S4021: Mark the square where G(E1,E2) is located as F(E1,E2), mark the boundary line between any two adjacent G(E1,E2) as a dividing line, and mark the line segments on the boundary of the sensitive matrix as dividing lines as well. Count all the dividing lines and highlight them.

[0105] Please see Figures 3 to 4 As shown, in step S4022, hide all F(E1,E2) where G(E1,E2) is 0, extract the contour of the remaining F(E1,E2) to obtain the matrix contour, name the closed region enclosed by the matrix contour as the number one region, name the dividing line on the matrix contour as the contour line, and display all F(E1,E2) where G(E1,E2) is 0.

[0106] In practice Figure 2The edge of the square in the middle is a dividing line. Hide all F(E1,E2) where G(E1,E2) is 0 and extract the contour to obtain the matrix contour and the number of regions, as shown below. Figure 3 As shown, the outline of the region is the outline of the matrix. Figure 3 The remaining line segments are called contour lines. To facilitate observation of the number of contour lines in the same straight line direction, [the text is incomplete]. Figure 3 The middle part of the outline is replaced with a dashed line, resulting in Figure 4 The purpose of displaying all F(E1,E2) where G(E1,E2) is 0 is to observe the position of F(E1,E2) in the row and column. In the actual analysis process, there is no need to restore it and it does not affect the analysis results. E1 and E2 in F(E1,E2) can be directly extracted. Therefore, in this embodiment, the display of all F(E1,E2) where G(E1,E2) is 0 is omitted.

[0107] Step S4023: Starting with E1=E2=1, determine whether G(E1,E2) is 1. If yes, output the region analysis signal. If no, add E2 to 1 and re-determine. If E2 reaches the maximum value of E2, reset E2 to 1 and add E1 to 1 and re-determine.

[0108] Please see Figure 5 As shown, in step S4024, if the output area analysis signal is, the number region to which F(E1,E2) belongs is named the region to be analyzed, E1 is extracted and any symbols are added before and after E1 to form a string, which is marked as DH, and E2 is extracted and any symbols are added before and after E2 to form a string, which is marked as DW.

[0109] In practice, starting with E1=E2=1, G(E1,E2) is G(1,1), and G(1,1) is 1. Therefore, the output region analysis signal is F(E1,E2) as F(1,1), thus obtaining the region to be analyzed as follows: Figure 5 As shown, extract E1 and add any symbols before and after E1 to form a string. At the same time, extract E2 and add any symbols before and after E2 to form a string. The results are DH and DW, which are ¥1# and @1&, respectively. Here, ¥, #, @ and & can be replaced with any symbols, and the selection of symbols is completely random.

[0110] Please see Figure 6 As shown, in step S4025, starting from the contour line above F(E1,E2), name it the starting line. Starting from the starting line, search for the contour line of the region to be analyzed in a clockwise direction, and mark the contour lines as L according to the search order. h Where h is a positive integer and h is the index of L, and L1 is the starting line;

[0111] Step S4026, starting with h=1, obtain L h The direction of the line segment, including left-right and up-down directions, if L h With L h+1 If the line segments have the same direction, they are grouped into a group of line segments in the same direction. If two groups of line segments in the same direction have an intersection, the two line segments in the same direction are combined. h is incremented by one and all groups of line segments in the same direction are analyzed.

[0112] In practice, the contour line above F(1,1) is taken as the starting line and named as such. Starting from the starting line, the contour line of the region to be analyzed is searched in a clockwise direction, such as... Figure 6 As shown, the arrows on the outline represent the search direction, and the search yields L. h 1≤h≤38, starting with h=1, at this time L h Let L1 be a segment that runs left-right. Similarly, the segments L2 and L3 also run left-right. This means that the segments L2 and L3 run in the same direction as L1. We can group L1, L2, and L3 into a single group of segments running in the same direction. L4, however, does not run in the same direction as L1 to L3. Therefore, we can represent this group as [L1, L3], meaning that L1 to L3 belong to the same group. Similarly, we can deduce that the groups of segments running in the same direction include [L1, L3], [L4], [L5, L6], [L7], [L8], [L9, L1], [L1, L2], [L3, L4], [L5, L6], [L7], [L8], [L9, L1], [L1, L1], [L1, L2], [L1 ... 10 ]、[L 11 ,L 13 ]、[L 14 ,L 15 ]、[L 16 ,L 18 ]、[L 19 ]、[L 20 ]、[L 21 ,L 23 ]、[L 24 ]、[L 25 ]、[L 26 ,L 27 ]、[L 28 ]、[L 29 ]、[L 30 ,L 31 ]、[L 32 ] and [L 33 ,L 38 ], where [L4] represents a group of line segments in the same direction that contains only one contour line, L4, and [L7], [L8], [L 19 ]、[L 20 ]、[L 24 ]、[L 25 ]、[L 28 ]、[L29 ] and [L 32 Similarly.

[0113] Step S4027, according to the L in the same direction line segment group h In the middle, the line segments in the same direction are numbered in ascending order of h, using the symbol K. g This indicates that, where g is a positive integer and g is the index of K, we obtain K. g L h The quantity, labeled S g ;

[0114] Please see Figure 7 As shown, in step S4028, if K g+1 Compared to K g If it is in a 90° clockwise direction, then at S g Add any lowercase letter to get C g If K g+1 Compared to K g If it is in a 90° counterclockwise direction, then at S g Add any uppercase letter to get C g ;

[0115] Step S4029, sort C in ascending order of g. g Combine the strings and label the resulting strings as BU. Combine the strings in the order of DH, DW, and BU and name the resulting strings as region codes. Analyze the region codes of all regions and combine the region codes in a random order. Name the resulting strings as desensitized data.

[0116] In specific implementation, according to [L1,L3], [L4], [L5,L6], [L7], [L8], [L9,L... 10 ]、[L 11 ,L 13 ]、[L 14 ,L 15 ]、[L 16 ,L 18 ]、[L 19 ]、[L 20 ]、[L 21 ,L 23 ]、[L 24 ]、[L 25 ]、[L 26 ,L 27 ]、[L 28 ]、[L 29 ]、[L 30 ,L 31 ]、[L 32 ] and [L 33 ,L38 The numbers are labeled sequentially to obtain K1 to K. 20 Simultaneously obtain S1 to S 20 The sequence is 3, 1, 2, 1, 1, 2, 3, 2, 3, 1, 1, 3, 1, 1, 2, 1, 1, 2, 1 and 6. Taking K1 and K2 as examples, K1 and K2 are as follows... Figure 7 As shown, taking the direction of the arrow K1 as the direction of travel, if K2 is to the right of the direction of travel, it means K2 is 90° clockwise relative to K1; if K2 is to the left of the direction of travel, it means K2 is 90° counterclockwise relative to K1. Figure 7 K2 is clearly 90° clockwise from K1. This means that after K1 reaches its end, rotating 90° clockwise will align it with the direction of K2's movement. Therefore, adding any lowercase letter after S1 yields C1 as 3d. It's important to note that the added lowercase and uppercase letters must be randomly selected from letters a to f and A to F, as these are often present as hexadecimal numbers in the ciphertext, effectively confusing brute-force attackers. Similarly, we can deduce C1 to C... 20The sequence 3d, 1C, 2D, 1a, 1a, 2b, 3F, 2E, 3F, 1A, 1B, 3e, 1f, 1E, 2d, 1D, 1C, 2f, 1c, and 6b, combined, yields BU as 3d1C2D1a1a2b3F2E3F1A1B3e1f1E2d1D1C2f1c6b. Further combination yields the region code ¥1#@1&3d1C2D1a1a2b3F2E3F1A1B3e1f1E2d1D1 Similarly, analyzing all the number-one regions, we obtain the region codes for the other two number-one regions as #1&*8$1a1c1f1b and &6*(8?1e1c1d1a). Randomly combining these, we get the desensitized data as #1&*8$1a1c1f1b¥1#@1&3d1C2D1a1a2b3F2E3F1A1B3e1f1E2d1D1C2f1c6b&6*(8?1e1c1d1a). It should be noted that in the most... Within a large data region, there exists a small closed region containing all zeros. Therefore, the region code of this closed region is analyzed and named the correction code. A separator "-" is added to the end of the original desensitized data, followed by the correction code. If multiple correction codes exist, they are randomly combined after the separator. For example, in this embodiment, the final sensitive data obtained through further analysis is ¥1#@1&3d1C2D1a1a2b3F2E3F1A1B3e1f1E2d1D1C2f1c6b-%2^+2=1f2b1c2e. Although the desensitized data in this embodiment is significantly larger than the original data, it is not intended for storage in a database but rather for display to users. Therefore, its size is not a concern. Furthermore, the number of bytes overflowing from the sensitive data is not directly proportional to the original data; rather, the larger the sensitivity matrix, the fewer bytes overflow.

[0117] Step S5 involves hiding the anonymized data from the user-accessed data and displaying the remaining data to the user; Step S5 includes the following sub-steps:

[0118] Step S501: Name the data accessed by the user as access data, and convert all data belonging to sensitive fields in the access data into de-identified data;

[0119] Step S502: Display access data to the user, wherein the anonymized data is uniformly displayed as the symbol "*", without quotation marks;

[0120] In practice, for example, when finance accesses Table 1 at Level 1 trust, the result is shown in Table 2 below:

[0121] Table 2 shows the financial information obtained from Table 1 when accessed at Level 1 Trust.

[0122] Name Telephone ID card Salary Start date Years of service Zhang San 13111111111 12345 5000 2023-4-12 2 Li Si 13222222222 12456 5000 2023-4-12 2 Wang Wu 13333333333 12789 6000 2022-4-12 3

[0123] The table 1 obtained when the finance department accesses the system at level two trust is shown in Table 3 below:

[0124] Table 3 shows the financial information obtained from Table 1 when accessed at level 2 trust.

[0125] Name Telephone ID card Salary Start date Years of service Zhang San * * * * * Li Si * * * * * Wang Wu * * * * *

[0126] The table 1 obtained when the finance department accesses the system at level 3 trust is shown in Table 4 below:

[0127] Table 4 shows the financial information obtained from Table 1 when accessing the system at level 3 trust.

[0128] Name Telephone ID card Salary Start date Years of service * * * * * * * * * * * * * * * * * *

[0129] The content in * is hidden. If sensitive data is intercepted at the code level, the corresponding de-identified data will be obtained. If a user needs to access the content in *, they need to submit an application to their superior.

[0130] Example 2: This application provides an electronic device, which may include a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The memory stores computer-readable instructions. The processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, steps such as those in the database privacy and network security protection method with integrated dynamic desensitization are performed to achieve the following functions: assigning job permissions to users based on their job information; analyzing the access scope of job permissions; analyzing the trustworthiness of access behavior and dynamically adjusting the sensitivity of field names in the database based on the analysis results to obtain different sensitive fields; dynamically desensitizing the sensitive fields in the database using a dynamic desensitization algorithm to obtain desensitized data; hiding the desensitized data in the data accessed by the user and displaying the remaining data to the user.

[0131] Furthermore, when the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0132] Example 3: This application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the database privacy and network security protection method with integrated dynamic desensitization provided by the above methods. The method includes: assigning job permissions to users based on their job information; analyzing the access scope of job permissions; analyzing whether the access behavior is trustworthy, and dynamically adjusting the sensitivity of field names in the database based on the analysis results to obtain different sensitive fields; dynamically desensitizing the sensitive fields in the database using a dynamic desensitization algorithm to obtain desensitized data; hiding the desensitized data in the data accessed by the user and displaying the remaining data to the user.

[0133] Example 4: This application also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it performs the steps of the above-mentioned database privacy and network security protection method integrating dynamic desensitization, to achieve the following functions: assigning job permissions to users based on their job information; analyzing the access scope of job permissions; analyzing whether the access behavior is trustworthy, and dynamically adjusting the sensitivity of field names in the database based on the analysis results to obtain different sensitive fields; dynamically desensitizing the sensitive fields in the database using a dynamic desensitization algorithm to obtain desensitized data; hiding the desensitized data in the data accessed by the user and displaying the remaining data to the user.

[0134] Based on the above description of the embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the above technical solutions, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0135] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.

[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A database privacy network security protection method fusing dynamic de- sensitization, characterized in that, The method comprises the following steps: assigning a position permission to a user based on position information of the user; obtaining field names in a database, analyzing the relevance between the field names and the position information based on historical operation records, and simultaneously including the field names in the access range of the position permission based on the relevance; obtaining the IP address and time of the user accessing the database, analyzing whether the access behavior is credible, and dynamically adjusting the sensitivity of the field names in the database based on the analysis result to obtain different sensitive fields; performing dynamic desensitization on the sensitive fields in the database by a dynamic desensitization algorithm to obtain desensitized data; the dynamic desensitization on the sensitive fields in the database by the dynamic desensitization algorithm to obtain the desensitized data comprises the following sub-steps: converting the sensitive fields into binary data and constructing a sensitive matrix; based on the sensitive matrix, performing dynamic desensitization on the sensitive fields in the database to obtain desensitized data; the conversion of the sensitive fields into binary data and the construction of the sensitive matrix comprise the following sub-steps: based on the UTF-8 encoding, converting the data in the sensitive fields into binary format numbers, which are named as binary data; constructing a matrix of E1x E2, which is named as a sensitive matrix, wherein E1 is the number of rows and E2 is the number of columns, and the binary data is recorded in the sensitive matrix by bit in the order of first from left to right and then from top to bottom; based on the sensitive matrix, performing dynamic desensitization on the sensitive fields in the database to obtain desensitized data, which comprises the following sub-steps: segmenting the adjacent squares of 1 and 0 in the sensitive matrix, then performing contour segmentation and hiding processing, setting a coding rule according to the direction of the contour line to obtain a combined string, and naming the combined string as desensitized data; hiding the desensitized data in the data accessed by the user and showing the remaining data to the user.

2. The method of fusing dynamic de-sensitization with database privacy network security protection as claimed in claim 1, wherein, The assignment of the position permission to the user based on the position information of the user comprises the following sub-steps: obtaining the number of positions owned by the enterprise, which is named as the number of positions; setting the number of position permissions, and the permission level corresponding to the position information is the position permission.

3. The method of claim 2, wherein the method further comprises: obtaining the field names in the database, analyzing the relevance between the field names and the position information based on the historical operation records, and simultaneously including the field names in the access range of the position permission based on the relevance comprises the following sub-steps: obtaining the field names in the database and reading the historical operation records; obtaining the field names called by the user and the position information of the user in the historical operation records, which are named as called fields and operation positions respectively; associating the called fields with the operation positions and including the called fields in the access range of the operation positions, and each position permission has an access range.

4. The method of claim 3, wherein the method further comprises: obtaining the IP address and time of the user accessing the database, analyzing whether the access behavior is credible, and dynamically adjusting the sensitivity of the field names in the database based on the analysis result to obtain different sensitive fields comprises the following sub-steps: obtaining the IP address and time of the user accessing the database, analyzing whether the access behavior is credible, and simultaneously setting a trust level based on the analysis result; based on the trust level, dynamically adjusting the sensitivity of the field names in the database to obtain different sensitive fields.

5. The method of claim 4, wherein the method further comprises: Acquire the IP address and time of the user accessing the database, analyze whether the access behavior is reliable, and set a trust level based on the analysis results, including the following sub-steps: Acquire the IP address and time of the user accessing the database, respectively named as access IP and access time; Acquire the IP address and working time of the enterprise, respectively named as enterprise IP and working time period; Determine whether the access IP is the enterprise IP and whether the access time is within the working time period, if both are yes, output the first security signal, if one condition is no, output the second security signal, if both are no, output the third security signal; If the first security signal is output, set the trust level of this access to level one trust, if the second security signal is output, set the trust level of this access to level two trust, if the third security signal is output, set the trust level of this access to level three trust.

6. The method of claim 5, wherein the method further comprises: Based on the trust level, dynamically adjust the sensitivity of the field name in the database to obtain different sensitive fields, including the following sub-steps: Name the field name in the access range corresponding to the position permission as a trust field, and name the rest of the field names as sensitive fields; If the trust level is level one trust, keep the trust field and the sensitive field; If the trust level is level two trust, rename all trust fields containing numbers as sensitive fields; If the trust level is level three trust, rename all trust fields as sensitive fields.

7. The method of claim 6, wherein the method further comprises: Converting the sensitive field to binary data and constructing a sensitive matrix also includes the following sub-steps: Statistical the number of binary data, named as encoding bit number, calculate the factor of encoding bit number, named as bit number factor; Acquire the first factor and the second factor, respectively marked as Q1 and Q2, wherein Q1×Q2 equals the encoding bit number; Calculate |Q1-Q2|, name the calculation result as the aspect ratio difference, acquire the Q1 and Q2 with the smallest aspect ratio difference, respectively marked as E1 and E2; Mark the number in the E1th row and E2th column of the sensitive matrix as G(E1,E2), and each G(E1,E2) in the sensitive matrix is in a square, that is, the sensitive matrix is visualized as a square array.

8. The method of claim 7, wherein the method further comprises: Based on the sensitive matrix, dynamically desensitize the sensitive field in the database to obtain desensitized data, including the following sub-steps: Mark the square where G(E1,E2) is located as F(E1,E2), if two adjacent G(E1,E2) are 1 and 0 respectively, mark the boundary line of their F(E1,E2) as a split line, and also mark the line segment on the boundary of the sensitive matrix as a split line, count all the split lines and highlight them; Hide all F(E1,E2) with G(E1,E2) being 0, extract the contour of the remaining F(E1,E2) to obtain the matrix contour, name the closed area surrounded by the matrix contour as the first number area, and name the split line on the matrix contour as the contour line, display all F(E1,E2) with G(E1,E2) being 0; Starting with E1=E2=1, determine whether G(E1, E2) is 1, if yes, output the region analysis signal, if no, add 1 to E2 and re-determine, if E2 reaches the maximum value of E2, reset E2 to 1 and add 1 to E1 and re-determine; If the region analysis signal is output, name the number region to which F(E1, E2) belongs as a region to be analyzed, extract E1 and add arbitrary symbols before and after E1 to form a string, marked as DH, extract E2 and add arbitrary symbols before and after E2 to form a string, marked as DW; Taking the contour line above F(E1, E2) as a starting point, the contour line is named as a starting line, and the contour line of the region to be analyzed is searched along the clockwise direction starting from the starting line, and the contour line is marked as L according to the searching order h Wherein, h is a positive integer and h is the serial number of L, L1 is the starting line; Start with h = 1, get L h The line segment direction includes left and right direction and up and down direction, if L h The line segment direction is same as L h+1 Combine them into a same direction line segment group, if two same direction line segment groups have intersection, combine them, repeat h and analyze all same direction line segment groups. According to the same direction line segment group L h In the order from small to large, the same direction line segment group is numbered by symbol K g , wherein g is a positive integer and g is the serial number of K, the number of K g In L h , marked as S g ; If K g+1 is in a clockwise 90° direction compared to K g , then add any lowercase letter after S g , resulting in C g ; if K g+1 is in a counter-clockwise 90° direction compared to K g , then add any uppercase letter after S g , resulting in C g . C is combined in the order of g from small to large g The combined string is marked as BU, and the combined string is named as the region code in the order of DH, DW, and BU. The region code of all the numbers in the region is analyzed, the region codes are combined in a random order, and the combined string is named as the desensitized data.

9. The method of claim 8, wherein the method further comprises, The steps of hiding the desensitization data in the data accessed by the user and showing the remaining data to the user include the following sub-steps: Name the data accessed by the user as access data, and convert all data belonging to sensitive fields in the access data into desensitization data; Show the access data to the user, wherein the desensitization data is uniformly displayed as a symbol "*" without quotes.

Citation Information

Patent Citations

  • Role based dynamic database desensitization service method and system

    CN106203170A

  • Real-time dynamic database desensitization method

    CN115935434A