Disclosure of Invention
The present disclosure provides an application login method, apparatus, terminal, server, system and storage medium, which can solve the problem of low login efficiency of an application, and the technical scheme is as follows.
In a first aspect, an application login method is provided, which is applied to a terminal, and the method includes:
when the triggering operation of acquiring the number is detected, acquiring a communication number;
sending a token acquisition request to an authentication server, wherein the token acquisition request carries the communication number;
when a verification token sent by the authentication server is received, displaying a quick login option on an application interface of an application;
when the trigger operation of the quick login option is detected, sending a request message to an application server, wherein the request message carries the verification token;
and when the login success message of the application server is received, switching the application interface to the interface after login.
Optionally, the displaying a quick login option on the application interface includes:
displaying an option display prompt window on the application interface, and displaying the quick login option on the application interface when a confirmation display instruction is received based on the option display prompt window; or,
and displaying the quick login option at a preset position of the application interface.
Optionally, the login success message further carries a login token, and the login token is used for the information interaction of the application.
Optionally, after the switching the application interface to the logged-in interface, the method further includes:
displaying an information registration interface in the logged-in application;
receiving input user information based on the information registration interface;
and when receiving a confirmation information instruction, sending the user information to the application server.
In a second aspect, an application login method is provided, which is applied in an application server, and the method includes:
receiving a request message sent by a terminal, wherein the request message carries an authentication token;
authenticating the verification token by an authentication server;
when the authentication of the verification token is passed through the authentication server, acquiring a communication number corresponding to the verification token;
logging in the application based on the communication number;
and sending a login success message to the terminal, wherein the login success message is used for indicating the terminal to switch the application interface to the interface after login.
Optionally, the authenticating, by an authentication server, the verification token includes:
and sending an authentication request message to the authentication server, wherein the authentication request message carries the verification token and is used for requesting the authentication server to authenticate the verification token.
Optionally, the obtaining of the communication number corresponding to the verification token includes:
receiving an authentication response message sent by the authentication server, wherein the authentication response message carries a communication number corresponding to the verification token;
and acquiring the communication number corresponding to the verification token from the authentication response message.
Optionally, before the logging in the application based on the communication number, the method further includes:
when the authentication response message also carries an application identifier and an application key, authenticating the application identifier based on the application key;
and when the application identification passes the authentication based on the application key, executing the operation of logging in the application based on the communication number.
Optionally, the login success message further carries a login token, and the login token is used for the information interaction of the application.
Optionally, the logging in the application based on the communication number includes:
when the communication number is stored, logging in the application;
and when the communication number is not stored, locally storing the communication number and logging in the application.
Optionally, after sending the login success message to the terminal, the method further includes:
and when receiving the user information sent by the terminal, correspondingly storing the user information and the communication number.
In a third aspect, an application login apparatus configured in a terminal is provided, the apparatus including:
the number acquisition module is configured to acquire a communication number when the trigger operation of acquiring the number is detected;
the first sending module is configured to send a token obtaining request to an authentication server, wherein the token obtaining request carries the communication number;
the display module is configured to display a quick login option on an application interface of an application when a verification token sent by the authentication server is received;
the second sending module is configured to send a request message to an application server when the trigger operation of the quick login option is detected, wherein the request message carries the authentication token;
and the switching module is configured to switch the application interface to the interface after login when the login success message of the application server is received.
Optionally, the display module is configured to:
displaying an option display prompt window on the application interface, and displaying the quick login option on the application interface when a confirmation display instruction is received based on the option display prompt window; or,
and displaying the quick login option at a preset position of the application interface.
Optionally, the login success message further carries a login token, and the login token is used for the information interaction of the application.
Optionally, the apparatus further comprises a first registration module configured to:
displaying an information registration interface in the logged-in application;
receiving input user information based on the information registration interface;
and when receiving a confirmation information instruction, sending the user information to the application server.
In a fourth aspect, an application login apparatus configured in an application server is provided, the apparatus including:
the message receiving module is configured to receive a request message sent by a terminal, wherein the request message carries an authentication token;
an authentication module configured to authenticate the verification token by an authentication server;
the obtaining module is configured to obtain a communication number corresponding to the verification token when the verification token passes the authentication of the authentication server;
the login module is configured to log in the application based on the communication number;
and the third sending module is configured to send a login success message to the terminal, wherein the login success message is used for indicating the terminal to switch the application interface to the interface after login.
Optionally, the authentication module is configured to:
and sending an authentication request message to the authentication server, wherein the authentication request message carries the verification token and is used for requesting the authentication server to authenticate the verification token.
Optionally, the obtaining module is configured to:
receiving an authentication response message sent by the authentication server, wherein the authentication response message carries a communication number corresponding to the verification token;
and acquiring the communication number corresponding to the verification token from the authentication response message.
Optionally, the authentication module is further configured to:
when the authentication response message also carries an application identifier and an application key, authenticating the application identifier based on the application key;
and when the application identification passes the authentication based on the application key, executing the operation of logging in the application based on the communication number.
Optionally, the login success message further carries a login token, and the login token is used for the information interaction of the application.
Optionally, the login module is configured to:
when the communication number is stored, logging in the application;
and when the communication number is not stored, locally storing the communication number and logging in the application.
Optionally, the device further includes a storage module, and the storage module is configured to, when receiving user information sent by the terminal, correspondingly store the user information and the communication number.
In a fifth aspect, a terminal is provided, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the application login method of the first aspect.
In a sixth aspect, an application server is provided, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the application login method of the second aspect.
A seventh aspect provides an application login system, which includes a terminal, an authentication server, and an application server;
the terminal is used for acquiring the communication number when the triggering operation of acquiring the number is detected; sending a token acquisition request to the authentication server, wherein the token acquisition request carries the communication number; when a verification token sent by the authentication server is received, displaying a quick login option on an application interface of an application; when the trigger operation of the quick login option is detected, sending a request message to the application server, wherein the request message carries the authentication token;
the application server is used for receiving a request message sent by the terminal; authenticating, by the authentication server, the validation token; when the authentication of the verification token is passed through the authentication server, acquiring a communication number corresponding to the verification token; logging in the application based on the communication number; sending a login success message to the terminal, wherein the login success message is used for indicating the terminal to switch an application interface to a logged-in interface;
and the terminal is used for switching the application interface to the interface after login when the login success message of the application server is received.
In an eighth aspect, a computer-readable storage medium is provided, which has instructions stored thereon, and is characterized in that the instructions, when executed by a processor, implement the application login method of the first aspect.
In a ninth aspect, a computer-readable storage medium is provided, which has instructions stored thereon, and is characterized in that the instructions, when executed by a processor, implement the application login method of the second aspect.
A tenth aspect provides a computer program product which, when run on a computer, causes the computer to perform the application login method of the first aspect described above.
In an eleventh aspect, there is provided a computer program product which, when run on a computer, causes the computer to perform the application login method of the second aspect described above.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects: the terminal acquires the communication number when detecting the trigger operation of acquiring the number, and sends a token acquisition request carrying the communication number to the authentication server so as to request the authentication server to acquire a verification token. When receiving the verification token sent by the authentication server, the authentication server is proved to pass the communication number authentication, at the moment, the terminal displays the quick login option on the application interface of the application, so that when a user wants to login the application, the user can trigger the display of the quick login option, and the terminal sends a request message carrying the verification token to the application server to request the application server to login the application. And the application server authenticates the verification token, logs in the application based on the communication number when the authentication is passed, and sends a login success message to the terminal, and the terminal switches the application interface to the interface after logging in. Therefore, the user can log in the application by one key based on the quick login option by sending the verification token to the application server, the user does not need to manually input a user account and a password, the operation convenience is improved, and the application login efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Before describing the application login method provided by the embodiment of the present disclosure in detail, the application scenario and the implementation environment related to the embodiment of the present disclosure are briefly described.
First, a brief description is given of an application scenario related to an embodiment of the present disclosure.
During the use of the application, for some products with strong social attributes, login use is generally required, such as WeChat, QQ and the like. The behavior track of the User using the application can be stored only after logging in, the UGC (User Generated Content) with the User personal tag is Generated, social relations are established with other users, and the data are stored to facilitate synchronization on a plurality of terminals, so that a basis is provided for generating User portraits and services such as refinement and personalization.
At present, login modes are diversified, and a common implementation mode is to log in by inputting a user account and a password by a user. Therefore, the operation is complicated, the user experience is poor, and the login efficiency is low. In addition, the login can be performed by adopting a third-party application authorization mode, for example, when a browser is logged in, the login can be authorized through a QQ. However, in the method of authorization by the third-party application, it is necessary to integrate a plurality of SDKs (Software Development Kit) of the third-party application into the pre-logged application, and the SDKs for authorization are different between the domestic and foreign countries, and in addition, it is necessary to leave the current pre-logged application to call up an authorization page of the third-party application, and the operation steps are complicated. In addition, if the user account of the third-party application does not exist, authorized login cannot be performed.
Therefore, the embodiment of the present disclosure provides an application login method, which does not require a user to perform manual operation for multiple times, improves convenience of operation, and can improve login efficiency without relying on third-party application authorization, and for specific implementation, please refer to the embodiment shown in fig. 2 below.
Next, a brief description will be given of an implementation environment related to the embodiments of the present disclosure.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an implementation environment in accordance with an example embodiment. The implementation environment includes a terminal 110, anapplication server 120, and anauthentication server 130. The terminal 110, theapplication server 120 and theauthentication server 130 may be connected to each other through a wired network or a wireless network.
The terminal 110 is mainly used for a user to log in an application, the terminal 110 may provide an interactive interface for implementing human-computer interaction, and various types of applications may be installed in theterminal 110. In some embodiments, the terminal may be a mobile phone or any other communication device capable of mobile communication.
Theapplication server 120 is mainly used for providing services for applications, for example, may be used for managing login and registration operations of applications, and theapplication server 120 may be provided by an operator of an application. In some embodiments, theapplication server 120 may be a server, or theapplication server 120 may also be a server cluster composed of multiple servers, which is not limited in this disclosure.
Theauthentication server 130 may be mainly used for performing legal authentication, for example, for performing legal authentication on the authenticity of an application identifier, and for authenticating the validity of a communication number. Theauthentication server 130 may be generally provided by an operator, such as, but not limited to, a telecom, Unicom, Mobile, etc. operator. In addition, in some embodiments, theauthentication server 130 may be one server, or may be a server cluster composed of a plurality of servers, which is not limited in this disclosure.
After the application scenarios and the implementation environments related to the embodiments of the present disclosure are described, the application login method provided by the embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart illustrating an application login method according to an exemplary embodiment, as shown in fig. 2, the application login method may be applied in the implementation environment shown in fig. 1, and the method may include the following implementation steps:
in step 201, when a trigger operation of acquiring a number is detected, a communication number is acquired.
The communication number is a telephone number currently used by a terminal where the application to be logged in is located. In a possible implementation manner, the terminal may obtain the communication number from a Subscriber Identity Module (SIM) card when detecting a trigger operation for obtaining the number.
In some embodiments, when the terminal detects a start operation on an application, it is determined that a trigger operation of acquiring a number is detected. That is, when the terminal detects that the user starts the application, for example, a click operation is detected based on an icon of the application, and the communication number is acquired from the SIM card.
In another embodiment, when the terminal detects the triggering operation on the preset option, it is determined that the triggering operation for acquiring the number is detected. The preset option may be provided by the application, that is, after the application is started, the preset option may be provided, as shown in fig. 3, the preset option may be a "login using a mobile phone number" option, and when the terminal detects a trigger operation based on the provided preset option, the operation of acquiring the communication number is performed.
Further, referring to fig. 3, the terminal may further display a conventional login option in the application interface, and when the user does not want to login by using the method provided in the embodiment of the present disclosure, the terminal may click the conventional login option to login by inputting a user account and a password, which is not limited in the embodiment of the present disclosure.
In step 202, the terminal sends a token obtaining request to the authentication server, where the token obtaining request carries the communication number.
The token acquisition request is used to request a verification token from the authentication server, where the verification token is used for subsequent one-key login to the application, and the verification token may be, for example, token.
In implementation, after receiving the token obtaining request, the authentication server parses the token obtaining request to obtain the carried communication number. The authentication server authenticates the validity of the communication number, namely, judges whether the communication number is real and valid, whether the defaulting phenomenon exists and the like. When the communication number passes the authentication, the authentication server provides a verification token for the terminal, and when the communication number fails the authentication, a token acquisition failure message can be returned to prompt the user that the token acquisition failure occurs.
In some embodiments, the token obtaining request further carries an application identifier and an application key of the application, where the application identifier is used to uniquely identify an application, and the application key is generally paired with the application identifier and used to legally authenticate the authenticity of the application identifier. For example, the application identifier is APPID and the application key is APPKEY. In this case, the authentication server may verify the authenticity of the application identifier based on the application key, that is, determine whether the application identifier and the application key are a pair, and determine that the application identifier is valid when determining that the application identifier and the application key are a pair, where the authentication server provides a verification token to the terminal, and otherwise, the authentication server returns a token acquisition failure message to prompt the user that the verification token acquisition is failed. It should be noted that the authentication token has uniqueness, that is, each application corresponds to a unique authentication token, and in addition, the authentication token also has timeliness.
In step 203, when the terminal receives the verification token sent from the authentication server, a quick login option is displayed on an application interface of the application.
When the authentication server provides the authentication token for the terminal, the communication number is authenticated to be passed, and in this case, the terminal can display a quick login option on an application interface of the application.
The quick login option may be a button option, or may also be an option in other forms. In a possible implementation manner, the implementation that the terminal displays the quick login option on the application interface may include the following two manners:
the first mode is as follows: and displaying an option display prompt window on the application interface, and displaying the quick login option on the application interface when a confirmation display instruction is received based on the option display prompt window.
That is, when the terminal receives the verification token sent from the authentication server, the terminal may not directly display the shortcut login option on the application interface, but first display an option display prompt window for prompting the user whether to display the shortcut login option. In a possible implementation manner, the option display prompt window may be provided with a confirmation display option and a cancellation display option, when the user wants to display the quick login option, the confirmation display option may be clicked to trigger a confirmation display instruction, and at this time, the terminal displays the quick login option on the application interface. Or, when the user does not want to display the quick login option, the user may click the cancel display option to trigger a cancel display instruction, and at this time, the terminal does not display the quick login option on the application interface.
It is worth mentioning that before the quick login option is displayed, the option display prompt window is displayed first, so that a user can conveniently select whether the quick login option needs to be displayed, and user experience is improved.
The second mode is as follows: and displaying the quick login option at a preset position of the application interface.
In the implementation mode, the terminal can also directly display the quick login option at the preset position of the application interface when receiving the verification token sent from the authentication server, and the user does not need to perform triggering operation, so that the convenience of operation can be improved.
The preset position may be set by a user according to actual needs in a user-defined manner, or may be set by the default of the terminal, which is not limited in the embodiment of the present disclosure.
Further, the shortcut login option may be automatically named, and the named name is displayed on or near the shortcut login option, for example, the shortcut login option may be named "one-touch login", and the like, which is not limited in this disclosure.
In step 204, when the terminal detects a trigger operation on the fast login option, a request message is sent to the application server, where the request message carries the authentication token. When the terminal detects the trigger operation of the quick login option, the fact that the user wants to login the application in one key is indicated, at the moment, the terminal generates a request message based on the verification token acquired from the authentication server and sends the request message to the application server. The request message is used for instructing the application server to legally authenticate the verification token through the authentication server, and logging in the application when the verification token is legally authenticated.
In step 205, the application server receives a request message sent by the terminal, where the request message carries an authentication token.
After receiving the request message sent by the terminal, the application server analyzes the request message to acquire the carried verification token from the request message.
In step 206, the application server authenticates the verification token through the authentication server, and acquires the communication number corresponding to the verification token when the verification token is authenticated through the authentication server.
In order to determine whether the verification token is legitimate, i.e. authentic and valid, the application server authenticates the verification token via the authentication server. In a possible implementation manner, a specific implementation that the application server authenticates the verification token through the authentication server may include: and sending an authentication request message to the authentication server, wherein the authentication request message carries the verification token and is used for requesting the authentication server to authenticate the verification token.
And after receiving the authentication request message, the authentication server acquires a verification token from the authentication request message. In one possible implementation, the implementation of the authentication server to authenticate the verification token may include: the authentication server may query whether the verification token sent by the application server belongs to a plurality of pre-assigned verification tokens, and when determining that the verification token sent by the application server belongs to the plurality of pre-assigned verification tokens, determine that the verification token is authenticated, otherwise, when determining that the verification token sent by the application server does not belong to the plurality of pre-assigned verification tokens, determine that the verification token is not authenticated.
That is, the authentication server may locally store the correspondence between each of the authentication tokens and the communication number after assigning each of the authentication tokens based on the communication number and transmitting the each of the authentication tokens to the terminal, and thus, when receiving the authentication token transmitted from the application server, authenticate the authentication token transmitted from the application server based on the stored plurality of authentication tokens.
Further, when the authentication server authenticates the verification token, the communication number corresponding to the verification token is obtained based on the stored corresponding relation, and the communication number is returned to the application server.
In some embodiments, the authentication server may send an authentication response message to the application server, where the authentication response message carries the communication number corresponding to the verification token. At this time, the implementation of the application server obtaining the communication number corresponding to the verification token may include: and receiving an authentication response message sent by the authentication server, wherein the authentication response message carries the communication number corresponding to the verification token, and acquiring the communication number corresponding to the verification token from the authentication response message.
In addition, as described above, the terminal may also carry the application identifier and the application key in the token obtaining request sent to the authentication server, and in this case, the authentication server may also store a correspondence relationship between the verification token and the application identifier and the application key. At this time, when the authentication server passes the valid authentication of the verification token, the authentication server may further obtain the application identifier and the application key corresponding to the verification token based on the correspondence between the three, and send the application identifier and the application key to the application server to notify the application server of which application the verification token passes the valid authentication.
The application key is used by the application server to verify the authenticity of the application identifier, that is, since the application identifier may be tampered during data transmission, for example, the application identifier is tampered into a pseudo identifier, the authentication server may send the application key to the application server together.
In some embodiments, in a possible implementation manner, the authentication server may carry the application identifier and the application key through the authentication response message, for example, the authentication server generates an authentication response message based on the communication number, the application identifier and the application key, and sends the authentication response message to the application server.
In step 207, the application server receives the communication number sent by the authentication server and then queries whether the communication number is stored.
And after receiving the communication number sent by the authentication server, the application server inquires whether the communication number is stored locally. When the communication number is stored locally, go to step 208 and enter the login process. If the communication number is not stored locally, go to step 211 and enter the registration process.
In the embodiment of the present disclosure, the application server may automatically select to execute the registration operation or login operation of the application according to the registration condition of the communication number. For example, if it is determined that the communication number is registered, the application server directly logs in the application. Otherwise, if the communication number is determined not to be registered, the application server performs registration operation on the communication number, and then performs login of the application.
In step 208, when the application server has stored the communication number, the application is logged in.
In some embodiments, the implementation process of the login operation of the application by the application server may include: and acquiring user information corresponding to the communication number, and finishing the login of the application based on the user information. The user information may include information such as a user avatar, a user account, a user gender, and a user age, which is not limited in this disclosure.
Further, when the communication number is stored, if the authentication response message further carries an application identifier and an application key, before login of the application is performed, the application identifier may be authenticated based on the application key, and when the authentication of the application identifier based on the application key passes, the login operation of the application is performed.
That is, when the authentication server returns an application id and an application key to the application server in addition to the communication number, for example, the application id and the application key are also carried in the authentication response message, before the application server logs in the application, the application server may verify the authenticity of the application id based on the application key, that is, determine whether the application id and the application key belong to a pair. And when the authenticity verification of the application identifier based on the application key passes, namely the application identifier and the application key are determined to belong to a pair, performing the login operation of the application. Otherwise, when the authenticity verification of the application identifier based on the application key fails, that is, it is determined that the application identifier and the application key do not belong to a pair, a login failure message may be sent to the terminal.
In step 209, the application server sends a login success message to the terminal, where the login success message is used to instruct the terminal to switch the application interface to the logged-in interface.
After the application server completes the login of the application, the terminal may be notified, that is, a login success message may be sent to the terminal. Further, the login success message may carry a login token, and the login token is used for the information interaction of the application. That is, when information interaction is performed between a subsequent application and another application, the information interaction can be realized based on the login token.
The information interaction may refer to uploading data to an application server, or may also refer to interaction with other friend user accounts using the application, and the like. For example, the terminal may use the login token to publish logs, upload files, etc. in the application. For another example, the terminal may also use the login token to chat with other friends using the application, view friend information, and the like.
In addition, the login success message can also carry user information, and the user information is used for login display and is particularly applied to interface display after login.
In step 210, when the terminal receives the login success message of the application server, the application interface is switched to the interface after login.
Further, when the login success message also carries a login token, the terminal stores the login token so as to facilitate subsequent information interaction of the application based on the login token.
In addition, when the login success message also carries user information, the terminal switches to the interface after login and displays the user information in the interface after login. For example, a user avatar, a user account, a user gender, and a user age are displayed.
In step 211, when the application server does not store the communication number, the communication number is stored locally.
When the application server does not store the communication number, the communication number is not registered, at this time, registration needs to be performed based on the communication number, and when the application server is implemented, the application server stores the communication number locally to complete registration of the application.
Further, when the communication number is not stored, if the authentication response message further carries an application identifier and an application key, before the registration of the application, the application identifier may also be authenticated based on the application key, and when the authentication of the application identifier based on the application key passes, the registration operation of the application is performed.
In step 212, the application server performs a login for the application.
After the application server completes the registration of the application, the application server continues to perform the login operation of the application, and sends a login success message to the terminal, which can be specifically realized as described above. That is, the registration process of the application is imperceptible to the user, and is automatically completed in the background by the application server, and the login of the application is automatically performed after completion. Further, the application server may carry a preset identifier in the login success message, where the preset identifier is used to instruct the terminal to log in the application for the first time, that is, the terminal knows that the login is performed by the application server after the login operation is completed. The preset identification can be preset according to actual requirements.
In step 213, the terminal presents an information registration interface in the logged-in application.
In a possible implementation manner, when the terminal detects that the login success message carries the preset identifier, an information registration interface is displayed in the application interface after login, so that the user fills in the registration information, for example, the user information may be input in the information registration interface.
In another possible implementation manner, the terminal may also display the information registration interface when receiving a user information filling instruction in the logged-in application interface. That is, the application may be provided with a display user information filling option, and the user information filling option may be clicked to trigger the user information filling instruction after the user logs in the application, so that the terminal displays the information registration interface in the logged-in application.
In step 214, the terminal receives the input user information based on the information registration interface.
In step 215, when the terminal receives the confirmation information command, the user information is transmitted to the application server.
The information determining instruction can be triggered by a user, and the user can trigger through preset operation. For example, the information registration interface may be provided with a confirmation information option, which may be clicked to trigger a confirmation information command after the user has filled in user information based on the information registration interface. And after receiving the confirmation information instruction, the terminal sends the user information to the application server.
In step 216, the application server receives the user information sent by the terminal, where the user information is obtained by the terminal based on the information registration interface.
In step 217, the application server stores the communication number and the user information in association with each other.
After receiving the user information sent by the terminal, the application server can locally store the communication number and the user information correspondingly, so that one-key login operation can be performed subsequently according to the corresponding relationship between the communication number and the user information.
It is worth mentioning that, in the embodiment of the present disclosure, the user does not need to fill the verification code in the registration process, which simplifies the registration process and improves the registration efficiency, thereby improving the user experience.
In the embodiment of the disclosure, when detecting the trigger operation of acquiring the number, the terminal acquires the communication number, and sends a token acquisition request carrying the communication number to the authentication server to request the authentication server to acquire the verification token. When receiving the verification token sent by the authentication server, the authentication server is proved to pass the communication number authentication, at the moment, the terminal displays the quick login option on the application interface of the application, so that when a user wants to login the application, the user can trigger the display of the quick login option, and the terminal sends a request message carrying the verification token to the application server to request the application server to login the application. And the application server authenticates the verification token, logs in the application based on the communication number when the authentication is passed, and sends a login success message to the terminal, and at the moment, the terminal switches the application interface to the interface after logging in. Therefore, the user can log in the application by one key based on the quick login option by sending the verification token to the application server, the user does not need to manually input a user account and a password, the operation convenience is improved, and the application login efficiency is improved. In addition, by adopting the application login method provided by the embodiment of the disclosure, the user is more inclined to login and use when using the application, and the conversion rate of the terminal is improved.
Fig. 4 is a block diagram illustrating an application login device according to an example embodiment. Referring to fig. 4, the apparatus includes:
anumber obtaining module 410 configured to obtain a communication number when a trigger operation of obtaining the number is detected;
afirst sending module 420 configured to send a token obtaining request to an authentication server, where the token obtaining request carries the communication number;
adisplay module 430 configured to display a quick login option on an application interface of an application when receiving a verification token sent by the authentication server;
asecond sending module 440, configured to send a request message to an application server when the trigger operation on the quick login option is detected, where the request message carries the authentication token;
aswitching module 450 configured to switch the application interface to a logged interface when receiving a login success message of the application server.
Optionally, thedisplay module 430 is configured to:
displaying an option display prompt window on the application interface, and displaying the quick login option on the application interface when a confirmation display instruction is received based on the option display prompt window; or,
and displaying the quick login option at a preset position of the application interface.
Optionally, the login success message further carries a login token, and the login token is used for the information interaction of the application.
Optionally, referring to fig. 5, the apparatus further includes afirst registration module 460, where thefirst registration module 460 is configured to:
displaying an information registration interface in the logged-in application;
receiving input user information based on the information registration interface;
and when receiving a confirmation information instruction, sending the user information to the application server.
In the embodiment of the disclosure, when detecting the trigger operation of acquiring the number, the terminal acquires the communication number, and sends a token acquisition request carrying the communication number to the authentication server to request the authentication server to acquire the verification token. When receiving the verification token sent by the authentication server, the authentication server is proved to pass the communication number authentication, at the moment, the terminal displays the quick login option on the application interface of the application, so that when a user wants to login the application, the user can trigger the display of the quick login option, and the terminal sends a request message carrying the verification token to the application server to request the application server to login the application. And the application server authenticates the verification token, logs in the application based on the communication number when the authentication is passed, and sends a login success message to the terminal, and at the moment, the terminal switches the application interface to the interface after logging in. Therefore, the user can log in the application by one key based on the quick login option by sending the verification token to the application server, the user does not need to manually input a user account and a password, the operation convenience is improved, and the application login efficiency is improved.
Fig. 6 is a block diagram illustrating an application login device according to an example embodiment. Referring to fig. 6, the apparatus includes:
amessage receiving module 610 configured to receive a request message sent by a terminal, where the request message carries an authentication token;
anauthentication module 620 configured to authenticate the verification token by an authentication server;
an obtainingmodule 630, configured to obtain a communication number corresponding to the verification token when the verification token is authenticated by the authentication server;
alogin module 640 configured to log in the application based on the communication number;
athird sending module 650, configured to send a login success message to the terminal, where the login success message is used to instruct the terminal to switch the application interface to the logged-in interface.
Optionally, theauthentication module 620 is configured to:
and sending an authentication request message to the authentication server, wherein the authentication request message carries the verification token and is used for requesting the authentication server to authenticate the verification token.
Optionally, the obtainingmodule 630 is configured to:
receiving an authentication response message sent by the authentication server, wherein the authentication response message carries a communication number corresponding to the verification token;
and acquiring the communication number corresponding to the verification token from the authentication response message.
Optionally, theauthentication module 620 is further configured to:
when the authentication response message also carries an application identifier and an application key, authenticating the application identifier based on the application key;
and when the application identification passes the authentication based on the application key, executing the operation of logging in the application based on the communication number.
Optionally, the login success message further carries a login token, and the login token is used for the information interaction of the application.
Optionally, thelogin module 640 is configured to:
when the communication number is stored, logging in the application;
and when the communication number is not stored, locally storing the communication number and logging in the application.
Optionally, referring to fig. 7, the apparatus further includes astorage module 660, where thestorage module 660 is configured to, when receiving user information sent by the terminal, correspondingly store the user information and the communication number.
In the embodiment of the disclosure, when detecting the trigger operation of acquiring the number, the terminal acquires the communication number, and sends a token acquisition request carrying the communication number to the authentication server to request the authentication server to acquire the verification token. When receiving the verification token sent by the authentication server, the authentication server is proved to pass the communication number authentication, at the moment, the terminal displays the quick login option on the application interface of the application, so that when a user wants to login the application, the user can trigger the display of the quick login option, and the terminal sends a request message carrying the verification token to the application server to request the application server to login the application. And the application server authenticates the verification token, logs in the application based on the communication number when the authentication is passed, and sends a login success message to the terminal, and at the moment, the terminal switches the application interface to the interface after logging in. Therefore, the user can log in the application by one key based on the quick login option by sending the verification token to the application server, the user does not need to manually input a user account and a password, the operation convenience is improved, and the application login efficiency is improved.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 shows a block diagram of a terminal 800 according to an exemplary embodiment of the disclosure. The terminal 800 may be: a smart phone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III, motion video Experts compression standard Audio Layer 3), an MP4 player (Moving Picture Experts Group Audio Layer IV, motion video Experts compression standard Audio Layer 4), a notebook computer, or a desktop computer. The terminal 800 may also be referred to by other names such as user equipment, portable terminal, laptop terminal, desktop terminal, etc.
In general, the terminal 800 includes: aprocessor 801 and amemory 802.
Theprocessor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and so forth. Theprocessor 801 may be implemented in at least one hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). Theprocessor 801 may also include a main processor and a coprocessor, where the main processor is a processor for processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, theprocessor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, theprocessor 801 may further include an AI (Artificial Intelligence) processor for processing computing operations related to machine learning.
Memory 802 may include one or more computer-readable storage media, which may be non-transitory.Memory 802 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In some embodiments, a non-transitory computer readable storage medium inmemory 802 is used to store at least one instruction for execution byprocessor 801 to implement the application login method provided by method embodiments herein.
In some embodiments, the terminal 800 may further include: aperipheral interface 803 and at least one peripheral. Theprocessor 801,memory 802 andperipheral interface 803 may be connected by bus or signal lines. Various peripheral devices may be connected toperipheral interface 803 by a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of aradio frequency circuit 804, atouch screen display 805, acamera 806, anaudio circuit 807, apositioning component 808, and apower supply 809.
Theperipheral interface 803 may be used to connect at least one peripheral related to I/O (Input/Output) to theprocessor 801 and thememory 802. In some embodiments, theprocessor 801,memory 802, andperipheral interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of theprocessor 801, thememory 802, and theperipheral interface 803 may be implemented on separate chips or circuit boards, which are not limited by this embodiment.
TheRadio Frequency circuit 804 is used for receiving and transmitting RF (Radio Frequency) signals, also called electromagnetic signals. Theradio frequency circuitry 804 communicates with communication networks and other communication devices via electromagnetic signals. Therf circuit 804 converts an electrical signal into an electromagnetic signal to be transmitted, or converts a received electromagnetic signal into an electrical signal. Optionally, theradio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. Theradio frequency circuit 804 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, theradio frequency circuit 804 may further include NFC (Near Field Communication) related circuits, which are not limited in this application.
Thedisplay screen 805 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When thedisplay 805 is a touch display, thedisplay 805 also has the ability to capture touch signals on or above the surface of thedisplay 805. The touch signal may be input to theprocessor 801 as a control signal for processing. At this point, thedisplay 805 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, thedisplay 805 may be one, providing the front panel of the terminal 800; in other embodiments, thedisplay 805 may be at least two, respectively disposed on different surfaces of the terminal 800 or in a folded design; in still other embodiments, thedisplay 805 may be a flexible display disposed on a curved surface or a folded surface of the terminal 800. Even further, thedisplay 805 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. TheDisplay 805 can be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and other materials.
Thecamera assembly 806 is used to capture images or video. Optionally,camera assembly 806 includes a front camera and a rear camera. Generally, a front camera is disposed at a front panel of the terminal, and a rear camera is disposed at a rear surface of the terminal. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, and the main camera and the wide-angle camera are fused to realize panoramic shooting and VR (Virtual Reality) shooting functions or other fusion shooting functions. In some embodiments,camera assembly 806 may also include a flash. The flash lamp can be a monochrome temperature flash lamp or a bicolor temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
Theaudio circuit 807 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to theprocessor 801 for processing or inputting the electric signals to theradio frequency circuit 804 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the terminal 800. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from theprocessor 801 or theradio frequency circuit 804 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, theaudio circuitry 807 may also include a headphone jack.
Thepositioning component 808 is used to locate the current geographic position of the terminal 800 for navigation or LBS (Location Based Service). ThePositioning component 808 may be a Positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
Power supply 809 is used to provide power to various components interminal 800. Thepower supply 809 can be ac, dc, disposable or rechargeable. When thepower supply 809 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
In some embodiments, terminal 800 also includes one or more sensors 810. The one or more sensors 810 include, but are not limited to: acceleration sensor 811, gyro sensor 812, pressure sensor 813, fingerprint sensor 814, optical sensor 815 and proximity sensor 816.
The acceleration sensor 811 may detect the magnitude of acceleration in three coordinate axes of the coordinate system established with the terminal 800. For example, the acceleration sensor 811 may be used to detect the components of the gravitational acceleration in three coordinate axes. Theprocessor 801 may control thetouch screen 805 to display the user interface in a landscape view or a portrait view according to the gravitational acceleration signal collected by the acceleration sensor 811. The acceleration sensor 811 may also be used for acquisition of motion data of a game or a user.
The gyro sensor 812 may detect a body direction and a rotation angle of the terminal 800, and the gyro sensor 812 may cooperate with the acceleration sensor 811 to acquire a 3D motion of the user with respect to the terminal 800. From the data collected by the gyro sensor 812, theprocessor 801 may implement the following functions: motion sensing (such as changing the UI according to a user's tilting operation), image stabilization at the time of photographing, game control, and inertial navigation.
Pressure sensors 813 may be disposed on the side bezel ofterminal 800 and/or underneathtouch display 805. When the pressure sensor 813 is disposed on the side frame of the terminal 800, the holding signal of the user to the terminal 800 can be detected, and theprocessor 801 performs left-right hand recognition or shortcut operation according to the holding signal collected by the pressure sensor 813. When the pressure sensor 813 is disposed at a lower layer of thetouch display screen 805, theprocessor 801 controls the operability control on the UI interface according to the pressure operation of the user on thetouch display screen 805. The operability control comprises at least one of a button control, a scroll bar control, an icon control and a menu control.
The fingerprint sensor 814 is used for collecting a fingerprint of the user, and theprocessor 801 identifies the identity of the user according to the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the identity of the user according to the collected fingerprint. Upon identifying that the user's identity is a trusted identity, theprocessor 801 authorizes the user to perform relevant sensitive operations including unlocking a screen, viewing encrypted information, downloading software, paying for and changing settings, etc. Fingerprint sensor 814 may be disposed on the front, back, or side ofterminal 800. When a physical button or a vendor Logo is provided on the terminal 800, the fingerprint sensor 814 may be integrated with the physical button or the vendor Logo.
The optical sensor 815 is used to collect the ambient light intensity. In one embodiment, theprocessor 801 may control the display brightness of thetouch screen 805 based on the ambient light intensity collected by the optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of thetouch display screen 805 is increased; when the ambient light intensity is low, the display brightness of thetouch display 805 is turned down. In another embodiment, theprocessor 801 may also dynamically adjust the shooting parameters of thecamera assembly 806 based on the ambient light intensity collected by the optical sensor 815.
A proximity sensor 816, also known as a distance sensor, is typically provided on the front panel of the terminal 800. The proximity sensor 816 is used to collect the distance between the user and the front surface of the terminal 800. In one embodiment, when the proximity sensor 816 detects that the distance between the user and the front surface of the terminal 800 gradually decreases, theprocessor 801 controls thetouch display 805 to switch from the bright screen state to the dark screen state; when the proximity sensor 816 detects that the distance between the user and the front surface of the terminal 800 becomes gradually larger, theprocessor 801 controls thetouch display 805 to switch from the screen-on state to the screen-on state.
Those skilled in the art will appreciate that the configuration shown in fig. 8 is not intended to be limiting ofterminal 800 and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components may be used.
An embodiment of the present application further provides a non-transitory computer-readable storage medium, and when instructions in the storage medium are executed by a processor of a mobile terminal, the mobile terminal is enabled to execute the application login method provided in the embodiment shown in fig. 2.
Embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the application login method provided in the embodiment shown in fig. 2.
Fig. 9 is a schematic structural diagram of anapplication server 900 according to an embodiment of the present disclosure, where theapplication server 900 may generate a relatively large difference due to a difference in configuration or performance, and may include one or more processors (CPUs) 901 and one ormore memories 902, where thememory 902 stores at least one instruction, and the at least one instruction is loaded and executed by theprocessors 901 to implement the application login method provided by the foregoing method embodiments.
Certainly, theapplication server 900 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and theapplication server 900 may also include other components for implementing device functions, which are not described herein again.
Embodiments of the present application further provide a computer-readable storage medium, where instructions are stored on the computer-readable storage medium, and when the instructions in the storage medium are executed by a processor of a computer device, the instructions enable a computer to execute the application login method provided in the above-described illustrated embodiment.
Embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer device to execute the application login method provided by the above-described illustrated embodiments.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.