A database security management method and system

By performing encryption masking and hashing on database passwords, combined with dynamic encryption rules and hash functions, the problem of difficulty in ensuring the security of database passwords is solved, the risk of leakage and cracking is significantly reduced, and the security of the database is improved.

CN118378303BActive Publication Date: 2024-08-27SOUTHWEST PETROLEUM UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410822070.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-25
Publication Date
2024-08-27
Estimated Expiration
2044-06-25

AI Technical Summary

Technical Problem

The security of database passwords is difficult to guarantee, and there is a risk of brute force cracking and leakage, which affects the reputation and financial status of users and software suppliers.

Method used

By obtaining the account and password registered by the user, using preset encryption rules to mask and replace, generate ciphertext, hash it, build a storage table, determine abnormal user login environment, and dynamically adjust encryption rules and hash functions , improve the security of password storage.

Benefits of technology

It significantly reduces the risk of password leakage, enhances the password's resistance to cracking, improves the security and reliability of the database, and protects user privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118378303B
    Figure CN118378303B
Patent Text Reader

Abstract

The present invention is applicable to the field of database management technology, and in particular to a database security management method and system, the method comprising: obtaining a user's registered account and password, and using a preset encryption rule to mask the password, the number of masks being at least one, generating a ciphertext, determining a replacement rule, and replacing the mask in the ciphertext; determining a hash function, and hashing the replaced ciphertext, defining the obtained hash value as a target value, configuring a corresponding relationship between the account and the target value, and constructing a storage table. The present invention hashes the replaced ciphertext to avoid plaintext storage to a limited extent, preventing brute force cracking, thereby greatly increasing the security of password storage, and by detecting the user's login environment, while ensuring that the password is normally retrieved, significantly enhancing the password's anti-cracking ability, greatly reducing the risk caused by database leakage, and making password storage more secure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of database management, and in particular to a database security management method and system. Background Art

[0002] In today's digital age, with the explosive growth of data, protecting sensitive information has become crucial. More and more companies and organizations are adopting multi-layered security measures, such as encryption, access control, intrusion detection systems, and regular audits, to prevent data leaks and unauthorized access. However, with the continuous evolution of cyberattack techniques, database security still faces huge challenges, especially data privacy. Within data privacy, the security of password databases is of particular concern. Computer technology has entered every aspect of life, and more and more software and services require users to register, which has generated a large number of password databases. Software and service providers face many risks in the process of storing passwords. For example, if passwords are not encrypted and stored, they are easily cracked by brute force. In addition, poorly managed password policies will further reduce password security. If a user's password is leaked, it will not only have a significant impact on the individual user, but also have a profound negative impact on the reputation and financial situation of the software and service provider.

[0003] Therefore, “how to encrypt the database and reduce the risk of leakage” is the technical problem that the present invention needs to solve. Summary of the Invention

[0004] The purpose of the present invention is to provide a database security management method and system to solve the problem of "how to encrypt the database and reduce the risk of leakage" raised in the above background technology.

[0005] To achieve the above object, the present invention provides the following technical solutions:

[0006] A database security management method, the method comprising:

[0007] Obtaining the user's registered account and password, and masking the password using a preset encryption rule, with the number of masks being at least one, generating a ciphertext, determining a replacement rule, and replacing the mask in the ciphertext;

[0008] Determine a hash function, hash the replaced ciphertext, define the resulting hash value as a target value, configure a correspondence between the account number and the target value, construct a storage table, the storage table including at least an account number item and a target value item, and aggregate the storage table into a preset database;

[0009] Receive the account and password entered by the user and determine whether there is any abnormality in the user's login environment;

[0010] If it does not exist, the account number entered by the user is used to cross the corresponding relationship and traverse the corresponding target value item in the storage table. The password entered by the user is hashed using the hash function to determine the input value, and the similarity between the input value and the target value item is compared. If the similarity is greater than the preset threshold, access permission is opened to the user. If it is less than, an error pop-up window is pushed to the user. If there is an abnormality in the user's login environment, the preset threshold is increased and interruption measures are determined.

[0011] Furthermore, the steps of obtaining the user's registered account and password, masking the password using a preset encryption rule, generating a ciphertext, determining a replacement rule, and replacing the mask in the ciphertext include:

[0012] Using the login environment, updating the encryption rule;

[0013] Locating the replaced characters from the password input by the user, and masking the replaced characters using the encryption rule;

[0014] A preset number of masks are selected from the ciphertext, and the masks are replaced using the replacement rule.

[0015] Furthermore, the steps of determining a hash function, hashing the replaced ciphertext, defining the obtained hash value as a target value, configuring a correspondence between the account number and the target value, constructing a storage table, and aggregating the storage table into a preset database include:

[0016] Determine the nodes of distributed storage, split the database into the nodes, extract the directory, and hang it on the nodes;

[0017] The directory is searched using the account number input by the user, and the query authority of the node is opened to the user based on the search results.

[0018] Furthermore, the step of receiving the account number and password input by the user and determining whether there is any abnormality in the user's login environment includes:

[0019] Collect statistics on users' historical login behaviors and characteristics, build a login trust scoring model, and score the acquired user login data;

[0020] If the score is less than or equal to a preset threshold, the login data is marked as abnormal, otherwise, it is marked as normal.

[0021] Furthermore, if there is no abnormality in the user's login environment, the account number entered by the user is used to cross the corresponding relationship, traverse the corresponding target value item in the storage table, and use the hash function to hash the password entered by the user to determine the input value, and compare the similarity between the input value and the target value item. If the similarity is greater than a preset threshold, the user is granted access rights; if it is less than a preset threshold, the step of pushing an error pop-up window to the user includes:

[0022] If there is no abnormality in the user's login environment, activate the query authority and the corresponding relationship, and traverse the target value in the node;

[0023] The similarity between the target value and the input value is calculated using the preset Hamming distance formula;

[0024] The Hamming distance formula is:

[0025] ;

[0026] Where S is the similarity, dH is the Hamming distance, and L is the length of the target value and the input value, where the Hamming distance is the number of different bits in the target value and the input value.

[0027] Furthermore, if there is an abnormality in the user's login environment, the step of increasing the preset threshold and determining an interruption measure includes:

[0028] Determine the abnormality level of the login environment and construct a ladder table of abnormality levels and similarity thresholds;

[0029] A label is generated using the interruption measure and the label is inserted into the ladder table.

[0030] Furthermore, the method further comprises:

[0031] Issue identification to distributed storage nodes, build a hash function library, and deploy different hash functions to each node based on preset selection rules;

[0032] A key is embedded into the hash function and the key is copied into the query authority.

[0033] Furthermore, the system includes:

[0034] A generation module is configured to obtain a user's registered account number and password, mask the password using a preset encryption rule, with the number of masks being at least one, generate a ciphertext, determine a replacement rule, and replace the mask in the ciphertext;

[0035] a summarization module, configured to determine a hash function, hash the replaced ciphertext, define the resulting hash value as a target value, configure a correspondence between the account number and the target value, construct a storage table, the storage table including at least an account number item and a target value item, and summarize the storage table into a preset database;

[0036] The judgment module is used to receive the account number and password entered by the user and determine whether there is any abnormality in the user's login environment;

[0037] The push module is used to use the account number entered by the user to cross the corresponding relationship and traverse the corresponding target value item in the storage table when there is no abnormality in the user's login environment, and use the hash function to hash the password entered by the user to determine the input value, and compare the similarity between the input value and the target value item. If the similarity is greater than a preset threshold, access permission is opened to the user; if it is less than, an error pop-up window is pushed to the user. When there is an abnormality in the user's login environment, the preset threshold is increased and interruption measures are determined.

[0038] Furthermore, the generation module includes:

[0039] an updating unit, configured to update the encryption rule using the login environment;

[0040] a masking unit, configured to locate characters to be replaced from the password input by the user and mask the characters to be replaced using the encryption rule;

[0041] The replacement unit is configured to select a preset number of masks from the ciphertext and replace the masks using the replacement rule.

[0042] Furthermore, the summary module includes:

[0043] An extraction unit, configured to determine nodes of distributed storage, divide the database into the nodes, and extract the data from the nodes into directories and hang them on the nodes;

[0044] The opening unit is used to search the directory using the account number input by the user, and open the query authority of the node to the user according to the search result.

[0045] Compared with the prior art, the present invention has the following beneficial effects:

[0046] 1. By masking and replacing the user's registered password, the risk of password leakage during transmission can be greatly reduced, while protecting user privacy. By hashing the replaced ciphertext, plaintext storage is avoided to a limited extent, preventing brute force cracking, thereby greatly increasing the security of password storage. By detecting the user's login environment, it can significantly enhance the password's anti-cracking ability while ensuring normal password retrieval, greatly reducing the risk caused by database leakage and making password storage more secure.

[0047] 2. By distributing the storage of user accounts and passwords, the attack surface is effectively reduced, further improving the reliability and security of the database. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A flowchart of a database security management method provided by an embodiment of the present invention;

[0049] Figure 2 A block diagram of the first sub-process of the database security management method provided by an embodiment of the present invention;

[0050] Figure 3 A second sub-flow diagram of the database security management method provided by an embodiment of the present invention;

[0051] Figure 4 A block diagram of the third sub-process of the database security management method provided by an embodiment of the present invention;

[0052] Figure 5 A fourth sub-flow diagram of the database security management method provided by an embodiment of the present invention;

[0053] Figure 6 A block diagram of the database security management system provided by an embodiment of the present invention;

[0054] Figure 7 A block diagram of the composition of a generation module in a database security management system provided by an embodiment of the present invention;

[0055] Figure 8 A block diagram of the composition of the summary module in the database security management system provided by an embodiment of the present invention;

[0056] Figure 9 A block diagram of the composition of the judgment module in the database security management system provided by an embodiment of the present invention;

[0057] Figure 10 This is a block diagram of the push module in the database security management system provided by an embodiment of the present invention.

[0058] In the accompanying drawings: 1. Database security management system; 11. Generation module; 111. Update unit; 112. Mask unit; 113. Replacement unit; 12. Summarization module; 121. Extraction unit; 122. Open unit; 13. Judgment module; 131. Scoring unit; 132. Marking unit; 14. Push module; 141. Traversal unit; 142. Calculation unit; 143. Construction unit; 144. Insertion unit. DETAILED DESCRIPTION

[0059] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0060] In Example 1, Figure 1 The implementation process of the database security management method provided by the embodiment of the present invention is shown and described in detail below:

[0061] S100: Obtain the user's registered account and password, and use a preset encryption rule to mask the password, where the number of masks is at least one, generate a ciphertext, determine a replacement rule, and replace the mask in the ciphertext.

[0062] Obtain the user's registered account and password. This registration process can be carried out through the linked software. Use the preset encryption rules to mask the password. The preset encryption rules are to mask a fixed number of digits or several fixed digits in the password, determine the masked password as ciphertext, and then use the replacement rules to replace one or several masks in the ciphertext.

[0063] For example, a user registers 123456 as a password; of course, the password in actual use should not be simple. The encryption rule can be to mask the last two digits, that is, 5 and 6, and use "*" instead. At this time, the password becomes 1234**. Then, using the replacement rule, continue to replace the second "*" with A. The advantage of this is that masking can prevent the password from being leaked during the registration process, and replacement is mainly to avoid the password from being leaked during transmission.

[0064] S200: Determine a hash function and hash the replaced ciphertext, define the obtained hash value as a target value, configure a correspondence between the account number and the target value, and construct a storage table. The storage table includes at least: an account number item and a target value item, and the storage table is aggregated into a preset database.

[0065] Select a suitable hash function, hash the ciphertext, determine the hash value, and define the hash value as the target value. Find the correspondence between the account number and the target value, and use the account number, target value and correspondence to build a storage table. Aggregate the storage table to a preset database. The preset database is also the database used for password storage.

[0066] S300: Receive the account number and password entered by the user, and determine whether there is any abnormality in the user's login environment.

[0067] Based on the user's login environment, determine whether there is any abnormality in the login, and receive the account number and password entered by the user.

[0068] S400: If it does not exist, the account number entered by the user is used to cross the corresponding relationship and traverse the corresponding target value item in the storage table. The password entered by the user is hashed using the hash function to determine the input value, and the similarity between the input value and the target value item is compared. If the similarity is greater than a preset threshold, access permission is granted to the user. If it is less than a threshold, an error pop-up window is pushed to the user. If there is an abnormality in the user's login environment, the preset threshold is increased and interruption measures are determined.

[0069] If there is no abnormality in the user's login environment, the account number entered by the user is used to search in the database to find the corresponding target value item, and the target value is determined. The password entered by the user is hashed to determine the input value. If the similarity between the input value and the target value is greater than the preset threshold, it is proved that the password entered by the user is correct, and access is opened to the user for login. It should be noted that the preset threshold here needs to be calculated multiple times; for example, for some important fields, such as social, financial and other fields, a maximum similarity threshold should be set. As long as the input value is exactly the same as the target value, the user can enter the database, and some temporary passwords, trial accounts, etc. can be set with relatively low thresholds.

[0070] If the similarity is less than the preset threshold, it proves that the user's password is incorrect. At this time, an error pop-up window will be pushed to the user to remind the user to re-enter the password. If there is an abnormality in the login environment, the preset threshold should be increased. When the password is entered incorrectly multiple times, interruption measures should be used to interrupt the user's input process to prevent the user from brute force cracking.

[0071] In Example 2, Figure 2 The implementation process of the database security management method provided by an embodiment of the present invention is shown. The following details the steps of obtaining the user's registered account and password, masking the password using a preset encryption rule, generating ciphertext, determining a replacement rule, and replacing the mask in the ciphertext.

[0072] S101: Utilizing the login environment, updating the encryption rule.

[0073] Determine different encryption rules based on the user's login environment. If the user's login environment is abnormal, the number of mask bits should be increased.

[0074] S102: Locate characters to be replaced from the password input by the user, and mask the characters to be replaced using the encryption rule.

[0075] The replaced characters are located from the password input by the user, and the replaced characters are masked using encryption rules.

[0076] S103: Select a preset number of masks from the ciphertext, and replace the masks using the replacement rule.

[0077] A preset number of masks are selected from the ciphertext and replaced. The preset number is predetermined by the staff. It should be noted that the hash function is used to hash the password entered by the user, not the masked or replaced password.

[0078] In Example 3, Figure 3 The implementation process of the database security management method provided by an embodiment of the present invention is shown. The following details the steps of determining a hash function, hashing the replaced ciphertext, defining the obtained hash value as a target value, configuring a correspondence between an account number and the target value, constructing a storage table, and aggregating the storage table into a preset database.

[0079] S201: Determine the nodes of distributed storage, divide the database into the nodes, extract the directory, and hang it on the nodes.

[0080] Determine the nodes for distributed storage, use the nodes to split the database, store the split database into the nodes, extract the directory of the database in each node, and hang the extracted directory on the node.

[0081] S202: Using the account number input by the user, the directory is searched, and based on the search results, the query authority of the node is opened to the user.

[0082] Receive the account number entered by the user, query the directory, classify the account number into the node corresponding to the directory, and open the query permission of the node to the user.

[0083] For example, when the user enters the account number ABC, through the search directory, it is found that ABC is stored in Node A. At this time, the query permission of Node A is opened to the user, ABC is transferred to Node A, and the data in Node A is used to determine whether the corresponding password entered by the user is correct. The advantage of doing this is that it can reduce the attack surface and prevent data leakage in all nodes.

[0084] In Example 4, Figure 4 The implementation process of the database security management method provided by an embodiment of the present invention is shown. The following details the steps of receiving the account number and password entered by the user and determining whether there is an abnormality in the user's login environment.

[0085] S301: Count the user's historical login behavior and characteristics, build a login trust scoring model, and score the acquired user login data.

[0086] Collect statistics on the user's historical login behavior and characteristics, where the historical login behavior and characteristics can be the number of times the password is entered, the login location, or other factors, and build a login trust scoring model; while the user enters the account number and password, monitor the user's login behavior, determine the user's login data, and use the login trust scoring model to score the login data.

[0087] S302: If the score is less than or equal to a preset threshold, the login data is marked as abnormal; otherwise, it is marked as normal.

[0088] If the score is less than or equal to the preset threshold, the login data will be marked as abnormal. Conversely, if the score is greater than the preset threshold, the login data will be marked as normal. The preset threshold should be set in advance by the staff.

[0089] In Example 5, Figure 5 The implementation process of the database security management method provided by an embodiment of the present invention is shown. The following steps include: if the user's login environment does not have any abnormalities, the account number entered by the user is used to cross the corresponding relationship, traverse the corresponding target value item in the storage table, and use the hash function to hash the password entered by the user to determine the input value. The similarity between the input value and the target value item is compared. If the similarity is greater than a preset threshold, access is granted to the user. If it is less than a threshold, an error pop-up window is pushed to the user. If the user's login environment has an abnormality, the preset threshold is increased and the interruption measure is determined. The steps are described in detail as follows:

[0090] S401: If there is no abnormality in the user's login environment, activate the query authority and the corresponding relationship, and traverse the target value in the node.

[0091] If the user's login data is marked as normal, that is, there is no abnormality in the user's login environment, the query permission can be activated at this time, and the corresponding relationship can be used to find the data in the node corresponding to the account entered by the user, and this data can be determined as the target value.

[0092] S402: Calculate the similarity between the target value and the input value using a preset Hamming distance formula;

[0093] The Hamming distance formula is:

[0094] ;

[0095] Where S is the similarity, dH is the Hamming distance, and L is the length of the target value and the input value, where the Hamming distance is the number of different bits in the target value and the input value.

[0096] Use a hash function to hash the registered password entered by the user, and calculate the target value and input value in binary representation; compare the target value and input value to find out whether there is a difference between the two. If there is a difference, record the number of different bits; for example, the target value and input value are different at the 2nd, 15th and 31st bits, then the number of different bits at this time is 3, that is, the Hamming distance is 3, and L is the length of the target value and the input value. If the length of the user's input value is different from the target value, that is, the length of the password entered by the user is different from the password entered when registering, there is no need to use the Hamming distance formula for calculation at this time, and an error pop-up window can be directly pushed to the user.

[0097] S403: Determine the abnormality level of the login environment and construct a ladder table of abnormality levels and similarity thresholds.

[0098] Based on the score output by the login trust scoring model, the login environment is divided into abnormality levels, and different similarity thresholds are determined for each abnormality level. If the user's login environment abnormality level is low, or there is no login abnormality, a lower similarity threshold can be set. This means that even if there is an error in a certain bit of the password entered by the user, the verification can be passed.

[0099] S404: Generate a label using the interruption measure, and insert the label into the ladder table.

[0100] Using interruption measures, multiple different tags are generated and inserted into different positions in the ladder table; the interruption measures can be temporary account lock, forced password reset and multi-factor authentication.

[0101] In Example 6, different from Example 1, in this embodiment of the present invention, the method further includes:

[0102] Issue identification to distributed storage nodes, build a hash function library, and deploy different hash functions to each node based on preset selection rules;

[0103] A key is embedded into the hash function and the key is copied into the query authority.

[0104] Determine the unique identifier of each node, build a hash function library, and deploy different hash functions for each node according to the preset selection rules. The advantage of this is that the data in each node has different hash rules, which means that when the data in a node is leaked, it can avoid data leakage in other nodes to the greatest extent. In addition, when writing or querying to the node, key verification is also required.

[0105] Figure 6 The following is a block diagram showing the composition structure of a database security management system provided by an embodiment of the present invention. The database security management system 1 includes:

[0106] The generation module 11 is used to obtain the user's registered account number and password, and use a preset encryption rule to mask the password, the number of masks being at least one, to generate a ciphertext, determine a replacement rule, and replace the mask in the ciphertext;

[0107] Aggregation module 12, configured to determine a hash function, hash the replaced ciphertext, define the resulting hash value as a target value, configure a correspondence between the account number and the target value, construct a storage table including at least an account number item and a target value item, and aggregate the storage table into a preset database;

[0108] The judgment module 13 is used to receive the account number and password input by the user and judge whether there is any abnormality in the user's login environment;

[0109] The push module 14 is used to use the account number entered by the user to cross the corresponding relationship and traverse the corresponding target value item in the storage table when there is no abnormality in the user's login environment, and use the hash function to hash the password entered by the user to determine the input value, and compare the similarity between the input value and the target value item. If the similarity is greater than a preset threshold, the user is given access rights; if it is less than, an error pop-up window is pushed to the user. When there is an abnormality in the user's usage environment, the preset threshold is increased and the interruption measures are determined.

[0110] Figure 7 The following is a structural block diagram of the database security management system provided by an embodiment of the present invention. The generation module 11 includes:

[0111] An updating unit 111, configured to update the encryption rule using the login environment;

[0112] a masking unit 112 for locating characters to be replaced from the password input by the user and masking the characters to be replaced using the encryption rule;

[0113] The replacing unit 113 is configured to select a preset number of masks from the ciphertext and replace the masks using the replacing rule.

[0114] Figure 8 The following is a structural diagram of the database security management system provided by an embodiment of the present invention. The summary module 12 includes:

[0115] Extraction unit 121, used to determine the nodes of distributed storage, split the database into nodes, and extract the data from the nodes into directories and hang them on the nodes;

[0116] The opening unit 122 is used to search the directory using the account number input by the user, and open the query authority of the node to the user based on the search result.

[0117] Figure 9 The following is a structural block diagram of the database security management system provided by an embodiment of the present invention. The judgment module 13 includes:

[0118] Scoring unit 131, used to collect statistics on the user's historical login behavior and characteristics, build a login trust scoring model, and score the acquired user login data;

[0119] The marking unit 132 is configured to mark the login data as abnormal when the score is less than or equal to a preset threshold, and otherwise mark the login data as normal.

[0120] Figure 10 The following is a block diagram showing the composition structure of the database security management system provided by an embodiment of the present invention. The push module 14 includes:

[0121] The traversal unit 141 is configured to activate the query authority and the corresponding relationship and traverse the target value in the node when there is no abnormality in the login environment of the user;

[0122] The calculation unit 142 is used to calculate the similarity between the target value and the input value using a preset Hamming distance formula;

[0123] The Hamming distance formula is:

[0124] ;

[0125] Where S is the similarity, dH is the Hamming distance, and L is the length of the target value and the input value, where the Hamming distance is the number of different bits in the target value and the input value.

[0126] A construction unit 143 is used to determine the abnormality level of the usage environment and construct a ladder table of abnormality levels and similarity thresholds;

[0127] The inserting unit 144 is configured to generate a label using the interruption measure and insert the label into the ladder table.

[0128] The generating module 11 is mainly used to complete step S100, the summarizing module 12 is mainly used to complete step S200, the judging module 13 is mainly used to complete step S300, and the pushing module 14 is mainly used to complete step S400;

[0129] The updating unit 111 is mainly used to complete step S101, the masking unit 112 is mainly used to complete step S102, and the replacing unit 113 is mainly used to complete step S103;

[0130] The extraction unit 121 is mainly used to complete step S201, and the opening unit 122 is mainly used to complete step S202;

[0131] The scoring unit 131 is mainly used to complete step S301, and the marking unit 132 is mainly used to complete step S302;

[0132] The traversal unit 141 is mainly used to complete step S401, the calculation unit 142 is mainly used to complete step S402, the construction unit 143 is mainly used to complete step S403, and the insertion unit 144 is mainly used to complete step S404.

[0133] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0134] The above-described embodiments merely illustrate several implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

[0135] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A database security management method, characterized in that: The method comprises: Obtaining the account number and password registered by the user, and using a preset encryption rule to mask the password, the number of masks being at least one, generating a ciphertext, determining a replacement rule, and replacing the mask in the ciphertext; The password is masked using a preset encryption rule. The preset encryption rule is to mask a fixed number of digits or several fixed digits in the password, determine the masked password as ciphertext, and then replace the masked digits in the ciphertext with a limited number but not a limited number of digits by using a replacement rule; Determine a hash function, hash the replaced ciphertext, define the obtained hash value as a target value, configure a corresponding relationship between the account number and the target value, construct a storage table, the storage table at least includes: an account number item and a target value item, and aggregate the storage table into a preset database; Receive the account number and password entered by the user and determine whether there is any abnormality in the user's login environment; If it does not exist, the account number entered by the user is used to cross the corresponding relationship, and the corresponding target value item in the storage table is traversed. The password entered by the user is hashed using the hash function to determine the input value, and the similarity between the input value and the target value item is compared. If the similarity is greater than a preset threshold, access is granted to the user. If it is less than, an error pop-up window is pushed to the user. If there is an abnormality in the user's login environment, the preset threshold is increased, and interruption measures are determined.

2. The database security management method according to claim 1, characterized in that: The steps of obtaining the user's registered account and password, masking the password using a preset encryption rule, generating a ciphertext, determining a replacement rule, and replacing the mask in the ciphertext include: Using the login environment, updating the encryption rule; Locating the replaced characters from the password input by the user, and masking the replaced characters using the encryption rule; A preset number of masks are selected from the ciphertext, and the masks are replaced using the replacement rule.

3. The database security management method according to claim 1, characterized in that: The steps of determining a hash function, hashing the replaced ciphertext, defining the obtained hash value as a target value, configuring a corresponding relationship between an account number and the target value, constructing a storage table, and aggregating the storage table into a preset database include: Determine the nodes of distributed storage, split the database into nodes, extract the directory, and hang it on the nodes; The directory is searched using the account number input by the user, and the query authority of the node is opened to the user based on the search results.

4. The database security management method according to claim 3, characterized in that: The step of receiving the account number and password input by the user and determining whether there is an abnormality in the user's login environment includes: Collect statistics on the user's historical login behavior and characteristics, build a login trust scoring model, and score the acquired user login data; If the score is less than or equal to a preset threshold, the login data is marked as abnormal, otherwise, it is marked as normal.

5. The database security management method according to claim 4, characterized in that: If there is no abnormality in the login environment of the user, the account number input by the user is used to cross the corresponding relationship, the corresponding target value item in the storage table is traversed, and the password input by the user is hashed by using the hash function to determine the input value, and the similarity between the input value and the target value item is compared. If the similarity is greater than a preset threshold, the user is given access rights, and if it is less than a preset threshold, the step of pushing an error pop-up window to the user includes: If there is no abnormality in the login environment of the user, the query authority and the corresponding relationship are activated, and the target value is traversed in the node; The similarity between the target value and the input value is calculated using the preset Hamming distance formula; The Hamming distance formula is: ; Where S is the similarity, dH is the Hamming distance, and L is the length of the target value and the input value, where the Hamming distance is the number of different bits between the target value and the input value.

6. The database security management method according to claim 5, characterized in that: If the user's login environment is abnormal, the step of increasing the preset threshold and determining the interruption measure includes: Determine the abnormal level of the login environment and construct a ladder table of abnormal levels and similarity thresholds; A label is generated using the interruption measure and the label is inserted into the ladder table.

7. The database security management method according to claim 5, characterized in that: The method further comprises: Issue identification to nodes of distributed storage, build a hash function library, and deploy different hash functions to each of the nodes based on preset selection rules; A key is embedded into the hash function and the key is copied into the query authority.

8. A database security management system, characterized in that: The system comprises: A generation module is used to obtain the account number and password registered by the user, and use a preset encryption rule to mask the password, the number of masks is at least one, generate a ciphertext, determine a replacement rule, and replace the mask in the ciphertext; The password is masked using a preset encryption rule. The preset encryption rule is to mask a fixed number of digits or several fixed digits in the password, determine the masked password as ciphertext, and then replace the masked digits in the ciphertext with a limited number but not a limited number of digits by using a replacement rule; A summary module is used to determine a hash function, hash the replaced ciphertext, define the obtained hash value as a target value, configure a corresponding relationship between the account number and the target value, construct a storage table, the storage table at least includes: an account number item and a target value item, and summarize the storage table into a preset database; The judgment module is used to receive the account number and password input by the user and judge whether there is any abnormality in the user's login environment; The push module is used to use the account number input by the user to cross the corresponding relationship, traverse the corresponding target value items in the storage table, and use the hash function to hash the password input by the user to determine the input value, and compare the similarity between the input value and the target value item. If the similarity is greater than a preset threshold, the user is given access rights. If it is less than, an error pop-up window is pushed to the user. When there is an abnormality in the user's login environment, the preset threshold is increased and the interruption measures are determined.

9. The database security management system according to claim 8, characterized in that: The generation module comprises: An updating unit, configured to update the encryption rule by using the login environment; A masking unit, used to locate the replaced characters from the password input by the user, and mask the replaced characters using the encryption rule; The replacement unit is used to select a preset number of masks from the ciphertext and replace the masks using the replacement rule.

10. The database security management system according to claim 8, characterized in that: The summary module includes: An extraction unit, used to determine nodes of distributed storage, divide the database into nodes, and extract the data from the nodes to the directory and hang it in the nodes; The opening unit is used to search the directory using the account number input by the user, and to open the query authority of the node to the user according to the search result.