Detailed Description
In order to better understand the technical solutions provided by the embodiments of the present application, the following detailed description is made with reference to the drawings and specific embodiments.
To facilitate better understanding of the technical solutions of the present application for those skilled in the art, the following terms related to the present application are introduced.
Short-range communication link: refers to a link established based on a short-range Communication protocol, such as a bluetooth Communication link, a Wireless Fidelity (wifi) Communication link, or a Near Field Communication (NFC) Communication link, etc.
A third party platform: also referred to as third party open platforms. In the software industry and network, a software system is referred to as a software system, which can make an external program increase the functions of the software system or use the resources of the software system by disclosing an Application Programming Interface (API) or a function (function) of the software system without changing the source code of the software system. In the internet era, services of websites are packaged into a series of computer-recognizable data interfaces which are opened for developers to use, the behavior is called Open API, and a platform for providing the Open API is called an Open platform. The third-party platform is mainly used for providing a corresponding authorization mechanism for logging in other applications.
The characteristic value of the equipment: the device characteristic value is used to represent a relevant parameter of the device, and the device characteristic value in this embodiment may include a unique application identifier corresponding to an application installed in the device. The device characteristic value may also include a device unique identification of the device. The device unique identifier may be, for example, a device model number of the device, or a production line and channel representation of the device. The production line comprises a production merchant of intelligent equipment, and the channel refers to a channel through which the equipment passes from the production field to the consumption field.
User identification (Vuid): the method refers to unique user identification distributed to each account number by a background. When the information corresponding to the account is stored in the background, the user identifier may be used as an index for storage, and correspondingly, when the information of a certain account is searched, the user identifier may also be used for searching.
Authorized user unique identification (openID): the unique user identity is distributed to the authorized user corresponding to the website or the application by the third-party platform, and the website or the application can store the unique identity of the authorized user, so that the identity of the user can be conveniently identified when the user logs in next time.
Formal authorization credentials (access _ token): also known as interface invocation credentials, or as user tickets. The client is obtained from the third party platform and can access the third party platform through the formal authorization credential.
The following takes the example of a user logging in a video application on a mobile phone and a smart television as an example to illustrate the related technologies:
in the related technology, a user logs in an account on a video application of a mobile phone, opens the video application on a smart television, and scans a two-dimensional code presented on the video application in the smart television by using the logged-in video application on the mobile phone. After the mobile phone scans the two-dimension code, the user clicks to confirm authorized login, the video application of the mobile phone sends an authentication message to the background, and the background authentication is successful. And the background control logs in the account on the video application of the intelligent television.
However, in this login manner, when the user does not use the application program of the smart television, the user needs to manually log out the logged-in account on the video application of the smart television, otherwise the video application of the smart television keeps the account online. In actual life, a user may log in an account in an intelligent device in a public place, and once the user does not log out of the account in time, the account may be leaked. For example, when a user stays in a hotel, the user wants to watch a television through a smart television of the hotel, and after the user logs in an account on a video application of the smart television, if the user does not log out of the logged-in account, the problem of account information leakage may be caused.
In view of this, an embodiment of the present application provides an account login control method, and the following introduces the design idea related to the embodiment of the present application:
in the embodiment of the application, by means of the respective short-distance communication functions of the two terminals, a short-distance communication link can be established between the first terminal and the second terminal. After the two establish the short-range communication link, the user can log in the target account at the second terminal. After the second terminal successfully logs in the target account, the login information is sent to the first terminal through the short-distance communication link, and the first terminal logs in the target account on the corresponding application program based on the login information. After the first terminal logs in the target account, the first terminal monitors the heartbeat of the terminal. And automatically logging out the logged-in target account once the disconnection of the short-distance communication link with the second terminal is detected.
In the embodiment of the application, the first terminal can acquire the login information from the second terminal through the short-distance communication link to realize automatic login. After logging in, the first terminal can timely log out the logged target account after determining that the short-distance communication link with the second terminal is disconnected, so as to guarantee the security of the account. Moreover, the second terminal and the first terminal usually have a short-distance communication function, so that the second terminal and the first terminal do not need to be changed in hardware in the embodiment of the application, and the implementation cost of the scheme is reduced.
Based on the design concept, an application scenario of the account login control method according to the embodiment of the present application is introduced below.
A first possible application scenario:
referring to fig. 1A, a diagram is a first example of an application scenario of an account login control method according to an embodiment of the present application. The application scenario diagram includes afirst terminal 110, afirst application 111 running in thefirst terminal 110, asecond terminal 120, asecond application 121 running in thesecond terminal 120, afirst server 130, and athird party platform 140.
Thefirst application 111 and thesecond application 121 may be the same application, which may be any type of application, such as a video application, an instant messaging application, a short video application, a social application, a gaming application, and so on. Thefirst server 130 is a backend server corresponding to thefirst application 111, and since thefirst application 111 and thesecond application 121 are both for the same application, thefirst server 130 is a backend server corresponding to thefirst application 111 and thesecond application 121, that is, thefirst server 130 may be configured to support corresponding functions of thefirst application 111 and thesecond application 121.
Thefirst application 111 and thesecond application 121 may also be different applications, but have the same functionality, for example, both thefirst application 111 and thesecond application 121 may run a video application, or both may run an instant messaging application, a short video application, a social application, a game application, and the like. When thefirst application 111 and thesecond application 121 are different applications, the corresponding backend servers may still be the same server, or may be different servers.
In fig. 1A, thethird party platform 140 is represented by a background server corresponding to other applications. The other applications refer to applications other than the first application, and for convenience of description, the other applications installed in thesecond terminal 120 corresponding to thethird party platform 140 may be referred to as third party applications.
When thefirst application 111 and thesecond application 121 log into the account, the first application may be logged into by means of the account of thethird party platform 140. However, beforethird party platform 140 provides services forfirst application 111,first application 111 needs to be registered withthird party platform 140 first, and the following is an example of howfirst application 111 registers with third party platform 140:
for example, after the first application program is developed, thefirst application program 111 may be requested to register with thethird party platform 140, thethird party platform 140 may allocate a unique application identifier to thefirst application program 111 and generate an application interface key for thefirst application program 111, thefirst server 130 prestores the unique application identifier (appID) and the application interface key (appsert) corresponding to thefirst application program 111, and when thefirst application program 111 and thesecond application program 121 need to log in an account, an authorization credential may be requested from the third party platform according to the unique application identifier and the application interface key, so as to log in thefirst application program 111 using the account on the third party platform.
In a first specific application scenario of a first possible application scenario: referring to fig. 1A, thesecond application 121 is a sub-application provided in the third-party application 122 corresponding to the third-party platform 140, for example, thesecond application 121 is an applet embedded in the third-party application 122.
After thefirst application 111 and thesecond application 121 establish the short-range communication link, thefirst application 111 may request authorization credentials from thethird party platform 140 through thesecond application 121 to enable logging in the target account on thefirst application 111. Since thesecond application program 121 is embedded in the thirdparty application program 122, thesecond application program 121 can directly obtain the target account corresponding to the thirdparty application program 122, so as to request the authorization credential from thethird party platform 140 according to the related information of thefirst application program 111.
In a second specific application scenario in the first possible application scenario: referring to fig. 1A, thesecond application 121 is a program pre-installed in thesecond terminal 120 or a web page version program.
In this case, when thefirst application 111 may request the authorization credential from thethird party platform 140 through thesecond application 121, thesecond application 121 cannot directly obtain the target account corresponding to thethird party platform 140, and therefore, it is necessary to obtain the relevant information of the target account through the relevant operation of the user, and further request the authorization credential from thethird party platform 140 according to the relevant information of the target account and the relevant information of thefirst application 111.
In a second possible application scenario:
referring to fig. 1B, a second example of an application scenario of the account login control method in the embodiment of the present application is shown, where the application scenario includes afirst terminal 110, asecond terminal 120, afirst application 111 running in thefirst terminal 110, asecond application 121 running in thesecond terminal 120, and afirst server 130.
Unlike the first possible application scenario, in the second possible application scenario, the user may directly register the target account with thefirst server 130, in which case thesecond terminal 120 does not need to obtain login information via thethird party platform 140. Therefore, after the second terminal 120 logs in the target account on thesecond application 121, the login information required for thefirst application 111 to log in the target account is directly obtained from thefirst server 130, and the login information is sent to thefirst application 111 through the short-distance communication link, so that thefirst application 111 can request thefirst server 130 for logging in the target account according to the login information sent by thesecond application 121, so as to realize the login of the target account.
It should be noted that, unless otherwise specified, the application program may be an application program pre-installed in the device, or an application program embedded in a third party application, or a web page version application, and the application is not limited to a specific type of application program. The terminal can be a smart phone, a tablet computer, a notebook computer, a desktop computer, an intelligent wearable device, an intelligent watch, an intelligent television, an intelligent projector, an intelligent television box, an intelligent desk lamp, an intelligent air conditioner or a vehicle-mounted device and the like. Thefirst terminal 110 and thesecond terminal 120 are two terminals. Thefirst server 130 and the third-party platform 140 may be independent physical servers, may also be a server cluster or a distributed system formed by a plurality of physical servers, and may also be cloud servers providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, Network services, cloud communication, middleware services, domain name services, security services, Content Delivery Networks (CDNs), big data and artificial intelligence platforms, and the like.
To illustrate the functions of the corresponding devices in fig. 1A-1B, the functions of the respective devices will be described below with reference to the architecture diagram of the login control system shown in fig. 1C:
1. an application layer: the device comprises a client, a server and a server, and is used for providing an interface for interacting with a user, supporting login authentication between the client and other clients on other devices and the like, and initiating a request to the next layer according to corresponding operation of the user.
Thefirst application 111 running in thefirst terminal 110 and thesecond application 121 running in thesecond terminal 120 are located at an application layer. Thefirst application 111 has integrated therein a user login authentication module with a short-range communication link. Thesecond application 121 has a user login authentication management module integrated therein, which supports short-range communication. The user login authentication module is used for completing login authentication with other clients based on short-distance communication so as to realize login of corresponding accounts on the clients borne by the user login authentication module.
For example, when the user needs to log in the target account, a connection request is initiated through thesecond application 121 of thesecond terminal 120, so as to establish a short-range communication connection with thefirst application 111 of thefirst terminal 110, and further, a login authentication interaction is completed based on the short-range communication, so that the target account is logged in thefirst application 111.
2. Access layer 131: for receiving various types of requests initiated by the application layer.
When thefirst application 111 or thesecond application 121 interacts with thefirst server 130, the corresponding request may be sent to theaccess layer 131, and theaccess layer 131 receives various types of requests sent by the application layer and requests the corresponding modules in thefirst server 130 to perform processing. For example, theaccess layer 131 may receive a login authentication request, a user ticket refreshing request, a user personal information query request, or a user video playing request sent by the application layer.
3. A logic layer: for implementing the function of thefirst server 130 to handle various types of requests.
The logical layer includes alogin logic 132, aticket refresh module 133, and other logic 134. In particular implementations, each module may be implemented by a service infirst server 130, or may be implemented by a process offirst server 130.
Thelogin logic module 132 is configured to provide a login service, a login renewal service, a logout service, and the like to the outside. The login service generates or obtains, for example, a user identification and a formal authorization credential (accesstocken) of the user. The login renewal service obtains valid formal authorization credentials and session information (vussession) during the credential refresh period, e.g., through a refresh interface (refreshhooken). Logout services, for example, clear the user's login information, set the user ticket to invalid, etc. The refresh logic system, for example, generates and verifies user tickets and refreshes before the user tickets expire.
A storage layer: for being responsible for storing the traffic data.
The storage tiers include an accountnumber storage module 135, aticket storage module 136, and a userinformation storage module 137. Theaccount storage module 135 is configured to store and maintain account information of the user, where the account information includes a corresponding relationship between various information such as an authorized unique user identifier (openid) corresponding to the user identifier and a mobile phone number. Theticket storage module 136 is configured to store ticket information of the user, where the ticket information includes information such as a generation time of the formal authorization ticket and a status of the formal authorization ticket. The userinformation storage module 137 is used for storing service user personal information. The user personal information includes information such as a user nickname and a user avatar.
The following describes a general idea of an account login control method according to an embodiment of the present application with reference to a flowchart of the account login control method shown in fig. 2.
The first terminal and the second terminal can be various intelligent devices, such as a smart phone, a tablet computer, a notebook computer, a desktop computer, an intelligent wearable device, an intelligent watch, an intelligent television, an intelligent projector, an intelligent television box, an intelligent desk lamp, an intelligent air conditioner or a vehicle-mounted device. In the following embodiment of the present application shown in fig. 2, thefirst terminal 110 is a smart tv, and thesecond terminal 120 is a mobile phone.
The following describes an example of the account login control method in fig. 2:
s201, thefirst terminal 110 establishes a short-range communication link with thesecond terminal 120 through thefirst application 111.
In the embodiment of the present application, when the distance between thefirst terminal 110 and thesecond terminal 120 is small, thefirst application 111 and thesecond terminal 120 may establish a short-range communication link, so as to facilitate subsequent interaction based on the short-range communication link.
For example, taking thefirst terminal 110 as an intelligent television and the second terminal as a mobile phone as an example, a user starts a bluetooth module in a video application or a game application of the intelligent television, the intelligent television responds to a start operation of the user, starts the bluetooth module in the video application of the intelligent television, sends broadcast information, such as a broadcast bluetooth signal, the user starts a bluetooth function on the mobile phone in a hotel, and the mobile phone can search the intelligent television, so as to establish a bluetooth connection with the intelligent television.
S202, thefirst terminal 110 receives the login request sent by thesecond terminal 120 through thefirst application 111 based on the short-range communication link.
Thesecond terminal 120, after establishing the short-range communication link with thefirst terminal 110, may transmit a login request to thefirst terminal 110, the login request being for notifying thefirst application 111 in thefirst terminal 110 of the readiness to login to the target account, so that thefirst application 111 enters an account login readiness state.
S203, thefirst terminal 110 displays the login state of thefirst application 111 as the target account number logged in thefirst application 111 in response to the confirmation operation for the login request.
Thefirst terminal 110 may acquire the login information from thesecond terminal 120 in response to a confirmation operation performed by the user on thefirst terminal 110 or in response to a confirmation operation performed by the user on thesecond terminal 120.
The login information is information required for logging in the target account on thefirst application 111, thesecond terminal 120 may obtain the login information from thethird party platform 140, or thesecond terminal 120 may obtain the login information from thefirst server 130, or thesecond terminal 120 may obtain the cached login information. After the first terminal establishes the short-range communication link with thesecond terminal 120 through thefirst application 111, thesecond application 121 may send the login information to thefirst application 111 through the short-range communication link, and thefirst application 111 may receive the login information.
After obtaining the login information, thefirst application program 111 may log in the target account according to the login information, for example, the login information includes related information of the target account, and after obtaining the login information, thefirst application program 111 directly displays the corresponding information, in this way, if thefirst application program 111 needs to access the network resource, thesecond terminal 120 may obtain the corresponding network resource.
Alternatively, thefirst application 111 interacts with thefirst server 130 after obtaining the login information to log in the target account.
S204, when the short-distance communication link is disconnected, thefirst terminal 110 displays the login status of the application as that the target account exits from the login application.
Thefirst application 111 may monitor heartbeat information of thesecond terminal 120 after logging in the target account, and automatically quit the logged-in target account upon detecting that the short-range communication link between the two is disconnected. For example, thefirst application 111 may request thefirst server 130 to logout of the login target account, or, for example, thefirst application 111 directly deletes the obtained login information.
In this embodiment of the application, after thefirst application 111 establishes the short-range communication link with thesecond terminal 120, thefirst application 111 may use thesecond terminal 120 as an access node, directly obtain login information from thesecond terminal 120, implement login, and automatically log out after detecting that the short-range communication with thesecond terminal 120 is disconnected, thereby ensuring account security. Namely, after the short-distance communication connection is disconnected, the user does not need to manually log out, so that the user can be prevented from forgetting to log out and divulging a secret.
A process of thesecond terminal 120 executing the account login control method according to the embodiment of the present application is described below with reference to a flowchart of the account login control method shown in fig. 3.
S301, when monitoring that thefirst terminal 110 calls the broadcast information sent by the communication module in thefirst terminal 110 through the application program, thesecond terminal 120 sends a connection request to thefirst terminal 110, and establishes a short-range communication link with thefirst terminal 110.
For the specific content of establishing the short-range communication link, reference may be made to the content discussed above, and details thereof are not repeated here.
S302, thesecond terminal 120 obtains login information.
The login information is used to log in the target account on the first client, and the specific content of the login information may refer to the content discussed above, which is not described herein again. The manner in which thesecond terminal 120 obtains the login information can refer to the content discussed above, and is not described herein again.
S303, thesecond terminal 120 sends the login information to thefirst terminal 110 based on the short-range communication link.
Thesecond terminal 120 transmits the login information to the first client so that the first client can log in the target account on the first client according to the login information and log out the target account logged in on thefirst application 111 of thefirst terminal 110 when the short-range communication link is disconnected. The content of the login target account and the logout target account can refer to the content discussed above, and is not described herein again.
Besides, thesecond terminal 120 can also implement the corresponding steps discussed above, which are not described herein again.
In order to more clearly illustrate the account login control method according to the embodiment of the present application, the account login control method according to the embodiment of the present application is introduced based on the application scenarios discussed in fig. 1A and 1C below:
referring to fig. 4, which is an exemplary diagram of interaction among the devices in fig. 1A, where the devices interact with each other to implement the login control method in the embodiment of the present application, the interaction process specifically includes:
it should be noted that, in the embodiment of the present application shown in fig. 4 described below, thefirst terminal 110 is a smart television, and thesecond terminal 120 is a mobile phone.
The interaction diagram in fig. 4 is explained in detail below:
s401, thefirst terminal 110 calls the communication module in thefirst terminal 110 through thefirst application 111, and sends the broadcast message.
Thefirst application 111 may be integrated with a communication module having a short-range communication function, and after thefirst application 111 is started, the communication module may be called to automatically start the short-range communication function, and start to send a broadcast message to the outside within a preset range. The broadcast message carries a device identifier, such as a device name, of thefirst terminal 110. The preset range within which thefirst application 111 transmits the broadcast message is related to a communication range supported by the short-range communication function, and the present application is not particularly limited. Taking the short-range communication as the bluetooth communication for example, thefirst application 111 starts the bluetooth function, and can start to transmit the broadcast signal through the bluetooth within a range of 15 meters centered on thefirst application 111.
Alternatively, thefirst application 111 calls a communication module provided in thefirst terminal 110 to transmit the broadcast message.
For example, thefirst application 111 may be started in response to a first start operation of thefirst application 111 performed by the user, and pull up the communication module in thefirst terminal 110 after the start, and start the short-range communication function. Alternatively, thefirst application 111 may be preset with a switch key for controlling the communication module, and after the user clicks the switch key, thefirst application 111 responds to a start operation of the user for the switch key to start the short-range communication function.
For example, referring to fig. 5 (1) as an interface displayed after the smart device is started, in fig. 5, taking a first terminal as a smart television and a second terminal as a mobile phone as an example, after the smart television shown in fig. 5 (1) is installed with an application a and an application B, and a user clicks an application icon 301 shown in the application a, the application a is anapplication identifier 501 of thefirst application 111, which is equivalent to that the user performs a first start operation of thefirst application 111, and thefirst application 111 responds to the first start operation, and the smart television displays the interface of thefirst application 111 shown in fig. 5 (2), and starts to send a broadcast signal to the outside.
S402, the second terminal 120 starts device search.
In a first specific application scenario among a first possible application scenario: thesecond terminal 120 responds to the user's opening operation in the third-party application for thesecond application program 121, and thesecond application program 121 is started.
In a second specific application scenario in the first possible application scenario: thesecond application program 121 is started in response to a user's clicking operation on an application icon of thesecond application program 121.
Thesecond application 121 may be integrated with a function supporting short-range communication, which thesecond application 121 starts. Alternatively, thesecond terminal 120 generally supports a short-range communication function, and thus the short-range communication function in thesecond terminal 120 can be pulled up when thesecond application 121 needs to use the short-range communication function. Alternatively, thesecond terminal 120 is generally short-range communication capable, and thus thesecond terminal 120 directly enables the short-range communication function.
For example, thesecond application 121 may automatically start the short-range communication function after thesecond application 121 starts, or thesecond application 121 starts the short-range communication function in response to an operation of authorized use of the short-range communication function by the user, for example, after thesecond application 121 is turned on, a short-range communication function authorization interface is displayed, and thesecond application 121 starts the short-range communication function in response to an operation of authorized use of the short-range communication function authorization interface by the user.
Alternatively, thesecond application 121 enables the short-range communication function by default. After thesecond application 121 enables the short-range communication function, thesecond application 121 may search for devices within a preset range using the short-range communication function. The preset range can refer to the content discussed above, and is not described herein.
For example, referring to fig. 6A, after thesecond application 121 is started, thesecond application 121 displays a bluetooth function starting authorization interface as shown in fig. 6A, where the bluetooth function starting authorization interface includes bluetooth function prompting information for prompting a user whether to start a bluetooth function, and aconfirmation key 601 and a cancel key 602 for instructing to start the bluetooth function. When the user clicks theconfirmation button 601, which corresponds to an authorized use operation, thesecond application 121 enables the bluetooth function in response to the authorized use operation. Alternatively, when the user clicks the cancelbutton 602, which corresponds to a cancel of the authorized use operation, thesecond application 121 does not enable the bluetooth function in response to the cancel of the authorized use operation.
S403, thesecond terminal 120 initiates a connection request.
As discussed in S401 above, thefirst application 111 transmits the broadcast message to the outside, and the short-range communication may support communication within a preset range, and all devices within the preset range of thefirst application 111 may receive the broadcast message transmitted by them. Therefore, after thesecond application 121 starts the short-range communication function, and when thesecond application 121 is located within the preset range of thefirst application 111, thesecond application 121 may receive the broadcast message of thefirst application 111, and parse the device identifier of thefirst terminal 110 according to the broadcast message.
Further, thesecond application 121 may initiate a connection request to thefirst application 111 in response to the connection operation, or thesecond application 121 may automatically initiate a connection request to thefirst application 111 when searching for thefirst terminal 110. The connection request is used to request connection of the smart device. The connection request may carry a device identifier of the terminal device.
For example, after thesecond application 121 searches thefirst application 111, thesecond application 121 may display a connection request confirmation interface for requesting whether to connect the device identified by the device, where the connection request confirmation interface includes a connection prompt message, a confirm connection button, and a cancel connection button. The connection prompting message is used to prompt the user whether to connect thefirst application 111. After the user clicks the confirmation connection key, thesecond application 121 responds to the click operation to initiate a connection request to thefirst application 111. After the user clicks the cancel connection button, thesecond application 121 may cancel the connection request to thefirst application 111 in response to the click operation.
When thesecond application 121 searches for a plurality of smart devices at the same time, the connection request confirmation interface may further include a search device list including a device identification of each smart device searched by thesecond application 121. Thesecond application 121 initiates a connection request to the smart device selected by the user in response to a connection operation performed by the user with respect to any smart device in the search device list.
For example, continuing with the example in fig. 5, please refer to fig. 6B, which is an exemplary diagram of a connection request confirmation interface displayed for thesecond application program 121 in the mobile phone, where the exemplary diagram includes a connection prompt message, and the mobile phone specifically indicates "whether to connect to TV-1" shown in fig. 6B, the interface diagram further includes aconnection confirmation key 603 and a connection cancellation key 604, and after the user clicks theconnection confirmation key 603 in the mobile phone, thesecond application program 121 responds to the click operation to initiate a connection request to the smart television corresponding to TV-1.
S404, thefirst terminal 110 returns the device feature value to thesecond terminal 120.
After receiving the connection request sent by thesecond application 121, thefirst application 111 may send the device characteristic value of thefirst terminal 110 to thesecond application 121. The content of the device characteristic value can refer to the content discussed in the foregoing, and is not described in detail here. After thefirst application 111 feeds back the device characteristic value to thesecond application 121, a short-range communication link formally established between thefirst application 111 and thesecond application 121. In an embodiment of the present application, thefirst application 111 returns the device characteristic value to thesecond application 121, so that thesecond application 121 can subsequently request the authorization credential from thethird party platform 130 based on the device characteristic value.
The steps S401 to S404 are optional, and for example, when the target account is to be registered on thefirst application 111 and a short-range communication link is established between thefirst application 111 and thesecond application 121, the steps S401 to S404 do not need to be executed.
S405, thesecond terminal 120 initiates a login request to thefirst terminal 110.
Thesecond application 121 may transmit a login request for notifying thefirst application 111 of the preparation for login to the target account based on the short-range communication link to cause thefirst application 111 to enter an account login preparation state to thefirst application 111.
S406, thefirst terminal 110 listens for the login synchronization message.
After thefirst terminal 110 receives the login request through thefirst application 111, it determines that thesecond application 121 is ready to login to the target account, and at this time, thefirst application 111 enters a ready state and starts to monitor the login message on the short-distance communication link to prepare for receiving the login information at any time.
It should be noted that S405 to S406 are optional steps, and in the embodiment shown in S405 to S406, thesecond terminal 120 timely notifies thefirst application 111 to enter the account login preparation state, so that thefirst application 111 can monitor login information in real time, and avoid missing login information subsequently sent by thesecond terminal 120.
S407, thesecond terminal 120 requests login authorization from thethird party platform 140.
Since thefirst application 111 has been previously registered in thethird party platform 140, thesecond terminal 120 can log in through the target account number on thethird party platform 140 through thesecond application 121, and therefore thesecond terminal 120 can request thethird party platform 140 to log in the first application through the target account number in the third party platform through thesecond application 121. For example, thesecond terminal 120 may request login authorization from the third party platform through a login interface corresponding to the third party platform through thesecond application 121. The request login authorization is specifically used for requesting to login the first application by using a target account of the third-party platform.
Specifically, thesecond terminal 120 may respond to the login operation through thesecond application 121, and display a login interface, where the login interface includes a third-party platform identifier corresponding to the third-party platform 140, and the third-party platform identifier is, for example, one or a combination of two of an application icon and an application name corresponding to the third-party platform.
S408, thethird party platform 140 requests user confirmation from thesecond application 121.
Thesecond terminal 120 may display an authorized login interface in response to a confirmation operation for the login request performed for the third party platform identifier on the login interface through thesecond application 121.
In the first possible sub-scenario corresponding to the foregoing, thesecond terminal 120 may directly obtain the target account corresponding to the third-party platform through thesecond application 121, and thus the authorization login interface may specifically include authorization login prompt information, an authorization login confirmation key, an authorization login cancellation key, and the like. Thesecond terminal 120 may request login authorization from thethird party platform 140 in response to a click operation on the confirm authorization login button through thesecond application 121.
In a second possible sub-scenario corresponding to the foregoing, thesecond terminal 120 may not obtain the target account corresponding to the third-party platform through thesecond application 121, so that the authorization login interface includes an input key of account information, and the like, and thesecond terminal 120 may respond to an input operation performed on the input key through thesecond application 121, which is equivalent to performing a confirmation operation for the login request, and request login authorization from the third-party platform 140.
For example, continuing with the example shown in fig. 6B, referring to fig. 7, in an example of an interface process in which the mobile phone requests login authorization from the third-party platform, when the user is not logged in, the mobile phone may display an interface as shown in (1) in fig. 7 through thesecond application program 121, and after the user clicks the private page key 701, the mobile phone may display a login interface as shown in (2) in fig. 7 through thesecond application program 121, where the login interface displays a third-party platform identifier 702, specifically, "second application login" and "third application login" as shown in (2) in fig. 7.
In the first possible first specific application scenario, when the mobile phone may be embedded in the third-party application through thesecond application program 121, after the user clicks the third application to log in, the third-party application may pull the account information of the third application, so as to display the authorized login interface shown in (3) in fig. 7, and after the user clicks the authorizedlogin confirmation button 703 shown in (3) in fig. 7, the user performs a confirmation operation.
In the second possible second specific application scenario, after the user clicks the third-party platform identifier 702, the mobile phone may display an authorized login interface as shown in (4) in fig. 7 through thesecond application program 121, and when the user scans the two-dimensional code 704 shown in (4) in fig. 7, it is equivalent to inputting account information, that is, performing a confirmation operation.
S409, thesecond terminal 120 may send the user confirmation to thethird party platform 140 through thesecond application 121.
Thesecond terminal 120 may respond to the login authorization confirmation operation through thesecond application program 121, and confirm that the user is authorized to login the first application using the target account of thethird party platform 140, and thesecond terminal 120 may send, through thesecond application program 121, a user confirmation to thethird party platform 140, where the user confirmation is used to indicate that the user determines to login the first application through the target account of thethird party platform 140, and the user confirmation may carry account information of the target account of thethird party platform 140, where the account information includes an account and a corresponding login password. Thesecond terminal 120 may jump to the interface corresponding to the first application after sending the user confirmation through thesecond application 121.
S410, thethird party platform 140 returns the temporary authorization credential to thesecond terminal 120.
After thethird party platform 140 receives the user confirmation, the account information sent by thesecond terminal 120 may be verified, and after the verification is successful, a temporary authorization credential may be returned to thesecond terminal 120.
S411, thesecond terminal 120 feeds back the unique application identifier and the temporary authorization credential to thelogin logic module 132 to request the login service.
S412, thelogin logic module 132 requests the login information verification from thethird party platform 140 with the unique application identifier, the temporary authorization credential, and the application interface key.
Thelogin logic module 132 may search for the application interface key corresponding to the unique application identifier according to the unique application identifier to obtain the application interface key. Thelogin logic 132 in turn requests thethird party platform 140 via the application interface key, the unique application identification, and the temporary authorization credential.
S413, thethird party platform 140 returns the unique identifier of the authorized user, the formal authorization credential and the credential refresh period to thelogin logic module 132.
The formal authorization certificate has a certificate validity period, and the certificate refresh period corresponds to a certificate refresh interface, and the time length of the certificate refresh period is generally longer than the time length of the certificate validity period. For example, the validity period of a formal authorization credential is two hours and the credential refresh period is one month.
For one embodiment, thethird party platform 140 may return the authorized user unique identification and the formal authorization credentials to thelogin logic module 132.
S414, thelogin logic module 132 queries theaccount storage system 135 for the user according to the unique identifier of the authorized user.
Thelogin logic 132 may request theaccount storage 135 to feed back the user id according to the unique id of the authorized user, and if the user logs in thefirst application 111 for the first time, theaccount storage 135 may assign a new user id to the user. If the user does not log in thefirst application 111 for the first time, theaccount storage module 135 may search the pre-stored information for a user identifier corresponding to the unique identifier of the authorized user.
S415, theaccount storage module 135 returns the user identifier to thelogin logic module 132.
S416, thelogin logic module 132 replaces the ticketrefreshing module 133 with the video ticket according to the user identifier.
S417, the ticketrefreshing module 133 returns the session information and the session validity period to thelogin logic module 132.
After the ticketrefreshing module 133 receives the user identifier fed back by thelogin logic module 132, the ticketrefreshing module 133 may return the session information and the session validity period corresponding to the user identifier to thelogin logic module 132.
S418, thelogin logic module 132 requests the userinformation storage module 137 for the personal information of the user according to the user identifier, the unique identifier of the authorized user and the formal authorization certificate.
The userinformation storage module 137 may query historical usage information of the user on thefirst application 111, such as videos that the user has previously viewed, for example, by taking the first application as a video application, according to the user identification.
S419, thethird party platform 140 requests the personal information of the user from thethird party platform 140 according to the unique identification of the authorized user and the formal authorization certificate.
Thethird party platform 140 may request personal information of the user, which refers to personal information related to the target account, such as a nickname and an avatar of the target account, from thethird party platform 140 according to the unique identifier of the authorized user and the formal authorization credential.
S420, thethird party platform 140 returns the user personal information to the userinformation storage module 137.
After receiving the unique identifier of the authorized user and the formal authorization certificate, the third-party platform 140 may authenticate the user identity according to the unique identifier of the authorized user and the formal authorization certificate, and if the authentication is passed, return the personal information of the user to the userinformation storage module 137.
The userinformation storage module 137 receives the user personal information returned by thethird party platform 140, and may store the user personal information in association with the user identifier.
S421, the userinformation storage module 137 returns the user personal information to thelogin logic module 132.
S422, thelogin logic module 132 returns the login information to thesecond terminal 120.
Thelogin logic 132, after obtaining the personal information of the user, the historical usage information, the unique identifier of the authorized user, the formal authorization credential, the credential refresh interface, the session information, etc., combines these information to obtain login information, and returns the login information to thesecond terminal 120.
S423, thesecond terminal 120 sends login information to thefirst terminal 110.
After thesecond terminal 120 receives the login information, the login information is transmitted to thefirst terminal 110 based on the short-range communication link.
S424, thefirst application 111 sends an account login request to thelogin logic module 132.
Thefirst application 111 sends an account login request to thelogin logic 132, where the account login request may carry a formal authorization credential.
S425, thelogin logic module 132 sends a response that the account login is successful to thefirst application 111.
Thelogin logic module 132 verifies the identity of thefirst application 111 according to the account login request, and after the verification is successful, sends a response that the account login is successful to thefirst application 111, so as to login the target account on thefirst application 111, that is, the login status of thefirst application 111 is displayed as the target account login to thefirst application 111.
Further, after thefirst application 111 logs in the target account, the personal information and the historical usage information of the user in the login information may be displayed on the corresponding interface according to the login information. For example, thefirst application 111 presents the user personal information, the historical usage information, and the like on the personal information interface.
As an embodiment, after logging in the target account, thesecond application 121 may also display the personal information and the historical usage information of the user in the login information on a corresponding interface.
Continuing with the example of fig. 7, please refer to (1) in fig. 8, which is the personal information and the historical usage information of the user displayed by thesecond application 121 after logging in the target account. In fig. 8, (2) shows that, after thefirst application 111 logs in to the target account, the login status of the target account is logged in, and user personal information and historical usage information of the target account are also displayed, where the user personal information includes, for example, a user nickname and a user avatar of the target account shown in (2) in fig. 8, and the historical usage information includes, for example, movies C and D in the viewing history shown in (2) in fig. 8.
S426, thefirst terminal 110 synchronizes the login state to thesecond terminal 120.
After the first terminal 110 logs in the target account, the login status of the target account is fed back to thesecond terminal 120 to indicate that thesecond terminal 120 has logged in the target account.
S427, thefirst terminal 110 listens to the heartbeat of thesecond terminal 120.
S428, thesecond terminal 120 sends heartbeat information to thefirst terminal 110.
Thesecond terminal 120 may transmit the heartbeat probe packet to thefirst terminal 110 over the short-range communication link periodically or aperiodically. If the short-range communication link between thefirst terminal 110 and thesecond terminal 120 is normal, thefirst terminal 110 can timely receive the heartbeat information fed back by thesecond terminal 120, and thefirst terminal 110 can return a heartbeat feedback packet to thesecond terminal 120 to indicate that the short-range communication link between thefirst terminal 110 and thesecond terminal 120 is normal.
S429, thesecond terminal 120 sends the updated formal authorization ticket and the session information to thefirst terminal 110.
If the validity period of the formal authorization certificate is too long, once the formal authorization certificate is revealed, the security of the account is affected, so that in the embodiment of the present application, the validity period of the formal authorization certificate is less than the credential refreshing period, and after the validity period of the credential expires, thesecond terminal 120 may send the updated formal authorization certificate to thefirst terminal 110 through the credential refreshing interface in time, so as to keep thefirst application 111 of thefirst terminal 110 to keep the target account login online.
Specifically, when the short-distance communication link between thesecond terminal 120 and thefirst terminal 110 is normal, thesecond terminal 120 may update the formal authorization credential according to the credential refresh interface, and similarly, thesecond terminal 120 may also selectively update the session information, and send the updated formal authorization credential and the updated session information to thefirst terminal 110.
S430, the first terminal 110 requests thelogin logic module 132 to keep the account login.
Thefirst terminal 110 may send an account holding request to thelogin logic module 132 through thefirst application 111 according to the updated formal authorization credential.
S431, thelogin logic module 132 sends an account holding response to thefirst terminal 110.
When the updated formal authorization credential is validated, thelogin logic module 132 validates the identity of thefirst terminal 110, so as to maintain the login state of the target account on thefirst application 111, that is, the login state of thefirst application 111 still shows that the target account logs in thefirst application 111.
S429 to S431 are optional portions. In the embodiments shown in S429 to S431, thesecond terminal 120 does not directly send the formal authorization credential valid for a long time to thefirst terminal 110, but after a certain time interval, synchronizes the refreshed formal authorization credential with thefirst terminal 110, so that on one hand, thefirst terminal 110 can keep account login during the credential refreshing period, and on the other hand, the security problem caused by the long validity period of the formal authorization credential can be avoided.
S432, when thefirst terminal 110 detects that the short-range communication link is disconnected, an account exit request is generated.
When thefirst terminal 110 does not monitor the heartbeat information of thesecond terminal 120 even after exceeding a preset time period, or when the number of times that thefirst terminal 110 fails to monitor the heartbeat signal exceeds a preset threshold, thefirst terminal 110 determines that the short-distance communication link with thesecond terminal 120 is disconnected, so that thefirst terminal 110 may generate an account exit request, where the account exit request is used to request to exit a currently logged-in target account.
S434, thefirst terminal 110 sends an account logout request to thelogin logic module 132.
S435, thefirst terminal 110 receives the account logout response fed back by thelogin logic module 132.
Meanwhile, thefirst terminal 110 sets the login status of the target account to invalid through thefirst application 111, and deletes session information related to the target account and deletes personal information of the user of the target account.
S436, thesecond terminal 120 reestablishes the short-range communication link with thefirst terminal 110.
For example, the distance between thesecond terminal 120 and thefirst terminal 110 is again within the preset range, the short-range communication link may be reestablished between thesecond terminal 120 and thefirst terminal 110. The manner of establishing the short-range communication link may refer to the content discussed in the foregoing steps S401 to S404, and will not be described herein again.
S437, thesecond terminal 120 sends the login status information to thefirst terminal 110.
When the short-distance communication link between thesecond terminal 120 and thefirst terminal 110 is disconnected, thesecond terminal 120 still retains the login state information of the user, and keeps the normal user login state refresh process, and meanwhile, thesecond terminal 120 may also start a login state retention timer, for example, the timer is 24 hours. The duration of the log-in state holding timer corresponds to the session validity period of the session information.
Thesecond terminal 120 can delete the timer when thesecond terminal 120 reestablishes the short-range communication link with thefirst terminal 110 before the timer expires. Thesecond terminal 120 synchronizes the login state information to thefirst terminal 110 through the short-range communication link. The login state information is used to indicate that thesecond application 121 in thesecond terminal 120 has currently logged in to the target account. After acquiring the login state information, thefirst terminal 110 initiates a request to the userinformation storage module 137 to acquire the personal information of the user and update the login state of the user, thereby implementing automatic login continuation of the login state of the target account on thefirst application program 111.
When the log-on hold timer expires, thesecond terminal 120 and thefirst terminal 110 do not re-establish the short-range communication link, and thefirst terminal 110 no longer supports the log-on duration, so that the log-on status of the user expires.
S438, thefirst terminal 110 sends the user personal information request to the userinformation storage module 137.
After thesecond terminal 120 obtains the login state information, it may request the user personal information from the userinformation storage module 137 according to the login state information.
S439, the userinformation storage module 137 returns the user personal information to thefirst terminal 110.
S440, the first terminal 110 logs in the target account and displays personal information of the user.
The content of logging in the target account and displaying the personal information of the user may refer to the content discussed above, and will not be described herein again.
S436 to S440 are optional portions. In the embodiments of S436 to S440, thesecond terminal 120 may actively synchronize login state information with thefirst terminal 110 within the session validity period, so that thefirst application 111 in thefirst terminal 110 can timely implement automatic login of the target account, so as to simplify the process of logging in the target account on thefirst application 111.
As an embodiment, after the credential refresh period expires, thefirst application 111, thesecond terminal 120, and thefirst server 130 may all delete the pre-stored login information of the target account, so as to avoid the login information being leaked.
In the embodiment shown in fig. 4, thesecond application 121 in thesecond terminal 120 may obtain part of the login information from thethird party platform 140 and part of the login information from thefirst server 130, so as to combine these information and send the combined information to thefirst terminal 110 through the short-distance communication link, so that thefirst terminal 110 can not only automatically log in the target account, but also automatically log out of the target account after the short-distance communication link is disconnected, thereby ensuring the security of the target account. In addition, thesecond terminal 120 can directly perform target account login by using login information in thethird party platform 140, so that the account registration process of the user in the first application is avoided, and the operation of the user is simplified.
Based on the application scenarios shown in fig. 1B and fig. 1C, the account login control method according to the embodiment of the present application is described below. Referring to fig. 9, an interaction diagram between the devices in fig. 1B is shown, where the interaction process specifically includes:
the interaction diagram in fig. 9 is explained in detail below:
s901, thefirst terminal 110 transmits a broadcast message.
Thefirst terminal 110 calls the communication module to send the broadcast message through the first application, wherein the broadcast message may refer to the content discussed above, and is not described herein again.
S902, the second terminal 120 starts device search.
S903, thesecond terminal 120 initiates a connection request to thefirst terminal 110.
The connection request can refer to the content discussed above, and is not described in detail here.
S904, thefirst terminal 110 returns the device feature value to thesecond terminal 120.
The device characteristic value may specifically include a unique device identifier of thefirst terminal 110.
S905, thesecond terminal 120 initiates a login request to thefirst terminal 110.
The login request can refer to the content discussed above, and is not described in detail here.
S906, thefirst terminal 110 listens for the login synchronization message.
S907, thesecond terminal 120 transmits the account information to thefirst server 130.
Specifically, thesecond terminal 120 acquires an account and an account password of the target account input by the user in response to the login input operation, and thesecond terminal 120 sends account information to thefirst server 130 to request to login the target account on the second application program of thesecond terminal 120. The account information includes an account and an account password input by the user.
S908, thefirst server 130 verifies the account information.
After receiving the account information, thefirst server 130 verifies whether the account information is legal, and if yes, executes S909, i.e., sends a response that the account login is successful to thesecond terminal 120.
S909, thefirst server 130 sends a response that the account login is successful to thesecond terminal 120.
S905 to S909 are optional parts, for example, thesecond terminal 120 may have previously logged in the target account, and this part does not need to be executed.
S910, thesecond terminal 120 requests thefirst server 130 to authorize login.
In S904, thesecond terminal 120 obtains the device characteristic value of thefirst terminal 110, and thus may request authorization to log in to the first terminal 110 from thefirst server 130.
S911, thefirst server 130 generates login information.
Thefirst server 130 verifies the device feature value of thefirst terminal 110, and generates corresponding login information for the device feature value, where the login information may refer to the content discussed above, and is not described herein again.
S912, thefirst server 130 sends the login information to thesecond terminal 120.
S913, thesecond terminal 120 transmits the login information to thefirst terminal 110.
Thesecond terminal 120 can transmit the login information to thefirst terminal 110 based on the short-range communication link.
S914, thefirst terminal 110 sends the login information to thefirst server 130.
S915, thefirst server 130 sends an account login success response to thefirst terminal 110.
S916, the short-distance communication link is disconnected, and an account exit request is generated.
S917, thefirst terminal 110 sends an account logout request to thefirst server 130.
S918, thefirst server 130 returns an account exit response to thefirst terminal 110.
As an embodiment, when the login information includes a formal authorization credential and a credential refresh interface, if a credential validity period of the formal authorization credential is out and a credential refresh period of the credential refresh interface is not out, thesecond terminal 120 may send an updated formal authorization credential to thefirst terminal 110, and thefirst terminal 110 may maintain online login of the target account according to the updated formal authorization credential. The content of thefirst terminal 110 maintaining the online login of the target account can refer to the content discussed above, and is not described here again.
As an embodiment, when the login information includes the session information and the session validity period, after the short-range communication link between thesecond terminal 120 and thefirst terminal 110 is disconnected, and after the short-range communication link between thefirst terminal 110 and thesecond terminal 120 is established again, the login state information may be sent to thefirst terminal 110 within the session validity period, so that thesecond terminal 120 may re-login the target account. The content of thefirst terminal 110 re-logging in the target account can refer to the content discussed above, and is not described here again.
In the embodiment shown in fig. 9, after logging in the target account, thesecond terminal 120 may request thefirst server 130 for login information required by thefirst terminal 110, and send the login information to thefirst terminal 110 through the short-range communication link, which may be applicable to a case where the user registers the target account on thefirst application 111 by himself.
Based on the same inventive concept, an account login control device provided in the embodiments of the present application may be used to implement the functions of the first terminal discussed above, with reference to fig. 10, the device includes:
acommunication module 1001, configured to call a communication module of a first terminal through an application running on the first terminal, and establish a short-range communication link with a second terminal;
thetransceiver module 1002 is configured to receive a login request of a second terminal based on a target account based on a short-distance communication link;
adisplay module 1003, configured to, in response to a confirmation operation for the login request, display a login state of the application as that the target account is logged in to the application, and display the login state of the application as that the target account is logged out of the login application when the short-range communication link is disconnected.
In a possible embodiment, the apparatus has a pre-stored unique application identifier allocated by the third party platform for the first application, and thedisplay module 1003 is specifically configured to:
sending the unique application identification to the second terminal to enable the second terminal to execute the following operations:
according to the unique application identifier, a temporary authorization certificate required by logging in the application program by using the target account is requested to be obtained from the third-party platform, and a formal authorization certificate is obtained from the third-party platform according to the temporary authorization certificate and the unique application identifier to generate login information containing the formal authorization certificate;
receiving login information sent by a second terminal;
and displaying the login state of the application program as that the target account logs in the application program according to the login information.
In a possible embodiment, the login information further includes a credential validity period of the formal authorization credential and a credential refresh period of the formal authorization credential, where the credential validity period is less than the credential refresh period, and thedisplay module 1003 is specifically configured to:
according to the login information, a first server corresponding to the application program is requested to login the target account;
when a response that the account login fed back by the first server is successful is received, displaying the login state of the application program as that the target account logs in the application program;
if the validity period of the certificate is exceeded and the certificate is overtime and within the certificate refreshing period, receiving an updated formal authorization certificate sent by the second terminal;
requesting to a first server to keep the target account login according to the updated formal authorization certificate;
and when a response of account login maintenance fed back by the first server is received, displaying the login state of the application program as that the target account logs in the application program.
In a possible embodiment, the login information further comprises: historical use information of the target account in association with the first application and user personal information of the target account in correspondence with the third-party platform; thedisplay module 1003 is further configured to:
and displaying the login state of the application program as that the target account logs in the application program according to the login information, and then respectively displaying the historical use information and the personal information of the user on an interface corresponding to the application program.
In a possible embodiment, the display module is specifically configured to:
when the short-distance communication link is disconnected, sending an account quitting request to a first server corresponding to the application program, so that the first server executes quitting operation of the target account;
and when an account exit response fed back by the first server is received, displaying the login state of the application program as that the target account exits the login application program, and deleting the historical use information and the personal information of the user.
In a possible embodiment, the login information further includes session information and a session validity period of the session information, and thedisplay module 1003 is further configured to:
when the short-distance communication link is disconnected, displaying the login state of the application program as that the target account exits from the login application program, if the target account exits from the login application program within the session validity period, reestablishing the short-distance communication link with the second terminal, and acquiring login state information from the second terminal based on the session information;
and displaying the login state of the application program as the target account quitting the login application program according to the login state information.
It should be noted that the apparatus shown in fig. 10 may also be used to implement the account login control method discussed above, and details are not described here again.
Based on the same inventive concept, an embodiment of the present application provides an account login control device, which is configured to be equivalent to thesecond terminal 120 discussed above, and with reference to fig. 11, the device includes:
the receiving and sendingmodule 1101 is configured to send a connection request to the first terminal when monitoring that the first terminal calls broadcast information sent by a communication module of the first terminal through an application program;
anestablishing module 1102 for establishing a short-range communication link with a first terminal;
an obtainingmodule 1103, configured to obtain login information, where the login information is used to log in an application using a target account;
atransceiver module 1101 for transmitting the login information to the first terminal based on the short-range communication link, so that the first terminal performs the following operations: and displaying the login state of the application program in the first terminal as that the target account logs in the application program according to the login information, and displaying the login state of the application program as that the target account logs out of the login application program when the short-distance communication link is disconnected.
In a possible embodiment, the obtainingmodule 1103 is specifically configured to:
requesting to obtain a temporary authorization certificate for logging in a target account on an application program from a third-party platform;
according to the temporary authorization certificate and the unique application identifier, requesting to obtain a formal authorization certificate from a third-party platform, and generating login information containing the formal authorization certificate; the unique application identification is obtained from the first terminal based on the short-distance communication link, and the unique application identification is an identification distributed to the application program by the third-party platform.
In a possible embodiment, the obtainingmodule 1103 is specifically configured to:
sending the temporary authorization certificate and the unique application identification to a first server corresponding to the application program, so that the first server performs the following operations: acquiring an application interface key corresponding to the unique application identifier, and requesting to acquire a formal authorization certificate from a third-party open platform according to the application interface key, the unique application identifier and the temporary authorization certificate;
obtaining a formal authorization credential from a first server.
In a possible embodiment, the obtainingmodule 1103 is further configured to:
acquiring historical use information of a target account in an application program from a first server corresponding to the application program; and the number of the first and second groups,
acquiring user personal information of a target account from a first server; the user personal information is obtained by the first server requesting a third-party platform according to the formal authorization certificate;
thetransceiver module 1101 is further configured to send the historical usage information and the user personal information to the first terminal, so that the first terminal displays the historical usage information and the user personal information on an interface corresponding to the application program.
In a possible embodiment, the login information further includes a credential validity period of the formal authorization credential and a credential refresh period of the formal authorization credential, where the credential validity period is less than the credential refresh period, and thetransceiver module 1101 is further configured to:
if the validity period of the certificate is exceeded and the certificate is within the refreshing period of the certificate, sending the updated formal authorization certificate to the first terminal so that the first terminal executes the following operations: and requesting to maintain the login state of the target account from the first server according to the updated formal authorization certificate, and displaying the login state of the application program of the first terminal as that the target account logs in the application program when receiving a response of account login maintenance fed back by the first server.
In a possible embodiment, the login information further includes session information and a session validity period of the session information, and thetransceiver module 1101 is further configured to:
after the login information is sent to the first terminal based on the short-distance communication link, if the short-distance communication link between the first terminal and the first terminal is disconnected within the session validity period and the short-distance communication link is established again with the first terminal, the login state information of the target account is sent to the first terminal through the session information, so that the first terminal redisplays the login state of the application program of the first terminal as the target account logs in the application program according to the login state information.
It should be noted that the apparatus shown in fig. 11 may also be used to implement the account login control method discussed above, and details are not described here again.
Based on the same inventive concept, the present application provides a computer device, which corresponds to the first terminal discussed above, and referring to fig. 12, the computer device includes a processor 1201 and a memory 1202.
The processor 1201 may be a Central Processing Unit (CPU), or a digital processing unit, etc. The embodiment of the present application does not limit the specific connection medium between the memory 1202 and the processor 1201. In the embodiment of the present application, the memory 1202 and the processor 1201 are connected by thebus 1203 in fig. 12, thebus 1203 is represented by a thick line in fig. 12, and the connection manner between other components is only schematically illustrated and is not limited thereto. Thebus 1203 may be divided into an address bus, a data bus, a control bus, and so on. For ease of illustration, only one thick line is shown in FIG. 12, but this is not intended to represent only one bus or type of bus.
The memory 1202 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1202 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or any other medium which can be used to carry or store desired program code in the form of instructions or data structures and which can be accessed by a computer. Memory 1202 may be a combination of the above.
A processor 1201 for executing any of the account login control methods discussed above when invoking the computer program stored in the memory 1202.
Based on the same inventive concept, the embodiment of the present application provides a computer device, which is equivalent to the second terminal discussed above, please refer to fig. 13, and the computer device includes a processor 1301 and a memory 1302.
The processor 1301 may be a Central Processing Unit (CPU), a digital processing unit, or the like. The specific connection medium between the memory 1302 and the processor 1301 is not limited in the embodiments of the present application. In the embodiment of the present application, the memory 1302 and the processor 1301 are connected through abus 1303 in fig. 13, thebus 1303 is shown by a thick line in fig. 13, and the connection manner between other components is merely an illustrative description and is not limited thereto. Thebus 1303 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 13, but this is not intended to represent only one bus or type of bus.
The memory 1302 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1302 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or the memory 1302 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. Memory 1302 may be a combination of the above.
A processor 1301 for executing any of the account login control methods as discussed above when invoking the computer program stored in the memory 1302.
Based on the same inventive concept, embodiments of the present application provide a storage medium storing computer instructions, which, when executed on a computer, cause the computer to execute any one of the account login control methods discussed above. The storage medium is a computer storage medium.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Based on the same inventive concept, the embodiments of the present application provide a computer program product, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, so that the computer device executes the account login control method.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated units described above in the present application may be stored in a computer-readable storage medium if they are implemented in the form of software functional modules and sold or used as independent products. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or portions thereof contributing to the prior art may be embodied in the form of a software product stored in a storage medium, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.