Login and login verification method, device and equipment
By using dynamic code authentication verification in account authorization login, the problems of user privacy leakage and network-free authentication login are solved, and a convenient and secure account login method is achieved.
Patent Information
- Application Number
- CN202411296396.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-27
AI Technical Summary
Although the existing account authorization login method simplifies the user login process, it may lead to the risk of user privacy leakage, and the authentication login cannot be achieved without a network, affecting convenience and security.
By obtaining the account token of the first application to generate dynamic code and completing authentication and verification at the server of the second application, the user logs in on the first application side without entering a password, and the information interaction does not involve user privacy, so that user privacy is protected Confidentiality and security of information.
It simplifies the user login process, improves login convenience, and realizes authentication and login without a network, enhancing the confidentiality and security of user privacy.
Smart Images

Figure CN119210822A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of account login management, and in particular to a login method, device and equipment, and a login verification method, device and equipment. Background Art
[0002] In today's digital age, while users enjoy the convenience brought by Internet services, they also face the challenge of managing numerous online accounts and passwords. As the scope of users' online activities expands, accounts and passwords may need to be set up in various scenarios, from various mobile phone applications to various Internet of Things (IOT) devices, which not only increases the user's memory burden, but may also lead to security risks caused by frequent password forgetting. For example, some users may use the same password for convenience, or choose a password that is too simple, which provides opportunities for cyber attacks.
[0003] In recent years, account authorization mechanisms have become increasingly popular. In this way, users can use different services quickly and easily without having to create and remember separate accounts and passwords for each application. For example, users can use their Alipay accounts to log in to third-party applications or websites to obtain services. However, although such solutions simplify the user's login process, they have also raised people's concerns about personal privacy protection. When a user chooses to authorize account login through a third-party service, the authorized third-party application or website will be authorized to access some of the user's personal information (e.g., avatar, nickname, etc.) at the third-party service. Although such authorized access is performed with the user's consent, it may still bring potential privacy leakage risks.
[0004] In view of this, it is necessary to provide an account login solution that can both simplify the user login process and effectively protect user privacy. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a login method, apparatus and equipment, as well as a login verification method, apparatus and equipment, to provide an account login solution that can both simplify the user login process and effectively protect user privacy.
[0006] In order to solve the above technical problems, the embodiments of this specification provide a login method, which is applied to a first terminal device, including:
[0007] Obtaining a login operation for a first account of a first application;
[0008] In response to the login operation, obtaining a dynamic code generated by the second application based on the token corresponding to the first account;
[0009] Sending a login verification request carrying the dynamic code to the first server of the first application;
[0010] Obtaining a login verification result returned by the first server in response to the login verification request; the login verification result is generated based on an authentication result of the second server of the second application for the dynamic code;
[0011] According to the login verification result, a login process corresponding to the login operation is executed.
[0012] The embodiment of this specification also provides a login verification method, which is applied to a first server and includes:
[0013] Obtaining a login verification request carrying a dynamic code sent by a first terminal device through a first application; the dynamic code is generated by a second application based on a token corresponding to a first account of the first application;
[0014] In response to the login verification request, obtaining an authentication result of the dynamic code by the second server of the second application;
[0015] Sending a login verification result corresponding to the authentication result to the first terminal device.
[0016] The embodiment of this specification also provides a login device, which is applied to a first terminal device, including:
[0017] An operation acquisition module, used to acquire a login operation for a first account of a first application;
[0018] A dynamic code acquisition module, configured to, in response to the login operation, acquire a dynamic code generated by the second application based on the token corresponding to the first account;
[0019] A verification request sending module, used to send a login verification request carrying the dynamic code to the first server of the first application;
[0020] A verification result acquisition module, used to acquire a login verification result returned by the first server in response to the login verification request; the login verification result is generated based on an authentication result of the second server of the second application for the dynamic code;
[0021] A login execution module is used to execute a login process corresponding to the login operation according to the login verification result.
[0022] The embodiment of this specification also provides a login verification device, which is applied to a first server and includes:
[0023] A verification request acquisition module, used to acquire a login verification request carrying a dynamic code sent by a first terminal device through a first application; the dynamic code is generated by a second application based on a token corresponding to a first account of the first application;
[0024] an authentication result determination module, configured to obtain, in response to the login verification request, an authentication result of the second server of the second application for the dynamic code;
[0025] A verification result sending module is used to send a login verification result corresponding to the authentication result to the first terminal device.
[0026] The embodiment of this specification also provides a terminal device, including:
[0027] at least one processor; and,
[0028] a memory communicatively connected to the at least one processor; wherein,
[0029] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0030] Obtaining a login operation for a first account of a first application;
[0031] In response to the login operation, obtaining a dynamic code generated by the second application based on the token corresponding to the first account;
[0032] Sending a login verification request carrying the dynamic code to the first server of the first application;
[0033] Obtaining a login verification result returned by the first server in response to the login verification request; the login verification result is generated based on an authentication result of the second server of the second application for the dynamic code;
[0034] According to the login verification result, a login process corresponding to the login operation is executed.
[0035] The embodiment of this specification also provides a server, including:
[0036] at least one processor; and,
[0037] a memory communicatively connected to the at least one processor; wherein,
[0038] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0039] Obtaining a login verification request carrying a dynamic code sent by a first terminal device through a first application; the dynamic code is generated by a second application based on a token corresponding to a first account of the first application;
[0040] In response to the login verification request, obtaining an authentication result of the dynamic code by the second server of the second application;
[0041] Sending a login verification result corresponding to the authentication result to the first terminal device.
[0042] At least one embodiment provided in this specification can achieve the following beneficial effects:
[0043] In the embodiments of this specification, when a user logs into the first application, he only needs to enter his first account without entering a password. The second application generates a dynamic code based on the first account, and completes the authentication verification of the dynamic code at the second server of the second application. After the authentication verification is passed, the user can log in to the first application side, so that the user does not need to remember his account password, and the user does not need to enter a password when logging into the first application, which is conducive to improving the convenience of the user logging into the application. In addition, since the information interaction between the first application and the first server side and the second application and the second server side does not involve user privacy information, the login method in this application is conducive to ensuring the confidentiality and security of user privacy information. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0045] Figure 1 A schematic diagram of an application scenario of a login method provided in an embodiment of this specification;
[0046] Figure 2 A flowchart of a login method provided in an embodiment of this specification;
[0047] Figure 3 A flowchart of a login verification method provided in an embodiment of this specification;
[0048] Figure 4 A swimlane diagram of a login and login verification method provided in an embodiment of this specification;
[0049] Figure 5 The embodiments of this specification provide corresponding to Figure 2 A structural schematic diagram of a login device;
[0050] Figure 6 The embodiments of this specification provide corresponding to Figure 3 A structural diagram of a login verification device;
[0051] Figure 7 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a terminal device;
[0052] Figure 8 The embodiments of this specification provide corresponding to Figure 3 A schematic diagram of the structure of a server. DETAILED DESCRIPTION
[0053] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0054] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.
[0055] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0056] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards in the relevant regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0057] Authentication, also known as authorization, is the process of verifying the identity of a user, device, or system to ensure that the party being verified is indeed who it claims to be. This process is critical to network security and can be used to help the system confirm whether the party requesting access has the right to access specific resources or perform specific operations. Authentication is required when a user logs in to an account.
[0058] In the related art, in order to log in to an application more quickly, users usually choose to use an application with authentication function to perform account authorization login. In this way, users do not need to create and remember separate accounts and passwords for each application, which greatly simplifies the user's login process. The current common OAuth account authorization process includes the following steps: (1) The user applies for access rights through the client, the client redirects the user to the authorization server, the user logs in on the authorization server and confirms the authorization; (2) After the authorization server verifies the user's identity, it jumps back to the client and returns a temporary authorization code; (3) The client uses the authorization code to request an access token from the authorization server. After the authorization server verifies the authorization code, it returns the access token and an optional refresh token; (4) The client uses the access token to request resources from the resource server, the resource server verifies the token and returns the requested resources.
[0059] As mentioned above, during the account authorization login process, on the one hand, the third-party applications or websites authorized to log in will be authorized to access some of the user's personal information (for example, avatar, nickname, etc.) in the application with authentication function. On the other hand, the authorizing party may understand the user's application usage preferences through the user's authorization of multiple authorized parties, which may bring potential risks of leakage of user personal privacy information and fail to effectively protect user privacy security.
[0060] In addition, the above account authorization process requires multiple information interactions between the application or server on the business side and the authorization server to be completed, which has high communication costs and is time-consuming.
[0061] In order to solve the defects in the prior art, this solution provides the following embodiments.
[0062] Figure 1 A schematic diagram of an application scenario of a login method provided in an embodiment of this specification.
[0063] like Figure 1As shown, after the first terminal device 100 obtains the user's login operation for the first account of the first application 101, it can query the token of the user corresponding to the first account in response to the login operation, and send the token to the second application 102. The second application 102 can generate a dynamic code based on the token and feedback the dynamic code to the first application 101. After the first application 101 receives the dynamic code fed back by the second application 102, it can send a login verification request carrying the dynamic code to the first server 103. After receiving the login verification request, the first server 103 can send an authentication request carrying the dynamic code to the second server 104 in response to the login verification request. After receiving the authentication request, the second server 104 can authenticate and verify the dynamic code in the authentication request, obtain an authentication result, and feedback the authentication result to the first server 103. After receiving the authentication result, the first server 103 can determine the login verification result of the login operation according to the authentication result, and send the login verification result to the first terminal device 100. After receiving the login verification result, the first terminal device 100 can execute a login process corresponding to the login operation according to the login verification result.
[0064] like Figure 1 In the scenario shown in , the first application and the second application may be applications running on the same terminal device. In this case, the terminal device may be, for example, a smart phone, a tablet computer, a smart wearable device, etc. When the first application and the second application are located on the same terminal device, the transmission of information between the first application and the second application may be achieved by calling between the applications.
[0065] although Figure 1 It is shown that the first application and the second application are located on the same terminal device, but in actual application, the first application and the second application can be located on different terminal devices. In this case, the terminal device running the first application to be logged in by the user can be an IoT device such as a container, a smart vending machine, a locker, etc., and the terminal device running the second application for authentication can be a device that is usually bound to the user identity, such as a smart phone, a tablet computer, a smart wearable device, etc. When the first application and the second application are located on different devices, the transmission of information between the first application and the second application can be achieved by near-field communication or scanning a code. More specifically, the terminal device running the second application for authentication can be a device with a camera and / or a near-field communication chip to obtain information from the terminal device running the first application; accordingly, the terminal device running the first application can have a display device and / or a near-field communication chip to provide information to the terminal device running the second application.
[0066] In addition, the first server and the second server independently include but are not limited to any device, equipment, platform, equipment cluster, etc. with computing and processing capabilities. The first server and the first terminal device, the first server and the second server, and the second server and the first terminal device (or, in the case of the second terminal device, the second server and the second terminal device) can be connected via a local area network, a wide area network, the Internet, or other types of data network connections.
[0067] Figure 1 In the method, when the user logs in to the first application, he only needs to enter his first account without entering a password. The second application generates a dynamic code based on the first account, and completes the authentication verification of the dynamic code at the second server of the second application. After the authentication verification is passed, the user can log in to the first application side, so that the user does not need to remember his account password, and the user does not need to enter a password when logging in to the first application, which is conducive to improving the convenience of user login to the application. In addition, since the information interaction between the first application and the first server side and the second application and the second server side does not involve user privacy information, the login method in this application is conducive to ensuring the confidentiality and security of user privacy information.
[0068] Figure 2 This is a flowchart of a login method provided in an embodiment of this specification. From a hardware perspective, the execution subject of the process can be a terminal device. From a program perspective, the execution subject of the process can be an application installed on the terminal device. Figure 2 As shown, the process is applied to the first terminal device and may include the following steps:
[0069] Step 202: Obtain a login operation for a first account of a first application.
[0070] In the embodiments of this specification, the first application, which may also be referred to as a business application, is an application program that a user needs to log in, access, and obtain services. In actual applications, a user may register his or her first account in advance at the first application, and after successful registration, the user may log in to his or her first account at the first application.
[0071] In the embodiments of this specification, the first terminal device may refer to a terminal device running a first application. The first terminal device may include, for example, a smart phone, a pad, a laptop, a smart wearable device, an IOT device, etc. Among them, the IOT device may include a container, a smart home device, and a shared bicycle, etc.
[0072] In actual applications, the user can enter the first account in the login interface of the first application, and then click the control in the login interface for indicating login to complete the login operation. The account identifier of the first account may include but is not limited to: the user's account ID, the user's mobile phone number, the user's email address, the user's unique identity identification number, etc. If the first application is an application running on a user terminal device such as a smart phone, and the user has logged in to the first application in advance, the first application may also automatically fill in the account identifier of the first account based on the first account previously logged in by the user, and there is no specific limitation on this.
[0073] In the embodiments of this specification, the user does not need to enter a password when logging into his first account at the first application, which is conducive to improving the convenience of the user logging into the first application. In addition, the user does not need to enter a custom password during the registration process at the first application, which is also conducive to improving the convenience of the user registering at the first application. In addition, the user no longer needs to remember different passwords for different applications, which is conducive to improving the user experience, and can also avoid the situation where the user uses the same password for each application for the sake of easy memory, which will cause great losses to the user once the password is leaked, which is conducive to ensuring the security of the user account.
[0074] Step 204: In response to the login operation, obtain a dynamic code generated by the second application based on the token corresponding to the first account.
[0075] In the embodiments of this specification, the second application, which may also be referred to as an authentication application, is an application that may have authentication capabilities. Typically, the terminal device running the second application may have a binding relationship with the user identity. After the user logs in to the second application, the user may directly authenticate and log in through authentication login when logging in to other applications without having to enter a login password. In actual applications, the authentication application may be a comprehensive application such as Alipay, or an application specifically used for authentication.
[0076] In actual application, the second application may be in an authentication-passed state, wherein the second application being in an authentication-passed state may mean that the user has passed the login authentication at the second application.
[0077] In actual application, the second application can run in the user's first terminal device, or it can also run in a second terminal device different from the first terminal device. For example: the first application can be an application with various functions such as information query, shopping, payment, positioning, etc. running in a first terminal device such as a smart phone, laptop, tablet computer, etc., and the second application can be an application with authentication function also running in the first terminal device. For another example, the first application can be an application with various functions such as information query, shopping, payment, positioning, etc. running in a first terminal device of an IOT device type such as a smart container, smart home device, and shared bicycle, and the second application can be an application with authentication function running in a second terminal device such as a smart phone, a smart wearable device, a mobile authentication device, etc.
[0078] In the embodiments of this specification, token may refer to an identifier that has a corresponding relationship with the user's first account and is used to uniquely identify the user's identity in the first terminal device, the first server, the second terminal device (if any), and the second server mentioned in the embodiments of this specification. Token can be a string that has a corresponding relationship with the user's account identifier, and there is a one-to-one correspondence between the account identifier and the token. The token is used to be transmitted between various devices or applications, and is used as a basis for querying user-related information in various devices.
[0079] Step 206: Send a login verification request carrying the dynamic code to the first server of the first application.
[0080] In the embodiments of this specification, the first server of the first application may also be referred to as a business server. After the first terminal device sends a login verification request carrying a dynamic code to the first server, the first server may respond to the login verification request and send an authentication request carrying the dynamic code to the second server, so that the second server performs authentication verification on the dynamic code in the authentication request to obtain an authentication result.
[0081] In actual applications, the login verification request, the authentication request, and the authentication result can all carry the token corresponding to the first account requested for login, so as to determine the user account for each request or result. For example, the corresponding dynamic code seed and other information can be queried based on the token, so as to realize the authentication of the account login process based on the dynamic code verification method.
[0082] Step 208: Obtain a login verification result returned by the first server in response to the login verification request; the login verification result is generated based on an authentication result of the second server of the second application for the dynamic code.
[0083] In the embodiment of this specification, the second server of the second application may also be referred to as an authentication server. The second application and the second server may implement authentication of the process of the user logging into the first application based on the dynamic code. Specifically, the login verification result is generated based on the authentication result returned by the second server in response to the authentication request carrying the dynamic code sent by the first server.
[0084] In the embodiment of the present specification, the verification of the dynamic code is realized by sending the dynamic code generated by the second application to the second server corresponding to the second application. In the following, the dynamic code generated by the second application can be referred to as the first dynamic code, and the dynamic code generated by the second server of the second application in the process of dynamic code verification can be referred to as the second dynamic code. Specifically, the first dynamic code can be generated based on the dynamic code seed corresponding to the token pre-stored in the terminal device running the second application; more specifically, the first dynamic code can be generated by the second application based on the dynamic code seed using a preset algorithm. The second dynamic code can be generated based on the dynamic code seed corresponding to the token pre-stored in the second server; more specifically, the second dynamic code can be generated by the second server based on the dynamic code seed using the preset algorithm. Among them, the dynamic code seed can essentially be a string, which is pre-agreed and jointly maintained by the second application and the second server as the basis for generating the first dynamic code and the second dynamic code; and the preset algorithm can also be pre-agreed by the second application and the second server.
[0085] In actual applications, the authentication request sent by the first server and received by the second server may carry the first dynamic code and the token. The second server may generate the second dynamic code based on the pre-stored dynamic code seed corresponding to the token, and obtain the authentication result by comparing the first dynamic code with the second dynamic code. The authentication result includes the first authentication result or the second authentication result, the first authentication result indicates that the first dynamic code is consistent with the second dynamic code, and the authentication is passed; the second authentication result indicates that the first dynamic code is inconsistent with the second dynamic code, and the authentication is not passed.
[0086] If the authentication result is the first authentication result indicating that the authentication is passed, the login verification result is the first login verification result indicating that the login verification is passed; if the authentication result is the second authentication result indicating that the authentication is not passed, the login verification result is the second login verification result indicating that the login verification is not passed.
[0087] As an example, the dynamic code-based authentication scheme in the embodiments of this specification may specifically adopt a security authentication mechanism based on an OTP (One-Time Password) algorithm, wherein the dynamic code seed is also called an OTP key, the first dynamic code is also called a first OTP code value, and the second dynamic code is also called a second OTP code value.
[0088] In practical applications, the dynamic code-based authentication method in the embodiments of this specification can adopt a time-based OTP algorithm (ie, TOTP) or a count-based OTP algorithm (ie, HOTP). Among them, TOTP uses a timestamp, uses a shared key and a current timestamp as input, and generates a short-lived OTP code value; HOTP uses a counter, and each time an OTP code value is generated, the counter is incremented by 1, and both parties maintain the same counter.
[0089] Specifically, in the authentication scheme based on the OTP algorithm, the second application and the second server share the OTP key and encryption algorithm (for example, HMAC). In the OTP code value generation phase, the shared OTP key and time / counter are used to generate the first OTP code value based on the shared encryption algorithm; in the OTP code value verification phase, the second server uses the shared OTP key and the same time / counter to generate the second OTP code value based on the shared encryption algorithm. If the second OTP code value generated by the second server is consistent with the received first OTP code value to be verified, the verification is successful.
[0090] Step 210: Based on the login verification result, execute the login process steps corresponding to the login operation.
[0091] In the embodiment of the present specification, if the login verification result is a first login verification result indicating that the login verification is passed, the login process of the user logging into the first account can be executed. If the login verification result is a second login verification result indicating that the login verification is not passed, the login process of the user logging into the first account can be prohibited.
[0092] Figure 2 In the method, when the user logs in to the first application, he only needs to enter his first account without entering a password. The second application generates a dynamic code based on the first account, and completes the authentication verification of the dynamic code at the second server of the second application. After the authentication verification is passed, the user can log in to the first application side, so that the user does not need to remember his account password, and the user does not need to enter a password when logging in to the first application, which is conducive to improving the convenience of user login to the application. In addition, since the information interaction between the first application and the first server side and the second application and the second server side does not involve user privacy information, the login method in this application is conducive to ensuring the confidentiality and security of user privacy information.
[0093] based on Figure 2 The method in this specification also provides some specific implementation plans of the method, which are described below.
[0094] In actual applications, after the user registers at the first application on the first terminal device, the first terminal device can store the user's first account in association with the user's token, so that when the user logs in to the first account at the first application, the token corresponding to the first account can be queried based on the first account.
[0095] Based on this, Figure 2 In the method, in step 204, in response to the login operation, obtaining a dynamic code generated by the second application based on the token corresponding to the first account may specifically include:
[0096] In response to the login operation, querying a token corresponding to the first account;
[0097] A dynamic code corresponding to the token and generated by the second application is obtained; the dynamic code is generated based on a dynamic code seed corresponding to the token.
[0098] In the embodiment of the present specification, the login operation may include an operation of a user inputting user information and an operation of clicking a login control, and the account identifier of the first account may be included in the input user information.
[0099] In actual applications, the first terminal device responds to the user's login operation for the first account at the first application, and after querying the token corresponding to the first account, it can generate a dynamic code acquisition request carrying the token, and the dynamic code acquisition request is used to provide it to the second application. After the second application obtains the dynamic code acquisition request, it can generate a dynamic code based on the token carried in the dynamic code acquisition request and the pre-stored dynamic code seed corresponding to the token, and the dynamic code is used to be fed back to the first application at the first terminal device.
[0100] In actual applications, the first application and the second application may be application programs running on the same terminal device. When the first application and the second application run on the same terminal device, information transmission between the first application and the second application may be directly performed based on the terminal by program calling.
[0101] Based on this, the obtaining of the dynamic code corresponding to the token generated by the second application may specifically include:
[0102] The first application running on the first terminal device sends a dynamic code acquisition request to the second application running on the first terminal device; the dynamic code acquisition request carries the token;
[0103] The first application obtains the dynamic code corresponding to the token and returned by the second application in response to the dynamic code acquisition request.
[0104] Specifically, the first application obtains a dynamic code generated based on a dynamic code seed corresponding to the token and returned by the second application in response to the dynamic code acquisition request.
[0105] More specifically, after receiving the dynamic code acquisition request, the second application can search for a dynamic code seed corresponding to the token stored locally on the first terminal device and for which the second application has query permission based on the token in the dynamic code acquisition request, and generate a dynamic code based on the dynamic code seed.
[0106] Accordingly, the dynamic code is used to be verified by the second server of the second application, and the dynamic code seed corresponding to the token is pre-agreed by the second application and the second server. Thus, the login verification result is generated by the first server of the first application according to the authentication result returned by the second server of the second application, and the authentication result is generated and returned by the second server in response to the authentication request sent by the first server and carrying the dynamic code.
[0107] In actual applications, the first application and the second application may also be application programs running on different terminal devices. When the first application and the second application are respectively running on different terminal devices (the first application is running on the first terminal device, and the second application is running on the second terminal device), optionally, information transmission between the first application and the second application can be performed by scanning a QR code.
[0108] Based on this, the obtaining of the dynamic code corresponding to the token generated by the second application may specifically include:
[0109] Generate a first QR code carrying a dynamic code acquisition request; the dynamic code acquisition request carries the token;
[0110] Displaying the first two-dimensional code; the first two-dimensional code is used to be scanned by a second terminal device running a second application;
[0111] Obtain a dynamic code corresponding to the token generated by the second terminal device through the second application.
[0112] In the embodiments of this specification, the first application may be an application on an IOT device such as a container, a smart home device, a shared bicycle, etc. The second application may be an application with an authentication function on a terminal with a code scanning function (e.g., a mobile phone, a tablet computer, a smart wearable device, etc.).
[0113] In an embodiment of the present specification, after the second application obtains a dynamic code acquisition request carrying a token by scanning a QR code, it can search for a dynamic code seed corresponding to the token stored locally on the second terminal device based on the token, and generate a dynamic code based on the dynamic code seed.
[0114] Accordingly, the dynamic code is used to be verified by the second server of the second application, and the dynamic code seed corresponding to the token is pre-agreed by the second application and the second server. Thus, the login verification result is generated by the first server of the first application according to the authentication result returned by the second server of the second application, and the authentication result is generated and returned by the second server in response to the authentication request sent by the first server and carrying the dynamic code.
[0115] In actual applications, after the second application generates a dynamic code corresponding to the token, the dynamic code can be displayed. The user can input the dynamic code displayed by the second application into the first terminal device, so that the first terminal device can obtain the dynamic code generated by the second application and corresponding to the token.
[0116] In actual applications, when the first application and the second application are respectively running on different terminal devices (the first application is running on the first terminal device, and the second application is running on the second terminal device), optionally, the information transmission between the first application and the second application can also be carried out by means of near field communication. Alternatively, the information transmission between the first application and the second application can also be achieved by other short-range communication methods such as radio frequency identification (RFID), Bluetooth, infrared, Wi-Fi, etc. The following is explained by taking near field communication as an example.
[0117] Based on this, the obtaining of the dynamic code corresponding to the token generated by the second application may specifically include:
[0118] Sending a dynamic code acquisition request carrying the token to a second terminal device running a second application through near field communication;
[0119] Obtain a dynamic code corresponding to the token generated by the second terminal device through the second application.
[0120] In the embodiments of this specification, Near Field Communication (NFC) is an emerging technology that allows devices that use NFC technology to exchange data when they are close to each other. NFC is an integration of contactless radio frequency identification (RFID) and interconnection technology. By integrating the functions of inductive card reader, inductive card and point-to-point communication on a single chip, mobile terminals are used to realize mobile payment, electronic ticketing, access control, mobile identity recognition, anti-counterfeiting and other applications.
[0121] In at least some embodiments of this specification, both the first terminal device and the second terminal device have near field communication functions. The first application can be an application on an IOT device with near field communication functions, such as a container, a smart home device, a shared bicycle, etc. The second application can be an application with authentication functions on a terminal with near field communication functions (for example, a mobile phone, a tablet computer, a smart wearable device, etc.).
[0122] In an embodiment of the present specification, after the second application obtains a dynamic code acquisition request carrying a token through near field communication, it can search for a dynamic code seed corresponding to the token stored locally in the second terminal device based on the token, and generate a dynamic code based on the dynamic code seed.
[0123] Accordingly, the dynamic code is used to be verified by the second server of the second application, and the dynamic code seed corresponding to the token is pre-agreed by the second application and the second server. Thus, the login verification result is generated by the first server of the first application according to the authentication result returned by the second server of the second application, and the authentication result is generated and returned by the second server in response to the authentication request sent by the first server and carrying the dynamic code.
[0124] In actual applications, after the second application generates a dynamic code corresponding to the token, the dynamic code can be displayed, and the user inputs the dynamic code displayed by the second application into the first terminal device, or the second terminal device can also return the dynamic code to the first terminal device through near field communication. This is not specifically limited.
[0125] In actual applications, the user may register in advance at the first application on the first terminal device. The first application may generate a corresponding token and a dynamic code seed corresponding to the token based on the user's registration operation.
[0126] Based on this, Figure 2 In the method, in step 202, before obtaining the login operation for the first account of the first application, the method may also include:
[0127] Obtaining a registration operation for the first account;
[0128] In response to the registration operation, generating the token corresponding to the first account;
[0129] Generate the dynamic code seed corresponding to the token;
[0130] Output the token and the dynamic code seed that have an associated relationship.
[0131] In the embodiment of the present specification, the registration operation for the first account may include: an operation of inputting user information and an operation of optionally clicking a registration control, and the account identifier of the first account may be included in the input user information. The token may be a string corresponding to the account identifier of the first account and used to uniquely identify the user identity in the system executing the method of the embodiment of the present specification.
[0132] In actual applications, when a user registers an account, the first terminal device can obtain the user information entered by the user, wherein the user information may include not only user identifiers such as user mobile phone number, user email address, user identity code, etc. that can uniquely identify the user (which can be used as an account identifier), but may also include other information such as user name, user preferences, etc.
[0133] In actual applications, there is a one-to-one correspondence between user accounts and tokens, and there is also a one-to-one correspondence between tokens and dynamic code seeds.
[0134] In actual applications, after the first application generates a token and a dynamic code seed corresponding to the token, the associated token and the dynamic code seed may be sent to the second application. After the second application receives the associated token and the dynamic code seed sent by the first application, the token and the dynamic code seed may be stored in association with each other, and the token and the dynamic code seed may be sent to the second server so that the second server may store the token and the dynamic code seed in association with each other.
[0135] In actual applications, the token and the dynamic code seed corresponding to the token can be generated at the first application on the first terminal device. When the first application and the second application are running on different devices, the token and the dynamic code seed can be transmitted by scanning a QR code or by near field communication. When the first application and the second application are both running on the first terminal device, the first application can directly send the token and the dynamic code seed to the second application.
[0136] Based on this, the outputting of the token and the dynamic code seed having an associated relationship may specifically include:
[0137] The first application running on the first terminal device sends the token and the dynamic code seed to the second application running on the first terminal device; the token and the dynamic code seed are associated and stored by the second application;
[0138] or,
[0139] Generate a second QR code carrying the token and the dynamic code seed;
[0140] The second QR code is displayed; the second QR code is used to be scanned by a second terminal device running the second application; the token and the dynamic code seed are associated and stored by the second terminal device;
[0141] or,
[0142] The token and the dynamic code seed are sent to a second terminal device running the second application via near field communication; the token and the dynamic code seed are associated and stored by the second terminal device.
[0143] In actual applications, when the first application and the second application are running on the same terminal device, the information transmission between the first application and the second application can be directly based on the terminal through program calls. After the second application receives the token sent by the first application and the dynamic code seed corresponding to the token, the token and the dynamic code seed can be associated and stored in the second terminal device.
[0144] In the embodiments of this specification, when the first application and the second application are respectively running on different terminal devices (the first application is running on the first terminal device, and the second application is running on the second terminal device), the information transmission between the first application and the second application can be performed by scanning a QR code. After the second terminal device scans the second QR code displayed by the first terminal device, the token generated at the first terminal device and the dynamic code seed corresponding to the token can be obtained, and the token and the dynamic code seed are stored in association.
[0145] In the embodiments of this specification, when the first application and the second application are respectively running on different terminal devices (the first application is running on the first terminal device, and the second application is running on the second terminal device), the information transmission between the first application and the second application can also be carried out by means of near field communication. In the case where both the first terminal device and the second terminal device have near field communication functions, the first terminal device can send a token and a dynamic code seed to the second terminal device running the second application by means of near field communication. After the second terminal device receives the token and the dynamic code seed sent by the first terminal device based on the near field communication method, the token and the dynamic code seed can be associated and stored.
[0146] In the prior art, the account authorization process requires multiple information interactions between the client of the application with authentication function and the authorization server to be completed. Therefore, the application with authentication function must be connected to the network to complete the entire authentication process, and has a high dependence on the network. In at least some embodiments of the present application, when the first application and the second application are respectively running on different terminal devices (the first application runs on the first terminal device, and the second application runs on the second terminal device), the second application with authentication function stores the token and the dynamic code seed in association, and can implement the entire authentication verification process without a network, thereby avoiding the situation where authentication and login cannot be performed without a network, and improving the applicability and convenience of authentication and login.
[0147] In actual applications, the token and the dynamic code seed corresponding to the token are not necessarily generated by the first application. The dynamic code seed corresponding to the token can also be generated by the second application. In this case, after the token is generated at the first application, there is no need to generate the corresponding dynamic code seed.
[0148] Based on this, Figure 2 In the method, in step 202, before obtaining the login operation for the first account of the first application, the method may also include:
[0149] Obtaining a registration operation for the first account;
[0150] In response to the registration operation, generating the token corresponding to the first account;
[0151] The token is output for being provided to the second application.
[0152] Correspondingly, the output is used to provide the token to the second application, and may specifically include:
[0153] The first application running on the first terminal device sends the token to the second application running on the first terminal device; the token and the dynamic code seed are associated and stored by the second application; the dynamic code seed is generated by the second application;
[0154] or,
[0155] Generate a second QR code carrying the token;
[0156] displaying the second QR code; the second QR code is used to be scanned by a second terminal device running the second application; the token and the dynamic code seed are associated and stored by the second terminal device; the dynamic code seed is generated by the second application;
[0157] or,
[0158] The token is sent to a second terminal device running the second application via near field communication; the token and the dynamic code seed are associated and stored by the second terminal device; and the dynamic code seed is generated by the second application.
[0159] In the embodiment of this specification, after the second application receives the token sent by the first terminal device or the first application, it can generate a dynamic code seed that has a unique binding relationship with the token based on the token. After the second application generates the dynamic code seed that has a unique binding relationship with the token, it can feed back the dynamic code seed to the first terminal device, or it can not feed back, which is not specifically limited.
[0160] In the embodiment of the present specification, after the second application stores the token and the dynamic code seed in association with each other, the specific process of the second application searching whether the dynamic code seed corresponding to the token is stored locally based on the token may include: the second application compares the first token sent by the first application with the second token stored locally to see if they are consistent. If they are consistent, the dynamic code seed corresponding to the second token is the dynamic code seed corresponding to the first token, so that the dynamic code corresponding to the first token can be generated based on the dynamic code seed, and the dynamic code is returned to the first terminal device.
[0161] In the embodiments of this specification, since the above-mentioned processes of the user's registration operation, the second terminal device obtaining the token from the first terminal device by scanning the QR code, the second terminal device obtaining the token from the first terminal device by near field communication, and the second application or the second terminal device associating and storing the token and the dynamic code seed have been described in detail, they will not be repeated here.
[0162] Figure 3 This is a flowchart of a login verification method provided in an embodiment of this specification. From a hardware perspective, the execution subject of the process can be a server. From a program perspective, the execution subject of the process can be an application installed on the server. Figure 3 As shown, the process is applied to the first server and may include the following steps:
[0163] Step 302: Obtain a login verification request carrying a dynamic code sent by the first terminal device through the first application; the dynamic code is generated by the second application based on the token corresponding to the first account of the first application.
[0164] Step 304: In response to the login verification request, obtaining an authentication result of the second server of the second application for the dynamic code.
[0165] Step 306: Send a login verification result corresponding to the authentication result to the first terminal device.
[0166] In the embodiments of the present specification, the first terminal device, the first server, the first application, the dynamic code, the login verification request, the second application, the second server, the first account, the token, the authentication result, and the login verification result can be Figure 2 The meanings of the terms mentioned in the embodiments of the method are consistent. Since the process of the second server of the second application performing authentication and verification on the dynamic code has been described in detail above, it will not be repeated here.
[0167] In actual application, the second application may be in a state of authentication passing, wherein the second application being in a state of authentication passing may mean that the user has passed the login authentication at the second application. After the user passes the login authentication at the second application, the second application can confirm the real identity of the user, thereby preventing criminals from impersonating the user's identity to authenticate and log in to the application, which is conducive to protecting the security of the user's information and assets.
[0168] Figure 3In the method, when the user logs in to the first application, he only needs to enter his first account without entering a password. The second application generates a dynamic code based on the first account, and completes the authentication verification of the dynamic code at the second server of the second application. After the authentication verification is passed, the user can log in to the first application side, so that the user does not need to remember his account password, and the user does not need to enter a password when logging in to the first application, which is conducive to improving the convenience of user login to the application. In addition, since the information interaction between the first application and the first server side and the second application and the second server side does not involve user privacy information, the login method in this application is conducive to ensuring the confidentiality and security of user privacy information.
[0169] based on Figure 3 The method in this specification also provides some specific implementation plans of the method, which are described below.
[0170] Optional, Figure 3 In the method, in step 304, in response to the login verification request, obtaining the authentication result of the second server of the second application for the dynamic code may specifically include:
[0171] In response to the login verification request, an authentication request carrying the dynamic code is sent to a second server of the second application.
[0172] Receive an authentication result of the dynamic code returned by the second server.
[0173] Correspondingly, Figure 3 In the method, in step 306, sending a login verification result corresponding to the authentication result to the first terminal device may specifically include:
[0174] A login verification result of the login operation is determined based on the authentication result.
[0175] Send the login verification result to the first terminal device.
[0176] In actual applications, the login verification request, the authentication request, the authentication result, and the login verification result may all carry a token corresponding to the first account requesting login.
[0177] In actual applications, the authentication request sent by the first server and received by the second server may carry a dynamic code (also referred to as the first dynamic code) and a token. The second server may generate a second dynamic code based on a pre-stored dynamic code seed corresponding to the token, and obtain an authentication result by comparing the first dynamic code with the second dynamic code. The authentication result includes a first authentication result or a second authentication result, wherein the first authentication result indicates that the first dynamic code is consistent with the second dynamic code and the authentication is passed; the second authentication result indicates that the first dynamic code is inconsistent with the second dynamic code and the authentication is not passed.
[0178] Optional, Figure 3 The method in which the step of determining the login verification result of the login operation according to the authentication result may specifically include:
[0179] If the authentication result is a first authentication result indicating that the dynamic code verification is passed, sending a first login verification result to the first terminal device; the first login verification result indicates that the login verification is passed;
[0180] If the authentication result is a second authentication result indicating that the dynamic code has not been verified, a second login verification result is sent to the first terminal device; the second login verification result indicates that the login verification has not passed.
[0181] In the embodiment of the present specification, if the first server sends to the first terminal device a first login verification result indicating that the login verification is passed, the first terminal device can complete the login process of the user logging into the first application. If the first server sends to the first terminal device a second login verification result indicating that the login verification is not passed, the first terminal device can prohibit the completion of the login process of the user logging into the first application, and can also display a prompt message on the screen indicating that the user has failed to log in.
[0182] The various technical features in the above embodiments can be combined arbitrarily as long as there is no conflict or contradiction between the combinations of features. However, due to space limitations, they are not described one by one. Therefore, any combination of the various technical features in the above embodiments also falls within the scope of this specification.
[0183] Figure 4 A swimlane diagram of a login and login verification method provided in an embodiment of this specification.
[0184] like Figure 4 As shown, the execution entities involved in the process of the login and login verification method may include a first server, a first terminal device and a second server, and optionally, may also include a second terminal device.
[0185] For ease of description, Figure 4The processes of the first application and the second application are described separately, wherein the first application runs on the first terminal device, and the second application can run on the same terminal device (the first terminal device) as the first application, or can run on the second terminal device. The first server is the server corresponding to the first application, and the second server is the server corresponding to the second application.
[0186] Figure 4 The method flow may include a user registration phase and an authentication login phase, and may specifically include the following steps:
[0187] During the user registration phase, an optional implementation may be as follows Figure 4 As shown in steps 402 to 412 in .
[0188] Step 402: The first application obtains the user's registration operation for the first account.
[0189] Step 404: In response to the registration operation, the first application generates a token corresponding to the first account and a dynamic code seed corresponding to the token.
[0190] Step 406: The first application outputs the associated token and dynamic code seed to the second application.
[0191] Step 408: The second application obtains and stores the associated token and dynamic code seed.
[0192] Step 410: The second application sends the associated token and dynamic code seed to the second server.
[0193] Step 412: The second server obtains and stores the associated token and dynamic code seed.
[0194] Among them, in step 406, the first application can output the associated token and dynamic code seed to the second application in at least three ways. Method 1: When the first application and the second application are running on the same terminal device, the first application can directly send the token and dynamic code seed to the second application. Method 2: When the first application and the second application are running on different terminal devices, the second application can obtain the token and dynamic code seed by scanning the QR code. Method 3: When the first application and the second application are running on different terminal devices, the first application can send the token and dynamic code seed to the second application through near field communication.
[0195] Alternatively, although Figure 4 It is shown that the dynamic code seed is generated by the first application, but in actual application, the dynamic code seed may also be generated by the second application or the second server.
[0196] In the authentication and login phase, another optional implementation method can be as follows Figure 4 As shown in steps 414 to 452 in .
[0197] Step 414: The first application obtains the user's login operation for the first account of the first application.
[0198] Step 416: In response to the login operation, the first application queries for a token corresponding to the first account.
[0199] Step 418: The first application sends a dynamic code acquisition request carrying a token to the second application.
[0200] Step 420: The second application receives a dynamic code acquisition request carrying a token.
[0201] Step 422: The second application determines a dynamic code seed associated with the token.
[0202] Step 424: The second application generates a dynamic code corresponding to the token based on the dynamic code seed.
[0203] Step 426: The second application feeds back a dynamic code corresponding to the token to the first application.
[0204] Step 428: The first application obtains the dynamic code corresponding to the token.
[0205] Step 430: The first application sends a login verification request carrying a token and a dynamic code to the first server.
[0206] Step 432: The first server obtains a login verification request carrying a token and a dynamic code.
[0207] Step 434: The first server sends an authentication request carrying a token and a dynamic code to the second server.
[0208] Step 436: The second server receives the authentication request carrying the token and the dynamic code.
[0209] Step 438: The second server determines a dynamic code seed associated with the token.
[0210] Step 440: The second server generates a second dynamic code corresponding to the token based on the dynamic code seed.
[0211] Step 442: The second server compares and verifies the dynamic code with the second dynamic code to obtain an authentication result of the dynamic code.
[0212] Step 444: The second server sends the authentication result of the dynamic code to the first server.
[0213] Step 446: The first server receives the authentication result of the dynamic code.
[0214] Step 448: The first server determines the login verification result of the login operation based on the authentication result.
[0215] Step 450: The first server sends the login verification result to the first application.
[0216] Step 452: The first application receives the login verification result and executes the login process according to the login verification result.
[0217] Among them, in step 418, the first application sends a dynamic code acquisition request carrying a token to the second application, including at least the following three methods. Method 1: When the first application and the second application are running on the same terminal device, the first application can directly send a dynamic code acquisition request carrying a token to the second application. Corresponding to method 1, in step 426, the second application can directly feed back the dynamic code corresponding to the token to the first application.
[0218] Method 2: When the first application and the second application are running on different terminal devices, the second application can obtain the dynamic code acquisition request of the first application by scanning the QR code. Corresponding to method 2, in step 426, the second application can display the dynamic code to the user, and the user inputs the dynamic code into the first application.
[0219] Method 3: When the first application and the second application are running on different terminal devices, the first application can send a dynamic code acquisition request carrying a token to the second application via near field communication. Corresponding to method 3, in step 426, the second application can send the dynamic code to the first application via near field communication.
[0220] Based on at least some embodiments of the present specification, firstly, the information flow and verification between the business side and the authentication side are based on the virtual user identity information of the token, that is, the authentication side cannot know the real identity of the user on the business side, and the authentication side does not need to disclose the information registered by the user on its side to the business side, thereby fully protecting the privacy and security of the user.
[0221] Secondly, in addition to calling the second server on the authentication side for verification when verifying the first dynamic code, the first server on the business side does not require additional interaction with the second server, the number of interactions is small, and the communication cost is low.
[0222] In addition, when the first application and the second application are running on different terminal devices, during the entire login authentication process, the terminal device running the second application (for example, a smart phone, a smart wearable device, etc.) does not need to be connected to the Internet, which greatly expands the scope of applicable scenarios of the solutions of the embodiments of this specification and greatly improves the convenience of user account login.
[0223] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0224] Figure 5 The embodiments of this specification provide corresponding to Figure 2 A structural diagram of a login device is provided. The device is applied to a first terminal device.
[0225] like Figure 5 As shown, the device may include:
[0226] An operation acquisition module 502 is used to acquire a login operation of a first account for a first application;
[0227] A dynamic code acquisition module 504, configured to acquire, in response to the login operation, a dynamic code generated by the second application based on the token corresponding to the first account;
[0228] A verification request sending module 506, configured to send a login verification request carrying the dynamic code to the first server of the first application;
[0229] A verification result acquisition module 508, configured to acquire a login verification result returned by the first server in response to the login verification request; the login verification result is generated based on an authentication result of the second server of the second application for the dynamic code;
[0230] The login execution module 510 is used to execute the login process corresponding to the login operation according to the login verification result.
[0231] based on Figure 5 The present specification also provides some specific implementation schemes of the device, which are described below.
[0232] Optionally, the dynamic code acquisition module 504 may specifically include:
[0233] A token query unit is used to query a token corresponding to the first account in response to the login operation.
[0234] The dynamic code acquisition unit is used to acquire the dynamic code corresponding to the token generated by the second application; the dynamic code is generated based on the dynamic code seed corresponding to the token.
[0235] Optionally, the dynamic code acquisition unit may specifically include:
[0236] The first dynamic code acquisition request sending subunit is used to send a dynamic code acquisition request to the second application running on the first terminal device; the dynamic code acquisition request carries the token.
[0237] The first dynamic code acquisition subunit is used to acquire the dynamic code corresponding to the token and returned by the second application in response to the dynamic code acquisition request.
[0238] Optionally, the dynamic code acquisition unit may specifically include:
[0239] The first QR code generating subunit is used to generate a first QR code carrying a dynamic code acquisition request; the dynamic code acquisition request carries the token.
[0240] The first two-dimensional code display subunit is used to display the first two-dimensional code; the first two-dimensional code is used to be scanned by a second terminal device running a second application.
[0241] The second dynamic code acquisition subunit is used to obtain the dynamic code corresponding to the token generated by the second terminal device through the second application.
[0242] Optionally, the dynamic code acquisition unit may specifically include:
[0243] The first dynamic code acquisition request sending subunit is used to send a dynamic code acquisition request carrying the token to a second terminal device running a second application through a near field communication method.
[0244] The third dynamic code acquisition subunit is used to obtain the dynamic code corresponding to the token generated by the second terminal device through the second application.
[0245] Optionally, the device may further include:
[0246] A registration operation acquisition module is used to acquire a registration operation for the first account.
[0247] A token generation module is used to generate the token corresponding to the first account in response to the registration operation.
[0248] The dynamic code seed generation module is used to generate the dynamic code seed corresponding to the token.
[0249] The association relationship output module is used to output the token and the dynamic code seed having an association relationship.
[0250] Optionally, the association relationship output module may specifically include:
[0251] The first sending unit is used to send the token and the dynamic code seed to the second application running on the first terminal device; the token and the dynamic code seed are associated and stored by the second application.
[0252] or,
[0253] The second QR code generating unit is used to generate a second QR code carrying the token and the dynamic code seed.
[0254] The second QR code display unit is used to display the second QR code; the second QR code is used to be scanned by a second terminal device running the second application; the token and the dynamic code seed are associated and stored by the second terminal device.
[0255] or,
[0256] The second sending unit is used to send the token and the dynamic code seed to a second terminal device running the second application through a near field communication method; the token and the dynamic code seed are associated and stored by the second terminal device.
[0257] Optionally, the device may further include:
[0258] A registration operation acquisition module is used to acquire a registration operation for the first account.
[0259] A token generation module is used to generate the token corresponding to the first account in response to the registration operation.
[0260] A token output module is used to output the token for being provided to the second application.
[0261] Optionally, the token output module may specifically include:
[0262] The first sending unit is used for the first application running on the first terminal device to send the token to the second application running on the first terminal device; the token and the dynamic code seed are associated and stored by the second application; and the dynamic code seed is generated by the second application.
[0263] or,
[0264] A second QR code generating unit, used to generate a second QR code carrying the token;
[0265] A second QR code display unit is used to display the second QR code; the second QR code is used to be scanned by a second terminal device running the second application; the token and the dynamic code seed are associated and stored by the second terminal device; the dynamic code seed is generated by the second application.
[0266] or,
[0267] The second sending unit is used to send the token to a second terminal device running the second application through near field communication; the token and the dynamic code seed are associated and stored by the second terminal device; the dynamic code seed is generated by the second application.
[0268] Figure 6 The embodiments of this specification provide corresponding to Figure 3 A structural diagram of a login verification device is provided. The device is applied to a first server.
[0269] like Figure 6 As shown, the device may include:
[0270] The verification request acquisition module 602 is used to acquire a login verification request carrying a dynamic code sent by the first terminal device through the first application; the dynamic code is generated by the second application based on the token corresponding to the first account of the first application;
[0271] An authentication result determination module 604 is used to obtain, in response to the login verification request, an authentication result of the second server of the second application for the dynamic code;
[0272] The verification result sending module 606 is used to send a login verification result corresponding to the authentication result to the first terminal device.
[0273] based on Figure 6 The present specification also provides some specific implementation schemes of the device, which are described below.
[0274] Optionally, the authentication result determination module 604 may specifically include:
[0275] An authentication request sending unit is used to send an authentication request carrying the dynamic code to the second server of the second application in response to the login verification request.
[0276] The authentication result receiving unit is used to receive the authentication result of the dynamic code returned by the second server.
[0277] Correspondingly, the verification result sending module 606 may specifically include:
[0278] A login verification result determination unit is used to determine a login verification result of the login operation according to the authentication result.
[0279] A login verification result sending unit is used to send the login verification result to the first terminal device.
[0280] Optionally, the login verification result determination unit may specifically include:
[0281] The first login verification result sending subunit is used to send the first login verification result to the first terminal device if the authentication result is the first authentication result indicating that the dynamic code verification is passed; the first login verification result indicates that the login verification is passed.
[0282] The second login verification result sending subunit is used to send the second login verification result to the first terminal device if the authentication result is a second authentication result indicating that the dynamic code has not been verified; the second login verification result indicates that the login verification has not passed.
[0283] It is understood that the above modules refer to computer programs or program segments for executing one or more specific functions. In addition, the distinction between the above modules does not mean that the actual program codes must also be separated.
[0284] Based on the same idea, the embodiments of this specification also provide a device corresponding to the above method.
[0285] Figure 7 The embodiments of this specification provide corresponding to Figure 2 A schematic diagram of the structure of a terminal device. Figure 7 As shown, the device 700 may include:
[0286] at least one processor 710; and,
[0287] A memory 730 in communication with the at least one processor; wherein,
[0288] The memory 730 stores instructions 720 that can be executed by the at least one processor 710. The instructions are executed by the at least one processor 710 to enable the at least one processor 710 to:
[0289] A login operation for a first account of a first application is obtained.
[0290] In response to the login operation, obtaining a dynamic code generated by the second application based on the token corresponding to the first account;
[0291] Send a login verification request carrying the dynamic code to the first server of the first application.
[0292] Obtain a login verification result returned by the first server in response to the login verification request; the login verification result is generated based on an authentication result of the dynamic code by the second server of the second application.
[0293] According to the login verification result, a login process corresponding to the login operation is executed.
[0294] Figure 8 The embodiments of this specification provide corresponding to Figure 3 A schematic diagram of the structure of a server. Figure 8 As shown, the server 800 may include:
[0295] at least one processor 810; and,
[0296] A memory 830 in communication with the at least one processor; wherein,
[0297] The memory 830 stores instructions 820 that can be executed by the at least one processor 810. The instructions are executed by the at least one processor 810 to enable the at least one processor 810 to:
[0298] Obtain a login verification request carrying a dynamic code sent by a first terminal device through a first application; the dynamic code is generated by a second application based on a token corresponding to a first account of the first application.
[0299] In response to the login verification request, obtaining an authentication result of the dynamic code by the second server of the second application;
[0300] Sending a login verification result corresponding to the authentication result to the first terminal device.
[0301] Each embodiment in this specification is described in a progressive manner. The same or similar parts between the embodiments can be referred to each other. Each embodiment focuses on the differences from other embodiments. Figure 7-Figure 8 As for the device shown, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0302] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0303] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0304] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0305] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0306] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0307] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0308] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0309] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0310] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0311] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0312] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0313] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0314] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0315] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0316] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A login method, applied to a first terminal device, comprising: Obtaining a login operation for a first account of a first application; In response to the login operation, obtaining a dynamic code generated by the second application based on the token corresponding to the first account; Sending a login verification request carrying the dynamic code to the first server of the first application; Obtaining a login verification result returned by the first server in response to the login verification request; The login verification result is generated based on the authentication result of the dynamic code by the second server of the second application; According to the login verification result, a login process corresponding to the login operation is executed.
2. The method according to claim 1, wherein in response to the login operation, obtaining a dynamic code generated by the second application based on the token corresponding to the first account specifically comprises: In response to the login operation, querying a token corresponding to the first account; Obtain a dynamic code corresponding to the token generated by the second application; The dynamic code is generated based on a dynamic code seed corresponding to the token.
3. The method according to claim 2, wherein obtaining the dynamic code corresponding to the token generated by the second application specifically comprises: The first application running on the first terminal device sends a dynamic code acquisition request to the second application running on the first terminal device; The dynamic code acquisition request carries the token; The first application obtains the dynamic code corresponding to the token and returned by the second application in response to the dynamic code acquisition request.
4. The method according to claim 2, wherein obtaining the dynamic code corresponding to the token generated by the second application specifically comprises: Generate a first QR code carrying a dynamic code acquisition request; the dynamic code acquisition request carries the token; Display the first QR code; The first QR code is used to be scanned by a second terminal device running a second application; Obtain a dynamic code corresponding to the token generated by the second terminal device through the second application.
5. The method according to claim 2, wherein obtaining the dynamic code corresponding to the token generated by the second application specifically comprises: Sending a dynamic code acquisition request carrying the token to a second terminal device running a second application through near field communication; Obtain a dynamic code corresponding to the token generated by the second terminal device through the second application.
6. The method according to claim 2, before obtaining the login operation of the first account for the first application, further comprising: Obtaining a registration operation for the first account; In response to the registration operation, generating the token corresponding to the first account; Generate the dynamic code seed corresponding to the token; Output the token and the dynamic code seed that have an associated relationship.
7. The method according to claim 6, wherein the outputting of the token and the dynamic code seed having an associated relationship specifically comprises: The first application running on the first terminal device sends the token and the dynamic code seed to the second application running on the first terminal device; The token and the dynamic code seed are stored in association with each other by the second application; or, Generate a second QR code carrying the token and the dynamic code seed; The second QR code is displayed; the second QR code is used to be scanned by a second terminal device running the second application; the token and the dynamic code seed are associated and stored by the second terminal device; or, The token and the dynamic code seed are sent to a second terminal device running the second application via near field communication; the token and the dynamic code seed are associated and stored by the second terminal device.
8. The method according to claim 2, before obtaining the login operation of the first account for the first application, further comprising: Obtaining a registration operation for the first account; In response to the registration operation, generating the token corresponding to the first account; The token is output for being provided to the second application.
9. The method of claim 8, wherein the output is used to provide the token to the second application, and specifically comprises: The first application running on the first terminal device sends the token to the second application running on the first terminal device; The token and the dynamic code seed are stored in association with each other by the second application; the dynamic code seed is generated by the second application; or, Generate a second QR code carrying the token; displaying the second QR code; the second QR code is used to be scanned by a second terminal device running the second application; the token and the dynamic code seed are associated and stored by the second terminal device; the dynamic code seed is generated by the second application; or, The token is sent to a second terminal device running the second application via near field communication; the token and the dynamic code seed are associated and stored by the second terminal device; and the dynamic code seed is generated by the second application.
10. A login verification method, applied to a first server, comprising: Obtaining a login verification request carrying a dynamic code sent by the first terminal device through the first application; The dynamic code is generated by the second application based on the token corresponding to the first account of the first application; In response to the login verification request, obtaining an authentication result of the dynamic code by the second server of the second application; Sending a login verification result corresponding to the authentication result to the first terminal device.
11. The method of claim 10, wherein: The obtaining, in response to the login verification request, an authentication result of the second server of the second application for the dynamic code specifically includes: In response to the login verification request, sending an authentication request carrying the dynamic code to a second server of the second application; receiving an authentication result of the dynamic code returned by the second server; The sending a login verification result corresponding to the authentication result to the first terminal device specifically includes: Determining a login verification result of the login operation according to the authentication result; Send the login verification result to the first terminal device.
12. The method according to claim 11, wherein determining the login verification result of the login operation according to the authentication result specifically comprises: If the authentication result is a first authentication result indicating that the dynamic code verification is passed, sending a first login verification result to the first terminal device; The first login verification result indicates that the login verification is passed; If the authentication result is a second authentication result indicating that the dynamic code has not been verified, a second login verification result is sent to the first terminal device; the second login verification result indicates that the login verification has not passed.
13. A login device, applied to a first terminal device, comprising: An operation acquisition module, used to acquire a login operation for a first account of a first application; A dynamic code acquisition module, configured to, in response to the login operation, acquire a dynamic code generated by the second application based on the token corresponding to the first account; A verification request sending module, used to send a login verification request carrying the dynamic code to the first server of the first application; A verification result acquisition module, used to obtain the login verification result returned by the first server in response to the login verification request; The login verification result is generated based on the authentication result of the dynamic code by the second server of the second application; A login execution module is used to execute a login process corresponding to the login operation according to the login verification result.
14. A login verification device, applied to a first server, comprising: A verification request acquisition module, used to acquire a login verification request carrying a dynamic code sent by a first terminal device through a first application; The dynamic code is generated by the second application based on the token corresponding to the first account of the first application; an authentication result determination module, configured to obtain, in response to the login verification request, an authentication result of the second server of the second application for the dynamic code; A verification result sending module is used to send a login verification result corresponding to the authentication result to the first terminal device.
15. A terminal device, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining a login operation for a first account of a first application; In response to the login operation, obtaining a dynamic code generated by the second application based on the token corresponding to the first account; Sending a login verification request carrying the dynamic code to the first server of the first application; Obtaining a login verification result returned by the first server in response to the login verification request; the login verification result is generated based on an authentication result of the second server of the second application for the dynamic code; According to the login verification result, a login process corresponding to the login operation is executed.
16. A server, comprising: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Obtaining a login verification request carrying a dynamic code sent by a first terminal device through a first application; the dynamic code is generated by a second application based on a token corresponding to a first account of the first application; In response to the login verification request, obtaining an authentication result of the dynamic code by the second server of the second application; Sending a login verification result corresponding to the authentication result to the first terminal device.