Login verification method, device, computer equipment, readable storage medium

By combining device identification and validity period with a graphical verification code, the security of single-factor password authentication in existing technologies is not adequate, thus improving the security and convenience of user login.

CN118611931BActive Publication Date: 2026-11-10CHINA CONSTRUCTION BANK +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410729710.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2026-11-10
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

Current user authentication methods rely on passwords as a single factor, resulting in low system information security and vulnerability to illegal attacks.

Method used

A dual detection mechanism combining device identification and device validity period with graphic verification code is adopted. The server first verifies the device identification and validity period. If they match and the device is within the validity period, the server then verifies the account information and graphic verification code.

Benefits of technology

The dual detection mechanism improves the security and convenience of user login, reduces the risk of account theft and device tampering, and ensures the security of system access.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118611931B_ABST
    Figure CN118611931B_ABST
Patent Text Reader

Abstract

This application relates to the field of information security technology, and in particular to a login verification method, apparatus, computer device, computer-readable storage medium, and computer program product. The method includes: receiving an authentication request sent by a client; the authentication request carrying a device identifier, device validity period, account information, and a graphical verification code; the authentication request is sent by the client after successfully verifying the validity of the device identifier; if the device identifier matches a pre-stored identifier and the device validity period is within a preset validity period, verifying the account information and the graphical verification code; if the verification of the account information and the graphical verification code passes, sending a successful verification redirection instruction to the client. This method can improve the security of user login.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and in particular to a login verification method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Technology

[0002] With the rapid development of the internet and the rise of interactive web applications, more and more websites and applications require user login authentication. However, the resulting user information security issues and malicious attacks are also becoming increasingly serious. To ensure user information security and the normal operation of websites, effective user management measures must be implemented.

[0003] User authentication login methods in related technologies generally combine account and password authentication. This method uses only the password as a single factor for authentication, which greatly increases the possibility of the system being attacked illegally, and the system's information security is not high.

[0004] Therefore, how to securely verify user logins has become a crucial task. Summary of the Invention

[0005] Therefore, it is necessary to provide a login verification method, apparatus, computer equipment, computer-readable storage medium, and computer program product to address the aforementioned technical problems.

[0006] Firstly, this application provides a login verification method applied to the server side, including:

[0007] The system receives an authentication request from a client; the authentication request carries a device identifier, device validity period, account information, and a graphical verification code; the authentication request is sent by the client after successfully verifying the validity of the device identifier.

[0008] If the device identifier matches the pre-stored identifier and the device validity period is within the preset validity period, the account information and the graphic verification code are verified.

[0009] If the account information and the CAPTCHA are verified successfully, a successful verification redirection command is sent to the client. In one embodiment, the method further includes:

[0010] If the device identifier is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, the pre-stored identifier and the preset validity period are deleted, and update information is generated and sent to the client; the update information is used to instruct the client to regenerate the device identifier and the device validity period.

[0011] In one embodiment, the method further includes:

[0012] The device identifier and the device validity period sent by the user terminal are received, and the device identifier and the device validity period are stored as the pre-stored identifier and the preset validity period, respectively.

[0013] Secondly, this application provides a login verification method applied to a client, including:

[0014] Obtain login information; the login information includes user information, account information, and a graphical verification code;

[0015] Query the device identifier and device validity period corresponding to the user information, and verify the validity of the user information based on the device identifier and device validity period;

[0016] If the validity verification is successful, an authentication request is sent to the server. The authentication request carries the account information, the CAPTCHA, the device identifier, and the device validity period. The authentication request is used to instruct the server to perform login verification based on the account information and the CAPTCHA after verifying the device identifier and the device validity period.

[0017] In one embodiment, the method further includes:

[0018] If no device identifier or device validity period corresponding to the account information is found, or no update information is received from the server, an SMS verification message is generated and sent to the user's mobile device.

[0019] Receive input verification information and match the input verification information with the SMS verification information;

[0020] If the input verification information matches the SMS verification information, a device identifier and device validity period corresponding to the user information are generated, the device identifier and device validity period are saved, and the device identifier and device validity period are sent to the server.

[0021] In one embodiment, the method further includes:

[0022] Obtain device information; the device information includes at least one of browser type, browser version, and operating system.

[0023] Stability information is obtained by filtering the device information, and the stability information is combined into a string to be processed;

[0024] The device identifier is obtained by performing feature hashing on the string to be processed.

[0025] Thirdly, this application also provides a login verification device, applied on the server side, including:

[0026] The authentication receiving module is used to receive authentication requests sent by the client; the authentication request carries a device identifier, device validity period, account information, and a graphic verification code; the authentication request is sent by the client after successfully verifying the validity of the device identifier;

[0027] The identifier verification module is used to verify the account information and the graphic verification code if the device identifier is consistent with the pre-stored identifier and the device validity period is within the preset validity period.

[0028] The login verification module is used to send a successful verification redirection instruction to the client if the account information and the graphic verification code are verified successfully.

[0029] In one embodiment, the device further includes:

[0030] The verification failure module is used to delete the pre-stored identifier and the preset validity period if the device identifier is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, and generate update information to send to the client; the update information is used to instruct the client to regenerate the device identifier and the device validity period.

[0031] In one embodiment, the device further includes:

[0032] The identifier storage module is used to receive the device identifier and the device validity period sent by the user terminal, and store the device identifier and the device validity period as the pre-stored identifier and the preset validity period, respectively.

[0033] In a fourth aspect, this application also provides a login verification device for use on a client side, comprising:

[0034] The acquisition module is used to acquire login information; the login information includes user information, account information, and a graphic verification code;

[0035] The validity module is used to query the device identifier and device validity period corresponding to the user information, and to verify the validity of the user information based on the device identifier and the device validity period.

[0036] The sending module is used to send an authentication request to the server if the validity verification is successful; the authentication request carries the account information, the graphic verification code, the device identifier, and the device validity period; the authentication request is used to instruct the server to perform login verification based on the account information and the graphic verification code after verifying based on the device identifier and the device validity period.

[0037] In one embodiment, the device further includes:

[0038] The verification generation module is used to generate SMS verification information and send the SMS verification information to the user's mobile device if no device identifier or device validity period corresponding to the account information is found or if the update information sent by the server is received.

[0039] The information verification module is used to receive input verification information and match the input verification information with the SMS verification information;

[0040] The identifier generation module is used to generate a device identifier and a device validity period corresponding to the user information if the input verification information matches the SMS verification information, save the device identifier and the device validity period, and send the device identifier and the device validity period to the server.

[0041] In one embodiment, the identifier generation module further includes:

[0042] An information acquisition unit is used to acquire device information; the device information includes at least one of browser type, browser version, and operating system.

[0043] An information processing unit is used to filter stability information from the device information and combine the stability information into a string to be processed;

[0044] A hashing unit is used to perform feature hashing on the string to be processed to obtain the device identifier.

[0045] Fifthly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method in any of the above embodiments.

[0046] Sixthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method in any of the above embodiments.

[0047] In a seventh aspect, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the methods in any of the above embodiments.

[0048] The aforementioned login verification method, device, computer equipment, computer-readable storage medium, and computer program product first verify the security of the client based on the device identifier and the device validity period. If the device identifier matches the preset identifier and the device validity period is within the preset validity period, the client is considered secure. Therefore, a more convenient verification method is adopted, namely, verifying account information and image verification codes. This dual detection ensures the security of user login while improving the convenience of user login system. Attached Figure Description

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

[0050] Figure 1 This is a diagram illustrating the application environment of the login verification method in one embodiment;

[0051] Figure 2 This is a flowchart illustrating a login verification method in one embodiment;

[0052] Figure 3 This is a flowchart illustrating the login verification method in another embodiment;

[0053] Figure 4 This is a flowchart illustrating a login verification method in an exemplary embodiment.

[0054] Figure 5 This is a structural block diagram of a login verification device in one embodiment;

[0055] Figure 6 This is a structural block diagram of the login verification device in another embodiment;

[0056] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0057] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0058] The login verification method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, client 102 communicates with server 104 via a network. A data storage system stores the data that server 104 needs to process. This data storage system can be integrated onto server 104 or placed on a cloud or other network server. Server 102 obtains login information, including user information, account password, and graphic verification code. It then checks if the user information contains a corresponding device identifier and its corresponding expiration date, and verifies the validity of the user information based on the device identifier and expiration date. If the validity verification passes, an authentication request is sent to the server, carrying the device identifier, device expiration date, account information, and graphic verification code. If the device identifier matches a preset identifier and the device expiration date is within a preset expiration date, the account information and graphic verification code are further verified. If the account information and graphic verification code pass verification, a successful verification redirection command is sent to client 102, and client 102 redirects according to the command. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle systems, and projection devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted displays. Head-mounted displays can be virtual reality (VR) devices, augmented reality (AR) devices, and smart glasses. The server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.

[0059] In one exemplary embodiment, such as Figure 2 As shown, a login verification method is provided, which is applied to... Figure 1 Taking the server-side as an example, the explanation includes the following steps 202 to 206. Wherein:

[0060] Step S202: Receive an authentication request sent by the client; the authentication request carries the device identifier, device validity period, account information, and graphic verification code; the authentication request is sent by the client after successfully verifying the validity of the device identifier.

[0061] In this context, an authentication request refers to a data request sent by the client to the server to verify the user's identity and request access permissions; a device identifier is a unique identifier that marks a device, which can be numbers, letters, strings, codes, or a combination of these elements; and account information refers to various data and attributes related to a user account. This information is used to identify the user, verify the user's identity, and manage the user's permissions and operations in the system, such as the username and password.

[0062] Optionally, the client can verify the validity of the device identifier. For example, the client can search locally for an identifier that corresponds to the account information. If it exists, the client can further verify whether the device identifier is within the device's validity period. If the device identifier is within the device's validity period, the client's verification of the device identifier's validity is successful.

[0063] For example, assuming a user has previously logged in on client 1, a device identifier corresponding to the account information exists locally on the client. For instance, the account is AAAA, and the corresponding device identifier is 10GA. When the user logs in on client 1 again and enters their account information, the client queries the device associated with the account. Since the client already has a device identifier bound to the account, the client contains the account AAAA and its corresponding device identifier 10GA, and the device identifier is within its validity period. Therefore, the client's verification of the device identifier's validity is successful. Afterward, the client sends an authentication request, which includes the device identifier, device validity period, account information, and a CAPTCHA. The server further verifies the device identifier, device validity period, account information, and CAPTCHA carried in the authentication request to ensure the security of the login verification.

[0064] Step S204: If the device identifier matches the pre-stored identifier and the device validity period is within the preset validity period, verify the account information and the graphic verification code.

[0065] Among them, the pre-stored identifier refers to the device identifier information that is pre-stored on the client. This pre-stored identifier is usually used to compare with the device identifier sent by the client to verify the security of the client; the preset valid time period unit refers to the preset time limit used to determine the validity period of the device identifier.

[0066] The server compares the device identifier with a preset identifier stored on the server. If they match, it checks if the device identifier is within a preset validity period. If both match and are valid, the device is considered secure. This is because a match indicates the user hasn't changed their device, reducing the risk of account theft or device tampering. Furthermore, a valid validity period means the identifier is up-to-date, minimizing the risk of using or discarding old identifiers. Older identifiers may become insecure over time due to potential leaks or breaches; setting an expiration date ensures they become invalid after a certain period. Additionally, if an attacker obtains an expired device identifier, they cannot use it to access the system.

[0067] Since the server has already preliminarily determined that the device is secure by whether the device identifier matches the pre-stored identifier and whether the device identifier is within the preset validity period, a more convenient method is then used to verify login access.

[0068] Step S206: If the account information and graphic verification code are verified successfully, a redirection command is sent to the client to indicate successful verification.

[0069] Optionally, the server compares the account information with pre-stored account information in the database, checking if the account and password match those stored in the database. Simultaneously, the server verifies the image verification code, checking if the image verification code submitted by the user matches the image verification code generated by the server and required from the user. If the account information and image verification code pass verification, a successful verification redirection command is sent to the client, allowing the client to access the target system.

[0070] In the above login verification method, the server first performs security verification on the client based on the device identifier and the device validity period. If the device identifier matches the preset identifier and the device validity period is within the preset validity period, it proves that the client is secure. Therefore, a more convenient verification method is adopted, namely, verifying account information and image verification code. This can ensure the security of user login through dual detection, while improving the convenience of user login system.

[0071] In one embodiment, the method further includes: if the device identifier is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, deleting the pre-stored flag and the preset validity period, and generating update information and sending it to the client; the update information is used to instruct the client to regenerate the device identifier and the device validity period.

[0072] Optionally, when the server detects a discrepancy between the device identifier and the pre-stored identifier, it means the device has been replaced or the device identifier has been tampered with. When the server detects that the device identifier is outside its preset validity period, it means the user has not logged in for an extended period, and the server may need to re-verify the user's identity. Therefore, the server will delete the pre-stored identifier to prevent unauthorized devices or malicious users from accessing the site using old identifier information, and send update information to the client to instruct the client to regenerate the device identifier and device validity period.

[0073] When the server detects that the device identifier matches the pre-stored identifier or that the device validity period is not within the preset validity period, it indicates that the server's security check on the client fails. In this case, the client needs to use a more secure verification method to perform security checks on the user.

[0074] This ensures the correctness of device identification and validity period, prevents unauthorized or expired clients from accessing system resources, and ensures the timeliness and validity of device identification by forcing clients to regenerate identification and validity period when they do not match.

[0075] In one embodiment, the method further includes: receiving a device identifier and a device validity period sent by a user terminal, and storing the device identifier and the device validity period as a pre-stored identifier and a preset validity period, respectively.

[0076] After the server sends update information to the client, the client regenerates the device identifier and device validity period, and sends the regenerated device identifier and device validity period back to the server. Upon receiving this, the server stores the device identifier and device validity period as a pre-stored identifier and a preset validity period, respectively. This allows the server to dynamically update the pre-stored identifier, which helps manage and control client access permissions.

[0077] For example, a user previously logged in on device A, then switched to device B, and subsequently logged in again on client A. Client A has a device identifier corresponding to the user's information, so the client's verification of the user passes. However, the user also previously logged in on client B. Therefore, when the user logs in through client B, the client does not have a device identifier or device validity period corresponding to the account information. Client B needs to send SMS verification information to the user's mobile device and generate a device identifier and device validity period. Simultaneously, client B sends the device identifier and device validity period to the server. The server then saves the device identifier and device validity period sent by the client as a pre-stored identifier and preset validity period. At this point, the preset identifier and preset validity period in the server are inconsistent with the device identifier and device validity period sent by device A. The server then sends update information to the client, instructing the client to verify the SMS verification information and regenerate the device identifier and device validity period.

[0078] In one exemplary embodiment, such as Figure 3 As shown, a login verification method is provided, which is applied to... Figure 1 The following steps are used as an example of the client in the example, including steps 302 to 306.

[0079] Step S302: Obtain login information; login information includes account information and graphic verification code.

[0080] When a user logs into the target system, they will be prompted to enter their account information and an image verification code on the login screen. The account information includes the user's username and password.

[0081] Step S304: Query the device identifier and device validity period corresponding to the account information, and verify the validity of the account information based on the device validity period corresponding to the device identifier.

[0082] After obtaining the account information, the client will check whether there is a device identifier and device validity period corresponding to the account information on the client's local machine. If there is, the client will verify the validity of the user account based on the device identifier and device validity period.

[0083] Specifically, the client verifies the validity of account information based on the device identifier and device validity period by determining whether the time difference between the user's current login time and the previous login time is within the device's validity period. If it is within the validity period, the validity verification is considered successful.

[0084] Step S306: If the validity verification passes, an authentication request is sent to the server. The authentication request carries account information, a graphical verification code, a device identifier, and a device validity period. The authentication request is used to instruct the server to perform login verification based on the account information and the graphical verification code after verifying the device identifier and the device validity period.

[0085] If the client successfully verifies the validity of the account information, it sends an authentication request to the server, sending the user-entered account information, the CAPTCHA, and the device identifier and validity period retrieved by the client to the server. The server then verifies the device identifier and validity period, and finally verifies the login based on the account information and the CAPTCHA.

[0086] In the above embodiments, the client verifies the device identifier, which can promptly detect whether the user has changed the client login, thereby ensuring the security of the client, and sending an authentication request to the server under the premise of client security.

[0087] In one embodiment, if no device identifier corresponding to the user information is found, or the device identifier is not within the device validity period, or if the update information sent by the server is received, SMS verification information is generated and sent to the user's mobile device; input verification information is received and matched with the SMS verification information; if the input verification information matches the SMS verification information and the user information is verified, a device identifier and device validity period corresponding to the user information are generated, the device identifier and device validity period are saved, and the device identifier and device validity period are sent to the server.

[0088] The input verification information is generated by the user after receiving SMS verification information through their mobile device.

[0089] Optionally, if the client cannot find the device identifier or the device validity period is not within the preset time period, the user may be logging in for the first time on the device, or the user may be logging in on a different device, or the user's login time limit on the device may have expired. In this case, the client considers there to be a security risk and therefore needs to send SMS verification information to the mobile device for further verification.

[0090] Optionally, when the client receives update information from the server—that is, when the device identifier existing in the client is inconsistent with the one sent by the server (for example, a user previously logged in on device A, then switched to device B, and then logged in again on client A), the client's verification of the user's device identifier, which corresponds to the user information, fails. However, since the client generated a new device identifier when the user logged in on client B and synchronized it with the server, the server's verification of the device identifier and device validity period sent by client A fails when logging in again. At this point, the server considers this a security risk and sends update information to the client, requiring the client to send SMS verification information to the mobile device for further verification.

[0091] Optionally, the client generates an SMS verification code and sends it to the user's bound mobile device (i.e., the user's mobile device) via an SMS gateway. The user enters the verification code and submits it to the client for matching and verification. Simultaneously, the client verifies the customer information, for example, the customer's password. If the match and verification are successful, a new device identifier and device validity period are regenerated and saved, and the regenerated device identifier and validity period are sent to the server.

[0092] Optionally, when the client sends the device identifier and device validity period to the server, the device identifier and device validity period need to be encrypted to prevent third parties from obtaining the device identifier and device validity period.

[0093] In the above embodiments, when no device identifier is found, the user may be logging in for the first time or logging in from a different device, indicating that the login device is not secure enough. Therefore, a two-factor authentication method using a password and SMS verification code with higher security is adopted to ensure the security of the client.

[0094] In one embodiment, device information is obtained; the device information includes at least one of browser type, browser version, and operating system; stability information is obtained by filtering from the device information, and the stability information is combined into a string to be processed; the string to be processed is subjected to feature hashing to obtain the device identifier.

[0095] Device information refers to the device information used by the user when logging into the system. Stable information is then filtered from the device information. Stable information refers to information that does not change frequently, such as the operating system type, rather than information that can be updated frequently, such as the browser version.

[0096] Alternatively, by analyzing different attributes of the device information, it can be determined which attributes are relatively stable throughout the device's lifecycle. For example, analyzing CPU model, memory size, operating system version, etc., allows for the selection of attributes that do not change frequently in most cases.

[0097] Optionally, a set of device attributes considered stable can be predefined. For example, CPU model, memory size, operating system version, etc., can be added to a whitelist as filtering criteria.

[0098] Optionally, machine learning models can be used to analyze and filter stability information. Large samples of device information can be collected to train models to predict which combinations of attributes are stable throughout the device's lifecycle. Common methods include classification and clustering algorithms.

[0099] Optionally, the filtered stability information is combined into a string in a predetermined order, with each piece of information separated by a delimiter. This step requires ensuring that the order is consistent to guarantee that the combined strings for the same device are always consistent. For example, assuming the stability information includes: CPU model: Intel(R) Core(TM) i7-9700K, memory size: 16GB, operating system type and version: Windows 10 Pro 64-bit, browser type and version: Chrome 90.0.4430.212, and network card MAC address: 00-14-22-01-23-45, then the string to be processed would be: Intel(R) Core(TM) i7-9700K|16GB|Windows 10 Pro 64-bit|Chrome 90.0.4430.212|00-14-22-01-23-45.

[0100] Optionally, the generated string to be processed is then hashed to generate a unique device identifier. For example, a hash function is selected; commonly used hash functions include SHA-256 and MD5. The string to be processed is then input into the selected hash algorithm, which processes the input data and generates a fixed-length hash value.

[0101] In the above embodiments, by filtering stable device information from device information, a relatively unchanging device identifier can be created, which helps prevent identity forgery and improve system security.

[0102] In one exemplary embodiment, combined with Figure 4 , Figure 4 This is a flowchart of the login verification method in one embodiment.

[0103] S402. When a user logs in on the device, the device identifier and device validity period are verified. If the device identifier has been generated and exists on the front end and is within the validity period, the verification passes and proceeds to step S404; otherwise, the verification fails and proceeds to step S410.

[0104] S404. When the verification in S402 is successful, the client login page uses a two-factor authentication strategy of password + GVC to verify the user. After initiating the authentication request, the server receives the device identifier and device validity information transmitted by the client, and performs a consistency check with the device identifier and device validity information pre-stored on the server. If the information is consistent, the verification passes and proceeds to step S406; if the information is inconsistent, the verification fails and proceeds to step S408.

[0105] S406, the backend server user management module, verifies the accuracy of the user's account and password; it also verifies the accuracy of the transmitted graphic verification code. If the verification passes, the user authentication is successful, and the process proceeds to S7; otherwise, the user login fails, and the process proceeds to S416, returning to S402 for user login authentication again.

[0106] S408. Delete the user's device identification information and device validity information on the current device, and proceed to step S410.

[0107] S410: The front-end regenerates the unique device identifier and device validity period information for the current device. The server-side login page uses a two-factor authentication strategy of password + SMS verification information to verify the user. After initiating the authentication request, the server receives the device identifier, device validity period information, and user's account and password information transmitted by the client. The server-side user management module verifies the accuracy of the user's account and password; it also verifies the accuracy of the transmitted SMS verification code. If the verification passes, proceed to S412; otherwise, proceed to S416 and return to S402 for user login authentication.

[0108] S412. The client binds the generated device identifier and device validity information to the currently logged-in user information and stores it locally on the device; the server binds the generated device identifier and device validity information to the currently logged-in user information and stores it on the server. Jump to S414.

[0109] S414. User authentication successful. Log in to the system.

[0110] S416. User authentication failed. Please re-authenticate.

[0111] Continue to combine Figure 4 In one embodiment, an embodiment is provided in which a user logs in for the first time on client A and logs in again on client A.

[0112] (1) When a user logs in to client A for the first time, there is no device identifier bound to the current account on client A. Therefore, the S402 verification fails and the user is redirected to S410. Client A generates the device identifier bound to the account and verifies the correctness of the account password and SMS verification code. If the verification passes, the user is redirected to S412. Client A stores the device identifier information bound to the current account locally and transmits it to the backend server. At the same time, the server also stores the device identifier information of the current account.

[0113] (2) When a user logs in again on client A without logging in on another device, the device identifier information bound to the account already exists on client A. Therefore, the user is redirected to S404. After initiating a login request, the backend first verifies the consistency between the device identifier information bound to the current account transmitted by client A and the device identifier information stored on the server. At this time, the account has not logged in on another device, so the information is consistent. Therefore, the device identifier verification passes, and the user is redirected to S406 to verify the correctness of the account password and graphic verification code. If the verification passes, the user authentication is successful.

[0114] Continue to combine Figure 4 In one embodiment, an embodiment is provided in which a user has logged in on client A and also logged in on client B.

[0115] (1) When a user logs in to client B for the first time, the device identifier bound to the current account does not exist on client B. Therefore, the S402 verification fails and the user is redirected to S410 to generate the device identifier bound to the account and to verify the correctness of the account password and SMS verification code.

[0116] (2) After verification, the system jumps to S412. Client B binds the generated device identification information to the current account and stores it, while also transmitting the device identification information to the server. At this time, the server already has the device identification information of client A bound to the current account, so it will delete the data and store the device identification information of client B bound to the current account.

[0117] Continue to combine Figure 4 In one embodiment, an example is provided where a user logs in on client A after having already logged in on client A and on client B.

[0118] (1) When the user logs in to client A again, the front end has the device identifier bound to the current account. If the device is within the validity period, the S402 verification passes and the user is redirected to S404; otherwise, the verification fails and the user is redirected to S5. The subsequent steps are similar to those in scenario 1.

[0119] (2) After the frontend initiates a login request in S404, the backend first verifies the consistency between the device identifier of the current account bound to the frontend and the device identifier stored on the server. Since the user has already logged in on client B before this login, the data stored on the backend server at this time is the device identifier of client B bound to the current account. The consistency verification fails. Redirect to S408.

[0120] (3) After receiving the login authentication failure message, the front end clears the current account device identifier stored in client A and jumps to S410 to perform user login authentication using a two-factor authentication strategy of password + SMS verification code.

[0121] In the above embodiments, by adding a device identifier bound to the account, a security check is performed on the user's login device and reverse-engineering. When the login device is not secure enough, a two-factor authentication method of password + SMS verification code is used for higher security; when the login device has passed security verification, a more convenient two-factor authentication method of password + image verification code is used. This improves the security of user login on the one hand, reduces the possibility of malicious attacks on account login on the other hand, and also greatly improves the ease of use of the system for users.

[0122] In one exemplary embodiment, it should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be performed alternately or in turn with other steps or at least a portion of the steps or stages of other steps.

[0123] Based on the same inventive concept, this application also provides a login verification device for implementing the login verification method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more login verification device embodiments provided below can be found in the limitations of the login verification method described above, and will not be repeated here.

[0124] In one exemplary embodiment, such as Figure 5 As shown, a login verification device is provided, including: an authentication receiving module 510, an identifier verification module 520, and a login verification module 530, wherein:

[0125] The authentication receiving module 510 is used to receive authentication requests sent by the client. The authentication request carries the device identifier, device validity period, account information, and graphic verification code. The authentication request is sent by the client after successfully verifying the validity of the device identifier.

[0126] The identifier verification module 520 is used to verify the account information and graphic verification code if the device identifier is consistent with the pre-stored identifier and the device validity period is within the preset validity period.

[0127] The login verification module 530 is used to send a successful verification redirection command to the client if the account information and graphic verification code are verified successfully.

[0128] In one embodiment, the above-described apparatus further includes:

[0129] The verification failure module is used to delete the pre-stored identifier and the preset validity period if the device identifier is inconsistent with the pre-stored identifier or the device validity period is not within the preset validity period, and to generate update information and send it to the client; the update information is used to instruct the client to regenerate the device identifier and the device validity period.

[0130] In one embodiment, the above-described apparatus further includes:

[0131] The identifier storage module is used to receive the device identifier and device validity period sent by the user terminal, and store the device identifier and device validity period as the pre-stored identifier and the preset validity period, respectively.

[0132] In one exemplary embodiment, such as Figure 6 As shown, a login verification device is provided, including: an acquisition module 610, a validity module 620, and a sending module 630, wherein:

[0133] The acquisition module 610 is used to acquire login information; the login information includes user information, account information, and graphic verification code;

[0134] The validity module 620 is used to query the device identifier and device validity period corresponding to the user information, and to verify the validity of the user information based on the device identifier and device validity period.

[0135] The sending module 630 is used to send an authentication request to the server if the validity verification is successful. The authentication request carries account information, graphic verification code, device identifier and device validity period. The authentication request is used to instruct the server to perform login verification based on account information and graphic verification code after verifying based on device identifier and device validity period.

[0136] In one embodiment, the above-described apparatus further includes:

[0137] The verification generation module is used to generate SMS verification information and send it to the user's mobile device if no device identifier or device validity period corresponding to the user information is found or if the update information sent by the server is received.

[0138] The information verification module is used to receive input verification information and match the input verification information with SMS verification information;

[0139] The identifier generation module is used to generate a device identifier and device validity period corresponding to the user information if the input verification information matches the SMS verification information, save the device identifier and device validity period, and send the device identifier and device validity period to the server.

[0140] In one embodiment, the identifier generation module further includes:

[0141] The information acquisition unit is used to acquire device information; the device information includes at least one of browser type, browser version, and operating system.

[0142] The information processing unit is used to filter out stability information from the device information and combine the stability information into a string to be processed;

[0143] The hashing unit is used to perform feature hashing on the string to be processed to obtain the device identifier.

[0144] Each module in the aforementioned login verification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0145] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 7As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores device identifiers and device expiration dates. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a login authentication method.

[0146] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0147] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: receiving an authentication request sent by a client; the authentication request carries a device identifier, a device validity period, account information, and a graphical verification code; the authentication request is sent by the client after successfully verifying the validity of the device identifier; if the device identifier matches a pre-stored identifier and the device validity period is within a preset validity period, the account information and the graphical verification code are verified; if the verification of the account information and the graphical verification code passes, a successful verification redirection instruction is sent to the client.

[0148] In one embodiment, when the processor executes the computer program, it further performs the following steps: if the device identifier is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, delete the pre-stored identifier and the preset validity period, and generate update information and send it to the client; the update information is used to instruct the client to verify the SMS verification information and regenerate the device identifier and the device validity period.

[0149] In one embodiment, when the processor executes the computer program, it further performs the following steps: receiving a device identifier and a device validity period sent by the user terminal, and storing the device identifier and the device validity period as a pre-stored identifier and a preset validity period, respectively.

[0150] In one exemplary embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: obtaining login information; the login information includes account information and a graphical verification code; querying a device identifier corresponding to the account information, and verifying the validity of the account information based on the device validity period corresponding to the device identifier; if the validity verification is successful, sending an authentication request to the server; the authentication request carries the account information, the graphical verification code, the device identifier, and the device validity period; the authentication request is used to instruct the server to perform login verification based on the account information and the graphical verification code after verifying based on the device identifier and the device validity period.

[0151] In one embodiment, when the processor executes the computer program, it further performs the following steps: if no device identifier corresponding to the account information is found, or the device identifier is not within the device validity period, or if the server sends update information, it generates SMS verification information and sends the SMS verification information to the user's mobile device; it receives input verification information and matches the input verification information with the SMS verification information; if the input verification information matches the SMS verification information and the user information is verified, it generates a device identifier and a device validity period corresponding to the user information, saves the device identifier and the device validity period, and sends the device identifier and the device validity period to the server.

[0152] In one embodiment, when the processor executes the computer program, it further performs the following steps: generating a device identifier corresponding to the user information, including: obtaining device information; the device information includes at least one of browser type, browser version, and operating system; filtering stability information from the device information and combining the stability information into a string to be processed; performing feature hashing on the string to be processed to obtain the device identifier.

[0153] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the function of receiving an authentication request sent by a client. The authentication request carries a device identifier, a device validity period, account information, and a graphical verification code. The authentication request is sent by the client after successfully verifying the validity of the device identifier. If the device identifier matches a pre-stored identifier and the device validity period is within a preset validity period, the account information and the graphical verification code are verified. If the verification of the account information and the graphical verification code passes, a successful verification redirection instruction is sent to the client.

[0154] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the device identifier is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, delete the pre-stored identifier and the preset validity period, and generate update information and send it to the client; the update information is used to instruct the client to verify the SMS verification information and regenerate the device identifier and the device validity period.

[0155] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: receiving a device identifier and a device validity period sent by the user terminal, and storing the device identifier and the device validity period as a pre-stored identifier and a preset validity period, respectively.

[0156] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it retrieves login information, including account information and a graphical verification code. The program queries a device identifier corresponding to the account information and verifies the validity of the account information based on the device validity period corresponding to the device identifier. If the validity verification passes, an authentication request is sent to the server. The authentication request carries the account information, the graphical verification code, the device identifier, and the device validity period. The authentication request instructs the server to perform login verification based on the account information and the graphical verification code after verifying the device information based on the device identifier and the device validity period.

[0157] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if no device identifier corresponding to the account information is found, or the device identifier is not within the device validity period, or if the update information sent by the server is received, generate SMS verification information and send the SMS verification information to the user's mobile device; receive input verification information and match the input verification information with the SMS verification information; if the input verification information matches the SMS verification information and the user information is verified, generate a device identifier and device validity period corresponding to the user information, save the device identifier and device validity period, and send the device identifier and device validity period to the server.

[0158] In one embodiment, when the computer program is executed by a processor, it further performs the following steps: obtaining device information; the device information includes at least one of browser type, browser version, and operating system; filtering stability information from the device information and combining the stability information into a string to be processed; performing feature hashing on the string to be processed to obtain a device identifier. In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, receives an authentication request sent by a client; the authentication request carries a device identifier, device validity period, account information, and a graphical verification code; the authentication request is sent by the client after successfully verifying the validity of the device identifier; if the device identifier matches a pre-stored identifier and the device validity period is within a preset validity period, the account information and the graphical verification code are verified; if the verification of the account information and the graphical verification code passes, a successful verification redirection instruction is sent to the client.

[0159] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if the device identifier is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, delete the pre-stored identifier and the preset validity period, and generate update information and send it to the client; the update information is used to instruct the client to verify the SMS verification information and regenerate the device identifier and the device validity period.

[0160] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: receiving a device identifier and a device validity period sent by the user terminal, and storing the device identifier and the device validity period as a pre-stored identifier and a preset validity period, respectively.

[0161] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, acquires login information; the login information includes account information and a graphical verification code; queries a device identifier corresponding to the account information, and verifies the validity of the account information based on the device validity period corresponding to the device identifier; if the validity verification passes, an authentication request is sent to the server; the authentication request carries the account information, the graphical verification code, the device identifier, and the device validity period; the authentication request is used to instruct the server to perform login verification based on the account information and the graphical verification code after verifying based on the device identifier and the device validity period.

[0162] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: if no device identifier corresponding to the account information is found, or the device identifier is not within the device validity period, or if the update information sent by the server is received, generate SMS verification information and send the SMS verification information to the user's mobile device; receive input verification information and match the input verification information with the SMS verification information; if the input verification information matches the SMS verification information and the user information is verified, generate a device identifier and device validity period corresponding to the user information, save the device identifier and device validity period, and send the device identifier and device validity period to the server.

[0163] In one embodiment, when the computer program is executed by the processor, it further performs the following steps: generating a device identifier corresponding to the user information, including: obtaining device information; the device information includes at least one of browser type, browser version, and operating system; filtering stability information from the device information and combining the stability information into a string to be processed; performing feature hashing on the string to be processed to obtain the device identifier.

[0164] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0165] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0166] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A login verification method, characterized in that, Applied to the server side, the method includes: The system receives an authentication request from a client; the authentication request carries a device identifier, device validity period, account information, and a graphical verification code; the authentication request is sent by the client after successfully validating the device identifier; the client's validation of the device identifier is used to verify whether the user has changed the client for login; before sending the authentication request to the server, the system further includes: obtaining login information, querying the corresponding device identifier based on the account information in the login information, and validating the account information based on the device identifier; if no device identifier corresponding to the account information is found, or the device identifier is not within the device validity period, or if the system receives update information from the server, generating SMS verification information and sending the SMS verification information to the user's mobile device; receiving input verification information and sending the input... The input verification information is matched with the SMS verification information; if the input verification information matches the SMS verification information and the account information is verified successfully, a device identifier and device validity period corresponding to the account information are generated, the device identifier and device validity period are saved, and the device identifier and device validity period are sent to the server; the process of generating the device identifier corresponding to the account information includes: obtaining device information; the device information includes at least one of browser type, browser version, and operating system; filtering stability information from the device information using a machine learning model, and combining the stability information into a string to be processed in a predetermined order; wherein, the stability information between the strings to be processed is separated by a delimiter; performing feature hashing on the strings to be processed to obtain the device identifier; If the device identifier matches the pre-stored identifier and the device validity period is within the preset validity period, the account information and the graphic verification code are verified. If the account information and the graphic verification code are verified successfully, a redirect instruction for successful verification is sent to the client.

2. The login verification method according to claim 1, characterized in that, The method further includes: If the device identifier is inconsistent with the pre-stored identifier or the device validity period is not within the preset validity period, the pre-stored identifier and the preset validity period are deleted, and update information is generated and sent to the client; the update information is used to instruct the client to verify the SMS verification information and regenerate the device identifier and the device validity period.

3. The login verification method according to claim 2, characterized in that, The method further includes: The device identifier and the device validity period sent by the user terminal are received, and the device identifier and the device validity period are stored as the pre-stored identifier and the preset validity period, respectively.

4. A login verification method, characterized in that, Applied to a client, the method includes: Obtain login information; the login information includes account information and a graphic verification code; The system queries the device identifier corresponding to the account information and verifies the validity of the account information based on the device validity period corresponding to the device identifier; the validity verification is used to verify whether the user has changed the client to log in. If the validity verification passes, an authentication request is sent to the server; the authentication request carries the account information, a CAPTCHA, the device identifier, and the device validity period; the authentication request instructs the server to perform login verification based on the account information and the CAPTCHA after verifying the device identifier and device validity period; the method further includes: If no device identifier corresponding to the account information is found, or the device identifier is not within the validity period of the device, or if the update information sent by the server is received, an SMS verification message is generated and sent to the user's mobile device. Receive input verification information and match the input verification information with the SMS verification information; If the input verification information matches the SMS verification information and the account information is verified, a device identifier and device validity period corresponding to the account information are generated, the device identifier and device validity period are saved, and the device identifier and device validity period are sent to the server. The generation of the device identifier corresponding to the account information includes: Obtain device information; the device information includes at least one of browser type, browser version, and operating system. Stability information is obtained by filtering from the device information using a machine learning model, and the stability information is combined into a string to be processed in a predetermined order; wherein, the stability information in the string to be processed is separated by a delimiter. The device identifier is obtained by performing feature hashing on the string to be processed.

5. A login verification device, characterized in that, Applied to the server side, the device includes: An authentication receiving module is used to receive authentication requests sent by a client. The authentication request carries a device identifier, device validity period, account information, and a graphical verification code. The authentication request is sent by the client after successfully validating the device identifier. The client's validation of the device identifier is used to verify whether the user has changed the client for login. Before sending the authentication request to the server, the module further includes: obtaining login information, querying the corresponding device identifier based on the account information in the login information, and validating the account information based on the device identifier; if no device identifier corresponding to the account information is found, or the device identifier is not within the device validity period, or if the server sends update information, generating SMS verification information and sending the SMS verification information to the user's mobile device; receiving input verification information, and... The input verification information is matched with the SMS verification information; if the input verification information matches the SMS verification information and the account information is verified, a device identifier and device validity period corresponding to the account information are generated, the device identifier and device validity period are saved, and the device identifier and device validity period are sent to the server; the process of generating the device identifier corresponding to the account information includes: obtaining device information; the device information includes at least one of browser type, browser version, and operating system; filtering stability information from the device information using a machine learning model, and combining the stability information into a string to be processed in a predetermined order; wherein, the stability information between the strings to be processed is separated by a delimiter; performing feature hashing on the strings to be processed to obtain the device identifier; The identifier verification module is used to verify the account information and the graphic verification code if the device identifier is consistent with the pre-stored identifier and the device validity period is within the preset validity period. The login verification module is used to send a successful verification redirection instruction to the client if the account information and the graphic verification code are verified successfully.

6. The login verification device according to claim 5, characterized in that, The device further includes: The verification failure module is used to delete the pre-stored identifier and the preset validity period if the device identifier is inconsistent with the pre-stored identifier or the device validity period is not within the preset validity period, and generate update information to send to the client; the update information is used to instruct the client to verify the SMS verification information and regenerate the device identifier and the device validity period.

7. The login verification device according to claim 6, characterized in that, The device further includes: The identifier storage module is used to receive the device identifier and the device validity period sent by the user terminal, and store the device identifier and the device validity period as the pre-stored identifier and the preset validity period, respectively.

8. A login verification device, characterized in that, Applied to a client, the device includes: The acquisition module is used to acquire login information; the login information includes account information and a graphic verification code; The validity module is used to query the device identifier and device validity period corresponding to the account information, and to verify the validity of the account information based on the device identifier and device validity period; the validity verification is used to verify whether the user has changed the client to log in; A sending module is configured to send an authentication request to the server if the validity verification is successful; the authentication request carries the account information, a graphical verification code, the device identifier, and the device validity period; the authentication request is used to instruct the server to perform login verification based on the account information and the graphical verification code after verifying based on the device identifier and the device validity period; the device further includes: The verification generation module is used to generate SMS verification information and send the SMS verification information to the user's mobile device if no device identifier or device validity period corresponding to the account information is found or if the update information sent by the server is received. The information verification module is used to receive input verification information and match the input verification information with the SMS verification information; The identifier generation module is used to generate a device identifier and device validity period corresponding to the account information if the input verification information matches the SMS verification information, save the device identifier and device validity period, and send the device identifier and device validity period to the server. The identifier generation module includes: An information acquisition unit is used to acquire device information; the device information includes at least one of browser type, browser version, and operating system. An information processing unit is used to filter stability information from the device information using a machine learning model, and combine the stability information into a string to be processed in a predetermined order; wherein, the stability information in the string to be processed is separated by a delimiter. A hashing unit is used to perform feature hashing on the string to be processed to obtain the device identifier.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3 or 4.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3 or 4.

11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3 or 4.

Citation Information

Patent Citations

  • Metacosmic application login method and device, electronic equipment and storage medium

    CN116756725A