Single-client login method and device in multi-user system applications

By using pre-defined tags and cascading caching, a new unique identifier is generated and a token is stored, solving the problem of single-user single-client login in a multi-user system. This achieves the independence and security of the user system and is applicable to multiple online platforms.

CN119420506BActive Publication Date: 2025-10-31INSPUR COMM INFORMATION SYST (TIANJIN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411408156.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-10-31
Estimated Expiration
2044-10-10

AI Technical Summary

Technical Problem

In multi-user applications, existing technologies struggle to effectively address the challenge of enabling single-user, single-client login without impacting different user systems, especially in cases of ID conflicts.

Method used

The user system is distinguished by using pre-defined tags and cascading caching. A new unique identifier is generated and combined with the JWT method to generate a token, which is stored in the Redis cache to ensure that only one token is valid each time you log in.

Benefits of technology

It enables independent single-client login for each user system, resolves ID conflict issues, ensures user uniqueness and security, and is applicable to multiple online platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420506B_ABST
    Figure CN119420506B_ABST
Patent Text Reader

Abstract

This invention relates to the field of network security technology, specifically providing a single-client login method and apparatus for multi-user system applications. First, each user system is assigned a unique tag value. Then, the login process for each user system is separated. After successful login, the tag value and the user's unique identifier are concatenated to regenerate the user's unique identifier. The token information and user login status information are cached in a cascading manner. Subsequently, when the user logs in again, the regenerated unique identifier is used to determine if the user is already logged in. If so, all authentication information in the cache is cleared, and new authentication information is regenerated; otherwise, the authentication information is regenerated. Compared with existing technologies, this invention enables single-user, single-client login, solving the problem of conflicts caused by the same user ID in multi-user systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network security technology, specifically providing a single-client login method and apparatus for multi-user system applications. Background Technology

[0002] In single-user system applications, the common method to achieve single-user single-client login is to directly associate the user's unique identifier with the authentication information (such as a token) and store it directly in the cache. The next login will directly use the user's unique identifier and the associated token to achieve single-user single-client login.

[0003] In many multi-user applications, the user system functions on the PC and mobile app sides are not independent. The same account can log in on both the PC and mobile app sides, and each user corresponds to only one token. In this case, the method for implementing single-user single-client login is the same as in single-user applications: the user's unique identifier is directly associated with the token and stored directly in the cache. The next login is achieved by directly using the user's unique identifier and the associated token to implement single-user client login in the multi-user system.

[0004] However, in multi-user systems with conflicting IDs, how to achieve single-user, single-client login without affecting different user systems is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] This invention addresses the shortcomings of the prior art by providing a highly practical single-client login method for multi-user system applications.

[0006] A further technical objective of this invention is to provide a reasonably designed, secure, and applicable single-client login device for multi-user system applications.

[0007] The technical solution adopted by this invention to solve its technical problem is:

[0008] A single-client login method in a multi-user system application: First, each user system is assigned a unique tag value. Then, the login process of each user system is separated. After successful login, the tag value and the user's unique identifier are concatenated to regenerate the user's unique identifier. The token information and the user's login status information are cached in a cascading manner.

[0009] Subsequently, when the user logs in again, the system determines whether the user has already logged in based on the newly generated unique identifier. If so, all authentication information in the cache is cleared and new authentication information is regenerated.

[0010] If not, regenerate the identity authentication information.

[0011] Furthermore, the specific steps are as follows:

[0012] S1, Pre-set label;

[0013] S2, a unique user identifier for cascaded cache;

[0014] S3, Single Client Login Control.

[0015] Furthermore, in step S1, in the multi-user system application, a pre-defined tagging method is used to distinguish different user systems.

[0016] Furthermore, in step S2, the user logs into the system, the background verifies the user information, and if the verification is successful, a unique identification code is generated using the UUID method. The unique code is used as the key value, and a token, i.e., an identity verification token, is generated by combining the user information with the JWT method.

[0017] Then, the unique code generated by the UUID is used as the key and the token as the value, and stored in the Redis cache. This is the first level of the cascading cache.

[0018] Furthermore, in the second level of the cascading cache, the UUID from the first level is used as the value, and the user's unique identifier, regenerated using the pre-set tag and user ID, is used as the key, and then stored in the Redis cache.

[0019] Thus, the first-level cache and the second-level cache constitute a cascaded cache. The first-level cache is used to store the user login token, and the second-level cache is used to determine whether the user is logged in.

[0020] Furthermore, in step S3, the user logs into the system again, the background verifies the user information, if the verification is successful, the user's unique identifier, regenerated based on the preset tag and user ID, is used as the key to check whether the user's login information is cached in Redis.

[0021] Furthermore, check if the user's login information is cached in Redis. If it exists, use the Redis value just retrieved as the key and clear the value of this key in Redis, i.e., the token, to ensure that a user can only have one token at a time, thereby achieving the effect of single client login for the user.

[0022] If it does not exist, proceed to step S2 to complete the quick login.

[0023] A single-client login device in a multi-user system application includes: at least one memory and at least one processor;

[0024] The at least one memory is used to store a machine-readable program;

[0025] The at least one processor is configured to invoke the machine-readable program to execute a single-client login method in a multi-user application.

[0026] Compared with the prior art, the single-client login method and apparatus of the present invention in a multi-user system application has the following outstanding advantages:

[0027] This invention is based on a dedicated multi-user system application where each user system has independent functions and separate account management functions, but the principle of generating unique user identifiers is the same. The same situation will occur in different user systems, and they share a caching mechanism. By using pre-set tags, cascading caching of unique user identifiers, and single-client login control, a single user can log in to a single client. This solves the problem of conflict due to the same user ID in multi-user systems. This method has been tested and applied to multiple online platforms. Attached Figure Description

[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0029] Appendix Figure 1 This is a flowchart illustrating a single-client login method in a multi-user system application. Detailed Implementation

[0030] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0031] The following is a preferred embodiment:

[0032] like Figure 1 As shown in this embodiment, a single-client login method in a multi-user system application firstly assigns a unique tag value to each user system. Then, the login process of each user system is separated. After successful login, the tag value and the user's unique identifier are concatenated to regenerate the user's unique identifier. The token information and whether the user is logged in are cached in a cascading manner.

[0033] Subsequently, when the user logs in again, the system determines whether the user has already logged in based on the newly generated unique identifier. If so, all authentication information in the cache is cleared and new authentication information is regenerated.

[0034] If not, regenerate the identity authentication information.

[0035] The specific steps are as follows:

[0036] S1, Pre-set label;

[0037] In multi-user system applications, different user systems are distinguished by pre-defined tags, as shown in Table 1:

[0038] Table 1 Preset Labels

[0039] User System Label PC users user_pc APP users user_app ... ...

[0040] S2, a unique user identifier for cascaded cache;

[0041] When a user logs into the system, the backend verifies the user information. If the verification is successful, a unique identifier is generated using the UUID. This unique identifier is then used as the key, and a token, i.e., an authentication token, is generated by combining the user information with JWT (JSON Web Tokens) data.

[0042] Then, the unique code generated by the UUID is used as the key and the token as the value, and stored in the Redis cache. This is the first level of the cascading cache.

[0043] The second level of the cascading cache uses the UUID from the first level as the value, and a user-unique identifier regenerated from the pre-set tag and user ID as the key, and then stores it in the Redis cache.

[0044] Thus, the first-level cache and the second-level cache constitute the cascaded cache of this method. The first-level cache stores the user login token, while the second-level cache is mainly used to determine whether the user is logged in.

[0045] S3, Single Client Login Control;

[0046] When a user logs into the system again, the backend verifies the user information. If the verification is successful, it uses the user's unique identifier, which is regenerated based on the preset tag and the user ID, as the key to check whether the user's login information is cached in Redis.

[0047] If it exists, use the Redis value that was just retrieved as the key, clear the value of this key in Redis, i.e., the token, to ensure that a user can only have one token at a time, thereby achieving the effect of single client login for users;

[0048] If it does not exist, proceed to step S2 to complete the quick login.

[0049] As shown in Table 2, examples of the application of the two user systems are provided:

[0050] Table 2 User System

[0051] User System User ID Preset Labels PC users 1 user_pc APP users 1 user_app

[0052] The execution results are recorded as shown in Table 3, following the steps outlined in the technical solution.

[0053] Table 3 Execution Results

[0054]

[0055] Based on the above method, a single-client login device in a multi-user system application in this embodiment includes: at least one memory and at least one processor;

[0056] The at least one memory is used to store a machine-readable program;

[0057] The at least one processor is configured to invoke the machine-readable program to execute a single-client login method in a multi-user application.

[0058] The above-described specific embodiments are merely specific examples of the present invention. The patent protection scope of the present invention includes, but is not limited to, the above-described specific embodiments. Any technical solution that conforms to the above-described specific embodiments of the present invention and any appropriate changes or substitutions made by those skilled in the art should fall within the patent protection scope of the present invention.

[0059] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A single-client login method in a multi-user system application, characterized in that, First, each user system is assigned a unique tag value. Then, the login process for each user system is separated. After successful login, the tag value and the user's unique identifier are concatenated to regenerate the user's unique identifier. The token information and whether the user is logged in are cached in a cascading manner. Subsequently, when the user logs in again, the system determines whether the user has already logged in based on the newly generated unique identifier. If so, all authentication information in the cache is cleared and new authentication information is regenerated. If not, regenerate the identity authentication information; The specific steps are as follows: S1, Pre-set label; S2, a unique user identifier for cascaded cache; When a user logs into the system, the backend verifies the user information. If the verification is successful, a unique identification code is generated using the UUID method. This unique code is used as the key value, and a token, i.e., an authentication token, is generated by combining the user information with the JWT method. Then, the unique code generated by the UUID is used as the key and the token is used as the value, and stored in the Redis cache. This is the first level in the cascading cache. The second level of the cascading cache uses the UUID from the first level as the value, and the user's unique identifier, regenerated using the pre-set tag and user ID, as the key, and then stores it in the Redis cache. Thus, the first-level cache and the second-level cache constitute a cascaded cache. The first-level cache is used to store the user login token, and the second-level cache is used to determine whether the user is logged in. S3, Single Client Login Control; When a user logs into the system again, the backend verifies the user information. If the verification is successful, it uses the user's unique identifier, regenerated from the preset tag and user ID, as the key to check if the user's login information is cached in Redis.

2. The single-client login method in a multi-user system application according to claim 1, characterized in that, In step S1, in the multi-user system application, a pre-defined tagging method is used to distinguish different user systems.

3. The single-client login method in a multi-user system application according to claim 2, characterized in that, Check if the user's login information is cached in Redis. If it exists, use the Redis value that was just retrieved as the key and clear the value of this key in Redis, i.e., the token. This ensures that a user can only have one token at a time, thereby achieving the effect of single client login for a user. If it does not exist, proceed to step S2 to complete the quick login.

4. A single-client login device in a multi-user system application, characterized in that, include: At least one memory and at least one processor; The at least one memory is used to store a machine-readable program; The at least one processor is configured to invoke the machine-readable program to perform the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Server device, terminal device, system, information processing method, and program

    JP2016085638A

  • Login method and apparatus

    US20150341356A1