CN113315811A - Identifier analysis method and device based on alliance block chain, storage medium and server - Google Patents

Identifier analysis method and device based on alliance block chain, storage medium and server Download PDF

Info

Publication number
CN113315811A
CN113315811A CN202110477150.1A CN202110477150A CN113315811A CN 113315811 A CN113315811 A CN 113315811A CN 202110477150 A CN202110477150 A CN 202110477150A CN 113315811 A CN113315811 A CN 113315811A
Authority
CN
China
Prior art keywords
identifier
hash value
ipfs
request
external
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.)
Pending
Application number
CN202110477150.1A
Other languages
Chinese (zh)
Inventor
濮灿
陈松
吴诗伟
马华强
秦文聪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
China Academy of Information and Communications Technology CAICT
Original Assignee
Beijing Qihoo Technology Co Ltd
China Academy of Information and Communications Technology CAICT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd, China Academy of Information and Communications Technology CAICT filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN202110477150.1A priority Critical patent/CN113315811A/en
Publication of CN113315811A publication Critical patent/CN113315811A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2255Hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2458Special types of queries, e.g. statistical queries, fuzzy queries or distributed queries
    • G06F16/2471Distributed queries
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Computational Linguistics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Mathematical Physics (AREA)
  • Fuzzy Systems (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses an identification analysis method and device based on a block chain of a federation, a storage medium and a server, and belongs to the technical field of computers. The method comprises the following steps: under the condition that a first external node receives an identification analysis request, whether an IPFS hash value corresponding to an identifier in the identification analysis request exists or not is inquired from a local database corresponding to the first external node; if the IPFS hash value is not inquired, sending a first inquiry request to other nodes except the first external node in the alliance block chain based on the identification analysis request; and receiving an IPFS hash value sent by a node responding to the first query request in the alliance block chain, and accessing IPFS service through a first pair of external nodes based on the IPFS hash value to obtain identification analysis information corresponding to the IPFS hash value, so that the safety of the identification analysis process can be effectively improved, and the data obtained through identification analysis is not easy to tamper.

Description

Identifier analysis method and device based on alliance block chain, storage medium and server
Technical Field
The present application relates to the field of computer technologies, and in particular, to an identifier parsing method and apparatus based on a federation blockchain, a storage medium, and a server.
Background
With the development of the industrial internet, the industrial internet identification analysis system is widely applied, and industrial equipment can be controlled, industrial data can be acquired and processed, and industrial intelligence can be realized in the industrial internet through identification. However, with further expansion of industrial production, industrial related data will show explosive growth, the existing industrial internet identification and analysis system is difficult to store a large amount of data, the security of the identification and analysis process is difficult to guarantee, and the data stored in the industrial internet identification and analysis system is easy to be tampered.
Disclosure of Invention
The embodiment of the application provides an identification analysis method, an identification analysis device, a storage medium and a server based on an alliance block chain, and can solve the problem of low safety in the identification analysis process in the related technology. The technical scheme is as follows:
in a first aspect, an embodiment of the present application provides an identifier resolution method based on a federation blockchain, where the federation blockchain includes at least two nodes, and each node runs a distributed file system IPFS service, where the method includes:
under the condition that a first external node receives an identification analysis request, whether an IPFS hash value corresponding to an identifier in the identification analysis request exists is inquired from a local database corresponding to the first external node; the first pair of external nodes are nodes used for providing external access in the block chain of the alliance, and a plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in the local database;
if the IPFS hash value is not inquired, sending a first inquiry request to other nodes except the first external node in the alliance block chain based on the identification analysis request; the first query request is used for requesting to query an IPFS hash value corresponding to an identifier in the identifier resolution request;
receiving the IPFS hash value sent by a node responding to the first query request in the alliance blockchain, and accessing the IPFS service through the first pair of external nodes based on the IPFS hash value to obtain identification analysis information corresponding to the IPFS hash value.
Optionally, the identifier resolution request refers to a resolution request generated by an identifier uploaded by a terminal by a user, and the identifier is used for uniquely identifying the entity.
Optionally, any external node in the federation block chain includes a partial distributed hash table, where the partial distributed hash table is a part of a global distributed hash table, the global distributed hash table is distributed in external nodes of at least two different federation block chains, and the global distributed hash table includes at least identifiers corresponding to IP addresses of the first and second external pairs of nodes and the IP address;
the IP address of the first external node pair is inquired by the second external node pair on the basis of the identifier carried by the identifier resolution request and is sent to the terminal; and the second external node is used for receiving the identifier analysis request sent by the terminal.
Optionally, after receiving the IPFS hash value sent by the node in the federation blockchain responding to the first query request and accessing the IPFS service through the first pair of external nodes based on the IPFS hash value to obtain the identifier resolution information corresponding to the IPFS hash value in the IPFS service, the method further includes:
and sending the identification analysis information to the terminal.
Optionally, after receiving the IPFS hash value sent by a node in the federation blockchain responding to the first query request, the method further includes:
updating a local database corresponding to the first foreign node based on the IPFS hash value.
Optionally, the method further comprises:
if the IPFS hash value is inquired, accessing IPFS service through the first pair of external nodes based on the IPFS hash value to acquire identification analysis information corresponding to the IPFS hash value, and sending the identification analysis information to the terminal.
Optionally, after obtaining the identifier resolution information corresponding to the IPFS hash value, the method further includes:
receiving an identification verification request, and sending a second query request to other nodes except the first pair of external nodes in the alliance block chain based on the identification verification request; wherein the second query request is used for requesting to query a verification hash value corresponding to an identifier in the identification verification request, and the identifier in the identification verification request is the same as the identifier in the identification resolution request;
receiving the verification hash value sent by a node in the federation blockchain that responds to the second query request;
and comparing and analyzing the verification hash value and the IPFS hash value to obtain a verification result, and sending the verification result to the terminal.
Optionally, the verification result is used to characterize whether the identifier resolution information is authentic.
In a second aspect, an embodiment of the present application provides an identifier resolution apparatus based on a federation blockchain, where the federation blockchain includes at least two nodes, and each node runs a distributed file system IPFS service, and the apparatus includes:
the system comprises a query module, a processing module and a processing module, wherein the query module is used for querying whether an IPFS hash value corresponding to an identifier in an identifier analysis request exists in a local database corresponding to a first pair of external nodes under the condition that the first pair of external nodes receive the identifier analysis request; the first pair of external nodes are nodes used for providing external access in the block chain of the alliance, and a plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in the local database;
a first sending module, configured to send a first query request to other nodes in the federation blockchain except the first pair of external nodes based on the identifier resolution request if the IPFS hash value is not queried; the first query request is used for requesting to query an IPFS hash value corresponding to an identifier in the identifier resolution request;
a first receiving module, configured to receive the IPFS hash value sent by a node in the federation blockchain responding to the first query request, and access the IPFS service through the first pair of external nodes based on the IPFS hash value, so as to obtain identifier resolution information corresponding to the IPFS hash value.
Optionally, the identifier resolution request refers to a resolution request generated by an identifier uploaded by a terminal by a user, and the identifier is used for uniquely identifying the entity.
Optionally, any external node in the federation block chain includes a partial distributed hash table, where the partial distributed hash table is a part of a global distributed hash table, the global distributed hash table is distributed in external nodes of at least two different federation block chains, and the global distributed hash table includes at least identifiers corresponding to IP addresses of the first and second external pairs of nodes and the IP address;
the IP address of the first external node pair is inquired by the second external node pair on the basis of the identifier carried by the identifier resolution request and is sent to the terminal; and the second external node is used for receiving the identifier analysis request sent by the terminal.
Optionally, the apparatus further comprises:
and the second sending module is used for sending the identification analysis information to the terminal.
Optionally, the apparatus further comprises:
and the updating module is used for updating the local database corresponding to the first external node based on the IPFS hash value.
Optionally, the apparatus further comprises:
and the first processing module is used for accessing the IPFS service through the first pair of external nodes based on the IPFS hash value if the IPFS hash value is inquired, so as to obtain the identifier resolution information corresponding to the IPFS hash value and send the identifier resolution information to the terminal.
Optionally, the apparatus further comprises:
the second processing module is used for receiving an identification verification request and sending a second query request to other nodes except the first pair of external nodes in the alliance block chain based on the identification verification request; wherein the second query request is used for requesting to query a verification hash value corresponding to an identifier in the identification verification request, and the identifier in the identification verification request is the same as the identifier in the identification resolution request;
a second receiving module for receiving the verification hash value sent by a node in the federation blockchain that responds to the second query request;
and the analysis module is used for comparing and analyzing the verification hash value and the IPFS hash value to obtain a verification result and sending the verification result to the terminal.
Optionally, the verification result is used to characterize whether the identifier resolution information is authentic.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides a server, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
when the scheme of the embodiment of the application is executed, under the condition that a first pair of external nodes receive an identifier resolution request, whether an IPFS hash value corresponding to an identifier in the identifier resolution request exists is inquired from a local database corresponding to the first pair of external nodes, wherein the first pair of external nodes are nodes used for providing external access in a block chain of a federation, and a plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in the local database; if the IPFS hash value is not inquired, sending a first inquiry request to other nodes except the first external node in the alliance block chain based on the identification analysis request, wherein the first inquiry request is used for requesting to inquire the IPFS hash value corresponding to the identifier in the identification analysis request; and receiving an IPFS hash value sent by a node responding to the first query request in the alliance block chain, and accessing IPFS service through a first pair of external nodes based on the IPFS hash value to obtain identification analysis information corresponding to the IPFS hash value, so that the safety of the identification analysis process can be effectively improved, and the data obtained through identification analysis is not easy to tamper.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a diagram of a system architecture provided by an embodiment of the present application;
fig. 2 is a schematic flowchart of an identifier resolution method based on a federation blockchain according to an embodiment of the present application;
fig. 3 is another schematic flowchart of an identifier resolution method based on a federation blockchain according to an embodiment of the present application;
fig. 4 is a global distributed hash table of an identifier resolution method based on a federation blockchain according to an embodiment of the present application;
fig. 5 is an architectural diagram illustrating global external node distribution of an identifier resolution method based on a federation blockchain according to an embodiment of the present application;
FIG. 6 is a schematic diagram of an apparatus according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of an apparatus according to an embodiment of the present disclosure.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Fig. 1 illustrates an exemplary system architecture that may be applied to the federation blockchain-based identity resolution method of the present application.
The application divides a plurality of alliance block chains according to industry categories, wherein each industry category corresponds to one alliance block chain, and each alliance block chain can be managed by a plurality of managers in the corresponding industry together, such as: the method can be divided into three industries of agriculture, science and technology and art according to the industry category, the agriculture, science and technology and art are respectively and correspondingly provided with a alliance block chain, and each alliance block chain is commonly maintained by a manager in the corresponding industry; all nodes on the alliance block chain corresponding to the agricultural industry are commonly maintained by managers in the agricultural industry, all nodes on the alliance block chain corresponding to the scientific industry are commonly maintained by managers in the scientific industry, and all nodes on the alliance block chain corresponding to the art industry are commonly maintained by managers in the art industry.
The block chain of the alliance comprises a plurality of nodes, each node has a certain mutual reliability, each node runs a distributed File System (IPFS) service, identification analysis data of industries corresponding to the block chain of the alliance can be stored in the IPFS, and the IPFS can generate corresponding IPFS hash values according to the identification analysis data; and then recording the identifier corresponding to the identification analysis data and the IPFS hash value corresponding to the identifier analysis data into the alliance block chain in a form of forming a key value pair, namely, storing the identifier as a key and the IPFS hash value as a value into the alliance block chain, and recording the key value and the IPFS hash value into the alliance block chain, which is equivalent to writing the record on each node of the alliance block chain. By using the IPFS service, the data redundancy in the block chain of the alliance can be reduced, the storage burden of the nodes of the block chain is reduced, and the utilization rate of the storage space can be improved.
As shown in fig. 1, the industry may be divided into an industry a alliance blockchain 101, an industry B alliance blockchain 102, and an industry C alliance blockchain 103 according to industry categories, where each node in the industry a alliance blockchain 101 is commonly managed by a plurality of administrators within industry a, each node in the industry B alliance blockchain 102 is commonly managed by a plurality of administrators within industry B, and each node in the industry C alliance blockchain 103 is commonly managed by a plurality of administrators within industry C. The industry a alliance blockchain 103 is taken as an example to illustrate the alliance blockchain, a plurality of nodes are arranged in the industry a alliance blockchain 103, the plurality of nodes comprise a node 1, a node 2, a node 3, nodes 4 and … …, and a node n (such as a node 1011, a node 1014 and a node 1015), the n nodes are mutually added with each other, and a region-centered system is formed through P2P dynamic networking. A plurality of managers in the industry a alliance blockchain 103 can select at least one external node (e.g., external node 1012 and external node 1013) from a plurality of nodes of the industry a alliance blockchain 103 by voting according to needs, the external node can provide an external access interface (providing functions such as query and interaction) for the industry a alliance blockchain, and the external node can also realize mutual access with other alliance blockchains outside the industry a alliance blockchain. Similarly, the industry B alliance blockchain 102 and the industry C alliance blockchain 103 each have at least one external node.
Meanwhile, at least one external node corresponding to each of the industry a alliance block chain 101, the industry B alliance block chain 102, and the industry C alliance block chain 103 forms a global Distributed Hash Table (DHT) together, where the global Distributed Hash Table includes at least one external node in different industry alliance block chains, each external node stores Internet Protocol addresses (IP addresses) of part of other external nodes, that is, any external node in each industry alliance block chain includes a partial Distributed Hash Table, the partial Distributed Hash Table is a part of the global DHT, the global DHT is Distributed among the external nodes of at least two different industry alliance block chains, and the global DHT includes at least one IP Address of the at least one external node and an identifier corresponding to each IP Address.
It should be noted that, the identifier resolution method based on the federation blockchain provided in the embodiment of the present application is generally executed by an external node (server) in the federation blockchain, and accordingly, the identifier resolution device based on the federation blockchain is generally disposed in the external node (server) in the federation blockchain.
It should be understood that the number of federating blockchains, nodes in federating blockchains, and external nodes in fig. 1 are merely illustrative. Any number of federation blockchains, and any number of nodes and foreign nodes, may be used, as desired.
The identifier resolution method based on federation blockchains according to the embodiment of the present application will be described in detail below with reference to fig. 2 to 5.
Referring to fig. 2, a schematic flow chart of an identifier resolution method based on a federation blockchain is provided in an embodiment of the present application. As shown in fig. 2, the method of the embodiment of the present application may include the steps of:
s201, under the condition that the first external node pair receives the identification analysis request, whether an IPFS hash value corresponding to the identifier in the identification analysis request exists is inquired from a local database corresponding to the first external node pair.
Wherein the first pair of external nodes refers to nodes (servers) in the federation blockchain for providing external access. The identification resolution request refers to a resolution request generated by a user through an identifier uploaded by the terminal, and the identifier is used for uniquely identifying the entity. A plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in a local database of the external node. The IPFS hash value refers to a storage address that the IPFS generates uniquely corresponding to the uploaded content data according to the content data. The local database refers to a warehouse for organizing, managing and storing data according to a data structure in the first pair of external nodes, and the local database of the first pair of external nodes can store data stored by other nodes in the alliance block chain where the first pair of external nodes are located.
Generally, an administrator in the industry corresponding to the federation blockchain selects at least one node from a plurality of nodes of the federation blockchain as an external node by voting, a correspondence between an identifier stored in the federation blockchain and an IPFS hash value (stored in the nodes of the blockchain in the form of a key-value pair), and after determining the external node in the federation blockchain, the correspondence between the identifier stored in the federation blockchain and the IPFS hash value can be all copied to a local database of the external node of the federation blockchain. The user can access the World Wide WEB (WEB) service provided by the first pair of external nodes through the terminal, and inputs the identifier of the user needing to obtain the analysis data at the WEB service, and the identifier can generate a corresponding identification analysis request, so that the first pair of external nodes can receive the identification analysis request sent by the terminal. The first pair of external nodes may query from their corresponding local databases, based on the identity resolution request, whether an IPFS hash value corresponding to the identifier in the identity resolution request exists.
In a feasible implementation manner, if the first external node pair can query the local database of the first external node pair for the IPFS hash value corresponding to the identifier in the identifier resolution request, the query result (the IPFS hash value corresponding to the identifier in the identifier resolution request) is directly returned to the terminal, the user can view the query result on the display interface of the terminal, and then the user inputs the IPFS hash value on the WEB service of the first external node pair through the terminal, so that the first external node pair can access the IPFS service running on the first external node pair based on the IPFS hash value, and further obtain the identifier resolution information corresponding to the IPFS hash value from the IPFS service, that is, the identifier resolution information corresponding to the identifier in the identifier resolution request.
When the first pair of external nodes inquires the IPFS hash value corresponding to the identifier in the identifier resolution request from the local database of the first pair of external nodes, the first pair of external nodes can directly access the IPFS service on the first pair of external nodes through the WEB service of the first pair of external nodes so as to acquire the identifier resolution information corresponding to the IPFS hash value.
In another possible implementation manner, if the first pair of external nodes cannot query the IPFS hash value corresponding to the identifier in the identifier resolution request in the local database of the first pair of external nodes, the first pair of external nodes may initiate a query request to the federation blockchain in which the first pair of external nodes are located, so as to obtain the IPFS hash value corresponding to the identifier in the identifier resolution request.
S202, if the IPFS hash value is not inquired, a first inquiry request is sent to other nodes except the first external node in the alliance block chain based on the identification analysis request.
The first query request is used for requesting to query an IPFS hash value corresponding to the identifier in the identifier resolution request.
Generally, when a first pair of external nodes fails to query an IPFS hash value corresponding to an identifier in an identifier resolution request in a local database of the first pair of external nodes, the first pair of external nodes may send a first query request to other nodes except the first pair of external nodes in a federation blockchain in which the first pair of external nodes are located, and the other nodes in the federation blockchain may query whether the IPFS hash value corresponding to the identifier in the identifier resolution request exists in respective corresponding databases according to the first query request. If the other nodes in the federation blockchain can query the IPFS hash value, the node can respond to the first query request, acquire the IPFS hash value from the database corresponding to the node, and send the IPFS hash value to the first external node. And if other nodes in the federation blockchain cannot inquire the IPFS hash value, sending a query result of failure in query to the first pair of external nodes.
S203, receiving the IPFS hash value sent by the node responding to the first query request in the alliance block chain, and accessing the IPFS service through the first pair of external nodes based on the IPFS hash value to obtain the identification analysis information corresponding to the IPFS hash value.
The IPFS service refers to a distributed file storage service, the IPFS is a point-to-point distributed version file system, all devices (nodes) with the same file system are connected together, and the content stored in the IPFS and corresponding to the hash value is obtained by receiving the hash value sent by a user. The IPFS may generate a storage address (IPFS hash value) uniquely corresponding to the content data from the uploaded content data. In the federation blockchain, each node on the federation blockchain runs an IPFS service, and content data corresponding to the IPFS hash value can be acquired from the IPFS in a mode that each node on the federation blockchain sends the IPFS hash value to be queried to the IPFS. The identification resolution information refers to detailed content data of an entity corresponding to the identifier, such as: the identifier uniquely identifying a car may uniquely correspond to an identification resolution information, which may include a series of detailed information related to the car, such as a production date, a production material, a production address, a production specification, a manufacturer, and a manufacturer of the car.
Generally, after a first pair of external nodes receives an IPFS hash value sent by a node in a federation blockchain, the first pair of external nodes can directly access the IPFS service on the first pair of external nodes through the WEB service of the first pair of external nodes, and upload the IPFS hash value to the IPFS. The IPFS can inquire identification analysis information corresponding to the IPFS hash value based on the IPFS hash value uploaded by the first pair of external nodes, and the identification analysis information is returned to the first pair of external nodes, and the first pair of external nodes forward the identification analysis information to a terminal used by a user, so that the user can check the identification analysis information corresponding to an identifier input by the user on a display unit of the terminal.
For example, the following steps are carried out: the auto industry corresponds to a car alliance block chain, each node of the car alliance block chain runs an IPFS service, and after a car A is produced, an identifier A corresponding to the car A is generated. Meanwhile, a manager of the automobile alliance block chain uploads a series of detailed information related to the automobile, such as the production date, the production material, the production address, the production specification, the manufacturer and the production staff corresponding to the identifier a and the automobile a, to the IPFS through any one node on the alliance block chain, that is, identifier analysis information corresponding to the identifier and the automobile a is uploaded to the IPFS through any one node on the alliance block chain. Meanwhile, the IPFS generates an IPFS hash value corresponding to the identifier resolution information according to the identifier and the identifier resolution information corresponding to the automobile a, processes the identifier a and the IPFS hash value to form a key value pair (the identifier a is used as a key in the key value pair, and the IPFS hash value is used as a value in the key value pair), and records the key value pair on the automobile alliance block chain.
When a user needs to perform identification analysis on the identifier A, the first pair of external nodes can be accessed through the terminal, the identifier A input on a WEB service interface provided by the first pair of external nodes can generate a corresponding identification analysis request by the identifier A, and then the first pair of external nodes can receive the identification analysis request sent by the terminal. The first pair of external nodes may query from their corresponding local databases, based on the identity resolution request, whether an IPFS hash value corresponding to identifier a in the identity resolution request exists.
If the first pair of external nodes can inquire the IPFS hash value corresponding to the identifier A in the identifier resolution request in the local database of the first pair of external nodes, directly accessing the IPFS service on the first pair of external nodes through the WEB service of the first pair of external nodes so as to acquire the identifier resolution information corresponding to the IPFS hash value. After the first external node acquires the identification analysis information, the identification analysis information is sent to the terminal, so that a user can check a series of detailed information related to the automobile, such as a production date, a production material, a production address, a production specification, a manufacturer, a production staff and the like corresponding to the automobile A through the terminal.
If the first pair of external nodes cannot inquire the IPFS hash value corresponding to the identifier A in the identifier resolution request in the local database of the first pair of external nodes, the first pair of external nodes can initiate an inquiry request to the automobile alliance block chain where the first pair of external nodes are located so as to obtain the IPFS hash value corresponding to the identifier A in the identifier resolution request. After querying the IPFS hash value corresponding to the identifier a, other nodes in the automobile alliance block chain send the IPFS hash value to the first pair of external nodes. And the first external node pair can access the IPFS service based on the IPFS hash value to acquire the identification resolution information corresponding to the IPFS hash value. After the first external node acquires the identification analysis information, the identification analysis information is sent to the terminal, so that a user can check a series of detailed information related to the automobile, such as a production date, a production material, a production address, a production specification, a manufacturer, a production staff and the like corresponding to the automobile A through the terminal.
When the scheme of the embodiment of the application is executed, under the condition that a first pair of external nodes receive an identifier resolution request, whether an IPFS hash value corresponding to an identifier in the identifier resolution request exists is inquired from a local database corresponding to the first pair of external nodes, wherein the first pair of external nodes are nodes used for providing external access in a block chain of a federation, and a plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in the local database; if the IPFS hash value is not inquired, sending a first inquiry request to other nodes except the first external node in the alliance block chain based on the identification analysis request, wherein the first inquiry request is used for requesting to inquire the IPFS hash value corresponding to the identifier in the identification analysis request; and receiving an IPFS hash value sent by a node responding to the first query request in the alliance block chain, and accessing IPFS service through the first pair of external nodes based on the IPFS hash value to obtain identification analysis information corresponding to the IPFS hash value. The method and the device have the advantages that the characteristics of the block chain, the IPFS service and the global DHT are simultaneously utilized, so that the method and the device can support the analysis of identifiers of various different types, have extremely strong compatibility, effectively improve the safety of the identification analysis process, and ensure that the data obtained through the identification analysis is not easy to be tampered.
Referring to fig. 3, a schematic flow chart of an identifier resolution method based on a federation blockchain is provided in an embodiment of the present application. The embodiment is exemplified by applying the identifier parsing method based on the federation blockchain to the server. The identifier resolution method based on the alliance block chain can comprise the following steps:
it should be noted that: in the application, a plurality of alliance blockchains are divided into industry categories, each industry category corresponds to one alliance blockchain, and each alliance blockchain can be jointly managed by a plurality of managers in the corresponding industry. And the manager in the industry corresponding to each alliance blockchain can select at least one node from the plurality of nodes of the corresponding alliance blockchain as an external node in a voting mode. The corresponding relation between the identifier in the industry and the IPFS hash value (stored in the nodes of the alliance blockchains in the form of key value pairs) is stored in each alliance blockchain, and after at least one external node in each alliance blockchain is determined, the corresponding relation between the identifier stored in each alliance blockchain and the IPFS hash value can be completely copied to a local database of the at least one external node corresponding to each alliance blockchain, so that the at least one external node can inquire the IPFS hash value corresponding to the identifier sent by the terminal.
Meanwhile, at least one external node corresponding to each federation block chain forms a global distributed hash table DHT together, and the global distributed hash table includes at least one external node in each federation block chain, that is, the global DHT may include multiple external nodes in each different industry federation block chain, or may include multiple external nodes in one industry federation block chain. Each external node stores part of the IP addresses of other external nodes, that is, any external node in each block chain of the federation includes part of the distributed hash table. The partial distributed hash table is a part of a global DHT, the global DHT is distributed in external nodes of at least two different alliance block chains, and the global DHT at least comprises an IP address of at least one external node and identifiers corresponding to the IP addresses. After any external node acquires an unknown identifier sent by the terminal, if the external node cannot inquire information corresponding to the unknown identifier, the external node can inquire the IP address of the external node corresponding to the unknown identifier through the global DHT and return the IP address to the terminal, so that a user can determine the external node capable of inquiring the unknown identifier based on the IP address.
For example, the following steps are carried out: referring to the global distributed hash table in fig. 4, the global distributed hash table may include an external node 40, an external node 41, an external node 42, an external node 43, an external node 44, and an external node 45, as well as an IP address corresponding to each external node and an identifier that can perform identification resolution. Each external node stores the IP addresses of other external nodes in the partial global distributed hash table and identifiers corresponding to the IP addresses, please refer to the relationship between the identifiers stored in the external nodes and the IP addresses of the external nodes corresponding to the identifiers shown in table 1. If the external node accessed by the user through the terminal for the first time is the external node 40, and the identifier that the user needs to query is 0110, after the external node 40 receives the identifier 0110, it can be known by querying locally stored data of the external node that the external node 40 is not the external node capable of performing identification analysis on the identifier 0110, and the external node 40 can only perform identification analysis on the identifier 0011. The external node 40 may send the identifier 0110 to the external node 42 with the IP address 192.168.139.5 according to the locally stored data, and after receiving the identifier 0110, the external node 42 queries the locally stored data to know that the external node 42 is not an external node that can perform the identification resolution on the identifier 0110, and the external node 42 may perform the identification resolution only on the identifier 0101, but the external node 42 queries that the IP address of the external node corresponding to the identifier 0110 is 192.168.139.6, that is, the external node corresponding to the identifier 0110 is the external node 43. At this time, the external node 42 may return the queried result (the external node corresponding to the identifier 0110 is the external node 43) to the external node 40, and then the external node 40 returns the IP address corresponding to the identifier 0110 to the terminal, so that the user may learn, through the terminal, that the identifier 0110 needs to pass through the external node 43 to perform the identification resolution, and then the user may switch the current external node 40 to the external node 43 to perform the identification resolution on the identifier 0110.
TABLE 1
Figure BDA0003047498500000121
Figure BDA0003047498500000131
For example, the following steps are carried out: please refer to the architecture diagram of global external node distribution in fig. 5, which includes federation blockchains for three different industries: industry a alliance blockchain 50, industry B alliance blockchain 51, and industry C alliance blockchain 52. There is an external node a in the industry a alliance blockchain 50, an external node B in the industry B alliance blockchain 51, and an external node C in the industry C alliance blockchain 52. If a user needs to query the identifier 0110 and the first time the external node a is accessed through the terminal, the external node a can know by directly querying a locally stored part of the distributed hash table, and the IP address of the external node corresponding to the identifier 0110 is the IP address of the external node B in the industry B alliance block chain 51, so the external node a returns the IP address of the external node B to the terminal, and after knowing through the terminal that the identifier 0110 needs to be queried at the external node B of the industry B alliance block chain 51, the user can switch the current external node a to the external node B and execute an identifier resolution process on the external node B of the industry B alliance block chain 51.
S301, when the first external node receives the identifier resolution request, whether an IPFS hash value corresponding to the identifier in the identifier resolution request exists is inquired from a local database corresponding to the first external node.
The first pair of external nodes are external nodes capable of performing identification resolution on the identifier in the identification resolution request. If the external node (the second external node pair, at this time, the second external node pair receives the identifier resolution request sent by the terminal) accessed by the user for the first time is not the external node corresponding to the identifier that the user needs to perform the identifier resolution, the external node (the second external node pair) can obtain the IP address (the IP address of the first external node pair) of the external node corresponding to the identifier by querying DHT based on the identifier carried by the identifier resolution request, and return the IP address (the IP address of the first external node pair) to the terminal, so that the user can switch the current external node pair to the external node (the first external node pair) corresponding to the IP address through the terminal, and perform the identifier resolution based on the switched external node (the first external node pair).
Specifically, please refer to step S201, which is not described herein again.
S302, if the IPFS hash value is inquired, accessing the IPFS service through the first pair of external nodes based on the IPFS hash value to obtain the identification analysis information corresponding to the IPFS hash value, and sending the identification analysis information to the terminal.
The IPFS service refers to a distributed file storage service, the IPFS is a point-to-point distributed version file system, all devices with the same file system are connected together, and the content stored in the IPFS and corresponding to the hash value is obtained by receiving the hash value sent by a user. The IPFS may generate a storage address (IPFS hash value) uniquely corresponding to the content data from the uploaded content data.
Generally, in a federation blockchain, each node on the federation blockchain runs an IPFS service, and content data corresponding to an IPFS hash value can be obtained from the IPFS in a manner that each node on the federation blockchain sends the IPFS hash value to be queried to the IPFS.
In a possible implementation manner, the first pair of external nodes directly access the IPFS service on the first pair of external nodes through the WEB service of the first pair of external nodes according to the IPFS hash value queried in the corresponding local database of the first pair of external nodes, and upload the IPFS hash value to the IPFS. The IPFS can inquire identification analysis information corresponding to the IPFS hash value based on the IPFS hash value uploaded by the first pair of external nodes, and the identification analysis information is returned to the first pair of external nodes, and the first pair of external nodes forward the identification analysis information to a terminal used by a user, so that the user can check the identification analysis information corresponding to an identifier input by the user on a display unit of the terminal.
In another feasible implementation manner, the first pair of external nodes sends the IPFS hash value queried in the local database corresponding to the first pair of external nodes to the terminal, the user at the terminal inputs the IPFS hash value into the WEB service of the first pair of external nodes through the terminal as needed, the first pair of external nodes can access the IPFS service running on the first pair of external nodes based on the IPFS hash value obtained at the WEB service, and further obtain the identifier resolution information corresponding to the IPFS hash value from the IPFS service and return the identifier resolution information to the first pair of external nodes, and the first pair of external nodes forwards the identifier resolution information to the terminal used by the user, so that the user can view the identifier resolution information corresponding to the identifier input by the user through a display unit of the terminal.
And S303, if the IPFS hash value is not inquired, sending a first inquiry request to other nodes except the first external node in the alliance block chain based on the identification analysis request.
Specifically, refer to step S202, which is not described herein.
S304, receiving the IPFS hash value sent by the node responding to the first query request in the alliance block chain, and accessing the IPFS service through the first pair of external nodes based on the IPFS hash value to obtain the identification analysis information corresponding to the IPFS hash value.
Specifically, refer to step S203, which is not described herein.
S305, updating a local database corresponding to the first external node based on the IPFS hash value, and sending identification analysis information to the terminal.
Generally, a plurality of nodes are provided in a federation blockchain, and a manager of the federation blockchain can select at least one external node from the plurality of nodes in a voting manner according to actual needs, and backup data stored in other nodes of the federation blockchain to a local database of the at least one external node. That is, the local database corresponding to the first pair of external nodes stores data stored by other nodes in the federation blockchain where the first pair of external nodes are located, that is, the data stored in the local database corresponding to the first pair of external nodes may be the same as the data stored in other nodes in the federation blockchain. In general, querying data from the first pair of external nodes may be equivalent to querying data from the federation blockchain, but there may be update hysteresis in the data stored in the local database of the first pair of external nodes, as other nodes in the federation blockchain may update the data at any time. When a new identifier and a key value pair of the corresponding IPFS hash value are stored in other nodes of the federation blockchain, and the key value pair information cannot be backed up in the local database of the first pair of external nodes, a query request is initiated at the first pair of external nodes like other nodes in the federation blockchain, and the IPFS hash values sent by other nodes in the federation blockchain are obtained, the first pair of external nodes can update information stored in the local database based on the identifier queried at this time and the IPFS hash value queried by the federation blockchain, and the identifier can be conveniently and rapidly identified and analyzed subsequently. Meanwhile, the first external node sends the identifier analysis information inquired by other nodes of the alliance block chain to the terminal, so that a user can visually check the identifier analysis information corresponding to the identifier inquired by the user through a display unit of the terminal, the identifier analysis process is realized, and the safety of the identifier analysis process is greatly ensured.
S306, receiving the identification verification request, and sending a second query request to other nodes except the first external node in the block chain of the alliance based on the identification verification request.
The identifier verification request refers to a verification request generated by inputting an identifier to be verified through a terminal by a user, and the identifier in the identifier verification request is the same as the identifier in the identifier analysis request. The second query request is used for requesting to query a verification hash value corresponding to the identifier in the identification verification request, and the verification hash value is the IPFS hash value queried from other nodes except the first pair of external nodes in the federation blockchain.
Generally, a user can access a WEB service provided by a first pair of external nodes through a terminal, and input an identifier which the user needs to obtain authentication at the WEB service, and the identifier can generate a corresponding identification authentication request, so that the first pair of external nodes can receive the identification authentication request sent by the terminal. At this time, the first pair of external nodes may generate a second query request based on the identification verification request and transmit the second query request to other nodes in the federation blockchain except for the first pair of external nodes. After receiving the second query request, other nodes in the federation blockchain query whether an IPFS hash value corresponding to the identifier in the second query request exists in respective corresponding databases, and if the IPFS hash value is queried by a node in the federation blockchain, the node responds to the second query request and sends the IPFS hash value to the first pair of external nodes, namely sends a verification hash value to the first pair of external nodes.
S307, receiving the verification hash value sent by the node in the federation blockchain responding to the second query request.
The verification hash value refers to an IPFS hash value obtained by querying according to an identifier needing to be verified in the identification verification process, and the verification hash value is obtained by directly querying from the block chain of the federation. The IPFS hash value obtained by querying in the identifier parsing process may be obtained by directly querying from a local database of the first pair of external nodes, or may be obtained by querying from a federation blockchain.
And S308, comparing and analyzing the verification hash value and the IPFS hash value to obtain a verification result, and sending the verification result to the terminal.
The verification result is used for representing whether the identification analysis information obtained in the identification analysis process is real or not.
Generally, after the user obtains the identifier resolution information corresponding to the identifier through the identifier resolution process, the user may not know whether the obtained identifier resolution information is true, so that the user may initiate an authentication request to the first peer node. The first external node sends a second query request to the federation blockchain based on the identifier which is sent by the terminal and needs to be verified by the user, and at this time, the IPFS hash value (verification hash value) corresponding to the identifier which needs to be verified by the user can be obtained by directly querying other nodes in the federation blockchain. Because the data stored in the federation blockchain is not easy to tamper and high in security, the verification hash value directly obtained by querying from the federation blockchain can be considered as a real IPFS hash value which is not tampered. And the IPFS hash value stored in the local database of the first pair of external nodes is easy to fail, lose, and be tampered, so that the IPFS hash value obtained by the first pair of external nodes by querying from the local database may be an erroneous IPFS hash value, and further, the identifier resolution information obtained by the first pair of external nodes by querying from the IPFS based on the erroneous IPFS hash value is not the identifier resolution information corresponding to the identifier that the user needs to resolve.
When a user needs to verify whether obtained identification analysis information is identification analysis information corresponding to an identifier queried by the user, the user can access a WEB service provided by a first pair of external nodes through a terminal and input the identifier which the user needs to obtain verification at the WEB service, the first pair of external nodes send a query request for querying an IPFS hash value corresponding to the identifier to an alliance block chain where the first pair of external nodes are located based on the identifier, and then the IPFS hash value (verification hash value) corresponding to the identifier can be directly queried from a database of the alliance block chain. And comparing and analyzing the obtained verification hash value with the IPFS hash value obtained in the identification analysis process by taking the verification hash value as a verification standard: if the IPFS hash value obtained in the identifier analysis process is the same as the verification hash value, the IPFS hash value inquired in the identifier analysis process is not tampered or lost, and the verification result is that the identifier analysis information is real; if the IPFS hash value obtained in the identifier parsing process is different from the verification hash value, it indicates that the IPFS hash value queried in the identifier parsing process may be tampered or lost, and the verification result indicates that the identifier parsing information is not authentic. Therefore, the verification of the identification analysis process can be quickly realized, a user can conveniently know whether the obtained identification analysis information is effective or real, identification tracing and identification verification are carried out through the identifier, and the user experience is greatly improved.
For example, the following steps are carried out: the user obtains the IPFS hash value corresponding to the identifier a of the automobile a through the query of the identifier resolution process, which is 123 (the IPFS hash value is obtained through query in the local database corresponding to the first external node), and further obtains the identifier resolution information a corresponding to the IPFS hash value through query based on the IPFS hash value. And if the user wants to verify the obtained identification analysis information A, the user accesses the WEB service provided by the first external node pair through the terminal and inputs the identifier A at the WEB service. The first pair of external nodes sends a query request for querying the IPFS hash value corresponding to the identifier A to the federation blockchain where the first pair of external nodes are located based on the identifier A, and then the IPFS hash value corresponding to the identifier A can be directly queried from the database of the federation blockchain to be 223, that is, the verification hash value corresponding to the identifier A is directly queried from the federation blockchain to be 223. Comparing and analyzing the IPFS hash value 123 obtained in the identifier analysis process with the verification hash value by taking the verification hash value 223 as a standard, and knowing that the IPFS hash value obtained in the identifier analysis process is incorrect, that is, the IPFS hash value corresponding to the identifier A stored in the local database corresponding to the first external node is tampered, so that the identifier analysis information A obtained in the identifier analysis process is not real.
When the scheme of the embodiment of the application is executed, in the case that a first external node receives an identifier resolution request, whether an IPFS hash value corresponding to an identifier in the identifier resolution request exists is inquired from a local database corresponding to the first external node, if the IPFS hash value is inquired, the IPFS service is accessed through the first external node based on the IPFS hash value to acquire identifier resolution information corresponding to the IPFS hash value, and the identifier resolution information is sent to a terminal, if the IPFS hash value is not inquired, a first inquiry request is sent to other nodes except the first external node in a federation blockchain based on the identifier resolution request, the IPFS hash value sent by a node responding to the first inquiry request in the federation blockchain is received, the IPFS service is accessed through the first external node based on the IPFS hash value to acquire the identifier resolution information corresponding to the IPFS hash value, and the local database corresponding to the first external node is updated based on the IPFS hash value, and sending the identification analysis information to the terminal, receiving the identification verification request, sending a second query request to other nodes except the first pair of external nodes in the alliance block chain based on the identification verification request, receiving a verification hash value sent by the node responding to the second query request in the alliance block chain, comparing and analyzing the verification hash value and the IPFS hash value to obtain a verification result, and sending the verification result to the terminal. Because this application has utilized block chain, IPFS service and global DHT's characteristic simultaneously, so can support the identifier of resolving various different grade types, the compatibility is extremely strong to effectively improve the security of identification analysis process, guarantee that the data that obtains through identification analysis is difficult to be falsified, also can verify the data that obtains through identification analysis simultaneously, whether suffer the falsifying in order to confirm the data that obtain, promote user and use experience.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Please refer to fig. 6, which shows a schematic structural diagram of an identity resolution apparatus based on a federation blockchain according to an exemplary embodiment of the present application. Hereinafter referred to as the apparatus 6, the apparatus 6 may be implemented as all or a part of the terminal by software, hardware or a combination of both. The apparatus 6 comprises a query module 601, a first sending module 602 and a first receiving module 603.
A query module 601, configured to query, when a first external node receives an identifier resolution request, whether an IPFS hash value corresponding to an identifier in the identifier resolution request exists in a local database corresponding to the first external node; the first pair of external nodes are nodes used for providing external access in the block chain of the alliance, and a plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in the local database;
a first sending module 602, configured to send a first query request to other nodes in the federation blockchain except the first peer node based on the identifier resolution request if the IPFS hash value is not queried; the first query request is used for requesting to query an IPFS hash value corresponding to an identifier in the identifier resolution request;
a first receiving module 603, configured to receive the IPFS hash value sent by a node in the federation blockchain responding to the first query request, and access the IPFS service through the first pair of external nodes based on the IPFS hash value, so as to obtain identifier resolution information corresponding to the IPFS hash value.
Optionally, the identifier resolution request refers to a resolution request generated by an identifier uploaded by a terminal by a user, and the identifier is used for uniquely identifying the entity.
Optionally, any external node in the federation block chain includes a partial distributed hash table, where the partial distributed hash table is a part of a global distributed hash table, the global distributed hash table is distributed in external nodes of at least two different federation block chains, and the global distributed hash table includes at least identifiers corresponding to IP addresses of the first and second external pairs of nodes and the IP address;
the IP address of the first external node pair is inquired by the second external node pair on the basis of the identifier carried by the identifier resolution request and is sent to the terminal; and the second external node is used for receiving the identifier analysis request sent by the terminal.
Optionally, the apparatus 6 further comprises:
and the second sending module is used for sending the identification analysis information to the terminal.
Optionally, the apparatus 6 further comprises:
and the updating module is used for updating the local database corresponding to the first external node based on the IPFS hash value.
Optionally, the apparatus 6 further comprises:
and the first processing module is used for accessing the IPFS service through the first pair of external nodes based on the IPFS hash value if the IPFS hash value is inquired, so as to obtain the identifier resolution information corresponding to the IPFS hash value and send the identifier resolution information to the terminal.
Optionally, the apparatus 6 further comprises:
the second processing module is used for receiving an identification verification request and sending a second query request to other nodes except the first pair of external nodes in the alliance block chain based on the identification verification request; wherein the second query request is used for requesting to query a verification hash value corresponding to an identifier in the identification verification request, and the identifier in the identification verification request is the same as the identifier in the identification resolution request;
a second receiving module for receiving the verification hash value sent by a node in the federation blockchain that responds to the second query request;
and the analysis module is used for comparing and analyzing the verification hash value and the IPFS hash value to obtain a verification result and sending the verification result to the terminal.
Optionally, the verification result is used to characterize whether the identifier resolution information is authentic.
It should be noted that, when the apparatus 6 provided in the foregoing embodiment executes the identifier resolution method based on the federation blockchain, the foregoing division of the functional modules is merely used as an example, and in practical applications, the foregoing function distribution may be completed by different functional modules as needed, that is, the internal structure of the device may be divided into different functional modules, so as to complete all or part of the functions described above. In addition, the embodiments of the identifier resolution method based on the federation block chains provided in the above embodiments belong to the same concept, and details of implementation processes thereof are referred to as method embodiments, and are not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and executing the method steps in the embodiments shown in fig. 2 to fig. 3, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 2 to fig. 3, which is not described herein again.
The present application further provides a computer program product, which stores at least one instruction that is loaded and executed by the processor to implement the federation blockchain-based identity resolution method according to the above embodiments.
Fig. 7 is a schematic structural diagram of an identifier resolution apparatus based on a federation block chain according to an embodiment of the present application, which is hereinafter referred to as an apparatus 7 for short, where the apparatus 7 may be integrated in the foregoing server or terminal device, as shown in fig. 7, the apparatus includes: memory 702, processor 701, input device 703, output device 704, and a communication interface.
The memory 702 may be a separate physical unit, and may be connected to the processor 701, the input device 703, and the output device 704 through a bus. The memory 702, processor 701, input device 703, and output device 704 may also be integrated, implemented in hardware, etc.
The memory 702 is used for storing a program for implementing the above method embodiment, or various modules of the apparatus embodiment, and the processor 701 calls the program to perform the operations of the above method embodiment.
Input devices 702 include, but are not limited to, a keyboard, a mouse, a touch panel, a camera, and a microphone; the output device includes, but is not limited to, a display screen.
Communication interfaces are used to send and receive various types of messages and include, but are not limited to, wireless interfaces or wired interfaces.
Alternatively, when part or all of the federation blockchain-based identity resolution method of the above embodiment is implemented by software, an apparatus may also include only a processor. The memory for storing the program is located outside the device and the processor is connected to the memory by means of circuits/wires for reading and executing the program stored in the memory.
The processor may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
The memory may include volatile memory (volatile memory), such as random-access memory (RAM); the memory may also include a non-volatile memory (non-volatile memory), such as a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD); the memory may also comprise a combination of memories of the kind described above.
Wherein, the processor 701 calls the program code in the memory 702 for executing the following steps:
under the condition that a first external node receives an identification analysis request, whether an IPFS hash value corresponding to an identifier in the identification analysis request exists is inquired from a local database corresponding to the first external node; the first pair of external nodes are nodes used for providing external access in the block chain of the alliance, and a plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in the local database;
if the IPFS hash value is not inquired, sending a first inquiry request to other nodes except the first external node in the alliance block chain based on the identification analysis request; the first query request is used for requesting to query an IPFS hash value corresponding to an identifier in the identifier resolution request;
receiving the IPFS hash value sent by a node responding to the first query request in the alliance blockchain, and accessing the IPFS service through the first pair of external nodes based on the IPFS hash value to obtain identification analysis information corresponding to the IPFS hash value.
In one or more embodiments, the identification resolution request refers to a resolution request generated by a user through an identifier uploaded by a terminal, and the identifier is used for uniquely identifying an entity.
In one or more embodiments, any one external node in the federation blockchains includes a partial distributed hash table, where the partial distributed hash table is a part of a global distributed hash table, the global distributed hash table is distributed among external nodes of at least two different federation blockchains, and the global distributed hash table includes at least identifiers corresponding to IP addresses of the first and second external pairs of nodes and the IP address;
the IP address of the first external node pair is inquired by the second external node pair on the basis of the identifier carried by the identifier resolution request and is sent to the terminal; and the second external node is used for receiving the identifier analysis request sent by the terminal.
In one or more embodiments, processor 701 is further configured to:
and sending the identification analysis information to the terminal.
In one or more embodiments, processor 701 is further configured to:
updating a local database corresponding to the first foreign node based on the IPFS hash value.
In one or more embodiments, processor 701 is further configured to:
if the IPFS hash value is inquired, accessing IPFS service through the first pair of external nodes based on the IPFS hash value to acquire identification analysis information corresponding to the IPFS hash value, and sending the identification analysis information to the terminal.
In one or more embodiments, processor 701 is further configured to:
receiving an identification verification request, and sending a second query request to other nodes except the first pair of external nodes in the alliance block chain based on the identification verification request; wherein the second query request is used for requesting to query a verification hash value corresponding to an identifier in the identification verification request, and the identifier in the identification verification request is the same as the identifier in the identification resolution request;
receiving the verification hash value sent by a node in the federation blockchain that responds to the second query request;
and comparing and analyzing the verification hash value and the IPFS hash value to obtain a verification result, and sending the verification result to the terminal.
In one or more embodiments, the verification result is used to characterize whether the identification resolution information is authentic.
The embodiment of the present application further provides a computer storage medium, which stores a computer program, where the computer program is used to execute the identifier parsing method based on the federation blockchain provided in the foregoing embodiment.
Embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the method for identifier resolution based on a federation blockchain provided in the foregoing embodiments.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.

Claims (10)

1. An identifier resolution method based on a federation blockchain, wherein the federation blockchain includes at least two nodes, each node having a distributed file system IPFS service running thereon, the method comprising:
under the condition that a first external node receives an identification analysis request, whether an IPFS hash value corresponding to an identifier in the identification analysis request exists is inquired from a local database corresponding to the first external node; the first pair of external nodes are nodes used for providing external access in the block chain of the alliance, and a plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in the local database;
if the IPFS hash value is not inquired, sending a first inquiry request to other nodes except the first external node in the alliance block chain based on the identification analysis request; the first query request is used for requesting to query an IPFS hash value corresponding to an identifier in the identifier resolution request;
receiving the IPFS hash value sent by a node responding to the first query request in the alliance blockchain, and accessing the IPFS service through the first pair of external nodes based on the IPFS hash value to obtain identification analysis information corresponding to the IPFS hash value.
2. The method of claim 1, wherein the identification resolution request refers to a resolution request generated by a user through an identifier uploaded by a terminal, and the identifier is used for uniquely identifying an entity.
3. The method of claim 2, wherein any one of the external nodes in the federation blockchain includes a partial DHT, the partial DHT is part of a global DHT, the global DHT is distributed among the external nodes in at least two different federation blockchains, and the global DHT includes at least identifiers corresponding to the IP addresses of the first and second external pairs of nodes and the IP addresses;
the IP address of the first external node pair is inquired by the second external node pair on the basis of the identifier carried by the identifier resolution request and is sent to the terminal; and the second external node is used for receiving the identifier analysis request sent by the terminal.
4. The method according to claim 1, wherein after receiving the IPFS hash value sent by a node in the federation blockchain responding to the first query request and accessing the IPFS service through the first pair of external nodes based on the IPFS hash value to obtain identity resolution information corresponding to the IPFS hash value in the IPFS service, the method further comprises:
and sending the identification analysis information to the terminal.
5. The method of claim 1, wherein after receiving the IPFS hash value sent by a node in the federation blockchain that responds to the first query request, further comprising:
updating a local database corresponding to the first foreign node based on the IPFS hash value.
6. The method of claim 1, further comprising:
if the IPFS hash value is inquired, accessing IPFS service through the first pair of external nodes based on the IPFS hash value to acquire identification analysis information corresponding to the IPFS hash value, and sending the identification analysis information to the terminal.
7. The method according to any one of claims 1 to 6, wherein after obtaining the identifier resolution information corresponding to the IPFS hash value, the method further comprises:
receiving an identification verification request, and sending a second query request to other nodes except the first pair of external nodes in the alliance block chain based on the identification verification request; wherein the second query request is used for requesting to query a verification hash value corresponding to an identifier in the identification verification request, and the identifier in the identification verification request is the same as the identifier in the identification resolution request;
receiving the verification hash value sent by a node in the federation blockchain that responds to the second query request;
and comparing and analyzing the verification hash value and the IPFS hash value to obtain a verification result, and sending the verification result to the terminal.
8. The method of claim 7, wherein the verification result is used to characterize whether the identity resolution information is authentic.
9. An identity resolution apparatus based on a federation blockchain, the federation blockchain including at least two nodes, each node having a distributed file system IPFS service running thereon, the apparatus comprising:
the system comprises a query module, a processing module and a processing module, wherein the query module is used for querying whether an IPFS hash value corresponding to an identifier in an identifier analysis request exists in a local database corresponding to a first pair of external nodes under the condition that the first pair of external nodes receive the identifier analysis request; the first pair of external nodes are nodes used for providing external access in the block chain of the alliance, and a plurality of identifiers and IPFS hash values corresponding to the identifiers are stored in the local database;
a first sending module, configured to send a first query request to other nodes in the federation blockchain except the first pair of external nodes based on the identifier resolution request if the IPFS hash value is not queried; the first query request is used for requesting to query an IPFS hash value corresponding to an identifier in the identifier resolution request;
a first receiving module, configured to receive the IPFS hash value sent by a node in the federation blockchain responding to the first query request, and access the IPFS service through the first pair of external nodes based on the IPFS hash value, so as to obtain identifier resolution information corresponding to the IPFS hash value.
10. The apparatus of claim 9, wherein the identification resolution request refers to a resolution request generated by a user through an identifier uploaded by a terminal, and wherein the identifier is used for uniquely identifying an entity.
CN202110477150.1A 2021-04-29 2021-04-29 Identifier analysis method and device based on alliance block chain, storage medium and server Pending CN113315811A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110477150.1A CN113315811A (en) 2021-04-29 2021-04-29 Identifier analysis method and device based on alliance block chain, storage medium and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110477150.1A CN113315811A (en) 2021-04-29 2021-04-29 Identifier analysis method and device based on alliance block chain, storage medium and server

Publications (1)

Publication Number Publication Date
CN113315811A true CN113315811A (en) 2021-08-27

Family

ID=77371195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110477150.1A Pending CN113315811A (en) 2021-04-29 2021-04-29 Identifier analysis method and device based on alliance block chain, storage medium and server

Country Status (1)

Country Link
CN (1) CN113315811A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113723962A (en) * 2021-11-04 2021-11-30 中国信息通信研究院 Block chain authority management method and block chain system
CN113938498A (en) * 2021-09-18 2022-01-14 北京航空航天大学 Block chain mode combining identification analysis index cloud and hierarchical peer-to-peer network
CN115277852A (en) * 2022-07-21 2022-11-01 网络通信与安全紫金山实验室 Block chain-based industrial internet identification credibility verification method, device, equipment and medium
CN116192697A (en) * 2023-04-17 2023-05-30 中国信息通信研究院 Method, device, equipment and medium for monitoring outbound traffic of data analysis system
CN115277852B (en) * 2022-07-21 2024-05-28 网络通信与安全紫金山实验室 Block chain-based industrial Internet identification credibility verification method, device, equipment and medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113938498A (en) * 2021-09-18 2022-01-14 北京航空航天大学 Block chain mode combining identification analysis index cloud and hierarchical peer-to-peer network
CN113723962A (en) * 2021-11-04 2021-11-30 中国信息通信研究院 Block chain authority management method and block chain system
CN115277852A (en) * 2022-07-21 2022-11-01 网络通信与安全紫金山实验室 Block chain-based industrial internet identification credibility verification method, device, equipment and medium
CN115277852B (en) * 2022-07-21 2024-05-28 网络通信与安全紫金山实验室 Block chain-based industrial Internet identification credibility verification method, device, equipment and medium
CN116192697A (en) * 2023-04-17 2023-05-30 中国信息通信研究院 Method, device, equipment and medium for monitoring outbound traffic of data analysis system
CN116192697B (en) * 2023-04-17 2023-07-07 中国信息通信研究院 Method, device, equipment and medium for monitoring outbound traffic of data analysis system

Similar Documents

Publication Publication Date Title
CN113315811A (en) Identifier analysis method and device based on alliance block chain, storage medium and server
JP6435398B2 (en) Method and system for facilitating terminal identifiers
US20150334110A1 (en) Multi-tenant discovery and claiming of distributed storage nodes over an insecure network
CN110071978B (en) Cluster management method and device
CN111475376B (en) Method, apparatus, computer device and storage medium for processing test data
CN112100279B (en) Data sharing system based on block chain
CN108154024B (en) Data retrieval method and device and electronic equipment
CN110597852A (en) Data processing method, device, terminal and storage medium
CN111367923A (en) Data processing method, data processing device, node equipment and storage medium
CN111339551A (en) Data verification method and related device and equipment
CN113672692A (en) Data processing method, data processing device, computer equipment and storage medium
CN113486060A (en) Data access processing method and device, storage medium and electronic equipment
CN112560111B (en) Time sequence data acquisition tamper-proofing method and device suitable for Internet of things
CN111274004A (en) Process instance management method and device and computer storage medium
CN112306041A (en) Vehicle configuration information writing method and device and electronic equipment
CN111339193A (en) Category coding method and device
CN115374109B (en) Data access method, device, computing equipment and system
CN116578746A (en) Object de-duplication method and device
CN115658794A (en) Data query method and device, computer equipment and storage medium
CN110493326B (en) Zookeeper-based cluster configuration file management system and method
CN113961600A (en) Data query method and device, computer equipment and storage medium
CN113392067A (en) Data processing method, device and system for distributed database
CN112035471A (en) Transaction processing method and computer equipment
CN111563083A (en) Report data query method, device and system
CN112637293B (en) Data recovery system, method, device, electronic equipment and storage medium

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