A third-party-based login method, device, terminal equipment and storage medium

By obtaining and verifying third-party status information and updating login status, the problem of third-party instability affecting user login experience is solved, and a more stable user login experience is achieved.

CN118264462BActive Publication Date: 2024-11-26GUANGZHOU YIHU NETWORK TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202410370138.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2024-11-26
Estimated Expiration
2044-03-29

AI Technical Summary

Technical Problem

In the prior art, third parties are unstable and affect the user's login experience, resulting in inconvenience when logging in to the game and unable to log in normally.

Method used

By obtaining the third-party login request initiated by the client, obtaining the status information of the third party, verifying the current login status, and updating the login status based on the status information and verification results, reducing direct data interaction with the third party and reducing third-party instability Impact on user login.

Benefits of technology

It effectively solves the impact of third-party instability on user login experience, improves the stability and efficiency of user login, and avoids login failure caused by third-party problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118264462B_ABST
    Figure CN118264462B_ABST
Patent Text Reader

Abstract

The present application is applicable to the field of data processing, and provides a third-party-based login method, apparatus, terminal device, and storage medium. The login method includes: obtaining a first login request initiated by a client regarding a third party, and obtaining status information regarding the third party based on the first login request; if the status information is the first status, verifying the current login status of the third party, and obtaining a verification result of the current login status; based on the verification result, returning the first request result to the client. In the present application, third-party login is performed through the login method, reducing the impact of third-party instability on user login.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to a third-party-based login method and device. Background Art

[0002] As the process of globalization is gradually promoted by the times, more and more service industries are seeking partners to integrate users and expand target audiences. Among them, Chinese games entering overseas markets also need to seek cooperation with local third parties in the market, so that third-party users can log in to the game directly, making it easier for the game to integrate into the local market, expand the user group, and achieve win-win cooperation with third parties.

[0003] Nowadays, users who rely on third-party authorization to log in will encounter inconvenience in logging into the game and will not be able to log in normally when problems occur with the third party.

[0004] It can be seen that in the existing technology, there is a problem that affects the user login experience when the third party is unstable, which needs to be solved urgently. Summary of the invention

[0005] The embodiments of the present application provide a third-party-based login method and device, which can be used to perform third-party login, reduce the impact of third-party instability on user login, and solve the problem in the prior art that the user login experience is affected when the third party is unstable.

[0006] In a first aspect, an embodiment of the present application provides a third-party-based login method, including:

[0007] Obtain a first login request initiated by a client regarding a third party, and obtain status information about the third party based on the first login request; if the status information is the first status, verify the current login status of the third party and obtain a verification result of the current login status; based on the verification result, return the first request result to the client.

[0008] In a possible implementation of the first aspect, after obtaining status information about the third party based on the first login request, it also includes: if the status information is a second status, or the verification result is the first verification result, sending a second login request to the third party; obtaining a second request result returned by the third party based on the second login request, and returning the second request result to the client; and updating the current login status based on the second request result.

[0009] Exemplarily, the status information is used to describe the status of the third party, that is, the basis for determining whether the third-party server has a problem that affects the user's third-party login authorization; the first status is used to identify that the third party has a problem, and the second status is used to identify that the third party has no problem. The first verification result is used to identify that the current login status has not passed the verification, that is, the client is not an authorized client or the current time is not within the authorized login validity period.

[0010] In a possible implementation manner of the first aspect, before returning the first request result to the client, it also includes: if the verification result is the second verification result, continuing processing of the current login state.

[0011] Exemplarily, the second verification result is used to indicate that the current login status has passed the verification, that is, the client is an authorized client and the current time is within the validity period of the authorized login.

[0012] It should be understood that the above-mentioned third party is used to refer to any third party other than the client and the server, and in data interaction, the third party can be used to refer to a third-party server.

[0013] In a second aspect, an embodiment of the present application provides a third-party-based login device, including:

[0014] A third-party status determination module is used to obtain a first login request initiated by a client regarding a third party, and obtain status information about the third party based on the first login request; a current login status verification module is used to verify the current login status of the third party if the status information is the first status, and obtain a verification result of the current login status; a request result return module is used to return the first request result to the client based on the verification result.

[0015] In a third aspect, an embodiment of the present application provides a terminal device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements any one of the methods described in the first aspect when executing the computer program.

[0016] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, including: the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements any one of the methods described in the first aspect above.

[0017] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute any of the methods described in the first aspect above.

[0018] It can be understood that the beneficial effects of the second to fifth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here.

[0019] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0020] Compared with the prior art, the third-party-based login method provided in the present application performs third-party login through the login method, reduces the impact of third-party instability on user login, and solves the problem in the prior art that the third party is unstable and affects the user login experience. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0022] Figure 1 is a flowchart of the implementation of the login method provided in the first embodiment of the present application;

[0023] Figure 2 is a flowchart of the implementation of the login method provided in the second embodiment of the present application;

[0024] Figure 3 This is a data interaction diagram of the login method provided in the second embodiment of the present application;

[0025] Figure 4 is a flowchart of the implementation of the login method provided in the third embodiment of the present application;

[0026] Figure 5 This is a data interaction diagram of the login method provided in the third embodiment of the present application;

[0027] Figure 6 is a flowchart of the implementation of the login method provided in the fourth embodiment of the present application;

[0028] Figure 7 This is a data interaction diagram of a login method provided by another embodiment of the present application;

[0029] Figure 8 is a schematic diagram of the structure of a login device provided in one embodiment of the present application;

[0030] Fig. 9 It is a structural diagram of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0031] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0032] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0033] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0034] As used in the specification and appended claims of this application, the term "if" can be interpreted as "when" or "uponce" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrase "if it is determined" or "if [described condition or event] is detected" can be interpreted as meaning "uponce it is determined" or "in response to determining" or "uponce [described condition or event] is detected" or "in response to detecting [described condition or event]", depending on the context.

[0035] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0036] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0037] In the embodiment of the present application, the execution subject of the process is a server. The server can interact with the client and a third party. Preferably, the third party in the embodiment of the present application refers to a third-party server. Figure 1 The implementation flow chart of the login method provided in the first embodiment of the present application is shown, and the details are as follows:

[0038] In S101, a first login request initiated by a client regarding a third party is obtained, and status information regarding the third party is obtained based on the first login request.

[0039] In this embodiment, the above-mentioned acquisition of the first login request initiated by the client regarding the third party can be specifically that the user initiates the first login request on the client to the server that requires the authorization of the third party, so as to log in to the account bound to the third party on the client, and then let the server provide relevant services for the user on the client based on the account. As an example but not a limitation, the user logs in to the game account bound to the third party on the client, and initiates the first login request to the server, so that the server can subsequently provide game services for the game account. Generally, after the user initiates the first login request to the server, the server initiates the second login request to the third party to obtain the authorization license of the third party. After obtaining the authorization license of the third party, the server returns the result of successful login to the client.

[0040] In this embodiment, the status information is used to describe the status of the third party, that is, it is the basis for judging whether the third-party server has a problem that affects the user's third-party login authorization (hereinafter referred to as a problem). The above-mentioned acquisition of the status information about the third party based on the first login request can be specifically: when the first login request is obtained, triggering the execution action of acquiring the status information, specifically, initiating a status query to the third party, if the third party returns normal status information, it is determined that there is no problem with the third-party server; if the third party does not return normal status information, specifically, the third party returns abnormal status information or times out without responding to the status query, it is determined that there is a problem with the third-party server.

[0041] Exemplarily, the above-mentioned execution action that triggers the acquisition of the status information can also be specifically: querying the status information about the third party stored in the server. As an example and not limitation, the status information can be periodically updated by the server, and the specific updating method can refer to the specific description of initiating a status inquiry to the third party. It can also be predicted by the server based on a third-party status prediction model. The third-party status prediction model is a deep learning model, which can be trained based on historical information of problems encountered by the third party. The method of obtaining the historical information can refer to the specific description of initiating a status inquiry to the third party.

[0042] It should be understood that the third party status information may also be specifically set by the authorized personnel of the server according to requirements or other information.

[0043] It should be understood that the input parameters (ie, external parameters) of the above-mentioned third-party status prediction model may include but are not limited to: third-party identification, the device identification, geographic location or network parameters of the client, and the initiation time of the first login request, etc.

[0044] In S102, if the status information is the first status, the current login status of the third party is verified to obtain a verification result of the current login status.

[0045] In this embodiment, the first state is used to identify a problem with a third party; that is, when a problem occurs with the third party, the current login state of the third party is checked. It should be understood that the current login state is associated with the client and the third party, and can be specifically associated with the device identifier of the client and the application identifier of the third party. The current login state is used to describe the real-time login authorization information between the client and the third party. The above verification result is used to describe the real-time login authorization information between the client and the third party; if the current login state passes the verification, it is considered that the login authorization between the client and the third party is still in effect at this time, and if the current login state fails the verification, it is considered that the login authorization between the client and the third party is not in effect at this time.

[0046] In S103, based on the verification result, a first request result is returned to the client.

[0047] In this embodiment, the first request result is used to describe the authorized login information corresponding to the above-mentioned first login request; the above-mentioned first request result is returned to the client based on the verification result, which can be specifically: if the verification result describes that the current login status has passed the verification, then the result of the successful authorization login of the third party is returned to the client; if the verification result describes that the current login status has not passed the verification, then the result of the failed authorization login of the third party is returned to the client.

[0048] In this embodiment, the status information is used to describe whether there is a problem with the third party. When a problem occurs with the third party, the current login status is checked, and the first request result is returned based on the verification result. Third-party login is performed through this login method, and the current login status is checked based on the status information to avoid direct data interaction with the third party every time the login occurs, thereby reducing the impact of the instability of the third party on the user login.

[0049] Figure 2 The implementation flow chart of the login method provided in the second embodiment of the present application is shown. Figure 2 , relative to Figure 1In the embodiment, the login method provided in this embodiment further includes S201 to S203, which are described in detail as follows:

[0050] Further, after acquiring the status information about the third party based on the first login request, the method further includes:

[0051] In S201, if the state information is the second state, or the verification result is the first verification result, a second login request is sent to the third party.

[0052] In this embodiment, the second state is used to identify that there is no problem with the third party; the first verification result is used to identify that the current login state has not passed the verification, that is, the client is not an authorized client or the current time is not within the authorized login validity period. If the state information is the second state, or the verification result is the first verification result, a second login request is sent to the third party. Specifically, if there is no problem with the third party, or the client is not an authorized client, or the current time is not within the authorized login validity period, a second login request is sent to the third party. The second login request is an authorized login request sent by the server to the third-party server.

[0053] In S202, a second request result returned by the third party based on the second login request is obtained, and the second request result is returned to the client.

[0054] In this embodiment, the second login request corresponds to the first login request; the second request result is that the third party receives the second login request initiated by the server, responds to the second login request, and returns the authorization login information to the server.

[0055] In this embodiment, the above-mentioned obtaining the second request result returned by the third party based on the second login request and returning the second request result to the client can be specifically referred to in Figure 3 , Figure 3 A data interaction diagram of the login method provided by the second embodiment of the present application is shown, and the detailed description is as follows: the server initiates a second login request to a third party, and the third party responds to the received second login request, generates a second request result, and returns it to the server; the server obtains the second request result from the third party and returns the second request result to the client.

[0056] It should be understood that the server can process the second request result and then return it to the client to ensure that the data format of the second request result is the same as the first request result, so that when it is subsequently returned to the client, the client can read the first request result and the second request result in the same way.

[0057] It should be understood that if the acquisition of the second request result times out, a second request result is generated and assigned a value, specifically, indicating that the generated second request result indicates that the third-party authorized login has failed.

[0058] In S203, the current login status is updated based on the second request result.

[0059] In this embodiment, the second request result is used to describe the latest login status, and the current login status before the update is the old login status, so the current login status needs to be updated based on the second request result.

[0060] It should be understood that when the verification result is the first verification result, that is, the above-mentioned step of "verifying the current login status of the third party" has been executed, and the execution premise of this step is that "the status information is the first state", that is, the status information is the first state at this time, indicating that there is a problem with the third party. If the second request result returned by the third party based on the second login request is successfully obtained at this time, it means that "the status information is the first state" is misdiagnosis information, and the status information needs to be updated to the second state.

[0061] Further, when the verification result is the first verification result and the second request result is successfully obtained, the above S103 can be replaced by the above S202 to avoid repeatedly returning redundant first request results to the client.

[0062] In this embodiment, by designing the execution steps when the status information is the second state or the verification result is the first verification result, the execution steps when the status information is the second state in the above-mentioned first embodiment can be improved, thereby improving the logical rigor of the login method; it can also avoid misdiagnosis of a problem with the third party and directly returning information about an authorization login failure, thereby ensuring the rationality of the login method; and by timely updating the current login status, the real-time nature of the current login status can be ensured.

[0063] Further, in a possible embodiment, compared with the above second embodiment, the above current login status includes an expiration time; the login method S203 provided in this embodiment includes S2031-S2032, which are specifically described as follows:

[0064] The second login request result includes the first expiration time; and the updating of the current login status based on the second request result includes:

[0065] In S2031, a second expiration period is determined based on the problem coefficient of the third party and the first expiration period.

[0066] In this embodiment, the problem coefficient is used to describe an indicator of possible problems with the third party. Specifically, the indicator can be a specific score or a specific percentage, which is not limited here. The expiration time refers to the remaining time that the current login state can maintain the third-party authorized login state; the first expiration period refers to the duration of the third-party authorized login. The above-mentioned determination of the second expiration period based on the problem coefficient of the third party and the first expiration period can be specifically as follows: determining the problem multiple based on the problem coefficient, calculating the problem multiple of the first expiration period as the second expiration period; or determining the increase or decrease period based on the problem coefficient, and using the sum of the first expiration period and the increase or decrease period as the second expiration period.

[0067] It should be understood that the expiration time is a time that is in a real-time countdown state.

[0068] In S2032, the expiration time of the current login status is updated based on the second expiration time.

[0069] In this embodiment, the second expiration period refers to the specific time that is actually required to maintain the third-party authorized login status. The above-mentioned updating of the expiration time of the current login status based on the second expiration period can specifically be to replace the expiration time of the current login status with the second expiration period.

[0070] It should be understood that in the prior art, the initial value of the expiration time of the login state is generally a preset constant value, and the first expiration time is also the preset constant value. When updating the current login state, generally, the countdown is simply restarted based on the preset constant value. When the expiration time of the current login state is updated, the second expiration time is used as the initial value of the expiration time, and the expiration time is restarted based on the second expiration time.

[0071] In this embodiment, the expiration time of the login status is assigned the problem coefficient as a weight, so that the remaining time of the third-party authorized login can be extended for third parties with more serious problems, the number of visits to the third party can be reduced, and the user's third-party authorized login experience can be improved; the remaining time of the third-party authorized login can also be shortened for third parties with less serious problems, ensuring that the third-party server can be accessed at subsequent third-party login requests initiated by users at short intervals, thereby ensuring the security of the third-party authorized login.

[0072] Furthermore, before determining the second expiration period based on the problem coefficient of the third party and the first expiration period, the method further includes:

[0073] The state information is obtained as a historical record of the first state.

[0074] In this embodiment, the historical record is used to record historical information of problems occurring with the third party, which may specifically be the duration of time that the status information is in the first state; it may also be the cumulative number of times that the status information obtained based on the above-mentioned first login request is in the first state; it may also be the frequency of the status information obtained based on each first login request being in the first state; it may also be record information when the status information obtained based on each first login request is in the first state, which may include but is not limited to the device identification, geographic location or network parameters of the client corresponding to the first login request, and the initiation time of the first login request, etc.

[0075] The problem coefficient is determined based on the historical record.

[0076] In this embodiment, the problem coefficient is associated with the historical record. Generally, the more frequently the third party has problems in the historical record, the greater the problem coefficient is, that is, the problem coefficient is positively correlated with the historical record. The problem coefficient is determined based on the historical record, specifically, the frequency of the state information obtained based on the first login request as the first state determined based on the historical record, that is, the ratio of the cumulative number of times the state information is obtained as the first state to the cumulative number of times the state information is obtained based on the first login request, is used as a basis to determine the problem coefficient.

[0077] Exemplarily, the problem coefficient is determined based on the historical records, and specifically, the problem coefficient is determined based on the proportion of the duration of the first state in the historical records determined based on the historical records.

[0078] Exemplarily, the problem coefficient is determined based on the historical records, and specifically, the problem coefficient is determined based on the cumulative number of times that the state information obtained based on the first login request is the first state, determined based on the historical records.

[0079] As an example but not limitation, the above-mentioned problem coefficient is associated with the current time and / or the current location; the problem coefficient is determined based on the historical record, and specifically, it can also be: the client's geographical location and / or the initiation time of the first login request each time the status information obtained based on the first login request is the first state determined based on the historical record are used as a basis to determine the problem coefficient. Specifically, the frequency of the current time and / or the current location falling into the preset range of the above-mentioned client geographical location and / or the initiation time of the first login request is determined, and the problem coefficient corresponding to the current time and / or the current location is determined according to the frequency. Specifically, based on the above-mentioned client geographical location and / or the above-mentioned initiation time each time the status information obtained based on the first login request is the first state, the problem coefficient corresponding to each problem area and / or each problem time period is determined, and it is judged whether the current time and / or the current location falls into the above-mentioned problem area and / or the above-mentioned problem time period, so as to determine the problem coefficient corresponding to the current time and / or the current location.

[0080] The problem coefficient is determined based on a third-party status prediction model.

[0081] In this embodiment, the third-party status prediction model is used to determine the abnormal probability of the third party at the current time; the current time can be the current moment or the current time period. The third-party status prediction model is a deep learning model, which can be obtained based on the above historical record training; the input parameters (i.e., external parameters) of the third-party status prediction model can include but are not limited to the third-party identifier, the device identifier, geographic location or network parameters (preferably geographic location) of the client, and the current time, etc.; the internal parameters of the third-party status prediction model can include but are not limited to the problem third-party identifier, the problem device identifier, the problem parameters or abnormal network parameters corresponding to each area, and the problem parameters corresponding to each time period or moment.

[0082] The problem coefficient is determined based on the third-party status prediction model, which can specifically be: the device identification, geographic location or network parameters of the client, the third-party identification corresponding to the first login request, and the current time are imported into the third-party status prediction model, and the third-party status prediction model outputs the abnormal probability of the third party at the current time as a basis for determining the problem coefficient, and the abnormal probability can be specifically used as the problem coefficient.

[0083] It should be understood that the historical records generated in the login method provided in the embodiment of the present application can be used for feedback optimization of the above-mentioned third-party status prediction model. For details, please refer to the feedback optimization of the existing deep learning model, which will not be repeated here.

[0084] In this embodiment, by limiting the method for determining the problem coefficient, the accuracy of the problem coefficient in describing the problem of the third party is improved, which facilitates the subsequent updating of the expiration time of the current login status based on the problem coefficient.

[0085] Figure 4 The implementation flow chart of the login method provided in the third embodiment of the present application is shown. Figure 4 , relative to Figure 1 In the embodiment, the login method provided in this embodiment further includes S401, which is described in detail as follows:

[0086] Furthermore, before returning the first request result to the client, the method further includes:

[0087] In S401, if the verification result is the second verification result, the current login state is continued.

[0088] In this embodiment, the second verification result is used to identify that the current login state has passed the verification, that is, the client is an authorized client and the current time is within the authorized login validity period. The above-mentioned continued processing of the current login state can be specifically: changing the expiration time of the current login state, specifically, replacing the current value with the initial value of the expiration time, so that the expiration time counts down again; or, adding a preset duration to the current value of the expiration time to extend the time when the expiration time countdown ends at zero. For the expiration time, please refer to the specific description of the above embodiment, which will not be repeated here.

[0089] In this embodiment, by continuing the current login status, the remaining time of the third-party authorized login is changed to avoid accessing the third party when initiating the first login request again in a short period of time, reducing the number of accesses to the third party, avoiding the login impact caused by problems with the third party, and improving the user's third-party authorized login experience. Figure 5 , Figure 5The data interaction diagram of the login method provided by the third embodiment of the present application is shown, which is described in detail as follows: the client initiates a first login request about a third party; the server obtains the first login request, and obtains the status information about the third party stored in the server based on the first login request; if the status information is the first state, the current login status of the third party is verified to obtain the verification result of the current login status; if the verification result is the second verification result, the current login status is processed continuously; and the first request result corresponding to the verification result is returned to the client. It can be seen that during the entire data interaction process, the client or the server does not interact with the third party for data. It should be understood that the above status information is the first state, that is, even if the server attempts to initiate a status inquiry to the third party when obtaining the status information, it fails to successfully interact with the third party normally, and can also avoid the login impact caused by problems with the third party.

[0090] Furthermore, in a possible embodiment, compared with the third embodiment, the login method S401 provided in this embodiment includes S4011 to S4013, which are described in detail as follows:

[0091] The continuing processing of the current login state includes:

[0092] In S4011, the current duration of the current login state is determined.

[0093] In this embodiment, the current duration count is the cumulative duration count corresponding to the current login state. It should be understood that the cumulative duration count is reset to zero when the current login state is updated, and the current login state is updated only when a new client initiates the above-mentioned first login request or a third party returns a new second request result.

[0094] In S4012, the duration is determined based on the current number of durations.

[0095] In this embodiment, the duration is used to change the expiration time of the current login state. The duration is determined based on the current duration times. Generally, the greater the current duration times, the shorter the duration, that is, the current duration times are inversely correlated with the duration.

[0096] Exemplarily, the durations corresponding to each current duration number are preset. Specifically, when the current duration number is less than a preset threshold, the durations corresponding to each current duration number are in an arithmetic progression. When the current duration number is greater than or equal to the preset threshold, the corresponding duration is 0.

[0097] In S4013, the current login status is processed based on the duration, and the current duration times are updated.

[0098] In this embodiment, the above-mentioned processing of the current login state based on the duration may specifically be: replacing the current value of the expiration time of the current login state with the duration; or increasing the duration for the current value of the expiration time; or replacing the current value of the expiration time with the sum of the initial value of the expiration time and the duration. The above-mentioned updating of the current duration count may specifically be: adding one to the current duration count.

[0099] In this embodiment, the duration is determined by the number of continuations, and the duration corresponding to a high number of continuations is reduced to avoid security risks caused by multiple continuations, prevent the abnormal situation where unlimited continuations result in no need to access the third party for subsequent first login requests, and ensure the security of the third-party authorized login.

[0100] Figure 6 FIG. 4 shows a flowchart of the implementation of the login method provided in the fourth embodiment of the present application. Figure 6 , relative to all the above embodiments, the login method S103 provided in this embodiment includes S601, which is described in detail as follows:

[0101] Further, returning the first request result to the client based on the verification result includes:

[0102] In S601, if the verification result is the second verification result, short-term authorization information is generated and returned to the client.

[0103] In this embodiment, the short-time authorization information is used to instruct the client to stop initiating the next first login request to the server if it generates the next first login request within a preset time period; the short-time authorization information is also used to instruct the client to perform authorized login of the third party based on the short-time authorization information if it generates the next first login request within the preset time period.

[0104] In this embodiment, the second verification result is used to indicate that the current login state has passed the verification, that is, the client is an authorized client and the current time is within the authorized login validity period. That is, when the current login state has passed the verification, the client receives the short-term authorization information, and within the subsequent preset period, if the client generates a next first login request, it stops initiating the next first login request to the server, and performs the authorized login of the third party based on the short-term authorization information.

[0105] It should be understood that the next first login request can be any other first login request initiated by the client within the preset time period after the above-mentioned first login request is initiated; the next first login request can also be only the next first login request initiated by the client within the preset time period after the above-mentioned first login request is initiated, so as to limit the third-party authorization effect of the short-time authorization information, ensure that the short-time authorization information is one-time, and avoid unnecessary security risks.

[0106] It should be understood that the short-term authorization information includes a short-term expiration time, which can be the length of the above-mentioned preset period. The short-term expiration time starts counting down when the client receives the short-time authorization information. When the countdown reaches zero, the short-time authorization information can no longer be used to respond to the first login request initiated by the client.

[0107] In this embodiment, the short-term authorization information is used to further downgrade the user's third-party authorized login. The client can complete the third-party authorized login without data interaction with the above-mentioned server in a short time, further improving the user's third-party login experience.

[0108] In a possible embodiment, some of the above steps can be integrated, for details, see Figure 7 , Figure 7 A data interaction diagram of a login method provided by another embodiment of the present application is shown, and the specific details are as follows:

[0109] The client initiates a first login request to a third party;

[0110] The server obtains the first login request, and obtains the status information about the third party stored in the server based on the first login request;

[0111] If the status information is the first status, the server verifies the current login status of the third party and obtains a verification result of the current login status;

[0112] If the verification result is the first verification result, the server sends a second login request to the third party; the third party returns a second request result to the server based on the second login request;

[0113] If the verification result is the second verification result, the current login state is continued;

[0114] If the state information is the second state, the server sends a second login request to the third party; the third party returns a second request result to the server based on the second login request;

[0115] The server returns the first request result to the client.

[0116] It should be understood that Figure 7 The data interaction diagram of the login method shown is only an illustration of data interaction by combining some steps of the embodiment of the present application, and the specific steps are not limited here.

[0117] Corresponding to the method described in the above embodiment, Figure 8 A schematic diagram of the structure of a login device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.

[0118] Reference Figure 8 The login device includes: a third-party status determination module, which is used to obtain a first login request initiated by a client about a third party, and obtain status information about the third party based on the first login request; a current login status verification module, which is used to verify the current login status of the third party if the status information is the first status, and obtain the verification result of the current login status; a request result returning module, which is used to return the first request result to the client based on the verification result.

[0119] Optionally, the login device also includes: a second login request module, used to send a second login request to the third party if the status information is a second status, or the verification result is a first verification result; a request result acquisition module, used to obtain a second request result returned by the third party based on the second login request, and return the second request result to the client; a current login status update module, used to update the current login status based on the second request result.

[0120] Optionally, the current login status includes an expiration time; the second login request result includes a first expiration time; the current login status update module includes: a second expiration time determination module, used to determine a second expiration time based on the third party's problem coefficient and the first expiration time; an expiration time update module, used to update the expiration time of the current login status based on the second expiration time.

[0121] Optionally, the login device also includes: a history record module, used to obtain historical records of the status information being a first state; a problem coefficient determination module, used to determine the problem coefficient based on the historical records; or used to determine the problem coefficient based on a third-party status prediction model; the third-party status prediction model is used to determine the abnormal probability of the third party at the current time.

[0122] Optionally, the login device further includes: a current login status continuation module, configured to perform continuation processing on the current login status if the verification result is the second verification result.

[0123] Optionally, the current login status continuation module includes: a current continuation count determination module, used to determine the current continuation count of the current login status; a continuation duration determination module, used to determine the continuation duration based on the current continuation count; the current login status continuation module is also used to perform continuation processing on the current login status based on the continuation duration; and a continuation duration accumulation module, used to update the current continuation count.

[0124] Optionally, the login device also includes: a short-time authorization information generation module, which is used to generate short-time authorization information if the verification result is the second verification result, and return the short-time authorization information to the client; the short-time authorization information is used to instruct the client to stop initiating the next first login request to the server if it generates the next first login request within a preset time period; the short-time authorization information is also used to instruct the client to perform authorized login of the third party based on the short-time authorization information if it generates the next first login request within a preset time period.

[0125] It should be noted that the information interaction, execution process and other contents between the above-mentioned devices are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0126] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0127] Fig. 9 FIG. 1 shows a schematic diagram of the structure of a terminal device provided by an embodiment of the present application. Fig. 9 As shown, the terminal device 9 of this embodiment includes: at least one processor 90 ( Fig. 9Only one processor is shown in the figure), a memory 91, and a computer program 92 stored in the memory 91 and executable on the at least one processor 90, wherein the processor 90 implements the steps of any of the above-mentioned method embodiments when executing the computer program 92.

[0128] The terminal device 9 is preferably a computing device such as a cloud server. The terminal device may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will appreciate that Fig. 9 It is only an example of the terminal device 9 and does not constitute a limitation on the terminal device 9. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components, for example, it may also include input and output devices, network access devices, etc.

[0129] The processor 90 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0130] In some embodiments, the memory 91 may be an internal storage unit of the terminal device 9, such as a hard disk or memory of the terminal device 9. In other embodiments, the memory 91 may also be an external storage device of the terminal device 9, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 9. Further, the memory 91 may also include both an internal storage unit of the terminal device 9 and an external storage device. The memory 91 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program. The memory 91 may also be used to temporarily store data that has been output or is to be output.

[0131] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0132] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0133] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0134] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0135] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0136] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0137] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0138] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A third-party based login method, applied to a server, characterized in that: include: Obtaining a first login request initiated by a client regarding a third party, and obtaining status information regarding the third party based on the first login request; If the status information is the first status, verifying the current login status of the third party to obtain a verification result of the current login status; Based on the verification result, returning the first request result to the client; After acquiring the status information about the third party based on the first login request, the method further includes: If the state information is the second state, or the verification result is the first verification result, sending a second login request to the third party; Obtaining a second request result returned by the third party based on the second login request, and returning the second request result to the client; Update the current login status based on the second request result; The current login status includes an expiration time; the second request result includes a first expiration time; and updating the current login status based on the second request result includes: Determining a second expiration period based on the problem coefficient of the third party and the first expiration period; The expiration time of the current login status is updated based on the second expiration time.

2. The method according to claim 1, characterized in that Before determining the second expiration period based on the problem coefficient of the third party and the first expiration period, the method further includes: Acquire a historical record of the state information being a first state; determining the problem coefficient based on the historical record; Or, the problem coefficient is determined based on a third-party status prediction model; the third-party status prediction model is used to determine the abnormal probability of the third party at the current time.

3. The method according to claim 1, characterized in that Before returning the first request result to the client, the method further includes: If the verification result is the second verification result, the current login state is continued.

4. The method according to claim 3, characterized in that The continuing processing of the current login state includes: Determine the current duration of the current login state; Determine the duration of the existence based on the current number of existences; The current login state is processed continuously based on the duration, and the current duration times are updated.

5. The method according to any one of claims 1 to 4, characterized in that: The returning the first request result to the client based on the verification result includes: If the verification result is the second verification result, generating short-term authorization information, and returning the short-term authorization information to the client; The short-term authorization information is used to instruct the client to stop initiating the next first login request to the server if the client generates the next first login request within a preset time period; The short-term authorization information is also used to instruct the client to perform authorized login of the third party based on the short-term authorization information if the client generates a next first login request within a preset time period.

6. A third-party based login device, characterized in that: include: A third-party status determination module, configured to obtain a first login request initiated by a client regarding a third party, and obtain status information regarding the third party based on the first login request; A current login status verification module, configured to verify the current login status of the third party if the status information is in the first status, and obtain a verification result of the current login status; A request result returning module, used for returning a first request result to the client based on the verification result; After acquiring the status information about the third party based on the first login request, the method further includes: A second login request module: configured to send a second login request to the third party if the state information is the second state or the verification result is the first verification result; Request result acquisition module: used for acquiring the second request result returned by the third party based on the second login request, and returning the second request result to the client; Current login status updating module: used for updating the current login status based on the second request result; The current login status includes an expiration time; the second request result includes a first expiration time; and updating the current login status based on the second request result includes: A second expiration period determination module: configured to determine a second expiration period based on the problem coefficient of the third party and the first expiration period; Expiration time updating module: used to update the expiration time of the current login status based on the second expiration period.

7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Cross-domain name login method and device

    CN111628965A

  • Remote login method of cloud game system

    CN113694535A

  • Login method and device based on third-party authentication, equipment and storage medium

    CN114338057A

  • Computer-based platforms or systems, computing devices or components and / or computing methods for technological applications involving provision of a portal for managing user accounts having a login portal configured to defend against credential replay attacks

    US10628576B1