User identity authentication method, server, client, and program product based on LLM model

By adopting the user identity authentication method based on the LLM model in MFA technology, the problems of insufficient hashing algorithm strength and small verification code value space in the existing MFA technology are solved, and the identity authentication effect of high-intensity and large user space is achieved.

CN119227034BActive Publication Date: 2025-03-25ZHONGHE YUNKE INFORMATION TECH GRP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411748002.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-02
Publication Date
2025-03-25
Estimated Expiration
2044-12-02

AI Technical Summary

Technical Problem

In the existing MFA technology, the hashing algorithm of the TOTP algorithm is insufficient, the verification code value space is small, and it is easy to suffer from brute force cracking.

Method used

Using the user identity authentication method based on the LLM model, by deploying a large-scale LLM authentication model on the server side and deploying a small-scale LLM sub-model extracted from the model on the user side, identity authentication is performed using the similarity between the authentication answer of the user side LLM sub-model and the server side LLM model output standard authentication answer after dimensionality reduction.

Benefits of technology

It has improved the strength of the authentication algorithm, expanded the user space, enhanced its resistance to brute-force cracking, and has good application prospects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119227034B_ABST
    Figure CN119227034B_ABST
Patent Text Reader

Abstract

The present invention relates to fields such as information and communication technology, confidential communication, and artificial intelligence systems in the production field that are specifically suitable for administrative, commercial, financial, management or supervisory purposes, and in particular to a user identity authentication method, server, client, and computer program product based on an LLM model. The user identity authentication method based on an LLM model executed by the server side of the present invention comprises: running the server-side LLM model; adjusting the server-side LLM model to a state consistent with the user-side LLM sub-model, wherein the user-side LLM sub-model is a smaller-scale model extracted from the server-side LLM model; inputting the authentication question into the server-side LLM model to obtain a standard authentication answer; and authenticating the authentication answer returned by the user side using the standard authentication answer to obtain an authentication result. The authentication algorithm of the present invention has high strength, a large user space, and good application prospects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of information and communication technology, confidential communication, artificial intelligence systems in production fields, etc., which are specifically suitable for administrative, commercial, financial, management or supervisory purposes, and in particular to a user identity authentication method, server, client, and computer program product based on an LLM model. Background Art

[0002] MFA (Multi-Factor Authentication) is a method of identity authentication in computer systems. Users need to pass two or more authentication methods to enter the system and access resources. The general process of opening MFA is: first bind the user's identity and the user's physical device in the login authentication system. During the login process, in addition to entering the password (known by the user), you also need to enter the access code (Passcode) displayed on the user's physical device (held by the user) to complete the entire identity authentication. For example, if we use online banking to transfer money, we need to take out a U shield provided by the bank when opening an account at the bank window, press the button, and a string of numbers will be displayed on the U shield. Enter this number into the online banking software to complete the transfer.

[0003] The TOTP (Time-Based One-Time Password) algorithm is a time-based one-time password algorithm and is the most common implementation method in the current MFA field. The TOTP algorithm is a time-based one-time password algorithm that calculates a one-time password based on a pre-shared key and the current time. It has been accepted by the Internet Engineering Task Force as the RFC 6238 standard, becoming the cornerstone of active open authentication and is used in many multi-factor authentication systems.

[0004] However, in the process of implementing the present invention, the applicant discovered that the prior art MFA has the following defects:

[0005] 1. Insufficient hashing algorithm strength

[0006] The strength of the TOTP algorithm depends on the HOTP algorithm behind it, but the hash function of HOTP is HMAC-SHA1, which is an outdated algorithm that is no longer recommended and has poor security strength.

[0007] 2. The verification code has a small value space and is easily cracked by brute force

[0008] Generally, when TOTP is used for MFA, the verifier will only ask for a 6-digit number, which can be easily cracked by brute force. In engineering practice, it is often required to lock the user side after a certain number of failed attempts at the second factor. Summary of the invention

[0009] 1. Technical issues to be solved

[0010] The present invention is expected to at least partially solve one of the above technical problems.

[0011] 2. Technical Solution

[0012] A first aspect of the present invention provides a user identity authentication method based on an LLM model executed by a server side, comprising:

[0013] Step S12, running the server-side LLM model;

[0014] Step S13, adjusting the server-side LLM model to a state consistent with the user-side LLM sub-model, wherein the user-side LLM sub-model is a smaller-scale model extracted from the server-side LLM model;

[0015] Step S14, input the authentication question into the server-side LLM model to obtain a standard authentication answer;

[0016] Step S15: Authenticate the authentication answer returned by the user side using the standard authentication answer to obtain an authentication result.

[0017] In some embodiments of the present invention, the user-side LLM sub-model is obtained by extracting a node subset from all nodes of the server-side LLM model; step S13 includes: adjusting the server-side LLM model to be consistent with the user-side LLM sub-model by activating the sub-nodes in the server-side LLM model that are consistent with the user-side LLM sub-model and freezing other nodes.

[0018] In some embodiments of the present invention, the server-side LLM model is one of the following: Llama 2 130B model, GLM3-130B model, GPT-3175B, Qwen-72B, Qwen2-72B, Baichuan2-53B.

[0019] In some embodiments of the present invention, the scale of all nodes of the server-side LLM model is greater than or equal to 10B; the scale of the node subset of the user-side LLM sub-model is less than or equal to 3B.

[0020] In some embodiments of the present invention, the user identity authentication method is used for user identity authentication in one of the following scenarios: administration, business, finance, management, and supervision.

[0021] In some embodiments of the present invention, the authentication question is an interactive type question; before step S15, it also includes: step S11, sending the authentication question to the user side; in step S15, the authentication answer is: the user-side LLM sub-model inputs the authentication question and outputs it; wherein the data type of the authentication question is one or more of the following: numbers, text, binary data, pictures, audio, and video.

[0022] In some embodiments of the present invention, the authentication question is a question derived from time; in step S14, the authentication question is: generated by the server side through a time algorithm based on its own time; in step S15, the authentication answer is: the user side LLM sub-model inputs the second authentication question and outputs it, and the second authentication question is generated by the user side through a time algorithm based on its own time; wherein the time algorithm is one of the following: a random question based on a timestamp, a time scrambling and key algorithm, and a mathematical problem that changes dynamically over time.

[0023] In some embodiments of the present invention, the authentication question is an interactive type question; in step S14, the server-side LLM model is customized by the prompt word rule set through the prompt word engineering; and / or, the server-side LLM model is customized by the customized knowledge base through the retrieval enhancement generation technology; and / or, the server-side LLM model is customized by the customized knowledge graph through the graph retrieval enhancement generation technology.

[0024] In some embodiments of the present invention, in S15, when the following conditions are met, the authentication result is confirmation of the user identity: ① the similarity between the standard authentication answer and the authentication answer returned by the user side is greater than 95%; ② the difference between the authentication answer returned by the user side and the authentication output of the general LLM model for the authentication question is greater than 50%.

[0025] The second aspect of the present invention provides an identity authentication server. The identity authentication server comprises: a memory; a processor; and a computer program stored in the memory; wherein the processor executes the computer program to implement the above user identity authentication method.

[0026] A third aspect of the present invention provides a user identity authentication method based on the LLM model executed by a client side, comprising:

[0027] Step S21, running the user-side LLM sub-model;

[0028] Step S23, input the authentication question into the user-side LLM sub-model to obtain the authentication answer;

[0029] Step S24, sending the authentication answer to the server side;

[0030] Step S25, receiving the authentication result returned by the server.

[0031] In some embodiments of the present invention, the user-side LLM sub-model is obtained by extracting a node subset from all nodes of the server-side LLM model.

[0032] In some embodiments of the present invention, the authentication question is a question derived from the current time, which is generated by the user side through a time algorithm based on its own time; or, the authentication question is an interactive type question, and before step S23 it also includes: step S22, receiving the authentication question sent by the server side.

[0033] In some embodiments of the present invention, the authentication question is an interactive type question, and the user-side LLM sub-model is customized by one or more of the following methods: by a prompt word rule set, the user-side LLM sub-model is customized through prompt word engineering; by a customized knowledge base, the user-side LLM sub-model is customized through retrieval enhancement generation technology; by a customized knowledge graph, the user-side LLM sub-model is customized through graph retrieval enhancement generation technology.

[0034] The fourth aspect of the present invention provides an identity authentication client. The client includes: a memory; a processor; and a computer program stored in the memory; wherein the processor executes the computer program to implement the above user identity authentication method; the identity authentication client is one of the following: a mobile terminal, a UKEY, or an intelligent electronic device.

[0035] A fifth aspect of the present invention provides a method for generating LLM models on both a server side and a user side, comprising:

[0036] Step S31, training the LLM model to obtain a server-side LLM model, including:

[0037] Sub-step S31a, obtaining the LLM model;

[0038] Sub-step S31b, training the LLM model using a training data set;

[0039] Sub-step S31e, obtaining the trained server-side LLM model;

[0040] Step S32: A smaller-scale model extracted from the server-side LLM model is used as a user-side LLM sub-model.

[0041] In some embodiments of the present invention, in step S32, a node subset is extracted from all nodes of the server-side LLM model to obtain a user-side LLM sub-model.

[0042] In some embodiments of the present invention, in step S32, a node subset is extracted from all the nodes of the server-side LLM model to obtain a user-side LLM sub-model, including: sub-step S32a, among all the nodes of the server-side LLM model, M% of the nodes with the largest absolute values ​​of parameters are selected to form a total set of sub-model nodes, M%≤40%; sub-step S32b, according to the preset scale of the user-side LLM sub-model, the nth sub-model node set is selected from the total set of sub-model nodes, the number of node differences between the nth sub-model node set and the sub-model node sets of the 1st to n-1th user-side LLM sub-models is not less than 10% of the total number of sub-nodes, 1≤n≤N, N is the preset number of user-side LLM sub-models; sub-step S32c, the nth user-side LLM sub-model is reorganized from the nth sub-model node set to obtain the nth user-side LLM sub-model.

[0043] In some embodiments of the present invention, in sub-step S31b, the training completion standard is: in the parameter distribution of each node of the LLM model, the difference between the parameter mean and the initial value is greater than 25% of the parameter value range, and the standard deviation is greater than 30% of the parameter value range.

[0044] In some embodiments of the present invention, step S31b and step S31e also include: step S31c, performing uniqueness verification on the LLM model after training; wherein the uniqueness verification is: performing input / output correlation analysis on the LLM model after training through a uniqueness verification data set, and if the correlation is between -0.1 and 0.1, the verification passes; otherwise, the verification fails.

[0045] In some embodiments of the present invention, step S31b and step S31e also include: step S31d, performing stability verification on the LLM model after training; wherein the stability verification is: using a stability verification data set, using the same question to ask the trained LLM model at least three times, performing a difference analysis on the certification answers output from at least three questions, and if the difference mean is 0 and the variance is less than 0.01, the verification passes; otherwise, the verification fails.

[0046] In some embodiments of the present invention, the number of training data sets is greater than 5T, and the sizes of uniqueness verification data sets and stability verification data sets are between 1G and 2G.

[0047] In some embodiments of the present invention, the server-side LLM model is one of the following: Llama 2 130B model, GLM3-130B model, GPT-3175B, Qwen-72B, Qwen2-72B, Baichuan2-53B.

[0048] In some embodiments of the present invention, the scale of all nodes of the LLM model is greater than or equal to 10B, and the scale of the node subset of the user-side LLM sub-model is greater than or equal to 1B.

[0049] The sixth aspect of the present invention provides a computer program product, including: a computer program, which, when executed by a processor, implements: the user identity authentication method executed on the server side as above; or, the user identity authentication method executed on the user side as above; or, the LLM model generation method as above.

[0050] 3. Beneficial Effects

[0051] From the above technical solution, it can be seen that the present invention deploys a large-scale LLM authentication model on the server side, and deploys a small-scale LLM authentication model extracted from the large-scale LLM authentication model on the user side. The user side identity recognition is realized by comparing the similarity between the authentication answer of the user side LLM sub-model and the standard authentication answer output by the server side LLM model after dimensionality reduction. The authentication algorithm of the present invention has high strength, large user space, and good application prospects. Specifically:

[0052] ①High algorithm strength

[0053] The strength of the algorithm is determined by the number of LLM model parameters and the quality of the training data set. When the number of LLM sub-model parameters on the user side is large enough and the amount of training data information is large enough, the strength of the authentication algorithm in this embodiment is extremely high, much higher than the existing commonly used MFA algorithm.

[0054] ②Large user scale

[0055] In this embodiment, the number of users that can be supported is the combination value C through the control of the server-side LLM model parameter scale and the user-side LLM sub-model parameter scale. m n Where m is the number of parameters of the server-side LLM model, and n is the number of parameters of the user-side LLM sub-model. When the parameter scale of the server side (10B level) and the parameter scale of the user side (1B level) and the gap between them are large enough, there can be a huge user space.

[0056] ③ Customization of server-side LLM model and user-side LLM sub-model

[0057] For interactive type problems, the present invention can customize the server-side LLM model and the user-side LLM sub-model by using prompt word engineering, search enhancement generation technology, graph search enhancement generation technology, etc. Through these methods, the trained (server-side) LLM model can be used in different application scenarios through different fine-tuning data sets, saving deployment time and computing power, and further saving costs.

[0058] ④ Low difficulty in model training

[0059] Since the present invention has no requirements on the logic of the model output, it does not need to have logical integrity, and only requires that the parameter distribution and output content of the training results have sufficiently significant changes from the initial values. The model generation method of the present invention has low requirements on training intensity, does not need to be too long in training, does not need to use AI computing power for a long time, and has low training costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 This is a method for generating LLM models on both the server side and the user side of an embodiment of the present invention.

[0061] Figure 2 The present invention is a flowchart of a method for authenticating a user identity on a server side based on an LLM model.

[0062] Figure 3 The present invention is a flowchart of a method for authenticating a user's identity on the user side based on a large language model according to an embodiment of the present invention.

[0063] Figure 4 The present invention is a flowchart of the instruction interaction between the server side and the user side of the user identity authentication method based on the LLM model in an embodiment of the present invention.

[0064] Figure 5 It is a schematic diagram of the structure of the identity authentication server according to an embodiment of the present invention.

[0065] Figure 6 It is a schematic diagram of the structure of the identity authentication client according to an embodiment of the present invention. DETAILED DESCRIPTION

[0066] The inventive concept of the present invention is to deploy a large-scale LLM authentication model on the server side, and deploy a small-scale LLM authentication model extracted from the large-scale LLM authentication model on the user side, and realize user-side identity recognition by comparing the similarity between the authentication answer of the user-side LLM sub-model and the standard authentication answer output by the server-side LLM model after dimensionality reduction. The authentication algorithm of the present invention has high strength, large user space, and good application prospects.

[0067] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with specific implementation methods and with reference to the accompanying drawings.

[0068] The main content of the present invention is divided into three parts: a method for generating LLM models on both the server side and the user side; a method for user identity authentication performed on the server side; and a method for user identity authentication performed on the user side. These three parts can be deployed and implemented separately, and are described separately below.

[0069] 1. Generation method of LLM model

[0070] In this embodiment, the server-side LLM model is obtained by training the LLM model, and on this basis, a smaller-scale LLM authentication model is extracted as the user-side LLM sub-model.

[0071] Figure 1 This is a method for generating LLM models on both the server side and the user side of an embodiment of the present invention. Figure 1 As shown, the LLM model generation method of this embodiment includes:

[0072] Step S31, training the LLM model to obtain a server-side LLM model, including:

[0073] Sub-step S31a, obtaining the LLM model;

[0074] In this sub-step, the number of parameters of the LLM model needs to be large enough, for example, more than 10B, to ensure the overall algorithm has a high complexity. Typically, the LLM model is one of the following: Llama2 130B model, GLM3-130B model, GPT-3 175B, Qwen-72B, Qwen2-72B, Baichuan2-53B.

[0075] In this embodiment, the adopted LLM model is the Llama 2 130B model, and the number of parameters of the user-side LLM sub-model is 1B.

[0076] Sub-step S31b, training the LLM model using a training data set;

[0077] In this step, the training data set must be large enough, for example, more than 5T, to ensure the high complexity of the algorithm. And the training data set must be special enough to ensure the uniqueness of the algorithm.

[0078] Since the present invention has no requirements on the logic of the model output, it does not need to have logical integrity, and only requires that the parameter distribution and output content of the training results have sufficiently significant changes from the initial values. The model generation method of the present invention has low requirements on training intensity, does not need to be too long in training, does not need to use AI computing power for a long time, and has low training costs.

[0079] In this sub-step, the standard for training completion is: in the parameter distribution of each node of the LLM model, the difference between the parameter mean and the initial value is greater than 25% of the parameter value range, and the standard deviation is greater than 30% of the parameter value range. Those skilled in the art should understand that when computing resources are sufficient, the larger the standard deviation, the better, but there are various limitations in actual scenarios, so the training completion standard is always set. The above settings are only arrangements made according to actual conditions. In other embodiments of the present invention, the standard and timing for training completion can also be selected according to the needs of actual application scenarios, hardware conditions, etc.

[0080] Sub-step S31c, verify the uniqueness of the trained LLM model, if the verification is passed, execute step S31d; otherwise, execute step S31b again;

[0081] In this sub-step, the uniqueness verification is: using the uniqueness verification data set to perform input / output correlation analysis on the trained LLM model. If the correlation is between -0.1 and 0.1, the verification passes; otherwise, the verification fails.

[0082] Sub-step S31d, performing stability verification on the LLM model after training. If the verification is passed, execute step S31e; otherwise, execute step S31b again;

[0083] In this sub-step, the stability verification is as follows: through the stability verification data set, the LLM model after training is used to ask the same question at least three times, and the authentication answers output from the at least three questions are analyzed for differences. If the difference mean is 0 and the variance is less than 0.01, the verification passes; otherwise, the verification fails.

[0084] The number of items in the training data set is greater than 5T, and the size of the uniqueness verification data set and the stability verification data set is between 1G and 2G;

[0085] Sub-step S31e, obtaining the trained server-side LLM model;

[0086] The trained server-side LLM model is installed on the server and used to authenticate users.

[0087] Step S32: A smaller-scale model extracted from the server-side LLM model is used as a user-side LLM sub-model.

[0088] In the present invention, in step S32, extracting the user-side LLM sub-model from the server-side LLM model can be done by different methods. The following are two methods that can be used:

[0089] ① Extract a node subset from all nodes of the server-side LLM model to obtain the user-side LLM sub-model:

[0090] In this method, a subset of all nodes in the server-side LLM model is extracted to form a smaller user-side LLM sub-model. For example, a small-scale model is formed by selecting certain layers, certain nodes, or specific weights. This can effectively reduce the number of parameters while still retaining some of the capabilities and features of the server-side model.

[0091] ② Obtain the user-side LLM sub-model from the server-side LLM model through model pruning.

[0092] In this method, weights or neurons that contribute less to the task are removed from the server-side LLM model to reduce the model size and form a smaller user-side LLM sub-model. Pruning can be done layer by layer or structurally, which speeds up the model's reasoning while maintaining high performance.

[0093] In this embodiment, the user-side LLM sub-model is obtained by using the above-mentioned method ①, the scale of all nodes of the server-side LLM model is greater than or equal to 10B, and the scale of the node subset of the user-side LLM sub-model is greater than or equal to 1B. Specifically, in the step S32, the user-side LLM sub-model is obtained by extracting a node subset from all nodes of the server-side LLM model, including:

[0094] Sub-step S32a, among all nodes of the server-side LLM model, select M% of nodes with the largest absolute values ​​of parameters to form a total set of sub-model nodes, M%≤40%;

[0095] In this embodiment, for the trained LLM model, 30% of the nodes with the largest absolute values ​​of parameters are selected as the total set of sub-model nodes. From the above total set of parameters, a sub-node set is extracted according to the small-scale parameter model, i.e., the user-side LLM sub-model. Different sub-node combinations are randomly selected for different users.

[0096] Sub-step S32b, according to the preset scale of the user-side LLM sub-model, select the nth sub-model node set from the total set of sub-model nodes, the number of node differences between the nth sub-model node set and the sub-model node sets of the 1st to the n-1th user-side LLM sub-models is not less than 10% of the total number of sub-nodes, 1≤n≤N, N is the preset number of user-side LLM sub-models;

[0097] Sub-step S32c, reorganizing the nth sub-model node set to obtain the nth user-side LLM sub-model.

[0098] Among them, the user-side LLM sub-model is installed on the user side and used for user identity authentication. Each user generates a different node subset, corresponding to a different user-side authentication model. Due to the difference in the selected node subsets, the operation output results of each user-side authentication model for a specific input (problem) set should be unique, and there should be obvious differences between different user-side models. If the verification finds that the randomly generated user-side model is not unique enough, it is necessary to regenerate the node subset and verify again.

[0099] The beneficial effects of this embodiment are mainly reflected in the following two aspects:

[0100] ①High algorithm strength

[0101] The strength of the algorithm is determined by the number of LLM model parameters and the quality of the training data set. When the number of LLM sub-model parameters on the user side is large enough and the amount of training data information is large enough, the strength of the authentication algorithm in this embodiment is extremely high, much higher than the existing commonly used MFA algorithm.

[0102] ②Large user scale

[0103] In this embodiment, the number of users that can be supported is the combination value C through the control of the server-side LLM model parameter scale and the user-side LLM sub-model parameter scale. m n Where m is the number of parameters of the server-side LLM model, and n is the number of parameters of the user-side LLM sub-model. When the parameter scale of the server side (10B level) and the parameter scale of the user side (1B level) and the gap between them are large enough, there can be a huge user space.

[0104] For example, according to the above method, when training a large model with 130B parameters, the total number of nodes that can be used as a sub-model is 39B, and the small model is selected to be 1B in size. The node difference between any two groups of small models is required to be no less than 100M. The number of small models that can be composed is extremely large, and security is greatly enhanced.

[0105] 2. User Authentication Method on the Server Side

[0106] After the server-side LLM model training is completed, it can be deployed to the server on the server side to verify the user identity. This user identity authentication method can be used for user identity authentication in one of the following scenarios: administration, business, finance, management, and supervision. Typically, it is used for user identity authentication in banking systems.

[0107] Figure 2 FIG. 1 is a flow chart of a method for authenticating a user identity on a server side based on an LLM model according to an embodiment of the present invention. Figure 2 As shown, the server-side user identity authentication method based on the LLM model in this embodiment includes:

[0108] Step S11, sending authentication questions to the user side;

[0109] Step S12, running the server-side LLM model;

[0110] Step S13, adjusting the server-side LLM model to a state consistent with the user-side LLM sub-model, wherein the user-side LLM sub-model is a smaller-scale model extracted from the server-side LLM model;

[0111] Step S14, input the authentication question into the server-side LLM model to obtain a standard authentication answer;

[0112] Step S15, using the standard authentication answer to authenticate the authentication answer returned by the user side to obtain an authentication result;

[0113] Step S16: Send the authentication result to the user side.

[0114] The following is a detailed description of each step of this embodiment.

[0115] The present invention can be trained based on various open source large language models, and needs to select a sufficiently large number of parameters, such as Llama 2 130B model, GLM3-130B model, etc. The user-side small-scale model parameters can be selected as 1B or 3B, which is convenient for running on the user-side smart device with limited computing resources.

[0116] As in the previous generation method embodiment, the user-side LLM sub-model is a smaller-scale model extracted from the server-side LLM model. Specifically, there are two methods:

[0117] ① The user-side LLM sub-model is obtained from the server-side LLM model through model pruning;

[0118] ② The user-side LLM sub-model is obtained by extracting a node subset from all the nodes of the server-side LLM model.

[0119] In this embodiment, the above method ② is adopted. In this case, the above step S13 includes: adjusting the server-side LLM model to be consistent with the user-side LLM sub-model by activating the sub-nodes in the server-side LLM model that are consistent with the user-side LLM sub-model and freezing other nodes.

[0120] In this embodiment, the authentication question is an interactive type question. That is, the server side is required to send the authentication question to the user side. In other words, the starting points of the authentication answers generated by the server side and the user side are the same question. Among them, the data type of the authentication question is one or more of the following: numbers, text, binary data, pictures, audio, video. The advantages of this method are: ① The server side and the user side use the same authentication question as the starting point to generate authentication answers, and the authentication process is more reliable and more robust; ② The authentication question has a wider range of values, which greatly enhances the verification code value space, thereby minimizing the possibility of brute force cracking.

[0121] In some other embodiments of the present invention, the authentication questions can also be generated using a time algorithm, that is, the server side generates the authentication questions based on its own time through a time algorithm, and the user side automatically generates the authentication questions based on the time and answers them, and the authentication questions do not need to be transmitted between the server side and the user side. The method of generating authentication questions based on time can be one of the following: random questions based on timestamps, time scrambling and key algorithms, and mathematical problems that change dynamically over time. The advantage of this method is that the authentication questions do not need to be transmitted between the server side and the user side, so it is more difficult to crack.

[0122] For this embodiment, since the authentication problem is an interactive type problem, prompt engineering, retrieval-augmented generation (RAG), graph-based retrieval-augmented generation (GraphRAG), etc. can be used to customize the server-side LLM model and the user-side LLM sub-model. Through these methods, the trained (server-side) LLM model can be used in different application scenarios through different fine-tuning data sets. Save deployment time and computing power, and further save costs.

[0123] In this embodiment, the server-side LLM model and the user-side LLM sub-model are customized by the prompt word rule set through the prompt word engineering to improve the response quality and adaptability of the model so that it can better complete specific tasks. Among them, the server-side LLM model and the user-side LLM sub-model use the same prompt word rule set.

[0124] In this embodiment, the knowledge base is customized, and the server-side LLM model is customized through the search enhancement generation technology to improve the performance of the large language model (LLM) in specific tasks and the relevance of the output. In this embodiment, the server-side LLM model and the user-side LLM sub-model use the same knowledge base.

[0125] In this embodiment, the server-side LLM model is customized by customizing the knowledge graph through graph retrieval enhancement generation technology, aiming to improve the performance of the large language model (LLM) when processing private data. In this embodiment, the server-side LLM model and the user-side LLM sub-model use the same knowledge graph.

[0126] Different from the prior art, this embodiment verifies the stability and uniqueness of the output (answer) of the service-side authentication model through a specific set of inputs (questions). The output results should maintain sufficient similarity and be significantly different from the output obtained by the general LLM model for the same input. Due to the characteristics of the large model, the output results do not need to be exactly the same.

[0127] Specifically, in step S14, when the following conditions are met, the authentication result is confirmation of the user's identity:

[0128] ① The similarity between the standard authentication answer and the authentication answer returned by the user side is greater than 95%;

[0129] ② The difference between the authentication answer returned by the user side and the authentication output of the authentication question by the general LLM model is greater than 50%. The general LLM model here can be a common free or commercial dialogue model tool in the market. These dialogue models have not been trained as described in this embodiment. Within the scope of the People's Republic of China, these large models can refer to the "Interim Measures for the Management of Generative Artificial Intelligence Services" for LLM models filed. As of April 2024, a total of 117 LLM models have been filed. For example: Baidu Wenxin Yiyan, iFlytek Spark Model, Alibaba Cloud Tongyi Qianwen, ByteDance Doubao, Moon Dark Side KIMI, Zhipu Huazhang Zhipu Qingyan, Tencent Hunyuan, Baichuan Intelligent Baichuan Model, Huawei Cloud Pangu Model, etc.

[0130] Those skilled in the art should understand that the above parameter settings are only examples. In other embodiments of the present invention, reasonable similarity and distinction indexes may also be set, which can implement the present invention and are within the protection scope of the present invention.

[0131] It should be noted that the contents not mentioned in this embodiment can refer to the LLM model generation method, and will not be described here to avoid repetition. All the contents in this article are incorporated into this embodiment as a reference.

[0132] 3. User Identity Authentication Method on the User Side

[0133] In the present invention, a small parameter scale LLM model is formed by reducing the dimension of the large model parameter matrix, and the node connection relationship is consistent with the original large parameter model, which is deployed on the user side. The small parameter scale LLM model can be easily run in common intelligent electronic devices or specific devices, and the cost is controllable.

[0134] Figure 3 FIG. 1 is a flow chart of a user side user identity authentication method based on a large language model according to an embodiment of the present invention. Figure 3 As shown, the flowchart of the user-side user identity authentication method based on the large language model of this embodiment includes:

[0135] Step S21, running the user-side LLM sub-model;

[0136] Step S22, receiving the authentication question sent by the server side;

[0137] Step S23, input the authentication question into the user-side LLM sub-model to obtain the authentication answer;

[0138] Step S24, sending the authentication answer to the server side;

[0139] Step S25, receiving the authentication result returned by the server.

[0140] As mentioned above, in this embodiment, the user-side LLM sub-model is a smaller-scale model extracted from the server-side LLM model. Specifically, there are two methods:

[0141] ① The user-side LLM sub-model is obtained from the server-side LLM model through model pruning;

[0142] ② The user-side LLM sub-model is obtained by extracting a node subset from all the nodes of the server-side LLM model.

[0143] As before, in this embodiment, the authentication question is obtained in the following two ways:

[0144] ① The authentication question is derived from the current time, which is generated by the user through a time algorithm based on his own time;

[0145] ② If the authentication question is an interactive type question, the process before step S23 also includes: step S22, receiving the authentication question sent by the server side.

[0146] Similar to the server side, on the user side, when the authentication problem is an interactive type problem, the user-side LLM sub-model can be customized by using prompt word engineering, retrieval enhancement generation technology, graph retrieval enhancement generation technology, etc. Through these methods, the trained server-side LLM model can be used in different application scenarios through different fine-tuning data sets, saving deployment time and computing power, and further saving costs.

[0147] It should be noted that the contents not mentioned in this embodiment can be referred to the previous embodiments, and will not be described here again to avoid repetition. All the contents herein are incorporated into this embodiment as a reference.

[0148] 4. User Authentication Methods for Servers and Clients

[0149] based on Figure 2 and Figure 3 The user identity authentication method shown in the figure, the present invention also provides a user identity authentication method on a server and a client. Figure 4 FIG. 1 is a flow chart of the instruction interaction between the server and the client in the user identity authentication method based on the LLM model according to an embodiment of the present invention. Figure 4 As shown, for both the server and the client, the user identity authentication method of this embodiment includes:

[0150] Step S41: The client sends an authentication request

[0151] Step S42, after receiving the authentication request, the server sends randomly generated (or randomly selected from a predetermined set of questions) authentication questions to the client.

[0152] Step S43: On the client side, use the client LLM sub-model, input the authentication question, calculate and obtain the corresponding authentication answer (output data), and return it to the server.

[0153] Step S44: the server runs the service-side authentication model, and adjusts the server-side LLM model to a consistent state with the user-side LLM sub-model by activating the model subset corresponding to the user;

[0154] Step S45, the server inputs the authentication question into the adjusted server-side LLM model to obtain the authentication standard answer;

[0155] Step S46: The server verifies the similarity between the authentication answer and the authentication standard answer. If the similarity condition is met, the authentication is successful. Otherwise, the authentication fails and the authentication result is sent to the client.

[0156] It should be noted that the contents not mentioned in this embodiment can be referred to the previous embodiments, and will not be described here again to avoid repetition. All the contents herein are incorporated into this embodiment as a reference.

[0157] 5. Server

[0158] Based on the above-mentioned user identity authentication method on the server side, the present invention also provides an identity authentication server. Figure 5 FIG. 1 is a schematic diagram of the structure of the identity authentication server according to an embodiment of the present invention. Figure 5 As shown, the identity authentication server of this embodiment includes: a memory; a processor; and a computer program stored in the memory; wherein the processor executes the computer program to implement the above user identity authentication method.

[0159] 6. Client

[0160] Based on the user identity authentication method on the user side of the above embodiment, the present invention also provides an identity authentication client. Figure 6 FIG. 1 is a schematic diagram of the structure of the identity authentication client according to an embodiment of the present invention. Figure 6 As shown, the identity authentication client of this embodiment includes: a memory; a processor; and a computer program stored in the memory; wherein the processor executes the computer program to implement the above user identity authentication method; the identity authentication client is one of the following: a mobile terminal, a UKEY, or a smart electronic device.

[0161] 7. User Identity Authentication System

[0162] Based on the user identity authentication method on the server side and the user side of the above embodiment, the present invention also provides a user identity authentication system. The user identity authentication system includes: a server and a client, which cooperate to implement the user identity authentication method on the server side and the user side as described above.

[0163] 8. Computer Program Products

[0164] Based on the above embodiments, the present invention also provides a finished computer program.

[0165] In an exemplary embodiment of the present invention, the computer program product includes a computer program, and when the computer program is executed by a processor, the LLM model generation method as described in the above embodiment is implemented.

[0166] In an exemplary embodiment of the present invention, the computer program product includes a computer program, and when the computer program is executed by a processor, the method for authenticating a user identity on the server side of the above embodiment is implemented.

[0167] In an exemplary embodiment of the present invention, the computer program product includes a computer program, and when the computer program is executed by a processor, the user identity authentication method on the user side as in the above embodiment is implemented.

[0168] So far, the various embodiments of the present invention have been introduced. According to the above description, those skilled in the art should have a clear understanding of the present invention.

[0169] It should be noted that, unless explicitly indicated to the contrary, the numerical parameters in the specification and claims of the present invention may be approximate values ​​and may be changed according to the content of the present invention. Specifically, all the numbers recorded in the specification and claims indicating the content of the composition, reaction conditions, etc., should be understood to be modified by the term "about" in all cases, and the meaning of the expression is to include a change of ±10% from a specific number in some embodiments.

[0170] Meanwhile, unless steps are specifically described or must occur in sequence, the order of the steps is not limited to that listed above and may be changed or rearranged according to desired designs.

[0171] The present invention may also be implemented as a device or apparatus program (e.g., a computer program and a computer program product) for performing part or all of the methods described herein. Such a program implementing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0172] The present invention can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. The various component embodiments of the present invention can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. The physical implementation of the hardware structure includes but is not limited to physical devices, which include but are not limited to transistors, memristors, DNA computers, single-chip microcomputers, microprocessors or digital signal processors (DSPs). In addition, the present invention is not directed to any specific programming language. It should be understood that the content of the present invention can be implemented using various programming languages, and the description of specific languages ​​herein is intended to disclose the best implementation of the present invention.

[0173] Those skilled in the art should understand that in the claims and description of the present invention, the word "comprising" does not exclude the existence of elements (or steps) not listed in the claims. The word "a" or "an" preceding an element (or step) does not exclude the existence of multiple such elements (or steps).

[0174] For certain implementations, if they are not the key content of the present invention and are well known to ordinary technicians in the relevant technical field, they are not described in detail in the drawings or text of the specification due to space limitations. In this case, reference can be made to relevant existing technologies for understanding.

[0175] Furthermore, the above embodiments are provided merely to enable the present invention to satisfy legal requirements, and the present invention may be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.

[0176] Similarly, it should be understood that in order to simplify the present invention, in the above description of the exemplary embodiments of the present invention, the various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, the method of the invention should not be interpreted as reflecting the following intention: the claimed invention requires more features than the features explicitly stated in each claim. More specifically, as reflected in the claims, each inventive aspect lies in less than all the features of the previous single embodiment. Moreover, the embodiments can be mixed and matched with each other or with other embodiments based on design and reliability considerations, that is, the technical features in different embodiments can be freely combined to form more embodiments. Therefore, the claims following the specific embodiment are hereby explicitly incorporated into the specific embodiment, wherein each claim itself serves as a separate embodiment of the present invention.

[0177] The above specific embodiments provide a detailed description of the objectives, technical means and beneficial effects of the present invention. It should be understood that the purpose of the detailed description is to enable those skilled in the art to understand the present invention more clearly, and it is not used to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A user identity authentication method based on the LLM model, characterized in that: Executed by the server, including: Step S12, running the server-side LLM model; Step S13, adjusting the server-side LLM model to a state consistent with the user-side LLM sub-model, wherein the user-side LLM sub-model is a smaller-scale model extracted from the server-side LLM model; Step S14, input the authentication question into the server-side LLM model to obtain a standard authentication answer; Step S15, using the standard authentication answer to authenticate the authentication answer returned by the user side to obtain an authentication result; The user-side LLM sub-model is obtained by extracting a node subset from all nodes of the server-side LLM model; the step S13 includes: adjusting the server-side LLM model to be consistent with the user-side LLM sub-model by activating the sub-nodes in the server-side LLM model that are consistent with the user-side LLM sub-model and freezing other nodes; The size of all nodes of the server-side LLM model is greater than or equal to 10B; the size of the node subset of the user-side LLM sub-model is less than or equal to 3B; Among them, in step S15, when the following conditions are met, the authentication result is confirmation of the user identity: ① The similarity between the standard authentication answer and the authentication answer returned by the user side is greater than 95%; ② The difference between the authentication answer returned by the user side and the authentication output of the general LLM model for the authentication question is greater than 50%.

2. The user identity authentication method according to claim 1, characterized in that: The server-side LLM model is one of the following: Llama 2 130B model, GLM3-130B model, GPT-3 175B, Qwen-72B, Qwen2-72B, Baichuan2-53B; And / or, the user identity authentication method is used for user identity authentication in one of the following scenarios: administration, business, finance, management, supervision.

3. The user identity authentication method according to claim 1, characterized in that: The authentication question is an interactive type question; before step S15, the step further includes: step S11, sending the authentication question to the user side; in step S15, the authentication answer is: the user side LLM sub-model inputs the authentication question and then outputs it; wherein the data type of the authentication question is one or more of the following: numbers, text, binary data, pictures, audio, video; Or, the authentication question is a question derived from time; in the step S14, the authentication question is: generated by the server side through a time algorithm based on its own time; in the step S15, the authentication answer is: output after the user side LLM sub-model inputs the second authentication question, and the second authentication question is generated by the user side through the time algorithm based on its own time; wherein the time algorithm is one of the following: a random question based on a timestamp, a time scrambling and key algorithm, and a mathematical problem that changes dynamically over time.

4. The user identity authentication method according to claim 3, characterized in that: The authentication question is an interactive type question; in step S14, Based on the prompt word rule set, the server-side LLM model is customized through prompt word engineering; and / or, the server-side LLM model is customized by a customized knowledge base through retrieval enhancement generation technology; And / or, the server-side LLM model is customized by customizing the knowledge graph through graph retrieval enhancement generation technology.

5. An identity authentication server, characterized in that: include: Memory; processor; and, a computer program stored on the memory; The processor executes the computer program to implement the user identity authentication method as described in any one of claims 1 to 4.

6. A user identity authentication method based on a large language model, characterized in that: Executed by the user, including: Step S21, running the user-side LLM sub-model; Step S23, input the authentication question into the user-side LLM sub-model to obtain the authentication answer; Step S24, sending the authentication answer to the server side; Step S25, receiving the authentication result returned by the server side; The user-side LLM sub-model is obtained by extracting a node subset from all nodes of the server-side LLM model; The size of all nodes of the server-side LLM model is greater than or equal to 10B; the size of the node subset of the user-side LLM sub-model is less than or equal to 3B; The authentication result in step S25 is obtained by the server side executing the user identity authentication method based on the LLM model described in claim 1.

7. The user identity authentication method according to claim 6, characterized in that: The authentication question is a question derived from the current time, which is generated by the user side through a time algorithm based on its own time; or, the authentication question is an interactive type question, and before step S23, the step further includes: step S22, receiving the authentication question sent by the server side; And / or, the authentication question is an interactive type question, and the user-side LLM sub-model is customized by one or more of the following methods: by a prompt word rule set, the user-side LLM sub-model is customized through prompt word engineering; by a customized knowledge base, the user-side LLM sub-model is customized through retrieval enhancement generation technology; by a customized knowledge graph, the user-side LLM sub-model is customized through graph retrieval enhancement generation technology.

8. An identity authentication client, characterized in that: include: Memory; processor; and, a computer program stored on the memory; Wherein, the processor executes the computer program to implement the user identity authentication method as described in claim 6 or 7; the identity authentication client is one of the following: a mobile terminal, a UKEY, or an intelligent electronic device.

9. A method for generating LLM models on both the server side and the user side, characterized in that: include: Step S31, training the LLM model to obtain a server-side LLM model, including: Sub-step S31a, obtaining the LLM model; Sub-step S31b, training the LLM model using a training data set; Sub-step S31e, obtaining the trained server-side LLM model; Wherein, the server-side LLM model is the server-side LLM model described in claim 1; Step S32, extracting a smaller-scale model from the server-side LLM model as a user-side LLM sub-model, specifically: extracting a node subset from all nodes of the server-side LLM model to obtain a user-side LLM sub-model; Among them, the scale of all nodes of the server-side LLM model is greater than or equal to 10B; the scale of the node subset of the user-side LLM sub-model is less than or equal to 3B.

10. The LLM model generation method according to claim 9, characterized in that: In step S32, a node subset is extracted from all nodes of the server-side LLM model to obtain a user-side LLM sub-model, including: Sub-step S32a, among all nodes of the server-side LLM model, select M% of nodes with the largest absolute values ​​of parameters to form a total set of sub-model nodes, M%≤40%; Sub-step S32b, according to the preset scale of the user-side LLM sub-model, select the nth sub-model node set from the total set of sub-model nodes, the number of node differences between the nth sub-model node set and the sub-model node sets of the 1st to the n-1th user-side LLM sub-models is not less than 10% of the total number of sub-nodes, 1≤n≤N, N is the preset number of user-side LLM sub-models; Sub-step S32c, reorganizing the nth sub-model node set to obtain the nth user-side LLM sub-model.

11. The LLM model generation method according to claim 9, characterized in that: In the sub-step S31b, the standard for training completion is: in the parameter distribution of each node of the LLM model, the difference between the parameter mean and the initial value is greater than 25% of the parameter value range, and the standard deviation is greater than 30% of the parameter value range; And / or, between step S31b and step S31e, the following further comprises: step S31c, performing uniqueness verification on the trained LLM model; wherein the uniqueness verification is: performing input / output correlation analysis on the trained LLM model through a uniqueness verification data set, and if the correlation is between -0.1 and 0.1, the verification is passed; otherwise, the verification fails; And / or, between step S31b and step S31e, there is also included: step S31d, performing stability verification on the LLM model after training; wherein, the stability verification is: using a stability verification data set, using the same question to ask the trained LLM model at least three times, performing a difference analysis on the authentication answers output from the at least three questions, and if the difference mean is 0 and the variance is less than 0.01, the verification passes; otherwise, the verification fails.

12. The LLM model generation method according to claim 11, characterized in that: The number of items in the training data set is greater than 5T, and the size of the uniqueness verification data set and the stability verification data set is between 1G and 2G; and / or, the server-side LLM model is one of the following: Llama 2 130B model, GLM3-130B model, GPT-3175B, Qwen-72B, Qwen2-72B, Baichuan2-53B; And / or, the scale of all nodes of the LLM model is greater than or equal to 10B, and the scale of the node subset of the user-side LLM sub-model is greater than or equal to 1B.

13. A computer program product, characterized in that comprising a computer program which, when executed by a processor, implements: The user identity authentication method according to any one of claims 1 to 4; Or, the user identity authentication method according to claim 6 or 7; Or, the LLM model generation method according to any one of claims 9 to 12.

Citation Information

Patent Citations

  • Question and answer method and device, related equipment and computer program product

    CN118708699A