Identity authentication method and device, computer equipment, and computer-readable storage medium

Through the browser using the second application to generate encryption results and decrypt login, the problem of single sign-on dependent on communication connection quality is solved, and fast and secure identity authentication is achieved.

CN114745167BActive Publication Date: 2025-01-07DAWNING INT INFORMATION IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210345958.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-02
Publication Date
2025-01-07
Estimated Expiration
2042-04-02

AI Technical Summary

Technical Problem

In the prior art, the single sign-on method relies on the quality of communication connection between the electronic device and the authentication server, resulting in the identity authentication process being slow or failing when the communication connection is poor, and cannot meet the increasingly high identity authentication time requirements.

Method used

Send encrypted identity authentication information to the application through the browser, generate encryption results using the second application, and decrypt the encryption key to log in to the first application, avoid relying on the authentication server to communicate, and simplify the identity authentication process.

Benefits of technology

Shorten the identity authentication time, improve the identity authentication efficiency and security, and avoid identity authentication failure caused by communication connection problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114745167B_ABST
    Figure CN114745167B_ABST
Patent Text Reader

Abstract

The present application relates to an identity authentication method and apparatus, a computer device, and a computer-readable storage medium, which are applied to a computer device, and a browser is installed on the computer device. The identity authentication method includes: first, sending a first access request to a first application through a browser; wherein the first access request carries an encryption result generated by encrypting target identity authentication information by a second application based on an encryption key; the target identity authentication information is the identity authentication information logged in to the second application through a browser. Secondly, receiving the decryption result returned by the first application; the decryption result is obtained by the first application successfully decrypting the encryption result using a decryption key corresponding to the encryption key. Finally, logging in to the first application through a browser based on the decryption result. In this way, the time for identity authentication is shortened and the efficiency of identity authentication is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to an identity authentication method and apparatus, a computer device, and a computer-readable storage medium. Background Art

[0002] With the rapid development of Internet technology, a variety of web applications and applications for mobile terminals have emerged. When users log in to any application, they need to perform identity authentication. Only after the identity authentication is passed can they log in to the application. The operation is very cumbersome and extremely inconvenient.

[0003] Traditionally, the single sign-on method allows users to log into multiple applications at the same time after a single identity authentication. However, the single sign-on method relies on the communication connection between the electronic device and the authentication server to transmit the authentication information, thereby enabling simultaneous login to multiple applications. Therefore, if the quality of the communication connection between the electronic device and the authentication server is poor or the communication connection is interrupted, the entire authentication process will be slow or even impossible. Obviously, this cannot meet people's increasingly high requirements for authentication time. Summary of the invention

[0004] The embodiments of the present application provide an identity authentication method and apparatus, a computer device, and a computer-readable storage medium, which can shorten the time for identity authentication.

[0005] In one aspect, an identity authentication method is provided, which is applied to a computer device, wherein a browser is installed on the computer device, and the method comprises:

[0006] Sending a first access request to the first application through the browser; the first access request carries an encryption result generated by the second application encrypting the target identity authentication information based on the encryption key; the target identity authentication information is the identity authentication information for logging into the second application through the browser;

[0007] receiving a decryption result returned by the first application; the decryption result is obtained by the first application successfully decrypting the encryption result using a decryption key corresponding to the encryption key;

[0008] Log in to the first application through the browser based on the decryption result.

[0009] In the embodiment of the present application, the target identity authentication information for logging into the second application can be used to log into the first application, and in this process, there is no need to rely on the authentication server, which can avoid the problem that the entire identity authentication process will be slow or even unable to perform identity authentication due to the poor quality of the communication connection between the computer device and the authentication server or the interruption of the communication connection. At the same time, the user does not need to enter the identity authentication information in the first application, thereby shortening the time of identity authentication and improving the efficiency of identity authentication.

[0010] In one embodiment, the method further comprises:

[0011] Sending a second access request to the second application through the browser; the second access request carries target identity authentication information;

[0012] After logging into the second application based on the target identity authentication information, the encryption result is obtained from the second application through the browser.

[0013] In an embodiment of the present application, before the computer device sends the first access request to the first application through the browser, it sends the second access request to the second application through the browser. After logging in to the second application based on the target identity authentication information, the second application encrypts the target identity authentication information based on the encryption key to generate an encryption result, and then obtains the encryption result from the second application through the browser. At this time, the computer device can send the first access request to the first application through the browser; the first access request carries the encryption result generated by the second application encrypting the target identity authentication information based on the encryption key. In this way, you can log in to the first application with the help of the target identity authentication information logged in to the second application, thereby shortening the time of identity authentication and improving the efficiency of identity authentication.

[0014] In one embodiment, obtaining the encryption result from the second application through the browser includes:

[0015] Sending an encryption result request instruction to the second application through the browser, wherein the encryption result request instruction is used to instruct the second application to send the encryption result to the browser;

[0016] Receive the encryption result returned by the second application.

[0017] In the embodiment of the present application, based on the method of sending an encryption result request instruction to the second application through the browser, the encryption result can be obtained from the second application more quickly, thereby shortening the time to log in to the first application and improving the efficiency of identity authentication.

[0018] In one of the embodiments, the decryption result is that the first application obtains an initial decryption key and decryption key calculation information from a configuration file of the first application; calculates the decryption key based on the initial decryption key and the decryption key calculation information; and decrypts the encryption result using the decryption key to generate the target identity authentication information.

[0019] In the embodiment of the present application, the decryption key is recalculated based on the initial decryption key, the current time in the first application, and the first preset time step. Then, the encryption result is decrypted by the decryption key. As long as any decryption key can successfully decrypt, the target identity authentication information can be generated. Here, the decryption is not directly performed based on the initial decryption key, but the decryption key is recalculated based on the initial decryption key combined with the current time in the first application and the first preset time step. And the current time in the first application changes in real time, therefore, the difficulty of decryption is increased and the security of identity authentication is improved.

[0020] In one of the embodiments, the encryption result is that the second application obtains an initial encryption key and encryption key calculation information from a configuration file of the second application; the initial encryption key corresponds to the initial decryption key; the encryption key is calculated based on the initial encryption key and the encryption key calculation information; and the target identity authentication information is encrypting by the encryption key to generate an encryption result.

[0021] In the embodiment of the present application, the encryption key is recalculated based on the initial encryption key, the current time in the second application, and the second preset time step. Here, encryption is not performed directly based on the initial encryption key, but the encryption key is recalculated based on the initial encryption key combined with the current time in the second application and the second preset time step. And the current time in the second application changes in real time, therefore, the difficulty of encryption is increased and the security of identity authentication is improved.

[0022] On the other hand, an identity authentication method is provided, which is applied to a first server, where a first application is running, and the method includes:

[0023] Receive a first access request sent by a browser; the first access request carries an encryption result generated by encrypting target identity authentication information by a second application based on an encryption key; the target identity authentication information is identity authentication information for logging into the second application through the browser;

[0024] In response to the first access request, successfully decrypting the encryption result based on a decryption key to generate a decryption result;

[0025] The decryption result is sent to the browser, so that the browser logs in to the first application based on the decryption result.

[0026] In the embodiment of the present application, the target identity authentication information for logging into the second application can be used to log into the first application, and in this process, there is no need to rely on the authentication server, thus avoiding the problem that the entire identity authentication process is slow or even unable to perform identity authentication due to the poor quality of the communication connection between the computer device and the authentication server or the interruption of the communication connection. At the same time, the user does not need to enter the identity authentication information in the first application, which shortens the time of identity authentication and improves the efficiency of identity authentication.

[0027] In one embodiment, the successfully decrypting the encryption result based on the decryption key to generate the decryption result includes:

[0028] Obtaining an initial decryption key and decryption key calculation information from a configuration file of the first application;

[0029] Calculating the decryption key based on the initial decryption key and the decryption key calculation information;

[0030] The encryption result is successfully decrypted using the decryption key to generate the decrypted result.

[0031] In the embodiment of the present application, decryption is not performed directly based on the initial decryption key, but the decryption key is recalculated based on the initial decryption key combined with the current time in the first application and the first preset time step. And the current time in the first application changes in real time, thus increasing the difficulty of decryption and improving the security of identity authentication.

[0032] In one of the embodiments, the decryption key calculation information includes the current time and a first preset time step in the first application;

[0033] The calculating the decryption key based on the initial decryption key and the decryption key calculation information includes:

[0034] Calculate the decryption key to be spliced ​​according to the current time and the first preset time step;

[0035] The decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate the decryption key.

[0036] In one embodiment, the first preset time step includes a second preset time step and a time step adjacent to the second preset time step; the decryption key to be spliced ​​includes a first decryption key to be spliced ​​and a second decryption key to be spliced; and the calculating the decryption key to be spliced ​​according to the current time and the first preset time step includes:

[0037] Calculate a first integer divisibility result between the current time and the second preset time step, and use the first integer divisibility result as the first to-be-joined decryption key;

[0038] Calculate a second integer division result between the current time and a time step adjacent to the second preset time step, and use the second integer division result as the second decryption key to be spliced.

[0039] In the embodiment of the present application, in order to improve the timeliness of the encryption result, the second preset time step in the above encryption process can be relaxed by taking into account factors such as network access speed and asynchrony of timestamps in the first application and the second application. Further, in order to improve the timeliness of the encryption result, in the process of decryption, a time step adjacent to the second preset time step can be added on the basis of the second preset time step. In this way, decryption is performed based on multiple time steps, which improves the timeliness of the encryption result and thus increases the probability of successful decryption.

[0040] In one embodiment, the step of concatenating the decryption key to be concatenated with the initial decryption key to generate the decryption key includes:

[0041] Concatenate the first decryption key to be concatenated with the initial decryption key to generate a first decryption key;

[0042] The second decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate a second decryption key.

[0043] In one embodiment, the successfully decrypting the encryption result by using the decryption key to generate the decryption result includes:

[0044] Decrypting the encryption result using the first decryption key and the second decryption key respectively;

[0045] If the encryption result is successfully decrypted using the first decryption key, the decryption result is generated;

[0046] If the encryption result is successfully decrypted using the second decryption key, the decryption result is generated.

[0047] In the embodiment of the present application, decryption is performed based on multiple time steps to obtain multiple decryption results. It only requires any one decryption key to be able to successfully decrypt, thereby increasing the probability of successful decryption.

[0048] On the other hand, an identity authentication method is provided, which is applied to a second server, where a second application is running, and the method includes:

[0049] Receiving a second access request sent by the browser; the second access request carries target identity authentication information;

[0050] In response to the second access request, logging into the second application based on the target identity authentication information;

[0051] The target identity authentication information is encrypted based on an encryption key to generate an encryption result, and the encryption result is sent to the browser; the encryption result is used to send the encryption result to the first application through the first access request when the browser sends a first access request to the first application, so that the first application can successfully decrypt the encryption result based on the decryption key, generate a decryption result, and enable the browser to log in to the first application based on the decryption result.

[0052] In the embodiment of the present application, after successfully logging into the second application, the user can directly log into the first application without re-entering the identity authentication information, thereby shortening the time for identity authentication and improving the efficiency of identity authentication.

[0053] In one of the embodiments, encrypting the target identity authentication information based on the encryption key to generate an encryption result includes:

[0054] Obtaining an initial encryption key and encryption key calculation information from a configuration file of the second application; the initial encryption key corresponds to an initial decryption key;

[0055] Calculating the encryption key based on the initial encryption key and the encryption key calculation information;

[0056] The target identity authentication information is encrypted using the encryption key to generate the encryption result.

[0057] In one embodiment, the encryption key calculation information includes the current time and the second preset time step in the second application; and the calculating the encryption key based on the initial encryption key and the encryption key calculation information includes:

[0058] Calculating the encryption key to be spliced ​​according to the current time and the second preset time step;

[0059] The encryption key to be spliced ​​is spliced ​​with the initial encryption key to generate the encryption key.

[0060] On the other hand, an identity authentication device is provided, which is applied to a computer device, wherein a browser is installed on the computer device, and the device comprises:

[0061] A first access request sending module, configured to send a first access request to a first application through the browser; the first access request carries an encryption result generated by the second application encrypting target identity authentication information based on an encryption key; the target identity authentication information is identity authentication information for successfully logging into the second application through the browser;

[0062] a decryption result receiving module, configured to receive a decryption result returned by the first application; the decryption result is obtained by the first application successfully decrypting the encryption result using a decryption key corresponding to the encryption key;

[0063] The first application login module is used to log in to the first application through the browser based on the decryption result.

[0064] On the other hand, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the Bluetooth communication method described above.

[0065] On the other hand, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the Bluetooth communication method described above are implemented.

[0066] The above-mentioned identity authentication method and device, computer equipment, and computer-readable storage medium are applied to a computer equipment, and a browser is installed on the computer equipment. The identity authentication method can log in to the second application based on the target identity authentication information through the browser in advance, and then encrypt the target identity authentication information based on the encryption key through the second application to generate an encryption result. When the user needs to log in to the first application, the browser sends a first access request to the first application, wherein the first access request carries the encryption result. Since the decryption key corresponding to the encryption key is stored in the first application, the encryption result can be decrypted by the first application based on the decryption key to generate a decryption result. Finally, the first application can be logged in based on the decryption result obtained by decryption. In this way, the first application can be logged in with the help of the target identity authentication information logged in to the second application, and in this process, it is not necessary to rely on the authentication server, which can avoid the problem that the entire identity authentication process will be slow or even unable to perform identity authentication due to the poor quality of the communication connection between the computer device and the authentication server or the interruption of the communication connection. In addition, the time of identity authentication is shortened and the efficiency of identity authentication is improved. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0068] Figure 1 is an application environment diagram of an identity authentication method in an embodiment;

[0069] Figure 2 is a flow chart of an identity authentication method in one embodiment;

[0070] Figure 3 A schematic diagram of signaling between logging into the first application B and the second application A through a computer device in one embodiment;

[0071] Figure 4 A schematic diagram of a decryption process in one embodiment;

[0072] Figure 5 is a schematic diagram of an encryption process in one embodiment;

[0073] Figure 6 A flowchart of an identity authentication method in another embodiment;

[0074] Figure 7 A flowchart of an identity authentication method in yet another embodiment;

[0075] Figure 8 is a schematic diagram of an identity authentication method in a specific embodiment;

[0076] Fig. 9 is a structural block diagram of an identity authentication device in an embodiment;

[0077] Fig.10 is a structural block diagram of an identity authentication device in another embodiment;

[0078] Fig.11 A structural block diagram of an identity authentication device in yet another embodiment;

[0079] Fig.12 is a structural block diagram of an identity authentication device in yet another embodiment;

[0080] Fig.13 Schematic diagram of the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0081] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0082] Figure 1 FIG. 1 is an application scenario diagram of an identity authentication method in an embodiment. Figure 1 As shown, the application environment includes a computer device 120 and a first server 140 and a second server 160, and the computer device 120 is connected to the first server 140 and the second server 160 through a network. A browser is installed on the computer device, and the first application runs on the first server 140, and the second application runs on the second server 160. The computer device 120 sends a first access request to the first application through the browser; the first access request carries the encryption result generated by the second application encrypting the target identity authentication information based on the encryption key; the target identity authentication information is the identity authentication information logged in to the second application through the browser; the decryption result returned by the first application is received; the decryption result is obtained by the first application using the decryption key corresponding to the encryption key to decrypt the encryption result; and the browser is used to log in to the first application based on the decryption result. The computer device 120 can be a terminal device, specifically, it can be any terminal device including a desktop computer, a laptop computer, a tablet computer, a PDA (Personal Digital Assistant), a smart car terminal, a smart home, etc.

[0083] Figure 2 FIG. 1 is a flowchart of an identity authentication method in an embodiment. The identity authentication method in the embodiment of the present application is to run on Figure 1 The method includes the following steps 220 to 260, wherein:

[0084] Step 220, sending a first access request to the first application through the browser; the first access request carries the encryption result generated by the second application encrypting the target identity authentication information based on the encryption key; the target identity authentication information is the identity authentication information for logging into the second application through the browser.

[0085] After the user logs in to the second application based on the target identity authentication information through the browser, the target identity authentication information is encrypted by the second application based on the encryption key to generate an encryption result. Then, if the user needs to log in to the first application, the computer device receives the user's operation instruction on the browser, triggering the browser to send a first access request to the first application. The number of the first application here can be one or more, and this application does not limit this.

[0086] Among them, the encryption key can be pre-stored in the storage space of the second application. The encryption key and the decryption key generally appear in pairs. The encryption key here can be a parameter, and the plaintext can be converted into ciphertext through the encryption key. Correspondingly, the ciphertext can be converted into plaintext through the decryption key. The encryption key and the decryption key can be generated in a variety of ways. For example, the encryption key and the decryption key can be generated by using a hash algorithm. Of course, this application does not limit this.

[0087] For each first application, a first access request is sent to the first application through a browser. The first access request carries the encryption result generated by the second application encrypting the target identity authentication information based on the encryption key. Of course, the first access request also carries the web page address corresponding to the first application, for example, the uniform resource locator (URL). The target identity authentication information here is the identity authentication information for logging in to the second application through a browser, including user name, password and other information, or biometric information, such as face information, fingerprint information, voiceprint information, gesture information, etc. This application does not limit this.

[0088] Step 240, receiving the decryption result returned by the first application; the decryption result is obtained by the first application successfully decrypting the encryption result using the decryption key corresponding to the encryption key.

[0089] After the first application receives the first access request, since the first access request carries the webpage address corresponding to the first application, the webpage corresponding to the first application can be accessed based on the webpage address corresponding to the first application.

[0090] The specific process of accessing the web page corresponding to the first application based on the web page address corresponding to the first application includes: first, the user enters the web page address of the first application (for example, the website domain name) in the browser; second, the browser requests the resolution result of the web page address from the local DNS (Domain Name Server); if the resolution result of the web page address is obtained from the local DNS server, the resolution result is directly returned to the browser; third, after receiving the resolution result, the browser sends an access request to the IP address of the web page address based on the IP address of the web page address in the resolution result, thus realizing the process of sending the first access request to the first application. Finally, after receiving the first access request, the server corresponding to the IP address can return the web page data corresponding to the first application to the browser and display it on the browser, thus realizing the access to the web page corresponding to the first application based on the web page address corresponding to the first application.

[0091] Among them, the first access request also carries the encryption result generated by the second application encrypting the target identity authentication information based on the encryption key. Therefore, the first application can also use the decryption key corresponding to the encryption key to decrypt the encryption result. If the decryption is successful, a decryption result is generated and the decryption result is returned to the browser. At this time, the browser can receive the decryption result returned by the first application. Among them, the decryption key is also pre-stored in the storage space of the first application, and the decryption key here is a pair of keys with the encryption key stored in the second application. If the decryption fails, no decryption result will be generated, that is, no decryption result will be returned to the browser.

[0092] Step 260: Log in to the first application through the browser based on the decryption result.

[0093] After the browser receives the decryption result returned by the first application, the computer device can log in to the first application through the browser based on the decryption result. Because only by using the decryption key corresponding to the encryption key can the encryption result be successfully decrypted, and only successful decryption will generate a decryption result, and the decryption key is pre-stored in the first application, the first application can successfully decrypt the encryption result and output the decryption result. Among them, the decryption result includes the target identity authentication information. Of course, the decryption result can also include other information besides the target identity authentication information, which is not limited in this application.

[0094] Then, the first application returns the decryption result to the browser. At this point, the browser can receive the decryption result (including the target identity authentication information) returned by the first application, and then log in to the first application through the browser based on the decryption result. Among them, the first application and the second application share a set of identity authentication information, namely the target identity authentication information. In this way, it is possible to log in to the first application with the help of the target identity authentication information logged in to the second application, without the user having to enter the identity authentication information in the first application, nor relying on the authentication server to perform identity authentication between multiple applications.

[0095] In the embodiment of the present application, the browser can be used to log in to the second application based on the target identity authentication information in advance, and then the target identity authentication information is encrypted by the second application based on the encryption key to generate an encryption result. When the user needs to log in to the first application, the browser sends a first access request to the first application, wherein the first access request carries the encryption result. Since the decryption key corresponding to the encryption key is stored in the first application, the encryption result can be decrypted by the first application based on the decryption key to generate a decryption result, that is, the first application belongs to the trusted application of the second application. Finally, the first application can be logged in based on the decryption result obtained by decryption. In this way, the first application can be logged in with the help of the target identity authentication information logged in to the second application, and in this process, it is not necessary to rely on the authentication server, which can avoid the problem that the entire identity authentication process will be slow or even unable to perform identity authentication due to the poor quality of the communication connection between the computer device and the authentication server or the interruption of the communication connection. At the same time, the user does not need to enter the identity authentication information in the first application, thereby shortening the time of identity authentication and improving the efficiency of identity authentication.

[0096] In one embodiment, an identity authentication method is provided, the method further comprising:

[0097] Sending a second access request to the second application through the browser; the second access request carries the target identity authentication information;

[0098] After logging into the second application based on the target identity authentication information, the encryption result is obtained from the second application through the browser.

[0099] Specifically, if both the first application and the second application are logged in for the first time, before sending the first access request to the first application through the browser, the second access request is sent to the second application through the browser. After logging in to the second application based on the target identity authentication information, the second application encrypts the target identity authentication information based on the encryption key to generate an encryption result. Then, the computer device can obtain the encryption result from the second application through the browser. Among them, the second access request carries the target identity authentication information.

[0100] If the second application has been logged in in advance, the encryption result has been obtained from the second application through the browser in advance. Therefore, when authenticating the first application, there is no need to log in to the second application again, but directly send a first access request to the first application through the browser, and then receive the decryption result returned by the first application. Then, log in to the first application through the browser based on the decryption result.

[0101] The target identity authentication information here is the identity authentication information for logging into the second application through the browser, including information such as user name, password, or biometric information, such as face information, fingerprint information, voiceprint information, gesture information, etc., which is not limited in this application. The computer device sends a second access request to the second application through the browser, which can be specifically sent to the server corresponding to the second application. The second access request carries the target identity authentication information, the website information of the second application, and other information, which is not limited in this application.

[0102] After the server corresponding to the second application authenticates the target identity authentication information, it logs in to the second application. Then, the computer device can obtain the encryption result from the second application through the browser. Among them, the second access request carries the target identity authentication information. Finally, the computer device can obtain the encryption result from the second application through the browser. The encryption result here is the result generated by the second application encrypting the target identity authentication information based on the encryption key.

[0103] In the embodiment of the present application, before the computer device sends the first access request to the first application through the browser, it sends the second access request to the second application through the browser, and after logging into the second application based on the target identity authentication information, the second application encrypts the target identity authentication information based on the encryption key to generate an encryption result. The encryption result is then obtained from the second application through the browser.

[0104] Then, the computer device can send a first access request to the first application through the browser; the first access request carries the encryption result generated by the second application encrypting the target identity authentication information based on the encryption key. In this way, the target identity authentication information logged in to the second application can be used to log in to the first application, shortening the time of identity authentication and improving the efficiency of identity authentication.

[0105] In one embodiment, obtaining the encryption result from the second application through the browser may include:

[0106] Sending an encryption result request instruction to the second application through the browser, where the encryption result request instruction is used to instruct the second application to send the encryption result to the browser;

[0107] Receive the encryption result returned by the second application.

[0108] Specifically, the process of the computer device obtaining the encryption result from the second application through the browser includes: the computer device sends an encryption result request instruction to the second application through the browser, and the second application returns the encryption result to the browser after receiving the encryption result request instruction. The encryption result request instruction is used to instruct the second application to send the encryption result to the browser.

[0109] Combination Figure 3 FIG. 1 is a schematic diagram of a signaling process of logging into a first application B and a second application A through a computer device in one embodiment. A browser is installed on the computer device, and the first application B runs on a server B, and the second application A runs on a server A.

[0110] In the first step, the computer device sends a second access request to the second application A through the browser; the second access request carries the target identity authentication information;

[0111] In the second step, after successfully logging into the second application A, the second application returns a message of successful login to the browser; the second application A encrypts the target identity authentication information based on the encryption key to generate an encryption result;

[0112] Step 3: After receiving the successful login message, the browser sends an encryption result request instruction to the second application A;

[0113] Step 4: After receiving the encryption result request instruction, the second application A returns the encryption result token to the browser;

[0114] Step 5: The browser sends a first access request to the first application B; the first access request carries the encryption result;

[0115] Step 6: The first application B successfully decrypts the encryption result using the decryption key corresponding to the encryption key to generate a decryption result; and sends the decryption result to the browser;

[0116] Step 7: The browser logs in to the first application B based on the decryption result.

[0117] In the embodiment of the present application, based on the method of sending an encryption result request instruction to the second application through the browser, the encryption result can be obtained from the second application more quickly, thereby shortening the time to log in to the first application and improving the efficiency of identity authentication.

[0118] In one embodiment, the decryption result is that the first application obtains the initial decryption key and decryption key calculation information from the configuration file of the first application; calculates the decryption key based on the initial decryption key and the decryption key calculation information; and decrypts the encryption result using the decryption key to generate the target identity authentication information.

[0119] When the first application decrypts the encryption result (token string), first, the first application obtains the initial decryption key secretKey and the decryption key calculation information from the configuration file of the first application. The initial decryption key secretKey here can be the same as the initial encryption key when the encryption result is generated. That is, in the configuration file of the first application B, the initial decryption key secretKey and the decryption key calculation information are pre-configured.

[0120] Secondly, based on the initial decryption key secretkey and the decryption key calculation information, the decryption key is calculated. The decryption key calculation information includes the current time in the first application and the first preset time step timeInterval. Finally, the encryption result is decrypted by the decryption key to generate the target identity authentication information.

[0121] For example, the initial decryption key secretKey, the current time (timestamp timestamp) in the first application, and the first preset time step timeInterval are obtained from the configuration file of the first application (application B). Based on the above initial decryption key secretKey, timestamp timestamp and the first preset time step timeInterval, the decryption key is recalculated. The specific formula for calculating the decryption key newSecretKey is:

[0122] newSecretKey1=timestamp / timeInterval+secretKey (1-1)

[0123] newSecretKey2=(timestamp / timeInterval+1)+secretKey (1-2)

[0124] newSecretKey3=(timestamp / timeInterval-1)+secretKey (1-3)

[0125] Among them, timestamp / timeInterval, timestamp / timeInterval+1, and timestamp / timeInterval-1 are all the results of integer division.

[0126] Then, the three decryption keys newSecretKey1, newSecretKey2, and newSecretKey3 are used to decrypt the decryption result token respectively. As long as any one of the decryption keys can successfully decrypt, the target identity authentication information obtained by decryption is output.

[0127] Combination Figure 4 As shown, it is a schematic diagram of the decryption process in one embodiment. The token string, the initial decryption key secretkey and the timestamp timestamp are input into the decryption algorithm for decryption, wherein the first preset time step timeInterval is preset in the decryption algorithm. The specific decryption process can refer to the specific calculation process in the above example to generate the target identity authentication information.

[0128] In the embodiment of the present application, the decryption key is recalculated based on the initial decryption key secretkey, the current time in the first application, and the first preset time step timeInterval. Then, the encryption result is decrypted by the decryption key. As long as any decryption key can successfully decrypt, the target identity authentication information can be generated. Here, the decryption is not directly performed based on the initial decryption key, but the decryption key is recalculated based on the initial decryption key combined with the current time in the first application and the first preset time step timeInterval. And the current time in the first application changes in real time, therefore, the difficulty of decryption is increased and the security of identity authentication is improved.

[0129] Continuing from the previous embodiment, the encryption result is that the second application obtains the initial encryption key and encryption key calculation information from the configuration file of the second application; the initial encryption key corresponds to the initial decryption key; the encryption key is calculated based on the initial encryption key and the encryption key calculation information; the target identity authentication information is encrypting by the encryption key, and the encryption result is generated.

[0130] Corresponding to the decryption process in the previous embodiment, when the second application encrypts the target identity authentication information, first, the initial encryption key and encryption key calculation information are obtained from the configuration file of the second application; the initial encryption key corresponds to the initial decryption key, and the encryption key calculation information includes the current time and the second preset time step in the second application. That is, in the configuration file of the second application A, the initial encryption key and the encryption key calculation information are configured in advance. The second preset time step here can be consistent with the first preset time step. Secondly, based on the initial encryption key and the encryption key calculation information, the encryption key is calculated. Finally, the target identity authentication information is encrypted by the encryption key to generate an encryption result.

[0131] Specifically, based on the initial encryption key secretKey, the current time (timestamp timestamp) in the second application and the second preset time step timeInterval, the encryption key newSecretKey is recalculated. The specific formula for calculating the encryption key is:

[0132] NewSecretKey = current time / timeInterval + secretKey (1-4)

[0133] Combination Figure 5 As shown, it is a schematic diagram of the encryption process in one embodiment. The target identity authentication information, the initial encryption key secretkey and the timestamp timestamp are input into the encryption algorithm for encryption, wherein the second preset time step timeInterval is preset in the encryption algorithm. The specific encryption process can refer to the specific calculation process in the above example to generate a token string.

[0134] In the embodiment of the present application, the encryption key newSecretKey is recalculated based on the initial encryption key, the current time in the second application, and the second preset time step. Here, encryption is not performed directly based on the initial encryption key, but the encryption key is recalculated based on the initial encryption key combined with the current time in the second application and the second preset time step timeInterval. And the current time in the second application changes in real time, therefore, the difficulty of encryption is increased and the security of identity authentication is improved.

[0135] In one embodiment, Figure 6 As shown, another identity authentication method is provided, which is applied to a first server, and a first application is run on the first server. The method includes:

[0136] Step 620, receiving a first access request sent by the browser; the first access request carries an encryption result generated by the second application encrypting the target identity authentication information based on the encryption key; the target identity authentication information is the identity authentication information for logging into the second application through the browser.

[0137] The first application receives a first access request sent by the browser, wherein the first access request carries an encryption result generated by the second application encrypting target identity authentication information based on an encryption key, wherein the target identity authentication information is identity authentication information for logging into the second application through the browser.

[0138] Step 640: In response to the first access request, decrypt the encryption result based on the decryption key to generate a decryption result.

[0139] After receiving the first access request sent by the browser, the first application can respond to the first access request and obtain the initial decryption key and decryption key calculation information from the configuration file of the first application. The decryption key calculation information includes the current time in the first application and the first preset time step. The decryption key is then recalculated based on the initial decryption key and the decryption key calculation information. Finally, the encryption result is decrypted by the decryption key to generate a decryption result, i.e., the target identity authentication information.

[0140] Step 660: Send the decryption result to the browser, so that the browser logs in to the first application based on the decryption result.

[0141] The first application returns the decryption result to the browser. After receiving the decryption result, the browser can log in to the first application based on the decryption result, that is, it can log in to the first application based on the target identity authentication information. Since the identity authentication information is preset in the first application, in the process of logging in to the first application based on the target identity authentication information, the target identity authentication information can be compared with the identity authentication information preset in the first application. If they are consistent, you can log in to the first application directly. In other words, the first application and the second application share the same set of identity authentication information, which is the target identity authentication information. Therefore, after successfully logging in to the second application, you can log in to the first application directly without re-entering the identity authentication information.

[0142] In the embodiment of the present application, the target identity authentication information for logging into the second application can be used to log into the first application, and in this process, there is no need to rely on the authentication server, thus avoiding the problem that the entire identity authentication process is slow or even unable to perform identity authentication due to the poor quality of the communication connection between the computer device and the authentication server or the interruption of the communication connection. At the same time, the user does not need to enter the identity authentication information in the first application, which shortens the time of identity authentication and improves the efficiency of identity authentication.

[0143] In one embodiment, the encryption result is decrypted based on the decryption key to generate a decryption result, including:

[0144] Obtaining an initial decryption key and decryption key calculation information from a configuration file of the first application;

[0145] Calculate the decryption key based on the initial decryption key and the decryption key calculation information;

[0146] The encrypted result is decrypted using the decryption key to generate a decrypted result.

[0147] Specifically, the initial decryption key secretKey and the decryption key calculation information are obtained from the configuration file of the first application B. Among them, the configuration file here is mainly a text file, for example, a text file of the type of properties file, yml file, txt file, etc. That is, in the configuration file of the first application B, the initial decryption key secretKey and the decryption key calculation information are configured in advance. The configuration file here also contains some application-specific settings. For example, the configuration file contains configuration settings read by the common language runtime (such as assembly binding policy, remote processing objects, etc.), as well as settings that can be read by the application, etc. This application does not limit this. Among them, the decryption key calculation information includes the current time (timestamp timestamp) in the first application B and the first preset time step timeInterval. Based on the above initial decryption key secretKey, timestamp timestamp and the first preset time step timeInterval, the decryption key is recalculated. The specific formula for calculating the decryption key newSecretKey is:

[0148] newSecretKey1=timestamp / timeInterval+secretKey (1-1)

[0149] newSecretKey2=(timestamp / timeInterval+1)+secretKey (1-2)

[0150] newSecretKey3=(timestamp / timeInterval-1)+secretKey (1-3)

[0151] Among them, timestamp / timeInterval, timestamp / timeInterval+1, and timestamp / timeInterval-1 are all the results of integer division.

[0152] Then, the three decryption keys newSecretKey1, newSecretKey2, and newSecretKey3 are used to decrypt the decryption result token respectively. As long as any one of the decryption keys can successfully decrypt, the target identity authentication information obtained by decryption is output.

[0153] Combination Figure 4As shown, it is a schematic diagram of the decryption process in one embodiment. The token string, the initial decryption key secretkey and the timestamp timestamp are input into the decryption algorithm for decryption, wherein the first preset time step timeInterval is preset in the decryption algorithm. The specific decryption process can refer to the specific calculation process in the above example to generate the target identity authentication information.

[0154] In the embodiment of the present application, decryption is not performed directly based on the initial decryption key, but the decryption key is recalculated based on the initial decryption key combined with the current time in the first application and the first preset time step timeInterval. And the current time in the first application changes in real time, thus increasing the difficulty of decryption and improving the security of identity authentication.

[0155] In one embodiment, the first preset time step includes the second preset time step and the time step adjacent to the second preset time step; the decryption key to be spliced ​​includes the first decryption key to be spliced ​​and the second decryption key to be spliced; and the decryption key to be spliced ​​is calculated according to the current time and the first preset time step, including:

[0156] Calculate a first integer division result between the current time and the second preset time step, and use the first integer division result as a first decryption key to be spliced;

[0157] Calculate a second integer division result between the current time and a time step adjacent to a second preset time step, and use the second integer division result as a second decryption key to be spliced.

[0158] Specifically, when calculating the decryption key based on the initial decryption key and the decryption key calculation information, the decryption key to be spliced ​​is calculated according to the current time and the first preset time step; the decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate the decryption key. The first preset time step includes the second preset time step and the time step adjacent to the second preset time step.

[0159] The second preset time step here is the preset time step used by the second application when recalculating the encryption key. For example, in order to improve the timeliness of the encryption result (token string), while considering factors such as network access speed, asynchrony of timestamps in the first application B and the second application A, the second preset time step in the above encryption process can be relaxed, for example, the second preset time step is set to 5 minutes. Of course, the 5 minutes here is just an example, and this application does not limit this. For example, the second preset time step can also be set to 2 minutes, 3 minutes, 6 minutes, etc.

[0160] Further, in order to improve the timeliness of the encryption result (token string), during the decryption process, a time step adjacent to the second preset time step can be added on the basis of the second preset time step. Assuming that the second preset time step is 5 minutes and the interval of the time step is 1 minute, then the time step adjacent to the second preset time step can be 4 minutes, 6 minutes, etc. If the interval of the time step is 2 minutes, then the time step adjacent to the second preset time step can be 3 minutes, 7 minutes, etc., and this application does not limit this. In this example, the first preset time step includes the second preset time step and the time step adjacent to the second preset time step, so the first preset time step includes 5 minutes, 4 minutes, and 6 minutes.

[0161] Specifically, when calculating the decryption key to be spliced ​​according to the current time and the first preset time step, it includes: calculating the first integer division result between the current time (timestamp timestamp) and the second preset time step, and using the first integer division result as the first decryption key to be spliced. Calculate the second integer division result between the current time (timestamp timestamp) and the time step adjacent to the second preset time step, and use the second integer division result as the second decryption key to be spliced. Assuming that the second preset time step is 5 minutes, then the first integer division result between the current time (timestamp timestamp) and the second preset time step is calculated as timestamp / timeInterval, and timestamp / timeInterval is used as the first decryption key to be spliced. Then, the first decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate the first decryption key (as shown in formula 1-1).

[0162] newSecretKey1=timestamp / timeInterval+secretKey (1-1)

[0163] Assuming that the second preset time step is 5 minutes, then the second integer division result between the current time (timestamp timestamp) and the time step adjacent to the second preset time step is calculated as (timestamp / timeInterval+1) or (timestamp / timeInterval-1), and the second integer division result is used as the second decryption key to be spliced. Then, the second decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate a second decryption key (as shown in Formula 1-2 or Formula 1-3).

[0164] newSecretKey2=(timestamp / timeInterval+1)+secretKey (1-2)

[0165] newSecretKey3=(timestamp / timeInterval-1)+secretKey (1-3)

[0166] In the embodiment of the present application, in order to improve the timeliness of the encryption result (token string), the second preset time step in the above encryption process can be relaxed by considering factors such as network access speed, asynchronization of timestamps in the first application B and the second application A. Further, in order to improve the timeliness of the encryption result (token string), in the process of decryption, the time step adjacent to the second preset time step can be added on the basis of the second preset time step. Therefore, when calculating the decryption key to be spliced ​​according to the current time and the first preset time step, the first integer division result between the current time and the second preset time step is calculated for the second preset time step, and the first integer division result is used as the first decryption key to be spliced. For the time step adjacent to the second preset time step, the second integer division result between the current time and the time step adjacent to the second preset time step is calculated, and the second integer division result is used as the second decryption key to be spliced. In this way, decryption is performed based on multiple time steps, which improves the timeliness of the encryption result (token string), thereby improving the probability of successful decryption.

[0167] Continuing from the previous embodiment, the encryption result is successfully decrypted by using the decryption key to generate a decryption result, including:

[0168] Decrypting the encrypted result using the first decryption key and the second decryption key respectively;

[0169] If the encryption result is successfully decrypted using the first decryption key, a decryption result is generated;

[0170] If the encryption result is successfully decrypted using the second decryption key, a decryption result is generated.

[0171] Specifically, the first decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate the first decryption key; the second decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate the second decryption key. Then, the encryption result is decrypted by the first decryption key and the second decryption key respectively, that is, the decryption result token is decrypted by the newSecretKey1, newSecretKey2, and newSecretKey3 obtained in the previous embodiment respectively. As long as any one of the decryption keys can successfully decrypt, the decryption result obtained by decryption is output, that is, the target identity authentication information. Of course, the number of decryption keys here is not limited to the above three.

[0172] In an embodiment of the present application, in order to improve the timeliness of the encryption result (token string), the second preset time step in the above encryption process can be relaxed by taking into account factors such as network access speed, asynchronization of timestamps in the first application B and the second application A. Further, in order to improve the timeliness of the encryption result (token string), during the decryption process, a time step adjacent to the second preset time step can be added on the basis of the second preset time step. Therefore, decryption is performed based on multiple time steps, and multiple decryption results are obtained. Only any one decryption key is required to successfully decrypt, thereby increasing the probability of successful decryption.

[0173] In one embodiment, Figure 7 As shown, another identity authentication method is provided, which is applied to a second server, and a second application is run on the second server. The method includes:

[0174] Step 720, receiving a second access request sent by the browser; the second access request carries the target identity authentication information;

[0175] Step 740: In response to the second access request, log in to the second application based on the target identity authentication information.

[0176] The second application receives the second access request sent by the browser, wherein the second access request carries the target identity authentication information, the website address information of the second application, and other information, which is not limited in this application. The second application responds to the second access request and compares the target identity authentication information with the identity authentication information preset in the second application. If they are consistent, the second application can be directly logged in.

[0177] Step 760, encrypt the target identity authentication information based on the encryption key to generate an encryption result, and send the encryption result to the browser; the encryption result is used to send the encryption result to the first application through the first access request when the browser sends a first access request to the first application, so that the first application can successfully decrypt the encryption result based on the decryption key, generate a decryption result, and enable the browser to log in to the first application based on the decryption result.

[0178] After logging in to the second application, the second application encrypts the target identity authentication information based on the encryption key to generate an encryption result, and returns the encryption result to the browser. Specifically, the initial encryption key and encryption key calculation information are obtained from the configuration file of the second application; the initial encryption key corresponds to the initial decryption key; the encryption key is calculated based on the initial encryption key and the encryption key calculation information; the target identity authentication information is encrypted by the encryption key to generate an encryption result.

[0179] After the second application returns the encryption result to the browser, if the browser sends a first access request to the first application, the first access request carries the encryption result generated by the second application encrypting the target identity authentication information based on the encryption key. The first application receives the first access request sent by the browser, and in response to the first access request, decrypts the encryption result based on the decryption key to generate a decryption result. The decryption result is sent to the browser so that the browser logs in to the first application based on the decryption result. In other words, the first application and the second application share the same set of identity authentication information, which is the target identity authentication information.

[0180] In an embodiment of the present application, the second application receives a second access request sent by the browser, the second access request carries the target identity authentication information, and in response to the second access request, logs in to the second application based on the target identity authentication information. The target identity authentication information is encrypted based on the encryption key to generate an encryption result, and the encryption result is sent to the browser. Then, the first application receives the first access request sent by the browser, and in response to the first access request, the encryption result is decrypted based on the decryption key to generate a decryption result. The decryption result is sent to the browser so that the browser logs in to the first application based on the decryption result. Since the first application and the second application share the same set of identity authentication information, namely the target identity authentication information, after successfully logging in to the second application, there is no need to re-enter the identity authentication information and can directly log in to the first application. In this way, the time for identity authentication is shortened and the efficiency of identity authentication is improved.

[0181] In a specific embodiment, in combination Figure 8 As shown, an identity authentication method is provided, a browser is installed on a computer device, and a first application B runs on a server B, and a second application A runs on a server A. The first application B can communicate with the browser, and the second application A can also communicate with the browser. The method includes:

[0182] In the first step, the computer device sends a second access request to the second application A through the browser; the second access request carries the target identity authentication information;

[0183] In the second step, after successfully logging into the second application A, the second application returns a message of successful login to the browser; the second application A encrypts the target identity authentication information based on the encryption key to generate an encryption result;

[0184] Step 3: After receiving the successful login message, the browser sends an encryption result request instruction to the second application A;

[0185] Step 4: After receiving the encryption result request instruction, the second application A returns the encryption result to the browser;

[0186] Step 5: The browser sends a first access request to the first application B; the first access request carries the encryption result;

[0187] Step 6: The first application B successfully decrypts the encryption result using the decryption key corresponding to the encryption key to generate a decryption result; and sends the decryption result to the browser;

[0188] In the seventh step, the browser logs in to the first application B based on the decryption result, that is, the authentication is successful.

[0189] In the embodiment of the present application, it can be realized that after successfully logging into one system among multiple application systems (the first application, the second application, etc.), it is possible to quickly authenticate in other application systems to access other application systems. Therefore, the entire identity authentication process consumes less time, and identity authentication can still be implemented between multiple application systems even when the network between the multiple application systems is disconnected.

[0190] In one embodiment, Fig. 9 As shown, an identity authentication device 900 is provided, which is applied to a computer device, and a browser is installed on the computer device. The device includes:

[0191] A first access request sending module 910 is used to send a first access request to a first application through a browser; the first access request carries an encryption result generated by the second application encrypting the target identity authentication information based on an encryption key; the target identity authentication information is the identity authentication information of a successful login to the second application through a browser;

[0192] The decryption result receiving module 930 is used to receive the decryption result returned by the first application; the decryption result is obtained by the first application successfully decrypting the encryption result using the decryption key corresponding to the encryption key;

[0193] The first application login module 950 is used to log in to the first application through the browser based on the decryption result.

[0194] In one embodiment, Fig.10 As shown, an identity authentication device 900 is provided, and the device also includes:

[0195] A second access request sending module 970 is used to send a second access request to the second application through a browser; the second access request carries target identity authentication information;

[0196] The encryption result acquisition module 990 is used to acquire the encryption result from the second application through the browser after logging into the second application based on the target identity authentication information.

[0197] In one embodiment, the decryption result is that the first application obtains the initial decryption key and decryption key calculation information from the configuration file of the first application; calculates the decryption key based on the initial decryption key and the decryption key calculation information; and decrypts the encryption result using the decryption key to generate the target identity authentication information.

[0198] In one embodiment, the encryption result is that the second application obtains the initial encryption key and encryption key calculation information from the configuration file of the second application; the initial encryption key corresponds to the initial decryption key; the encryption key is calculated based on the initial encryption key and the encryption key calculation information; the target identity authentication information is encrypting by the encryption key, and the encryption result is generated.

[0199] In one embodiment, Fig.11 As shown, an identity authentication device 1100 is provided, which is applied to a first server, and a first application is run on the first server. The device includes:

[0200] The first access request receiving module 1120 is used to receive a first access request sent by a browser; the first access request carries an encryption result generated by the second application encrypting the target identity authentication information based on the encryption key; the target identity authentication information is the identity authentication information for logging into the second application through the browser;

[0201] The decryption module 1140 is used to successfully decrypt the encryption result based on the decryption key in response to the first access request to generate a decryption result;

[0202] The first application login module 1160 is used to send the decryption result to the browser, so that the browser logs in to the first application based on the decryption result.

[0203] In one embodiment, the decryption module 1140 includes:

[0204] An initial decryption key acquisition unit, used to acquire an initial decryption key and decryption key calculation information from a configuration file of the first application;

[0205] A decryption key calculation unit, configured to calculate a decryption key based on an initial decryption key and decryption key calculation information;

[0206] The decryption unit is used to successfully decrypt the encryption result using the decryption key to generate a decryption result.

[0207] In one embodiment, the decryption key calculation information includes the current time and the first preset time step in the first application; the decryption key calculation unit is also used to calculate the decryption key to be spliced ​​based on the current time and the first preset time step; the decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate a decryption key.

[0208] In one embodiment, the first preset time step includes the second preset time step and the time step adjacent to the second preset time step; the decryption key to be spliced ​​includes the first decryption key to be spliced ​​and the second decryption key to be spliced; the decryption key calculation unit is further used to calculate the first integer division result between the current time and the second preset time step, and use the first integer division result as the first decryption key to be spliced; calculate the second integer division result between the current time and the time step adjacent to the second preset time step, and use the second integer division result as the second decryption key to be spliced.

[0209] In one embodiment, the decryption key calculation unit is further used to concatenate the first decryption key to be concatenated with the initial decryption key to generate a first decryption key; and concatenate the second decryption key to be concatenated with the initial decryption key to generate a second decryption key.

[0210] In one embodiment, the decryption unit is also used to decrypt the encryption result using the first decryption key and the second decryption key respectively; if the encryption result is successfully decrypted using the first decryption key, a decryption result is generated; if the encryption result is successfully decrypted using the second decryption key, a decryption result is generated.

[0211] In one embodiment, Fig.12 As shown, an identity authentication device 1200 is provided, which is applied to a second server, and a second application is run on the second server. The device includes:

[0212] The second access request receiving module 1220 is used to receive a second access request sent by the browser; the second access request carries the target identity authentication information;

[0213] A second application login module 1240, configured to log in to the second application based on the target identity authentication information in response to the second access request;

[0214] The encryption result generation module 1260 is used to encrypt the target identity authentication information based on the encryption key to generate an encryption result, and send the encryption result to the browser; the encryption result is used to send the encryption result to the first application through the first access request when the browser sends a first access request to the first application, so that the first application can successfully decrypt the encryption result based on the decryption key, generate a decryption result, and enable the browser to log in to the first application based on the decryption result.

[0215] It should be understood that, although the various steps in the flowcharts in the above-mentioned figures are displayed in sequence according to the indications of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the above-mentioned figures may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.

[0216] The division of the modules in the above-mentioned identity authentication device is only for illustration. In other embodiments, the identity authentication device may be divided into different modules as needed to complete all or part of the functions of the above-mentioned identity authentication device.

[0217] For the specific definition of the identity authentication device, please refer to the definition of the identity authentication method above, which will not be repeated here. Each module in the above-mentioned identity authentication device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0218] In one embodiment, a computer device is also provided, including a memory and a processor. A computer program is stored in the memory. When the computer program is executed by the processor, the processor executes the steps of an identity authentication method provided in the above embodiments.

[0219] Fig.13 FIG. 1 is a schematic diagram of the internal structure of a computer device in one embodiment. Fig.13 As shown, the computer device includes a processor and a memory connected via a system bus. The processor is used to provide computing and control capabilities to support the operation of the entire computer device. The memory may include a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The computer program can be executed by the processor to implement an identity authentication method provided in each of the above embodiments. The internal memory provides a cached operating environment for the operating system computer program in the non-volatile storage medium. The computer device can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a POS (Point of Sales), a vehicle-mounted computer, a wearable device, etc.

[0220] The implementation of each module in the identity authentication device provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a computer device or a computer device. The program module constituted by the computer program may be stored in a computer device or a memory of a computer device. When the computer program is executed by a processor, the steps of the method described in the embodiment of the present application are implemented.

[0221] The embodiment of the present application also provides a computer-readable storage medium, which is one or more non-volatile computer-readable storage media containing computer-executable instructions, and when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the identity authentication method.

[0222] A computer program product comprising instructions, when executed on a computer, causes the computer to perform an identity authentication method.

[0223] Any reference to memory, storage, database or other media used in the embodiments of the present application may include non-volatile and / or volatile memory. Suitable non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM), which is used as an external cache memory. As an illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM) and memory bus dynamic RAM (RDRAM).

[0224] The above information interaction examples only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. An identity authentication method, characterized in that: Applied to a computer device, wherein a browser is installed on the computer device, the method comprises: A first access request is sent to a first application through the browser; the first access request carries an encryption result generated by the second application encrypting target identity authentication information based on an encryption key; the target identity authentication information is the identity authentication information for logging into the second application through the browser; the first application is a trusted application of the second application; Receive the decryption result returned by the first application; the decryption result is that the first application obtains the initial decryption key and the decryption key calculation information from the configuration file of the first application; based on the initial decryption key and the decryption key calculation information, calculate the decryption key; successfully decrypt the encryption result by using the decryption key to generate the decryption result; the decryption key calculation information includes the current time and the first preset time step in the first application; the calculation of the decryption key based on the initial decryption key and the decryption key calculation information includes: calculating the decryption key to be spliced ​​according to the current time and the first preset time step; splicing the decryption key to be spliced ​​with the initial decryption key to generate the decryption key; the first preset time step includes the second preset time step and the time step adjacent to the second preset time step; the decryption key to be spliced ​​includes the first decryption key to be spliced ​​and the second decryption key to be spliced; the calculation of the decryption key to be spliced ​​according to the current time and the first preset time step The method comprises: calculating a first integer division result between the current time and the second preset time step, and using the first integer division result as the first decryption key to be spliced; calculating a second integer division result between the current time and the time step adjacent to the second preset time step, and using the second integer division result as the second decryption key to be spliced; splicing the decryption key to be spliced ​​with the initial decryption key to generate the decryption key, comprising: splicing the first decryption key to be spliced ​​with the initial decryption key to generate a first decryption key; splicing the second decryption key to be spliced ​​with the initial decryption key to generate a second decryption key; successfully decrypting the encryption result by the decryption key to generate the decryption result, comprising: decrypting the encryption result by the first decryption key and the second decryption key respectively; when the encryption result is successfully decrypted by the first decryption key, or when the encryption result is successfully decrypted by the second decryption key, the decryption key is obtained; Log in to the first application through the browser based on the decryption result.

2. The identity authentication method according to claim 1, characterized in that: The method further comprises: Sending a second access request to the second application through the browser; the second access request carries target identity authentication information; After logging into the second application based on the target identity authentication information, the encryption result is obtained from the second application through the browser.

3. The identity authentication method according to claim 1 or 2, characterized in that: The encryption result is that the second application obtains the initial encryption key and encryption key calculation information from the configuration file of the second application; the initial encryption key corresponds to the initial decryption key; Calculating the encryption key based on the initial encryption key and the encryption key calculation information; The target identity authentication information is encrypted using the encryption key to generate an encryption result.

4. An identity authentication method, characterized in that: Applied to a first server, where a first application is running on the first server, the method includes: Receive a first access request sent by a browser; the first access request carries an encryption result generated by encrypting target identity authentication information by a second application based on an encryption key; the target identity authentication information is identity authentication information for logging into the second application through the browser; the first application is a trusted application of the second application; In response to the first access request, the encryption result is successfully decrypted based on the decryption key to generate a decryption result; the decryption result is sent to the browser, so that the browser logs in to the first application based on the decryption result; The successfully decrypting the encryption result based on the decryption key to generate a decryption result includes: Obtaining an initial decryption key and decryption key calculation information from a configuration file of the first application; Calculating the decryption key based on the initial decryption key and the decryption key calculation information; Successfully decrypting the encryption result using the decryption key to generate the decryption result; The decryption key calculation information includes the current time and the first preset time step in the first application; The calculating the decryption key based on the initial decryption key and the decryption key calculation information includes: Calculate the decryption key to be spliced ​​according to the current time and the first preset time step; Concatenate the decryption key to be concatenated with the initial decryption key to generate the decryption key; The first preset time step includes the second preset time step and the time step adjacent to the second preset time step; the decryption key to be spliced ​​includes the first decryption key to be spliced ​​and the second decryption key to be spliced; the calculating the decryption key to be spliced ​​according to the current time and the first preset time step includes: Calculate a first integer divisibility result between the current time and the second preset time step, and use the first integer divisibility result as the first to-be-joined decryption key; Calculate a second integer divisibility result between the current time and a time step adjacent to the second preset time step, and use the second integer divisibility result as the second to-be-joined decryption key; The step of concatenating the decryption key to be concatenated with the initial decryption key to generate the decryption key includes: Concatenate the first decryption key to be concatenated with the initial decryption key to generate a first decryption key; Concatenate the second decryption key to be concatenated with the initial decryption key to generate a second decryption key; The successfully decrypting the encryption result by using the decryption key to generate the decryption result includes: Decrypting the encryption result using the first decryption key and the second decryption key respectively; If the encryption result is successfully decrypted using the first decryption key, the decryption result is generated; If the encryption result is successfully decrypted using the second decryption key, the decryption result is generated.

5. An identity authentication method, characterized in that: The method is applied to a second server, where a second application is running on the second server, and includes: Receiving a second access request sent by the browser; the second access request carries target identity authentication information; In response to the second access request, logging into the second application based on the target identity authentication information; The target identity authentication information is encrypted based on the encryption key to generate an encryption result, and the encryption result is sent to the browser; the encryption result is used to send the encryption result to the first application through the first access request when the browser sends a first access request to the first application, so that the first application obtains the initial decryption key and the decryption key calculation information from the configuration file of the first application; the decryption key is calculated based on the initial decryption key and the decryption key calculation information; the encryption result is successfully decrypted by the decryption key to generate a decryption result; the decryption key calculation information package The method comprises: calculating the decryption key based on the initial decryption key and the decryption key calculation information, comprising: calculating the decryption key to be spliced ​​according to the current time and the first preset time step; splicing the decryption key to be spliced ​​with the initial decryption key to generate the decryption key; the first preset time step comprises the second preset time step and the time step adjacent to the second preset time step; the decryption key to be spliced ​​comprises the first decryption key to be spliced ​​and the second decryption key to be spliced; the decryption key to be spliced ​​according to the current time and the first preset time step time step, calculating the decryption key to be spliced, including: calculating a first integer division result between the current time and the second preset time step, and using the first integer division result as the first decryption key to be spliced; calculating a second integer division result between the current time and a time step adjacent to the second preset time step, and using the second integer division result as the second decryption key to be spliced; splicing the decryption key to be spliced ​​with the initial decryption key to generate the decryption key, including: splicing the first decryption key to be spliced ​​with the initial decryption key to generate the first decryption key; splicing the second decryption key to be spliced ​​with the initial decryption key to generate the first decryption key; The decryption key is concatenated with the initial decryption key to generate a second decryption key; the encryption result is successfully decrypted by the decryption key to generate a decryption result, including: decrypting the encryption result by the first decryption key and the second decryption key respectively; when the encryption result is successfully decrypted by the first decryption key, or when the encryption result is successfully decrypted by the second decryption key, a decryption result is generated, and the browser is logged in to the first application based on the decryption result; the first application is a trusted application of the second application.

6. An identity authentication device, characterized in that: Applied to a computer device, wherein a browser is installed on the computer device, the device comprises: A first access request sending module is used to send a first access request to a first application through the browser; the first access request carries an encryption result generated by the second application encrypting the target identity authentication information based on the encryption key; the target identity authentication information is the identity authentication information of successfully logging into the second application through the browser; the first application is a trusted application of the second application; A decryption result receiving module, used to receive the decryption result returned by the first application; the decryption result is that the first application obtains an initial decryption key and decryption key calculation information from a configuration file of the first application; based on the initial decryption key and the decryption key calculation information, the decryption key is calculated; the encryption result is successfully decrypted by the decryption key to generate the decryption result; the decryption key calculation information includes the current time and a first preset time step in the first application; the calculation of the decryption key based on the initial decryption key and the decryption key calculation information includes: calculating the decryption key to be spliced ​​according to the current time and the first preset time step; splicing the decryption key to be spliced ​​with the initial decryption key to generate the decryption key; the first preset time step includes a second preset time step and a time step adjacent to the second preset time step; the decryption key to be spliced ​​includes a first decryption key to be spliced ​​and a second decryption key to be spliced; the calculation of the decryption key to be spliced ​​according to the current time and the first preset time step Splicing decryption keys, including: calculating a first integer division result between the current time and the second preset time step, and using the first integer division result as the first decryption key to be spliced; calculating a second integer division result between the current time and a time step adjacent to the second preset time step, and using the second integer division result as the second decryption key to be spliced; splicing the decryption key to be spliced ​​with the initial decryption key to generate the decryption key, including: splicing the first decryption key to be spliced ​​with the initial decryption key to generate a first decryption key; splicing the second decryption key to be spliced ​​with the initial decryption key to generate a second decryption key; successfully decrypting the encryption result by the decryption key to generate the decryption result, including: decrypting the encryption result by the first decryption key and the second decryption key respectively; obtained when the encryption result is successfully decrypted by the first decryption key, or when the encryption result is successfully decrypted by the second decryption key; The first application login module is used to log in to the first application through the browser based on the decryption result.

7. An identity authentication device, characterized in that: Applied to a first server, where a first application is running, the device comprises: A first access request receiving module is used to receive a first access request sent by a browser; the first access request carries an encryption result generated by encrypting target identity authentication information by the second application based on an encryption key; the target identity authentication information is the identity authentication information for logging into the second application through the browser; the first application is a trusted application of the second application; a decryption module, configured to successfully decrypt the encryption result based on a decryption key in response to the first access request, and generate a decryption result; A first application login module, used for sending the decryption result to the browser, so that the browser logs in to the first application based on the decryption result; The decryption module comprises: An initial decryption key acquisition unit, used to acquire an initial decryption key and decryption key calculation information from a configuration file of the first application; a decryption key calculation unit, configured to calculate the decryption key based on the initial decryption key and the decryption key calculation information; A decryption unit, used to successfully decrypt the encryption result using the decryption key to generate the decryption result; The decryption key calculation information includes the current time and the first preset time step in the first application; the decryption key calculation unit is further used to calculate the decryption key to be spliced ​​according to the current time and the first preset time step; splice the decryption key to be spliced ​​with the initial decryption key to generate the decryption key; The first preset time step includes the second preset time step and the time step adjacent to the second preset time step; the decryption key to be spliced ​​includes the first decryption key to be spliced ​​and the second decryption key to be spliced; the decryption key calculation unit is further used to calculate a first integer division result between the current time and the second preset time step, and use the first integer division result as the first decryption key to be spliced; calculate a second integer division result between the current time and the time step adjacent to the second preset time step, and use the second integer division result as the second decryption key to be spliced; The decryption key calculation unit is further used to concatenate the first decryption key to be concatenated with the initial decryption key to generate a first decryption key; and concatenate the second decryption key to be concatenated with the initial decryption key to generate a second decryption key; The decryption unit is also used to decrypt the encryption result using the first decryption key and the second decryption key respectively; if the encryption result is successfully decrypted using the first decryption key, the decryption result is generated; if the encryption result is successfully decrypted using the second decryption key, the decryption result is generated.

8. An identity authentication device, characterized in that: The device is applied to a second server, where a second application is run on the second server, and the device includes: A second access request receiving module, used to receive a second access request sent by the browser; the second access request carries target identity authentication information; A second application login module, configured to log in to the second application based on the target identity authentication information in response to the second access request; The encryption result generating module is used to encrypt the target identity authentication information based on the encryption key to generate an encryption result, and send the encryption result to the browser; the encryption result is used to send the encryption result to the first application through the first access request when the browser sends a first access request to the first application, so that the first application obtains the initial decryption key and the decryption key calculation information from the configuration file of the first application; calculate the decryption key based on the initial decryption key and the decryption key calculation information; successfully decrypt the encryption result through the decryption key to generate a decryption result; the decryption key The key calculation information includes the current time and the first preset time step in the first application; the calculation of the decryption key based on the initial decryption key and the decryption key calculation information includes: calculating the decryption key to be spliced ​​according to the current time and the first preset time step; splicing the decryption key to be spliced ​​with the initial decryption key to generate the decryption key; the first preset time step includes the second preset time step and the time step adjacent to the second preset time step; the decryption key to be spliced ​​includes the first decryption key to be spliced ​​and the second decryption key to be spliced; the calculation of the decryption key based on the current time and the first preset time step The first preset time step, calculating the decryption key to be spliced, includes: calculating a first integer division result between the current time and the second preset time step, and using the first integer division result as the first decryption key to be spliced; calculating a second integer division result between the current time and a time step adjacent to the second preset time step, and using the second integer division result as the second decryption key to be spliced; splicing the decryption key to be spliced ​​with the initial decryption key to generate the decryption key, including: splicing the first decryption key to be spliced ​​with the initial decryption key to generate the first decryption key; The second decryption key to be spliced ​​is spliced ​​with the initial decryption key to generate a second decryption key; the encryption result is successfully decrypted by the decryption key to generate a decryption result, including: decrypting the encryption result by the first decryption key and the second decryption key respectively; when the encryption result is successfully decrypted by the first decryption key, or when the encryption result is successfully decrypted by the second decryption key, a decryption result is generated, and the browser is logged in to the first application based on the decryption result; the first application is a trusted application of the second application.

9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the identity authentication method according to any one of claims 1 to 5.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the identity authentication method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Single sign-on system, method, equipment and product based on block chain

    CN113221093A

  • Encryption and decryption method and system based on software and hardware collaboration

    CN113722726A