Hierarchical identity verification method and device and electronic equipment
By dynamically adjusting the combination of authentication levels and verification methods, the problem of inability to finely control user role access rights in the prior art is solved, and the fineness of authentication and data security are improved.
Patent Information
- Application Number
- CN202411085510.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-11-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the multi-role access multi-database scenario, the access rights of different user roles cannot be finely controlled, resulting in low security.
By obtaining user access requests, querying preset three-dimensional mapping relationship tables based on user roles and target databases, dynamically adjusting the authentication level, and using a verification method that matches the authentication level for authentication, including password verification and SMS verification Code verification, dynamic token verification or biometric verification.
It realizes dynamic adjustment of the authentication level according to the user role, target database and data content, improves the precision and accuracy of authentication, ensures that only users who pass all verifications can access the data content, and ensures data security.
Smart Images

Figure CN119004422A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and specifically to a hierarchical identity verification method, device and electronic equipment. Background Art
[0002] With the rapid development of information technology, especially the widespread application of cloud computing and big data technology, the scenario of multiple roles accessing multiple databases is becoming more and more common. In this environment, it has become the norm for users to access and operate data from any location through various devices, which not only brings convenience but also introduces new security challenges.
[0003] At present, a major problem faced by related technologies is that different user roles have different access requirements and permissions to the database. Traditional identity verification methods often use a single or simple verification mechanism, such as a single identity verification step. This method cannot finely control the access rights of different user roles and has the problem of low security.
[0004] Therefore, there is an urgent need for a hierarchical identity verification method, device and electronic equipment. Summary of the invention
[0005] The present application provides a hierarchical identity verification method, device and electronic device, which dynamically adjust the identity verification level and use a combination of verification methods that match the identity verification level for identity verification, thereby improving data security.
[0006] In a first aspect of the present application, a hierarchical identity verification method is provided, the method comprising: obtaining an access request from a user, the access request comprising a user role and a target database that the user requests to access; querying a preset three-dimensional mapping relationship table according to the user role and the target database to obtain a corresponding first identity verification level, the preset three-dimensional mapping relationship table comprising a correspondence between the user role, the target database and the identity verification level; obtaining data content that the user specifically needs to access when accessing the target database; adjusting the first identity verification level according to the data content to obtain a second identity verification level; determining a corresponding verification method combination in the preset mapping relationship table according to the second identity verification level, the verification method combination comprising one or more verification steps, the verification step being password verification, SMS verification code verification, dynamic token verification or biometric verification; executing each of the verification steps in sequence according to the verification method combination; if it is determined that each of the verification steps passes, allowing the user to access the data content.
[0007] By adopting the above technical solution, by obtaining the user's access request, querying the preset three-dimensional mapping relationship table according to the user role and the target database to obtain the first identity authentication level, then adjusting the first identity authentication level according to the specific data content requested by the user to access to obtain the second identity authentication level, and determining the corresponding verification method combination according to the second identity authentication level, executing each verification step in sequence according to the verification method combination, and allowing the user to access the data content if each verification step passes. This method realizes the dynamic adjustment of the identity authentication level according to the user role, target database, and data content, and adopts the verification method combination matching the identity authentication level for identity authentication, thereby improving the precision and accuracy of identity authentication. At the same time, through the preset three-dimensional mapping relationship table and the preset mapping relationship table, the corresponding relationship between the user role, target database, identity authentication level, and verification method combination is established, so that the required identity authentication level and verification method combination can be quickly determined according to the user request, thereby improving the efficiency of identity authentication. In addition, by sequentially executing the verification steps and judging the results, it is ensured that only users who have passed all the verifications can access the data content, thereby ensuring data security.
[0008] Optionally, the first identity authentication level is adjusted according to the data content to obtain a second identity authentication level, specifically including: determining whether the data content includes target sensitive keywords; if it is determined that the data content includes the target sensitive keywords, determining the adjustment range of the first level; determining whether the amount of data included in the data content is greater than or equal to a preset data amount threshold; if it is determined that the data amount is greater than or equal to the preset data amount threshold, determining the adjustment range of the second level; according to the first level adjustment range and the second level adjustment range, the first identity authentication level is adjusted to obtain the second identity authentication level.
[0009] By adopting the above technical solution, it is determined whether the data content contains sensitive keywords and whether the data volume of the data content exceeds the preset data volume threshold, and the first level adjustment range and the second level adjustment range are determined respectively, and the first identity authentication level is adjusted according to the two adjustment ranges to obtain the second identity authentication level. This adjustment method takes into account two factors: the sensitivity of the data content and the size of the data volume. When the data content contains sensitive keywords or the data volume is large, the identity authentication level is increased accordingly, and a stricter identity authentication method is required, thereby protecting sensitive or large quantities of data in a targeted manner and improving data security. At the same time, by setting two adjustment ranges, the identity authentication level can be flexibly adjusted according to actual needs, which can not only appropriately improve security, but also avoid excessive verification affecting user experience.
[0010] Optionally, the determining whether the data content includes target sensitive keywords specifically includes: obtaining a preset sensitive keyword list, the preset sensitive keyword list including multiple sensitive keywords; determining whether the data content includes any sensitive keyword in the preset sensitive keyword list; if it is determined that the data content includes any sensitive keyword in the preset sensitive keyword list, then determining that the data content includes the target sensitive keyword.
[0011] By adopting the above technical solution, a preset sensitive keyword list is obtained, and it is determined whether the data content contains any sensitive keyword in the list. If it does, it is determined that the target sensitive keyword exists in the data content. At the same time, by determining whether the data content contains any sensitive keyword, the sensitivity of the data content can be quickly identified. Once a sensitive keyword is found, the corresponding security measures can be immediately triggered to prevent data leakage risks in a timely manner.
[0012] Optionally, executing each of the verification steps in sequence according to the verification method combination specifically includes: constructing a verification method call chain according to the verification method combination; setting a conditional jump statement in the verification method call chain; if it is determined that a verification step fails, jumping out of the verification method call chain and denying access to the user; setting a counting statement in the verification method chain to record the number of verification failures and obtain the number of failures; if it is determined that the number of failures is greater than or equal to a preset verification threshold, jumping out of the verification method call chain and denying access to the user.
[0013] By adopting the above technical solution, a verification method call chain is constructed according to the verification method combination, and a conditional jump statement and a counting statement are set in the verification method call chain. When a certain verification step fails to be verified, the call chain is jumped out and the user access is denied. When the number of verification failures reaches the preset verification threshold, the call chain is also jumped out and the user access is denied. This execution method clarifies the execution order and logical relationship of each verification step by constructing a verification method call chain, ensuring the integrity and coherence of the verification process. By setting a conditional jump statement, the verification process is immediately terminated once a verification failure occurs, avoiding unnecessary waste of resources and improving verification efficiency. By setting a counting statement and a preset verification threshold, the maximum number of failures allowed for user identity authentication can be controlled to prevent malicious users from making frequent attempts and improve security. In addition, this execution method has strong flexibility and configurability, and can adjust the verification steps, jump conditions, counting thresholds, etc. in the call chain according to actual needs to adapt to different application scenarios.
[0014] Optionally, if it is determined that each verification step passes, allowing the user to access the data content specifically includes: sequentially executing each verification step in the verification method call chain; if it is determined that all verification steps are successfully verified, allowing the user access.
[0015] By adopting the above technical solution, each verification step in the verification method call chain is executed sequentially, and the user is allowed access only when all verification steps are verified successfully. This method ensures that each step is effectively verified by strictly executing the verification steps in the verification method call chain, leaving no potential security loopholes. At the same time, through comprehensive judgment of the results of all verification steps, the user is granted access rights only when all are passed, thereby maximizing the security of data.
[0016] Optionally, before determining the corresponding verification method combination in a preset mapping relationship table according to the second identity authentication level, the method also includes: pre-defining multiple identity authentication levels; setting a corresponding verification method combination for each of the identity authentication levels; and storing the correspondence between the identity authentication levels and the verification method combinations in the preset mapping relationship table.
[0017] By adopting the above technical solution, multiple identity authentication levels are predefined, a corresponding verification method combination is set for each identity authentication level, and their corresponding relationship is stored in a preset mapping relationship table. This method of pre-building a preset mapping relationship table can achieve fast query and matching, improve the response speed, and simplify the identity authentication process. In addition, this method is also highly maintainable and scalable. The content of the preset mapping relationship table can be adjusted at any time, and the identity authentication level and the corresponding verification method combination can be flexibly added or modified to adapt to changing security needs.
[0018] Optionally, before adjusting the first identity authentication level according to the data content to obtain the second identity authentication level, the method also includes: determining whether the data content belongs to the data access permission scope corresponding to the user role; if it is determined that the data content belongs to the data access permission scope corresponding to the user role, executing the step of adjusting the first identity authentication level according to the data content; if it is determined that the data content does not belong to the data access permission scope corresponding to the user role, rejecting the user's access request.
[0019] By adopting the above technical solution, before adjusting the identity authentication level, it is also necessary to determine whether the data content falls within the data access permission scope of the user role. Only if it falls within the data access permission scope will the subsequent identity authentication level adjustment be made, otherwise the user access request will be directly rejected. This judgment method checks the user's access permission before determining the identity authentication level, avoiding unnecessary waste of verification resources and improving verification efficiency. At the same time, this method can effectively prevent users from exceeding their authority to access unauthorized data content, thereby fundamentally eliminating the risk of data leakage.
[0020] In a second aspect of the present application, a hierarchical identity verification device is provided, the device comprising: an acquisition module and a processing module, wherein: the acquisition module is used to obtain an access request of a user, the access request comprising a user role and a target database requested to be accessed by the user; the processing module is used to query a preset three-dimensional mapping relationship table according to the user role and the target database to obtain a corresponding first identity verification level, the preset three-dimensional mapping relationship table comprising a correspondence between the user role, the target database and the identity verification level; the acquisition module is also used to obtain data content that the user specifically needs to access when accessing the target database; the processing module is also used to adjust the first identity verification level according to the data content to obtain a second identity verification level; the processing module is also used to determine a corresponding verification method combination in the preset mapping relationship table according to the second identity verification level, the verification method combination comprising one or more verification steps, the verification step being password verification, SMS verification code verification, dynamic token verification or biometric verification; the processing module is also used to sequentially execute each of the verification steps according to the verification method combination; the processing module is also used to allow the user to access the data content if it is determined that each of the verification steps passes.
[0021] In the third aspect of the present application, an electronic device is provided, including a processor, a memory, a user interface and a network interface, the memory is used to store instructions, the user interface and the network interface are both used to communicate with other devices, and the processor is used to execute the instructions stored in the memory so that the electronic device executes any one of the methods described above.
[0022] In a fourth aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed, any of the methods described above is executed.
[0023] In summary, one or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By obtaining the user's access request, the preset three-dimensional mapping relationship table is queried according to the user role and the target database to obtain the first identity authentication level, and then the first identity authentication level is adjusted according to the specific data content requested by the user to obtain the second identity authentication level, and the corresponding verification method combination is determined according to the second identity authentication level, and each verification step is performed in sequence according to the verification method combination. If each verification step passes, the user is allowed to access the data content. This method realizes the dynamic adjustment of the identity authentication level according to the user role, target database, and data content, and adopts the verification method combination matching the identity authentication level for identity authentication, thereby improving the precision and accuracy of identity authentication. At the same time, through the preset three-dimensional mapping relationship table and the preset mapping relationship table, the corresponding relationship between the user role, target database, identity authentication level, and verification method combination is established, so that the required identity authentication level and verification method combination can be quickly determined according to the user request, thereby improving the efficiency of identity authentication. In addition, by sequentially executing the verification steps and judging the results, it is ensured that only users who have passed all the verifications can access the data content, thereby ensuring data security.
[0024] 2. Determine whether the data content contains sensitive keywords and whether the data volume exceeds the preset data volume threshold, determine the first level adjustment range and the second level adjustment range respectively, and adjust the first identity authentication level according to the two adjustment ranges to obtain the second identity authentication level. This adjustment method takes into account the sensitivity of the data content and the size of the data volume. When the data content contains sensitive keywords or the data volume is large, the identity authentication level is increased accordingly, and a stricter identity authentication method is required, thereby protecting sensitive or large quantities of data in a targeted manner and improving data security. At the same time, by setting two adjustment ranges, the identity authentication level can be flexibly adjusted according to actual needs, which can not only appropriately improve security, but also avoid excessive verification affecting user experience.
[0025] 3. Get the preset sensitive keyword list and determine whether the data content contains any sensitive keyword in the list. If it does, determine that the target sensitive keyword exists in the data content. At the same time, by determining whether the data content contains any sensitive keyword, the sensitivity of the data content can be quickly identified. Once a sensitive keyword is found, the corresponding security measures can be triggered immediately to prevent data leakage risks in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is a flowchart of a hierarchical identity verification method disclosed in an embodiment of the present application; Figure 2 This is an example schematic diagram of a hierarchical identity verification method disclosed in an embodiment of the present application; Figure 3is another exemplary schematic diagram of a hierarchical identity verification method disclosed in an embodiment of the present application; Figure 4 It is a module schematic diagram of a hierarchical identity verification device disclosed in an embodiment of the present application; Figure 5 It is a structural schematic diagram of an electronic device disclosed in an embodiment of the present application.
[0027] Explanation of the reference numerals: 401, acquisition module; 402, processing module; 500, electronic device; 501, processor; 502, communication bus; 503, user interface; 504, network interface; 505, memory. DETAILED DESCRIPTION
[0028] In order to enable technicians in this field to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this application, not all of the embodiments.
[0029] In the description of the embodiments of the present application, words such as "for example" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "for example" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "for example" or "for example" is intended to present related concepts in a specific way.
[0030] In the description of the embodiments of the present application, the meaning of the term "multiple" refers to two or more. For example, multiple systems refer to two or more systems, and multiple screen terminals refer to two or more screen terminals. In addition, the terms "first" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. The terms "include", "comprise", "have" and their variations all mean "including but not limited to", unless otherwise specifically emphasized.
[0031] This application provides a hierarchical identity verification method, referring to Figure 1 , Figure 1 1 is a flow chart of a hierarchical identity verification method provided in an embodiment of the present application. The method is applied to a server and includes steps S101 to S107, which are as follows: Step S101: obtaining a user's access request, where the access request includes the user role and the target database that the user requests to access.
[0032] In step S101, when a user needs to access a specific data resource, an access request is sent to the server. The access request is transmitted over the network and various communication protocols such as HTTP and HTTPS can be used. The user's access request contains two key pieces of information: user role and target database. The user role indicates the user's identity and permission level. In an enterprise management system, the following user roles may exist: ordinary employees: have read-only permissions to some databases and cannot perform modification and deletion operations; department managers: have read and write permissions to the databases related to the department under their jurisdiction and can add, delete, modify and query data; system administrators: have the highest permissions on all databases, can perform any operation, and can manage the permissions of other users.
[0033] The target database refers to the specific database or data set that the user requests to access. In actual applications, a system may contain multiple databases, and different databases store data of different types or different business areas. For example: customer information database: stores basic customer information, contact information, purchase history, etc.; product information database: stores detailed product information, price, inventory; order information database: stores order information submitted by users, payment status, logistics information; users will clearly specify the target database to be accessed in the access request so that the server can accurately provide the corresponding data service.
[0034] Step S102: According to the user role and the target database, a preset three-dimensional mapping relationship table is queried to obtain a corresponding first identity authentication level. The preset three-dimensional mapping relationship table includes a correspondence between the user role, the target database and the identity authentication level.
[0035] In step S102, a preset three-dimensional mapping relationship table is pre-set inside the server. The preset three-dimensional mapping relationship table is a relational data structure used to store the mapping relationship between user roles, target databases, and corresponding identity authentication levels. Each row in the table represents a specific mapping relationship, that is, the identity authentication level that needs to be performed when a user role accesses a target database.
[0036] For example, suppose there are the following user roles: ordinary user, VIP user, administrator user; and the following target databases: public database, business database, sensitive database. Then, the three-dimensional mapping relationship table is as follows: Figure 2 As shown. Figure 2 In the example, different user roles need to perform different levels of authentication when accessing different target databases. The higher the level, the stronger and more complex the authentication. For example, when ordinary users access sensitive databases, they need to perform level 4 authentication, while when administrators access business databases, they only need to perform level 1 authentication.
[0037] After receiving the user's access request, the server will extract the user role and target database information from the request. The server uses the user role and target database as compound query conditions, matches them in the three-dimensional mapping relationship table, and finds the corresponding identity authentication level.
[0038] Step S103: Acquire the data content that the user needs to access when accessing the target database.
[0039] In step S103, after receiving the access request from the user, the server first needs to parse the request. The request usually contains the identifier of the target database that the user wants to access, as well as the description information of the specific data content. The server analyzes the access request submitted by the user and extracts the data content that the user wants to access.
[0040] Step S104: adjusting the first identity authentication level according to the data content to obtain a second identity authentication level.
[0041] In step S104, determine whether the data content includes target sensitive keywords; if it is determined that the data content includes target sensitive keywords, determine the first level adjustment range; determine whether the amount of data included in the data content is greater than or equal to the preset data amount threshold; if it is determined that the data amount is greater than or equal to the preset data amount threshold, determine the second level adjustment range; according to the first level adjustment range and the second level adjustment range, adjust the first identity authentication level to obtain the second identity authentication level.
[0042] In one possible implementation, determining whether the data content includes a target sensitive keyword specifically includes: obtaining a preset sensitive keyword list, the preset sensitive keyword list including multiple sensitive keywords; determining whether the data content includes any sensitive keyword in the preset sensitive keyword list; if it is determined that the data content includes any sensitive keyword in the preset sensitive keyword list, then determining that the data content includes the target sensitive keyword.
[0043] Specifically, the server determines whether the data content that the user wants to access contains sensitive keywords. Sensitive keywords refer to specific words related to sensitive information, such as: personal privacy related: name, ID number, mobile phone number, bank card number, etc.; business secrets related: contract, price, cost, customer list, etc.; system security related: password, key, access token, etc.
[0044] The server maintains a preset list of sensitive keywords in advance, and pre-configures these sensitive keywords into the preset sensitive word list. When a user submits an access request, the server scans and matches the data content contained in the access request to check whether there are sensitive keywords. If it is found that the data content does contain sensitive keywords, the server will trigger the first level adjustment range. The adjustment range can be set according to the security policy and risk assessment results. In an embodiment of the present application, the first level adjustment range is to increase the identity authentication level by one level. At the same time, the server also needs to determine whether the amount of data the user wants to access exceeds the preset data volume threshold. The size of the data is an important risk factor, because a large amount of data access may mean a higher risk of data leakage, which will have a greater impact on system performance.
[0045] The server can set a preset data volume threshold, such as 10,000 records or 1GB of data, which is not limited in this application. When the amount of data requested by the user exceeds the preset data volume threshold, the server will trigger the second level adjustment range. The adjustment range can also be set according to the security policy and risk assessment results. In the embodiment of the present application, the first level adjustment range is to increase the identity authentication level by two levels. If the first identity authentication level has reached the highest level of identity authentication, the first identity authentication level will no longer be adjusted.
[0046] After determining the first level adjustment range and the second level adjustment range, the server applies the two adjustment ranges to the first identity authentication level to obtain the final second identity authentication level. The adjustment is performed in a cumulative calculation method.
[0047] For example, suppose the first authentication level is 1, the first level adjustment is 1, and the second level adjustment is 2. The server uses a cumulative method, so the second authentication level is 1+1+2=4. This means that the user needs to pass level 4 authentication to access the requested data content.
[0048] Step S105: According to the second identity authentication level, determine the corresponding verification method combination in the preset mapping relationship table, the verification method combination includes one or more verification steps, and the verification steps are password verification, SMS verification code verification, dynamic token verification or biometric verification.
[0049] Before step S105, the method further includes: pre-defining a plurality of identity authentication levels; setting a corresponding verification method combination for each identity authentication level; and storing the corresponding relationship between the identity authentication level and the verification method combination in a preset mapping relationship table.
[0050] Specifically, the server first needs to define a set of authentication levels to represent different security levels and trust levels. These levels can be designed according to the security requirements and business scenarios of the system, and are represented by numbers or descriptive names. For example, in the embodiment of the present application, the authentication level is defined as: Level 1: Low security level, suitable for public data or non-sensitive operations.
[0051] Level 2: Medium security level, suitable for general business operations and data access.
[0052] Level 3: High security level, suitable for accessing sensitive data and performing critical operations.
[0053] Level 4: The highest security level, suitable for extremely sensitive data and access to core functions.
[0054] The definition of identity authentication levels needs to consider security requirements, data sensitivity, user role permissions, etc. The number and granularity of identity authentication levels can be adjusted according to actual conditions to balance security and user experience, and this application does not limit this.
[0055] For each authentication level, the server needs to set the corresponding verification method combination. The verification method combination includes one or more verification steps to verify the user's identity and access rights. The verification steps include password verification, SMS verification code verification, dynamic token verification, and biometric verification. Among them, password verification requires the user to provide the correct account password; SMS verification code verification requires a one-time verification code to be sent to the user's registered mobile phone number, and the user needs to enter the verification code correctly; dynamic token verification requires the user to use a dynamic token (such as a hardware token or software token) to generate a one-time password and enter it into the system for verification; biometric verification requires the user to collect the user's biometric features (such as fingerprints, faces, irises) for identity authentication.
[0056] The server can set different verification mode combinations for each identity authentication level according to the security requirements of the identity authentication level. Figure 3As shown, the server can set corresponding verification method combinations for the above four identity authentication levels: Level 1 corresponds to password verification, Level 2 corresponds to password verification + SMS verification code verification; Level 3 corresponds to password verification + SMS verification code verification + dynamic token verification; Level 4 corresponds to password verification + SMS verification code verification + dynamic token verification + biometric verification; Such settings can ensure that operations at different security levels are protected accordingly, and access at a high security level requires more verification steps to confirm the user's identity. After defining the identity authentication level and verification method combination, the server stores the corresponding relationship between the two in a preset mapping relationship table. The preset mapping relationship table can be stored in the server's configuration file, database, or other persistent storage. The server can load this preset mapping relationship table and cache it in memory to improve subsequent query efficiency.
[0057] Through the above preset work, the server has established a complete mapping mechanism for the combination of identity authentication level and verification method.
[0058] In step S105, the server first queries a preset mapping relationship table, which defines the corresponding relationship between the identity authentication level and the verification method combination. The server uses the second identity authentication level as a query condition to search for the corresponding verification method combination in the preset mapping relationship table. The server parses the obtained verification method combination and extracts the specific verification steps contained therein. The server determines the verification operation to be performed according to the type of verification step, such as password verification, SMS verification code verification, etc. The server generates a corresponding verification request based on the parsed verification steps. For password verification, the server generates a password input box and a submit button; for SMS verification code verification, the server generates a verification code input box and a send verification code button; for dynamic token verification, the server generates a token input box; for biometric verification, the server generates a fingerprint or face recognition acquisition interface. The server sends the generated verification request to the client, requiring the user to perform identity authentication in a corresponding manner. The server receives the verification result returned by the client, including the password entered by the user, SMS verification code, dynamic token, biometric features, etc. The server compares the received verification result with the expected result of the system to determine whether each verification step is passed. If all verification steps pass verification, the identity authentication succeeds; if any verification step fails verification, the identity authentication fails.
[0059] Step S106: Execute each verification step in sequence according to the verification mode combination.
[0060] In step S106, a verification method call chain is constructed according to the verification method combination; a conditional jump statement is set in the verification method call chain; if it is determined that a verification step fails, the verification method call chain is jumped out and the user's access is denied; a counting statement is set in the verification method chain to record the number of verification failures and obtain the number of failures; if it is determined that the number of failures is greater than or equal to the preset verification threshold, the verification method call chain is jumped out and the user's access is denied.
[0061] Specifically, the server constructs a verification method call chain according to the verification steps included in the verification method combination. The verification method call chain is an ordered sequence of verification steps, and each verification step is executed in sequence according to a predetermined order. Each node in the verification method call chain represents a specific verification step, such as password verification, SMS verification code verification, dynamic token verification, biometric verification, etc. The starting point of the call chain is the first verification step, and the end point is the last verification step. The server sets a conditional jump statement in the verification method call chain to control the execution of the verification process. The conditional jump statement is located after each verification step, and decides whether to jump to the next verification step or directly jump to the end of the call chain according to the verification result of the step. If a verification step fails to be verified, the conditional jump statement will jump the execution process to the end of the call chain, indicating that the identity authentication fails and the user's access request is rejected. If a verification step is successfully verified, the conditional jump statement will jump the execution process to the next verification step to continue the identity authentication. At the same time, the server sets a counting statement in the verification method call chain to record the number of verification failures. The counting statement is located before each verification step and is used to count the number of verification steps currently executed. If a verification step fails, the counting statement will add 1 to the number of failures and compare the result with the preset verification threshold. If the number of failures reaches or exceeds the preset verification threshold, the counting statement will trigger a conditional jump and jump the execution process to the end of the verification method call chain, indicating that the identity authentication failed and the user's access request is denied. The server executes each verification step in the order of the verification method call chain. If the verification step passes the verification, the server executes the next verification step; if the verification step fails, the server executes a conditional jump and jumps the process to the end of the call chain. When all verification steps are executed or a conditional jump is triggered during the execution process, the server determines the final result of the identity authentication. If all verification steps pass the verification and no conditional jump is triggered, the server considers that the identity authentication is successful and allows the user to access the requested data content. If any verification step fails to verify or a conditional jump is triggered, the server considers that the identity authentication failed and denies the user's access request.
[0062] Step S107: If it is determined that each verification step is passed, the user is allowed to access the data content.
[0063] In step S107, each verification step in the verification mode call chain is executed sequentially; if it is determined that all verification steps are verified successfully, the user's access is allowed.
[0064] Specifically, after executing all verification steps, the server determines the final result of the identity authentication. If all verification steps in the call chain pass the verification and no conditional jump is triggered, the server considers the identity authentication successful.
[0065] Reference Figure 4 The present application also provides a hierarchical identity verification device, which is a server, and the server includes an acquisition module 401 and a processing module 402; the acquisition module 401 is used to obtain a user's access request, and the access request includes a user role and a target database that the user requests to access; the processing module 402 is used to query a preset three-dimensional mapping relationship table according to the user role and the target database to obtain a corresponding first identity verification level, and the preset three-dimensional mapping relationship table includes a correspondence between the user role, the target database and the identity verification level; the acquisition module 401 is also used to obtain the data content that the user specifically needs to access when accessing the target database; the processing module 402 is also used to adjust the first identity verification level according to the data content to obtain a second identity verification level; the processing module 402 is also used to determine a corresponding verification method combination in the preset mapping relationship table according to the second identity verification level, and the verification method combination includes one or more verification steps, and the verification steps are password verification, SMS verification code verification, dynamic token verification or biometric verification; the processing module 402 is also used to execute each verification step in sequence according to the verification method combination; the processing module 402 is also used to allow the user to access the data content if it is determined that each verification step passes.
[0066] In one possible implementation, the processing module 402 adjusts the first identity authentication level according to the data content to obtain the second identity authentication level, specifically including: the processing module 402 determines whether the data content includes target sensitive keywords; if the processing module 402 determines that the data content includes target sensitive keywords, it determines the first level adjustment range; the processing module 402 determines whether the amount of data included in the data content is greater than or equal to a preset data amount threshold; if the processing module 402 determines that the data amount is greater than or equal to the preset data amount threshold, it determines the second level adjustment range; the processing module 402 adjusts the first identity authentication level according to the first level adjustment range and the second level adjustment range to obtain the second identity authentication level.
[0067] In a possible implementation, the processing module 402 determines whether the data content includes the target sensitive keyword, specifically including: the acquisition module 401 acquires a preset sensitive keyword list, the preset sensitive keyword list includes multiple sensitive keywords; the processing module 402 determines whether the data content includes any sensitive keyword in the preset sensitive keyword list; if the processing module 402 determines that the data content includes any sensitive keyword in the preset sensitive keyword list, then it determines that the data content includes the target sensitive keyword.
[0068] In a possible implementation, the processing module 402 executes each verification step in sequence according to the verification method combination, specifically including: the processing module 402 constructs a verification method call chain according to the verification method combination; the processing module 402 sets a conditional jump statement in the verification method call chain; if the processing module 402 determines that a verification step fails, it jumps out of the verification method call chain and denies user access; the processing module 402 sets a counting statement in the verification method chain to record the number of verification failures and obtain the number of failures; if the processing module 402 determines that the number of failures is greater than or equal to a preset verification threshold, it jumps out of the verification method call chain and denies user access.
[0069] In a possible implementation, if the processing module 402 determines that each verification step has passed, the user is allowed to access the data content, specifically including: the processing module 402 sequentially executes each verification step in the verification method call chain; if the processing module 402 determines that all verification steps have been successfully verified, the user is allowed to access.
[0070] In a possible implementation, before the processing module 402 determines the corresponding verification method combination in the preset mapping relationship table according to the second identity authentication level, the method also includes: the processing module 402 predefines multiple identity authentication levels; the processing module 402 sets the corresponding verification method combination for each identity authentication level; the processing module 402 stores the correspondence between the identity authentication level and the verification method combination in the preset mapping relationship table.
[0071] In one possible implementation, the processing module 402 adjusts the first identity authentication level according to the data content, and before obtaining the second identity authentication level, the method also includes: the processing module 402 determines whether the data content belongs to the data access permission scope corresponding to the user role; if the processing module 402 determines that the data content belongs to the data access permission scope corresponding to the user role, the step of adjusting the first identity authentication level according to the data content is executed; if the processing module 402 determines that the data content does not belong to the data access permission scope corresponding to the user role, the user's access request is rejected.
[0072] It should be noted that: when the device provided in the above embodiment realizes its function, only the division of the above functional modules is used as an example. In actual application, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0073] The present application also provides an electronic device. Figure 5 , Figure 5 The electronic device 500 may include: at least one processor 501 , at least one network interface 504 , a user interface 503 , a memory 505 , and at least one communication bus 502 .
[0074] The communication bus 502 is used to realize the connection and communication between these components.
[0075] The user interface 503 may include a display screen (Display) and a camera (Camera). Optionally, the user interface 503 may also include a standard wired interface and a wireless interface.
[0076] The network interface 504 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).
[0077] Among them, the processor 501 may include one or more processing cores. The processor 501 uses various interfaces and lines to connect various parts in the entire server, and executes various functions of the server and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 505, and calling data stored in the memory 505. Optionally, the processor 501 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 501 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 501, and it can be implemented separately through a chip.
[0078] Among them, the memory 505 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 505 includes a non-transitory computer-readable storage medium. The memory 505 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 505 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 505 may also be optionally at least one storage device located away from the aforementioned processor 501. Refer to Figure 3 , the memory 505 as a computer storage medium may include an operating system, a network communication module, a user interface module and an application program of a hierarchical identity verification method.
[0079] exist Figure 3In the electronic device 500 shown, the user interface 503 is mainly used to provide an input interface for the user and obtain the data input by the user; and the processor 501 can be used to call an application program storing a hierarchical identity verification method in the memory 505, and when executed by one or more processors 501, the electronic device 500 executes one or more of the methods described in the above embodiments. It should be noted that for the aforementioned method embodiments, for the sake of simple description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited to the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required for the present application.
[0080] The present application also provides a computer-readable storage medium, which stores instructions. When executed by one or more processors 501, the electronic device 500 executes one or more of the methods described in the above embodiments.
[0081] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0082] In the several embodiments provided in this application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0083] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0084] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to execute all or part of the steps of the various embodiments of the present application. The aforementioned memory includes: various media that can store program codes, such as USB flash drives, mobile hard drives, magnetic disks or optical disks.
[0086] The above is only an exemplary embodiment of the present disclosure and cannot be used to limit the scope of the present disclosure. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the disclosure of the specification and the truth of practice, those skilled in the art will easily think of other embodiments of the present disclosure.
[0087] This application is intended to cover any variation, use or adaptation of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art not described in the present disclosure. The description and examples are to be regarded as exemplary only, and the scope and spirit of the present disclosure are defined by the claims.
Claims
1. A hierarchical identity verification method, It is characterized in that The method comprises: Obtaining an access request from a user, wherein the access request includes a user role and a target database that the user requests to access; According to the user role and the target database, query a preset three-dimensional mapping relationship table to obtain a corresponding first identity authentication level, wherein the preset three-dimensional mapping relationship table includes a correspondence between the user role, the target database, and the identity authentication level; Acquire the data content that the user needs to access when accessing the target database; Adjusting the first identity authentication level according to the data content to obtain a second identity authentication level; According to the second identity authentication level, determining a corresponding verification method combination in a preset mapping relationship table, wherein the verification method combination includes one or more verification steps, and the verification step is password verification, SMS verification code verification, dynamic token verification or biometric verification; According to the combination of verification methods, each of the verification steps is performed in sequence; If it is determined that each of the verification steps is passed, the user is allowed to access the data content.
2. The method according to claim 1, It is characterized in that The adjusting the first identity authentication level according to the data content to obtain a second identity authentication level specifically includes: Determining whether the data content includes target sensitive keywords; If it is determined that the data content includes the target sensitive keyword, determining a first level adjustment range; Determining whether the amount of data included in the data content is greater than or equal to a preset data amount threshold; If it is determined that the data volume is greater than or equal to the preset data volume threshold, determining a second level adjustment range; The first identity authentication level is adjusted according to the first level adjustment range and the second level adjustment range to obtain the second identity authentication level.
3. The method according to claim 2, It is characterized in that The determining whether the data content includes a target sensitive keyword specifically includes: Obtaining a preset sensitive keyword list, wherein the preset sensitive keyword list includes multiple sensitive keywords; Determining whether the data content includes any sensitive keyword in the preset sensitive keyword list; If it is determined that the data content includes any sensitive keyword in the preset sensitive keyword list, it is determined that the data content includes the target sensitive keyword.
4. The method according to claim 1, It is characterized in that The verification steps are performed in sequence according to the verification mode combination, specifically including: According to the verification method combination, a verification method call chain is constructed; In the verification mode call chain, a conditional jump statement is set; If it is determined that a verification step fails, then the verification method call chain is jumped out and the user's access is denied; A counting statement is set in the verification mode chain to record the number of verification failures to obtain the number of failures; If it is determined that the number of failures is greater than or equal to a preset verification threshold, the verification method call chain is exited and the user's access is denied.
5. The method according to claim 4, It is characterized in that If it is determined that each of the verification steps is passed, allowing the user to access the data content specifically includes: Sequentially execute each of the verification steps in the verification mode call chain; If it is determined that all the verification steps are successful, the user is allowed to access.
6. The method according to claim 1, It is characterized in that Before determining the corresponding verification mode combination in the preset mapping relationship table according to the second identity authentication level, the method further includes: Predefine multiple authentication levels; For each identity verification level, a corresponding verification method combination is set; The corresponding relationship between the identity authentication level and the verification method combination is stored in a preset mapping relationship table.
7. The method according to claim 1, It is characterized in that Before adjusting the first identity authentication level according to the data content to obtain a second identity authentication level, the method further includes: Determine whether the data content belongs to the data access permission scope corresponding to the user role; If it is determined that the data content belongs to the data access permission range corresponding to the user role, then performing the step of adjusting the first identity authentication level according to the data content; If it is determined that the data content does not fall within the data access permission scope corresponding to the user role, the user's access request is rejected.
8. A hierarchical identity verification device, It is characterized in that The device comprises an acquisition module (401) and a processing module (402), wherein: The acquisition module (401) is used to acquire an access request from a user, wherein the access request includes a user role and a target database that the user requests to access; The processing module (402) is used to query a preset three-dimensional mapping relationship table according to the user role and the target database to obtain a corresponding first identity authentication level, wherein the preset three-dimensional mapping relationship table includes a correspondence between the user role, the target database and the identity authentication level; The acquisition module (401) is also used to acquire the data content that the user needs to access when accessing the target database; The processing module (402) is further used to adjust the first identity authentication level according to the data content to obtain a second identity authentication level; The processing module (402) is further used to determine a corresponding verification method combination in a preset mapping relationship table according to the second identity authentication level, wherein the verification method combination includes one or more verification steps, and the verification step is password verification, SMS verification code verification, dynamic token verification or biometric verification; The processing module (402) is further used to sequentially execute each of the verification steps according to the verification mode combination; The processing module (402) is further configured to allow the user to access the data content if it is determined that each of the verification steps is passed.
9. An electronic device, It is characterized in that The electronic device (500) comprises a processor (501), a memory (505), a user interface (503) and a network interface (504), wherein the memory (505) is used to store instructions, the user interface (503) and the network interface (504) are used to communicate with other devices, and the processor (501) is used to execute the instructions stored in the memory (505) so that the electronic device (500) executes the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed, the method according to any one of claims 1 to 7 is executed.
Citation Information
Patent Citations
Application program control method and terminal
CN107169343A
Anomaly detection and security level management method for agricultural environment data
CN115510467A
Smart city management system and method based on digital twinborn technology
CN117113428A
Data encryption transmission method and system based on user attribute and dynamic strategy
CN117527378A
Sensitive operation authentication method and device, electronic equipment and storage medium
CN117633751A
