CN116264511A - Data sharing method and related device based on block chain network - Google Patents

Data sharing method and related device based on block chain network Download PDF

Info

Publication number
CN116264511A
CN116264511A CN202111522862.7A CN202111522862A CN116264511A CN 116264511 A CN116264511 A CN 116264511A CN 202111522862 A CN202111522862 A CN 202111522862A CN 116264511 A CN116264511 A CN 116264511A
Authority
CN
China
Prior art keywords
data
common
node
target
shared data
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
CN202111522862.7A
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202111522862.7A priority Critical patent/CN116264511A/en
Publication of CN116264511A publication Critical patent/CN116264511A/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/2291User-Defined Types; Storage management thereof
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/10Network architectures or network communication protocols for network security for controlling access to devices or network resources
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/123Applying verification of the received information received data contents, e.g. message integrity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/12Applying verification of the received information
    • H04L63/126Applying verification of the received information the source of the received data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application discloses a data sharing method and a related device based on a blockchain network, which relate to the technical field of blockchains, wherein the blockchain network comprises a public chain and at least one alliance chain, each alliance chain comprises a common node of a common main body and a common node of a specific main body, the public chain comprises the common node, the method is applied to an information node of the common main body, and the method comprises the following steps: receiving shared data and address mapping data corresponding to the shared data and a shared data identifier; storing the shared data identification and the address mapping data in association to the information node; invoking the common node in the common chain to perform abstract writing processing so that the common node generates an abstract of address mapping data and shared data, and storing the abstract into a common node of a common main body in a alliance chain where the common main body is located. The method and the device can effectively ensure the authenticity and the integrity of the shared data, and promote the expandability of the data sharing system.

Description

Data sharing method and related device based on block chain network
Technical Field
The present disclosure relates to the field of blockchain technologies, and in particular, to a blockchain network-based data sharing method and related devices.
Background
The data sharing requirement widely exists in various subjects (such as enterprises or institutions, etc.), currently, the data sharing mode of various subjects is generally to construct a unified sharing platform for sharing on the basis of an internal information system of each subject or share the data based on a traditional blockchain network, the data integrity and the authenticity are difficult to guarantee in the unified sharing platform mode, and the system expandability is poor due to the fact that the data volume is overlarge in the traditional blockchain network mode. Therefore, the data authenticity and integrity are difficult to ensure when the data are shared, and the expandability of the data sharing system is poor.
Disclosure of Invention
The embodiment of the application provides a data sharing method and a related device based on a block chain network, which can effectively ensure the authenticity and the integrity of shared data and promote the expandability of a data sharing system.
In order to solve the technical problems, the embodiment of the application provides the following technical scheme:
according to one embodiment of the present application, a data sharing method based on a blockchain network, the network including a common chain and at least one coalition chain, each coalition chain including a common node of a common principal and a common node of a specific principal, the common chain including the common node, the method being applied to an information node of the common principal, the method comprising: receiving shared data and address mapping data corresponding to the shared data and a shared data identifier; storing the shared data identification and address mapping data in association with the information node; invoking a common node in the common chain to perform abstract writing processing so that the common node generates an abstract of the address mapping data and the shared data, and storing the abstract into a common node of a common main body in a alliance chain where the common main body is located.
According to one embodiment of the present application, a data sharing device based on a blockchain network, the network including a common chain and at least one coalition chain, each coalition chain including a common node of a common principal and a common node of a specific principal, the common chain including the common node, the device being applied to an information node of the common principal, the device comprising: the receiving unit is used for receiving the shared data, address mapping data corresponding to the shared data and a shared data identifier; a storage unit, configured to store the shared data identifier and address mapping data in association with the information node; and the calling unit is used for calling the common node in the common chain to carry out abstract writing processing so that the common node generates the abstract of the address mapping data and the shared data and stores the abstract into the common node of the common main body in the alliance chain where the common main body is located.
In some embodiments of the present application, the shared data, shared data identification, and address mapping data are contained in a target message, the target message being signed by a private key of the target generic body; the apparatus further comprises a verification unit for: inquiring verification information from a common node of the target common main body, wherein the verification information comprises a main body sub-identifier and a public key corresponding to the target common main body; signing the target message according to the public key to obtain a signing verification result; and if the signature verification result indicates that the private key is paired with the public key, verifying the main sub-identifier to obtain a verification result.
In some embodiments of the present application, the authentication information further includes authorization rights information, and the authentication unit is further configured to: and determining the data registration authority of the target common main body according to the authorization authority information, wherein the data registration authority is used for indicating whether the target common main body has the authority of registering data in the blockchain network.
In some embodiments of the present application, the information nodes of the common principals in each coalition chain are connected to form a local area network, and the target information node in the information nodes in each local area network is connected to form a global network; the receiving unit is used for: and receiving a target message distributed by the global network, wherein the target message carries the shared data, the shared data identifier and the address mapping data, and the target message is sent to the global network by a target client.
In some embodiments of the present application, the consensus node further generates a data transaction record corresponding to the summary, and stores the data transaction record in a blockchain ledger; and the public chain also comprises a supervision node, and the supervision node supervises and stores the blockchain ledger.
In some embodiments of the present application, the apparatus further comprises a parsing unit configured to: receiving a target shared data identifier which is sent by a query client and used for querying data; inquiring address mapping data corresponding to the target shared data identifier to obtain target address mapping data; obtaining shared data corresponding to the target shared data identifier from a storage library of the target address mapping data pointing to the common main body to obtain query shared data; and sending the query sharing data to the query client.
In some embodiments of the present application, the parsing unit is further configured to: obtaining a summary corresponding to the target shared data identifier from the common nodes of the common main body to obtain a target summary; verifying the target address mapping data and the query sharing data according to the target abstract to obtain a verification result; and sending the verification result to the query client.
In some embodiments of the present application, the information nodes of the common principals in each coalition chain are connected to form a local area network, and the target information node in the information nodes in each local area network is connected to form a global network; the parsing unit may be configured to: and receiving the target shared data identification for inquiring data, which is sent in the local area network or the global network.
According to another embodiment of the present application, a computer-readable storage medium has stored thereon a computer program, which when executed by a processor of a computer, causes the computer to perform the method described in the embodiments of the present application.
According to another embodiment of the present application, an electronic device includes: a memory storing a computer program; and the processor reads the computer program stored in the memory to execute the method according to the embodiment of the application.
According to another embodiment of the present application, a computer program product or computer program includes computer instructions stored in a computer readable storage medium. The computer instructions are read from the computer-readable storage medium by a processor of a computer device, and executed by the processor, cause the computer device to perform the methods provided in the various alternative implementations described in the embodiments of the present application.
In an embodiment of the present application, a data sharing method based on a blockchain network is provided, the network includes a public chain and at least one coalition chain, each coalition chain includes a common node of a common subject and a common node of a specific subject, the public chain includes the common node, the method is applied to an information node of the common subject, and the method includes: receiving shared data and address mapping data corresponding to the shared data and a shared data identifier; storing the shared data identification and address mapping data in association with the information node; invoking a common node in the common chain to perform abstract writing processing so that the common node generates an abstract of the address mapping data and the shared data, and storing the abstract into a common node of a common main body in a alliance chain where the common main body is located.
In this way, the public chains and at least one alliance chain form a mixed blockchain network, information nodes of common main bodies in each alliance chain maintain address mapping data, the common nodes in the public chains calculate summaries of the address mapping data and shared data and write the summaries into corresponding common nodes for distributed storage, the common nodes perform calculation processing, the common nodes in each alliance chain maintain a small amount of summaries in a distributed mode, the occupied space is small, the data query performance is high, the whole network system is lightweight and high in performance, the expandability is effectively improved, the integrity recovery and the credibility verification of the data can be effectively guaranteed based on the summaries on the chains, the authenticity and the integrity of the shared data are effectively guaranteed, and the expandability of the data sharing system is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 illustrates a flow chart of a blockchain network-based data sharing method according to an embodiment of the present application.
Fig. 2 shows a schematic diagram of a system to which embodiments of the present application may be applied.
Fig. 3 shows another schematic diagram of a system based on the embodiment of fig. 2.
Fig. 4 illustrates another flow chart of a blockchain network-based data sharing method in accordance with an embodiment of the present application.
Fig. 5 shows a flow chart of a data registration process according to one embodiment of the present application.
FIG. 6 shows a flow chart of a data parsing process according to one embodiment of the present application.
FIG. 7 shows a flow chart of a data parsing process according to one embodiment of the present application.
Fig. 8 shows a flow chart of an identity authentication process according to one embodiment of the present application.
FIG. 9 illustrates a block diagram of a blockchain network-based data sharing device in accordance with an embodiment of the present application.
Fig. 10 shows a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
In the following description, specific embodiments of the present application will be described with reference to steps and symbols performed by one or more computers, unless otherwise indicated. Thus, these steps and operations will be referred to in several instances as being performed by a computer, which as referred to herein performs operations that include processing units by the computer that represent electronic signals that represent data in a structured form. This operation transforms the data or maintains it in place in the memory system of the computer, which may be reconfigured or otherwise altered in ways well known to those skilled in the art. The data structure maintained by the data is the physical location of the memory, which has specific characteristics defined by the data format. However, the principles of the present application are described in the foregoing text and are not meant to be limiting, and one skilled in the art will recognize that various steps and operations described below may also be implemented in hardware.
Fig. 1 schematically illustrates a flow chart of a blockchain network-based data sharing method according to an embodiment of the present application. The execution body of the data sharing method based on the blockchain network can be any information node, and the information node can be equipment (such as a server or a terminal) or a functional module established in the equipment through a container and other technologies.
As shown in fig. 1, the blockchain network-based data sharing method may include steps S110 to S130. The block chain network comprises a public chain and at least one alliance chain, wherein each alliance chain comprises common nodes of common subjects and common nodes of specific subjects, each public chain comprises common nodes, and the method is applied to information nodes of the common subjects.
Step S110, receiving shared data, address mapping data corresponding to the shared data and a shared data identifier; step S120, the shared data identification and the address mapping data are stored in an information node in a correlated manner; and step S130, invoking the common node in the common chain to perform abstract writing processing so that the common node generates an abstract of the address mapping data and the shared data, and storing the abstract into a common node of a common main body in a alliance chain where the common main body is located.
Each of the federation chains includes common nodes of a common principal and common nodes of a specific principal, and in one example each of the federation chains includes at least 2 common nodes and 1 common node. The common chain includes all consensus nodes in the coalition chain, for example, 5 coalition chains in total, and 1 consensus node in each coalition chain, and then the common chain includes 5 consensus nodes.
Both the common subject and the specific subject are data sharing subjects (such as enterprises or institutions, etc.), and both the common node and the common node are blockchain nodes. The data sharing main body in each coalition chain can be obtained by dividing according to industries, regions and the like, for example, the data sharing main body in the coalition chain HBN1 is a main body in the same region of the same industry. The particular principal in each federated chain may be at least one representative principal that all data sharing principals in the federated chain promote, e.g., the particular principal is an industry representative principal.
A particular principal may correspond to its own blockchain node (i.e., consensus node), e.g., a principal node (e.g., a server or terminal device) of the particular principal may act as a blockchain node (i.e., consensus node). Each generic principal may correspond to its own blockchain node (i.e., generic node), inode (non-blockchain node), and repository.
The shared data identifier is an identifier corresponding to shared data, and the shared data identifier can correspond to a common main body at the same time, for example, the shared data identifier can be composed of a main body sub-identifier of the common main body and a data sub-identifier of the shared data. Shared data is data that is shared, such as product details, e.g., production ingredients, suppliers, whether or not they are out of date, etc. Address mapping data, i.e. data that maps storage addresses, may indicate the storage addresses of shared data, such as the addresses of a storage library, e.g. a server or a database.
The information node of the common main body can receive a target message for registering data, and the target message can comprise shared data, address mapping data corresponding to the shared data and a shared data identifier. For example, when address mapping data or shared data in data maintained by a certain entity changes, a target message may be sent to an information node, and the information node may receive the target message.
The information node of the common body may be responsible for storing the shared data identifier and the address mapping data in association locally, for example, when there is historical address mapping data corresponding to the shared data identifier locally, replacing the historical address mapping data with the received address mapping data, or when there is no historical address mapping data corresponding to the shared data identifier locally, storing the received address mapping data in association with the shared data identifier.
The information node of the common main body can call the common node in the common chain to carry out abstract writing processing so that the common node generates the abstracts of the address mapping data and the shared data, and the common node stores the generated abstracts to the common node of the common main body in the alliance chain where the common main body is located, and the abstracts can be stored in association with the corresponding shared data identifiers.
In this way, the public chains and at least one alliance chain form a mixed blockchain network, information nodes of common main bodies in each alliance chain maintain address mapping data, the common nodes in the public chains calculate summaries of the address mapping data and shared data and write the summaries into corresponding common nodes for distributed storage, the common nodes perform calculation processing, the common nodes in each alliance chain maintain a small amount of summaries in a distributed mode, the occupied space is small, the data query performance is high, the whole network system is lightweight and high in performance, the expandability is effectively improved, the integrity recovery and the credibility verification of the data can be effectively guaranteed based on the summaries on the chains, the authenticity and the integrity of the shared data are effectively guaranteed, and the expandability of the data sharing system is improved.
The specific procedure of each step performed when data sharing is performed based on the blockchain network is described below.
In step S110, the shared data and address mapping data and shared data identifier corresponding to the shared data are received.
In one embodiment, the information nodes of the common main body in each alliance chain are connected to form a local area network, and the target information nodes in the information nodes in each local area network are connected to form a global network; step S110, receiving the shared data and the address mapping data and the shared data identifier corresponding to the shared data, including: and receiving a target message distributed by the global network, wherein the target message carries shared data, shared data identification and address mapping data, and the target message is sent to the global network by a target client.
Referring to fig. 2, the information nodes of the common principals in each federation chain may be connected to form a local area network 203, for example, the information nodes corresponding to the common enterprises in the federation chain HBN1 may be connected to form a local area network DHT1, and the information nodes corresponding to the common enterprises in the federation chain HBN2 may be connected to form a local area network DHT2. At least one information node in each local area network 203 can be selected as a target information node to participate in a global network (unified centralized management and control platform) 204, and the target information node can perform message forwarding across local area networks based on the global network.
The target client of the registration data may send the target message to the global network (unified centralized management and control platform) 204, and the global network (unified centralized management and control platform) 204 may send the target message to the corresponding information node directly or through each local area network, for example, the global network (unified centralized management and control platform) 204 may send the target message to the information node of the common body corresponding to the shared data identifier.
In one embodiment, the target client may directly send the target message to an information node, and the information node may further forward the target message through a local area network and a global network. The information node receiving the target message may be directly an information node sharing the common body corresponding to the data identifier.
In step S120, the shared data identity is stored in association with the address mapping data to the information node.
The information node of the common body may be responsible for storing the shared data identifier and the address mapping data in association locally, for example, when there is historical address mapping data corresponding to the shared data identifier locally, replacing the historical address mapping data with the received address mapping data, or when there is no historical address mapping data corresponding to the shared data identifier locally, storing the received address mapping data in association with the shared data identifier.
Each data sharing principal may be assigned a corresponding unique principal sub-identity in the system, e.g., assigning each enterprise a specific prefix identity as a principal sub-identity; each shared data can be allocated with a corresponding unique data sub-identifier, for example, each product can customize a unique suffix identifier as the data sub-identifier; combining the body sub-identifier with the data sub-identifier may form a shared data identifier, and the corresponding data sharing body (e.g., a common body) may be matched according to the shared data identifier, and in some ways, the corresponding shared data may be matched.
In one embodiment, the shared data identifier, and the address mapping data are included in a target message, the target message being signed by a private key of a target generic body; in step S120, before associating and storing the shared data identifier with the address mapping data in the storage library of the common main body corresponding to the shared data identifier, the method further includes: inquiring verification information from a common node of a target common main body, wherein the verification information comprises a main body sub-identifier and a public key corresponding to the target common main body; signing the target message according to the public key to obtain a signing verification result; if the signature verification result indicates that the private key is matched with the public key, the main body sub-identifier is verified, and a verification result is obtained.
Referring to fig. 3, information such as a sub-identifier (e.g., a specific identifier prefix) of a main body, a public key, etc. corresponding to the main body in the blockchain network may be stored in a common node (blockchain node) of each common main body. After the authentication of the common node of the common main body is successful, the blockchain network can generate a public-private key pair (including a public key and a private key) corresponding to the common main body through a key generation function of the blockchain. The information nodes of the common subjects can call the common nodes of other common subjects to acquire the information.
The target message may be a message generated by a target generic principal (e.g., a target enterprise), such as when the target generic principal wants to register data in the message in the system. The target message is signed by the private key of the target common main body, the information node can call the blockchain module (namely the common node of the target common main body in the blockchain network) to inquire the verification information, and the obtained public key is used for decrypting the target message signed by the private key to verify the signature, so that a verification result indicating whether the private key and the public key can be successfully paired is obtained. If the signature verification result indicates that the private key is matched with the public key, the main body sub-identifier is verified, the main body sub-identifier can be generated by a certain rule, and a verification result indicating whether the main body sub-identifier is legal can be obtained through verification whether the main body sub-identifier accords with the generation rule.
In one example, if the verification result indicates that the main sub-identifier is not legal, step S120 and the subsequent steps are not performed, and instead, step S120 and the subsequent steps are performed. In one example, if the signing result indicates that the private key is not paired with the public key, the verification of the main body sub-identifier is not performed, and step S120 and subsequent steps are not performed.
In one embodiment, the authentication information further includes authorization rights information, the method further comprising: and determining the data registration authority of the target common main body according to the authorization authority information, wherein the data registration authority is used for indicating whether the target common main body has the authority of registering data in the blockchain network.
When the common node of the target common subject registers in the chain, the blockchain network can grant the target common subject with authorization authority information which can reflect whether the target common subject has the authority to register data in the blockchain network. After the verification result indicates that the sub-identity of the main body is legal, the data registration authority of the target common main body can be further determined according to the authorization authority information, if the target common main body has the authority of registering data in the blockchain network, the step S120 and the subsequent steps are performed, and otherwise, the step S120 and the subsequent steps are not performed.
In step S130, the common node in the common chain is called to perform the digest writing process, so that the common node generates the digests of the address mapping data and the shared data, and stores the digests into the common node of the common principal in the federation chain where the common principal is located.
The common node maintains a small amount of partial abstract information and does not perform calculation processing. The information node of the common main body can call the common node in the common chain to carry out abstract writing processing, the common node generates the abstracts of the address mapping data and the shared data, and the common node stores the generated abstracts into the common node of the common main body in the alliance chain where the common main body is located, so that the abstracts are stored in a distributed mode in the whole blockchain network.
In one embodiment, the consensus node may calculate the corresponding digests of the address mapping data and the shared data by using a one-way hash function, and store the digests to a common node of a common principal in a federation chain where the common principal is located according to a consistent hash of the shared data identifier.
The common node in the public chain can be used as a round according to the preset block time, and address mapping data and shared data corresponding to the final state of data change in the round are respectively calculated to be abstracted through a one-way hash function in the time period of the round.
Referring to fig. 5, the reception of the first target message by the information node DHT1 in the period of one round includes: shared data identification: ABC, address mapping data: 210.122.1.1:8080 and shared data: the shelf life is within the range; the information node DHT2 receiving the second target message comprises: shared data identification: XYZ, address mapping data: 110.222.2.2:8080 and shared data: a milk product; the information node DHT1 further receives a third target message, including: shared data identification: ABC, address mapping data: 210.122.1.1:8080 and shared data: and (5) expired food.
The Common Nodes (CN) in the public chain respectively generate summaries aiming at address mapping data and shared data in the final states of data change ("ABC-210.122.1.1:8080-expired food" and "XYZ-110.222.2.2:8080-dairy products"), and send the summaries to corresponding common nodes NN1 and NN2 for storage according to consistent hash of shared data identification, wherein the summaries are associated with the corresponding shared data identification for storage.
In one embodiment, the consensus node further generates a data transaction record corresponding to the summary and stores the data transaction record in the blockchain ledger; and the public chain also comprises a supervision node, and the supervision node supervises and stores the blockchain ledger.
The consensus node can perform consensus verification and take turns to take blocks, under the round of taking blocks, the data transaction record under the round can be generated after the abstract writing process is completed and stored in the blockchain account book in the consensus node, and specifically, the consensus node can generate a block aiming at the data transaction record of the abstract writing process and record the block in the blockchain account book in the formula node. Furthermore, the common node does not store the blockchain ledgers, and only the consensus node stores the blockchain ledgers in full quantity, so that the data authenticity can be further ensured, and meanwhile, the whole system is operated in a lightweight mode.
Wherein the lower round block can comprise a plurality of data transaction records, new records corresponding to the same item (such as shared data identifier) can be covered with old records, and data redundancy can be reduced.
Furthermore, the public chain also comprises a supervision node, the supervision node can be a supervision organization or a node of an enterprise with supervision function, and the like, the supervision node and the consensus node supervise each other, and the supervision node can at least supervise and store the blockchain account book, so that the validity and the effectiveness of data up-chain and data change are ensured.
Further, in one embodiment, the common node and the supervision node in the public chain may jointly supervise the principals (including the common principal and the specific principal) in each federation chain, for example, network admission information of the information node in each local area network and various requests received by the information node may be stored in the public chain.
In one embodiment, the method further includes querying shared data corresponding to the shared data identifier or parsing the shared data identifier, specifically, the information node of the common main body may: receiving a target shared data identifier which is sent by a query client and used for querying data; inquiring address mapping data corresponding to the target shared data identifier to obtain target address mapping data; obtaining shared data corresponding to the target shared data identifier from a storage library of which target address mapping data points to a common main body, and obtaining query shared data; and sending the query sharing data to the query client.
The information node of the common main body can query the address mapping data stored in association with the target sharing data identifier from the local database to obtain the target address mapping data, and further obtain the sharing data corresponding to the target sharing data identifier according to the shared data which is pointed to the storage library of the common main body from the target address mapping data to obtain the query sharing data.
In one embodiment, the method further comprises the step of performing trusted authentication on the queried target address mapping data and the queried shared data, specifically: obtaining a abstract corresponding to the target shared data identifier from a common node of a common main body to obtain a target abstract; verifying the target address mapping data and the query sharing data according to the target abstract to obtain a verification result; and sending the verification result to the query client.
The common node, namely the blockchain node, records the abstract of the data registered in the system, and the abstract corresponding to the target shared data identifier, namely the target abstract, can be inquired from the blockchain node of the blockchain network by calling the common node. And verifying whether the target address mapping data and the query shared data obtained from the storage library are tampered or not based on the target abstract to obtain a verification result, wherein the verification result can comprise that the target address mapping data and the query shared data are not tampered or tampered.
Referring to fig. 6, the target address mapping data and the query sharing data are verified according to the target abstract, for example, the target sharing data is identified as ABC, the queried target address mapping data is 210.122.1.1:8080, and the query sharing data is expired food. If the target abstract is 210.122.1.1:8080 (abstract) and the expired video (abstract), the verification result is that the target address mapping data and the query sharing data are not tampered, and the trusted verification is successful.
Further, referring to fig. 7, for example, the target shared data is identified as ABC, the queried target address mapping data is tampered 110.222.2.2:8080, and the queried shared data is within the tampered shelf life range. At this time, the verification result is that the target address mapping data is tampered (i.e., the trusted verification fails), and the query shared data is tampered (i.e., the trusted verification fails).
In one embodiment, the information nodes of the common main body in each alliance chain are connected to form a local area network, and the target information nodes in the information nodes in each local area network are connected to form a global network; receiving a target shared data identifier for querying data, which is sent by a query client, wherein the target shared data identifier comprises: and receiving a target shared data identifier which is sent in the local area network or the global network and used for inquiring data.
The target shared data identifier may be included in the query message, and the information node of each common main body may receive the query message forwarded by other information nodes in the local area network or the global network, and further receive the target shared data identifier for querying data, so as to perform data query across the local area network.
It can be appreciated that each information node may directly receive a query message sent by a query client, and further receive a target shared data identifier for querying data.
The method described in the above embodiments will be described in further detail below with reference to an application scenario example. The meaning of the related terms in this scenario is the same as in the foregoing embodiments, and specific reference may be made to the description in the foregoing embodiments. The data sharing method and the device are used for data sharing in the application scene, wherein the data sharing main body is taken as an enterprise, namely the common main body is taken as a common enterprise, the specific main body is taken as a specific enterprise (such as an exemplary enterprise selected in the industry), and the data sharing method and the device are used for data sharing in the application scene.
Fig. 2 shows a schematic diagram of a system 200 to which embodiments of the present application may be applied. As shown in fig. 2, system 200 may include a blockchain network that may include a public chain 201 and at least one federation chain 202, and an information network that may include a global network 204 and at least one local area network 203.
Each of the federation chains 202 includes common nodes of a common enterprise (common principal) and common nodes of a specific enterprise (specific principal), each of the common chains includes common nodes of all of the federation chains 202, each of the common enterprise and the specific enterprise is a data sharing principal (e.g., enterprise or organization, etc.), and each of the common nodes and the common nodes is a blockchain node. Supervision nodes can also be added into the public chain, and the supervision nodes are also used as blockchain nodes.
The data sharing agents in each federation chain can be obtained by dividing the data sharing agents into industries, regions, etc., for example, the data sharing agents in the federation chain HBN1 are multiple enterprises (such as multiple enterprises of enterprise 1, enterprise 2, enterprise 3, etc.) in the same region of the same industry. The particular principals in each federated chain may be at least one representative enterprise promoted by all data sharing principals (i.e., multiple enterprises) in the federated chain, e.g., the particular enterprise is an enterprise that is industry representative.
A particular enterprise may correspond to its own blockchain node (i.e., a consensus node), e.g., an enterprise node (i.e., a principal node, such as a server or terminal, etc.) of the particular enterprise may act as a blockchain node (i.e., a consensus node). Each common enterprise may have its own blockchain nodes (i.e., common nodes), inodes, and repositories.
In one embodiment of this example, further referring to fig. 3, by using technologies such as network function virtualization and container, an information module, a blockchain module and a repository may be formed in an enterprise node 301 (such as a server or a terminal) of a common enterprise, where the information module is used as an information node 3011, the blockchain module is used as a blockchain node (i.e. a common node) 3012, an internal database is used as a repository 3013, and the enterprise node of the common enterprise may serve two roles of an information node in a local area network and a blockchain node (i.e. a common node) in a federation chain on the basis of being responsible for maintenance and management of its own internal repository (such as a storage server or a database).
The information nodes of the common enterprises in each federation chain may be connected to form a local area network 203, for example, the information nodes corresponding to the common enterprises in the federation chain HBN1 may be connected to form a local area network DHT1, and the information nodes corresponding to the common enterprises in the federation chain HBN2 may be connected to form a local area network DHT2. At least one information node in each local area network 203 may participate in a global network (unified centralized management and control platform) 104, and message forwarding may be performed across local area networks based on the global network. Further, each federation chain corresponds to its own local area network, for example, federation chain HBN1 corresponds to local area network DHT 1.
A mixed block chain network (Hybrid Blockchain Network, HBN) is built by using a secure hash table technology (Distributed Hash Table, DHT, also called a distributed hash table technology), the whole system forms a mixed network, information nodes in a local area network are DHT nodes, and nodes in a alliance chain are block chain nodes (HBN nodes); the method can realize registration and analysis of shared data among different data sharing main bodies based on a hybrid network, and combines the blockchain to authenticate the identity of the accessed data sharing main body and the data acquisition party and the credibility verification of the data.
The server serving as the node may be an independent physical server, may be a server cluster or a distributed system formed by a plurality of physical servers, or may be a cloud server or the like for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDNs, basic cloud computing services such as big data and artificial intelligence platforms. The terminal as a node may be a mobile phone, a computer, or the like. Each of the information nodes may interact with a client to receive a target message (e.g., a message containing a target shared data identifier), and the client may be installed in an interactive terminal, which may include, but is not limited to, a mobile phone, a computer, a smart voice interactive device, a smart home appliance, a vehicle terminal, a VR/AR device, a smart watch, a computer, and the like.
From the whole system architecture, the alliance chain and the local area network are in the same level, the local area network can be responsible for registration and analysis of shared data, the alliance chain can be responsible for access control and data credibility authentication, the public chain and the global network have the same status and are all responsible for processing global information but have different specific functions, the global network can maintain the entrance information of the local area network, forward requests crossing the local area network, and the public chain (also can be called as a supervision chain) can combine the supervision nodes of all supervision authorities and departments to supervise on-chain enterprises, store and prove block-chain account books and the like, so that reliable decentralization data sharing can be realized.
Referring to fig. 4, data registration may be performed in the system, and an information node of a general enterprise may perform steps S410 to S450 at the time of data registration.
Step S410, receiving a target message: receiving shared data, address mapping data and shared data identification corresponding to the shared data, specifically, receiving a target message distributed by a global network, wherein the target message carries the shared data, the shared data identification and the address mapping data, and the target message is sent to the global network by a target client. Wherein the target message is signed by the private key of the target common enterprise.
Step S420, obtaining verification information: and inquiring verification information from the common node of the target common enterprise, wherein the verification information comprises a main body sub-identifier, a public key and authorization authority information corresponding to the target common enterprise.
Referring to fig. 3, information such as a main sub-identifier (e.g., a specific identifier prefix), a public key, etc. corresponding to a common enterprise in the blockchain network may be stored in a common node (blockchain node) of each common enterprise. After the authentication of the in-link (blockchain network) is successful, the blockchain network can generate a public-private key pair (including a public key and a private key) corresponding to the common enterprise through a key generation function of the blockchain.
Step S430, verifying the authority and storing the data.
When the verification right is met, signing verification is carried out on the target message according to the public key, and a signing verification result is obtained; if the signature verification result indicates that the private key is matched with the public key, verifying the main body sub-identifier to obtain a verification result; and determining the data registration authority of the target common main body according to the authorization authority information, wherein the data registration authority is used for indicating whether the target common enterprise has the authority of registering data in the blockchain network. And when the data is stored, the shared data identification and the address mapping data are stored in the information node in a correlated way.
Step S440, a message of successful registration is sent to the target client.
Step S450, abstract writing: and invoking the common node in the common chain to perform abstract writing processing so that the common node generates an abstract of the address mapping data and the shared data, and storing the abstract into a common node of a common main body in a alliance chain where the common main body is located.
The consensus node can calculate the corresponding abstracts of the address mapping data and the shared data through a one-way hash function respectively, and can store the abstracts into the common nodes of the common principals in the alliance chain where the common principals are located according to the consistency hash of the shared data identification.
The common node in the public chain can be used as a round according to the preset block time, and address mapping data and shared data corresponding to the final state of data change in the round are respectively calculated to be abstracted through a one-way hash function in the time period of the round.
Referring to fig. 5, the reception of the first target message by the information node DHT1 in the period of one round includes: shared data identification: ABC, address mapping data: 210.122.1.1:8080, shared data: the shelf life is within the range; the information node DHT2 receiving the second target message comprises: shared data identification: XYZ, address mapping data: 110.222.2.2:8080 and shared data: a milk product; the information node DHT1 further receives a third target message, including: shared data identification: ABC, address mapping data: 210.122.1.1:8080 and shared data: and (5) expired food.
The Common Nodes (CN) in the public chain respectively generate summaries aiming at address mapping data and shared data in the final states of data change ("ABC-210.122.1.1:8080-expired food" and "XYZ-110.222.2.2:8080-dairy products"), and send the summaries to corresponding common nodes NN1 and NN2 for storage according to consistent hash of shared data identification, wherein the summaries are associated with the corresponding shared data identification for storage.
The consensus node also generates a data transaction record corresponding to the abstract and stores the data transaction record in the blockchain ledger; and the public chain also comprises a supervision node, and the supervision node supervises and stores the blockchain ledger.
The consensus node can perform consensus verification and take turns to take blocks, under the round of taking blocks, the data transaction record under the round can be generated after the abstract writing process is completed and stored in the blockchain account book in the consensus node, and specifically, the consensus node can generate a block aiming at the data transaction record of the abstract writing process and record the block in the blockchain account book in the formula node. Furthermore, the common node does not store the blockchain ledgers, and only the consensus node stores the blockchain ledgers in full quantity, so that the data authenticity can be further ensured, and meanwhile, the whole system is operated in a lightweight mode.
Wherein the lower round block can comprise a plurality of data transaction records, new records corresponding to the same item (such as shared data identifier) can be covered with old records, and data redundancy can be reduced.
Furthermore, the public chain also comprises a supervision node, the supervision node can be a supervision organization or a node of an enterprise with supervision function, and the like, the supervision node and the consensus node supervise each other, and the supervision node can at least supervise and store the blockchain account book, so that the validity and the effectiveness of data up-chain and data change are ensured.
Further, in one embodiment, the common node and the supervision node in the public chain may jointly supervise the principals (including the common principal and the specific principal) in each federation chain, for example, network admission information of the information node in each local area network and various requests received by the information node may be stored in the public chain.
With further reference to fig. 4, in the system, data analysis may be performed, and the information node of the common enterprise may perform steps S460 to S4120 during the data analysis.
Step S460, receiving the identification: and receiving a target shared data identifier which is sent by the query client and used for querying the data.
Step S470, query the mapping data: inquiring address mapping data corresponding to the target shared data identifier to obtain target address mapping data;
step S480, inquiring shared data: querying shared data according to the target address mapping data: and obtaining the shared data corresponding to the target shared data identifier from the target address mapping data to a storage library of the common main body to obtain the query shared data.
Step S490, the query sharing data is sent to the query client.
Step S4100, obtaining a summary: and obtaining the abstract corresponding to the target shared data identifier from the common node of the common main body to obtain the target abstract.
Step S4110, data trusted authentication: and verifying the target address mapping data and the query sharing data according to the target abstract to obtain a verification result.
The common node, namely the blockchain node, records the abstract of the data registered in the system, and the abstract corresponding to the target shared data identifier, namely the target abstract, can be inquired from the blockchain node of the blockchain network by calling the common node. And verifying whether the target address mapping data and the query shared data obtained from the storage library are tampered or not based on the target abstract to obtain a verification result, wherein the verification result can comprise that the target address mapping data and the query shared data are not tampered or tampered.
Referring to fig. 6, the target address mapping data and the query sharing data are verified according to the target abstract, for example, the target sharing data is identified as ABC, the queried target address mapping data is 210.122.1.1:8080, and the query sharing data is expired food. If the target digest is 210.122.1.1:8080 (digest) and the expired video (digest), the verification result is that the target address mapping data and the query sharing data are not tampered.
Further, referring to fig. 7, for example, the target shared data is identified as ABC, the queried target address mapping data is tampered 110.222.2.2:8080, and the queried shared data is within the tampered shelf life range. At this time, the verification result is that the target address mapping data is tampered, and the query shared data is tampered.
Step S4120, a message of successful authentication is returned to the querying client.
Further, referring to fig. 8, the enterprise nodes participating in the blockchain network (may specifically be ordinary nodes in the enterprise nodes) need to perform identity compliance authentication in the registration admission link, and need to perform identity compliance authentication on the enterprise nodes participating in data sharing and retrieval. Firstly, three-element identification, enterprise payment identification and the like can be performed on the identity information of the enterprise node, and after the real-name authentication information of the enterprise node is confirmed, the identity authentication is completed, so that the in-chain registration of the enterprise node is realized. After successful authentication, a unique public and private key pair is generated for the enterprise node through a key generation function of the blockchain, and a blockchain identity credential corresponding to the enterprise node is formed based on a mechanism of the blockchain in which multiple parties participate.
Referring to fig. 8, the identity compliance authentication procedure of an enterprise node may include steps 1 to 9, where the querying enterprise is an in-link enterprise node (e.g., an in-link consensus node), and the queried enterprise is an in-link enterprise node.
Step 1, a querying enterprise sends an identity data querying request to a queried enterprise, and specifically, the querying enterprise can propose an application of 'querying and verifying' the valid identity of its market subject to a card-holding user (queried enterprise).
And step 2, if the queried enterprise refuses the identity data query request, the verification fails.
Step 3, if the queried enterprise passes the identity data query request, the queried enterprise can call out the identity certificate with the signature of the certification authority, which is generally referred to as a CA authority.
And 4, the queried enterprise obtains the public key of the queried enterprise through the public information.
And 5, the queried enterprise Hash is uplink, specifically, the acquired 'query enterprise public key' executes encryption action, the identification is called a Hash algorithm to obtain an encrypted ciphertext, and an encrypted ciphertext execution uplink port is uplink to the blockchain network.
And 6, broadcasting the action of the query record by the queried enterprise, specifically broadcasting the query verification action record corresponding to the identity data query request to other enterprise nodes of the whole network in the blockchain network by the queried enterprise.
And 7, inquiring the private key decryption of the enterprise to verify the signature of the certification authority, specifically, inquiring the enterprise to obtain the encrypted ciphertext which is up-linked to the blockchain network, decrypting through the private key decryption template, and verifying the signature of the inquired enterprise and the certification authority.
And 8, acquiring the identity of the enterprise to be queried, namely, the decrypted identity certificate in the encrypted ciphertext, and extracting user information in the identity certificate from the blockchain to perform Hash calculation, so as to perform Hash verification with the record of the enterprise to be queried when the enterprise information is registered.
And 9, inquiring the returned message of successful or failed verification in the block chain network received by the enterprise, and realizing high-credibility identity authentication.
By applying the embodiment of the application, the method and the system can be suitable for data sharing among data sharing main bodies, take data registration and data analysis as the background when the data is shared among enterprises as an example, realize a high-performance and lightweight hybrid blockchain model (HBN, hybrid Blockchain Network), and under the premise of not changing the existing deployment mode of the enterprises, can elect to demonstrate that the enterprises construct a consensus node to store a full quantity of blockchain account book, and can realize backtracking of historical change data backup; the abstract can be stored in a distributed mode in a common node in the alliance chain according to the shared data identification by adopting consistent hash, data can be effectively recovered based on the abstract, and efficient trusted authentication can be provided for analysis results (comprising target address mapping data and target shared data) during data analysis.
Compared with the traditional block chain system, the common node of the mixed block chain model does not need to consume any computing resource, has small storage cost and high throughput, can expand a global network (unified centralized management and control platform) with lower cost, realizes high-efficiency trusted verification of a mass data analysis result, and provides an effective solution for performance guarantee and optimization of a distributed enterprise data sharing identification analysis system.
In a word, by applying the embodiment of the application, the public chains and at least one alliance chain form a mixed blockchain network, the information nodes of the common main body in each alliance chain maintain address mapping data, the common nodes in the public chains calculate summaries of the address mapping data and the shared data and write the summaries into the corresponding common nodes for distributed storage, the common nodes in each alliance chain perform calculation processing, the common nodes in each alliance chain maintain a small amount of summaries in a distributed mode, the occupied space is small, the data query performance is high, the whole network system is lightweight and high in performance, the expandability is effectively improved, the integrity recovery and the credibility verification of the data can be performed based on the summaries on the chains, the data authenticity is effectively ensured, the authenticity and the integrity of the shared data are effectively ensured, and the expandability of the data sharing system is improved.
In order to facilitate better implementation of the data sharing method based on the blockchain network provided by the embodiment of the application, the embodiment of the application also provides a data sharing device based on the blockchain network based on the data sharing method based on the blockchain network. Where the meaning of the terms is the same as in the above-described blockchain network-based data sharing method, reference may be made to the description of the method embodiments for specific implementation details. FIG. 9 illustrates a block diagram of a blockchain network-based data sharing device in accordance with an embodiment of the present application.
As shown in fig. 9, a data sharing apparatus 500 based on a blockchain network may include a receiving unit 510, a storage unit 520, and a calling unit 530, where the blockchain network includes a public chain and at least one federation chain, each of the federation chains includes a common node of a common principal and a common node of a specific principal, the public chain includes the common node, and the apparatus 500 is applied to an information node of the common principal.
The receiving unit 510 may be configured to receive shared data, address mapping data corresponding to the shared data, and a shared data identifier; the storage unit 520 may be configured to store the shared data identity in association with address mapping data to the information node; the calling unit 530 may be configured to call a common node in the common chain to perform digest writing processing, so that the common node generates a digest of the address mapping data and the shared data, and store the digest in a common node of a common principal in a federation chain where the common principal is located.
In some embodiments of the present application, the shared data, shared data identification, and address mapping data are contained in a target message, the target message being signed by a private key of the target generic body; the apparatus further comprises a verification unit for: inquiring verification information from a common node of the target common main body, wherein the verification information comprises a main body sub-identifier and a public key corresponding to the target common main body; signing the target message according to the public key to obtain a signing verification result; and if the signature verification result indicates that the private key is paired with the public key, verifying the main sub-identifier to obtain a verification result.
In some embodiments of the present application, the authentication information further includes authorization rights information, and the authentication unit is further configured to: and determining the data registration authority of the target common main body according to the authorization authority information, wherein the data registration authority is used for indicating whether the target common main body has the authority of registering data in the blockchain network.
In some embodiments of the present application, the information nodes of the common principals in each coalition chain are connected to form a local area network, and the target information node in the information nodes in each local area network is connected to form a global network; the receiving unit is used for: and receiving a target message distributed by the global network, wherein the target message carries the shared data, the shared data identifier and the address mapping data, and the target message is sent to the global network by a target client.
In some embodiments of the present application, the consensus node further generates a data transaction record corresponding to the summary, and stores the data transaction record in a blockchain ledger; and the public chain also comprises a supervision node, and the supervision node supervises and stores the blockchain ledger.
In some embodiments of the present application, the apparatus further comprises a parsing unit configured to: receiving a target shared data identifier which is sent by a query client and used for querying data; inquiring address mapping data corresponding to the target shared data identifier to obtain target address mapping data; obtaining shared data corresponding to the target shared data identifier from a storage library of the target address mapping data pointing to the common main body to obtain query shared data; and sending the query sharing data to the query client.
In some embodiments of the present application, the parsing unit is further configured to: obtaining a summary corresponding to the target shared data identifier from the common nodes of the common main body to obtain a target summary; verifying the target address mapping data and the query sharing data according to the target abstract to obtain a verification result; and sending the verification result to the query client.
In some embodiments of the present application, the information nodes of the common principals in each coalition chain are connected to form a local area network, and the target information node in the information nodes in each local area network is connected to form a global network; the parsing unit may be configured to: and receiving the target shared data identification for inquiring data, which is sent in the local area network or the global network.
It should be noted that although in the above detailed description several modules or units of a device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functions of two or more modules or units described above may be embodied in one module or unit, in accordance with embodiments of the present application. Conversely, the features and functions of one module or unit described above may be further divided into a plurality of modules or units to be embodied.
In addition, the embodiment of the present application further provides an electronic device, which may be a terminal or a server, as shown in fig. 10, which shows a schematic structural diagram of the electronic device according to the embodiment of the present application, specifically:
the electronic device may include one or more processing cores 'processors 601, one or more computer-readable storage media's memory 602, power supply 603, and input unit 604, among other components. It will be appreciated by those skilled in the art that the electronic device structure shown in fig. 10 is not limiting of the electronic device and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The processor 601 is a control center of the electronic device, connects various parts of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the memory 602, and calling data stored in the memory 602, thereby performing overall monitoring of the electronic device. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user pages, applications, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 601.
The memory 602 may be used to store software programs and modules, and the processor 601 may execute various functional applications and data processing by executing the software programs and modules stored in the memory 602. The memory 602 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide access to the memory 602 by the processor 601.
The electronic device further comprises a power supply 603 for supplying power to the various components, preferably the power supply 603 may be logically connected to the processor 601 by a power management system, so that functions of managing charging, discharging, power consumption management and the like are achieved by the power management system. The power supply 603 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The electronic device may further comprise an input unit 604, which input unit 604 may be used for receiving input digital or character information and for generating keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
Although not shown, the electronic device may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 601 in the electronic device loads executable files corresponding to the processes of one or more computer programs into the memory 602 according to the following instructions, and the processor 601 executes the computer programs stored in the memory 602, so as to implement the functions in the foregoing embodiments of the present application.
As processor 601 may perform: receiving shared data and address mapping data corresponding to the shared data and a shared data identifier; storing the shared data identification and address mapping data in association with the information node; invoking a common node in the common chain to perform abstract writing processing so that the common node generates an abstract of the address mapping data and the shared data, and storing the abstract into a common node of a common main body in a alliance chain where the common main body is located.
It will be appreciated by those of ordinary skill in the art that all or part of the steps of the various methods of the above embodiments may be performed by a computer program, or by computer program control related hardware, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, embodiments of the present application also provide a computer readable storage medium having stored therein a computer program that is capable of being loaded by a processor to perform the steps of any of the methods provided by the embodiments of the present application.
Wherein the computer-readable storage medium may comprise: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
Since the computer program stored in the computer readable storage medium may perform the steps of any one of the methods provided in the embodiments of the present application, the beneficial effects that can be achieved by the methods provided in the embodiments of the present application may be achieved, which are detailed in the previous embodiments and are not described herein.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the methods provided in the various alternative implementations of the above-described embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains.
It will be understood that the present application is not limited to the embodiments that have been described above and shown in the drawings, but that various modifications and changes can be made without departing from the scope thereof.

Claims (12)

1. A data sharing method based on a blockchain network, wherein the network comprises a public chain and at least one coalition chain, each coalition chain comprises a common node of a common subject and a common node of a specific subject, the common chain comprises the common node, the method is applied to an information node of the common subject, and the method comprises the following steps:
receiving shared data and address mapping data corresponding to the shared data and a shared data identifier;
storing the shared data identification and address mapping data in association with the information node;
invoking a common node in the common chain to perform abstract writing processing so that the common node generates an abstract of the address mapping data and the shared data, and storing the abstract into a common node of a common main body in a alliance chain where the common main body is located.
2. The method of claim 1, wherein the shared data, shared data identification, and address mapping data are contained in a target message, the target message signed by a private key of the target generic body;
Before the shared data identifier and the address mapping data are stored in a storage library of the common main body corresponding to the shared data identifier in an associated mode, the method further comprises the following steps:
inquiring verification information from a common node of the target common main body, wherein the verification information comprises a main body sub-identifier and a public key corresponding to the target common main body;
signing the target message according to the public key to obtain a signing verification result;
and if the signature verification result indicates that the private key is paired with the public key, verifying the main sub-identifier to obtain a verification result.
3. The method of claim 2, wherein the authentication information further comprises authorization rights information, the method further comprising:
and determining the data registration authority of the target common main body according to the authorization authority information, wherein the data registration authority is used for indicating whether the target common main body has the authority of registering data in the blockchain network.
4. The method of claim 1, wherein the information nodes of the common principals in each of the federation chains are connected to form a local area network, and the target information node of the information nodes in each of the local area networks is connected to form a global network;
The receiving shared data, address mapping data corresponding to the shared data and shared data identification comprises:
and receiving a target message distributed by the global network, wherein the target message carries the shared data, the shared data identifier and the address mapping data, and the target message is sent to the global network by a target client.
5. The method of any one of claims 1 to 4, wherein the consensus node further generates a data transaction record corresponding to the summary and stores the data transaction record in a blockchain ledger; and the public chain also comprises a supervision node, and the supervision node supervises and stores the blockchain ledger.
6. The method according to claim 1, wherein the method further comprises:
receiving a target shared data identifier which is sent by a query client and used for querying data;
inquiring address mapping data corresponding to the target shared data identifier to obtain target address mapping data;
obtaining shared data corresponding to the target shared data identifier from a storage library of the target address mapping data pointing to the common main body to obtain query shared data;
And sending the query sharing data to the query client.
7. The method of claim 6, wherein the method further comprises:
obtaining a summary corresponding to the target shared data identifier from the common nodes of the common main body to obtain a target summary;
verifying the target address mapping data and the query sharing data according to the target abstract to obtain a verification result;
and sending the verification result to the query client.
8. The method of claim 6, wherein the information nodes of the common principals in each of the federation chains are connected to form a local area network, and the target information node of the information nodes in each of the local area networks is connected to form a global network;
the receiving the target shared data identifier for querying the data, which is sent by the querying client, includes:
and receiving the target shared data identification for inquiring data, which is sent in the local area network or the global network.
9. A blockchain network-based data sharing device, wherein the network includes a common chain and at least one coalition chain, each coalition chain includes a common node of a common subject and a common node of a specific subject, the common chain includes the common node, the device is applied to an information node of the common subject, and the device includes:
The receiving unit is used for receiving the shared data, address mapping data corresponding to the shared data and a shared data identifier;
a storage unit, configured to store the shared data identifier and address mapping data in association with the information node;
and the calling unit is used for calling the common node in the common chain to carry out abstract writing processing so that the common node generates the abstract of the address mapping data and the shared data and stores the abstract into the common node of the common main body in the alliance chain where the common main body is located.
10. A computer-readable storage medium, having stored thereon a computer program which, when executed by a processor of a computer, causes the computer to perform the method of any of claims 1 to 8.
11. An electronic device, comprising: a memory storing a computer program; a processor reading a computer program stored in a memory to perform the method of any one of claims 1 to 8.
12. A computer program product, characterized in that the computer program product comprises a computer program which, when executed by a processor, implements the method of any one of claims 1 to 8.
CN202111522862.7A 2021-12-13 2021-12-13 Data sharing method and related device based on block chain network Pending CN116264511A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111522862.7A CN116264511A (en) 2021-12-13 2021-12-13 Data sharing method and related device based on block chain network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111522862.7A CN116264511A (en) 2021-12-13 2021-12-13 Data sharing method and related device based on block chain network

Publications (1)

Publication Number Publication Date
CN116264511A true CN116264511A (en) 2023-06-16

Family

ID=86723312

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111522862.7A Pending CN116264511A (en) 2021-12-13 2021-12-13 Data sharing method and related device based on block chain network

Country Status (1)

Country Link
CN (1) CN116264511A (en)

Similar Documents

Publication Publication Date Title
CN110598394B (en) Authority verification method and device and storage medium
US11461773B2 (en) Blockchain-based node management methods and apparatuses
CN109522735B (en) Data permission verification method and device based on intelligent contract
US20230120854A1 (en) Secure blockchain-based consensus
CN109409122B (en) File storage method, electronic device and storage medium
CN108681965B (en) Block chain network transaction processing method and device for offline node
CN109495592B (en) Data collaboration method and electronic equipment
CN111461723B (en) Data processing system, method and device based on block chain
US20200211003A1 (en) Systems and methods for avoiding or reducing cryptographically stranded resources on a blockchain network
CN112005264A (en) Blockchain implementing cross-chain transactions
CN106127368B (en) Data storage method for enterprise resource management system
CN110602050A (en) Authentication method and device for block chain access, storage medium and electronic device
US20230316273A1 (en) Data processing method and apparatus, computer device, and storage medium
EP3537684B1 (en) Apparatus, method, and program for managing data
US20200374343A1 (en) Optimization of delivery of blocks
CN113328997B (en) Alliance chain crossing system and method
US20200374340A1 (en) Optimization of delivery of blocks
Abraham et al. Qualified eID derivation into a distributed ledger based IdM system
CN112612856A (en) Data processing method and device based on block chain
CN113792318A (en) Data authorization method and device, computer readable storage medium and computer equipment
CN110910110B (en) Data processing method and device and computer storage medium
US20230104103A1 (en) Custodial systems for non-fungible tokens
CN111698198A (en) Secret generation and share distribution
KR102271201B1 (en) Method for maintaining private information on blockchain network and device thereof
CN109828832B (en) Block chain-based data circulation method, device, equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40086877

Country of ref document: HK

SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination