A blockchain-based identity authentication method, device and computer equipment
By adopting a blockchain-based identity verification method in the power environment monitoring system, establishing a registered user link list and a control authority link list, verifying the identity information and authority control information of the collector and the server, the problem of low security of command transmission between the server and the collector is solved, and higher security and reliability are achieved.
Patent Information
- Application Number
- CN202111442458.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-30
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2041-11-30
AI Technical Summary
In the power environment monitoring system, the command transmission between the server and the collector is relatively safe and vulnerable to malicious command attacks.
The blockchain-based identity authentication method is adopted, by registering users on the preset alliance blockchain and generating public and private keys, establishing a registered user link list and a control authority link list, and verifying and querying the identity information and authority control information of the collector and control collector server.
Improve the security of command transmission between the collector and the server, prevent the execution of malicious commands, and ensure the security and reliability of the system.
Smart Images

Figure CN114329419B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of blockchain technology, and in particular to a blockchain-based identity authentication method, device and computer equipment. Background Art
[0002] In the power environment monitoring system, the server sends control commands to the collector to control the collector status. Currently, as long as the control command received by the collector conforms to a fixed format, the collector will execute the command. Once a malicious party sends a malicious command that conforms to the format, the collector will also execute the command, resulting in low security. Therefore, improving the security of command transmission between the server and the collector is an urgent problem to be solved. Summary of the invention
[0003] The purpose of the embodiments of the present application is to propose a blockchain-based identity authentication method, device and computer equipment to solve the problem of low security of command transmission between a server and a collector.
[0004] In order to solve the above technical problems, the embodiment of the present application provides an identity authentication method based on blockchain, which adopts the following technical solution:
[0005] Acquire a registration request sent by a registered user, wherein the registration request includes a registered user number of the registered user; the registered user is a collector or a server;
[0006] Registering in a preset alliance blockchain according to the registration request, and generating a public key and a private key corresponding to the registered user and returning them to the registered user;
[0007] Generate a registered user linked list based on the registered user number and the public key;
[0008] Obtaining a control authority query request issued by the query collector, wherein the control authority query request is issued by the query collector after receiving a control command from the control collector server, and the control authority query request includes a query collector signature and a query collector number, and a control collector server signature and a control collector server number;
[0009] Based on the registered user list and the preset control authority list, according to the query collector signature and the query collector number, as well as the control collector server signature and the control collector server number, the identity information and authority control information of the query collector and the control collector server are verified, and the query result is returned.
[0010] Furthermore, the preset alliance blockchain includes multiple consensus nodes, the consensus nodes include an on-chain node, a main node and a secondary node, the on-chain node is a node that needs to send information to the chain after being accessed by a user, and the secondary node is a consensus node other than the on-chain node and the main node; the step of generating a registered user linked list based on the registered user number and the public key includes:
[0011] Based on the Byzantine fault-tolerant consensus mechanism, the registered user number and the public key are used to generate a chain request message, and the chain request message is broadcasted to the entire network in the preset alliance blockchain through the chain node;
[0012] The master node generates a preliminary message by combining the on-chain request message, the master node signature and the target chain block number, and broadcasts the preliminary message to the entire network in the preset alliance blockchain, where the target chain block number is the number of the registered user chain block to be generated;
[0013] The consensus nodes other than the master node compare the received preparation message with the received on-chain request message. If the preparation message is the same as the on-chain request message, the consensus nodes other than the master node add their own signatures to generate preparation messages, and broadcast the preparation messages throughout the preset alliance blockchain.
[0014] The consensus nodes other than the master node determine whether the received 2f+1 preparation messages are consistent with the preparation messages received by themselves. If they are consistent, the consensus nodes other than the master node add their own signatures to generate submission messages, and broadcast the submission messages to the entire network in the preset alliance blockchain. The 2f+1 is the number of copies; f represents the number of malicious nodes or faulty nodes; n is the total number of nodes in the preset alliance blockchain, n>3f+1, and 3f+1 is the minimum number of nodes;
[0015] When the on-chain node receives 2f+1 submission messages, it broadcasts the reply message to the entire network in the preset alliance blockchain, thereby completing the on-chain process to generate a registered user chain block;
[0016] The registered user chain list is generated according to the registered user chain block.
[0017] Furthermore, the registered user chain list includes a plurality of registered user chain blocks, each of which includes a registered user chain block header and registered user chain block information, wherein the registered user chain block header includes a hash value of a previous registered user chain block, a current timestamp, and a hash value of the current registered user chain block, and the registered user chain block information includes a registered user number and a public key corresponding to the registered user number;
[0018] The preset control permission chain list is pre-set by the preset administrator user, and the preset control permission chain list includes multiple control permission chain blocks, each control permission chain block includes a control permission chain block header and control permission chain block information, the control permission chain block header includes the hash value of the previous control permission chain block, the current timestamp, and the hash value of the current control permission chain block, and the control permission chain block information includes the collector number, the server number, and whether the server has the authority to control the collector information.
[0019] Further, the query collector signature includes the query collector private key, and the control collector server signature includes the control collector server private key; the steps of verifying the identity information and authority control information of the query collector and the control collector server based on the registered user chain list and the preset control authority chain list according to the query collector signature and the query collector number, and the control collector server signature and the control collector server number, and returning the query result specifically include:
[0020] Verify whether the query collector is a legitimate user through the query collector private key, the query collector number and the registered user list, and verify whether the control collector server is a legitimate user through the control collector server number, the control collector server signature and the registered user list;
[0021] If the query collector and the control collector server are both legitimate users, it is determined whether the preset permission chain list contains permission control information corresponding to the query collector and the control collector server. If so, the permission control information is returned as a query result.
[0022] Furthermore, the step of verifying whether the query collector is a legitimate user by using the query collector private key and the query collector number and the registered user linked list includes:
[0023] Determine whether there is a collector number corresponding to the query collector number in the registered user list;
[0024] If there is a collector number corresponding to the query collector number in the registered user linked list, then judging whether there is a public key corresponding to the query collector private key in the registered user linked list based on the found collector number;
[0025] If there is a public key corresponding to the private key of the query collector in the registered user chain list, it is determined that the query collector signature verification is successful, and the query collector is determined to be a legitimate user;
[0026] Furthermore, the step of verifying whether the control collector server is a legitimate user by using the control collector server number, the control collector server signature and the registered user list includes:
[0027] Determine whether there is a server number corresponding to the control collector server number in the registered user list;
[0028] If there is a server number corresponding to the control collector server in the registered user linked list, judging whether there is a public key corresponding to the control collector server private key in the registered user linked list based on the found server number;
[0029] If the server public key corresponding to the control collector server private key exists in the registered user chain list, it is determined that the control collector server signature verification is successful, and the control collector server is determined to be a legitimate user.
[0030] Further, before the step of verifying the identity information and authority control information of the query collector and the control collector server based on the registered user chain list and the preset control authority chain list, according to the query collector signature and the query collector number, and the control collector server signature and the control collector server number, and returning the query result, the method also includes:
[0031] Obtaining control authority setting information issued by a preset administrator, the control authority setting information including a setting collector number, a setting server number, whether the setting server can control the setting collector data, and a preset administrator signature corresponding to the preset administrator;
[0032] Verify whether the preset administrator signature is correct. If correct, generate a new control authority chain block and publish the new control authority chain block on the preset control authority chain table.
[0033] Furthermore, after the step of generating a registered user list based on the registered user number and the public key, the method further includes:
[0034] The registered user list is synchronized to the registered users.
[0035] In order to solve the above technical problems, the embodiment of the present application also provides a blockchain-based identity authentication device, the device comprising:
[0036] A first acquisition module is used to acquire a registration request sent by a registered user, wherein the registration request includes a registered user number of the registered user; the registered user is a collector or a server;
[0037] A registration module, used to register in a preset alliance blockchain according to the registration request, and generate a public key and a private key corresponding to the registered user and return them to the registered user;
[0038] A generating module, used to generate a registered user linked list based on the registered user number and the public key;
[0039] A second acquisition module is used to acquire a control authority query request issued by the query collector, wherein the control authority query request is issued by the query collector after receiving a control command from the control collector server, and the control authority query request includes a query collector signature and a query collector number, and a control collector server signature and a control collector server number;
[0040] A verification module is used to verify the identity information and authority control information of the query collector and the control collector server based on the registered user list and the preset control authority list, according to the query collector signature and the query collector number, and the control collector server signature and the control collector server number, and return the query result.
[0041] In order to solve the above technical problems, an embodiment of the present application also provides a computer device, including: a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the blockchain-based identity authentication method described in the above embodiment are implemented.
[0042] In order to solve the above technical problems, an embodiment of the present application also provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the steps in the blockchain-based identity authentication method described in the above embodiment are implemented.
[0043] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: obtaining a registration request issued by a registered user, the registration request including the registered user number of the registered user; the registered user is a collector or a server; registering in a preset alliance blockchain according to the registration request, and generating a public key and a private key corresponding to the registered user and returning them to the registered user; generating a registered user linked list based on the registered user number and the public key; obtaining a control authority query request issued by a query collector, the control authority query request is issued by the query collector after receiving a control command from a control collector server, the control authority query request includes a query collector signature and a query collector number, as well as a control collector server signature and a control collector server number; based on the registered user linked list and the preset control authority linked list, according to the query collector signature and the query collector number, as well as the control collector server signature and the control collector server number, verifying the identity information and authority control information of the query collector and the control collector server, and returning the query result. In this way, the identity information and permission control information of the query collector and the control collector server can be authenticated based on the registered user list and the preset control permission list stored in the preset alliance blockchain, thereby improving the security of command transmission between the collector and the server. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0045] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;
[0046] Figure 2 is a flow chart of an embodiment of a blockchain-based identity authentication method according to the present application;
[0047] Figure 3 This is a schematic diagram of the structure of a registered user linked list provided by this application;
[0048] Figure 4 This is a flowchart of blockchain message uploading provided by this application;
[0049] Figure 5 This is a schematic diagram of the structure of a preset control authority chain table provided by this application;
[0050] Figure 6 yes Figure 2A flowchart of an embodiment before step 205;
[0051] Figure 7 It is a structural schematic diagram of an embodiment of a blockchain-based identity authentication device provided by the present application;
[0052] Figure 8 yes Figure 7 A schematic diagram of the structure of an embodiment before the verification module;
[0053] Fig. 9 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION
[0054] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.
[0055] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0056] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.
[0057] like Figure 1 As shown, the system architecture 100 may include a preset alliance blockchain 101, a collector 102, a server 103, and an administrator terminal device 104. The collector 102 and the server 103 may communicate with the preset alliance blockchain 101 via a network. The collector 102 and the server 103 may also communicate with each other via a network. The network may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0058] The administrator can use the administrator terminal device 104 to interact with the preset alliance blockchain 101 through the network to receive or send messages, etc. The administrator terminal device 104 can be installed with various communication client applications, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.
[0059] The administrator terminal device 104 can be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV), laptop computers and desktop computers, etc.
[0060] The preset alliance blockchain 101 includes multiple nodes, which can be specifically based on 5 or more nodes, so that the nodes on the preset alliance blockchain 101 can implement the Byzantine fault-tolerant consensus mechanism. The preset alliance blockchain 101 can include two parts: a registration part and an identity authentication part. The registration part is used for the registration of the server 103 and the collector 102, and a user list will be generated. The identity authentication part is used for the collector 102 to check whether the server 103 that issued the control command has the control authority after receiving the control command from the server 103. The identity authentication part will generate a permission control list. Both the user list and the permission control list follow the storage principle of the blockchain. Each block in the list contains the hash value of the previous block, the current timestamp, the hash value of the previous block and the hash value of this block calculated together with the information of this block, so that the data in the list can be easily detected after being tampered with.
[0061] The registration part includes the first acquisition module, the registration module and the generation module in the blockchain-based identity authentication device provided in the following embodiment. The identity authentication part includes the second acquisition module and the verification module in the blockchain-based identity authentication device provided in the following embodiment.
[0062] Signature authentication can be performed between the registration part and the identity authentication part. Specifically, the identity authentication part sends a signature authentication request to the registration part, and the registration part finds the corresponding public key and verifies the signature and then returns the verification result to the identity authentication part.
[0063] The collector 102 may be a device for collecting various data.
[0064] The server 103 may be a server that provides various services.
[0065] It should be noted that the blockchain-based identity authentication method provided in the embodiment of the present application is generally executed by the preset alliance blockchain 101, and accordingly, the blockchain-based identity authentication device is generally set in the preset alliance blockchain 101.
[0066] It should be understood that Figure 1 The number of preset alliance blockchains 101, collectors 102, servers 103, and administrator terminal devices 104 is merely illustrative. Depending on the implementation requirements, there may be any number of preset alliance blockchains 101, collectors 102, servers 103, and administrator terminal devices 104.
[0067] Continue to refer Figure 2 , showing a flow chart of an embodiment of a blockchain-based identity authentication method according to the present application. The blockchain-based identity authentication method comprises the following steps:
[0068] Step S201, obtaining a registration request sent by a registered user.
[0069] In this embodiment, the electronic device (e.g. Figure 1 The preset alliance blockchain shown in the figure) can receive the registration request through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection methods currently known or to be developed in the future.
[0070] The registration request includes the registered user number of the registered user; the registered user is a collector or a server. When the registered user is a collector, the registered user number corresponds to the collector number; of course, when the registered user is a server, the registered user number corresponds to the server number.
[0071] Specifically, when a collector or server needs to register, they can use their respective numbers to generate a registration request to register with the preset alliance blockchain.
[0072] Step S202: register in the preset alliance blockchain according to the registration request, and generate a public key and a private key corresponding to the registered user and return them to the registered user.
[0073] In this embodiment, the nodes on the alliance blockchain can implement the Byzantine fault-tolerant consensus mechanism. There is a mapping relationship between the public key and the private key. The public key is used to generate a registered user list, and the private key is used to register the user for signature verification.
[0074] Specifically, when a collector or server needs to register, it can use the corresponding number to send a registration request to the node of the preset alliance blockchain. At this time, the node will generate a unique public key and private key, and then return the corresponding public key and private key to the corresponding collector or server.
[0075] Step S203, generating a registered user linked list based on the registered user ID and the public key.
[0076] Among them, Figure 3 As shown, Figure 3 This is a structural diagram of a registered user chain list provided by the present application. When there are multiple collectors or multiple servers registered, the registered user chain list includes multiple registered user chain blocks, each of which includes a registered user chain block header and registered user chain block information. The registered user chain list follows the storage principle of the preset alliance blockchain and is stored in the preset alliance blockchain.
[0077] The registered user chain block header includes the hash value of the previous registered user chain block, the current timestamp, and the hash value of the current registered user chain block. The registered user chain block information includes the registered user number and the public key corresponding to the registered user number. By associating the hash value of the previous registered user chain block, it is easy to detect that the data in the registered user chain list has been tampered with. Due to the preset consensus mechanism of the alliance blockchain, when the data on the registered user chain list is tampered with, if the remaining 50% or more nodes find errors and alarm, the management personnel can quickly discover that the data has been tampered with, ensuring the security of the system.
[0078] In this embodiment, the preset alliance blockchain includes multiple consensus nodes, which can be based on 5 or more nodes. The consensus nodes include on-chain nodes, master nodes, and slave nodes. The on-chain nodes are nodes that need to send information to the chain after being accessed by users, and the slave nodes are consensus nodes other than the on-chain nodes and master nodes. The master node is any one of the multiple consensus nodes, and the master node is different from the on-chain node. Figure 4 As shown, Figure 4 This is a blockchain message on-chain flow chart provided by this application.
[0079] Specifically, step ①: Based on the Byzantine fault-tolerant consensus mechanism, the registered user number and public key are used to generate a chain request message, and the chain request message is broadcast throughout the preset alliance blockchain through the chain node.
[0080] Step ②: The master node generates a preliminary message with the chain request message, the master node signature and the target chain block number, and broadcasts the preliminary message to the entire network in the preset alliance blockchain. The target chain block number is the number of the registered user chain block to be generated.
[0081] Step 3: The consensus nodes other than the master node compare the received preparation message with the received on-chain request message. If the preparation message is the same as the on-chain request message, the consensus nodes other than the master node add their own signatures to generate the preparation message, and broadcast the preparation message to the entire network in the preset alliance blockchain.
[0082] Step ④: The consensus nodes other than the master node determine whether the 2f+1 prepared messages received are consistent with the prepared messages received by themselves. If they are consistent, the consensus nodes other than the master node add their own signatures to generate submission messages, and broadcast the submission messages to the entire network in the preset alliance blockchain; 2f+1 is the number of copies; f is the number of malicious nodes or faulty nodes; n is the total number of nodes in the preset alliance blockchain, n>3f+1, 3f+1 is the minimum number of nodes.
[0083] Step ⑤: When the on-chain node receives 2f+1 submission messages, it broadcasts the reply message to the entire network in the preset alliance blockchain through the on-chain node, thereby completing the on-chain process to generate a registered user chain block, and then generates a registered user chain list based on the registered user chain block.
[0084] More specifically, steps ①, ②, ③, ④ and ⑤ can also be expressed as five stages: step ① the on-chain node sends a deposit registration request, step ② the master node prepares, step ③ all nodes prepare, step ④ all nodes submit, and step ⑤ the on-chain node replies. In this way, the preset alliance blockchain can tolerate invalid or malicious nodes that are less than 1 / 3 of the total number of nodes, ensuring the accuracy of information in the preset alliance blockchain.
[0085] Specifically, after the public key and private key of the registered user are generated, the registered user number and the corresponding public key can be broadcasted and stored in the preset alliance blockchain. The broadcasting and chaining process needs to be completed through the Byzantine fault-tolerant consensus mechanism. After the chaining is completed, the registered user chain block corresponding to the registered user can be generated, and the registered user chain block can be published to the preset alliance blockchain table to obtain the registered user chain list.
[0086] Step S204: obtaining a control authority query request sent by the query collector.
[0087] Among them, the above-mentioned query collector is a collector that needs to issue a control authority query request.
[0088] The control authority query request is issued by the query collector after receiving the control command of the control collector server. The above control collector server is a server that issues the control command for controlling the query collector.
[0089] The control authority query request includes the query collector signature and the query collector number, as well as the control collector server signature and the control collector server number. The query collector signature includes the query collector private key and the query collector number.
[0090] Specifically, when the query collector receives a control command from the control collector server, it needs to issue a control authority query request to check whether the server that issued the control command has control authority. If the control collector server has control authority, the query collector executes the received control command. If the control collector server does not have control authority, the query collector cannot execute the received control command.
[0091] It should be noted that when the control collector server sends a control command to the query collector, it needs to attach its own private key signature and server code. After receiving the control command, the query collector verifies the signature of the control collector server. If the signature of the control collector server is verified correctly, it needs to request the preset alliance blockchain to check whether the control collector server has the authority to control the query collector.
[0092] Step S205, based on the registered user list and the preset control authority list, according to the query collector signature and query collector number, and the control collector server signature and control collector server number, verify the identity information and authority control information of the query collector and control collector server, and return the query result.
[0093] Among them, Figure 5 As shown, Figure 5 It is a structural diagram of a preset control permission chain table provided by the present application. The preset control permission chain table is pre-set by the administrator user, and the preset control permission chain table follows the storage principle of the preset alliance blockchain and is stored in the preset alliance blockchain. The preset preset control permission chain table includes multiple control permission chain blocks, each of which includes a control permission chain block header and control permission chain block information. The control permission chain block header includes the hash value of the previous control permission chain block, the current timestamp, and the hash value of the current control permission chain block. The control permission chain block information includes the collector number, the server number, and whether the server has the authority to control the collector information.
[0094] The preset administrator user is a management user pre-set in the preset alliance blockchain. The administrator user has the right to publish information on the preset alliance blockchain that allows control of the collector. By signing with the administrator user's own private key, the administrator user sends the allowed access permission data to the preset alliance blockchain. The allowed access permission data includes the collector number, server number, and whether the server can control the collector. After receiving the allowed access permission data, the preset alliance blockchain verifies the signature of the administrator user. If the signature verification of the server is correct, the allowed access permission data is saved to a new control permission chain list block, and the hash value of the control permission chain list block is returned. The preset alliance blockchain also uses the Byzantine fault-tolerant consensus mechanism in the process of generating the control permission chain block. The administrator user can detect whether the information on the preset control permission chain list has been tampered with through the returned hash value.
[0095] In an embodiment of the present invention, by querying the collector private key and querying the collector number and the registered user list, it is verified whether the queried collector is a legitimate user, and by controlling the collector server number and the control collector server signature and the registered user list, it is verified whether the control collector server is a legitimate user.
[0096] If the query collector and the control collector server are both legitimate users, it is determined whether there is permission control information corresponding to the query collector and the control collector server in the preset permission chain table. If so, the permission control information is returned as the query result.
[0097] The initial identity of the collector or server is set as a legal user when registering. When the collector or server fails or is abnormal, the collector or server can also be set as an illegal user.
[0098] Specifically, the steps of verifying whether the queried collector is a legitimate user by querying the collector private key and the query collector number and the registered user linked list include:
[0099] Determine whether there is a collector number corresponding to the query collector number in the registered user list;
[0100] If there is a collector number corresponding to the query collector number in the registered user list, then based on the found collector number, it is determined whether there is a public key corresponding to the query collector private key in the registered user list;
[0101] If there is a public key corresponding to the private key of the query collector in the registered user list, it is determined that the query collector signature verification is successful and the query collector is determined to be a legitimate user;
[0102] And, the steps of verifying whether the control collector server is a legitimate user by controlling the collector server number, the control collector server signature and the registered user list include:
[0103] Determine whether there is a server number corresponding to the control collector server number in the registered user list;
[0104] If there is a server number corresponding to the control collector server in the registered user list, then determine whether there is a public key corresponding to the control collector server private key in the registered user list based on the server number found;
[0105] If the server public key corresponding to the control collector server private key exists in the registered user list, it is determined that the control collector server signature verification is successful, and the control collector server is determined to be a legitimate user.
[0106] Furthermore, after determining that the query collector and the control collector server are both legitimate users, the corresponding permission control information can be searched in the control permission chain list. If the corresponding permission control information is found in the control permission chain list, the found permission control information is returned to the query collector as a query result. It should be noted that if the query collector and the control collector server have control permission information in the control permission chain list, they are recorded in pairs in the control permission chain list, that is, the query collector number and the server number and permission information are recorded at the same time. In this embodiment, the permission of the control collector server to control the collector is mainly recorded.
[0107] When it is returned that the control collector server can control the query collector, the query collector executes the control command, so that the query collector can execute the control command of the control collector server. Further, the query collector can be controlled by the control collector server.
[0108] If the control information of the query collector and the control server cannot be found in the control permission chain table, the query result can be returned as empty or no, indicating that the control command of the control collector server is malicious control, the query collector cannot be controlled by the control collector server, and the query collector cannot execute the control command of the control collector server. This improves the security of the control relationship between the collector and the server.
[0109] This application obtains the registration request issued by the registered user, and the registration request includes the registered user number of the registered user; the registered user is a collector or a server; registers in the preset alliance blockchain according to the registration request, and generates a public key and a private key corresponding to the registered user and returns them to the registered user; generates a registered user chain list based on the registered user number and the public key; obtains the control authority query request issued by the query collector, and the control authority query request is issued by the query collector after receiving the control command of the control collector server, and the control authority query request includes the query collector signature and the query collector number, as well as the control collector server signature and the control collector server number; based on the registered user chain list and the preset control authority chain list, according to the query collector signature and the query collector number, as well as the control collector server signature and the control collector server number, verify the identity information and authority control information of the query collector and the control collector server, and return the query result. In this way, the identity information and authority control information of the query collector and the control collector server can be authenticated in combination with the registered user chain list and the preset control authority chain list stored in the preset alliance blockchain, thereby improving the security of command transmission between the collector and the server.
[0110] In some optional implementations of this embodiment, such as Figure 6 As shown, in step 205, based on the registered user chain list and the preset control authority chain list, according to the query collector signature and the query collector number, as well as the control collector server signature and the control collector server number, the identity information and authority control information of the query collector and the control collector server are verified, and before returning the query result, the above electronic device may also perform the following steps:
[0111] Step S301, obtaining control authority setting information issued by a preset administrator, the control authority setting information including a setting collector number, a setting server number, whether the setting server can control the setting collector data, and a preset administrator signature corresponding to the preset administrator.
[0112] Step S302, verify whether the preset administrator signature is correct, if correct, generate a new control authority chain block, and publish the new control authority chain block on the preset control authority chain table.
[0113] Specifically, before the identity authentication and control authority query of the query server and the control collector server, it is necessary to obtain the control authority chain list published by the preset administrator, and then obtain the preset control authority chain list for verifying the authority control information between the query server and the control collector server. The administrator user can delete or add control authority chain blocks on the preset control authority chain list, so that the corresponding control authority can be configured for the registered legal collectors and servers or the corresponding control authority can be deleted for the illegal collectors and servers, thereby improving the security of server and collector identity authentication and control authority verification.
[0114] This application allows the administrator to add the content of the preset control authority list through the preset setting, and then set the control authority between each collector and the server, thereby improving the security of server and collector identity authentication and control authority authentication.
[0115] In some optional implementations, before generating a registered user list based on the registered user number and the public key in step 203, the electronic device may perform the following steps:
[0116] Synchronize the registered user list to the registered users.
[0117] After the registration generates a registered user list, all servers or collectors that have registered can synchronize the registered user list, so that when receiving a request from a server or collector, it can verify whether the command and identity verification are issued by a registered legitimate user, thereby improving the security of collectors and servers.
[0118] It should be emphasized that in order to further ensure the privacy and security of the above identity information and control authority information, the above identity information and control authority information can also be stored in the nodes of the preset alliance blockchain. Of course, the registered user list and the preset control authority list follow the storage principle of the preset alliance blockchain and are stored in the preset alliance blockchain.
[0119] The preset alliance blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain storage has the characteristic that data cannot be tampered with. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. The blockchain can include the blockchain underlying platform, the platform product service layer, and the application service layer.
[0120] This application can be applied in the field of smart data management, thereby promoting the construction of smart cities.
[0121] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0122] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0123] Further references Figure 7 , as a response to the above Figure 2 The present application provides an embodiment of a blockchain-based identity authentication device, and the blockchain-based identity authentication device 400 embodiment is similar to Figure 2 Corresponding to the method embodiment shown, the blockchain-based identity authentication device 00 can be specifically applied to various electronic devices.
[0124] like Figure 4 As shown, the blockchain-based identity authentication device 400 of this embodiment includes: a first acquisition module 401, a registration module 402, a generation module 403, a second acquisition module 404 and a verification module 405. Among them:
[0125] The first acquisition module 401 is used to acquire a registration request sent by a registered user, the registration request includes a registered user number of the registered user; the registered user is a collector or a server;
[0126] The registration module 402 is used to register in the preset alliance blockchain according to the registration request, and generate a public key and a private key corresponding to the registered user and return them to the registered user;
[0127] A generation module 403 is used to generate a registered user list based on the registered user number and the public key;
[0128] The second acquisition module 404 is used to acquire a control authority query request issued by the query collector. The control authority query request is issued by the query collector after receiving a control command from the control collector server. The control authority query request includes a query collector signature and a query collector number, as well as a control collector server signature and a control collector server number.
[0129] Verification module 405 is used to verify the identity information and authority control information of the query collector and the control collector server based on the registered user list and the preset control authority list, according to the query collector signature and the query collector number, and the control collector server signature and the control collector server number, and return the query result.
[0130] In this embodiment, a registration request issued by a registered user is obtained through a first acquisition module, and the registration request includes a registered user number of the registered user; the registered user is a collector or a server; the registration module is used to register in a preset alliance blockchain according to the registration request, and a public key and a private key corresponding to the registered user are generated and returned to the registered user; a registered user linked list is generated based on the registered user number and the public key by a generation module; a control authority query request issued by a query collector is obtained through a second acquisition module, and the control authority query request is issued by the query collector after receiving a control command from a control collector server, and the control authority query request includes a query collector signature and a query collector number, as well as a control collector server signature and a control collector server number; and the verification module verifies the identity information and authority control information of the query collector and the control collector server based on the registered user linked list and the preset control authority linked list, according to the query collector signature and the query collector number, as well as the control collector server signature and the control collector server number, and returns the query result. In this way, the identity information and permission control information of the query collector and the control collector server can be authenticated in combination with the registered user list and the preset control permission list stored in the preset alliance blockchain, thereby improving the security of command transmission between the collector and the server.
[0131] In some optional implementations of this embodiment, the preset alliance blockchain includes multiple consensus nodes, and the consensus nodes include on-chain nodes, master nodes, and sub-nodes. The on-chain nodes are consensus nodes that need to send information to the chain after being accessed by users, and the sub-nodes are consensus nodes other than the on-chain nodes and the master nodes; the master node is any one of the multiple consensus nodes, and the master node is different from the on-chain node. The generation module 403 includes: a request unit, a preparation unit, a preparation unit, a submission unit, a reply unit, and a generation unit. Among them,
[0132] The request unit is used to generate a chain request message based on the Byzantine fault-tolerant consensus mechanism using the registered user number and public key, and broadcast the chain request message to the entire network in the preset alliance blockchain through the chain node;
[0133] The preparation unit is used to generate a preparation message through the master node by combining the on-chain request message, the master node signature and the target chain block number, and broadcast the preparation message to the entire network in the preset alliance blockchain. The target chain block number is the number of the registered user chain block to be generated;
[0134] The preparation unit is used to compare the received preparation message with the received on-chain request message through the consensus nodes other than the master node. If the preparation message is the same as the on-chain request message, the consensus nodes other than the master node will add their own signatures to generate the preparation message, and broadcast the preparation message to the entire network in the preset alliance blockchain;
[0135] The submission unit is used to determine whether the received 2f+1 preparation messages are consistent with the preparation messages received by itself through consensus nodes other than the master node. If they are consistent, the consensus nodes other than the master node will add their own signatures to generate submission messages, and broadcast the submission messages to the entire network in the preset alliance blockchain; 2f+1 is the number of copies; f is the number of malicious nodes or faulty nodes; n is the total number of nodes in the preset alliance blockchain, n>3f+1, 3f+1 is the minimum number of nodes;
[0136] The reply unit is used to broadcast the reply message to the entire network in the preset alliance blockchain through the on-chain node after receiving 2f+1 submission messages, thereby completing the on-chain process and generating a registered user chain block;
[0137] The generating unit is used to generate a registered user linked list according to the registered user linked block.
[0138] In the embodiment of the present invention, a registered user linked list is obtained through a request unit, a preparation unit, a preparation unit, a submission unit, a reply unit and a generation unit, so that the preset alliance blockchain can tolerate invalid or malicious nodes less than 1 / 3 of the total number of nodes, thereby ensuring the accuracy of information in the preset alliance blockchain.
[0139] In some optional implementations of this embodiment, the registered user chain list includes multiple registered user chain blocks, each registered user chain block includes a registered user chain block header and registered user chain block information, the registered user chain block header includes a hash value of the previous registered user chain block, a current timestamp, and a hash value of the current registered user chain block, and the registered user chain block information includes a registered user number and a public key corresponding to the registered user number;
[0140] The preset control permission chain list is pre-set by the preset administrator user. The preset control permission chain list includes multiple control permission chain blocks. Each control permission chain block includes a control permission chain block header and control permission chain block information. The control permission chain block header includes the hash value of the previous control permission chain block, the current timestamp, and the hash value of the current control permission chain block. The control permission chain block information includes the collector number, the server number, and whether the server has the authority to control the collector information.
[0141] In the embodiment of the present invention, the registered user list and the preset control authority list can be guaranteed to be tamper-proof, thereby improving the security of data storage.
[0142] In some optional implementations of this embodiment, querying the collector signature includes querying the collector private key, and controlling the collector server signature includes controlling the collector server private key; the verification module 405 specifically includes: a query unit and a verification unit. Among them,
[0143] A query unit, used to verify whether the query collector is a legitimate user by querying the collector private key and the query collector number and the registered user list, and to verify whether the control collector server is a legitimate user by controlling the collector server number and the control collector server signature and the registered user list;
[0144] The verification unit determines whether the query collector and the control collector server have permission control information corresponding to the query collector and the control collector server in the preset permission chain table if the query collector and the control collector server are both legitimate users. If so, the permission control information is returned as the query result.
[0145] In an embodiment of the present invention, the identity information of the collector and the server is queried through the query unit, and the authority control information between the collector and the server is verified through the verification unit, so as to determine the control relationship between the collector and the server, and further improve the security of the control relationship between the collector and the server.
[0146] In some optional implementations of this embodiment, the verification unit further includes:
[0147] The first judgment subunit is used to judge whether there is a collector number corresponding to the query collector number in the registered user list;
[0148] The second judgment subunit is used to judge whether there is a public key corresponding to the query collector private key in the registered user list based on the found collector number if there is a collector number corresponding to the query collector number in the registered user list;
[0149] The third judgment subunit is used to determine that the query collector signature verification is successful and determine that the query collector is a legitimate user if there is a public key corresponding to the query collector private key in the registered user chain list;
[0150] And, the fourth judgment subunit is used to verify whether the control collector server is a legitimate user by controlling the collector server number and the control collector server signature and the registered user list, including the following steps:
[0151] A fifth judgment subunit is used to judge whether there is a server number corresponding to the control collector server number in the registered user list;
[0152] The sixth judgment subunit is used to judge whether there is a public key corresponding to the private key of the control collector server in the registered user list based on the server number found if there is a server number corresponding to the control collector server in the registered user list;
[0153] The seventh judgment subunit is used to determine that the control collector server signature verification is successful and determine that the control collector server is a legitimate user if there is a server public key corresponding to the control collector server private key in the registered user chain list.
[0154] In some optional implementations of this embodiment, such as Figure 8 As shown, before the verification module 405, the blockchain-based identity authentication device 400 further includes: a third acquisition module 406 and a publishing module 407.
[0155] The third acquisition module 406 is used to obtain the control authority setting information issued by the preset administrator, the control authority setting information includes the setting collector number, the setting server number, whether the setting server can control the setting collector data, and the preset administrator signature corresponding to the preset administrator;
[0156] The publishing module 407 is used to verify whether the preset administrator signature is correct. If correct, a new control authority chain block is generated and the new control authority chain block is published on the preset control authority chain table.
[0157] In an embodiment of the present invention, the third acquisition module 406 and the publishing module 407 configure corresponding control permissions for registered legal collectors and servers, or delete corresponding control permissions for illegal collectors and servers, to obtain a preset control permission list, thereby improving the security of server and collector identity authentication and control permission verification.
[0158] In some optional implementations of this embodiment, after the generation module, the blockchain-based identity authentication device 400 also includes: a synchronization module.
[0159] The synchronization module is used to synchronize the registered user list to the registered users.
[0160] In the embodiment of the present invention, the registered user list is synchronized with all registered servers or collectors through the synchronization module, so as to verify whether the command and identity verification are issued by the registered legal user when receiving a request from the server or collector, thereby improving the security of the collector and the server.
[0161] In some optional implementations of this embodiment, the registered user list and the preset control authority list both follow the storage principle of the preset alliance blockchain and are stored in the preset alliance blockchain. The registered user list and the list and the preset control authority list are guaranteed to be tamper-proof and the data security is improved.
[0162] To solve the above technical problems, the present application also provides a computer device. Fig. 9 , Fig. 9 This is a basic structural block diagram of the computer device in this embodiment.
[0163] The computer device 5 includes a memory 51, a processor 52, and a network interface 53 that are interconnected and communicated through a system bus. It should be noted that the figure only shows a computer device 5 having components 51-53, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0164] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.
[0165] The memory 51 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 51 can be an internal storage unit of the computer device 5, such as a hard disk or memory of the computer device 5. In other embodiments, the memory 61 can also be an external storage device of the computer device 5, such as a plug-in hard disk equipped on the computer device 5, a smart memory card (SmartMedia Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. Of course, the memory 51 can also include both the internal storage unit of the computer device 5 and its external storage device. In this embodiment, the memory 51 is generally used to store the operating system and various application software installed on the computer device 5, such as computer-readable instructions of the identity authentication method based on the blockchain, etc. In addition, the memory 51 can also be used to temporarily store various types of data that have been output or are to be output.
[0166] The processor 52 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 52 is generally used to control the overall operation of the computer device 5. In this embodiment, the processor 52 is used to run computer-readable instructions stored in the memory 51 or process data, such as computer-readable instructions for running a blockchain-based identity authentication method.
[0167] The network interface 53 may include a wireless network interface or a wired network interface, and the network interface 53 is generally used to establish a communication connection between the computer device 5 and other electronic devices.
[0168] This improves the security of command transmission between the collector and the server.
[0169] The present application also provides another embodiment, namely, providing a computer-readable storage medium, which stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the blockchain-based identity authentication method as described above.
[0170] This improves the security of command transmission between the collector and the server.
[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the various embodiment methods of the present application.
[0172] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.
Claims
1. A blockchain-based identity authentication method, characterized in that: The steps include: Acquire a registration request sent by a registered user, wherein the registration request includes a registered user number of the registered user; the registered user is a collector or a server; Registering in a preset alliance blockchain according to the registration request, and generating a public key and a private key corresponding to the registered user and returning them to the registered user; Generate a registered user linked list based on the registered user number and the public key; Obtaining a control authority query request issued by the query collector, wherein the control authority query request is issued by the query collector after receiving a control command from the control collector server, and the control authority query request includes a query collector signature and a query collector number, and a control collector server signature and a control collector server number; Based on the registered user chain list and the preset control authority chain list, according to the query collector signature and the query collector number, as well as the control collector server signature and the control collector server number, verify the identity information and authority control information of the query collector and the control collector server, and return the query result; Among them, the query collector signature includes the query collector private key, and the control collector server signature includes the control collector server private key; the steps of verifying the identity information and authority control information of the query collector and the control collector server based on the registered user chain list and the preset control authority chain list according to the query collector signature and the query collector number, and the control collector server signature and the control collector server number, and returning the query result specifically include: Verify whether the query collector is a legitimate user through the query collector private key and the query collector number and the registered user list, and verify whether the control collector server is a legitimate user through the control collector server number and the control collector server signature and the registered user list; If the query collector and the control collector server are both legitimate users, it is determined whether there is permission control information corresponding to the query collector and the control collector server in the preset control permission chain list. The control permission information of the query collector and the control collector server in the control permission chain list is recorded in pairs. If so, the permission control information is returned as a query result.
2. The blockchain-based identity authentication method according to claim 1, characterized in that: The preset alliance blockchain includes multiple consensus nodes, and the consensus nodes include on-chain nodes, master nodes, and slave nodes. The on-chain nodes are consensus nodes that need to send information to the chain after being accessed by users, and the slave nodes are consensus nodes other than the on-chain nodes and the master nodes. The step of generating a registered user linked list based on the registered user number and the public key comprises: Based on the Byzantine fault-tolerant consensus mechanism, the registered user number and the public key are used to generate a chain request message, and the chain request message is broadcasted to the entire network in the preset alliance blockchain through the chain node; The master node generates a preliminary message by combining the on-chain request message, the master node signature and the target chain block number, and broadcasts the preliminary message to the entire network in the preset alliance blockchain, where the target chain block number is the number of the registered user chain block to be generated; The consensus nodes other than the master node compare the received preparation message with the received on-chain request message. If the preparation message is the same as the on-chain request message, the consensus nodes other than the master node add their own signatures to generate preparation messages, and broadcast the preparation messages throughout the preset alliance blockchain. The consensus nodes other than the master node determine whether the received 2f+1 preparation messages are consistent with the preparation messages received by themselves. If they are consistent, the consensus nodes other than the master node add their own signatures to generate submission messages, and broadcast the submission messages to the entire network in the preset alliance blockchain. The 2f+1 is the number of copies; f is the number of malicious nodes or faulty nodes; n is the total number of nodes in the preset alliance blockchain, n>3f+1, and 3f+1 is the minimum number of nodes; When the on-chain node receives 2f+1 submission messages, it broadcasts the reply message to the entire network in the preset alliance blockchain, thereby completing the on-chain process to generate a registered user chain block; The registered user chain list is generated according to the registered user chain block.
3. The blockchain-based identity authentication method according to claim 2, characterized in that: The registered user chain list includes multiple registered user chain blocks, each of which includes a registered user chain block header and registered user chain block information. The registered user chain block header includes a hash value of the previous registered user chain block, a current timestamp, and a hash value of the current registered user chain block. The registered user chain block information includes a registered user number and a public key corresponding to the registered user number; The preset control permission chain list is pre-set by the preset administrator user, and the preset control permission chain list includes multiple control permission chain blocks, each control permission chain block includes a control permission chain block header and control permission chain block information, the control permission chain block header includes the hash value of the previous control permission chain block, the current timestamp, and the hash value of the current control permission chain block, and the control permission chain block information includes the collector number, the server number, and whether the server has the authority to control the collector information.
4. The blockchain-based identity authentication method according to claim 1, characterized in that: The step of verifying whether the query collector is a legitimate user by using the query collector private key and the query collector number and the registered user linked list includes: Determine whether there is a collector number corresponding to the query collector number in the registered user list; If there is a collector number corresponding to the query collector number in the registered user linked list, then judging whether there is a public key corresponding to the query collector private key in the registered user linked list based on the found collector number; If there is a public key corresponding to the private key of the query collector in the registered user chain list, it is determined that the query collector signature verification is successful, and the query collector is determined to be a legitimate user; Furthermore, the step of verifying whether the control collector server is a legitimate user by using the control collector server number, the control collector server signature and the registered user list includes: Determine whether there is a server number corresponding to the control collector server number in the registered user list; If there is a server number corresponding to the control collector server in the registered user linked list, judging whether there is a public key corresponding to the control collector server private key in the registered user linked list based on the found server number; If the server public key corresponding to the control collector server private key exists in the registered user chain list, it is determined that the control collector server signature verification is successful, and the control collector server is determined to be a legitimate user.
5. The blockchain-based identity authentication method according to claim 1, characterized in that: Before the step of verifying the identity information and authority control information of the query collector and the control collector server based on the registered user chain list and the preset control authority chain list according to the query collector signature and the query collector number, and the control collector server signature and the control collector server number, and returning the query result, the method further includes: Obtaining control authority setting information issued by a preset administrator, the control authority setting information including a setting collector number, a setting server number, whether the setting server has the authority to control the setting collector data, and a preset administrator signature corresponding to the preset administrator; Verify whether the preset administrator signature is correct. If correct, generate a new control authority chain block and publish the new control authority chain block on the preset control authority chain table.
6. The blockchain-based identity authentication method according to claim 1, characterized in that: After the step of generating a registered user linked list based on the registered user number and the public key, the method further includes: The registered user list is synchronized to the registered users.
7. A blockchain-based identity authentication device, used to implement the blockchain-based identity authentication method according to any one of claims 1 to 6, characterized in that: The device comprises: A first acquisition module is used to acquire a registration request sent by a registered user, wherein the registration request includes a registered user number of the registered user; the registered user is a collector or a server; A registration module, used to register in a preset alliance blockchain according to the registration request, and generate a public key and a private key corresponding to the registered user and return them to the registered user; A generating module, used to generate a registered user linked list based on the registered user number and the public key; A second acquisition module is used to acquire a control authority query request issued by the query collector, wherein the control authority query request is issued by the query collector after receiving a control command from the control collector server, and the control authority query request includes a query collector signature and a query collector number, and a control collector server signature and a control collector server number; A verification module is used to verify the identity information and authority control information of the query collector and the control collector server based on the registered user list and the preset control authority list, according to the query collector signature and the query collector number, and the control collector server signature and the control collector server number, and return the query result.
8. A computer device comprising a memory and a processor, wherein the memory stores computer-readable instructions, and when the processor executes the computer-readable instructions, the steps of the blockchain-based identity authentication method as described in any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the blockchain-based identity authentication method as described in any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Query method and device for account privacy information in blockchain
CN111008228A
Unified identity authentication method based on block chain PBFT algorithm
CN112583858A