CN111163182B - Block chain-based device registration method and apparatus, electronic device, and storage medium - Google Patents
Block chain-based device registration method and apparatus, electronic device, and storage medium Download PDFInfo
- Publication number
- CN111163182B CN111163182B CN202010267623.0A CN202010267623A CN111163182B CN 111163182 B CN111163182 B CN 111163182B CN 202010267623 A CN202010267623 A CN 202010267623A CN 111163182 B CN111163182 B CN 111163182B
- Authority
- CN
- China
- Prior art keywords
- block chain
- registration
- transaction
- node
- nodes
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q40/00—Finance; Insurance; Tax strategies; Processing of corporate or income taxes
- G06Q40/04—Trading; Exchange, e.g. stocks, commodities, derivatives or currency exchange
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
- H04L63/0442—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload wherein the sending and receiving network entities apply asymmetric encryption, i.e. different keys for encryption and decryption
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/10—Network architectures or network communication protocols for network security for controlling access to devices or network resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/32—Cryptographic 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/3247—Cryptographic 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 digital signatures
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/50—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Finance (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Computer Hardware Design (AREA)
- Strategic Management (AREA)
- Technology Law (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Marketing (AREA)
- Economics (AREA)
- Development Economics (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
The application provides a device registration method, a device, an electronic device and a storage medium based on a block chain, wherein the method comprises the following steps: responding to any received equipment registration request, sending the equipment registration request to any node in a target block chain network, indicating the block chain node to create a registration transaction according to the equipment registration request, and performing data synchronization with other nodes in the target block chain network, wherein the equipment registration request comprises an equipment identification number and equipment data, and the target block chain network comprises a plurality of nodes; and identifying any node in the target block chain network as a main node, indicating the main node to arbitrarily extract a registration transaction, and writing the registration transaction into a block chain after the common identification with the rest nodes is achieved. According to the method and the device, the device information is registered on the block chain, so that the device information can be prevented from being maliciously tampered and forged, and the safety of the device information is improved.
Description
Technical Field
The present application relates to the field of information technologies, and in particular, to a device registration method and apparatus based on a block chain, an electronic device, and a storage medium.
Background
With the development of industrial internet and internet of things, more and more devices can access the network and be managed and controlled. Due to the diversity of devices, each device needs to be assigned a unique identification number for identifying the different devices.
Currently, the device identifiers are generally registered by an identifier resolution node, wherein the identifier resolution node is generally a data center established by a country or an industry. However, since the identifier resolution node is usually established in a cluster manner, the device identifier information stored in the identifier resolution node is easily tampered and forged, which brings problems to the security of the device information and the management and control of the device.
Disclosure of Invention
The embodiment of the application provides a device registration method, a device and a system based on a block chain and an electronic device, so that device information is registered on the block chain, the security of the device information can be improved, and the device information is prevented from being tampered and forged.
In a first aspect, an embodiment of the present application provides a device registration method based on a block chain, including:
responding to any received equipment registration request, sending the equipment registration request to any node in a target block chain network, indicating the block chain node to create a registration transaction according to the equipment registration request, and performing data synchronization with other nodes in the target block chain network, wherein the equipment registration request comprises an equipment identification number and equipment data, and the target block chain network comprises a plurality of nodes;
specifically, the node may be a data processing center with service processing capability, where a service may include registration and query of a device; in the blockchain network, all nodes can have the same service processing capacity, namely can receive the registration and query services of the equipment; the registration transaction may be a registration task corresponding to the registration request, which may be performed after agreement is reached by nodes in the blockchain network.
And identifying any node in the target block chain network as a main node, indicating the main node to arbitrarily extract a registration transaction, and writing the registration transaction into a block chain after the common identification with the rest nodes is achieved.
Specifically, since the blockchain network is maintained by a plurality of nodes, any node in the blockchain network may be identified as a master node, and a registration task may be initiated by the master node, where the registration task may be a task synchronized by the nodes in the blockchain network; the process of consensus may be that the master node performs signature verification with other nodes, that is, any node returns a correct signature to the master node, and it is considered that consensus is achieved between the node and the master node.
In a second aspect, an embodiment of the present application provides an apparatus for device registration based on a block chain, including:
an obtaining module, configured to send, in response to a received any one device registration request, the device registration request to any node in a target block chain network, instruct the block chain node to create a registration transaction according to the device registration request, and perform data synchronization with other nodes in the target block chain network, where the device registration request includes a device identification number and device data, and the target block chain network includes multiple nodes;
and the registration module is used for identifying any node in the target block chain network as a main node, indicating the main node to arbitrarily extract a registration transaction, and writing the registration transaction into the block chain after the common identification with the rest nodes is achieved.
In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, which when called by the processor are capable of performing the method as described above.
In a fourth aspect, embodiments of the present application provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the method as described above.
In the above technical solution, after each node in the block chain network receives the device information, data synchronization is performed first, and then the device information is written into the block chain through the consensus protocol of each node, so that the security of the device information can be improved, and the device information is prevented from being tampered and forged.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a flowchart illustrating an embodiment of a device registration method based on a block chain according to the present application;
fig. 2 is a schematic diagram of an apparatus identification block chain structure according to an embodiment of the present application;
fig. 3 is a block chain data structure diagram according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an embodiment of the device registration apparatus based on a block chain according to the present application;
fig. 5 is a schematic structural diagram of another embodiment of the device registration apparatus based on a block chain according to the present application;
FIG. 6 is a schematic diagram of an embodiment of an electronic device of the present application;
FIG. 7 is a diagram of one embodiment of the system architecture of the present application.
Detailed Description
For better understanding of the technical solutions of the present application, the following detailed descriptions of the embodiments of the present application are provided with reference to the accompanying drawings.
It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
The block chain is a special data structure formed by combining the data blocks in a chain mode according to the time sequence, and a decentralized shared general ledger which ensures that data cannot be falsified and cannot be forged is ensured by using a cryptography mode, so that simple data information which has a sequence relation and can be verified can be safely stored. The blockchain technique may utilize an encrypted chained blockchain structure to verify and store data, and a distributed node consensus algorithm to generate and update data.
Fig. 1 is a flowchart of an embodiment of a device registration method based on a block chain according to the present application, and as shown in fig. 1, the device registration method based on a block chain may include:
Specifically, the device registration request may include a device identification number and device data, where the device data may include device-related information, where the device-related information is used to extend various attribute information of a device, and the device may be a component or a product, such as a camera, a door access, or an automobile; the device registration request is used for initiating a request to the blockchain network, and registering device identification and device related data on the blockchain network so as to facilitate management and control of a management party, wherein the management mode can be through system software such as an information processing system, a resource management system or a network management system, and the system software can be integrated in a service processing platform of a blockchain network node.
In a specific implementation, the device identification number may be a globally unique and resolvable digital object identifier, each device identification number may be composed of two parts, one part is a naming authority, the naming authority may be uniformly distributed by the security identifier management and resolution platform, the other part is a local name, the local name may be used to uniquely identify a device under the naming authority, and the naming authority and the local name may be separated by an ASCII character "/", for example, the device identification number may be identified by the following rule:
device identification number: 86.1005.16/DS-7816H-ST0120110527AA, wherein 86.1005.16 is naming authority, and DS-7816H-ST0120110527AA is local naming.
The equipment-related information may be extended information corresponding to the equipment identification number, and the extended information may include an equipment model, a production date, a batch, a production place, warehousing information, a logistics information production information address link, and a product description address link.
Further, the device may further include a pair of keys, i.e., a private key and a public key; the key may be generated through an SM9 key algorithm, the private key may be used to sign the device registration request, and the public key may be published on the blockchain network, so that the blockchain network checks the device registration request after receiving the device registration request.
The blockchain network may include a plurality of blockchain nodes, wherein each blockchain node may be a workstation, a server, or a data processing center; the blockchain nodes may have the same function and the same processing capability, so that each blockchain node can process the registration request of the device.
When the block chain network is created, the block chain nodes may negotiate keys, for example, one of the block chain nodes may first generate a pair of keys, where the keys include a public key and a private key for use by itself, then generate the next pair of keys, and send the keys to one of the block chain nodes until all the block chain nodes have their own keys, thereby completing the key negotiation between all the block chain nodes. The private key is used for signing the registration transaction, and the public key is used for verifying the signature of the signature registration transaction.
Specifically, when the blockchain network receives a registration request of the device, a blockchain node may be randomly selected from the blockchain network, and the blockchain node processes the device data, where the processing may include creating a registration transaction according to the registration request of the device, where the registration transaction is used to write information of the device to be currently registered into the blockchain.
In particular implementations, the registration transaction may include an execution script, for example, the result of the execution of the script may be: the registered transaction number is named as the equipment identification number, and the equipment data is written into the data field of the registered transaction.
After the registration transaction is created, the current blockchain link point may store the registration transaction in a local database, and send the registration transaction group to all other blockchain nodes, and after the other blockchain nodes receive the registration transaction, the other blockchain nodes may also store the registration transaction in their respective local storages, thereby ensuring data synchronization between the blockchain link points.
Further, before the current block link point sends the registration transaction to the rest of the block link nodes, the registration transaction may be signed, and the signature may be performed by a private key of the current block link point.
Further, before the remaining blockchain nodes store the current registration transaction in their respective local storages, it may also be detected whether the registration transaction has been written to the blockchain, specifically, the registration transaction may be retrieved on the blockchain according to the device identification number in the device registration request, if there is a corresponding registration transaction on the blockchain, the device registration request may be stopped, otherwise, the next operation may be performed.
Specifically, after the synchronization of the registration transaction at each block link point, one block link node may be randomly selected again in the block link network, the block link node is used as a main block link node, and any one registration transaction is extracted from the main block link node and used as the registration transaction of the current block chain to be written in, and the registration transaction is sent to the other block link nodes in a group.
After the other block chain nodes receive the registration transaction of the main block chain node, the script corresponding to the registration transaction can be executed, if the execution is successful, the registration transaction is signed by the private key of the script, and then the signed registration transaction is returned to the main block chain node.
Further, after any one of the other block chain nodes returns the signature registration transaction to the main block chain node, the block chain node may delete the corresponding stored registration transaction to prevent the same registration transaction from being repeatedly written into the block chain.
After the master blockchain node receives the signature registration transactions of the other blockchain nodes, since the public keys of the other blockchain nodes are also disclosed on the blockchain network, similarly, the received signature registration transactions can be checked through the corresponding public keys, and if the signature checks pass, the registration transactions are written into the blockchain. In one implementation, the registration transaction may first generate a corresponding data block, and then write the data block into a block chain. As shown in fig. 2, the block chain structure is a schematic diagram, the block chain is composed of different data blocks, each newly added data block is spliced after the current last data block, and each data block is connected to form a long chain, i.e. the block chain, where each data block represents a registration transaction.
Further, since the master blockchain node receives the signature registration transactions of the other blockchain nodes in sequence, and due to network delay or verification failure, the master blockchain node may receive only part of the signature registration transactions, and in order to take account of the security and efficiency of the system, a threshold value of the number of signatures may be preset, that is, a predetermined number of signatures is reached, and it can be considered that the current transaction is acknowledged by all blockchain nodes when written, that is, a consensus is achieved among all blockchain nodes. In specific implementation, when the master block chain node verifies and signs one signature registration transaction successfully, the signature number can be accumulated, and when the accumulated total number of the signatures reaches a preset number, the signature verification can be stopped, and the current registration transaction can be directly written into the block chain.
Further, after the registration transaction is written into the blockchain, any object may query the device information on the blockchain, where the query may be initiated to the blockchain network, and in a specific implementation, the query may be initiated to any one blockchain node in the blockchain network, where the query includes an identification number of the device, and after any one blockchain node receives the query, the query may be performed according to the device identification number in the query to obtain corresponding device-related information, and send the device-related information to the requester.
Further, since the requesting party may not have complete blockchain data, the authenticity of the device-related information cannot be verified, i.e., it cannot be guaranteed that the obtained device-related information is indeed on the blockchain. In order to prove the authenticity of the device-related information, the block link node may transmit, to the requester, at the same time the device-related information, attestation data for proving the authenticity of the device-related information. In a specific implementation, a merkel tree may be created, as shown in fig. 3, wherein each registration transaction (data block) may be converted into a hash value through a hash operation, for example, H (1) is the hash value of data block 1, so that all data blocks in the block chain may be converted into a hash value. Further, another hash value can be calculated by concatenation of two hash values, for example, as shown in fig. 3, H (9) can be obtained by H (1) and H (2). When the last hash value, for example, H (15), is obtained through layer-by-layer operation, where H (15) is Root, the Root may be regarded as Root data, that is, reference data, so that each requester may store the Root, and after receiving device-related information, the hash value corresponding to the device-related information may be operated with certification data, so as to obtain a piece of Root data, compare the Root data with the Root, and if the Root data is the same as the Root, the device-related information currently obtained is regarded as true, that is, stored in the current block chain. Taking fig. 3 as an example, if the registration transaction 5 and the certification data are received, the certification data and the registration transaction 5 may be subjected to hash operation, where the certification data includes registration transactions 6, H (12) and H (13), the registration transaction 5 corresponds to the hash value H (5), the registration transaction 6 corresponds to the hash value H (6), H (11) may be obtained by splicing H (5) and H (6), H (14) may be obtained by splicing H (11) and H (12), and Root may be obtained by splicing H (13) and H (14), so that the registration transaction 5 may be confirmed on the block chain, thereby ensuring the authenticity of information.
Further, after the current registration transaction is written into the blockchain, a message of successful device registration may be returned to the device registration requester, where the message of successful device registration may be returned by the master node or by another node.
Further, before any blockchain node returns the query information of the equipment to the requesting party, the identity of the requesting party can be verified, wherein the identity verification mode can be an account number and a password, and can also be other forms of identity verification modes; if the identity authentication is passed, the query information of the equipment can be returned to the requesting party, and if the identity authentication is not passed, the information of refusing query or refusing access and the like can be returned to the requesting party; after the query information of the device is returned to the requesting party, the confirmation information of the requesting party can be waited, and if the confirmation information of the requesting party is not received within the preset time, the query information of the device can be retransmitted to the requesting party.
Further, after any device is registered on the blockchain network, an intelligent contract task may be initiated for the device, where the task initiation may be to initiate an intelligent contract request to any node on the blockchain network, and after receiving the intelligent contract request, any node on the blockchain network may execute a corresponding task.
In this embodiment, after receiving the device information, each node in the block chain network performs data synchronization first, and then writes the device information into the block chain through the consensus protocol of each node, so that the security of the device information can be improved, and the device information is prevented from being tampered and forged.
Fig. 4 is a schematic structural diagram of an embodiment of the device registration apparatus based on a block chain according to the present application, where the device registration apparatus based on a block chain in the embodiment may be used as an electronic device alone or as a part of an electronic device.
As shown in fig. 4, the apparatus for registering a device based on a block chain may include: an acquisition module 401 and a registration module 402;
an obtaining module 401, configured to send, in response to any received device registration request, the device registration request to any node in a target block chain network, instruct the block chain node to create a registration transaction according to the device registration request, and perform data synchronization with other nodes in the target block chain network, where the device registration request includes a device identification number and device data, and the target block chain network includes multiple nodes;
a registration module 402, configured to identify any node in the target blockchain network as a master node, instruct the master node to arbitrarily extract a registration transaction, and write the registration transaction into a blockchain after reaching a consensus with the remaining nodes.
In a possible implementation manner, the obtaining module may be further configured to instruct the blockchain node to check the device registration request according to the public key of the device.
In a possible implementation manner, the obtaining module is further configured to sign the registration transaction by the current block chain node according to the corresponding target private key, and send the signed registration transaction to the remaining block chain nodes, where the signature is used to check the signature after the remaining block chain nodes receive the signed registration transaction, and if the signature passes, store the registration transaction.
In a possible implementation manner, the obtaining module is further configured to detect whether the registration transaction has been written into a block chain, and store the registration transaction if the registration transaction does not exist on the block chain.
In a possible implementation manner, the registration module is further configured to send the current registration transaction to the other block chain nodes, check the signature of the other block chain nodes according to the target public key after receiving the signature based on the current registration transaction, and write the current registration transaction into the block chain if the signature check is successful.
In a possible implementation manner, the registration module is further configured to accumulate the signature number if the signature verification of any blockchain node is successful, and write the current registration transaction into the blockchain when the signature total number is greater than the target signature total number.
The device registration apparatus based on the block chain provided in the embodiment shown in fig. 4 may be used to execute the technical solutions of the method embodiments shown in fig. 1 to fig. 3 of the present application, and further refer to the relevant descriptions in the method embodiments for implementing the principles and technical effects.
Fig. 5 is a schematic structural diagram of another embodiment of the device registration apparatus based on a block chain according to the present application, and unlike the device registration apparatus based on a block chain shown in fig. 4, the device registration apparatus based on a block chain shown in fig. 5 further includes: a query module 403;
the query module 403 is configured to, in response to a received device data query request, query, according to a device identification number in the request, corresponding registration transaction information on a block chain, and send the registration transaction information and certification data to a requester, where the certification data is used to certify authenticity of current registration transaction information.
The device registration apparatus based on the block chain provided in the embodiment shown in fig. 5 may be used to implement the technical solution of the method embodiment of the present application, and the implementation principle and the technical effect of the apparatus registration apparatus may further refer to the related description in the method embodiment.
It should be understood that the division of each module of the device registration apparatus based on the block chain shown in fig. 4 to fig. 5 is only a division of a logic function, and may be wholly or partially integrated into one physical entity or physically separated in actual implementation. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the module may be a separate processing element, or may be integrated into a chip of the electronic device. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors (DSPs), one or more Field Programmable Gate Arrays (FPGAs), etc. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
Fig. 6 is a schematic structural diagram of an embodiment of an electronic device 600 according to the present application, where the electronic device may include: at least one processor; and at least one memory communicatively coupled to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to perform the device registration method based on the blockchain according to the embodiments shown in fig. 1 to 3.
The electronic device may be a server, for example: a local server or a cloud server.
Fig. 6 illustrates a block diagram of an exemplary electronic device 600 suitable for implementing embodiments of the present application. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 6, the electronic device 600 is embodied in the form of a general purpose computing device. The components of the electronic device 600 may include, but are not limited to: one or more processors 610, a memory 620, and a communication bus 640 that connects the various system components (including the memory 620 and the processors 610).
Electronic devices typically include a variety of computer system readable media. Such media may be any available media that is accessible by the electronic device and includes both volatile and nonvolatile media, removable and non-removable media.
A program/utility having a set (at least one) of program modules, including but not limited to an operating system, one or more application programs, other program modules, and program data, may be stored in memory 620, each of which examples or some combination may include an implementation of a network environment. The program modules generally perform the functions and/or methodologies of the embodiments described herein.
The electronic device may also communicate with one or more external devices (e.g., keyboard, pointing device, display, etc.), one or more devices that enable a user to interact with the electronic device, and/or any devices (e.g., network card, modem, etc.) that enable the electronic device to communicate with one or more other computing devices. Such communication may occur over communication interface 630. Furthermore, the electronic device may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public Network such as the Internet) via a Network adapter (not shown in FIG. 6), which may communicate with other modules of the electronic device via communication bus 640. It should be appreciated that although not shown in FIG. 6, other hardware and/or software modules may be used in conjunction with the electronic device, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) systems, tape Drives, and data backup storage systems, among others.
The processor 610 executes various functional applications and data processing by executing programs stored in the memory 620, for example, implementing the device registration method based on the blockchain provided by the embodiment of the present application.
Fig. 7 is a schematic diagram of a system architecture 700 according to an embodiment of the present application. The system architecture is used for realizing the method provided in the above method embodiment.
As shown in fig. 7, system architecture 700 may include a processing center 710, a registration center 720, an authentication center 730, a node control center 740, and a storage control center 750.
Processing center 710 is configured to receive device registration requests forwarded by registration center 720.
The processing center 710 is further configured to instruct the node control center 740 to create a device registration request into a registration transaction according to the currently received device registration request, so that the node control center 740 arbitrarily selects a node in the target blockchain network to create the device registration request.
Processing center 710 is further configured to instruct node control center 740 to select a node in the target blockchain network to write the registration transaction to the blockchain by node control center 740.
In one possible implementation, the processing center 710 is further configured to return a message to the registration center 720 that the device registration is successful.
The processing center 710 is further configured to perform query in the storage control center 750 according to the query request from the authentication center 730 to obtain corresponding device data.
The processing center 710 is also configured to return the device data obtained by the query to the authentication center 730.
The processing center 710 is also used to return certification data to the certification center 730.
The registry 720 is configured to receive a device registration request and forward the device registration request to the processing center 710.
The registration center 720 is further configured to receive the device registration success message of the processing center 710 and forward the device registration success message to the device registration requester.
The authentication center 730 is configured to receive the device query request and forward the device query request to the processing center 710.
The authentication center 730 is further configured to receive the device data and the certification data from the processing center 710, and forward the device data and the certification data to the corresponding device query requester.
The node control center 740 is configured to arbitrarily select one of the link nodes in the target blockchain network according to the instruction of the processing center 710 to create a registration transaction, and instruct the node to perform data synchronization with the other nodes.
The node control center 740 is further configured to arbitrarily select one of the block link nodes in the target blockchain network according to the instruction of the processing center 710 to arbitrarily extract the registration transaction, and write the registration transaction into the blockchain.
The storage control center 750 is used for performing queries on the blockchain according to the instructions of the processing center 710, obtaining corresponding device data and certification data, and returning the device data and the certification data to the processing center 710
In one possible implementation, the storage control center 750 is further configured to generate a corresponding merkel tree from the data chunks in the chunk chain.
An embodiment of the present application further provides a non-transitory computer-readable storage medium, where the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the device registration method based on the blockchain provided in the embodiment of the present application.
The non-transitory computer readable storage medium described above may take any combination of one or more computer readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a flash Memory, an optical fiber, a portable compact disc Read Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of Network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing steps of a custom logic function or process, and alternate implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.
Claims (16)
1. A device registration method based on a block chain is characterized by comprising the following steps:
responding to any one device registration request received by a target block chain network, sending the device registration request to any node in the target block chain network, indicating the block chain node to create a registration transaction according to the device registration request, and performing data synchronization with other nodes in the target block chain network to enable the other nodes to store the registration transaction, wherein the device registration request comprises a device identification number and device data, and the target block chain network comprises a plurality of nodes;
and identifying any node in the target block chain network as a main node, and indicating the main node to arbitrarily extract a registration transaction, so that the main node sends the registration transaction to other nodes to achieve consensus on the registration transaction, and writes the registration transaction into a block chain after achieving consensus with the other nodes.
2. The method of claim 1, wherein after said instructing the host node to arbitrarily fetch a registration transaction, causing the host node to send the registration transaction to the remaining nodes to agree on the registration transaction, and writing the registration transaction to a blockchain after agreeing with the remaining nodes, further comprising:
responding to a received equipment data query request, querying corresponding registered transaction information on a block chain according to an equipment identification number in the request, and sending the registered transaction information and certification data to a requester, wherein the certification data is used for certifying the authenticity of the current registered transaction information.
3. The method of claim 1, further comprising, prior to said instructing the blockchain node to create a registration transaction from the device registration request:
and indicating the block chain node to check the signature of the equipment registration request according to the public key of the equipment.
4. The method of claim 1, wherein the synchronizing data with the remaining nodes in the target blockchain network comprises:
and the current block chain node signs the registration transaction according to the corresponding target private key and sends the signature registration transaction to the rest of block chain nodes, wherein the signature is used for checking the signature after the rest of block chain nodes receive the signature registration transaction, and if the signature passes the check, the registration transaction is stored.
5. The method of claim 4, wherein storing the registration transaction comprises:
and detecting whether the registered transaction is written into a block chain, and if the registered transaction does not exist on the block chain, storing the registered transaction.
6. The method of claim 1, wherein writing the registration transaction to a blockchain upon reaching consensus with the remaining nodes comprises:
and sending the current registration transaction to other block chain nodes, checking the signature of the other block chain nodes based on the current registration transaction according to the target public key after receiving the signature, and writing the current registration transaction into the block chain if the signature is successfully checked.
7. The method of claim 6, wherein writing the current registration transaction to the blockchain if the signature verification is successful comprises:
and if the signature verification of any block chain node is successful, accumulating the signature number, and writing the current registration transaction into the block chain when the total number of the signatures is greater than the total number of the target signatures.
8. An apparatus for device registration based on a block chain, comprising:
an obtaining module, configured to send, in response to a received any one device registration request, the device registration request to any node in a target block chain network, instruct the block chain node to create a registration transaction according to the device registration request, and perform data synchronization with other nodes in the target block chain network, where the device registration request includes a device identification number and device data, and the target block chain network includes multiple nodes;
and the registration module is used for identifying any node in the target block chain network as a main node and indicating the main node to arbitrarily extract a registration transaction so that the main node sends the registration transaction to other nodes to achieve consensus on the registration transaction, and writes the registration transaction into a block chain after achieving consensus with the other nodes.
9. The apparatus of claim 8, further comprising:
and the query module is used for responding to a received equipment data query request, querying corresponding registered transaction information on the block chain according to the equipment identification number in the request, and sending the registered transaction information and the certification data to a requester, wherein the certification data is used for certifying the authenticity of the current registered transaction information.
10. The apparatus of claim 8, wherein the obtaining module is further configured to instruct the blockchain node to verify the device registration request according to a public key of the device.
11. The apparatus of claim 8, wherein the obtaining module is further configured to sign the registration transaction according to a corresponding target private key at a current blockchain node, and send the signed registration transaction to the remaining blockchain nodes, wherein the signature is used for verifying the signature after the remaining blockchain nodes receive the signed registration transaction, and if the signature passes, the registration transaction is stored.
12. The apparatus of claim 11, wherein the obtaining module is further configured to detect whether the registration transaction has been written to a blockchain, and store the registration transaction if the registration transaction does not exist on the blockchain.
13. The apparatus according to claim 8, wherein the registration module is further configured to send the current registration transaction to the remaining block chain nodes, check the signature of the remaining block chain nodes based on the current registration transaction according to the target public key after receiving the signature, and write the current registration transaction into the block chain if the signature check is successful.
14. The apparatus of claim 13, wherein the registration module is further configured to accumulate the signature number if the signature verification of any blockchain node is successful, and write the current registration transaction into the blockchain when the signature total is greater than the target signature total.
15. An electronic device, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 7.
16. A non-transitory computer-readable storage medium storing computer instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 7.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2020101994147 | 2020-03-20 | ||
CN202010199414 | 2020-03-20 |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111163182A CN111163182A (en) | 2020-05-15 |
CN111163182B true CN111163182B (en) | 2021-08-03 |
Family
ID=70567817
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010267623.0A Active CN111163182B (en) | 2020-03-20 | 2020-04-08 | Block chain-based device registration method and apparatus, electronic device, and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111163182B (en) |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111934919B (en) * | 2020-07-28 | 2022-02-08 | 厦门潭宏信息科技有限公司 | Network convergence and networking method, equipment and storage medium thereof |
CN112163855B (en) * | 2020-09-30 | 2024-05-03 | 深圳前海微众银行股份有限公司 | Data processing method, device, system and storage medium |
CN112488834B (en) * | 2020-11-24 | 2024-03-19 | 成都质数斯达克科技有限公司 | Node management method, node management device, electronic equipment and readable storage medium |
CN112528323B (en) * | 2020-12-09 | 2024-08-23 | 联通(浙江)产业互联网有限公司 | Data processing method and device |
CN112487065A (en) * | 2020-12-09 | 2021-03-12 | 中国联合网络通信集团有限公司 | Data retrieval method and device |
CN112685505B (en) * | 2021-01-07 | 2022-06-24 | 腾讯科技(深圳)有限公司 | Transaction data processing method and device, computer equipment and storage medium |
CN113379525A (en) * | 2021-06-11 | 2021-09-10 | 恒安嘉新(北京)科技股份公司 | Financial supervision method and device, electronic equipment and storage medium |
CN115701068A (en) * | 2021-07-15 | 2023-02-07 | 美的集团股份有限公司 | Block chain registration method and device for household appliance |
CN113610527B (en) * | 2021-08-24 | 2024-05-28 | 上海点融信息科技有限责任公司 | Alliance chain transaction method, device, system, terminal equipment and storage medium |
CN113868255A (en) * | 2021-09-28 | 2021-12-31 | 华能山东石岛湾核电有限公司 | Block chain-based equipment identifier storage method and device and electronic equipment |
CN114841722B (en) * | 2022-07-04 | 2022-09-20 | 中国信息通信研究院 | Product verification method and system based on industrial internet identification, equipment and medium |
CN115996187A (en) * | 2022-11-18 | 2023-04-21 | 京东科技控股股份有限公司 | Routing information processing method and device, routing information interaction system and routing equipment |
CN115622817B (en) * | 2022-12-20 | 2023-03-14 | 北京泰尔英福科技有限公司 | Processing system and method of network identification |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107945090A (en) * | 2017-11-30 | 2018-04-20 | 深圳市轱辘车联数据技术有限公司 | Vehicular exhaust data analysing method, device and server based on block chain |
CN108023879A (en) * | 2017-11-30 | 2018-05-11 | 济南浪潮高新科技投资发展有限公司 | A kind of NB-IOT device data acquisition system and methods based on block chain |
CN109981582A (en) * | 2019-02-26 | 2019-07-05 | 重庆邮电大学 | A kind of internet of things equipment identity identifying method based on block chain |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10382485B2 (en) * | 2016-12-23 | 2019-08-13 | Vmware, Inc. | Blockchain-assisted public key infrastructure for internet of things applications |
KR102055748B1 (en) * | 2018-03-26 | 2019-12-13 | (주)하몬소프트 | Network self-diagnosis control apparatus based on block chain |
CN108769010B (en) * | 2018-05-29 | 2021-08-17 | 中国联合网络通信集团有限公司 | Method and device for node invited registration |
-
2020
- 2020-04-08 CN CN202010267623.0A patent/CN111163182B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107945090A (en) * | 2017-11-30 | 2018-04-20 | 深圳市轱辘车联数据技术有限公司 | Vehicular exhaust data analysing method, device and server based on block chain |
CN108023879A (en) * | 2017-11-30 | 2018-05-11 | 济南浪潮高新科技投资发展有限公司 | A kind of NB-IOT device data acquisition system and methods based on block chain |
CN109981582A (en) * | 2019-02-26 | 2019-07-05 | 重庆邮电大学 | A kind of internet of things equipment identity identifying method based on block chain |
Non-Patent Citations (1)
Title |
---|
关于区块链原理及应用的综述;姚忠将等;《科研信息化技术与应用》;20171231;第8卷(第2期);第3-14页 * |
Also Published As
Publication number | Publication date |
---|---|
CN111163182A (en) | 2020-05-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111163182B (en) | Block chain-based device registration method and apparatus, electronic device, and storage medium | |
US20210027289A1 (en) | Asset transaction method, storage medium, and computer device | |
CN109492983B (en) | Electronic seal signing method, device, equipment and medium based on block chain intelligent contract | |
CN109361740B (en) | Block generation method, device, equipment and medium of block chain | |
CN109542888B (en) | Data modification and synchronization method, device, equipment and storage medium of block chain | |
CN110879903A (en) | Evidence storage method, evidence verification method, evidence storage device, evidence verification device, evidence storage equipment and evidence verification medium | |
CN108769230B (en) | Transaction data storage method, device, server and storage medium | |
CN112101942B (en) | Transaction request processing method, system, device and equipment based on block chain | |
CN112738253B (en) | Block chain-based data processing method, device, equipment and storage medium | |
CN111314172B (en) | Block chain-based data processing method, device, equipment and storage medium | |
CN110690974B (en) | Block chain based data verification method, device, equipment and readable storage medium | |
CN110084600B (en) | Processing and verifying method, device, equipment and medium for resolution transaction request | |
CN111597567B (en) | Data processing method, data processing device, node equipment and storage medium | |
CN109861996B (en) | Block chain-based relationship proving method, device, equipment and storage medium | |
CN112311779B (en) | Data access control method and device applied to block chain system | |
CN112714158A (en) | Transaction processing method, relay network, cross-link gateway, system, medium, and device | |
CN111597537B (en) | Block chain network-based certificate issuing method, related equipment and medium | |
EP4287102A1 (en) | Cross-chain transaction processing method and apparatus, electronic device, and storage medium | |
CN111260475A (en) | Data processing method, block chain node point equipment and storage medium | |
CN111367923A (en) | Data processing method, data processing device, node equipment and storage medium | |
CN111339551B (en) | Data verification method and related device and equipment | |
CN115967508A (en) | Data access control method and device, equipment, storage medium and program product | |
CN113326503A (en) | Certificate management method and computing device | |
CN112163036A (en) | Block chain information construction and query method and related device | |
CN110597466B (en) | Control method and device of block chain node, storage medium and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |