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

Identity authentication method, device and equipment and computer readable storage medium Download PDF

Info

Publication number
TW202331563A
TW202331563A TW111137392A TW111137392A TW202331563A TW 202331563 A TW202331563 A TW 202331563A TW 111137392 A TW111137392 A TW 111137392A TW 111137392 A TW111137392 A TW 111137392A TW 202331563 A TW202331563 A TW 202331563A
Authority
TW
Taiwan
Prior art keywords
token
user
target user
server
identity authentication
Prior art date
Application number
TW111137392A
Other languages
Chinese (zh)
Other versions
TWI843220B (en
Inventor
祖立軍
薛文哲
周錦佳
湯洋
傅宜生
趙海
吳杰
呂智慧
Original Assignee
大陸商中國銀聯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 大陸商中國銀聯股份有限公司 filed Critical 大陸商中國銀聯股份有限公司
Publication of TW202331563A publication Critical patent/TW202331563A/en
Application granted granted Critical
Publication of TWI843220B publication Critical patent/TWI843220B/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/321Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority
    • H04L9/3213Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving a third party or a trusted authority using tickets or tokens, e.g. Kerberos
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)

Abstract

The invention discloses an identity authentication method, device and equipment and a computer readable storage medium. The payment method comprises the steps that a service request sent by a client side for a first mechanism is received, the service request comprises multiple tokens, the multiple tokens are tokens distributed to a target user under the condition that multiple servers conduct identity authentication on the target user and the identity authentication is passed, and the target user is a user logged in the client side; matching the plurality of tokens with tokens stored in the block chain, and determining whether the target user is an authenticated user; and when it is determined that the target user is the authenticated user, forwarding the service request to a first server corresponding to the first mechanism, so that the first server responds to the service request. According to the embodiment of the invention, the login times required by a user to obtain services of different mechanisms can be reduced while the service security is ensured, network resources are saved, and the user operation process is simplified.

Description

身份認證方法、裝置、設備及電腦可讀存儲介質 Identity authentication method, device, equipment and computer-readable storage medium

本發明屬於電腦技術領域,尤其涉及一種身份認證方法、裝置、設備及電腦可讀存儲介質。 The invention belongs to the field of computer technology, and in particular relates to an identity authentication method, device, equipment and computer-readable storage medium.

隨著科技的不斷發展,越來越多的機構逐漸將線下服務搬至線上,以方便用戶隨時隨地進行業務查詢、業務辦理等操作。在各個機構為使用者提供線上服務之前,均需要對使用者的身份進行認證,以確保業務安全性。 With the continuous development of science and technology, more and more institutions are gradually moving their offline services to online, so that users can conduct business inquiries, business processing and other operations anytime and anywhere. Before each organization provides online services to users, it needs to authenticate the user's identity to ensure business security.

目前,由於各個機構的身份認證系統之間相互獨立,因此需要使用者在各個機構的服務平臺分別填寫用戶名和密碼進行登錄,以完成身份認證,進而導致網路資源浪費、使用者操作繁瑣等問題。 At present, since the identity authentication systems of each organization are independent of each other, users need to log in with their user names and passwords on the service platforms of each organization to complete identity authentication, which leads to waste of network resources and cumbersome user operations. .

本發明實施例提供一種身份認證方法、裝置、設備及電腦可讀存儲介質,能夠在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約網路資源,簡化使用者操作過程。 Embodiments of the present invention provide an identity authentication method, device, equipment, and computer-readable storage medium, which can reduce the number of login times required for users to obtain services from different institutions while ensuring business security, save network resources, and simplify user operations process.

第一方面,本發明實施例提供一種身份認證方法,應用於身份認證服務器,該方法包括: In a first aspect, an embodiment of the present invention provides an identity authentication method, which is applied to an identity authentication server, and the method includes:

接收用戶端發送的針對第一機構的服務請求,其中,服務請求中包括多個令牌,多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給目標使用者的令牌,目標使用者為用戶端中登錄的用戶; Receive a service request for the first organization sent by the client, wherein the service request includes multiple tokens, and the multiple tokens are for multiple servers to perform identity authentication on the target user, and if the identity authentication is passed, The token assigned to the target user, which is the user logged in in the client;

將多個令牌與區塊鏈中存儲的令牌進行匹配,確定目標使用者是否為已認證用戶; Match multiple tokens with tokens stored in the blockchain to determine whether the target user is an authenticated user;

在確定目標使用者為已認證使用者的情況下,將服務請求轉發至與第一機構對應的第一服務器,以使第一服務器回應服務請求。 If it is determined that the target user is an authenticated user, the service request is forwarded to the first server corresponding to the first organization, so that the first server responds to the service request.

第二方面,本發明實施例提供一種身份認證方法,應用於第一服務器,該方法包括: In a second aspect, an embodiment of the present invention provides an identity authentication method applied to a first server, the method comprising:

接收身份認證服務器轉發的服務請求,其中,服務請求中包括多個令牌,多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給目標使用者的令牌,目標使用者為發送服務請求至身份認證服務器的用戶端中登錄的用戶; Receive the service request forwarded by the identity authentication server, wherein the service request includes multiple tokens, and the multiple tokens are for multiple servers to authenticate the target user respectively, and if the identity authentication passes, they are allocated to the target user The token of the user, the target user is the user logged in in the client that sends the service request to the identity authentication server;

將多個令牌與區塊鏈中存儲的令牌進行匹配,確定目標使用者是否為已認證用戶; Match multiple tokens with tokens stored in the blockchain to determine whether the target user is an authenticated user;

在確定目標使用者為已認證使用者的情況下,回應服務請求。 Respond to the service request if the target user is determined to be an authenticated user.

第三方面,本發明實施例提供一種身份認證方法,應用於第二服務器,該方法包括: In a third aspect, an embodiment of the present invention provides an identity authentication method, which is applied to a second server, and the method includes:

接收用戶端採集的與目標使用者對應的使用者身份資訊; Receive the user identity information corresponding to the target user collected by the client;

根據使用者身份資訊對目標使用者進行身份認證; Authenticate the target user based on the user's identity information;

在認證通過的情況下,為目標使用者分配第二令牌,將第二令牌發送至用戶端,以及將第二令牌上傳至區塊鏈,以使其他機構的服務器根據包括第二令牌在內的多個令牌確定目標使用者是否為已認證用戶。 If the authentication is passed, allocate a second token to the target user, send the second token to the client, and upload the second token to the blockchain, so that the servers of other institutions Multiple tokens, including tokens, determine whether the target user is an authenticated user.

第四方面,本發明實施例提供了一種身份認證裝置,應用於身份認證服務器,該裝置包括: In a fourth aspect, an embodiment of the present invention provides an identity authentication device, which is applied to an identity authentication server, and the device includes:

第一接收模組,用於接收用戶端發送的針對第一機構的服務請求,其中,服務請求中包括多個令牌,多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給目標使用者的令牌,目標使用者為用戶端中登錄的用戶; The first receiving module is used to receive the service request for the first organization sent by the client, wherein the service request includes a plurality of tokens, and the plurality of tokens are for multiple servers to respectively authenticate the target user, and When the identity authentication is passed, the token assigned to the target user, the target user is the user logged in on the client;

第一匹配模組,用於將多個令牌與區塊鏈中存儲的令牌進行匹配,確定目標使用者是否為已認證用戶; The first matching module is used to match multiple tokens with tokens stored in the block chain to determine whether the target user is an authenticated user;

請求轉發模組,用於在確定目標使用者為已認證使用者的情 況下,將服務請求轉發至與第一機構對應的第一服務器,以使第一服務器回應服務請求。 The request forwarding module is used to confirm that the target user is an authenticated user In some cases, the service request is forwarded to the first server corresponding to the first organization, so that the first server responds to the service request.

第五方面,本發明實施例提供了一種身份認證裝置,應用於第一服務器,該裝置包括: In a fifth aspect, an embodiment of the present invention provides an identity authentication device, which is applied to a first server, and the device includes:

第二接收模組,用於接收身份認證服務器轉發的服務請求,其中,服務請求中包括多個令牌,多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給目標使用者的令牌,目標使用者為發送服務請求至身份認證服務器的用戶端中登錄的用戶; The second receiving module is used to receive the service request forwarded by the identity authentication server, wherein the service request includes a plurality of tokens, and the plurality of tokens are for multiple servers to perform identity authentication on the target user respectively, and when the identity authentication passes In the case of , the token assigned to the target user is the user logged in in the client that sends the service request to the identity authentication server;

第二匹配模組,用於將多個令牌與區塊鏈中存儲的令牌進行匹配,確定目標使用者是否為已認證用戶; The second matching module is used to match multiple tokens with tokens stored in the block chain to determine whether the target user is an authenticated user;

服務回應模組,用於在確定目標使用者為已認證使用者的情況下,回應服務請求。 The service response module is used to respond to the service request when the target user is determined to be an authenticated user.

第六方面,本發明實施例提供了一種身份認證裝置,應用於第二服務器,該裝置包括: In a sixth aspect, an embodiment of the present invention provides an identity authentication device, which is applied to a second server, and the device includes:

第三接收模組,用於接收用戶端採集的與目標使用者對應的使用者身份資訊; The third receiving module is used to receive the user identity information corresponding to the target user collected by the client;

第一身份認證模組,用於根據使用者身份資訊對目標使用者進行身份認證; The first identity authentication module is used to authenticate the target user according to the user identity information;

第一令牌分配模組,用於在認證通過的情況下,為目標使用者分配第二令牌,將第二令牌發送至用戶端,以及將第二令牌上傳至區塊鏈,以使其他機構的服務器根據包括第二令牌在內的多個令牌確定目標使用者是否為已認證用戶。 The first token allocation module is used to allocate a second token to the target user when the authentication is passed, send the second token to the client, and upload the second token to the block chain to Make the server of other institutions determine whether the target user is an authenticated user according to multiple tokens including the second token.

第七方面,本發明實施例提供了一種電子設備,該電子設備包括:處理器以及存儲有電腦程式指令的記憶體; In a seventh aspect, an embodiment of the present invention provides an electronic device, which includes: a processor and a memory storing computer program instructions;

處理器執行所述電腦程式指令時實現如第一方面、第二方面和/或第三方面的任一項實施例中所述的身份認證方法的步驟。 When the processor executes the computer program instructions, the steps of the identity authentication method described in any one embodiment of the first aspect, the second aspect and/or the third aspect are realized.

第八方面,本發明實施例提供了一種電腦可讀存儲介質,電 腦可讀存儲介質上存儲有電腦程式指令,電腦程式指令被處理器執行時實現如第一方面、第二方面和/或第三方面的任一項實施例中所述的身份認證方法的步驟。 In an eighth aspect, the embodiment of the present invention provides a computer-readable storage medium, Computer program instructions are stored on the brain-readable storage medium, and when the computer program instructions are executed by the processor, the steps of the identity authentication method described in any embodiment of the first aspect, the second aspect and/or the third aspect are realized .

本發明實施例中的身份認證方法、裝置、設備及電腦可讀存儲介質,通過在接收到用戶端發送的針對第一機構的服務請求的情況下,利用服務請求中包含的由多個服務器分別對目標使用者進行身份認證後,分配給目標使用者的令牌,將該多個令牌與區塊鏈中存儲的令牌進行匹配,以此確定目標使用者是否為已認證使用者,從而在確定目標使用者為已認證使用者的情況下,將服務請求轉發至第一機構對應的第一服務器,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應。這樣,由於多個服務器已對目標使用者的身份進行了認證,為用戶提供了可靠的身份背書,且利用區塊鏈共用目標使用者在身份認證通過後分配得到的令牌,使得用戶的身份認證結果可以與鏈上的其他機構共用,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應,因此,實現了在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約了網路資源,簡化了使用者操作過程。 In the identity authentication method, device, device, and computer-readable storage medium in the embodiments of the present invention, when receiving the service request sent by the client for the first institution, using the service request included in the service request, which is composed of multiple servers respectively After the target user is authenticated, the tokens assigned to the target user are matched with the tokens stored in the blockchain to determine whether the target user is an authenticated user, thereby When it is determined that the target user is an authenticated user, the service request is forwarded to the first server corresponding to the first organization, and further, when the user does not need to log in to the service platform of the first organization, the first server communicates with the client. Responses to Service Requests. In this way, since multiple servers have authenticated the identity of the target user, a reliable identity endorsement is provided for the user, and the blockchain is used to share the tokens allocated by the target user after the identity authentication is passed, so that the user's identity The authentication result can be shared with other institutions on the chain, and then the first server can respond to the service request of the client without the user needing to log in to the service platform of the first institution. The number of times users need to log in to obtain services from different institutions saves network resources and simplifies the user's operation process.

10:用戶端 10: Client

11:身份認證服務器 11: Identity authentication server

12:機構服務器 12: Institutional server

600,700,800:身份認證裝置 600,700,800: identity authentication device

601:第一接收模組 601: The first receiving module

602:第一匹配模組 602: The first matching module

603:請求轉發模組 603: request forwarding module

701:第二接收模組 701: The second receiving module

702:第二匹配模組 702: The second matching module

703:服務回應模組 703: Service response module

801:第三接收模組 801: The third receiving module

802:第一身份認證模組 802: The first identity authentication module

803:第一令牌分配模組 803: The first token allocation module

900:電子設備 900: Electronic equipment

901:處理器 901: Processor

902:記憶體 902: memory

903:通信介面 903: communication interface

904:匯流排 904: busbar

S210,S220,S230,S310,S320,S330,S410,S420,S430:步驟 S210,S220,S230,S310,S320,S330,S410,S420,S430: steps

為了更清楚地說明本發明實施例的技術方案,下面將對本發明實施例中所需要使用的圖式作簡單的介紹,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據這些圖式獲得其他的圖式。 In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the diagrams that need to be used in the embodiments of the present invention will be briefly introduced below. Other schemas can be derived from these schemas.

圖1是本發明實施例提供的身份認證方法所適用的架構圖; Fig. 1 is an applicable architecture diagram of the identity authentication method provided by the embodiment of the present invention;

圖2是本發明第一方面提供的身份認證方法的一實施例的流程示意圖; Fig. 2 is a schematic flowchart of an embodiment of the identity authentication method provided by the first aspect of the present invention;

圖3是本發明第二方面提供的身份認證方法的一實施例的流程示意圖; Fig. 3 is a schematic flowchart of an embodiment of an identity authentication method provided by the second aspect of the present invention;

圖4是本發明第三方面提供的身份認證方法的一實施例的流程示意圖; Fig. 4 is a schematic flowchart of an embodiment of an identity authentication method provided by the third aspect of the present invention;

圖5是本發明實施例提供的身份認證方法的一實施例的流程示意圖; Fig. 5 is a schematic flowchart of an embodiment of an identity authentication method provided by an embodiment of the present invention;

圖6是本發明第一方面提供的身份認證裝置的一實施例的結構示意圖; Fig. 6 is a schematic structural diagram of an embodiment of the identity authentication device provided by the first aspect of the present invention;

圖7是本發明第二方面提供的身份認證裝置的一實施例的結構示意圖; Fig. 7 is a schematic structural diagram of an embodiment of the identity authentication device provided by the second aspect of the present invention;

圖8是本發明第三方面提供的身份認證裝置的一實施例的結構示意圖; Fig. 8 is a schematic structural diagram of an embodiment of the identity authentication device provided by the third aspect of the present invention;

圖9是本發明實施例提供的電子設備的結構示意圖。 FIG. 9 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention.

下面將詳細描述本發明的各個方面的特徵和示例性實施例,為了使本發明的目的、技術方案及優點更加清楚明白,以下結合圖式及具體實施例,對本發明進行進一步詳細描述。應理解,此處所描述的具體實施例僅意在解釋本發明,而不是限定本發明。對於本領域技術人員來說,本發明可以在不需要這些具體細節中的一些細節的情況下實施。下面對實施例的描述僅僅是為了通過示出本發明的示例來提供對本發明更好的理解。 The characteristics and exemplary embodiments of various aspects of the present invention will be described in detail below. In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the drawings and specific embodiments. It should be understood that the specific embodiments described here are only intended to explain the present invention rather than limit the present invention. It will be apparent to one skilled in the art that the present invention may be practiced without some of these specific details. The following description of the embodiments is only to provide a better understanding of the present invention by showing examples of the present invention.

需要說明的是,在本文中,諸如第一和第二等之類的關係術語僅僅用來將一個實體或者操作與另一個實體或操作區分開來,而不一定要求或者暗示這些實體或操作之間存在任何這種實際的關係或者順序。而且,術語“包括”、“包含”或者其任何其他變體意在涵蓋非排他性的包含,從而使得包括一系列要素的過程、方法、物品或者設備不僅包括那些要素,而且還包括沒有明確列出的其他要素,或者是還包括為這種過程、方法、物品或者設備所固有的要素。在沒有更多限制的情況下,由語句“包括……”限定的要素,並不排除在包括所述要素的過程、方法、物品或者設備中還存在另外的相同要素。 It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the statement "comprising..." does not exclude the presence of additional same elements in the process, method, article or device comprising said element.

目前,使用者獲取多個機構的線上服務的方式主要是,通過分別打開不同機構的服務平臺,輸入每個平臺對應的用戶名和密碼進行登錄並通過身份認證後,再使用相應的服務功能。這樣,導致使用者需要重複登錄,造成網路資源浪費、使用者操作繁瑣等問題。例如,由於各銀行的身份認證服務不能通用,在首次公開募股(Initial Public Offering,IPO)流水核查專案中,使用者需要查詢多家銀行的帳戶資金流水,按照通常的技術實現方案,使用者需要在多家銀行輸入用戶名和密碼重複登錄,使得使用者體驗極不友好。 At present, the main way for users to obtain online services of multiple institutions is to open the service platforms of different institutions respectively, enter the user name and password corresponding to each platform to log in and pass the identity authentication, and then use the corresponding service functions. In this way, the user needs to log in repeatedly, causing problems such as waste of network resources and cumbersome operations for the user. For example, since the identity authentication services of various banks cannot be used universally, in the initial public offering (IPO) flow verification project, users need to query the account fund flow of multiple banks. According to the usual technical implementation plan, the user needs Entering the user name and password to log in repeatedly in multiple banks makes the user experience extremely unfriendly.

為了解決現有技術問題,本發明實施例提供了一種身份認證方法、裝置、設備及電腦可讀存儲介質。本發明所提供的身份認證方法,可以應用於如圖1的架構中,具體結合圖1進行詳細說明。 In order to solve the problems in the prior art, embodiments of the present invention provide an identity authentication method, device, equipment and computer-readable storage medium. The identity authentication method provided by the present invention can be applied to the architecture shown in FIG. 1 , and will be described in detail with reference to FIG. 1 .

圖1示出了本發明提供的身份認證的一示例的架構圖。 Fig. 1 shows an architecture diagram of an example of identity authentication provided by the present invention.

如圖1所示,該架構圖中可以包括至少一個用戶端10、身份認證服務器11和多個機構服務器12。身份認證服務器11為用戶端10提供了一個統一的服務介面,用戶端10可通過該服務介面向多個機構服務器12請求服務。其中,用戶端10、身份認證服務器11以及機構服務器12之間可以通過網路建立連接並進行資訊交互。另外,用戶端10可以安裝於手機、平板電腦、一體機等具有通訊功能的設備中,也可以安裝於虛擬機器或模擬器類比的設備。身份認證服務器11和機構服務器12可以是雲服務器或者服務器集群等具有存儲以及計算功能的設備。此外,身份認證服務器11和多個機構服務器12可以為同一區塊鏈上的服務器,使得多個機構服務器12中的任意服務器均可通過區塊鏈共用用戶身份認證結果,且鏈上的其他服務器均可通過區塊鏈對用戶身份進行驗證。 As shown in FIG. 1 , the architecture diagram may include at least one client terminal 10 , an identity authentication server 11 and multiple institution servers 12 . The identity authentication server 11 provides a unified service interface for the client 10, and the client 10 can request services from multiple institutional servers 12 through the service interface. Among them, the client 10, the identity authentication server 11 and the organization server 12 can establish a connection and exchange information through the network. In addition, the client terminal 10 can be installed in a device with a communication function such as a mobile phone, a tablet computer, and an all-in-one machine, or it can be installed in a device similar to a virtual machine or a simulator. The identity authentication server 11 and the institution server 12 may be cloud servers or server clusters and other devices with storage and computing functions. In addition, the identity authentication server 11 and multiple institutional servers 12 can be servers on the same block chain, so that any server in multiple institutional servers 12 can share the user identity authentication results through the block chain, and other servers on the chain User identities can be verified through the blockchain.

這裡,多個機構服務器12中可包括與第一機構對應的第一服務器和與第二機構對應的第二服務器。 Here, the plurality of institution servers 12 may include a first server corresponding to a first institution and a second server corresponding to a second institution.

需要說明的是,身份認證服務器11可以是與用戶端10對應的服務器,也可以是第三方機構設置的用於提供統一的服務介面的服務器。 It should be noted that the identity authentication server 11 may be a server corresponding to the client 10, or a server set up by a third-party organization for providing a unified service interface.

另外,本發明所提供的身份認證方法可以應用於對請求服務的使用者進行身份認證的場景,下面結合上述架構和場景對本發明所提供的身份認證方法進行介紹。 In addition, the identity authentication method provided by the present invention can be applied to the scenario of authenticating the user requesting the service. The identity authentication method provided by the present invention will be introduced below in combination with the above-mentioned framework and scenarios.

圖2示出了本發明提供的身份認證方法的一實施例的流程示意圖。該身份認證方法可應用於身份認證服務器。如圖2所示,該身份認證方法具體可以包括如下步驟: Fig. 2 shows a schematic flowchart of an embodiment of an identity authentication method provided by the present invention. The identity authentication method can be applied to an identity authentication server. As shown in Figure 2, the identity authentication method may specifically include the following steps:

S210,接收用戶端發送的針對第一機構的服務請求,其中,服務請求中包括多個令牌,多個令牌為多個服務器分別對目標使用者進行 身份認證,且在身份認證通過的情況下,分配給目標使用者的令牌,目標使用者為用戶端中登錄的用戶。 S210. Receive a service request for the first organization sent by the client, wherein the service request includes multiple tokens, and the multiple tokens are used by multiple servers to perform Identity authentication, and in the case of passing the identity authentication, the token assigned to the target user, the target user is the user logged in on the client.

S220,將多個令牌與區塊鏈中存儲的令牌進行匹配,確定目標使用者是否為已認證用戶。 S220, matching the multiple tokens with the tokens stored in the blockchain to determine whether the target user is an authenticated user.

S230,在確定目標使用者為已認證使用者的情況下,將服務請求轉發至與第一機構對應的第一服務器,以使第一服務器回應服務請求。 S230. If it is determined that the target user is an authenticated user, forward the service request to the first server corresponding to the first institution, so that the first server responds to the service request.

由此,通過在接收到用戶端發送的針對第一機構的服務請求的情況下,利用服務請求中包含的由多個服務器分別對目標使用者進行身份認證後,分配給目標使用者的令牌,將該多個令牌與區塊鏈中存儲的令牌進行匹配,以此確定目標使用者是否為已認證使用者,從而在確定目標使用者為已認證使用者的情況下,將服務請求轉發至第一機構對應的第一服務器,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應。這樣,由於多個服務器已對目標使用者的身份進行了認證,為用戶提供了可靠的身份背書,且利用區塊鏈共用目標使用者在身份認證通過後分配得到的令牌,使得用戶的身份認證結果可以與鏈上的其他機構共用,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應,因此,實現了在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約了網路資源,簡化了使用者操作過程。 Thus, when receiving the service request sent by the client for the first organization, using the service request included in the service request, the target user is authenticated by multiple servers, and the token allocated to the target user , match the multiple tokens with the tokens stored in the blockchain to determine whether the target user is an authenticated user, so that if the target user is an authenticated user, the service request The information is forwarded to the first server corresponding to the first organization, and then the first server responds to the service request of the client without the user needing to log in to the service platform of the first organization. In this way, since multiple servers have authenticated the identity of the target user, a reliable identity endorsement is provided for the user, and the blockchain is used to share the tokens allocated by the target user after the identity authentication is passed, so that the user's identity The authentication result can be shared with other institutions on the chain, and then the first server can respond to the service request of the client without the user needing to log in to the service platform of the first institution. The number of times users need to log in to obtain services from different institutions saves network resources and simplifies the user's operation process.

下面介紹上述各個步驟的具體實現方式。 The specific implementation of each of the above steps is introduced below.

在一些實施方式中,在S210中,令牌(token)例如可以是使用者成功登錄相應機構服務平臺後返回的會話token。由於各機構分別架設有相應的服務器,使用者調用某機構服務前,需先輸入用戶名和密碼登錄。而用戶成功登錄後,該服務器會返回一個會話token。會話token在一段時間內有效,用戶攜帶有效的會話token訪問服務時則無需再重複登錄。 In some implementations, in S210, the token (token) may be, for example, a session token returned after the user successfully logs in to the service platform of the corresponding institution. Since each organization has set up corresponding servers, users need to enter the user name and password to log in before calling the service of a certain organization. After the user successfully logs in, the server will return a session token. The session token is valid for a period of time, and users do not need to log in again when accessing the service with a valid session token.

示例性地,在已登錄用戶端的目標使用者需要請求第一機構 的某個服務時,可在服務請求中攜帶使用者已登錄過的且已通過身份認證的服務器分配的令牌,如此,身份認證服務器作為技術轉接服務器,在接收到該請求後,可通過攜帶的多個令牌直接對目標使用者的身份進行驗證,確認其是否為已認證的用戶。 Exemplarily, the target user in the logged-in client needs to request the first organization For a certain service, the token assigned by the server that the user has logged in and has passed the identity authentication can be carried in the service request. In this way, the identity authentication server, as the technology transfer server, can pass the The multiple tokens carried directly verify the identity of the target user to confirm whether it is an authenticated user.

在一些實施方式中,上述多個服務器可以包括身份認證服務器和與第二機構對應的第二服務器,多個令牌可以包括身份認證服務器分配的第一令牌和第二服務器分配的第二令牌。 In some implementations, the plurality of servers may include an identity authentication server and a second server corresponding to the second organization, and the plurality of tokens may include a first token assigned by the identity authentication server and a second token assigned by the second server. Card.

也就是說,用戶可通過兩次登錄操作完成兩次身份驗證,即可實現在免登錄的情況下獲取第一機構的服務。第一機構可以為多個。具體的,可以通過身份認證服務器和第二服務器分別對目標使用者進行身份認證,在身份認證服務器對目標使用者的身份認證通過的情況下,身份認證服務器給目標使用者分配第一令牌,在第二服務器對目標使用者的身份認證通過的情況下,第二服務器給目標使用者分配第二令牌。第一令牌可以為目標使用者已通過身份認證服務器的身份認證的憑證,第二令牌可以為目標使用者已通過第二服務器的身份認證的憑證。憑藉第一令牌和第二令牌可以在免登錄的情況下獲取任意第一機構的服務。 That is to say, the user can complete two authentications through two login operations, and can obtain the services of the first institution without login. There may be multiple first institutions. Specifically, the identity authentication server and the second server may respectively perform identity authentication on the target user, and when the identity authentication server passes the identity authentication of the target user, the identity authentication server assigns the first token to the target user, When the second server passes the identity authentication of the target user, the second server allocates the second token to the target user. The first token may be a credential that the target user has passed the identity authentication of the identity authentication server, and the second token may be the credential that the target user has passed the identity authentication of the second server. With the help of the first token and the second token, services of any first organization can be obtained without login.

如此,用戶只需通過兩次登錄操作,即可實現在免登錄的情況下獲取任意第一機構的服務,簡化了使用者操作過程,提升了用戶體驗。 In this way, the user only needs to log in twice to obtain the service of any first institution without logging in, which simplifies the user's operation process and improves the user experience.

在一些實施方式中,在上述S210之前,該方法還可以包括: In some implementation manners, before the above S210, the method may further include:

接收用戶端採集的與目標使用者對應的使用者身份資訊; Receive the user identity information corresponding to the target user collected by the client;

根據使用者身份資訊對目標使用者進行身份認證; Authenticate the target user based on the user's identity information;

在認證通過的情況下,為目標使用者分配第一令牌,將第一令牌發送至用戶端,以及將第一令牌上傳至區塊鏈。 If the authentication is passed, assign the first token to the target user, send the first token to the client, and upload the first token to the block chain.

這裡,在接收用戶端發送的針對第一機構的服務請求之前,需要先對目標使用者進行兩次身份認證,分別為身份認證服務器對目標使用者的身份認證和第二服務器對目標使用者的身份認證。 Here, before receiving the service request for the first organization sent by the client, the target user needs to be authenticated twice, namely the identity authentication server for the target user and the second server for the target user. Authentication.

其中,身份認證服務器可以通過接收目標使用者的使用者身 份資訊,並基於使用者身份資訊對目標使用者進行身份認證,若認證通過,則為目標使用者分配第一令牌,將第一令牌發送至用戶端,以及將第一令牌上傳至區塊鏈。使用者身份資訊可以為能夠唯一確定目標使用者身份的資訊,例如目標使用者在用戶端進行實名認證時填寫的資訊,該使用者身份資訊可用於對目標使用者進行身份認證。為目標使用者分配第一令牌,將第一令牌發送至用戶端,可以使目標使用者能夠憑藉第一令牌證明目標使用者已通過身份認證服務器的身份認證。將第一令牌上傳至區塊鏈可以使第一服務器和第二服務器均能夠接收到該第一令牌,從而可以使第一服務器和第二服務器根據該第一令牌確定目標使用者是否已通過身份認證服務器的身份認證。 Among them, the identity authentication server can receive the user identity of the target user information, and based on the user identity information to authenticate the target user, if the authentication is passed, assign the first token to the target user, send the first token to the client, and upload the first token to blockchain. The user identity information may be information that can uniquely determine the identity of the target user, such as information filled in by the target user when performing real-name authentication on the client terminal, and the user identity information can be used for identity authentication of the target user. Allocating the first token to the target user, and sending the first token to the client can enable the target user to use the first token to prove that the target user has passed the identity authentication of the identity authentication server. Uploading the first token to the block chain can enable both the first server and the second server to receive the first token, so that the first server and the second server can determine whether the target user is based on the first token Authenticated by the authentication server.

在一些具體的例子中,目標使用者通過用戶名和密碼登錄用戶端後,可以輸入使用者身份資訊進行實名認證,身份認證服務器可以接收到該使用者身份資訊,並根據該使用者身份資訊對目標使用者進行實名認證,也即身份認證,認證通過後,可以為目標使用者分配第一令牌,將第一令牌發送至用戶端,以及將第一令牌上傳至區塊鏈。 In some specific examples, after the target user logs in to the client terminal through the user name and password, he can enter the user identity information for real-name authentication, and the identity authentication server can receive the user identity information, and according to the user identity information The user performs real-name authentication, that is, identity authentication. After the authentication is passed, the first token can be allocated to the target user, the first token is sent to the client, and the first token is uploaded to the blockchain.

如此,通過使用者身份資訊對目標使用者進行身份認證,並在認證通過的情況下為目標使用者分配第一令牌,將第一令牌發送至所述用戶端,以及將第一令牌上傳至區塊鏈,可以使目標使用者能夠憑藉第一令牌證明目標使用者已通過身份認證服務器的身份認證,並且可以使第一服務器和第二服務器根據該第一令牌確定目標使用者是否已通過身份認證服務器的身份認證。 In this way, the target user is authenticated through the user identity information, and if the authentication is passed, the target user is assigned a first token, the first token is sent to the client, and the first token Uploading to the block chain can enable the target user to prove that the target user has passed the identity authentication of the identity authentication server with the first token, and can make the first server and the second server determine the target user according to the first token Whether it has been authenticated by the authentication server.

在一些實施方式中,在S220中,由於多個服務器在給目標使用者分配令牌時,也將令牌上傳到了區塊鏈中,因此,區塊鏈中也存儲了多個令牌,將服務請求中包括的多個令牌與區塊鏈中存儲的令牌進行匹配,可以確定目標使用者是否為已認證用戶。這裡,已認證用戶可以為已通過身份認證服務器和第二服務器的身份認證的用戶。 In some implementations, in S220, since multiple servers also upload tokens to the blockchain when they distribute tokens to target users, multiple tokens are also stored in the blockchain, and the Multiple tokens included in the service request are matched against tokens stored in the blockchain to determine whether the target user is an authenticated user. Here, the authenticated user may be a user who has been authenticated by the identity authentication server and the second server.

在一些實施方式中,上述S220可以包括: In some implementations, the above S220 may include:

將第二令牌與區塊鏈中存儲的令牌進行匹配; matching the second token with tokens stored in the blockchain;

在區塊鏈中存在與第二令牌相匹配的令牌的情況下,獲取與第一令牌對應的使用者身份資訊,以及,確定分配第二令牌的第二機構,從與第二機構對應的第二服務器中獲取與第二令牌對應的使用者身份資訊; If there is a token in the blockchain that matches the second token, obtain user identity information corresponding to the first token, and determine the second institution that distributes the second token, from the second Obtain the user identity information corresponding to the second token from the second server corresponding to the institution;

將第一令牌對應的使用者身份資訊與第二令牌對應的使用者身份資訊進行比對; comparing the user identity information corresponding to the first token with the user identity information corresponding to the second token;

在使用者身份資訊比對一致的情況下,確定目標使用者為已認證使用者; When the user identity information is consistent, determine the target user as an authenticated user;

在區塊鏈中不存在與第二令牌相匹配的令牌,或者使用者身份資訊比對不一致的情況下,確定目標使用者不是已認證使用者。 If there is no token matching the second token in the block chain, or the user identity information is inconsistent, it is determined that the target user is not an authenticated user.

這裡,先將第二服務器分配的第二令牌與區塊鏈中存儲的令牌進行匹配,若區塊鏈中不存在與第二令牌相匹配的令牌,則可以確定目標使用者不是已認證使用者;若區塊鏈中存在與第二令牌相匹配的令牌,則可以通過比對使用者身份資訊,進一步確定目標使用者是否為已認證用戶。 Here, first match the second token allocated by the second server with the token stored in the blockchain, if there is no token matching the second token in the blockchain, it can be determined that the target user is not An authenticated user; if there is a token matching the second token in the block chain, it can be further determined whether the target user is an authenticated user by comparing the user identity information.

具體的,可以先獲取與第一令牌對應的使用者身份資訊和與第二令牌對應的使用者身份資訊。由於第一令牌是身份認證服務器在接收到使用者身份資訊並認證通過後分配的,因此身份認證服務器中存儲了第一令牌對應的使用者身份資訊,可以直接獲取到。而第二令牌是第二機構對應的第二服務器接收到使用者身份資訊並認證通過後分配的,因此第二令牌對應的使用者身份資訊存儲在第二服務器中,所以需要先確定分配第二令牌的第二機構,然後從第二機構對應的第二服務器中獲取第二令牌對應的使用者身份資訊。第二令牌可以攜帶第二機構的標識,因此可以根據第二令牌確定分配該第二令牌的第二機構。 Specifically, user identity information corresponding to the first token and user identity information corresponding to the second token may be acquired first. Since the first token is allocated by the identity authentication server after receiving the user identity information and passing the authentication, the identity authentication server stores the user identity information corresponding to the first token and can be obtained directly. The second token is allocated by the second server corresponding to the second organization after receiving the user identity information and passing the authentication. Therefore, the user identity information corresponding to the second token is stored in the second server, so it is necessary to determine the allocation first. The second organization of the second token obtains the user identity information corresponding to the second token from the second server corresponding to the second organization. The second token may carry the identifier of the second organization, so the second organization that distributes the second token can be determined according to the second token.

然後,可以通過將第一令牌對應的使用者身份資訊與第二令牌對應的使用者身份資訊進行比對,來判斷發起服務請求的目標使用者是否為攜帶其他用戶令牌的偽裝者。若使用者身份資訊比對一致,則可以確 定目標使用者為已認證使用者。若使用者身份資訊比對不一致,則可以確定目標使用者不是已認證使用者。 Then, by comparing the user identity information corresponding to the first token with the user identity information corresponding to the second token, it can be determined whether the target user who initiates the service request is a faker carrying another user token. If the user identity information is consistent, it can be confirmed Target users as authenticated users. If the user identity information is inconsistent, it can be determined that the target user is not an authenticated user.

在一些具體的例子中,身份認證服務器將令牌A,也即第二令牌與區塊鏈中存儲的令牌進行匹配,若區塊鏈中不存在與令牌A匹配的令牌,則確定目標使用者不是已認證使用者;若區塊鏈中存在與令牌A匹配的令牌,則獲取令牌B,也即第一令牌,對應的使用者身份資訊,並從令牌A中解析出分配令牌A的機構a,也即第二機構,然後從機構a中獲取令牌B對應的使用者身份資訊,將令牌A對應的使用者身份資訊和令牌B對應的使用者身份資訊進行比對,若比對一致,則確定目標使用者為已認證使用者;若比對不一致,則則確定目標使用者不是已認證使用者。 In some specific examples, the identity authentication server matches token A, that is, the second token, with tokens stored in the blockchain. If there is no token matching token A in the blockchain, then Determine that the target user is not an authenticated user; if there is a token matching token A in the blockchain, then obtain token B, that is, the first token, the corresponding user identity information, and obtain the corresponding user identity information from token A Analyze the organization a that allocates token A, that is, the second organization, and then obtain the user identity information corresponding to token B from organization a, and use the user identity information corresponding to token A and token B If the comparison is consistent, it is determined that the target user is an authenticated user; if the comparison is inconsistent, it is determined that the target user is not an authenticated user.

如此,通過判斷區塊鏈中是否存在與第二令牌相匹配的令牌,以及判斷第一令牌對應的使用者身份資訊與第二令牌對應的使用者身份資訊是否一致,來確定目標使用者是否為已認證用戶,可以通過兩次判斷來確定目標使用者是否為已認證用戶,提高了用戶登錄的安全性。 In this way, the target is determined by judging whether there is a token matching the second token in the blockchain, and judging whether the user identity information corresponding to the first token is consistent with the user identity information corresponding to the second token Whether the user is an authenticated user can be determined through two judgments to determine whether the target user is an authenticated user, which improves the security of user login.

在一些實施方式中,第二令牌可以為第二機構的機構服務器利用身份認證服務器的公開金鑰對分配給目標使用者的原始令牌進行加密後得到的令牌,上述將第二令牌與區塊鏈中存儲的令牌進行匹配,可以包括: In some implementations, the second token may be a token obtained by encrypting the original token distributed to the target user by the organization server of the second organization using the public key of the identity authentication server. Matching with tokens stored in the blockchain can include:

利用公開金鑰對第二令牌進行解密,得到原始令牌; Using the public key to decrypt the second token to obtain the original token;

將原始令牌與區塊鏈中存儲的令牌進行匹配; Match the original token with the one stored in the blockchain;

上述確定分配第二令牌的第二機構,可以包括: The above determination of the second institution for allocating the second token may include:

根據原始令牌確定分配第二令牌的第二機構。 A second authority to distribute the second token is determined based on the original token.

這裡,為了保證各個機構中使用者資訊的安全,避免某一機構通過偽造其他機構的令牌來從其他機構獲取使用者資訊,可以利用身份認證服務器的公開金鑰對分配給目標使用者的原始令牌進行加密,得到第二令牌。 Here, in order to ensure the security of user information in each organization and prevent a certain organization from obtaining user information from other organizations by forging tokens of other organizations, the public key pair of the identity authentication server can be used to distribute the original token of the target user. The token is encrypted to obtain a second token.

由於身份認證服務器需要從第二令牌中解析出分配第二令牌 的第二機構,因此需要利用公開金鑰對第二令牌進行解密,得到原始令牌,根據原始令牌確定分配第二令牌的第二機構。 Since the authentication server needs to parse out the second token from the second token Therefore, it is necessary to use the public key to decrypt the second token to obtain the original token, and determine the second organization that distributes the second token according to the original token.

在一些具體的例子中,身份認證服務器可以根據公開金鑰對令牌A進行解密,得到原始令牌C,從原始令牌C中解析出機構標識,從而根據該機構表示確定令牌A對應的機構a。 In some specific examples, the identity authentication server can decrypt the token A according to the public key to obtain the original token C, and parse out the organization identifier from the original token C, so as to determine the corresponding token A according to the organization. Institution a.

如此,對原始令牌進行加密,可以避免在將加密後的第二令牌上傳到區塊鏈後,某一機構通過偽造其他機構的令牌來從其他機構獲取使用者資訊,保證各機構的資訊安全。 In this way, encrypting the original token can prevent an organization from obtaining user information from other organizations by forging the tokens of other organizations after uploading the encrypted second token to the blockchain, ensuring the security of each organization. information security.

在一些實施方式中,在S230中,第一機構可以為使用者想要獲取服務的機構,若身份認證服務器確定目標使用者為已認證使用者,則可以將服務請求轉發至與第一機構對應的第一服務器,以使第一服務器回應服務請求。第一機構和第二機構均可以為銀行。服務請求可以為查詢第一機構的帳戶資金流水的請求,也可以是查詢帳戶餘額或銀行卡號的請求,當然也可以是其他請求,在此不做限定。 In some implementations, in S230, the first organization can be the organization that the user wants to obtain the service. If the identity authentication server determines that the target user is an authenticated user, the service request can be forwarded to the organization corresponding to the first organization. the first server, so that the first server responds to the service request. Both the first institution and the second institution may be banks. The service request may be a request to inquire about the fund flow of the account of the first institution, or a request to inquire about the account balance or bank card number, or of course other requests, which are not limited here.

在一些實施方式中,在上述S230之後,該方法還可以包括: In some implementations, after the above S230, the method may further include:

接收第一服務器發送的身份資訊獲取請求; receiving the identity information acquisition request sent by the first server;

回應於身份資訊獲取請求,將與目標使用者對應的使用者身份資訊發送至第一服務器,以使第一服務器根據使用者身份資訊回應服務請求,生成應答資訊; In response to the identity information acquisition request, send the user identity information corresponding to the target user to the first server, so that the first server responds to the service request according to the user identity information and generates response information;

接收第一服務器返回的應答資訊; receiving response information returned by the first server;

將應答資訊轉發至用戶端。 Forward the response information to the client.

這裡,在確定目標使用者為已認證使用者,並將服務請求轉發至第一服務器之後,第一服務器需要根據使用者身份資訊來生成應答資訊,因此,需要向身份認證服務器發送身份資訊獲取請求,身份認證服務器接收到該身份資訊獲取請求後,回應於身份資訊獲取請求,將與目標使用者對應的使用者身份資訊發送至第一服務器,第一服務器根據使用者身份資訊回應服務請求,生成應答資訊,然後將應答資訊發送至身份認證服 務器,身份認證服務器將應答資訊轉發至用戶端以便顯示給目標使用者。 Here, after determining that the target user is an authenticated user and forwarding the service request to the first server, the first server needs to generate response information according to the user identity information, so it needs to send an identity information acquisition request to the identity authentication server , after receiving the identity information acquisition request, the identity authentication server responds to the identity information acquisition request, and sends the user identity information corresponding to the target user to the first server, and the first server responds to the service request according to the user identity information, generating Response information, and then send the response information to the authentication server server, the authentication server forwards the response information to the client for display to the target user.

在一些具體的例子中,身份認證服務器在確定目標使用者為已認證使用者後,將查詢帳戶餘額的服務請求轉發至第一服務器,第一服務器向身份認證服務器發送獲取目標使用者的使用者身份資訊的身份資訊獲取請求,身份認證服務器接收到該身份資訊獲取請求後,回應於身份資訊獲取請求,將與目標使用者對應的使用者身份資訊發送至第一服務器,第一服務器根據使用者身份資訊回應服務請求,生成例如“帳戶餘額:3500”的應答資訊,然後將該應答資訊發送至身份認證服務器,身份認證服務器再將應答資訊轉發至用戶端顯示給目標使用者。 In some specific examples, after the identity authentication server determines that the target user is an authenticated user, it forwards the service request for querying the account balance to the first server, and the first server sends the user ID of the target user to the identity authentication server. An identity information acquisition request for identity information. After receiving the identity information acquisition request, the identity authentication server responds to the identity information acquisition request and sends the user identity information corresponding to the target user to the first server. The identity information responds to the service request, generates response information such as "account balance: 3500", and then sends the response information to the identity authentication server, and the identity authentication server forwards the response information to the client for display to the target user.

如此,通過上述過程實現了在無需登錄第一機構對應的服務平臺的情況下獲取第一服務器的服務,簡化了使用者操作過程。 In this way, through the above process, the service of the first server can be obtained without logging into the service platform corresponding to the first organization, which simplifies the user operation process.

圖3示出了本發明提供的身份認證方法的一實施例的流程示意圖。該身份認證方法可應用於第一服務器。 Fig. 3 shows a schematic flowchart of an embodiment of an identity authentication method provided by the present invention. The identity authentication method can be applied to the first server.

如圖3所示,該身份認證方法具體可以包括如下步驟: As shown in Figure 3, the identity authentication method may specifically include the following steps:

S310,接收身份認證服務器轉發的服務請求,其中,服務請求中包括多個令牌,多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給目標使用者的令牌,目標使用者為發送服務請求至身份認證服務器的用戶端中登錄的用戶; S310. Receive the service request forwarded by the identity authentication server, wherein the service request includes multiple tokens, and the multiple tokens are for multiple servers to perform identity authentication on the target user respectively, and if the identity authentication passes, the tokens are allocated to The token of the target user, the target user is the user logged in in the client that sends the service request to the identity authentication server;

S320,將多個令牌與區塊鏈中存儲的令牌進行匹配,確定目標使用者是否為已認證用戶; S320, matching multiple tokens with tokens stored in the block chain to determine whether the target user is an authenticated user;

S330,在確定目標使用者為已認證使用者的情況下,回應服務請求。 S330. Respond to the service request when it is determined that the target user is an authenticated user.

由此,通過在接收身份認證服務器轉發的服務請求之後,利用服務請求中包含的由多個服務器分別對目標使用者進行身份認證後,分配給目標使用者的令牌,將該多個令牌與區塊鏈中存儲的令牌進行匹配,以此確定目標使用者是否為已認證使用者,從而在確定目標使用者為已認證使用者的情況下,回應服務請求。由於多個服務器已對目標使用者的身 份進行了認證,為用戶提供了可靠的身份背書,且利用區塊鏈共用目標使用者在身份認證通過後分配得到的令牌,使得用戶的身份認證結果可以與鏈上的其他機構共用,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應,因此,實現了在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約了網路資源,簡化了使用者操作過程。 Thus, after receiving the service request forwarded by the identity authentication server, using the tokens allocated to the target user after the multiple servers respectively authenticate the target user included in the service request, the multiple tokens Match with the token stored in the blockchain to determine whether the target user is an authenticated user, so as to respond to the service request if the target user is determined to be an authenticated user. Since multiple servers have compromised the identity of the target user The user has been authenticated, providing a reliable identity endorsement for the user, and using the blockchain to share the tokens allocated by the target user after the identity authentication is passed, so that the user's identity authentication result can be shared with other institutions on the chain, and then In the case that the user does not need to log in to the service platform of the first organization, the response of the first server to the service request of the user end is realized. Therefore, the number of logins required for the user to obtain the services of different organizations is reduced while ensuring business security. It saves network resources and simplifies the user operation process.

下面介紹上述各個步驟的具體實現方式。 The specific implementation of each of the above steps is introduced below.

在一些實施方式中,在S310中,身份認證服務器在確定目標使用者為已認證使用者,將服務請求轉發至第一服務器,第一服務器接收身份認證服務器轉發的服務請求。 In some implementations, in S310, after determining that the target user is an authenticated user, the identity authentication server forwards the service request to the first server, and the first server receives the service request forwarded by the identity authentication server.

在一些實施方式中,上述多個服務器可以包括身份認證服務器和與第二機構對應的第二服務器,多個令牌可以包括身份認證服務器分配的第一令牌和第二服務器分配的第二令牌。 In some implementations, the plurality of servers may include an identity authentication server and a second server corresponding to the second organization, and the plurality of tokens may include a first token assigned by the identity authentication server and a second token assigned by the second server. Card.

也就是說,用戶可通過兩次登錄操作完成兩次身份驗證,即可實現在免登錄的情況下獲取第一機構的服務。第一機構可以為多個。具體的,可以通過身份認證服務器和第二服務器分別對目標使用者進行身份認證,在身份認證服務器對目標使用者的身份認證通過的情況下,身份認證服務器給目標使用者分配第一令牌,在第二服務器對目標使用者的身份認證通過的情況下,第二服務器給目標使用者分配第二令牌。第一令牌可以為目標使用者已通過身份認證服務器的身份認證的憑證,第二令牌可以為目標使用者已通過第二服務器的身份認證的憑證。憑藉第一令牌和第二令牌可以在免登錄的情況下獲取任意第一機構的服務。 That is to say, the user can complete two authentications through two login operations, and can obtain the services of the first institution without login. There may be multiple first institutions. Specifically, the identity authentication server and the second server may respectively perform identity authentication on the target user, and when the identity authentication server passes the identity authentication of the target user, the identity authentication server assigns the first token to the target user, When the second server passes the identity authentication of the target user, the second server allocates the second token to the target user. The first token may be a credential that the target user has passed the identity authentication of the identity authentication server, and the second token may be the credential that the target user has passed the identity authentication of the second server. With the help of the first token and the second token, services of any first organization can be obtained without login.

如此,用戶只需通過兩次登錄操作,即可實現在免登錄的情況下獲取任意第一機構的服務,簡化了使用者操作過程,提升了用戶體驗。 In this way, the user only needs to log in twice to obtain the service of any first institution without logging in, which simplifies the user's operation process and improves the user experience.

在一些實施方式中,在S320中,在身份認證服務器完成對目標使用者的身份認證之後,第一服務器也需要對目標使用者進行身份認證。由於多個服務器在給目標使用者分配令牌時,也將令牌上傳到了區塊 鏈中,因此,區塊鏈中也存儲了多個令牌。第一服務器可以在接收到身份認證服務器轉發的服務請求後,通過將服務請求中包括的多個令牌,也即第一令牌和第二令牌,與區塊鏈中存儲的令牌進行匹配,來確定目標使用者是否為已認證用戶。 In some implementation manners, in S320, after the identity authentication server completes the identity authentication of the target user, the first server also needs to authenticate the identity of the target user. Since multiple servers have also uploaded tokens to the block when assigning tokens to target users In the chain, therefore, multiple tokens are also stored in the blockchain. After receiving the service request forwarded by the identity authentication server, the first server can compare the multiple tokens included in the service request, that is, the first token and the second token, with the tokens stored in the block chain. Match to determine whether the target user is an authenticated user.

在一些實施方式中,上述S320可以包括: In some implementations, the above S320 may include:

將第一令牌和第二令牌分別與區塊鏈中存儲的令牌進行匹配; matching the first token and the second token respectively with tokens stored in the blockchain;

在區塊鏈中存在與第一令牌相匹配的令牌,以及與第二令牌相匹配的令牌的情況下,確定目標使用者為已認證使用者; determining that the target user is an authenticated user if there is a token matching the first token and a token matching the second token in the block chain;

在區塊鏈中不存在與第一令牌相匹配的令牌,或者不存在與第二令牌相匹配的令牌的情況下,確定目標使用者不是已認證使用者。 In case there is no token matching the first token or no token matching the second token in the block chain, it is determined that the target user is not an authenticated user.

這裡,若區塊鏈中既存在與第一令牌相匹配的令牌,也存在與第二令牌相匹配的令牌,則可以確定目標使用者為已認證使用者;若區塊鏈中不存在與第一令牌相匹配的令牌,或者不存在與第二令牌相匹配的令牌,則可以確定目標使用者不是已認證使用者。 Here, if there is both a token matching the first token and a token matching the second token in the block chain, it can be determined that the target user is an authenticated user; if the block chain If there is no token matching the first token, or no token matching the second token, it can be determined that the target user is not an authenticated user.

如此,通過上述過程,可以完成第一服務器對目標使用者是否為已認證用戶的確認,從而可以確認是否回應該目標使用者的服務請求。 In this way, through the above process, the first server can complete the confirmation of whether the target user is an authenticated user, so as to confirm whether to respond to the service request of the target user.

在一些實施方式中,在S330中,若目標使用者為已認證使用者,則回應上述服務請求。對已認證使用者和服務請求的解釋可見前述實施例中的相關表述,為表述簡潔,在此不再贅述。 In some implementations, in S330, if the target user is an authenticated user, respond to the above service request. The explanation of the authenticated user and the service request can be found in the relevant expressions in the foregoing embodiments, and for the sake of brevity, details are not repeated here.

在一些實施方式中,上述S330可以包括: In some implementations, the above S330 may include:

向身份認證服務器發送身份資訊獲取請求; Send an identity information acquisition request to the identity authentication server;

接收身份認證服務器發送的與目標使用者對應的使用者身份資訊; Receive the user identity information corresponding to the target user sent by the identity authentication server;

根據使用者身份資訊回應服務請求,生成應答資訊; Respond to service requests based on user identity information and generate response information;

向身份認證服務器發送應答資訊,以使身份認證服務器將應答資訊轉發至用戶端。 Send response information to the authentication server, so that the authentication server forwards the response information to the client.

這裡,可參見前述實施例中的相關描述,為表簡潔,在此不 再贅述。 Here, reference may be made to the relevant descriptions in the preceding embodiments, for the sake of brevity, no Let me repeat.

圖4示出了本發明提供的身份認證方法的一實施例的流程示意圖。該身份認證方法可應用於第二服務器。 Fig. 4 shows a schematic flowchart of an embodiment of an identity authentication method provided by the present invention. The identity authentication method can be applied to the second server.

如圖4所示,該身份認證方法具體可以包括如下步驟: As shown in Figure 4, the identity authentication method may specifically include the following steps:

S410,接收用戶端採集的與目標使用者對應的使用者身份資訊; S410, receiving user identity information corresponding to the target user collected by the client;

S420,根據使用者身份資訊對目標使用者進行身份認證; S420, performing identity authentication on the target user according to the user identity information;

S430,在認證通過的情況下,為目標使用者分配第二令牌,將第二令牌發送至用戶端,以及將第二令牌上傳至區塊鏈,以使其他機構的服務器根據包括第二令牌在內的多個令牌確定目標使用者是否為已認證用戶。 S430, if the authentication is passed, allocate a second token to the target user, send the second token to the client, and upload the second token to the block chain, so that the servers of other organizations can Multiple tokens including two tokens determine whether the target user is an authenticated user.

由此,通過接收用戶端採集的與目標使用者對應的使用者身份資訊並根據使用者身份資訊對目標使用者進行身份認證,在認證通過的情況下,為目標使用者分配第二令牌,將第二令牌發送至用戶端,以及將第二令牌上傳至區塊鏈,可以使其他機構的服務器根據包括第二令牌在內的多個令牌確定目標使用者是否為已認證用戶,進而在用戶無需登錄其他機構的服務平臺的情況下,實現其他機構的服務器對用戶端服務請求的回應,因此,實現了在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約了網路資源,簡化了使用者操作過程。 Therefore, by receiving the user identity information corresponding to the target user collected by the client terminal and performing identity authentication on the target user according to the user identity information, and assigning a second token to the target user if the authentication is passed, Sending the second token to the client and uploading the second token to the blockchain can enable the server of other institutions to determine whether the target user is an authenticated user based on multiple tokens including the second token , and then realize the response of the server of other organizations to the service request of the client without the user needing to log in to the service platform of other organizations. Therefore, it is possible to reduce the login required for users to obtain services of different organizations while ensuring business security. The number of times saves network resources and simplifies the user's operation process.

下面介紹上述各個步驟的具體實現方式。 The specific implementation of each of the above steps is introduced below.

在一些實施方式中,在S410、S420和S430中,在接收用戶端發送的針對第一機構的服務請求之前,需要先對目標使用者進行兩次身份認證,分別為身份認證服務器對目標使用者的身份認證和第二服務器對目標使用者的身份認證。 In some implementations, in S410, S420, and S430, before receiving the service request for the first organization sent by the client, the target user needs to be authenticated twice, respectively, the identity authentication server authenticates the target user and the identity authentication of the target user by the second server.

其中,第二服務器可以通過接收目標使用者的使用者身份資訊,並基於使用者身份資訊對目標使用者進行身份認證,若認證通過,則為目標使用者分配第二令牌,將第二令牌發送至用戶端,以及將第二令牌 上傳至區塊鏈。使用者身份資訊可以為能夠唯一確定目標使用者身份的資訊,例如目標使用者在用戶端進行實名認證時填寫的資訊,該使用者身份資訊可用於對目標使用者進行身份認證。為目標使用者分配第二令牌,將第二令牌發送至用戶端,可以使目標使用者能夠憑藉第二令牌證明目標使用者已通過第二服務器的身份認證。將第二令牌上傳至區塊鏈可以使其他機構的服務器根據包括第二令牌在內的多個令牌確定目標使用者是否為已認證用戶。 Wherein, the second server can receive the user identity information of the target user and perform identity authentication on the target user based on the user identity information. The card is sent to the client, and the second token uploaded to the blockchain. The user identity information may be information that can uniquely determine the identity of the target user, such as information filled in by the target user when performing real-name authentication on the client terminal, and the user identity information can be used for identity authentication of the target user. Allocating the second token to the target user, and sending the second token to the client can enable the target user to use the second token to prove that the target user has passed the identity authentication of the second server. Uploading the second token to the block chain can enable the server of other institutions to determine whether the target user is an authenticated user based on multiple tokens including the second token.

在一些具體的例子中,目標使用者通過用戶名和密碼登錄用戶端後,可以輸入使用者身份資訊進行實名認證,第二服務器可以接收到該使用者身份資訊,並根據該使用者身份資訊對目標使用者進行實名認證,也即身份認證,認證通過後,可以為目標使用者分配第二令牌,將第二令牌發送至用戶端,以及將第二令牌上傳至區塊鏈。 In some specific examples, after the target user logs in to the client terminal through the user name and password, he can enter the user identity information for real-name authentication, and the second server can receive the user identity information, and according to the user identity information, the target The user performs real-name authentication, that is, identity authentication. After the authentication is passed, a second token can be allocated to the target user, sent to the client, and uploaded to the blockchain.

在一些實施方式中,上述S430具體可以包括: In some implementation manners, the above S430 may specifically include:

為目標使用者分配原始令牌; Assign raw tokens to target consumers;

利用身份認證服務器的公開金鑰對原始令牌進行加密,得到第二令牌。 The original token is encrypted with the public key of the identity authentication server to obtain the second token.

這裡,為了保證各個機構中使用者資訊的安全,避免某一機構通過偽造其他機構的令牌來從其他機構獲取使用者資訊,可以利用身份認證服務器的公開金鑰對分配給目標使用者的原始令牌進行加密,得到第二令牌。。 Here, in order to ensure the security of user information in each organization and prevent a certain organization from obtaining user information from other organizations by forging tokens of other organizations, the public key pair of the identity authentication server can be used to distribute the original token of the target user. The token is encrypted to obtain a second token. .

在一些具體的例子中,第二服務器可以為目標使用者分配令牌C,也即原始令牌,並利用身份認證服務器的公開金鑰對令牌C進行加密,得到令牌A,也即第二令牌。 In some specific examples, the second server can distribute token C, which is the original token, to the target user, and encrypt token C with the public key of the identity authentication server to obtain token A, which is the first Two tokens.

如此,對原始令牌進行加密,可以避免在將加密後的第二令牌上傳到區塊鏈後,某一機構通過偽造其他機構的令牌來從其他機構獲取使用者資訊,保證各機構的資訊安全。 In this way, encrypting the original token can prevent an organization from obtaining user information from other organizations by forging the tokens of other organizations after uploading the encrypted second token to the blockchain, ensuring the security of each organization. information security.

為了更好地描述整個方案,基於上述各實施例,舉一個具體 例子。 In order to better describe the whole scheme, based on the above-mentioned embodiments, a specific example.

如圖5所示,目標使用者在用戶端輸入在身份認證服務器註冊的用戶名和密碼進行登錄,並輸入使用者身份資訊進行實名認證,身份認證服務器接收到該使用者身份資訊後,根據使用者身份資訊對目標使用者進行身份認證,認證通過後為目標使用者分配第一令牌並將第一令牌發送至用戶端,以及將第一令牌上傳至區塊鏈。 As shown in Figure 5, the target user enters the user name and password registered in the identity authentication server on the client side to log in, and enters the user identity information for real-name authentication. After receiving the user identity information, the identity authentication server The identity information authenticates the target user. After the authentication is passed, the target user is assigned a first token and the first token is sent to the client, and the first token is uploaded to the block chain.

然後,目標使用者在用戶端選擇第二機構,從而跳轉至第二機構的登錄介面,目標使用者在用戶端輸入在第二服務器註冊的用戶名和密碼進行登錄,並輸入使用者身份資訊進行實名認證,第二服務器接收到該使用者身份資訊後,根據使用者身份資訊對目標使用者進行身份認證,認證通過後為目標使用者分配第二令牌並將第二令牌發送至用戶端,以及將第二令牌上傳至區塊鏈,該第二令牌為加密後的令牌。 Then, the target user selects the second organization on the client terminal to jump to the login interface of the second organization. The target user enters the user name and password registered on the second server on the client terminal to log in, and enters the user identity information for real name verification. Authentication, after the second server receives the user identity information, it authenticates the target user according to the user identity information, and after passing the authentication, assigns a second token to the target user and sends the second token to the client, And uploading the second token to the block chain, the second token is an encrypted token.

在完成上述兩次身份認證之後,目標使用者可以通過用戶端向身份認證服務器發送針對第一機構的服務請求,身份認證服務器將第二令牌與區塊鏈中存儲的令牌進行匹配,若區塊鏈中存在與第二令牌相匹配的令牌,則獲取與第一令牌對應的使用者身份資訊以及與第二令牌對應的使用者身份資訊,將與第一令牌對應的使用者身份資訊以及與第二令牌對應的使用者身份資訊進行比對,若比對一致,則確定目標使用者為已認證使用者。確定目標使用者為已認證使用者之後,身份認證服務器將服務請求轉發至與第一機構對應的第一服務器,第一服務器將第一令牌和第二令牌分別與區塊鏈中存儲的令牌進行匹配,若區塊鏈中既存在與第一令牌相匹配的令牌,又存在與第二令牌相匹配的令牌,則確定目標使用者為已認證使用者。然後,第一服務器向身份認證服務器發送身份資訊獲取請求,身份認證服務器回應於身份資訊獲取請求,將與目標使用者對應的使用者身份資訊發送至第一服務器,第一服務器根據使用者身份資訊回應服務請求,生成應答資訊後,將應答資訊發送給身份認證服務器,身份認證服務器將該應答資訊轉發給用戶端,顯示給使用者。 After completing the above two identity authentications, the target user can send a service request for the first institution to the identity authentication server through the client, and the identity authentication server will match the second token with the token stored in the block chain. If there is a token matching the second token in the blockchain, the user identity information corresponding to the first token and the user identity information corresponding to the second token are obtained, and the The user identity information is compared with the user identity information corresponding to the second token, and if the comparison is consistent, it is determined that the target user is an authenticated user. After determining that the target user is an authenticated user, the identity authentication server forwards the service request to the first server corresponding to the first institution, and the first server compares the first token and the second token with the stored in the block chain respectively. Tokens are matched, and if there is both a token matching the first token and a token matching the second token in the block chain, it is determined that the target user is an authenticated user. Then, the first server sends an identity information acquisition request to the identity authentication server, and the identity authentication server responds to the identity information acquisition request by sending the user identity information corresponding to the target user to the first server. Respond to the service request, generate the response information, and send the response information to the identity authentication server, and the identity authentication server forwards the response information to the client and displays it to the user.

基於此,由於多個服務器已對目標使用者的身份進行了認證,為用戶提供了可靠的身份背書,且利用區塊鏈共用目標使用者在身份認證通過後分配得到的令牌,使得用戶的身份認證結果可以與鏈上的其他機構共用,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應,因此,實現了在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約了網路資源,簡化了使用者操作過程。 Based on this, since multiple servers have authenticated the identity of the target user, a reliable identity endorsement is provided for the user, and the blockchain is used to share the tokens allocated by the target user after the identity authentication is passed, so that the user's The identity authentication result can be shared with other institutions on the chain, and then the first server can respond to the service request of the client without the user needing to log in to the service platform of the first institution. It reduces the number of logins required for users to obtain services from different institutions, saves network resources, and simplifies the user's operation process.

需要說明的是,上述本發明實施例描述的應用場景是為了更加清楚的說明本發明實施例的技術方案,並不構成對於本發明實施例提供的技術方案的限定,本領域普通技術人員可知,隨著新應用場景的出現,本發明實施例提供的技術方案對於類似的技術問題,同樣適用。 It should be noted that the application scenarios described in the above-mentioned embodiments of the present invention are for more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute limitations on the technical solutions provided by the embodiments of the present invention. Those skilled in the art know that, With the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.

基於相同的發明構思,本發明還提供了一種身份認證裝置。具體結合圖6進行詳細說明。 Based on the same inventive concept, the present invention also provides an identity authentication device. It will be described in detail with reference to FIG. 6 .

圖6示出了本發明提供的身份認證裝置的一實施例的結構示意圖。該身份認證裝置可應用於身份認證服務器。 Fig. 6 shows a schematic structural diagram of an embodiment of an identity authentication device provided by the present invention. The identity authentication device can be applied to an identity authentication server.

如圖6所示,該身份認證裝置600可以包括: As shown in Figure 6, the identity authentication device 600 may include:

第一接收模組601,用於接收用戶端發送的針對第一機構的服務請求,其中,服務請求中包括多個令牌,多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給目標使用者的令牌,目標使用者為用戶端中登錄的用戶; The first receiving module 601 is configured to receive a service request for the first organization sent by the client, wherein the service request includes a plurality of tokens, and the plurality of tokens are for multiple servers to respectively authenticate the target user, And in the case of passing the identity authentication, the token allocated to the target user, the target user is the user logged in in the client;

第一匹配模組602,用於將多個令牌與區塊鏈中存儲的令牌進行匹配,確定目標使用者是否為已認證用戶; The first matching module 602 is used to match a plurality of tokens with tokens stored in the blockchain to determine whether the target user is an authenticated user;

請求轉發模組603,用於在確定目標使用者為已認證使用者的情況下,將服務請求轉發至與第一機構對應的第一服務器,以使第一服務器回應服務請求。 The request forwarding module 603 is configured to forward the service request to the first server corresponding to the first organization when it is determined that the target user is an authenticated user, so that the first server responds to the service request.

下面對上述身份認證裝置600進行詳細說明,具體如下所示: The above-mentioned identity authentication device 600 will be described in detail below, specifically as follows:

在其中一些實施例中,多個服務器包括身份認證服務器和與 第二機構對應的第二服務器,多個令牌包括身份認證服務器分配的第一令牌和第二服務器分配的第二令牌。 In some of these embodiments, the plurality of servers includes an authentication server and an For the second server corresponding to the second organization, the multiple tokens include a first token allocated by the identity authentication server and a second token allocated by the second server.

在其中一些實施例中,身份認證裝置600還包括: In some of these embodiments, the identity authentication device 600 also includes:

第四接收模組,用於在接收用戶端發送的針對第一機構的服務請求之前,接收用戶端採集的與目標使用者對應的使用者身份資訊; The fourth receiving module is used to receive the user identity information corresponding to the target user collected by the client before receiving the service request sent by the client for the first organization;

第二身份認證模組,用於根據使用者身份資訊對目標使用者進行身份認證; The second identity authentication module is used to authenticate the target user according to the user identity information;

第二令牌分配模組,用於在認證通過的情況下,為目標使用者分配第一令牌,將第一令牌發送至用戶端,以及將第一令牌上傳至區塊鏈。 The second token distribution module is used to distribute the first token to the target user when the authentication is passed, send the first token to the client, and upload the first token to the block chain.

在其中一些實施例中,第一匹配模組602包括: In some of these embodiments, the first matching module 602 includes:

第一匹配子模組,用於將第二令牌與區塊鏈中存儲的令牌進行匹配; The first matching submodule is used to match the second token with the token stored in the block chain;

獲取子模組,用於在區塊鏈中存在與第二令牌相匹配的令牌的情況下,獲取與第一令牌對應的使用者身份資訊,以及,確定分配第二令牌的第二機構,從與第二機構對應的第二服務器中獲取與第二令牌對應的使用者身份資訊; The obtaining sub-module is used to obtain the user identity information corresponding to the first token when there is a token matching the second token in the block chain, and to determine the second token that is allocated to the second token. The second institution obtains the user identity information corresponding to the second token from the second server corresponding to the second institution;

比對子模組,用於將第一令牌對應的使用者身份資訊與第二令牌對應的使用者身份資訊進行比對; A comparison sub-module is used to compare the user identity information corresponding to the first token with the user identity information corresponding to the second token;

第一確定子模組,用於在使用者身份資訊比對一致的情況下,確定目標使用者為已認證使用者; The first determination sub-module is used to determine that the target user is an authenticated user when the user identity information is compared;

第二確定子模組,用於在區塊鏈中不存在與第二令牌相匹配的令牌,或者使用者身份資訊比對不一致的情況下,確定目標使用者不是已認證使用者。 The second determination sub-module is used to determine that the target user is not an authenticated user when there is no token matching the second token in the block chain, or the user identity information is inconsistent.

在其中一些實施例中,第二令牌為第二機構的機構服務器利用身份認證服務器的公開金鑰對分配給目標使用者的原始令牌進行加密後得到的令牌;第一匹配子模組包括: In some of these embodiments, the second token is the token obtained after the organization server of the second organization encrypts the original token assigned to the target user with the public key of the identity authentication server; the first matching submodule include:

解密單元,用於利用公開金鑰對第二令牌進行解密,得到原始令牌; A decryption unit, configured to use the public key to decrypt the second token to obtain the original token;

匹配單元,用於將原始令牌與區塊鏈中存儲的令牌進行匹配; A matching unit for matching the original token with the token stored in the blockchain;

獲取子模組包括: Get submodules include:

確定單元,用於根據原始令牌確定分配第二令牌的第二機構。 A determining unit, configured to determine a second institution that distributes the second token according to the original token.

在其中一些實施例中,身份認證裝置600還包括: In some of these embodiments, the identity authentication device 600 also includes:

第五接收模組,用於在將服務請求轉發至與第一機構對應的第一服務器之後,接收第一服務器發送的身份資訊獲取請求; The fifth receiving module is used to receive the identity information acquisition request sent by the first server after forwarding the service request to the first server corresponding to the first institution;

發送模組,用於回應於身份資訊獲取請求,將與目標使用者對應的使用者身份資訊發送至第一服務器,以使第一服務器根據使用者身份資訊回應服務請求,生成應答資訊; The sending module is used to send the user identity information corresponding to the target user to the first server in response to the identity information acquisition request, so that the first server responds to the service request according to the user identity information and generates response information;

第六接收模組,用於接收第一服務器返回的應答資訊; The sixth receiving module is used to receive the response information returned by the first server;

應答資訊轉發模組,用於將應答資訊轉發至用戶端。 The response information forwarding module is used to forward the response information to the client.

由此,通過在接收到用戶端發送的針對第一機構的服務請求的情況下,利用服務請求中包含的由多個服務器分別對目標使用者進行身份認證後,分配給目標使用者的令牌,將該多個令牌與區塊鏈中存儲的令牌進行匹配,以此確定目標使用者是否為已認證使用者,從而在確定目標使用者為已認證使用者的情況下,將服務請求轉發至第一機構對應的第一服務器,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應。這樣,由於多個服務器已對目標使用者的身份進行了認證,為用戶提供了可靠的身份背書,且利用區塊鏈共用目標使用者在身份認證通過後分配得到的令牌,使得用戶的身份認證結果可以與鏈上的其他機構共用,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應,因此,實現了在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約了網路資源,簡化了使用者操作過程。 Thus, when receiving the service request sent by the client for the first organization, using the service request included in the service request, the target user is authenticated by multiple servers, and the token allocated to the target user , match the multiple tokens with the tokens stored in the blockchain to determine whether the target user is an authenticated user, so that if the target user is an authenticated user, the service request The information is forwarded to the first server corresponding to the first organization, and then the first server responds to the service request of the client without the user needing to log in to the service platform of the first organization. In this way, since multiple servers have authenticated the identity of the target user, a reliable identity endorsement is provided for the user, and the blockchain is used to share the tokens allocated by the target user after the identity authentication is passed, so that the user's identity The authentication result can be shared with other institutions on the chain, and then the first server can respond to the service request of the client without the user needing to log in to the service platform of the first institution. The number of times users need to log in to obtain services from different institutions saves network resources and simplifies the user's operation process.

圖7示出了本發明提供的身份認證裝置的一實施例的結構示 意圖。該身份認證裝置可應用於第一服務器。 Fig. 7 shows the structure diagram of an embodiment of the identity authentication device provided by the present invention intention. The identity authentication device can be applied to the first server.

如圖7所示,該身份認證裝置700可以包括: As shown in Figure 7, the identity authentication device 700 may include:

第二接收模組701,用於接收身份認證服務器轉發的服務請求,其中,服務請求中包括多個令牌,多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給目標使用者的令牌,目標使用者為發送服務請求至身份認證服務器的用戶端中登錄的用戶; The second receiving module 701 is used to receive the service request forwarded by the identity authentication server, wherein the service request includes a plurality of tokens, and the plurality of tokens are for the plurality of servers to perform identity authentication on the target user respectively, and in the identity authentication If passed, the token allocated to the target user, the target user is the user logged in in the client that sends the service request to the identity authentication server;

第二匹配模組702,用於將多個令牌與區塊鏈中存儲的令牌進行匹配,確定目標使用者是否為已認證用戶; The second matching module 702 is used to match a plurality of tokens with tokens stored in the block chain to determine whether the target user is an authenticated user;

服務回應模組703,用於在確定目標使用者為已認證使用者的情況下,回應服務請求。 The service response module 703 is configured to respond to the service request when the target user is determined to be an authenticated user.

下面對上述身份認證裝置700進行詳細說明,具體如下所示: The above-mentioned identity authentication device 700 will be described in detail below, specifically as follows:

在其中一些實施例中,多個服務器包括身份認證服務器和與第二機構對應的第二服務器,多個令牌包括身份認證服務器分配的第一令牌和第二服務器分配的第二令牌。 In some of these embodiments, the multiple servers include an identity authentication server and a second server corresponding to the second organization, and the multiple tokens include a first token allocated by the identity authentication server and a second token allocated by the second server.

在其中一些實施例中,第二匹配模組702包括: In some of these embodiments, the second matching module 702 includes:

第二匹配子模組,用於將第一令牌和第二令牌分別與區塊鏈中存儲的令牌進行匹配; The second matching submodule is used to match the first token and the second token with the tokens stored in the block chain respectively;

第三確定子模組,用於在區塊鏈中存在與第一令牌相匹配的令牌,以及與第二令牌相匹配的令牌的情況下,確定目標使用者為已認證使用者; The third determining submodule is used to determine that the target user is an authenticated user when there is a token matching the first token and a token matching the second token in the block chain ;

第四確定子模組,用於在區塊鏈中不存在與第一令牌相匹配的令牌,或者不存在與第二令牌相匹配的令牌的情況下,確定目標使用者不是已認證使用者。 The fourth determination sub-module is used to determine whether the target user is not an existing token when there is no token matching the first token or no token matching the second token Authenticated users.

在其中一些實施例中,服務回應模組703包括: In some of these embodiments, the service response module 703 includes:

第一發送子模組,用於向身份認證服務器發送身份資訊獲取請求; The first sending sub-module is used to send an identity information acquisition request to the identity authentication server;

接收子模組,用於接收身份認證服務器發送的與目標使用者對應的使用者身份資訊; The receiving sub-module is used to receive the user identity information corresponding to the target user sent by the identity authentication server;

生成子模組,用於根據使用者身份資訊回應服務請求,生成應答資訊; Generate sub-modules for responding to service requests and generating response information based on user identity information;

第二發送子模組,用於向身份認證服務器發送應答資訊,以使身份認證服務器將應答資訊轉發至用戶端。 The second sending sub-module is used to send response information to the identity authentication server, so that the identity authentication server forwards the response information to the client.

由此,通過在接收身份認證服務器轉發的服務請求之後,利用服務請求中包含的由多個服務器分別對目標使用者進行身份認證後,分配給目標使用者的令牌,將該多個令牌與區塊鏈中存儲的令牌進行匹配,以此確定目標使用者是否為已認證使用者,從而在確定目標使用者為已認證使用者的情況下,回應服務請求。由於多個服務器已對目標使用者的身份進行了認證,為用戶提供了可靠的身份背書,且利用區塊鏈共用目標使用者在身份認證通過後分配得到的令牌,使得用戶的身份認證結果可以與鏈上的其他機構共用,進而在用戶無需登錄第一機構的服務平臺的情況下,實現第一服務器對用戶端服務請求的回應,因此,實現了在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約了網路資源,簡化了使用者操作過程。 Thus, after receiving the service request forwarded by the identity authentication server, using the tokens allocated to the target user after the multiple servers respectively authenticate the target user included in the service request, the multiple tokens Match with the token stored in the blockchain to determine whether the target user is an authenticated user, so as to respond to the service request if the target user is determined to be an authenticated user. Since multiple servers have authenticated the identity of the target user, a reliable identity endorsement is provided for the user, and the block chain is used to share the tokens allocated by the target user after the identity authentication is passed, so that the user's identity authentication result It can be shared with other institutions on the chain, and then the first server can respond to the service request of the client without the user needing to log in to the service platform of the first institution. Therefore, it can reduce the number of users while ensuring business security. The number of login times required to obtain services of different institutions saves network resources and simplifies the user's operation process.

圖8示出了本發明提供的身份認證裝置的一實施例的結構示意圖。該身份認證裝置可應用於第二服務器。 Fig. 8 shows a schematic structural diagram of an embodiment of an identity authentication device provided by the present invention. The identity authentication device can be applied to the second server.

如圖8所示,該身份認證裝置800可以包括: As shown in Figure 8, the identity authentication device 800 may include:

第三接收模組801,用於接收用戶端採集的與目標使用者對應的使用者身份資訊; The third receiving module 801 is used to receive the user identity information corresponding to the target user collected by the client;

第一身份認證模組802,用於根據使用者身份資訊對目標使用者進行身份認證; The first identity authentication module 802 is used to authenticate the target user according to the user identity information;

第一令牌分配模組803,用於在認證通過的情況下,為目標使用者分配第二令牌,將第二令牌發送至用戶端,以及將第二令牌上傳至區塊鏈,以使其他機構的服務器根據包括第二令牌在內的多個令牌確定目 標使用者是否為已認證用戶。 The first token allocation module 803 is used to allocate a second token to the target user when the authentication is passed, send the second token to the client, and upload the second token to the block chain, to enable servers of other institutions to determine the destination based on multiple tokens including the second token Whether the target user is an authenticated user.

下面對上述身份認證裝置800進行詳細說明,具體如下所示: The above-mentioned identity authentication device 800 will be described in detail below, specifically as follows:

在其中一些實施例中,第一令牌分配模組803包括: In some of these embodiments, the first token allocation module 803 includes:

分配子模組,用於為目標使用者分配原始令牌; Assignment submodule for assigning raw tokens to target users;

加密子模組,用於利用身份認證服務器的公開金鑰對原始令牌進行加密,得到第二令牌。 The encryption sub-module is used to encrypt the original token with the public key of the identity authentication server to obtain the second token.

由此,通過接收用戶端採集的與目標使用者對應的使用者身份資訊並根據使用者身份資訊對目標使用者進行身份認證,在認證通過的情況下,為目標使用者分配第二令牌,將第二令牌發送至用戶端,以及將第二令牌上傳至區塊鏈,可以使其他機構的服務器根據包括第二令牌在內的多個令牌確定目標使用者是否為已認證用戶,進而在用戶無需登錄其他機構的服務平臺的情況下,實現其他機構的服務器對用戶端服務請求的回應,因此,實現了在保證業務安全性的同時減少使用者獲取不同機構服務所需的登錄次數,節約了網路資源,簡化了使用者操作過程。 Therefore, by receiving the user identity information corresponding to the target user collected by the client terminal and performing identity authentication on the target user according to the user identity information, and assigning a second token to the target user if the authentication is passed, Sending the second token to the client and uploading the second token to the blockchain can enable the server of other institutions to determine whether the target user is an authenticated user based on multiple tokens including the second token , and then realize the response of the server of other organizations to the service request of the client without the user needing to log in to the service platform of other organizations. Therefore, it is possible to reduce the login required for users to obtain services of different organizations while ensuring business security. The number of times saves network resources and simplifies the user's operation process.

圖9示出了本發明提供的電子設備的一實施例的硬體結構示意圖。 FIG. 9 shows a schematic diagram of a hardware structure of an embodiment of an electronic device provided by the present invention.

在電子設備900可以包括處理器901以及存儲有電腦程式指令的記憶體902。 The electronic device 900 may include a processor 901 and a memory 902 storing computer program instructions.

具體地,上述處理器901可以包括中央處理器(Central Processing Unit,CPU),或者特定積體電路(Application Specific Integrated Circuit,ASIC),或者可以被配置成實施本發明實施例的一個或多個積體電路。 Specifically, the above-mentioned processor 901 may include a central processing unit (Central Processing Unit, CPU), or a specific integrated circuit (Application Specific Integrated Circuit, ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present invention. body circuit.

記憶體902可以包括用於資料或指令的大量存放區。舉例來說而非限制,記憶體902可包括硬碟驅動器(Hard Disk Drive,HDD)、軟碟機、快閃記憶體、光碟、磁光碟、磁帶或通用序列匯流排(Universal Serial Bus,USB)驅動器或者兩個或更多個以上這些的組合。在合適的情況下,記憶體902可包括可移除或不可移除(或固定)的介質。在合適的情 況下,記憶體902可在綜合閘道容災設備的內部或外部。在特定實施例中,記憶體902是非易失性固態記憶體。 Memory 902 may include a large number of storage areas for data or instructions. For example and not limitation, the memory 902 may include a hard disk drive (Hard Disk Drive, HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a Universal Serial Bus (Universal Serial Bus, USB) drive or a combination of two or more of the above. Memory 902 may include removable or non-removable (or fixed) media, where appropriate. in the right situation In some cases, the memory 902 can be inside or outside the comprehensive gateway disaster recovery device. In a particular embodiment, memory 902 is a non-volatile solid-state memory.

記憶體可包括唯讀記憶體(Read Only Memory,ROM),隨機存取記憶體(Random Access Memory,RAM),磁片存儲介質設備,光存儲介質設備,快閃記憶體設備,電氣、光學或其他物理/有形的記憶體存放裝置。因此,通常,記憶體包括一個或多個編碼有包括電腦可執行指令的軟體的有形(非暫態)電腦可讀存儲介質(例如,記憶體設備),並且當該軟體被執行(例如,由一個或多個處理器)時,其可操作來執行參考根據本發明的一方面的方法所描述的操作。 The memory can include read-only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk storage medium equipment, optical storage medium equipment, flash memory equipment, electrical, optical or Other physical/tangible memory storage devices. Thus, in general, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software comprising computer-executable instructions, and when the software is executed (e.g., by one or more processors) operable to perform the operations described with reference to the method according to an aspect of the present invention.

處理器901通過讀取並執行記憶體902中存儲的電腦程式指令,以實現上述實施例中的任意一種身份認證方法。 The processor 901 reads and executes the computer program instructions stored in the memory 902 to implement any identity authentication method in the above-mentioned embodiments.

在一些示例中,電子設備900還可包括通信介面903和匯流排910。其中,如圖9所示,處理器901、記憶體902、通信介面903通過匯流排904連接並完成相互間的通信。 In some examples, the electronic device 900 may further include a communication interface 903 and a bus 910 . Wherein, as shown in FIG. 9 , the processor 901 , the memory 902 , and the communication interface 903 are connected through a bus 904 to complete mutual communication.

通信介面903主要用於實現本發明實施例中各模組、裝置、單元和/或設備之間的通信。 The communication interface 903 is mainly used to realize the communication between various modules, devices, units and/or devices in the embodiment of the present invention.

匯流排904包括硬體、軟體或兩者,將線上資料流量計費設備的部件彼此耦接在一起。舉例來說而非限制,匯流排904可包括高速圖形連接埠(Accelerated Graphics Port,AGP)或其他圖形匯流排、增強工業標準架構(Enhanced Industry Standard Architecture,EISA)匯流排、前端匯流排(Front Side Bus,FSB)、超傳輸(Hyper-Threading,HT)互連、工業標準架構(Industry Standard Architecture,ISA)匯流排、無限頻寬互連、低引腳數(Low Pin Count Bus,LPC)匯流排、記憶體匯流排、微通道架構(Micro Channel Architecture,MCA)匯流排、周邊元件連接(Peripheral Component Interconnection,PCI)匯流排、PCI-Express(PCI-X)匯流排、串列高級技術附件(Serial Advanced Technology Attachment,SATA)匯流排、視頻電子標準協會局部(Video Electronics Standards Association Local Bus,VLB)匯流排或其他合適的匯流排或者兩個或更多個以上這些的組合。在合適的情況下,匯流排904可包括一個或多個匯流排。儘管本發明實施例描述和示出了特定的匯流排,但本發明考慮任何合適的匯流排或互連。 The bus 904 includes hardware, software or both, and couples the components of the online data traffic billing device to each other. By way of example and not limitation, the bus 904 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (Front Side Bus, FSB), hyper-threading (Hyper-Threading, HT) interconnect, Industry Standard Architecture (Industry Standard Architecture, ISA) bus, unlimited bandwidth interconnect, low pin count (Low Pin Count Bus, LPC) bus , memory bus, Micro Channel Architecture (Micro Channel Architecture, MCA) bus, peripheral component connection (Peripheral Component Interconnection, PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology accessories (Serial Advanced Technology Attachment, SATA) bus, Video Electronics Standards Association Local (Video Electronics Standards Association Local Bus, VLB) busbar or other suitable busbar or a combination of two or more of these. Bus bar 904 may include one or more bus bars, where appropriate. Although the embodiments of the invention describe and illustrate particular bus bars, the invention contemplates any suitable bus bars or interconnects.

示例性的,電子設備900可以為手機、平板電腦、筆記型電腦、掌上型電腦、車載電子設備、超級移動個人電腦(Ultra-mobile Personal Computer,UMPC)、上網本或者個人數位助理(Personal Digital Assistant,PDA)等。 Exemplarily, the electronic device 900 may be a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle electronic device, an ultra-mobile personal computer (Ultra-mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA) etc.

該電子設備900可以執行本發明實施例中的身份認證方法,從而實現結合圖1和圖8描述的身份認證方法和裝置。 The electronic device 900 can execute the identity authentication method in the embodiment of the present invention, so as to implement the identity authentication method and apparatus described in conjunction with FIG. 1 and FIG. 8 .

另外,結合上述實施例中的身份認證方法,本發明實施例可提供一種電腦可讀存儲介質來實現。該電腦可讀存儲介質上存儲有電腦程式指令;該電腦程式指令被處理器執行時實現上述實施例中的任意一種身份認證方法。電腦可讀存儲介質的示例包括非暫態電腦可讀存儲介質,如可擕式盤、硬碟、隨機存取記憶體(RAM)、唯讀記憶體(ROM)、可擦式可程式設計唯讀記憶體(Erasable Programmable Read Only Memory,EPROM或快閃記憶體)、可擕式緊湊盤唯讀記憶體(Compact Disc Read Only Memory,CD-ROM)、光記憶體件、磁記憶體件等。 In addition, in combination with the identity authentication method in the foregoing embodiments, the embodiment of the present invention may provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the identity authentication methods in the above-mentioned embodiments is implemented. Examples of computer readable storage media include non-transitory computer readable storage media such as portable disks, hard disks, random access memory (RAM), read only memory (ROM), erasable programmable Read memory (Erasable Programmable Read Only Memory, EPROM or flash memory), portable compact disc read only memory (Compact Disc Read Only Memory, CD-ROM), optical memory parts, magnetic memory parts, etc.

需要明確的是,本發明並不局限於上文所描述並在圖中示出的特定配置和處理。為了簡明起見,這裡省略了對已知方法的詳細描述。在上述實施例中,描述和示出了若干具體的步驟作為示例。但是,本發明的方法過程並不限於所描述和示出的具體步驟,本領域的技術人員可以在領會本發明的精神後,作出各種改變、修改和添加,或者改變步驟之間的順序。 It is to be understood that the invention is not limited to the specific arrangements and processes described above and shown in the drawings. For conciseness, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the sequence of steps after understanding the spirit of the present invention.

以上所述的結構框圖中所示的功能塊可以實現為硬體、軟體、固件或者它們的組合。當以硬體方式實現時,其可以例如是電子電路、專用積體電路(ASIC)、適當的固件、外掛程式、功能卡等等。當以軟體方式實現時,本發明的元素是被用於執行所需任務的程式或者程式碼片段。 程式或者程式碼片段可以存儲在機器可讀介質中,或者通過載波中攜帶的資料信號在傳輸介質或者通信鏈路上傳送。“機器可讀介質”可以包括能夠存儲或傳輸資訊的任何介質。機器可讀介質的例子包括電子電路、半導體記憶體設備、ROM、快閃記憶體、可擦除ROM(EROM)、軟碟、CD-ROM、光碟、硬碟、光纖介質、射頻(RF)鏈路,等等。程式碼片段可以經由諸如網際網路、內聯網等的電腦網路被下載。 The functional blocks shown in the structural block diagrams above can be realized as hardware, software, firmware or a combination thereof. When implemented in hardware, it may be, for example, an electronic circuit, an application specific integrated circuit (ASIC), suitable firmware, a plug-in, a function card, or the like. When implemented in software, the elements of the invention are the programs or code segments used to perform the required tasks. Programs or program code segments may be stored on a machine-readable medium or transmitted over a transmission medium or communication link by a data signal carried in a carrier wave. "Machine-readable medium" may include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links Road, wait. Code snippets may be downloaded via computer networks such as the Internet, Intranet, and the like.

還需要說明的是,本發明中提及的示例性實施例,基於一系列的步驟或者裝置描述一些方法或系統。但是,本發明不局限於上述步驟的順序,也就是說,可以按照實施例中提及的循序執行步驟,也可以不同於實施例中的順序,或者若干步驟同時執行。 It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is to say, the steps may be performed in the order mentioned in the embodiment, or may be different from the order in the embodiment, or several steps may be performed simultaneously.

上面參考根據本發明的實施例的方法、裝置(系統)和電腦程式產品的流程圖和/或框圖描述了本發明的各方面。應當理解,流程圖和/或框圖中的每個方框以及流程圖和/或框圖中各方框的組合可以由電腦程式指令實現。這些電腦程式指令可被提供給通用電腦、專用電腦、或其它可程式設計資料處理裝置的處理器,以產生一種機器,使得經由電腦或其它可程式設計資料處理裝置的處理器執行的這些指令使能對流程圖和/或框圖的一個或多個方框中指定的功能/動作的實現。這種處理器可以是但不限於是通用處理器、專用處理器、特殊應用處理器或者現場可程式設計邏輯電路。還可理解,框圖和/或流程圖中的每個方框以及框圖和/或流程圖中的方框的組合,也可以由執行指定的功能或動作的專用硬體來實現,或可由專用硬體和電腦指令的組合來實現。 Aspects of the present invention are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It should be understood that each block in the flowchart and/or block diagrams, and combinations of blocks in the flowchart and/or block diagrams can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device make The function/action specified in one or more blocks of the flowchart and/or block diagram can be realized. Such processors may be, but are not limited to, general purpose processors, special purpose processors, application specific processors, or field programmable logic circuits. It can also be understood that each block in the block diagrams and/or flowcharts and combinations of blocks in the block diagrams and/or flowcharts can also be realized by dedicated hardware for performing specified functions or actions, or can be implemented by It is realized by a combination of special hardware and computer instructions.

以上所述,僅為本發明的具體實施方式,所屬領域的技術人員可以清楚地瞭解到,為了描述的方便和簡潔,上述描述的系統、模組和單元的具體工作過程,可以參考前述方法實施例中的對應過程,在此不再贅述。應理解,本發明的保護範圍並不局限於此,任何熟悉本技術領域的技術人員在本發明揭露的技術範圍內,可輕易想到各種等效的修改或替換,這些修改或替換都應涵蓋在本發明的保護範圍之內。 The above is only a specific implementation of the present invention, and those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, modules and units described above can be implemented by referring to the aforementioned method The corresponding process in the example will not be repeated here. It should be understood that the protection scope of the present invention is not limited thereto, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present invention, and these modifications or replacements should all be covered in within the protection scope of the present invention.

S210,S220,S230:步驟 S210, S220, S230: steps

Claims (17)

一種身份認證方法,應用於身份認證服務器,其特徵在於,包括: An identity authentication method applied to an identity authentication server, characterized in that it includes: 接收用戶端發送的針對第一機構的服務請求,其中,所述服務請求中包括多個令牌,所述多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給所述目標使用者的令牌,所述目標使用者為所述用戶端中登錄的用戶; Receive a service request for the first organization sent by the client, wherein the service request includes a plurality of tokens, and the plurality of tokens are for multiple servers to respectively authenticate the target user, and when the identity authentication passes In the case of , the token allocated to the target user, the target user is the user logged in in the client; 將所述多個令牌與區塊鏈中存儲的令牌進行匹配,確定所述目標使用者是否為已認證用戶; Matching the plurality of tokens with tokens stored in the blockchain to determine whether the target user is an authenticated user; 在確定所述目標使用者為已認證使用者的情況下,將所述服務請求轉發至與所述第一機構對應的第一服務器,以使所述第一服務器回應所述服務請求。 If it is determined that the target user is an authenticated user, the service request is forwarded to a first server corresponding to the first institution, so that the first server responds to the service request. 如請求項1所述的方法,其中,所述多個服務器包括所述身份認證服務器和與第二機構對應的第二服務器,所述多個令牌包括所述身份認證服務器分配的第一令牌和所述第二服務器分配的第二令牌。 The method according to claim 1, wherein the plurality of servers include the identity authentication server and a second server corresponding to the second institution, and the plurality of tokens include the first token assigned by the identity authentication server card and the second token assigned by the second server. 如請求項2所述的方法,其中,在接收用戶端發送的針對第一機構的服務請求之前,所述方法還包括: The method as described in claim 2, wherein, before receiving the service request for the first institution sent by the client, the method further includes: 接收所述用戶端採集的與所述目標使用者對應的使用者身份資訊; receiving user identity information corresponding to the target user collected by the client; 根據所述使用者身份資訊對所述目標使用者進行身份認證; Authenticate the target user according to the user identity information; 在認證通過的情況下,為所述目標使用者分配所述第一令牌,將所述第一令牌發送至所述用戶端,以及將所述第一令牌上傳至所述區塊鏈。 If the authentication is passed, allocate the first token to the target user, send the first token to the client, and upload the first token to the block chain . 如請求項2所述的方法,其中,所述將所述多個令牌與區塊鏈中存儲的令牌進行匹配,確定所述目標使用者是否為已認證用戶,包括: The method according to claim 2, wherein said matching said plurality of tokens with tokens stored in a block chain to determine whether said target user is an authenticated user comprises: 將所述第二令牌與所述區塊鏈中存儲的令牌進行匹配; matching said second token with tokens stored in said blockchain; 在所述區塊鏈中存在與所述第二令牌相匹配的令牌的情況下,獲取與 所述第一令牌對應的使用者身份資訊,以及,確定分配所述第二令牌的所述第二機構,從與所述第二機構對應的所述第二服務器中獲取與所述第二令牌對應的使用者身份資訊; In the event that there is a token matching the second token in the block chain, obtaining the same The user identity information corresponding to the first token, and determining the second organization that distributes the second token, and obtaining information related to the second token from the second server corresponding to the second organization The user identity information corresponding to the second token; 將所述第一令牌對應的使用者身份資訊與所述第二令牌對應的使用者身份資訊進行比對; comparing the user identity information corresponding to the first token with the user identity information corresponding to the second token; 在使用者身份資訊比對一致的情況下,確定所述目標使用者為已認證使用者; If the user identity information is consistent, determine that the target user is an authenticated user; 在所述區塊鏈中不存在與所述第二令牌相匹配的令牌,或者使用者身份資訊比對不一致的情況下,確定所述目標使用者不是已認證使用者。 If there is no token matching the second token in the block chain, or the user identity information is inconsistent, it is determined that the target user is not an authenticated user. 如請求項4所述的方法,其中,所述第二令牌為所述第二機構的機構服務器利用所述身份認證服務器的公開金鑰對分配給所述目標使用者的原始令牌進行加密後得到的令牌; The method according to claim 4, wherein the second token is the original token distributed to the target user encrypted by the organization server of the second organization using the public key of the identity authentication server The token obtained after; 所述將所述第二令牌與所述區塊鏈中存儲的令牌進行匹配,包括: The matching the second token with the token stored in the block chain includes: 利用所述公開金鑰對所述第二令牌進行解密,得到所述原始令牌; Decrypting the second token by using the public key to obtain the original token; 將所述原始令牌與所述區塊鏈中存儲的令牌進行匹配; matching said original token with tokens stored in said blockchain; 所述確定分配所述第二令牌的所述第二機構,包括: Said determining said second agency to allocate said second token comprises: 根據所述原始令牌確定分配所述第二令牌的所述第二機構。 The second authority to assign the second token is determined based on the original token. 如請求項1所述的方法,其中,在將所述服務請求轉發至與所述第一機構對應的第一服務器之後,所述方法還包括: The method according to claim 1, wherein, after forwarding the service request to the first server corresponding to the first institution, the method further comprises: 接收所述第一服務器發送的身份資訊獲取請求; receiving an identity information acquisition request sent by the first server; 回應於所述身份資訊獲取請求,將與所述目標使用者對應的使用者身份資訊發送至所述第一服務器,以使所述第一服務器根據所述使用者身份資訊回應所述服務請求,生成應答資訊; In response to the identity information acquisition request, sending user identity information corresponding to the target user to the first server, so that the first server responds to the service request according to the user identity information, Generate response information; 接收所述第一服務器返回的所述應答資訊; receiving the response information returned by the first server; 將所述應答資訊轉發至所述用戶端。 Forwarding the response information to the client. 一種身份認證方法,應用於第一服務器,其特徵在於,包括: An identity authentication method applied to a first server, characterized in that it includes: 接收身份認證服務器轉發的服務請求,其中,所述服務請求中包括多個令牌,所述多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給所述目標使用者的令牌,所述目標使用者為發送所述服務請求至所述身份認證服務器的用戶端中登錄的用戶; Receive the service request forwarded by the identity authentication server, wherein the service request includes a plurality of tokens, and the plurality of tokens are for multiple servers to perform identity authentication on the target user respectively, and when the identity authentication is passed, a token allocated to the target user, the target user is a user logged in at the client terminal that sends the service request to the identity authentication server; 將所述多個令牌與區塊鏈中存儲的令牌進行匹配,確定所述目標使用者是否為已認證用戶; Matching the plurality of tokens with tokens stored in the blockchain to determine whether the target user is an authenticated user; 在確定所述目標使用者為已認證使用者的情況下,回應所述服務請求。 If it is determined that the target user is an authenticated user, respond to the service request. 如請求項7所述的方法,其中,所述多個服務器包括所述身份認證服務器和與第二機構對應的第二服務器,所述多個令牌包括所述身份認證服務器分配的第一令牌和所述第二服務器分配的第二令牌。 The method according to claim 7, wherein the plurality of servers include the identity authentication server and a second server corresponding to the second institution, and the plurality of tokens include the first token assigned by the identity authentication server card and the second token assigned by the second server. 如請求項8所述的方法,其中,所述將所述多個令牌與區塊鏈中存儲的令牌進行匹配,確定所述目標使用者是否為已認證用戶,包括: The method according to claim 8, wherein said matching said plurality of tokens with tokens stored in a blockchain to determine whether said target user is an authenticated user comprises: 將所述第一令牌和所述第二令牌分別與所述區塊鏈中存儲的令牌進行匹配; matching the first token and the second token with tokens stored in the blockchain, respectively; 在所述區塊鏈中存在與所述第一令牌相匹配的令牌,以及與所述第二令牌相匹配的令牌的情況下,確定所述目標使用者為已認證使用者; determining that the target user is an authenticated user if there is a token matching the first token and a token matching the second token in the block chain; 在所述區塊鏈中不存在與所述第一令牌相匹配的令牌,或者不存在與所述第二令牌相匹配的令牌的情況下,確定所述目標使用者不是已認證使用者。 Determining that the target user is not authenticated if there is no token in the blockchain that matches the first token, or if there is no token that matches the second token user. 如請求項7所述的方法,其中,所述回應所述服務請求,包括: The method according to claim 7, wherein the responding to the service request includes: 向所述身份認證服務器發送身份資訊獲取請求; Sending an identity information acquisition request to the identity authentication server; 接收所述身份認證服務器發送的與所述目標使用者對應的使用者身份資訊; receiving user identity information corresponding to the target user sent by the identity authentication server; 根據所述使用者身份資訊回應所述服務請求,生成應答資訊; Respond to the service request according to the user identity information, and generate response information; 向所述身份認證服務器發送所述應答資訊,以使所述身份認證服務器 將所述應答資訊轉發至所述用戶端。 sending the response information to the identity authentication server, so that the identity authentication server Forwarding the response information to the client. 一種身份認證方法,應用於第二服務器,其特徵在於,包括: An identity authentication method applied to a second server, characterized in that it includes: 接收所述用戶端採集的與目標使用者對應的使用者身份資訊; receiving user identity information corresponding to the target user collected by the client; 根據所述使用者身份資訊對所述目標使用者進行身份認證; Authenticate the target user according to the user identity information; 在認證通過的情況下,為所述目標使用者分配第二令牌,將所述第二令牌發送至所述用戶端,以及將所述第二令牌上傳至區塊鏈,以使其他機構的服務器根據包括所述第二令牌在內的多個令牌確定所述目標使用者是否為已認證用戶。 In the case of passing the authentication, allocate a second token to the target user, send the second token to the client, and upload the second token to the block chain, so that other The institution's server determines whether the target user is an authenticated user based on a plurality of tokens including the second token. 如請求項11所述的方法,其中,所述為所述目標使用者分配第二令牌,包括: The method according to claim 11, wherein the allocating the second token to the target user includes: 為所述目標使用者分配原始令牌; Allocate raw tokens to said target consumer; 利用身份認證服務器的公開金鑰對所述原始令牌進行加密,得到所述第二令牌。 Encrypting the original token with the public key of the identity authentication server to obtain the second token. 一種身份認證裝置,應用於身份認證服務器,其特徵在於,所述裝置包括: An identity authentication device applied to an identity authentication server, characterized in that the device includes: 第一接收模組,用於接收用戶端發送的針對第一機構的服務請求,其中,所述服務請求中包括多個令牌,所述多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給所述目標使用者的令牌,所述目標使用者為所述用戶端中登錄的用戶; The first receiving module is used to receive the service request for the first organization sent by the client, wherein the service request includes a plurality of tokens, and the plurality of tokens are performed by multiple servers on the target user respectively. Identity authentication, and in the case of passing the identity authentication, a token assigned to the target user, the target user being the user logged in at the client; 第一匹配模組,用於將所述多個令牌與區塊鏈中存儲的令牌進行匹配,確定所述目標使用者是否為已認證用戶; The first matching module is used to match the plurality of tokens with the tokens stored in the blockchain to determine whether the target user is an authenticated user; 請求轉發模組,用於在確定所述目標使用者為已認證使用者的情況下,將所述服務請求轉發至與所述第一機構對應的第一服務器,以使所述第一服務器回應所述服務請求。 A request forwarding module, configured to forward the service request to the first server corresponding to the first organization when it is determined that the target user is an authenticated user, so that the first server responds The service request. 一種身份認證裝置,應用於第一服務器,其特徵在於,所述裝置包括: An identity authentication device applied to a first server, characterized in that the device includes: 第二接收模組,用於接收身份認證服務器轉發的服務請求,其中,所述服務請求中包括多個令牌,所述多個令牌為多個服務器分別對目標使用者進行身份認證,且在身份認證通過的情況下,分配給所述目標使用者的令牌,所述目標使用者為發送所述服務請求至所述身份認證服務器的用戶端中登錄的用戶; The second receiving module is used to receive the service request forwarded by the identity authentication server, wherein the service request includes a plurality of tokens, and the plurality of tokens are for multiple servers to perform identity authentication on the target user respectively, and In the case of passing the identity authentication, a token assigned to the target user, the target user is a user logged in at the client terminal that sends the service request to the identity authentication server; 第二匹配模組,用於將所述多個令牌與區塊鏈中存儲的令牌進行匹配,確定所述目標使用者是否為已認證用戶; The second matching module is used to match the plurality of tokens with the tokens stored in the blockchain to determine whether the target user is an authenticated user; 服務回應模組,用於在確定所述目標使用者為已認證使用者的情況下,回應所述服務請求。 The service response module is used for responding to the service request when the target user is determined to be an authenticated user. 一種身份認證裝置,應用於第二服務器,其特徵在於,所述裝置包括: An identity authentication device applied to a second server, characterized in that the device includes: 第三接收模組,用於接收所述用戶端採集的與目標使用者對應的使用者身份資訊; The third receiving module is used to receive the user identity information corresponding to the target user collected by the client; 第一身份認證模組,用於根據所述使用者身份資訊對所述目標使用者進行身份認證; a first identity authentication module, configured to authenticate the target user according to the user identity information; 第一令牌分配模組,用於在認證通過的情況下,為所述目標使用者分配第二令牌,將所述第二令牌發送至所述用戶端,以及將所述第二令牌上傳至區塊鏈,以使其他機構的服務器根據包括所述第二令牌在內的多個令牌確定所述目標使用者是否為已認證用戶。 The first token allocation module is used to allocate a second token to the target user when the authentication is passed, send the second token to the client, and send the second token The card is uploaded to the block chain, so that the server of other institutions determines whether the target user is an authenticated user according to a plurality of tokens including the second token. 一種電子設備,其特徵在於,所述設備包括:處理器以及存儲有電腦程式指令的記憶體; An electronic device, characterized in that the device includes: a processor and a memory storing computer program instructions; 所述處理器執行所述電腦程式指令時實現如請求項1-6或7-10或11-12任意一項所述的身份認證方法的步驟。 When the processor executes the computer program instructions, the steps of the identity authentication method described in any one of claims 1-6 or 7-10 or 11-12 are realized. 一種電腦可讀存儲介質,其特徵在於,所述電腦可讀存儲介質上存儲有電腦程式指令,所述電腦程式指令被處理器執行時實現如請求項1-6或7-10或11-12任意一項所述的身份認證方法的步驟。 A computer-readable storage medium, characterized in that computer program instructions are stored on the computer-readable storage medium, and when the computer program instructions are executed by a processor, requirements 1-6 or 7-10 or 11-12 are realized. The steps of any one of the identity authentication methods.
TW111137392A 2022-01-28 2022-09-30 Identity authentication method, device, equipment and computer-readable storage medium TWI843220B (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202210109179.9 2022-01-28
CN202210109179.9A CN114553432B (en) 2022-01-28 2022-01-28 Identity authentication method, device, equipment and computer readable storage medium

Publications (2)

Publication Number Publication Date
TW202331563A true TW202331563A (en) 2023-08-01
TWI843220B TWI843220B (en) 2024-05-21

Family

ID=

Also Published As

Publication number Publication date
WO2023142437A1 (en) 2023-08-03
CN114553432A (en) 2022-05-27
CN114553432B (en) 2023-08-18

Similar Documents

Publication Publication Date Title
US10887275B2 (en) Token based network service among IoT applications
CN108684041B (en) System and method for login authentication
US10667135B2 (en) Dynamic policy-based on-boarding of devices in enterprise environments
US10050791B2 (en) Method for verifying the identity of a user of a communicating terminal and associated system
CN105577612B (en) Identity authentication method, third-party server, merchant server and user terminal
RU2676896C2 (en) Method and system related to authentication of users for accessing data networks
KR20170106515A (en) Multi-factor certificate authority
RU2008141288A (en) AUTHENTICATION FOR COMMERCIAL TRANSACTION WITH THE MOBILE MODULE
CN112543166B (en) Real name login method and device
CN115021958B (en) Mist calculation and blockchain fusion intelligent home identity authentication method and system
CN102893575A (en) One time passwords with ipsec and ike version 1 authentication
CN109815659A (en) Safety certifying method, device, electronic equipment and storage medium based on WEB project
WO2023142437A1 (en) Identity authentication method and apparatus, device, and computer readable storage medium
CN105323063A (en) Identity verification method of mobile terminal and fixed intelligent terminal based on two-dimensional code
CN110445751B (en) Distributed information sharing method and system based on re-encryption
US20240095729A1 (en) Methods and systems of using sub-domains to federate device credentials scoped to a common domain
JP2013008140A (en) Single sign-on system, single sign-on method and authentication server cooperation program
CN112084527A (en) Data storage and acquisition method, device, equipment and medium
CN116647345A (en) Method and device for generating permission token, storage medium and computer equipment
KR20170042137A (en) A authentication server and method thereof
CN112653676B (en) Identity authentication method and equipment crossing authentication system
CN111294315B (en) Block chain-based security authentication method, block chain-based security authentication device, block chain-based security authentication equipment and storage medium
CN113660089B (en) Tax payment user identity authentication method and device based on blockchain
CN108234136B (en) A kind of safety access method, terminal device and system
CN118101215A (en) U-shield login method, device, equipment and medium