Login authentication method, computer equipment and storage medium

Through near-field communication technology, the login authentication code is transmitted between multiple terminals, which solves the problems of cumbersome and unsafe multi-terminal login operation in the prior art, and achieves higher login authentication security and simplified login process.

CN115515134BActive Publication Date: 2025-03-07PING AN BANK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211151454.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-21
Publication Date
2025-03-07
Estimated Expiration
2042-09-21

AI Technical Summary

Technical Problem

When multiple terminals log in to the same application, the prior art requires entering a password separately in each terminal, which is cumbersome and unsafe.

Method used

Through near field communication technology, the login authentication code is transmitted between the first terminal and the second terminal, and the second terminal transmits the authentication code to the server. The server logs in and authenticates based on the authentication code, and authorizes the first terminal to log in to the target application.

Benefits of technology

Improve the security of login authentication, avoid the step of re-entering the account password in each terminal, and simplifies the login operation of multiple terminals.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115515134B_ABST
    Figure CN115515134B_ABST
Patent Text Reader

Abstract

The present application relates to the field of communication technology, and specifically to a login authentication method, a computer device and a storage medium, which are applied to a server, the server is respectively connected to a first terminal and a second terminal in communication, the first terminal is not logged in to a target application, the second terminal is logged in to the target application, the first terminal and the second terminal have a near field communication function, and the login authentication method includes: if a login authentication request sent by the first terminal is monitored, a login authentication code is generated according to the login authentication request; the login authentication code is sent to the first terminal, the first terminal sends the login authentication code to the second terminal through the near field communication function, the second terminal transmits the login authentication code to the server, and the server performs login authentication on the first terminal according to the login authentication code; if the login authentication is successful, the first terminal is authorized to log in to the target application, and the login operation of the application on multiple terminals can be simplified while ensuring the security of the login authentication.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a login authentication method, a computer device and a storage medium. Background Art

[0002] When users need to log in to the same application on multiple terminals, they need to enter passwords on multiple terminals separately to ensure account security, which is cumbersome. Summary of the invention

[0003] The embodiments of the present application provide a login authentication method, a computer device, and a storage medium, which are intended to simplify the login operation of an application on multiple terminals while ensuring the security of the login authentication.

[0004] On the one hand, the present application provides a login authentication method, which is applied to a server, wherein the server is respectively connected to a first terminal and a second terminal for communication, wherein the first terminal is a terminal that is not logged in to a target application, and the second terminal is a terminal that is logged in to the target application, and the first terminal and the second terminal have a near field communication function, and the login authentication method includes:

[0005] If a login authentication request sent by the first terminal is monitored, a login authentication code is generated according to the login authentication request, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0006] Sending the login authentication code to the first terminal, so that the first terminal sends the login authentication code to the second terminal through a near field communication function, and the second terminal transmits the login authentication code to the server;

[0007] If a login authentication code is received from the second terminal, performing login authentication on the first terminal according to the login authentication code received from the second terminal;

[0008] If the login authentication is successful, the first terminal is authorized to log in to the target application.

[0009] On the other hand, the present application provides a login authentication method, which is applied to a first terminal, the first terminal is communicatively connected to a server, the server is communicatively connected to a second terminal, the first terminal is a terminal that is not logged in to a target application, the second terminal is a terminal that is logged in to a target application, and the first terminal and the second terminal have a near field communication function.

[0010] The login authentication method comprises:

[0011] Sending a login authentication request to the server, so that the server generates a login authentication code according to the login authentication request, and sends the login authentication code to the first terminal, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0012] If a login authentication code is received from the server, the login authentication code is sent to the second terminal via the near field communication function, so that the second terminal can send the login authentication code to the server. The server performs login authentication based on the login authentication code received from the second terminal, and after successful login, authorizes the first terminal to log in to the target application.

[0013] On the other hand, the present application provides a login authentication method, which is applied to a login authentication system, wherein the login authentication system includes: a server, a first terminal, and a second terminal, wherein the server is respectively connected to the first terminal and the second terminal for communication, wherein the first terminal is a terminal that has not logged in to a target application, and the second terminal is a terminal that has logged in to a target application, wherein the first terminal and the second terminal have a near field communication function, and wherein the login authentication method includes:

[0014] The first terminal sends a login authentication request to the server, where the login authentication request is used to request to log in to the target application at the first terminal;

[0015] If the server monitors the login authentication request, it generates a login authentication code according to the login authentication request and sends the login authentication code to the first terminal;

[0016] After receiving the login authentication code, the first terminal sends the login authentication code to the second terminal through a near field communication function;

[0017] After receiving the login authentication code through the near field communication function, the second terminal sends the login authentication code to the server;

[0018] After receiving the login authentication code from the second terminal, the server performs login authentication according to the login authentication code. If the login authentication is successful, the first terminal is authorized to log in to the target application.

[0019] On the other hand, the present application also provides a computer device, the computer device comprising:

[0020] one or more processors;

[0021] Memory; and

[0022] One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the login authentication method described in any one of the first aspect or the second aspect.

[0023] In a fifth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the login authentication method described in any one of the first aspect or the second aspect.

[0024] The embodiment of the present application uses near-field communication technology to enable the first terminal and the second terminal to transmit a login authentication code. Near-field communication requires that the two terminals are relatively close. In this case, the account user is more likely to operate the two terminals to log in to the same application, and the security of the login authentication is higher, thereby improving the security of the login authentication. Moreover, the server can perform login authentication based on the verification code transmitted by the second terminal, without the need to re-enter the account password on the first terminal, thereby simplifying the login operation of multiple terminals. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0026] Figure 1 This is a scenario diagram of a login authentication system provided in an embodiment of the present application;

[0027] Figure 2 It is a flowchart of an embodiment of a login authentication method applied to a server provided in an embodiment of the present application;

[0028] Figure 3 It is a schematic diagram of an embodiment of a login authentication method applied to a first terminal provided in an embodiment of the present application;

[0029] Figure 4 This is a flow chart of an embodiment of a login authentication method applied to a login authentication system provided in an embodiment of the present application.

[0030] Figure 5 It is a schematic diagram of the structure of an embodiment of a login authentication device on the server side provided in an embodiment of the present application;

[0031] Figure 6 It is a schematic diagram of the structure of an embodiment of a login authentication device for a client provided in an embodiment of the present application;

[0032] Figure 7It is a schematic diagram of the structure of an embodiment of a computer device provided in the embodiments of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0034] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside" and the like indicate positions or positional relationships based on the positions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the said features. In the description of the present application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.

[0035] In this application, the word "exemplary" is used to mean "used as an example, illustration, or description." Any embodiment described in this application as "exemplary" is not necessarily to be construed as being preferred or advantageous over other embodiments. The following description is given to enable any technician in the field to implement and use the present application. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present application can be implemented without using these specific details. In other instances, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0036] It should be noted that since the method of the embodiment of the present application is executed in a computer device, the processing objects of each computer device exist in the form of data or information. For example, time is actually time information. It can be understood that if size, quantity, position, etc. are mentioned in subsequent embodiments, they are all corresponding data for processing by the electronic device. The details will not be repeated here.

[0037] The embodiments of the present application provide a login authentication method, a computer device, and a storage medium, which are described in detail below.

[0038] See also Figure 1 , Figure 1 A scenario diagram of a login authentication system provided in an embodiment of the present application, the login authentication system may include a first terminal 101, a second terminal 102 and a server 103, the first terminal 101 and the second terminal 102 are integrated with a client's login authentication device, the first terminal 101 and the second terminal 102 both have a near field communication function, and the server 103 is integrated with a server's login authentication device.

[0039] In the embodiment of the present application, the first terminal 101 is mainly used to send a login authentication request to the server 103, so that the server 103 generates a login authentication code according to the login authentication request and sends the login authentication code to the first terminal 101, wherein the login authentication request is used to request to log in to the target application at the first terminal 101;

[0040] If a login authentication code is received from the server 103, the login authentication code is sent to the second terminal 102 via the near field communication function, so that the second terminal 102 can send the login authentication code to the server 103. The server 103 performs login authentication based on the login authentication code received from the second terminal 102, and after the login is successful, authorizes the first terminal to log in to the target application.

[0041] In the embodiment of the present application, the second terminal 102 is mainly used to transmit the login authentication code to the server 103 if a login authentication code is received from the second terminal through the near field communication function, so that the server 103 can perform login authentication on the first terminal 101 according to the login authentication code received from the second terminal 102.

[0042] The first terminal 101 and the second terminal 102 used in the embodiments of the present application both have a near field communication function, and can be a device including both receiving and transmitting hardware, that is, a device having receiving and transmitting hardware capable of performing two-way communication on a two-way communication link. Such a device may include: a cellular or other communication device having a single-line display or a multi-line display or a cellular or other communication device without a multi-line display. The first terminal 101 and the second terminal 102 can specifically be a desktop terminal or a mobile terminal, and the first terminal 101 and the second terminal 102 can specifically be one of a mobile phone, a tablet computer, a laptop computer, etc.

[0043] In the embodiment of the present application, the computer device 103 is mainly used to generate a login authentication code according to the login authentication request when monitoring the login authentication request sent by the first terminal 101, wherein the login authentication request is used to request to log in to the target application at the first terminal 101;

[0044] Sending the login authentication code to the first terminal 101, so that the first terminal sends the login authentication code to the second terminal 102 through the near field communication function, and the second terminal 102 transmits the login authentication code to the server 103;

[0045] If a login authentication code is received from the second terminal 102, login authentication is performed on the first terminal 101 according to the login authentication code received from the second terminal 102;

[0046] If the login authentication is successful, the first terminal 101 is authorized to log in to the target application.

[0047] In the embodiment of the present application, the server 103 may be an independent server, or a server network or server cluster composed of servers. For example, the server 100 described in the embodiment of the present application includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of a plurality of servers. The cloud server is composed of a large number of computers or network servers based on cloud computing.

[0048] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 As shown in the figure, it can be understood that the login authentication system may also include one or more other services, which are not limited here.

[0049] It should be noted that Figure 1 The scenario diagram of the login authentication system shown is only an example. The login authentication system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. Ordinary technicians in this field can know that with the evolution of the login authentication system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is also applicable to similar technical problems.

[0050] First, a login authentication method is provided in an embodiment of the present application. The execution subject of the login authentication method is a login authentication device on the server side. The login authentication device on the server side is applied to the server 103. The server 103 is respectively connected to the first terminal 101 and the second terminal 102 for communication. The first terminal 101 is a terminal that has not logged in to the target application, and the second terminal 102 is a terminal that has logged in to the target application. The first terminal 101 and the second terminal 102 have a near field communication function. The login authentication method includes:

[0051] If a login authentication request sent by the first terminal 101 is monitored, a login authentication code is generated according to the login authentication request, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0052] Sending the login authentication code to the first terminal 101, so that the first terminal 101 sends the login authentication code to the second terminal 102 through the near field communication function, and the second terminal 102 transmits the login authentication code to the server 103;

[0053] If a login authentication code is received from the second terminal 102, login authentication is performed on the first terminal according to the login authentication code received from the second terminal;

[0054] If the login authentication is successful, the first terminal 101 is authorized to log in to the target application.

[0055] The embodiment of the present application uses near field communication technology to make login authentication more secure, and there is no need to re-enter the account password on the first terminal, thereby simplifying the login operation of multiple terminals.

[0056] like Figure 2 As shown, it is a flowchart of an embodiment of a login authentication method in an embodiment of the present application, and the login authentication method includes:

[0057] Step 201: if a login authentication request sent by a first terminal is monitored, a login authentication code is generated according to the login authentication request.

[0058] The login authentication request is used to request to log in to the target application at the first terminal, the first terminal is a terminal that has not logged in to the target application, and the second terminal is a terminal that has logged in to the target application.

[0059] For example, the first terminal is a tablet, and the second terminal is a mobile phone. The user has logged into an application (app) on the mobile phone. The user can enter the account number on the tablet and click to log in. The tablet generates a login authentication request based on the entered account number and sends it to the server.

[0060] The login authentication request may include a login account. In some embodiments, the server may generate an identifier of the login account and use the identifier as a login authentication code. In other embodiments, generating a login authentication code according to the login authentication request may include:

[0061] Obtaining a time factor, a public key, and a login ticket corresponding to the login account;

[0062] Calculate the time factor, the public key, and the hash string of the login ticket corresponding to the login account;

[0063] A login authentication code is determined according to the hash character string.

[0064] For example, the hash string can be used as a login authentication code, or other relevant information can be added according to actual needs.

[0065] The embodiment of the present application performs a hash operation on the login ticket. Hash is a method of converting a target text into an irreversible hash string (or message digest) of the same length. Therefore, the hash operation can ensure the security of the account during subsequent login authentication code interactions, and a time factor is also added during the hash operation process. On the one hand, it is convenient to distinguish each login authentication request by time, and on the other hand, it is also helpful to trace the login authentication time.

[0066] In some embodiments, the login authentication code has a preset start mark and end mark. For example, 0# is the start mark of the login authentication code, and 0# is also the start mark of the login authentication code. This facilitates the subsequent computer device to accurately identify and parse the hash string after receiving the hash string.

[0067] In some embodiments, the validity period of the login authentication code may also be set to further improve the security of account authentication.

[0068] In some embodiments, after the login authentication code is generated, a corresponding relationship may be established among the login authentication code, the account number input by the user, and the login ticket and stored to facilitate subsequent search for the account number and the login ticket.

[0069] Step 202: Send the login authentication code to the first terminal.

[0070] After receiving the login authentication code, the first terminal sends the login authentication code to the second terminal through the near field communication function, and the second terminal transmits the login authentication code to the server.

[0071] In some embodiments, sending the login authentication code to the second terminal through a near field communication function includes:

[0072] The user is prompted to bring the first terminal and the second terminal closer together, and if it is determined that the second terminal is in a near field communication sensing area, the login authentication code is sent to the second terminal through a near field communication function.

[0073] For example, the tablet as the first terminal, after receiving the hash string, prompts the user to bring the tablet close to the mobile phone, and sends the authentication code to the mobile phone through Near Field Communication (NFC). The mobile phone sends the received hash string to the server.

[0074] Near Field Communication (NFC) is an emerging technology that allows devices (such as mobile phones) using NFC technology to exchange data when they are close to each other. It is an integration of contactless radio frequency identification (RFID) and interconnection technology. By integrating the functions of inductive card readers, inductive cards and point-to-point communication on a single chip, mobile terminals can be used to realize mobile payment, electronic ticketing, access control, mobile identity recognition, anti-counterfeiting and other applications. Near field communication includes a set of communication protocols to achieve short-range communication between computer devices.

[0075] Step 203: If a login authentication code is received from the second terminal, login authentication is performed on the first terminal according to the login authentication code received from the second terminal.

[0076] Specifically, if the login authentication code is within the validity period, the corresponding login account is found according to the login authentication code; if the corresponding login account has the authority to log in to the target application program on the first terminal, it is determined that the login authentication is passed.

[0077] Specifically, based on the established correspondence between the login authentication code, the account number input by the user and the login ticket, the account number corresponding to the login authentication code received by the server can be searched.

[0078] Step 204: If the login authentication is successful, the first terminal is authorized to log in to the target application.

[0079] After determining that the login authentication is passed, the server sends a message of the login authentication being passed to the first terminal, and the first terminal generates session information of the login account through the login ticket, so that the first terminal logs in successfully.

[0080] An embodiment of the present application also provides a login authentication method, the execution subject of the login authentication method is a login authentication device of a client, the login authentication device of the client is applied to a first terminal, the first terminal is communicatively connected to a server, the server is communicatively connected to a second terminal, the first terminal is a terminal that has not logged in to a target application, the second terminal is a terminal that has logged in to a target application, and the first terminal and the second terminal have a near field communication function.

[0081] Please refer to Figure 3 As shown, the login authentication method applied to the first terminal in the embodiment of the present application includes:

[0082] Step 301: Send a login authentication request to the server.

[0083] After receiving the login authentication request, the server may generate a login authentication code according to the login authentication request and send the login authentication code to the first terminal, wherein the login authentication request is used to request to log in to the target application at the first terminal.

[0084] Step 302: If a login authentication code is received from the server, the login authentication code is sent to the second terminal via the near field communication function.

[0085] The second terminal sends the login authentication code to the server, and the server performs login authentication according to the login authentication code received from the second terminal, and after the login is successful, authorizes the first terminal to log in to the target application.

[0086] The login authentication code received from the server includes:

[0087] If the starting character string in the character string received from the server is identical to the start mark, and the ending character string of the character string is identical to the end mark, then the character string is determined to be the login authentication code received from the server.

[0088] Sending the login authentication code to the second terminal through the near field communication function includes:

[0089] The user is prompted to bring the first terminal and the second terminal closer together, and if the second terminal is determined to be in the near field communication sensing area, the login authentication code is sent to the second terminal through the near field communication function. In this embodiment, the user is prompted to facilitate near field communication sensing between the first terminal and the second terminal.

[0090] The remaining details of this embodiment are substantially the same as steps 201 to 204 and are not described again here.

[0091] An embodiment of the present application also provides a login authentication system, which includes: a server, a first terminal, and a second terminal, wherein the server is communicatively connected to the first terminal and the second terminal respectively, the first terminal is a terminal that has not logged in to a target application, the second terminal is a terminal that has logged in to a target application, and the first terminal and the second terminal have a near field communication function.

[0092] The login authentication method applied to the login authentication system can refer to Figure 4 As shown, including:

[0093] Step 401: The first terminal sends a login authentication request to a server.

[0094] The login authentication request is used to request to log in to the target application at the first terminal.

[0095] If the server monitors a login authentication request, step 402 is executed.

[0096] Step 402: The server generates a login authentication code according to the login authentication request.

[0097] Step 403: The server sends the login authentication code to the first terminal.

[0098] After the first terminal receives the login authentication code, step 404 is executed.

[0099] Step 404: The first terminal sends the login authentication code to the second terminal via the near field communication function.

[0100] After the second terminal receives the login authentication code through the near field communication function, step 405 is executed.

[0101] Step 405: The second terminal sends the login authentication code to the server.

[0102] After the server receives the login authentication code from the second terminal, step 406 is executed.

[0103] Step 406: The server performs login authentication on the first terminal according to the login authentication code received from the second terminal. If the login authentication is successful, the first terminal is authorized to log in to the target application.

[0104] The embodiment of the present application uses near-field communication technology to enable the first terminal and the second terminal to transmit a login authentication code. Near-field communication requires that the two terminals are relatively close. In this case, the account user is more likely to operate the two terminals to log in to the same application, and the security of the login authentication is higher, thereby improving the security of the login authentication. Moreover, the server can perform login authentication based on the verification code transmitted by the second terminal, without the need to re-enter the account password on the first terminal, thereby simplifying the login operation of multiple terminals.

[0105] refer to Figure 5 As shown, the embodiment of the present application also provides a login authentication device applied to a server, the login authentication device of the server is integrated in a server, the server is respectively connected to a first terminal and a second terminal for communication, the first terminal is a terminal that has not logged in to a target application, the second terminal is a terminal that has logged in to a target application, the first terminal and the second terminal have a near field communication function, and the login authentication method includes:

[0106] The authentication code generation module 501 is used to generate a login authentication code according to the login authentication request if a login authentication request sent by the first terminal is monitored, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0107] The authentication code sending module 502 is used to send the login authentication code to the first terminal, so that the first terminal sends the login authentication code to the second terminal through the near field communication function, and the second terminal transmits the login authentication code to the server;

[0108] A login authentication module 503, configured to perform login authentication on the first terminal according to the login authentication code received from the second terminal if a login authentication code is received from the second terminal;

[0109] The login authorization module 504 is used to authorize the first terminal to log in to the target application if the login authentication is successful.

[0110] In some embodiments, the login authentication code has a preset start mark and an end mark; the login authentication code is received from the second terminal in the login authentication module 503, including: if the starting character string in the character string received from the second terminal is the same as the start mark, and the ending character string of the character string is the same as the end mark, then it is determined that the character string is the login authentication code received from the second terminal.

[0111] In some embodiments, the login authentication request includes: a login account; the authentication code generation module 501 generates a login authentication code according to the login authentication request, including: obtaining a time factor, a public key, and a login ticket corresponding to the login account; calculating a hash string of the time factor, the public key, and the login ticket corresponding to the login account; and determining the login authentication code according to the hash string.

[0112] In some embodiments, the login authentication code has a validity period, and the login authentication module 503 performs login authentication on the first terminal according to the login authentication code received from the second terminal, including: if the login authentication code is within the validity period, finding the corresponding login account according to the login authentication code; if the corresponding login account has the authority to log in to the target application at the first terminal, then determining that the login authentication is passed.

[0113] refer to Figure 6 As shown, the embodiment of the present application also provides a login authentication device applied to a client, the login authentication device is integrated in a first terminal, the first terminal is communicatively connected to a server, the server is communicatively connected to a second terminal, the first terminal is a terminal that has not logged in to a target application, the second terminal is a terminal that has logged in to a target application, the first terminal and the second terminal have a near field communication function, and the login authentication device includes:

[0114] A request sending module 601 is used to send a login authentication request to the server, so that the server generates a login authentication code according to the login authentication request and sends the login authentication code to the first terminal, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0115] The authentication code receiving module 602 is used to send the login authentication code to the second terminal through the near field communication function if a login authentication code is received from the server, so that the second terminal can send the login authentication code to the server. The server performs login authentication according to the login authentication code received from the second terminal, and after the login is successful, authorizes the first terminal to log in to the target application.

[0116] In some embodiments, the login authentication code has a preset start mark and end mark; the authentication code receiving module 602 receives the login authentication code from the server, including: if the starting string in the string received from the server is the same as the start mark, and the ending string of the string is the same as the end mark, then determine that the string is the login authentication code received from the server.

[0117] In some embodiments, the authentication code receiving module 602 sends the login authentication code to the second terminal through the near field communication function, including: prompting the user to bring the first terminal and the second terminal closer together, and if it is determined that the second terminal is in the near field communication sensing area, sending the login authentication code to the second terminal through the near field communication function.

[0118] The embodiment of the present application further provides a computer device, which integrates any one of the login authentication devices provided in the embodiment of the present application, and the computer device includes:

[0119] one or more processors;

[0120] Memory; and

[0121] One or more applications, wherein the one or more applications are stored in the memory and are configured so that the processor executes the steps of the login authentication method described in any of the above login authentication method embodiments.

[0122] The present application also provides a computer device that integrates any of the login authentication devices provided in the present application. Figure 7 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:

[0123] The computer device may include one or more processing core processors 701, one or more computer readable storage media memories 702, a power supply 703, an input unit 704 and other components. Those skilled in the art will appreciate that Figure 7 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0124] The processor 701 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 702 and calling data stored in the memory 702, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701.

[0125] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.

[0126] The computer device also includes a power supply 703 for supplying power to various components. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 703 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.

[0127] The computer device may further include an input unit 704, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0128] Although not shown, the computer device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 701 in the computer device will load the executable files corresponding to the processes of one or more application programs into the memory 702 according to the following instructions, and the processor 701 will run the application programs stored in the memory 702, thereby realizing various functions, as follows:

[0129] If a login authentication request sent by the first terminal is monitored, a login authentication code is generated according to the login authentication request, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0130] Sending the login authentication code to the first terminal, so that the first terminal sends the login authentication code to the second terminal through a near field communication function, and the second terminal transmits the login authentication code to the server;

[0131] If a login authentication code is received from the second terminal, performing login authentication on the first terminal according to the login authentication code received from the second terminal;

[0132] If the login authentication is successful, the first terminal is authorized to log in to the target application.

[0133] Or, implement the following functionality:

[0134] Sending a login authentication request to the server, so that the server generates a login authentication code according to the login authentication request, and sends the login authentication code to the first terminal, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0135] If a login authentication code is received from the server, the login authentication code is sent to the second terminal via the near field communication function, so that the second terminal can send the login authentication code to the server. The server performs login authentication based on the login authentication code received from the second terminal, and after successful login, authorizes the first terminal to log in to the target application.

[0136] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0137] To this end, the embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any login authentication method provided in the embodiment of the present application. For example, the computer program can be loaded by a processor to execute the following steps:

[0138] If a login authentication request sent by the first terminal is monitored, a login authentication code is generated according to the login authentication request, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0139] Sending the login authentication code to the first terminal, so that the first terminal sends the login authentication code to the second terminal through a near field communication function, and the second terminal transmits the login authentication code to the server;

[0140] If a login authentication code is received from the second terminal, performing login authentication on the first terminal according to the login authentication code received from the second terminal;

[0141] If the login authentication is successful, the first terminal is authorized to log in to the target application.

[0142] Alternatively, implement the following steps:

[0143] Sending a login authentication request to the server, so that the server generates a login authentication code according to the login authentication request, and sends the login authentication code to the first terminal, wherein the login authentication request is used to request to log in to the target application at the first terminal;

[0144] If a login authentication code is received from the server, the login authentication code is sent to the second terminal via the near field communication function, so that the second terminal can send the login authentication code to the server. The server performs login authentication based on the login authentication code received from the second terminal, and after successful login, authorizes the first terminal to log in to the target application.

[0145] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.

[0146] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.

[0147] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0148] The above is a detailed introduction to a login authentication method, a computer device and a storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A login authentication method, characterized in that: Applied to a server, the server is respectively connected to a first terminal and a second terminal for communication, the first terminal is a terminal that is not logged into a target application, the second terminal is a terminal that is logged into a target application, the first terminal and the second terminal have a near field communication function, and the login authentication method includes: If a login authentication request sent by the first terminal is monitored, a login ticket corresponding to the time factor, the public key, and the login account is obtained, a hash string of the time factor, the public key, and the login ticket corresponding to the login account is calculated, and a login authentication code is determined according to the hash string, wherein the login authentication request is used to request to log in to the target application at the first terminal, and the login authentication request includes: the login account, and the login authentication code has a preset start mark and an end mark; Sending the login authentication code to the first terminal, so that the first terminal sends the login authentication code to the second terminal through a near field communication function, and the second terminal transmits the login authentication code to the server; If a login authentication code is received from the second terminal, login authentication is performed on the first terminal according to the login authentication code received from the second terminal, wherein the process by which the server determines that the login authentication code is received from the second terminal includes: if a starting character string in a character string received from the second terminal is the same as the start mark, and an ending character string of the character string is the same as the end mark, determining that the character string is the login authentication code received from the second terminal; If the login authentication is successful, the first terminal is authorized to log in to the target application.

2. The login authentication method according to claim 1, characterized in that: The login authentication code has a validity period, and performing login authentication on the first terminal according to the login authentication code received from the second terminal includes: If the login authentication code is within the validity period, find out the corresponding login account according to the login authentication code; If the corresponding login account has the authority to log in to the target application on the first terminal, it is determined that the login authentication is successful.

3. A login authentication method, characterized in that: Applied to a first terminal, the first terminal is connected to a server for communication, the server is connected to a second terminal for communication, the first terminal is a terminal that is not logged into a target application, the second terminal is a terminal that is logged into the target application, the first terminal and the second terminal have a near field communication function, The login authentication method comprises: Sending a login authentication request to the server so that the server can obtain a login ticket corresponding to a time factor, a public key, and a login account, calculating a hash string of the time factor, the public key, and the login ticket corresponding to the login account, determining a login authentication code according to the hash string, and sending the login authentication code to the first terminal, wherein the login authentication request is used to request to log in to the target application at the first terminal, and the login authentication request includes: a login account, and the login authentication code has a preset start flag and an end flag; If a login authentication code is received from the server, the login authentication code is sent to the second terminal through the near field communication function, so that the second terminal can send the login authentication code to the server, and the server performs login authentication according to the login authentication code received from the second terminal, and after the login is successful, authorizes the first terminal to log in to the target application, wherein the process by which the server determines that the login authentication code is received from the second terminal includes: if the starting character string in the character string received from the second terminal is the same as the start mark, and the ending character string of the character string is the same as the end mark, then the character string is determined to be the login authentication code received from the second terminal.

4. The login authentication method according to claim 3, characterized in that: The first terminal receives a login authentication code from the server, including: If the starting character string in the character string received from the server is the same as the starting mark, and the ending character string of the character string is the same as the ending mark, then the character string is determined to be the login authentication code received from the server.

5. The login authentication method according to claim 4, characterized in that: The sending the login authentication code to the second terminal through the near field communication function includes: The user is prompted to bring the first terminal and the second terminal closer together, and if it is determined that the second terminal is in a near field communication sensing area, the login authentication code is sent to the second terminal through a near field communication function.

6. A login authentication method, characterized in that: Applied to a login authentication system, the login authentication system includes: a server, a first terminal and a second terminal, the server is respectively connected to the first terminal and the second terminal for communication, the first terminal is a terminal that has not logged in to a target application, the second terminal is a terminal that has logged in to a target application, the first terminal and the second terminal have a near field communication function, and the login authentication method includes: The first terminal sends a login authentication request to the server, the login authentication request is used to request to log in to the target application at the first terminal, and the login authentication request includes: a login account; If the server monitors the login authentication request, it obtains the time factor, the public key, and the login ticket corresponding to the login account, calculates the hash string of the time factor, the public key, and the login ticket corresponding to the login account, determines the login authentication code according to the hash string, and sends the login authentication code to the first terminal, where the login authentication code has a preset start mark and an end mark; After receiving the login authentication code, the first terminal sends the login authentication code to the second terminal through a near field communication function; After receiving the login authentication code through the near field communication function, the second terminal sends the login authentication code to the server; After receiving the login authentication code from the second terminal, the server performs login authentication according to the login authentication code. If the login authentication is successful, the first terminal is authorized to log in to the target application. The process by which the server determines that the login authentication code is received from the second terminal includes: if a starting character string in the character string received from the second terminal is the same as the start mark, and an ending character string of the character string is the same as the end mark, then determining that the character string is the login authentication code received from the second terminal.

7. A computer device, characterized in that: The computer device comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and are configured to be executed by the processor to implement the login authentication method described in any one of claims 1 to 2, or to implement the login authentication method described in any one of claims 3 to 5.

8. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the login authentication method described in any one of claims 1 to 2, or to implement the steps in the login authentication method described in any one of claims 3 to 5.

Citation Information

Patent Citations

  • Network identity protection method and device, electronic equipment and storage medium

    CN111353903A

  • Authentication login method, device and system, equipment and storage medium

    CN112118238A