A login authentication method and device, electronic device, and readable storage medium
By judging the login status on the user terminal and performing authentication directly within a preset time, bypassing the authentication center, login problems caused by pressure and failures in the authentication center are solved, and the stability and fault tolerance of the business system are improved.
Patent Information
- Application Number
- CN202311635504.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-12-01
AI Technical Summary
When the authentication center of a large business system group handles a large number of user login requests, it is easy to cause slowdown, timeout or even crash, and users cannot log in when the system crashes or goes down.
By determining whether there is a login state on the user terminal and directly bypassing the authentication center for login authentication within the preset time threshold, the pressure on the authentication center is reduced, and when the authentication center is down, the login state is generated through the expansion device to ensure user access.
It improves the stability and fault tolerance of user terminal login business systems, avoids performance problems caused by excessive access to the authentication center, and ensures that users can continue to access when the authentication center fails.
Smart Images

Figure CN117811770B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular, to a login authentication method and device, an electronic device, and a computer-readable storage medium. Background Art
[0002] Currently, when logging into a business system, a user terminal must go through an independent authentication center. Only the authentication center can accept security information such as the user's account number and password. Other business systems do not provide login portals and only accept indirect authorization from the authentication center. Indirect authorization is achieved through tokens. The authentication center receives the user account number and password sent by the user terminal and authenticates them. After successful authentication, it creates an authorization token and sends it as a parameter to each business system. Once the business system receives the authorization token, it is authorized. Using the authorization token, the business system establishes a session with the user terminal, allowing the user terminal to successfully log in to the business system and access protected resources.
[0003] Because the authentication center is responsible for all business systems, all systems must join the authentication center. Each time a user terminal accesses a business system, it must request a login authentication token from the authentication center through the business system being accessed. Only with an authentication token issued by the authentication center can the business system allow the user terminal to log in. Large-scale business system clusters often include dozens or even dozens of business systems, each requiring access requests from the authentication center. This creates a high volume of traffic to the authentication center. If the authentication center experiences excessive traffic, requests can become slow or even blocked, resulting in slow system logins or even timeouts for all user terminals. If the authentication center experiences unforeseen issues, such as a system crash, database outage, or server failure, the entire business system cluster project can be paralyzed, rendering all business systems unable to log in and authenticate. Consequently, all users will be unable to log in or use any of the systems.
[0004] The above information disclosed in the Background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not form the prior art known to a person of ordinary skill in the art. Summary of the Invention
[0005] The embodiments of the present application provide a login authentication method and device, and an electronic device to improve the stability of a user terminal logging into a business system.
[0006] According to the first aspect of the embodiment of the present application, a login authentication method is provided, which includes: responding to a login request from a user terminal to access a business system, determining whether the user terminal is in a logged-in state and whether the login request occurs within a preset access time threshold; if the user terminal is in a logged-in state and the login request occurs within the access time threshold, authenticating the login request; otherwise, triggering an authentication center to authenticate the login request.
[0007] When the user terminal is in a logged-in state and the login request occurs within the access time threshold, the authentication center can be bypassed to directly authenticate the login request, so as to realize the user terminal's login to the business system. Since the login request that meets these authentication conditions does not need to be authenticated by the authentication center, the login authentication is performed by the authentication center when these authentication conditions are not met. In this way, the login request for logging into the business system can be authenticated based on the login state through an extension device independent of the authentication center, which reduces the pressure on the authentication center due to frequent access, and makes it less likely for the authentication center to log in slowly, time out or even crash due to too much access. In addition, when the authentication center crashes or goes down, the login authentication is performed through the extension device, which can ensure that the user terminal in the login state and within the access time threshold can continue to access the business system, thereby improving the stability of the user terminal logging into the business system.
[0008] In an optional embodiment of the present application, the login authentication method further generates a login state for the user terminal in response to a login request from the user terminal to the service system to be accessed. This allows the user to generate a login state even when the authentication center is down, allowing the user to perform login authentication even when the authentication center is down. This increases the fault tolerance of login authentication compared to existing technologies.
[0009] In an optional embodiment of the present application, generating a login status for the user terminal logging into the to-be-accessed business system includes: determining whether the login request is a continuous access; and if so, generating a login status for the user terminal logging into the to-be-accessed business system. By only generating a login status in the case of a continuous access by the user terminal, it is convenient to subsequently obtain the user's login record for legitimacy determination, thereby ensuring the security of login authentication.
[0010] In an optional embodiment of the present application, determining whether the login request is a continuous access includes: if the difference between the first time and the second time is less than a preset time threshold, determining that the login request is a continuous access; the first time is the time when the login request is received; the second time is the time when the user terminal last logged into the business system; if the difference between the first time and the second time is not less than the preset time threshold, determining that the login request is not a continuous access. The time when the login request is received and the time when the user terminal last logged into the business system are further used to implement the continuous access judgment, facilitating subsequent legitimacy judgment.
[0011] In an optional embodiment of the present application, if the login request is for continuous access, generating a login state for the user terminal to log into the business system to be accessed includes: if the login request is for continuous access, determining whether the login request is legal; and if the login request is legal, generating a login state for the user terminal to log into the business system to be accessed. By determining the legality of the login request in the case of continuous access by the user terminal, the security of login authentication is ensured.
[0012] In an optional embodiment of the present application, determining whether the login request is legal includes: obtaining user login data corresponding to the login request; the user login data includes login time and login status; obtaining an offset value between the user login data and a preset function; the preset function is a univariate linear function obtained using historical login success time and its corresponding historical login success status; the univariate linear function is constructed by the following process: assuming that the data set has a total of p data points, each data point has d description dimensions xi=(xi1;xi2;xi3…xid), written in vector form as f(X)=W T X+b; where xi is the i-th data point, where W=(W1; W2; W3; W4…Wd) is the trained model parameter, W T is the transpose of the matrix, b is the bias of the model, i is a positive integer, p is a positive integer, and d is a positive integer. After determining W and b through training, a univariate linear regression function is constructed.
[0013] The validity of the login request is determined based on the offset value. The validity of the login request is determined by obtaining the offset value between the unary linear function obtained from the historical login data and the user login data corresponding to the login request, thereby ensuring the security of login authentication.
[0014] In an optional embodiment of the present application, the validity of the login request is determined based on the offset value, including: if the offset value is less than a preset offset threshold, determining that the login request is valid; if the offset value is greater than or equal to the offset threshold, determining that the login request is invalid. The offset value between the unary linear function obtained from the historical login data and the user login data corresponding to the login request can reflect the accuracy of the login validity. The smaller the offset value, the higher the accuracy of the current login. This judgment method can more accurately verify the legitimacy of the login.
[0015] According to the second aspect of the embodiment of the present application, a login authentication device is provided, including: a judgment module, used to judge whether the user terminal is in a logged-in state and whether the login request occurs within an access time threshold in response to a login request from a user terminal to access a business system; an authentication module, used to approve the login request if the user terminal is in a logged-in state and the login request occurs within the access time threshold; otherwise, triggering an authentication center to authenticate the login request.
[0016] In an optional embodiment of the present application, the login authentication device further includes: a login state generating module, configured to generate a login state for the user terminal to log into the business system to be accessed in response to a login request from the user terminal to the business system to be accessed.
[0017] In an optional embodiment of the present application, the login state generation module generates a login state for the user terminal to log in to the service system to be accessed by: determining whether the login request is a continuous access;
[0018] In the case where the login request is for continuous access, a login state is generated for the user terminal to log in to the service system to be accessed.
[0019] In an optional embodiment of the present application, the login state generation module determines whether the login request is a continuous access in the following manner: when the difference between the first time and the second time is less than the preset time threshold, the login request is determined to be a continuous access; the first time is the time when the login request is received; the second time is the time when the user terminal last logged into the business system; when the difference between the first time and the second time is not less than the preset time threshold, the login request is determined to be not a continuous access.
[0020] In an optional embodiment of the present application, the login state generation module generates a login state for the user terminal to log in to the business system to be accessed in the following manner when the login request is a continuous access: when the login request is a continuous access, determine whether the login request is legal; when the login request is legal, generate a login state for the user terminal to log in to the business system to be accessed.
[0021] In an optional embodiment of the present application, the login state generation module determines whether the login request is legal in the following manner: obtaining user login data corresponding to the login request; the user login data includes login time and login status; obtaining the offset value between the user login data and a preset function; the preset function is a unary linear function obtained using the historical login success time and its corresponding historical login success status; the unary linear function is constructed by the following process: assuming that the data set has a total of p data points, each data point has d description dimensions xi = (xi1; xi2; xi3...xid), written in vector form as f(X) = W T X+b; where xi is the i-th data point, where W=(W1; W2; W3; W4…Wd) is the trained model parameter, W T is the transpose of the matrix, b is the bias of the model, i is a positive integer, p is a positive integer, and d is a positive integer. After determining W and b through training, a univariate linear regression function is constructed.
[0022] Determine whether the login request is legal based on the offset value.
[0023] In an optional embodiment of the present application, the login state generation module determines whether the login request is legal based on the offset value in the following manner: when the offset value is less than a preset offset threshold, the login request is determined to be legal; when the offset value is greater than or equal to the offset threshold, the login request is determined to be illegal.
[0024] According to a third aspect of an embodiment of the present application, an electronic device is provided, which includes a processor and a memory storing program instructions, and the processor is configured to execute the steps of the above-mentioned login authentication method when running the program instructions.
[0025] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored; the computer program is executed by a processor to implement the steps of the above-mentioned login authentication method.
[0026] The embodiments of the present application adopt the above technical solutions, which have the following technical effects:
[0027] When the user terminal is in a logged-in state and the login request occurs within the access time threshold, the authentication center can be bypassed to directly authenticate the login request, so as to realize the user terminal's login to the business system. Since the login request that meets these authentication conditions does not need to be authenticated by the authentication center, the login authentication is performed by the authentication center when these authentication conditions are not met. In this way, the login request for logging into the business system can be authenticated based on the login state through an extension device independent of the authentication center, which reduces the pressure on the authentication center due to frequent access, and makes it less likely for the authentication center to log in slowly, time out or even crash due to too much access. In addition, when the authentication center crashes or goes down, the login authentication is performed through the extension device, which can ensure that the user terminal in the login state and within the access time threshold can continue to access the business system, thereby improving the stability of the user terminal logging into the business system. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0029] Figure 1 A schematic diagram of the interaction process between a user terminal, a business system, and an authentication center in the prior art;
[0030] Figure 2 A schematic diagram of a login authentication method provided in an embodiment of the present application;
[0031] Figure 3 A schematic diagram of a login authentication device provided in an embodiment of the present application;
[0032] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to make the technical solutions and advantages of the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, and are not an exhaustive list of all the embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other unless they conflict.
[0034] The login state is a random string used to maintain the login status, also known as a token. After successfully authenticating a user terminal, the authentication center creates a token and sends it as a parameter to the business system. The business system uses the token to establish a session with the user terminal, allowing the user terminal to successfully log in to the business system and access protected resources. Figure 1This is a schematic diagram of the interaction process between a user terminal, a business system and an authentication center in the prior art. Figure 1 As shown, a user terminal accesses business system A through a browser. Business system A verifies the access request. If verification fails, business system A performs a redirect operation and sends the address information of business system A to the authentication center. The authentication center verifies the address information of business system A and, if verification fails, returns a notification of verification failure to the browser. The user terminal sends a login request to business system A through the browser to the authentication center. The login request contains the username, password, and address information of business system A. The authentication center authenticates the login request. If authentication succeeds, it creates a session and an authorization token. The authentication center performs a redirect operation and sends the authorization token to business system A. Business system A sends a verification request to the authentication center, which contains the authorization token and the address information of business system A. The authentication center verifies the verification request and, if verification succeeds, returns a notification message to business system A confirming the validity of the authorization token. After business system A confirms the validity of the authorization token, it establishes a session with the user terminal, allowing the user terminal to log in to business system A and access protected resources.
[0035] Currently, user terminals must log into business systems through an independent authentication center. Only the authentication center can accept user account numbers, passwords, and other security information. Other business systems do not provide login portals and only accept authorization from the authentication center. Frequent access to the authentication center can lead to slow logins, timeouts, or even crashes. Furthermore, if the authentication center crashes or goes down, user terminals cannot access business systems. Therefore, traditional login authentication methods provide poor stability for user terminals logging into business systems.
[0036] Based on this, the present application improves the login authentication method to improve the stability of user terminal login business system.
[0037] like Figure 2 As shown, a login authentication method in an embodiment of the present application includes:
[0038] Step S201 : In response to a login request from a user terminal to access a service system, it is determined whether the user terminal is in a logged-in state and whether the login request occurs within a preset access time threshold.
[0039] Step S202: If the user terminal is in a logged-in state and the login request occurs within the access time threshold, the login request is authenticated to complete the user terminal's login to the service system to be accessed. Otherwise, the authentication center is triggered to authenticate the login request.
[0040] A login authentication method according to an embodiment of the present application can bypass the authentication center and directly authenticate the login request when the user terminal is in a login state and the login request occurs within the access time threshold, so as to enable the user terminal to log in to the business system. Since the login request that meets these authentication conditions does not need to be authenticated by the authentication center, the login authentication is performed through the authentication center when these authentication conditions are not met. In this way, the login request to log in to the business system can be authenticated based on the login state through an extension device independent of the authentication center, which reduces the pressure on the authentication center to be frequently accessed, and makes it less likely for the authentication center to log in slowly, time out or even crash due to too much access. In addition, when the authentication center crashes or goes down, the login authentication can be performed through the extension device, which can ensure that the user terminal in the login state and within the access time threshold can continue to access the business system, thereby improving the stability and fault tolerance of the user terminal logging into the business system.
[0041] In some embodiments, after the login request is authenticated and processed, the process also includes sending the login status corresponding to the user terminal to the business system to be accessed.
[0042] The authentication of the login request means that the login request has been authenticated. The service system to be accessed establishes a session with the user terminal according to the received login status corresponding to the user terminal, so that the user terminal can access protected resources of the service system to be accessed.
[0043] In some embodiments, after the authentication center passes the authentication, the authentication center generates and sends the login state, i.e., the token, to the business system to be accessed. The business system to be accessed establishes a session with the user terminal based on the received login state corresponding to the user terminal, so that the user terminal can access the protected resources of the business system to be accessed.
[0044] In some embodiments, the login authentication method further generates a login state for the user terminal to log into the business system to be accessed in response to a login request from the user terminal to the business system to be accessed.
[0045] In this way, a login state can be generated through an extension device independent of the authentication center. In the case that the user terminal does not have a login state, a login state can be generated for the user terminal according to demand, and the login request to log in to the business system can be authenticated, allowing the user terminal to access the business system, further replacing the function of the authentication center, and further reducing the pressure on the authentication center due to frequent access.
[0046] In some embodiments, generating a login state for a user terminal logging into a pending service system includes: determining whether the login request is for a continuous access; and if so, generating a login state for the user terminal logging into the pending service system. If the login request is for a continuous access, the user terminal is required to log in again. Generating a login state for the user terminal logging into the pending service system based on whether the user terminal is in a continuous access state can avoid repeated identity authentication when the user terminal logs in continuously, thereby improving the user experience when accessing the service system.
[0047] In some embodiments, determining whether a login request is a continuous access includes: when the difference between the first time and the second time is less than a preset time threshold, determining that the login request is a continuous access; the first time is the time when the login request is received; the second time is the time when the user terminal last logged into the business system; when the difference between the first time and the second time is not less than the preset time threshold, determining that the login request is not a continuous access.
[0048] In some embodiments, when the login request is a continuous access, a login state is generated for the user terminal to log in to the business system to be accessed, including: when the login request is a continuous access, determining whether the login request is legal; when the login request is legal, generating a login state for the user terminal to log in to the business system to be accessed.
[0049] By confirming the legitimacy of the login request, the security of the generated login state is improved. In addition, the security of business system access can be guaranteed even without login authentication through the authentication center.
[0050] In some embodiments, determining whether the login request is legitimate includes:
[0051] The number of successful logins by the user terminal within a unit time is obtained, and if the number of successful logins by the user terminal within the unit time is greater than a preset threshold, the login request is determined to be legal. Otherwise, the login request is determined to be illegal.
[0052] In some embodiments, determining whether the login request is legitimate includes:
[0053] The sequence of business systems successfully logged into by a user terminal within a preset time period is obtained, and this sequence is input into a preset legitimate login identification model for identification, obtaining an identification result. Optionally, the preset time period is a period of time prior to the current login request, for example, one hour prior to the current login request. This identification result is used to characterize whether the login request is legitimate. The legitimate login identification model trains the model by inputting labeled samples into a preset neural network model. The training loss value for each training cycle is recorded. When the training loss values for a preset number of consecutive training cycles are no less than the lowest of all training loss values, model training is terminated, and the model obtained from the last training cycle is determined as the malware identification model. Optionally, the preset number is a positive integer greater than 3. The samples used to train the model are the sequence of business system logins by the user terminal, and the labels used to train the model include a legitimate login label and an invalid login label. The sequence in which the user terminal logs into business systems can reflect the user's business system usage characteristics. For example, if a user's work requires them to log into business system 1, then business system 2, then business system 3, and finally business system 4, the order in which the user terminal logs into the business systems can be used to determine whether the user terminal's current login request meets the user's work requirements, thereby determining whether the user terminal's login request is legitimate.
[0054] In some embodiments, determining whether the login request is legitimate includes:
[0055] The IP address of the user terminal and the IP address range corresponding to the service system to be accessed are obtained. If the IP address of the user terminal is within the IP address range, the login request is determined to be legal. Otherwise, the login request is determined to be illegal.
[0056] In some embodiments, determining whether a login request is legal includes: obtaining user login data corresponding to the login request; the user login data includes login time and login status; obtaining an offset value between the user login data and a preset function; the preset function is a unary linear function obtained using historical login success time and its corresponding historical login success status; and determining whether the login request is legal based on the offset value.
[0057] For example, a univariate linear regression function is generated using historical login data under successful login conditions. The historical login data under successful login conditions include the historical login time and historical login status under successful login conditions. As the number of login data continues to increase, the historical login data under successful login conditions also increases. The univariate linear regression function is iteratively trained to make this univariate linear regression function closer and closer to the linear distribution state of successful login. During login, the various data in the login information (such as login time and login status) are put into the univariate linear function as parameters to calculate the coordinate point corresponding to this login request, and the distance between the coordinate point corresponding to this login request and the univariate linear function is obtained. This distance is the offset value between the user login data and the preset function. The smaller the offset value, that is, the closer the point generated in the coordinates of this login is to the univariate linear function calculated previously for successful login, indicating that the various parameter states of this login are similar to those of many previous successful logins. The higher the accuracy of this login, the more legal the user terminal's access to the business system is.
[0058] In some embodiments, whether the login request is legal is determined based on the offset value, including: when the offset value is less than a preset offset threshold, determining that the login request is legal; when the offset value is greater than or equal to the offset threshold, determining that the login request is illegal.
[0059] For example, a linear regression function can be constructed as follows:
[0060] First, establish the model: suppose the data set has a total of p data points, each data point has d description dimensions xi = (xi1; xi2; xi3...xid), written in vector form as f(X) = W T X+b. Where xi is the i-th data point, W=(W1;W2;W3;W4…Wd) is the trained model parameter, W T is the transpose of the matrix, b is the bias of the model, i is a positive integer, p is a positive integer, and d is a positive integer. After training W and b, the model can be determined. In some embodiments, the calculation Get the model parameter w and calculate Obtain the offset b. Where, The model for calculating W and b is a linear regression algorithm known to those skilled in the art for obtaining model parameters and bias. Those skilled in the art understand that by entering user login data into the aforementioned algorithm, model parameters W and bias b can be obtained, and a univariate linear regression function can be constructed based on W and b. Optionally, the user login data also includes the login return time, login return status, and user ID. The login return time, as a dimension of request time, can be calculated such that a shorter return time indicates a closer approach to successful authentication. Login return statuses include 200, 500, 300, 404, 403, and so on. A return status of 200 indicates a closer approach to successful authentication. A login return status of 200 indicates that the request was successfully received and the requested resource was sent back to the client. A login return status of 500 indicates that the server encountered an error and was unable to complete the request. A login return status of 300 indicates that the server can perform various operations in response to the request. A login return status of 404 indicates that the server was able to connect but was unable to retrieve the requested webpage resource. The login response status is 403, which means "Forbidden." The server received the request but refused to provide the service. The user ID is recorded as a constant, as is the login ID.
[0061] like Figure 3 As shown, a login authentication device according to an embodiment of the present application includes: a judgment module 301 and an authentication module 302. The judgment module 301 is used to respond to a login request from a user terminal to access a business system and determine whether the user terminal is in a logged-in state and whether the login request occurs within an access time threshold. The authentication module 302 is used to approve the login request if the user terminal is in a logged-in state and the login request occurs within the access time threshold; otherwise, trigger an authentication center to authenticate the login request.
[0062] A login authentication device according to an embodiment of the present application can bypass the authentication center and directly authenticate the login request when the user terminal is in a login state and the login request occurs within the access time threshold, so as to realize the user terminal's login to the business system. Since the login request that meets these authentication conditions does not need to be authenticated by the authentication center, the login authentication is performed by the authentication center when these authentication conditions are not met. In this way, the login request for logging into the business system can be authenticated based on the login state through an extension device independent of the authentication center, which reduces the pressure on the authentication center to be frequently accessed, and makes it less likely for the authentication center to log in slowly, time out or even crash due to too much access. In addition, when the authentication center crashes or goes down, the login authentication can be performed through the extension device, which can ensure that the user terminal in the login state and within the access time threshold continues to access the business system, thereby improving the stability and fault tolerance of the user terminal logging into the business system.
[0063] Furthermore, the login authentication device further includes a login state generating module, which is used to generate a login state for the user terminal to log in to the service system to be accessed in response to a login request from the user terminal to the service system to be accessed.
[0064] Furthermore, the login state generation module generates a login state for the user terminal to log in to the business system to be accessed by determining whether the login request is a continuous access, and generating a login state for the user terminal to log in to the business system to be accessed if the login request is a continuous access.
[0065] Furthermore, the login state generation module determines whether the login request is a continuous access in the following manner:
[0066] If the difference between the first time and the second time is less than a preset time threshold, the login request is determined to be a continuous access; the first time is the time when the login request is received; the second time is the time when the user terminal last logged into the service system. If the difference between the first time and the second time is not less than the preset time threshold, the login request is determined to be not a continuous access.
[0067] Furthermore, the login state generation module generates a login state for the user terminal to log in to the service system to be accessed in the following manner when the login request is a continuous access: when the login request is a continuous access, determining whether the login request is legal. If the login request is legal, generating a login state for the user terminal to log in to the service system to be accessed.
[0068] Furthermore, the login status generation module determines whether the login request is legal in the following way: obtaining the user login data corresponding to the login request; the user login data includes the login time and login status. Obtaining the offset value between the user login data and the preset function; the preset function is a univariate linear function obtained using the historical login success time and its corresponding historical login success status. The univariate linear function is constructed by the following process: suppose that the data set has a total of p data points, and each data point has d description dimensions xi=(xi1;xi2;xi3…xid), which are written in vector form as f(X)=W T X+b; where xi is the i-th data point, where W=(W1; W2; W3; W4…Wd) is the trained model parameter, W T is the transpose of the matrix, b is the bias of the model, i is a positive integer, p is a positive integer, and d is a positive integer. After determining W and b through training, a univariate linear regression function is constructed.
[0069] Whether the login request is legal is determined according to the offset value.
[0070] Furthermore, the login state generation module determines whether the login request is legal based on the offset value in the following manner: if the offset value is less than a preset offset threshold, the login request is determined to be legal; if the offset value is greater than or equal to the offset threshold, the login request is determined to be illegal.
[0071] In some embodiments, the login authentication device also includes a time threshold control module. The time threshold control module first needs to set the user access timeout. When the user logs in for the first time (it can be determined that it is the same user based on the same IP and MAC address accessed), the user's IP, MAC address and current time are recorded. When the same user visits again, it is necessary to determine whether the time of the user's last visit has exceeded the set user access timeout. If it has not exceeded, it is considered to be a continuous visit by the same user; if it exceeds, it is considered to be a discontinuous visit by the same user. At this time, the user's IP, MAC address and current time are recorded again, and the previous data of this user is deleted. For the same user, only one piece of data information is recorded in this module.
[0072] In some embodiments, the login authentication device also includes a user access information recording module. When the same user logs in, the information of logging into different systems is recorded. For example, if logging into system A, then the user's IP, MAC, logged-in system number A and login time are recorded; for example, if logging into system B, then the user's IP, MAC, logged-in system number B and login time are recorded. When the user has successfully logged into N systems in a continuous visit, the login state generation module is called, where N is a positive integer. When the user is not accessing continuously, all previous data of the user is cleared to ensure that each user has only one set of data. When the user logs in to each business system, separate data is recorded. Logging into multiple business systems will record multiple corresponding data, and there will be no correlation between the multiple data.
[0073] In some embodiments, the login authentication device further includes a threshold setting module. The modeling standard, iteration standard, and offset threshold are set in the threshold setting module. The modeling standard is used to characterize how many times the basic data is obtained before modeling calculations can be performed to generate a univariate linear regression function. The iteration standard is used to characterize how many times it is necessary to perform iterative training based on the collected login data after the set data is increased. The offset threshold is used to compare with the calculated offset value. When the calculated offset value is less than this distance, it is considered to be very close to the direction of successful login, and it can be considered a successful login.
[0074] In some embodiments, the login authentication device further includes a user login status recording module. Based on the number of times user P logs into a system (e.g., system A) within a certain period of time, and the number of times the optimal solution is approached after iteration (successful logins and short time), a login status is generated for user P logging into system A after the number of iterations approaching the optimal solution is matched with a set threshold.
[0075] like Figure 4 As shown, an electronic device according to an embodiment of the present application includes a processor 400 and a memory 401 storing program instructions. Optionally, the electronic device may further include a communication interface 402 and a bus 403. The processor 400, the communication interface 402, and the memory 401 may communicate with each other through the bus 403. The communication interface 402 may be used for information transmission. The processor 400 may call the program instructions in the memory 401 to execute the login authentication method of the above embodiment.
[0076] In addition, the program instructions in the memory 401 can be implemented in the form of software functional units and can be stored in a readable storage medium when sold or used as an independent product.
[0077] Memory 401, as a readable storage medium, can be used to store software programs and executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. Processor 400 executes the program instructions / modules stored in memory 401 to execute functional applications and data processing, thereby implementing the login authentication method in the above-mentioned embodiments.
[0078] The memory 401 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal device. Furthermore, the memory 401 may include high-speed random access memory and non-volatile memory.
[0079] Optionally, the electronic device includes a smart phone, a tablet computer, a computer or a server, etc.
[0080] The traditional business system login authentication system includes multiple business systems, user terminals and an authentication center. When the login authentication method provided in the embodiment of the present application is implemented with an electronic device, the electronic device can be used as an extension device of the business system login authentication system, and the extension device is used to authenticate the login of the user terminal to access the business system. Optionally, a computer or a server is used to implement the login authentication method in the above embodiment. The server can be an application server or a cloud server. A new business system login authentication system is composed of a user terminal, multiple business systems, an authentication center and an extension device implemented using a server. When the business system login authentication system is applied to single sign-on, it can effectively improve the security, stability and fault tolerance of single sign-on.
[0081] In this application, a terminal may be a user equipment (UE) such as a mobile phone, a smart phone, a laptop computer, a digital broadcast receiver, a personal digital assistant (PDA), a tablet computer (PAD), a handheld device, a vehicle-mounted device, a wearable device, a computing device, or other processing device connected to a wireless modem, a mobile station (MS), a mobile terminal, etc. The terminal has the ability to communicate with one or more core networks via a radio access network (RAN).
[0082] The aforementioned readable storage medium may be a transient readable storage medium or a non-transitory readable storage medium.
[0083] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0084] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0085] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0086] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0087] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.
[0088] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.
Claims
1. A login authentication method, It is characterized in that include: In response to a login request from a user terminal to access a service system, determining whether the user terminal is in a logged-in state and whether the login request occurs within a preset access time threshold; If the user terminal is in a logged-in state and the login request occurs within the access time threshold, the login request is authenticated; otherwise, the authentication center is triggered to authenticate the login request; The method also generates a login state for the user terminal to log in to the service system to be accessed in response to a login request of the user terminal to the service system to be accessed; include: Determining whether the login request is a continuous access; In the case where the login request is for continuous access, generating a login state for the user terminal to log in to the service system to be accessed; In the case where the login request is for continuous access, determining whether the login request is legal; If the login request is legal, generating a login state for the user terminal to log in to the service system to be accessed; Determining whether the login request is legal includes: Get the user login data corresponding to the login request; the user login data includes login time and login status; Obtaining an offset value between the user login data and a preset function; the preset function is a univariate linear function obtained by using historical login success time and its corresponding historical login success status; A univariate linear function is constructed as follows: Suppose the data set has a total of p data points, each data point has d description dimensions xi = (xi1; xi2; xi3...xid), written in vector form as f(X) = W T X+b; where xi is the i-th data point, where W = (W1; W2; W3; W4…Wd) is the trained model parameter, W T is the transpose of the matrix, b is the bias of the model, i is a positive integer, p is a positive integer, and d is a positive integer; After determining W and b through training, construct a univariate linear regression function; Whether the login request is legal is determined according to the offset value.
2. The method according to claim 1, It is characterized in that Determining whether the login request is a continuous access includes: When the difference between the first time and the second time is less than a preset time threshold, the login request is determined to be a continuous access; the first time is the time when the login request is received; the second time is the time when the user terminal last logged into the business system; When the difference between the first time and the second time is not less than the preset time threshold, it is determined that the login request is not a continuous access.
3. The method according to claim 1, It is characterized in that Judging whether the login request is legal according to the offset value includes: In a case where the offset value is less than a preset offset threshold, determining that the login request is legal; When the offset value is greater than or equal to the offset threshold, it is determined that the login request is illegal.
4. A login authentication device, It is characterized in that include: A judgment module, configured to judge, in response to a login request from a user terminal to access a service system, whether the user terminal is in a logged-in state and whether the login request occurs within an access time threshold; An authentication module, used for authenticating the login request if the user terminal is in a logged-in state and the login request occurs within an access time threshold; Otherwise, trigger the authentication center to authenticate the login request; The device also includes: A login state generating module, configured to generate a login state for the user terminal to log in to the service system to be accessed in response to a login request of the user terminal to the service system to be accessed; The login state generation module generates a login state for the user terminal to log in to the service system to be accessed in the following manner: Determining whether the login request is a continuous access; In the case where the login request is for continuous access, generating a login state for the user terminal to log in to the service system to be accessed; The login state generation module generates a login state for the user terminal to log in to the service system to be accessed in the following manner when the login request is a continuous access: In the case where the login request is for continuous access, determining whether the login request is legal; If the login request is legal, generating a login state for the user terminal to log in to the service system to be accessed; The login state generation module determines whether the login request is legal by: Get the user login data corresponding to the login request; the user login data includes login time and login status; Obtaining an offset value between the user login data and a preset function; the preset function is a univariate linear function obtained by using historical login success time and its corresponding historical login success status; A univariate linear function is constructed as follows: Suppose the data set has a total of p data points, each data point has d description dimensions xi = (xi1; xi2; xi3...xid), written in vector form as f(X) = W T X+b; where xi is the i-th data point, where W = (W1; W2; W3; W4…Wd) is the trained model parameter, W T is the transpose of the matrix, b is the bias of the model, i is a positive integer, p is a positive integer, and d is a positive integer; After determining W and b through training, construct a univariate linear regression function; Whether the login request is legal is determined according to the offset value.
5. The device according to claim 4, It is characterized in that The login state generation module determines whether the login request is a continuous access in the following manner: In the case where the difference between the first time and the second time is less than a preset time threshold, determining that the login request is a continuous access; the first time is the time when the login request is received; The second time is the time when the user terminal last logged into the business system; When the difference between the first time and the second time is not less than the preset time threshold, it is determined that the login request is not a continuous access.
6. The device according to claim 4, It is characterized in that The login state generation module determines whether the login request is legal according to the offset value in the following manner: In a case where the offset value is less than a preset offset threshold, determining that the login request is legal; When the offset value is greater than or equal to the offset threshold, it is determined that the login request is illegal.
7. An electronic device, It is characterized in that It comprises a processor and a memory storing program instructions, wherein the processor is configured to execute the login authentication method according to any one of claims 1 to 3 when running the program instructions.
8. A computer-readable storage medium, It is characterized in that A computer program is stored thereon; the computer program is executed by a processor to implement the login authentication method as described in any one of claims 1 to 3.
