An identity authentication method and system for a WeChat mini program
By collecting the identity cache information and back-end authentication process information of WeChat applets, combining process association relationships and access behavior characteristics, multi-dimensional authentication is achieved, solving the security risks of a single authentication method in the existing technology, and improving the comprehensiveness and accuracy of authentication.
Patent Information
- Application Number
- CN202510140070.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2045-02-08
AI Technical Summary
The existing WeChat mini-program identity authentication methods rely on single information, pose security risks, it is difficult to effectively identify complex attack behaviors, lack flexibility and intelligence, and cannot achieve multi-dimensional trusted authentication.
Collect the user's identity cache information on the front end of the mini program and the authentication process information of the backend server, determine the first authentication feature through process association and access behavior characteristics, combine offline periodicity and online continuity, perform multi-dimensional authentication feature fusion, and use neural network model for trustworthiness authentication.
It improves the authentication security and credibility of WeChat mini-programs, can accurately distinguish between legal users and illegal users, reduce misjudgments and misjudgments, enhance protection capabilities, and ensure the comprehensiveness and accuracy of identity authentication.
Smart Images

Figure CN119995983B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of access control technology, and more specifically, to an identity authentication method and system for WeChat mini-programs. Background Art
[0002] Since its release in 2017, WeChat Mini Programs have attracted a large number of developers with their simple architecture and convenient usage. Developers can build lightweight applications with a localized experience, which users can access directly through WeChat without downloading. The emergence of WeChat Mini Programs has made cross-platform development possible. Developers can deploy the same code to platforms such as WeChat, Alipay, and ByteDance at the same time, greatly improving development efficiency. As a lightweight application form, WeChat Mini Programs have gradually evolved from their initial basic functions to a diversified application ecosystem.
[0003] In the existing technology, many authentication methods rely on single identity authentication information, such as username, password, SMS verification code, etc. These traditional methods have certain security risks and are easily affected by forgery or tampering. Username and password are the most common authentication methods, but their security is relatively low and they are vulnerable to threats such as brute force cracking and dictionary attacks. Although SMS verification codes can add a layer of security protection, they rely on the user's mobile phone number, and the verification code is valid for a certain period of time. It is easy to be attacked by a man-in-the-middle or bypassed through mobile phone card hijacking. Relying only on a single piece of information for verification lacks flexibility and intelligence, and cannot effectively identify complex attack behaviors. Therefore, how to achieve multi-dimensional trusted authentication of WeChat mini-program user identities is a difficult problem faced by the industry. Summary of the Invention
[0004] This application provides a WeChat mini-program identity authentication method and system, which can realize multi-dimensional trusted authentication of WeChat mini-program user identities.
[0005] In a first aspect, this application provides an identity authentication method for a WeChat applet, comprising:
[0006] When a user accesses a WeChat mini-program, the user's identity cache information in the mini-program front-end and the authentication process information of the back-end server are collected;
[0007] Extracting a process association relationship of the user's identity authentication in the backend server from the authentication process information, and determining a first authentication feature of the user in the backend server based on the process association relationship and the user's access behavior features in the WeChat mini-program;
[0008] Extract the offline periodicity and online continuity of the user identity cache in the front end of the applet, authenticate the validity of the user identity cache according to the offline periodicity and the cache usage interval in the identity cache information, obtain the valid features of the user identity cache in the offline state, and determine the second authentication feature of the user in the front end of the applet through the valid features and the online continuity;
[0009] Use the first authentication feature and the second authentication feature to authenticate the credibility of the user identity, obtain the authentication credibility of the user identity in the WeChat applet, and judge the user identity based on the authentication credibility.
[0010] In some embodiments, extracting the process association relationship of the user's identity authentication in the backend server from the authentication process information specifically includes:
[0011] Obtain multiple logical sub-processes of identity authentication in the backend server;
[0012] Extract the process association values between adjacent logical sub-processes from the authentication process information;
[0013] Determine the process association relationship of the user's identity authentication in the backend server according to all the process association values.
[0014] In some embodiments, determining the first authentication feature of the user in the backend server through the process association relationship and the access behavior characteristics of the user in the WeChat applet specifically includes:
[0015] Extract the access behavior characteristics of the user in the WeChat applet from the user's historical access records;
[0016] For each logical sub-process of identity authentication in the backend server, extract the dependency features of the logical sub-process from the process association relationship;
[0017] Determine the behavior matching degree between the user behavior and the logical sub-process through the dependency features and the access behavior characteristics, and further obtain the behavior matching degree between the user behavior and each logical sub-process;
[0018] Determine the first authentication feature of the user in the backend server according to all the behavior matching degrees.
[0019] In some embodiments, extracting the offline periodicity and online continuity of the user identity cache in the front end of the applet specifically includes:
[0020] Obtain the identity cache records of the user in the front end of the applet;
[0021] Extract all offline time periods and all online time periods in the front end of the applet from the identity cache records;
[0022] Determine the offline periodicity of the user identity cache in the front end of the applet through all offline time periods;
[0023] Determine the online continuity of the user identity cache in the front end of the applet through all online time periods.
[0024] In some embodiments, performing validity authentication on the user identity cache according to the offline periodicity and the cache usage interval in the identity cache information to obtain the effective characteristics of the user identity cache in the offline state specifically includes:
[0025] Obtain multiple usage interval ranges of the user identity cache in the offline state;
[0026] Determine the validity of the user identity cache in each usage interval range through the offline periodicity;
[0027] Determine the validity matching value of the user cache and each usage interval range according to the validity of each usage interval range and the cache usage interval in the identity cache information;
[0028] Determine the effective characteristics of the user identity cache in the offline state based on all the validity matching values.
[0029] In some embodiments, determining the second authentication characteristic of the user in the front end of the applet through the effective characteristic and the online continuity specifically includes:
[0030] Extract the continuous characteristics of the user identity cache in the online state from the online continuity;
[0031] Perform authentication fusion on the effective characteristic and the continuous characteristic to obtain the second authentication characteristic of the user in the front end of the applet.
[0032] In some embodiments, performing credibility authentication on the user identity using the first authentication characteristic and the second authentication characteristic to obtain the authentication credibility of the user identity in the WeChat applet specifically includes:
[0033] Perform feature matching on the first authentication characteristic and the second authentication characteristic to obtain the feature matching degree of the user identity between the front end and the back-end server of the applet;
[0034] Perform credibility authentication on the user identity through the feature matching degree to obtain the authentication credibility of the user identity in the WeChat applet.
[0035] In a second aspect, the present application provides an identity authentication system for a WeChat applet, including:
[0036] A collection module, configured to collect the identity cache information of the user in the front end of the applet and the authentication process information of the back-end server when the user accesses the WeChat applet;
[0037] A processing module, configured to extract the process association relationship of the user's identity authentication in the back-end server from the authentication process information, and determine the first authentication feature of the user in the back-end server through the process association relationship and the access behavior characteristics of the user in the WeChat mini-program;
[0038] The processing module is further configured to extract the offline periodicity and online continuity of the user identity cache in the front-end of the mini-program, perform validity authentication on the user identity cache according to the offline periodicity and the cache usage interval in the identity cache information, obtain the effective feature of the user identity cache in the offline state, and determine the second authentication feature of the user in the front-end of the mini-program through the effective feature and the online continuity;
[0039] An execution module, configured to perform credibility authentication on the user identity using the first authentication feature and the second authentication feature, obtain the authentication credibility of the user identity in the WeChat mini-program, and make a judgment on the user identity based on the authentication credibility.
[0040] In a third aspect, the present application provides a computer device, which includes a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the computer device executes the above-mentioned identity authentication method of the WeChat mini-program.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium, in which instructions or codes are stored. When the instructions or codes are run on a computer, the computer is enabled to execute the above-mentioned identity authentication method of the WeChat mini-program.
[0042] The technical solutions provided by the disclosed embodiments of the present application have the following beneficial effects:
[0043] In an identity authentication method and system for a WeChat mini-program provided by the present application, when a user accesses the WeChat mini-program, the identity cache information of the user in the front-end of the mini-program and the authentication process information of the back-end server are collected; the process association relationship of the user's identity authentication in the back-end server is extracted from the authentication process information, and the first authentication feature of the user in the back-end server is determined through the process association relationship and the access behavior characteristics of the user in the WeChat mini-program; the offline periodicity and online continuity of the user identity cache in the front-end of the mini-program are extracted, the validity authentication of the user identity cache is performed according to the offline periodicity and the cache usage interval in the identity cache information, the effective feature of the user identity cache in the offline state is obtained, and the second authentication feature of the user in the front-end of the mini-program is determined through the effective feature and the online continuity;
[0044] Perform a credibility authentication on the user identity using the first authentication feature and the second authentication feature to obtain the authentication credibility of the user identity in the WeChat mini-program, and judge the user identity based on the authentication credibility.
[0045] It can be seen that in this application, a credibility authentication is performed on the user identity using the first authentication feature and the second authentication feature to obtain the authentication credibility of the user identity in the WeChat mini-program, and the user identity is judged based on the authentication credibility. First, determining the first authentication feature can obtain the feature in the backend server for verifying the authentication degree between the user behavior and the user identity, thereby ensuring the comprehensiveness and rigor of the authentication information in the WeChat mini-program. It does not rely solely on simple authentication information but verifies from multiple perspectives such as user behavior and authentication interval, thus effectively enhancing the security and credibility of the authentication process. This helps the WeChat mini-program to accurately distinguish legitimate users from illegal users in the face of complex authentication scenarios, reduce misjudgments and missed judgments, and enhance the protection ability of the WeChat mini-program while improving the user experience. Then, determining the second authentication feature can obtain the feature of the validity of the user identity cache in the front-end of the mini-program. The WeChat mini-program can ensure the accurate authentication of the user identity in various network environments. Even when the network is unavailable or the user does not re-login, it can ensure the credibility of the identity through the valid cached features. In addition, the consideration of online continuity enhances the dynamic nature of user identity verification, ensuring that the authentication is not only static but can also be verified in real-time as the user behavior changes. By comprehensively considering the authentication features in the offline and online states, the second authentication feature further enhances the comprehensiveness and accuracy of the authentication, contributing to the multi-dimensional credible authentication of the WeChat mini-program user identity. This multi-dimensional authentication method can effectively cope with different attack methods and authentication challenges, improving the overall security and user experience. In summary, based on the above solution, multi-dimensional credible authentication of the WeChat mini-program user identity can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0047] Figure 1 It is an exemplary flowchart of the identity authentication method of the WeChat mini-program shown in some embodiments of the present application;
[0048] Figure 2 It is an architecture diagram of the service communication and caching mode in the WeChat mini-program shown in some embodiments of the present application;
[0049] Figure 3 It is a schematic flowchart for determining authentication credibility as shown in some embodiments of the present application;
[0050] Figure 4 It is a schematic structural diagram of an identity authentication system for a WeChat mini-program as shown in some embodiments of the present application;
[0051] Figure 5 It is a schematic structural diagram of a computer device for implementing an identity authentication method for a WeChat mini-program as shown in some embodiments of the present application. Detailed implementation manners
[0052] To better understand the technical solution of the present application, the technical solution of the present application will be described in detail below in conjunction with the accompanying drawings of the specification and specific implementation manners.
[0053] Refer to Figure 1 , this figure is an exemplary flowchart of an identity authentication method for a WeChat mini-program as shown in some embodiments of the present application. The identity authentication method for the WeChat mini-program mainly includes the following steps:
[0054] In step 101, when a user accesses a WeChat mini-program, identity cache information in the front-end of the mini-program and authentication process information of the back-end server are collected.
[0055] It should be noted that in the present application, the authentication process information represents the rules, conditions, and process information used by the back-end server during the identity authentication process; the identity cache information represents the relevant data about the user's identity stored in the front-end of the mini-program.
[0056] Specifically, when a user accesses a WeChat mini-program, all identity caches in the front-end of the mini-program are obtained from the session in the front-end of the mini-program, so that the set of all identity caches can be used as the identity cache information, and multiple logical sub-processes of identity authentication in the back-end server and the logical associations between adjacent logical sub-processes are obtained from the console of the back-end server, so that the set of all logical associations can be used as the authentication process information of the back-end server. Among them, the logical association represents the internal connection and interaction between different logical sub-processes during the identity authentication process, and the logical sub-process represents a part of the sub-process in the identity authentication process, usually a refined step based on specific authentication rules or logics. Each logical sub-process performs a specific task, such as feature extraction and feature matching, and finally collaborates to complete the entire identity authentication process.
[0057] In some embodiments, refer to Figure 2As described above, this figure is an architectural diagram of the service - to - service communication and caching mode in a WeChat mini - program shown in some embodiments of the present application. The architectural design of the service - to - service communication and caching mode is shown in this figure. The theme of the content in this figure is the service - to - service communication + caching mode. The connection lines between Service A and Database A, and between Service B and Database B represent the data flow direction, while the arrows between Service A and Service B represent the service - to - service call relationship. Data interaction between Service A and Database A is carried out through local caching, and at the same time, Service A is also connected to the distributed cache. Communication between Service A and Service B is carried out through RPC (Remote Procedure Call). Service B is directly connected to Database B for data storage and retrieval. Four implementation methods are also listed in the figure: The first is local cache / distributed cache plus RPC. This method combines the fast access of local cache and the scalability of distributed cache, and realizes service - to - service communication through RPC. The second is (push) RPC synchronization, that is, Service A actively pushes data to Service B for synchronization. The third is timed worker (pull) plus write cache. Service B pulls data from Service A through a timed task and writes it into the local cache. The fourth is asynchronous MQ (Message Queue). Service A sends data to the message queue, and Service B asynchronously retrieves data from the message queue.
[0058] In step 102, extract the process association relationship of the user's identity authentication in the backend server from the authentication process information, and determine the first authentication feature of the user in the backend server based on the process association relationship and the user's access behavior characteristics in the WeChat mini - program.
[0059] In some embodiments, extracting the process association relationship of the user's identity authentication in the backend server from the authentication process information can be implemented by the following steps:
[0060] Obtain multiple logical sub - processes of identity authentication in the backend server;
[0061] Extract the process association values between adjacent logical sub - processes from the authentication process information;
[0062] Determine the process association relationship of the user's identity authentication in the backend server based on all the process association values.
[0063] It should be noted that in this application, the process association relationship represents the relationship of mutual association and dependence between different logical sub-processes during the identity authentication process. When specifically implemented, first, obtaining multiple logical sub-processes of identity authentication in the backend server can be achieved by the following method, that is: multiple logical sub-processes of identity authentication in the backend server can be obtained from the authentication process information. Then, extracting the process association value between adjacent logical sub-processes from the authentication process information can be achieved by the following method, that is: taking the quantization value of the logical association between adjacent logical sub-processes in the authentication process information as the process association value between adjacent logical sub-processes. The process association value is a numerical value used to quantify the degree of logical dependence between adjacent logical sub-processes. Finally, determining the process association relationship of the user's identity authentication in the backend server according to all the process association values can be achieved by the following method, that is: taking the set of all process association values as the process association relationship of the user's identity authentication in the backend server.
[0064] In some embodiments, determining the first authentication feature of the user in the backend server through the process association relationship and the access behavior characteristics of the user in the WeChat mini-program can be achieved by the following steps:
[0065] Extract the access behavior characteristics of the user in the WeChat mini-program from the user's historical access records;
[0066] For each logical sub-process of identity authentication in the backend server, extract the dependency feature of the logical sub-process from the process association relationship;
[0067] Determine the behavior matching degree between the user behavior and the logical sub-process through the dependency feature and the access behavior feature, and then obtain the behavior matching degree between the user behavior and each logical sub-process;
[0068] Determine the first authentication feature of the user in the backend server according to all the behavior matching degrees.
[0069] It should be noted that in this application, the first authentication feature represents the feature used to verify the authentication degree between the user behavior and the user identity in the backend server; the access behavior feature represents the behavior pattern feature of the user when accessing the WeChat mini-program, including access frequency, access time, and click stream; the dependency feature represents the dependency relationship between logical sub-processes during the user identity authentication process; the behavior matching degree represents the degree of consistency between the behavior characteristics of the user during the access to the mini-program and the preset behavior characteristics.
[0070] In specific implementation, first, the access behavior characteristics of a user in a WeChat mini-program can be extracted from the user's historical access records in the following manner: that is, collect the historical access records of the user within a specified time period in the backend server of the WeChat mini-program, and use a feature extraction algorithm to extract the behavioral sub-features of the user's each access to the WeChat mini-program from the historical access records. The set of behavioral sub-features with a repetition rate exceeding a preset feature threshold (default is 60%) can be screened out from all the behavioral sub-features as the access behavior characteristics of the user in the WeChat mini-program. Second, for each logical sub-process of identity authentication in the backend server, the dependency features of the logical sub-process can be extracted from the process association relationship in the following manner: that is, for each logical sub-process of identity authentication in the backend server, the average value of the two process association values in the process association relationship related to the logical sub-process can be used as the dependency feature of the logical sub-process. Then, the behavior matching degree between the user behavior and the logical sub-process can be determined through the dependency feature and the access behavior feature, and further the behavior matching degree between the user behavior and each logical sub-process can be obtained in the following manner: that is, the cosine similarity between the dependency feature and the access behavior feature can be used as the behavior matching degree between the user behavior and the logical sub-process. Through the above method, the behavior matching degree between the user behavior and each logical sub-process can be obtained. Finally, the standard deviation of all the behavior matching degrees can be used as the first authentication feature of the user in the backend server.
[0071] In step 103, extract the offline periodicity and online continuity of the user identity cache in the front end of the mini-program, and authenticate the validity of the user identity cache according to the offline periodicity and the cache usage interval in the identity cache information, so as to obtain the effective feature of the user identity cache in the offline state. Determine the second authentication feature of the user in the front end of the mini-program through the effective feature and the online continuity.
[0072] In some embodiments, the extraction of the offline periodicity and online continuity of the user identity cache in the front end of the mini-program can be implemented by the following steps:
[0073] Obtain the identity cache record of the user in the front end of the mini-program;
[0074] Extract all the offline time periods and all the online time periods in the front end of the mini-program from the identity cache record;
[0075] Determine the offline periodicity of the user identity cache in the front end of the mini-program through all the offline time periods;
[0076] Determine the online continuity of the user identity cache in the front end of the mini-program through all the online time periods.
[0077] In specific implementation, first, obtaining the user's identity cache record in the front end of the applet can be achieved in the following way: that is, obtaining the record content each time the user performs identity caching from the console of the front end of the WeChat applet, so that the set of all record contents can be used as the user's identity cache record in the front end of the applet; second, extracting all offline time periods and all online time periods in the front end of the applet from the identity cache record can be achieved in the following way: that is, for each identity caching, taking the cache generation time in the cache content of this identity caching as the effective time point of the identity caching, and taking the time point when the WeChat applet is closed after the identity caching as the invalidation time point of the identity caching, so that the time period from the effective time point to the invalidation time point can be used as the online time period of this identity caching, and taking the time period from the invalidation time point of the previous same-user identity caching to the effective time point of this identity caching as the offline time period of this identity caching. Through the above method, the offline time period and the online time period in each identity caching can be obtained, and thus all the offline time periods and all the online time periods in the front end of the applet can be obtained; then, determining the offline periodicity of the user's identity cache in the front end of the applet through all the offline time periods can be achieved in the following way: that is, the set of all offline time periods can be used as the offline periodicity of the user's identity cache in the front end of the applet; finally, determining the online continuity of the user's identity cache in the front end of the applet through all the online time periods can be achieved in the following way: that is, the set of all online time periods can be used as the online continuity of the user's identity cache in the front end of the applet.
[0078] It should be noted that in this application, online continuity is a characteristic reflecting the degree of identity continuity of the user in the online state; offline periodicity is a periodic characteristic used to judge the effective degree of cache information during the offline period; the identity cache record represents the process record of saving the cache information about the user's identity in the front end of the applet. The cache information includes the user's login status, authentication data, and access history, and is used to accelerate the authentication process and reduce the need for repeated authentication; the offline time period represents the effective duration of the identity authentication information when the user has no network connection, reflecting the degree of dependence of the user on the identity information in the offline state; the online time period represents the effective duration of the identity authentication information when the user is in the network connection state, reflecting the access frequency and stability of the user to the identity information in the online state.
[0079] In some embodiments, validating the user's identity cache according to the offline periodicity and the cache usage interval in the identity cache information to obtain the effective characteristics of the user's identity cache in the offline state can be achieved by the following steps:
[0080] Obtain multiple usage interval ranges of the user's identity cache in the offline state;
[0081] Determine the validity of the user identity cache in each usage interval period offline;
[0082] Determine the validity matching value between the user cache and each usage interval period according to the validity of each usage interval period and the cache usage interval in the identity cache information;
[0083] Determine the effective features of the user identity cache in the offline state based on all the validity matching values.
[0084] In specific implementation, first, obtaining multiple usage interval periods of the user identity cache in the offline state can be achieved by the following method, that is: obtain multiple usage interval periods of the user identity cache in the offline state from the console of the WeChat mini-program. The usage interval area in the console is generated by clustering and analyzing the usage intervals of all user identity caches in the WeChat mini-program. In actual use, fine-tuning can be performed manually in combination with historical experience to improve the division accuracy of the usage interval periods. Second, determining the validity of the user identity cache in each usage interval period offline can be achieved by the following method, that is: for each usage interval period, all offline time periods with the screening duration within the range of the usage interval period in the offline periodicity can be used as the interval time periods, and the average value of the corresponding durations of all interval time periods can be used as the validity of the usage interval period. Through the above, the validity of the user identity cache in each usage interval period can be obtained. Then, determining the validity matching value between the user cache and each usage interval period according to the validity of each usage interval period and the cache usage interval in the identity cache information can be achieved by the following method, that is: for each usage interval period, calculate the difference between the lower limit value of the usage interval period minus the cache usage interval respectively, and then use the ratio of the calculated difference to the validity of the usage interval period as the validity matching value between the user cache and the usage interval period. Through the above method, the validity matching value between the user cache and each usage interval period can be obtained. Finally, determining the effective features of the user identity cache in the offline state based on all the validity matching values can be achieved by the following method, that is: use the standard deviation of all the validity matching values as the effective features of the user identity cache in the offline state.
[0085] It should be noted that in this application, the effective features refer to the features that can reflect the authenticity and stability of the user identity in the identity authentication process; the usage interval period reflects the time interval of the continuity of accessing the user identity information; the validity refers to the effective degree of the user identity authentication result within a specified time period; the validity matching value refers to the matching degree between the validity of the identity authentication information and the expected standard in the user identity authentication process.
[0086] In some embodiments, the determination of the second authentication feature of the user in the front end of the applet through the effective feature and the online continuity can be implemented by the following steps:
[0087] Extract the continuous features of the user identity cache in the online state from the online continuity;
[0088] Perform authentication fusion on the effective feature and the continuous feature to obtain the second authentication feature of the user in the front end of the applet.
[0089] It should be noted that in this application, the second authentication feature represents the feature of the validity of the user identity cache in the front end of the applet; in specific implementation, first, the extraction of the continuous features of the user identity cache in the online state from the online continuity can be implemented by the following method, that is: the standard deviation of the corresponding durations of all online time periods in the online continuity can be used as the continuous feature of the user identity cache in the online state, where this continuous feature is a feature used to reflect the continuous degree of the user's online state; then, the authentication fusion of the effective feature and the continuous feature to obtain the second authentication feature of the user in the front end of the applet can be implemented by the following method, that is: the ratio of the effective feature to the continuous feature is used as the result of the authentication fusion, so that the result of this authentication fusion can be used as the second authentication feature of the user in the front end of the applet.
[0090] In step 104, use the first authentication feature and the second authentication feature to perform a credibility authentication on the user identity, obtain the authentication credibility of the user identity in the WeChat applet, and judge the user identity based on the authentication credibility.
[0091] In some embodiments, use the first authentication feature and the second authentication feature to perform a credibility authentication on the user identity, obtain the authentication credibility of the user identity in the WeChat applet, refer to Figure 3 As shown in the figure, which is a schematic flowchart of determining the authentication credibility in some embodiments of this application. In this embodiment, the determination of the authentication credibility can be implemented by the following steps:
[0092] In step 1041, perform feature matching on the first authentication feature and the second authentication feature to obtain the feature matching degree of the user identity between the front end and the back-end server of the applet;
[0093] In step 1042, perform a credibility authentication on the user identity through the feature matching degree to obtain the authentication credibility of the user identity in the WeChat applet.
[0094] In specific implementation, first, perform feature matching on the first authentication feature and the second authentication feature. The feature matching degree of the user identity between the front end and the back-end server of the mini-program can be implemented in the following manner, that is: convert the first authentication feature and the second authentication feature into feature vectors to ensure that they have the same dimension and data format, and use a similarity measurement method (such as: Euclidean distance) to quantify the feature matching degree between the two feature vectors. That is, the Euclidean distance between the first authentication feature and the second authentication feature can be used as the feature matching degree of the user identity between the front end and the back-end server of the mini-program; then, initialize an authentication feedback model based on a neural network, use the feature matching degree as the authentication value in this authentication feedback model, and thus use this authentication feedback model to perform credibility authentication on the user identity. Thus, the feedback value of the credibility score output after the credibility authentication of this authentication feedback model can be used as the authentication credibility of the user identity in the WeChat mini-program.
[0095] It should be noted that in this application, the authentication credibility represents the credibility degree of the user identity during the authentication process; the feature matching degree represents the consistency between the front-end and back-end authentication features; the authentication feedback model is an intelligent model based on a neural network, aiming to evaluate the credibility of the user identity through the analysis and learning of the user identity authentication features. In this authentication feedback model, the feature matching degree is used as input data and used as the authentication value, that is, the authentication feedback model receives the matching degree between the front-end and back-end authentication features as input, and through the operation of a multi-layer neural network, gradually extracts effective authentication patterns and association rules. After the model is trained, it can generate a credibility score based on the input authentication value (feature matching degree) as the final output feedback value, representing the authentication credibility of the user identity in the WeChat mini-program; the technical principle of this authentication feedback model is based on the self-learning ability of the neural network, which can identify complex authentication relationships from a large amount of historical authentication data and dynamically adjust parameters to achieve accurate and reliable identity authentication results.
[0096] In some embodiments, the judgment of the user identity based on the authentication credibility can be implemented in the following manner, that is: the credibility threshold of the user identity can be obtained from the console of the WeChat mini-program. When the authentication credibility meets or exceeds the threshold, the WeChat mini-program outputs an authentication result of "credible", allowing the user to continue to access the mini-program and its related resources, or perform subsequent operations (such as: entering the account, conducting transactions). When the authentication credibility is lower than the threshold, the WeChat mini-program outputs an authentication result of "not credible", rejecting the user's access to the mini-program, requiring the user to perform further identity verification (such as: SMS verification code, identity reset), or taking other security measures.
[0097] In addition, on the other hand of this application, in some embodiments, this application provides an identity authentication system for a WeChat mini-program. Refer to Figure 4, This figure is a schematic structural diagram of the identity authentication system of a WeChat mini-program shown in some embodiments of the present application. The identity authentication system of the WeChat mini-program includes: a collection module 201, a processing module 202, and an execution module 203, which are described as follows:
[0098] Collection module 201. In the present application, the collection module 201 is mainly used to collect the identity cache information of the user in the front end of the mini-program and the authentication process information of the back-end server when the user accesses the WeChat mini-program;
[0099] Processing module 202. In the present application, the processing module 202 is used to extract the process association relationship of the user's identity authentication in the back-end server from the authentication process information, and determine the first authentication feature of the user in the back-end server through the process association relationship and the access behavior characteristics of the user in the WeChat mini-program;
[0100] It should be noted that the processing module 202 is also used to extract the offline periodicity and online continuity of the user identity cache in the front end of the mini-program, perform validity authentication on the user identity cache according to the offline periodicity and the cache usage interval in the identity cache information, obtain the effective feature of the user identity cache in the offline state, and determine the second authentication feature of the user in the front end of the mini-program through the effective feature and the online continuity;
[0101] Execution module 203. In the present application, the execution module 203 is mainly used to perform credibility authentication on the user identity using the first authentication feature and the second authentication feature, obtain the authentication credibility of the user identity in the WeChat mini-program, and judge the user identity based on the authentication credibility.
[0102] The above text has introduced in detail the examples of the identity authentication method and system of the WeChat mini-program provided by the embodiments of the present application. It can be understood that, in order to implement the above functions, the corresponding device includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed in this article, the present application can be implemented in the form of hardware or the combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0103] In some embodiments, the present application also provides a computer device, which includes a memory and a processor. The memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the computer device executes the above-mentioned identity authentication method of the WeChat mini-program.
[0104] In some embodiments, referring to Figure 5 , the dashed lines in this figure indicate that the unit or module is optional. This figure is a schematic structural diagram of a computer device for implementing the identity authentication method of a WeChat mini-program according to an embodiment of the present application. The identity authentication method of the WeChat mini-program described in the above embodiments can be implemented by Figure 5 the computer device shown. The computer device includes at least one processor 301, a memory 302, and at least one communication unit 305. The computer device can be a terminal device, a server, or a chip.
[0105] The processor 301 can be a general-purpose processor or a dedicated processor. For example, the processor 301 can be a central processing unit (CPU). The CPU can be used to control the computer device, execute software programs, and process data of the software programs. The computer device can also include a communication unit 305 for implementing signal input (reception) and output (transmission).
[0106] For example, the computer device can be a chip, and the communication unit 305 can be the input and / or output circuit of the chip. Alternatively, the communication unit 305 can be the communication interface of the chip. The chip can be a component of a terminal device, a network device, or other devices.
[0107] Again, for example, the computer device can be a terminal device or a server, and the communication unit 305 can be the transceiver of the terminal device or the server. Alternatively, the communication unit 305 can be the transceiver circuit of the terminal device or the server.
[0108] One or more memories 302 can be included in the computer device. A program 304 is stored thereon. The program 304 can be run by the processor 301 to generate instructions 303, enabling the processor 301 to execute the method described in the above method embodiments according to the instructions 303. Optionally, data (such as a target audit model) can also be stored in the memory 302. Optionally, the processor 301 can also read the data stored in the memory 302. The data can be stored at the same storage address as the program 304, or the data can be stored at a different storage address from the program 304.
[0109] The processor 301 and the memory 302 can be set separately or integrated together. For example, they can be integrated on a system on chip (SOC) of a terminal device.
[0110] It should be understood that each step of the above method embodiments can be completed by a logic circuit in the form of hardware or an instruction in the form of software in the processor 301. The processor 301 can be a CPU, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, for example, discrete gates, transistor logic devices, or discrete hardware components.
[0111] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0112] For example, in some embodiments, the present application further provides a computer-readable storage medium, in which instructions or codes are stored. When the instructions or codes run on a computer, the computer is caused to execute the above-mentioned identity authentication method of the WeChat mini-program.
[0113] Although the preferred embodiments of the present application have been described, those skilled in the art can make additional changes and modifications to these embodiments once they know the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0114] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A WeChat applet identity authentication method, characterized in that: The steps include: When a user accesses a WeChat mini-program, the user's identity cache information in the mini-program front-end and the authentication process information of the back-end server are collected; Extracting a process association relationship of the user's identity authentication in the backend server from the authentication process information, and determining a first authentication feature of the user in the backend server based on the process association relationship and the user's access behavior features in the WeChat mini-program; Extract the offline periodicity and online continuity of the user identity cache in the mini-program front-end, authenticate the validity of the user identity cache based on the offline periodicity and the cache usage interval in the identity cache information, obtain the valid feature of the user identity cache in the offline state, and determine the second authentication feature of the user in the mini-program front-end based on the valid feature and the online continuity, where the online continuity is a feature used to reflect the degree of identity continuity of the user in the online state, and the offline periodicity is a periodic feature used to determine the validity degree of the cached information during the offline period; Performing credibility authentication on the user identity using the first authentication feature and the second authentication feature to obtain the authentication credibility of the user identity in the WeChat mini program, and determining the user identity based on the authentication credibility; The validity of the user identity cache is authenticated according to the offline periodicity and the cache usage interval in the identity cache information, and the valid features of the user identity cache in the offline state are obtained, specifically including: Get multiple usage intervals of the user identity cache in offline state; Determining the validity of the user identity cache at each usage interval through the offline periodicity; Determine a validity matching value between the user cache and each usage interval according to the validity of each usage interval and the cache usage interval in the identity cache information; The validity characteristics of the user identity cache in the offline state are determined based on all validity matching values.
2. The method according to claim 1, wherein Extracting the process association relationship of the user's identity authentication in the backend server from the authentication process information specifically includes: Get multiple logical sub-processes of identity authentication in the backend server; Extracting process association values between adjacent logical sub-processes from the authentication process information; Determine the process association relationship of the user's identity authentication in the backend server based on all process association values.
3. The method according to claim 1, wherein Determining the first authentication feature of the user in the backend server through the process association relationship and the user's access behavior features in the WeChat mini program specifically includes: Extract the user's access behavior characteristics in WeChat mini-programs from the user's historical access records; For each logical sub-process of identity authentication in the back-end server, extract the dependency features of the logical sub-process from the process association relationship; Determining the behavior matching degree between the user behavior and the logical sub-process through the dependency feature and the access behavior feature, and then obtaining the behavior matching degree between the user behavior and each logical sub-process; The first authentication feature of the user in the backend server is determined based on all behavior matching degrees.
4. The method according to claim 1, wherein Extracting the offline periodicity and online continuity of the user identity cache in the mini program front end specifically includes: Get the user's identity cache record in the mini program front end; Extract all offline time periods and all online time periods in the mini program front end from the identity cache record; Determine the offline periodicity of the user identity cache in the mini program frontend through all offline time periods; Determine the online continuity of the user identity cache in the mini program front end through all online time periods.
5. The method according to claim 1, wherein Determining the second authentication feature of the user in the mini-program front end through the valid feature and the online continuity specifically includes: Extracting a continuous feature that the user identity cache is in an online state from the online continuity; The effective feature and the continuous feature are authenticated and fused to obtain the second authentication feature of the user in the mini program front end.
6. The method according to claim 1, wherein Using the first authentication feature and the second authentication feature to authenticate the user's identity to obtain the authentication credibility of the user's identity in the WeChat mini program specifically includes: Perform feature matching on the first authentication feature and the second authentication feature to obtain a feature matching degree of the user identity between the mini-program front-end and the back-end server; The user identity is authenticated for credibility through the feature matching degree, and the authentication credibility of the user identity in the WeChat applet is obtained.
7. A WeChat applet identity authentication system, which uses the method described in any one of claims 1 to 6 to perform WeChat applet identity authentication, characterized in that: The system includes: The collection module is used to collect the user's identity cache information in the WeChat mini-program front-end and the authentication process information of the back-end server when the user accesses the WeChat mini-program; A processing module, configured to extract a process association relationship of the user's identity authentication in the backend server from the authentication process information, and determine a first authentication feature of the user in the backend server based on the process association relationship and the user's access behavior features in the WeChat mini-program; The processing module is further configured to extract the offline periodicity and online continuity of the user identity cache in the mini-program front end, perform validity authentication on the user identity cache based on the offline periodicity and the cache usage interval in the identity cache information, obtain a valid feature of the user identity cache in an offline state, and determine a second authentication feature of the user in the mini-program front end based on the valid feature and the online continuity; An execution module is used to use the first authentication feature and the second authentication feature to authenticate the credibility of the user identity, obtain the authentication credibility of the user identity in the WeChat applet, and judge the user identity based on the authentication credibility.
8. A computer device, characterized in that: The computer device includes a memory and a processor, the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory, so that the computer device executes the identity authentication method of the WeChat mini program according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions or codes, and when the instructions or codes are executed on a computer, the computer implements the identity authentication method of the WeChat mini program according to any one of claims 1 to 6.
Citation Information
Patent Citations
Shared resource identity authentication method and system and security authentication device
CN108400989A
Authentication method and communication terminal
CN108925144A