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

Through the dual verification method of device identification and validity period, combined with account information and graphic verification code, the problem of low information security caused by single-factor authentication in the existing technology is solved, and the security and convenience of user login are improved.

CN118611931AActive Publication Date: 2024-09-06CHINA CONSTRUCTION BANK +1

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, user login authentication methods only rely on passwords as single-factor authentication, resulting in low security of system information and vulnerability to illegal attacks.

Method used

Using a dual verification method of device identification and device validity period, combined with account information and graphic verification code, through collaboration between the server and the client, the device identification and validity period are verified and updated to ensure the security and convenience of user login. sex.

Benefits of technology

Through double detection of device identification and validity period, the security of user login is enhanced, the risk of account theft or device tampering is reduced, and the convenience of user login is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118611931A
    Figure CN118611931A
Patent Text Reader

Abstract

The invention relates to the technical field of information security, in particular to a login verification method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises 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 graphic verification code; the authentication request is sent after the client successfully verifies the validity of a device identifier; if the equipment identifier is consistent with a pre-stored identifier and the equipment validity period is within a preset validity period, verifying the account information and the graphic verification code; and if the verification of the account information and the graphic verification code is passed, sending a skipping instruction of successful verification to the client. By adopting the method, the security of user login can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present 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 Art

[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 becoming increasingly serious. In order to ensure user information security and the normal operation of the website, effective user management measures must be taken.

[0003] The user authentication login method in the related art generally combines the account and password authentication method. This method only uses the password as a single factor for authentication, which greatly increases the possibility of the system being subjected to illegal attacks and the information security of the system is not high.

[0004] Therefore, how to verify user login security becomes a crucial task. Summary of the invention

[0005] Based on this, it is necessary to provide a login verification method, device, computer equipment, computer readable storage medium and computer program product to address the above technical problems.

[0006] In a first aspect, the present application provides a login verification method, which is applied to a server, including:

[0007] Receive an authentication request sent by a client; the authentication request carries a device identifier, a 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;

[0008] If the device identification is consistent with the pre-stored identification and the device validity period is within the preset validity period, verify the account information and the graphic verification code;

[0009] If the account information and the graphic verification code are verified, a jump instruction indicating successful verification is sent to the client. In one embodiment, the method further includes:

[0010] If the device identification is inconsistent with the pre-stored mark or the device validity period is not within the preset validity period, the pre-stored identification 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 identification and the device validity period.

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

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

[0013] In a second aspect, the present application provides a login verification method, which is applied to a client, comprising:

[0014] Obtaining login information; the login information includes user information, the account information and a graphic verification code;

[0015] Querying the device identification and device validity period corresponding to the user information, and verifying the validity of the user information according to the device identification and the 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 graphic verification code, the device identification and the device validity period; the authentication request is used to instruct the server to perform login verification according to the account information and the graphic verification code after verification according to the device identification and the device validity period.

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

[0018] If the device identifier or device validity period corresponding to the account information is not found or the update information sent by the server is not received, SMS verification information is generated and sent to the user's mobile device;

[0019] Receiving input verification information, and matching the input verification information with the SMS verification information;

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

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

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

[0023] Filtering the stability information from the device information, and combining the stability information into a character string to be processed;

[0024] Perform feature hashing on the character string to be processed to obtain the device identification.

[0025] In a third aspect, the present application also provides a login verification device, which is applied to a server, including:

[0026] An authentication receiving module, used to receive an authentication request sent by a client; the authentication request carries a device identifier, a 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] An identification verification module, configured to verify the account information and the graphic verification code if the device identification is consistent with a pre-stored identification and the device validity period is within a preset validity period;

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

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

[0030] A 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 regenerate the device identifier and the device validity period.

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

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

[0033] In a fourth aspect, the present application further provides a login verification device, applied to a client, comprising:

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

[0035] A validity module, used to query the device identification and device validity period corresponding to the user information, and verify the validity of the user information according to the device identification and the device validity period;

[0036] A sending module, used for sending an authentication request to a server if the validity verification is successful; the authentication request carries the account information, the graphic verification code, the device identification and the device validity period; the authentication request is used to instruct the server to perform login verification according to the account information and the graphic verification code after verification according to the device identification and the device validity period.

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

[0038] A verification generation module, for generating SMS verification information if the device identification or device validity period corresponding to the account information is not found or the update information sent by the server is received, and sending the SMS verification information to the user's mobile device;

[0039] An information verification module, used for receiving input verification information and matching the input verification information with the SMS verification information;

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

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

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

[0043] An information processing unit, used for filtering stability information from the device information and combining the stability information into a character string to be processed;

[0044] The hashing unit is used to perform feature hashing on the character string to be processed to obtain the device identification.

[0045] In a fifth aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method in any one of the above embodiments when executing the computer program.

[0046] In a sixth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method in any one of the above embodiments are implemented.

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

[0048] In the above-mentioned login verification method, device, computer equipment, computer-readable storage medium and computer program product, the server first performs security verification on the client based on the device identification and the device validity period. When the device identification is consistent with the preset identification and the device validity period is within the preset validity period, it proves that the client is safe. Therefore, a more convenient verification method is adopted, that is, the account information and the image verification code are verified. In this way, the security of the user login can be ensured through double detection, while improving the convenience of the user logging into the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0050] FIG1 is an application environment diagram of a login verification method in one embodiment;

[0051] Figure 2 A flowchart of a login verification method in one embodiment;

[0052] FIG3 is a schematic diagram of a flow chart of a login verification method in another embodiment;

[0053] FIG4 is a flow chart of a login verification method in an exemplary embodiment;

[0054] Figure 5 A structural block diagram of a login verification device in an embodiment;

[0055] FIG6 is a structural block diagram of a login verification device in another embodiment;

[0056] FIG. 7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0058] The login verification method provided in the embodiment of the present application can be applied to the application environment shown in Figure 1. Among them, the client 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. The server 102 obtains the login information, wherein the login information includes user information, account password and graphic verification code, and then queries whether the user information has a corresponding device identification and a device validity period corresponding to the device identification, and verifies the validity of the user information according to the device identification and the device validity period; if the validity verification passes, an authentication request is sent to the server, and the authentication request carries the device identification, device validity period, account information and graphic verification code; if the device identification is consistent with the preset identification and the device validity period is within the preset validity period, the account information and the graphic verification code are further verified; if the account information and the graphic verification code are verified, a jump instruction of successful verification is sent to the client 102, and the client 102 jumps according to the jump instruction. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. Head-mounted devices may be virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The server 104 may be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides cloud computing services.

[0059] In an exemplary embodiment, Figure 2 As shown, a login verification method is provided, which is described by taking the method applied to the server in FIG. 1 as an example, and includes the following steps 202 to 206. Among them:

[0060] Step S202, receiving an authentication request sent by the client; the authentication request carries the device identification, 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 identification.

[0061] Among them, authentication request refers to the data request sent by the client to the server to verify the user's identity and request access rights; device identification refers to the unique identifier for marking the device, which is preferably a number, letter, string, code, or a combination of these elements. Account information refers to various data and attributes related to the user account, which is used to identify the user, verify the user's identity, and manage the user's permissions and operations in the system, such as account name and account password.

[0062] Optionally, the client verifies the validity of the device identifier. For example, the client can search based on the account information whether there is an identifier corresponding to the account information locally. If so, the client further verifies whether the device identifier is within the validity period of the device. If the device identifier is within the validity period of the device, the client successfully verifies the validity of the device identifier.

[0063] For example, assuming that the user has logged in on client 1, there is a device identifier corresponding to the account information locally on the client, such as account: AAAA, and the corresponding device identifier is 10GA. When the user logs in on client 1 and enters the account information, the client will query the device corresponding to the account. Since the client already has a device identifier bound to the account, the client has the account AAAA and its corresponding device identifier 10GA, and the device identifier is within the device validity period, so the client passes the validity verification of the device identifier. Afterwards, the client sends an authentication request, which carries the device identifier, device validity period, account information, and graphic verification code. The server further verifies the device identifier, device validity period, account information, and graphic verification code carried in the authentication request to ensure the security of login verification.

[0064] Step S204: If the device identification is consistent with the pre-stored identification and the device validity period is within the preset validity period, the account information and the graphic verification code are verified.

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

[0066] The server checks whether the device identification is consistent with the preset identification stored in the server. If the device identification is consistent with the preset identification, it checks whether the device identification is within the preset validity period. If the device identification is consistent with the pre-stored identification and the device validity period is within the preset validity period, the device is determined to be safe. Because the device identification is consistent with the preset identification at this time, it proves that the user has not changed the device to log in to the system, which can reduce the risk of account theft or device tampering. In addition, if the device identification is within the preset validity period, it proves that the device identification is the latest and has not expired, thereby reducing the risk of used or discarded device identification. Because, as time goes by, the old device identification may no longer be safe, because the old device identification may be leaked or cracked, so by setting the validity period, it can be ensured that the old device identification is no longer valid after a period of time. In addition, if an attacker obtains an old device identification, but because the old device identification has expired, the attacker will not be able to use it to access the system.

[0067] Since the server has preliminarily determined that the device is safe by whether the device identification is consistent with the pre-stored identification and whether the device identification is within the preset validity period, a more convenient method is used to verify the login access.

[0068] Step S206: If the account information and the graphic verification code are verified, a jump instruction indicating successful verification is sent to the client.

[0069] Optionally, the server will compare the account information with the pre-stored account information stored in the database, that is, whether the account and account password are consistent with those stored in the database. At the same time, the server verifies the image verification code, that is, checks whether the graphic verification code submitted by the user is consistent with the image verification code generated by the server and required by the user to enter. If the account information and image verification code are verified, a jump instruction indicating successful verification is sent to the client, allowing the client to enter the target system.

[0070] In the above login verification method, the server first performs security verification on the client based on the device identification and device validity period. When the device identification is consistent with the preset identification and the device validity period is within the preset validity period, it proves that the client is safe. Therefore, a more convenient verification method is adopted, that is, verifying the account information and image verification code. This can ensure the security of user login through double detection, while improving the convenience of user login to the system.

[0071] In one of the embodiments, the above method also includes: if the device identification is inconsistent with the pre-stored mark or the device validity period is not within the preset validity period, deleting the pre-stored identification and the preset validity period, and generating update information to send to the client; the update information is used to instruct the client to regenerate the device identification and the device validity period.

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

[0073] When the server detects that the device ID is consistent with the pre-stored ID or the device validity period is not within the preset validity period, it indicates that the server's security check on the client has failed. At this time, the client needs to use a more secure verification method to perform security checks on the user.

[0074] In this way, the correctness of the device identification and validity period can be ensured, illegal or expired clients can be prevented from accessing system resources, and the timeliness and effectiveness of the device identification can be ensured by forcing the client to regenerate the identification and validity period when the identification or validity period does not match.

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

[0076] After the server sends the update information to the client, the client regenerates the device identification and device validity period, and sends the regenerated device identification and device validity period to the server. After receiving the device identification and device validity period, the server stores the device identification and device validity period as the pre-stored identification and preset validity period respectively. In this way, the server can dynamically update the pre-stored identification, which helps to manage and control the client's access rights.

[0077] For example, a user once logged in on device A, then switched to device B to log in, and then logged in on client A again. There is a device identifier corresponding to the user information on client A, so the client passes the verification of the user. However, the user also logged in on client B before, so when the user logs in through client B, there is no device identifier and device validity period corresponding to the account information on the client, so client B needs to send SMS verification information to the user's mobile device and generate a device identifier and device validity period, and at the same time send the device identifier and device validity period to the server from client B. At this time, the server saves the device identifier and device validity period sent by the client as a pre-stored identifier and preset validity period. At this time, the preset identifier and preset validity period in the server are inconsistent with the device identifier and device validity period sent by device A. At this time, the server sends update information to the client to instruct the client to verify the SMS verification information and regenerate the device identifier and device validity period.

[0078] In an exemplary embodiment, as shown in FIG. 3 , a login verification method is provided, which is described by taking the method applied to the client in FIG. 1 as an example, and includes the following steps 302 to 306 .

[0079] Step S302, obtaining login information; the login information includes account information and a graphic verification code.

[0080] When a user logs into the target system, he / she will enter the account information and image verification code on the login interface. The account information includes the user account and account password.

[0081] Step S304, querying the device identification and device validity period corresponding to the account information, and verifying the validity of the account information according to the device validity period corresponding to the device identification.

[0082] After the client obtains the account information, it will query whether the device identification and device validity period corresponding to the account information exist locally on the client based on the account information. If so, the validity of the user account will be verified based on the device identification and device validity period.

[0083] The client verifies the validity of the account information based on the device identification and the device validity period, and determines whether the time difference between the time when the user logs in this time and the time when the user last logs in is within the device validity period. If it is within the device validity period, the validity verification is determined to be successful.

[0084] Step S306, if the validity verification passes, an authentication request is sent to the server; the authentication request carries account information, graphic verification code, device identification and device validity period; the authentication request is used to instruct the server to perform login verification based on the account information and graphic verification code after verification based on the device identification and device validity period.

[0085] If the client passes the validity verification of the account information, it will send an authentication request to the server, and send the account information entered by the user, the graphic verification code, and the device identification and device validity period queried by the client to the server. After the server verifies the device identification and device validity period, it will perform login verification based on the account information and graphic verification code.

[0086] In the above embodiment, the client verifies the device identification, so that it can timely find out whether the user changes the client login, thereby ensuring the security of the client, and sending an authentication request to the server under the premise of the client being secure.

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

[0088] The input verification information is generated by the input device after the user receives the SMS verification information through the user's mobile device.

[0089] Optionally, when the client fails to query the device identification or the device validity period is not within the preset time period, the user may be logging in to the device for the first time, or the user is changing the device to log in, or the user's login period on the device has expired. At this time, the client believes that there is a security risk, so the client needs to send a text message verification message to the mobile device for further verification.

[0090] Optionally, when the client receives the update information sent by the server, that is, the device identification in the client is inconsistent with that sent by the server, for example, the user once logged in on device A, then changed to device B to log in, and then logged in on client A again. There is a device identification corresponding to the user information on client A, so the client passes the verification of the user. Since the client generated a new device identification when the user logged in on client B before, and synchronized it to the server, when logging in again through client A, the server fails to verify the device identification and device validity period sent by client A. At this time, the server believes that there is a security risk, so it 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 a text message verification code and sends it to the user's bound mobile device, i.e., the user's mobile device, through a text message gateway. The user enters the verification code and submits it to the client for matching verification. At the same time, the client verifies the customer information, for example, verifies the customer password. If the match is successful and the verification is successful, a new device identification and device validity period are regenerated and saved, and the regenerated device identification validity period is sent to the server.

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

[0093] In the above embodiment, when the device identification is not queried, the user may be logging in for the first time or changing the device to log in, which means that the login device is not secure enough. A more secure two-factor method of a password and an SMS verification code is used to ensure the security of the client.

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

[0095] Among them, device information refers to the device information used by the user when logging into the system, and then stable information is filtered out from the device information, where stability 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] Optionally, you can analyze different attributes of the device information to determine which attributes are relatively stable during the life cycle of the device, such as analyzing the CPU model, memory size, operating system version, etc., and select those attributes that do not change frequently in most cases.

[0097] Optionally, a list of device attributes that are considered stable can be predefined, for example, CPU model, memory size, operating system version, etc. can be added to the whitelist as screening criteria.

[0098] Optionally, a machine learning model is used to analyze and filter stability information. A large number of device information samples can be collected and the model can be trained to predict which attribute combinations are stable over the life cycle of the device. Common methods include classification algorithms and clustering algorithms.

[0099] Optionally, the filtered stability information is combined into a string in a predetermined order, and each information is separated by a separator. This step needs to ensure the order is consistent to ensure that the combined string of the same device is always consistent. For example, assuming that 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 composed string to be processed is: 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 hashed to generate a unique device identifier. Exemplarily, a hash function is selected, and commonly used hash functions include SHA-256, MD5, etc. The string to be processed is then input into the selected hash algorithm, and the algorithm processes the input data to generate a hash value of a fixed length.

[0101] In the above embodiment, by screening stable device information from the device information, a relatively unchanged device identification can be created, which helps to prevent identity forgery and improve the security of the system.

[0102] In an exemplary embodiment, in combination with FIG. 4 , FIG. 4 is a flowchart of the steps of a login verification method in an embodiment.

[0103] S402: When a user logs in on a device, the device identification and device validity period are verified. If the device identification is generated and exists on the device front end and is within the validity period, the verification is successful, and the process goes to step S404; otherwise, the verification fails, and the process goes to step S410.

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

[0105] S406, the back-end server user management module verifies the accuracy of the user's account and password; at the same time, verifies the accuracy of the transmitted graphic verification code. If the verification passes, the user authentication is successful and enters S7; otherwise, the user login fails and enters S416, returning to S402 for user login authentication.

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

[0107] S410, the front end regenerates the unique device identification and device validity period information of the current device. The server 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 identification and device validity period information transmitted by the client, as well as the user's account and password information. The server user management module verifies the accuracy of the user's account and password; at the same time, it verifies the accuracy of the transmitted SMS verification code. If the verification passes, enter S412; otherwise enter S416 and return to S402 for user login authentication.

[0108] S412: The client binds the generated device identification and device validity period information to the current logged-in user information and stores them locally on the device; the server binds the generated device identification and device validity period information to the current logged-in user information and stores them in the server. Jump to S414.

[0109] S414. User authentication succeeds and logs into the system.

[0110] S416: User authentication fails, and authentication is performed again.

[0111] Continuing with FIG. 4 , in one embodiment, an embodiment is provided in which a user logs in at client A for the first time and then logs in at client A again.

[0112] (1) When the user logs in to client A for the first time, client A does not have the device identifier bound to the current account at this time, so S402 verification fails and jumps to S410. Client A generates a device identifier bound to the account and verifies the correctness of the account password and SMS verification code. If the verification passes, it jumps to S412. Client A locally stores the device identifier information bound to the current account 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 the user has not logged in on other devices and logs in again on client A, client A already has the device identification information bound to the account, so it jumps to S404. After initiating the login request, the backend first verifies the consistency between the device identification information bound to the current account transmitted by client A and the device identification information stored on the server. At this time, the account has not logged in on other devices, so the information is consistent, so the device identification verification passes, and jumps to S406 to verify the correctness of the account password and graphic verification code. If the verification passes, the user authentication is successful.

[0114] Continuing with FIG. 4 , in one embodiment, an embodiment is provided in which a user has logged in at client A and logs in at client B.

[0115] (1) When the user logs in to client B for the first time, client B does not have the device identifier bound to the current account at this time, so S402 verification fails and jumps to S410 to generate the device identifier bound to the account and verify the correctness of the account password and SMS verification code.

[0116] (2) After passing the verification, jump to S412, client B binds the generated device identification information to the current account and stores it, and transmits 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] Continuing with FIG. 4 , in one embodiment, an embodiment is provided in which a user logs in at client A after having logged in at client A and at client B. The embodiment is shown in FIG.

[0118] (1) The user logs in again on client A. At this time, the front-end has the device ID bound to the current account. If the device is within the validity period, S402 verification passes and jumps to S404; otherwise, the verification fails and jumps to S5. The subsequent steps are similar to scenario 1.

[0119] (2) After the front-end initiates a login request at S404, the back-end first checks the consistency between the device identifier bound to the current account transmitted by the front-end and the device identifier stored on the server. Since the user has logged in on client B before this login, the data stored on the back-end server at this time is the device identifier of client B bound to the current account. The consistency check fails. Jump to S408.

[0120] (3) After the front end receives the information that the login authentication failed, it clears the current account device identifier stored in client A, jumps to S410, and adopts the two-factor authentication strategy of password + SMS verification code to perform user login authentication.

[0121] In the above embodiment, by adding the device identifier bound to the account, the user's login device and reverse security verification are performed once. When the login device is not secure enough, the more secure two-factor method of password + SMS verification code is adopted; when the login device passes the security verification, the more convenient two-factor authentication method of password + graphic verification code is adopted. On the one hand, the security of user login is improved, and on the other hand, the possibility of account login being maliciously attacked is reduced. In addition, the user's convenience in using the system is greatly improved.

[0122] In an exemplary embodiment, it should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.

[0123] Based on the same inventive concept, the embodiment of the present application also provides a login verification device for implementing the login verification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more login verification device embodiments provided below can refer to the limitations on the login verification method above, and will not be repeated here.

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

[0125] The authentication receiving module 510 is used to receive the authentication request sent by the client; the authentication request carries the device identification, device validity period, account information and graphic verification code; the authentication request is sent by the client after the device identification is successfully verified;

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

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

[0128] In one embodiment, the above device further comprises:

[0129] The verification failure module is used to delete the pre-stored identification and the preset validity period if the device identification is inconsistent with the pre-stored mark 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 identification and device validity period.

[0130] In one embodiment, the above device further comprises:

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

[0132] In an exemplary embodiment, as shown in FIG6 , 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 a graphic verification code;

[0134] The validity module 620 is used to query the device identification and device validity period corresponding to the user information, and verify the validity of the user information according to the device identification 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 the account information, the graphic verification code, the device identification and the device validity period; the authentication request is used to instruct the server to perform login verification according to the account information and the graphic verification code after verification according to the device identification and the device validity period.

[0136] In one embodiment, the above device further comprises:

[0137] A verification generation module, for generating SMS verification information if the device identification or device validity period corresponding to the user information is not found or the update information sent by the receiving server is not received, and sending the SMS verification information to the user's mobile device;

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

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

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

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

[0142] An information processing unit, used for filtering stability information from device information and combining the stability information into a character string to be processed;

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

[0144] Each module in the above login verification device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0145] In an exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG7. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store device identification and device validity period. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a login verification method is implemented.

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

[0147] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: receiving an authentication request sent by a client; the authentication request carries a device identification, a 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 identification; if the device identification is consistent with a pre-stored identification and the device validity period is within a preset validity period, verifying the account information and the graphic verification code; if the account information and the graphic verification code are verified, sending a jump instruction indicating successful verification to the client.

[0148] In one embodiment, when the processor executes the computer program, the following steps are also implemented: if the device identification is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, the pre-stored identification 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 perform SMS verification information verification and regenerate the device identification and device validity period.

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

[0150] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining login information; the login information includes account information and a graphic verification code; querying a device identification corresponding to the account information, and verifying the validity of the account information according to the device validity period corresponding to the device identification; if the validity verification passes, sending an authentication request to a server; the authentication request carries the account information, the graphic verification code, the device identification and the device validity period; the authentication request is used to instruct the server to perform login verification according to the account information and the graphic verification code after verification according to the device identification and the device validity period.

[0151] In one embodiment, the processor also implements the following steps when executing the computer program: if the device identifier corresponding to the account information is not found or the device identifier is not within the device validity period or the update information sent by the receiving 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.

[0152] In one embodiment, when the processor executes the computer program, it also implements the following steps: generating a device identification corresponding to the user information, including: obtaining device information; the device information includes at least one of the 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 identification.

[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 is implemented to receive an authentication request sent by a client; the authentication request carries a device identification, a 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 identification; if the device identification is consistent with a pre-stored identification 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, a jump instruction indicating successful verification is sent to the client.

[0154] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the device identification is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, the pre-stored identification 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 perform SMS verification information verification and regenerate the device identification and device validity period.

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

[0156] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, login information is obtained; the login information includes account information and a graphic verification code; a device identification corresponding to the account information is queried, and the validity of the account information is verified according to the device validity period corresponding to the device identification; if the validity verification passes, an authentication request is sent to a server; the authentication request carries the account information, the graphic verification code, the device identification and the device validity period; the authentication request is used to instruct the server to perform login verification according to the account information and the graphic verification code after verification according to the device identification and the device validity period.

[0157] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the device identifier corresponding to the account information is not found or the device identifier is not within the device validity period or the update information sent by the receiving server is received, SMS verification information is generated and the SMS verification information is sent to the user's mobile device; input verification information is received and the input verification information is 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 a device validity period corresponding to the user information are generated, the device identifier and the device validity period are saved, and the device identifier and the device validity period are sent to the server.

[0158] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining device information; the device information includes at least one of the 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, which, when executed by the processor, implements receiving an authentication request sent by a client; the authentication request carries a device identifier, a device validity period, account information, and a graphic verification code; the authentication request is sent by the client after the device identifier is successfully verified; if the device identifier is consistent with 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, a jump instruction indicating successful verification is sent to the client.

[0159] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the device identification is inconsistent with the pre-stored flag or the device validity period is not within the preset validity period, the pre-stored identification 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 perform SMS verification information verification and regenerate the device identification and device validity period.

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

[0161] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements obtaining login information; the login information includes account information and a graphic verification code; querying a device identification corresponding to the account information, and verifying the validity of the account information according to a device validity period corresponding to the device identification; if the validity verification passes, sending an authentication request to a server; the authentication request carries the account information, the graphic verification code, the device identification, and the device validity period; the authentication request is used to instruct the server to perform login verification according to the account information and the graphic verification code after verification according to the device identification and the device validity period.

[0162] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: if the device identifier corresponding to the account information is not found or the device identifier is not within the device validity period or the update information sent by the receiving server is received, SMS verification information is generated and the SMS verification information is sent to the user's mobile device; input verification information is received and the input verification information is 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 a device validity period corresponding to the user information are generated, the device identifier and the device validity period are saved, and the device identifier and the device validity period are sent to the server.

[0163] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: generating a device identification corresponding to the user information, including: obtaining device information; the device information includes at least one of the 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 identification.

[0164] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0165] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A login verification method, characterized in that: Applied to the server, the method includes: Receive an authentication request sent by a client; the authentication request carries a device identifier, a 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; If the device identification is consistent with the pre-stored identification and the device validity period is within the preset validity period, verify the account information and the graphic verification code; If the account information and the graphic verification code are verified, a jump instruction indicating successful verification is sent to the client.

2. The login verification method according to claim 1, characterized in that: The method further comprises: 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 perform SMS verification information verification 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 comprises: The device identification and the device validity period sent by the user end are received, and the device identification and the device validity period are stored as the pre-stored identification and the preset validity period respectively.

4. A login verification method, characterized in that: Applied to a client, the method comprises: Obtaining login information; the login information includes account information and a graphic verification code; Querying a device identification corresponding to the account information, and verifying the validity of the account information according to a device validity period corresponding to the device identification; If the validity verification passes, an authentication request is sent to the server; the authentication request carries the account information, the graphic verification code, the device identification and the device validity period; the authentication request is used to instruct the server to perform login verification according to the account information and the graphic verification code after verification according to the device identification and the device validity period.

5. The login verification method according to claim 4, characterized in that: The method further comprises: If the device identifier corresponding to the account information is not found or the device identifier is not within the validity period of the device or 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; Receiving input verification information, and matching 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, a device identification and a device validity period corresponding to the user information are generated, the device identification and the device validity period are saved, and the device identification and the device validity period are sent to the server.

6. The login verification method according to claim 5, characterized in that: The generating a device identification corresponding to the user information includes: Obtain device information; the device information includes at least one of a browser type, a browser version, and an operating system; Filtering the stability information from the device information, and combining the stability information into a character string to be processed; Perform feature hashing on the character string to be processed to obtain the device identification.

7. A login verification device, characterized in that: Applied to the server, the device comprises: An authentication receiving module, used to receive an authentication request sent by a client; the authentication request carries a device identifier, a 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; An identification verification module, configured to verify the account information and the graphic verification code if the device identification is consistent with a pre-stored identification and the device validity period is within a preset validity period; The login verification module is used to send a jump instruction indicating successful verification to the client if the account information and the graphic verification code are verified.

8. The login verification device according to claim 7, characterized in that: The device also includes: A 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 perform SMS verification information verification and regenerate the device identifier and the device validity period.

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

10. A login verification device, characterized in that: Applied to a client, the device comprises: An acquisition module, used to acquire login information; the login information includes user information, the account information and a graphic verification code; A validity module, used to query the device identification and device validity period corresponding to the user information, and verify the validity of the user information according to the device identification and the device validity period; A sending module, used for sending an authentication request to a server if the validity verification is successful; the authentication request carries the account information, the graphic verification code, the device identification and the device validity period; the authentication request is used to instruct the server to perform login verification according to the account information and the graphic verification code after verification according to the device identification and the device validity period.

11. The login verification device according to claim 10, characterized in that: The device also includes: A verification generation module, for generating SMS verification information if the device identification or device validity period corresponding to the account information is not found or the update information sent by the server is received, and sending the SMS verification information to the user's mobile device; An information verification module, used for receiving input verification information and matching the input verification information with the SMS verification information; The identification generation module is used to generate a device identification and a device validity period corresponding to the user information if the input verification information matches the SMS verification information, save the device identification and the device validity period, and send the device identification and the device validity period to the server.

12. The login verification device according to claim 11, characterized in that: The identification generation module comprises: An information acquisition unit, used to acquire device information; the device information includes at least one of a browser type, a browser version, and an operating system; An information processing unit, used for filtering stability information from the device information and combining the stability information into a character string to be processed; The hashing unit is used to perform feature hashing on the character string to be processed to obtain the device identification.

13. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 or 4 to 6 are implemented.

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

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

Citation Information

Patent Citations

  • Method and equipment for authenticating service based on equipment identifier

    CN101980233A

  • Safe login method and device, memory medium and computer device

    CN106998332A

  • Identity authentication method, terminal device, authentication server, and electronic device

    CN107079034A

  • Login verification method and device, terminal device and storage medium

    CN108650226A

  • Application login method and device, terminal equipment and storage medium

    CN113452719A

Cited By

  • Device access method, communication system, electronic device, storage medium and program product

    CN119728203A

  • Device access methods, communication systems, electronic devices, storage media and software products

    CN119728203B

  • Equipment linkage data processing method and device

    CN121664475A