Data sharing method based on blockchain network and related device

By combining public and consortium blockchains in a hybrid blockchain network, and utilizing consensus nodes to generate digests and perform distributed storage, the issues of authenticity and integrity in data sharing are resolved, thereby improving the scalability and performance of the system.

CN116264511BActive Publication Date: 2025-12-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111522862.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-13
Publication Date
2025-12-19
Estimated Expiration
2041-12-13

AI Technical Summary

Technical Problem

In existing technologies, the authenticity and integrity of data are difficult to guarantee under data sharing methods, and the system has poor scalability.

Method used

A hybrid blockchain network is adopted, combining public and consortium blockchains. The consensus nodes generate digests of shared data and address mapping data, which are then distributed and stored in ordinary nodes. Combined with public key signature verification and authorization permission verification, the authenticity and integrity of the data are ensured.

Benefits of technology

It ensures the authenticity and integrity of data, improves the scalability and performance of the data sharing system, and forms a lightweight, high-performance network system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116264511B_ABST
    Figure CN116264511B_ABST
Patent Text Reader

Abstract

The application discloses a data sharing method based on a blockchain network and a related device, relates to the technical field of blockchains, and involves a blockchain network including a public chain and at least one alliance chain, each alliance chain including an ordinary node of an ordinary principal and a consensus node of a specific principal, and the public chain including the consensus node. The method is applied to an information node of the ordinary principal, and the method includes the following steps: receiving shared data, address mapping data corresponding to the shared data and a shared data identifier; storing the shared data identifier and the address mapping data in association with each other in the information node; calling the consensus node in the public chain to perform abstract writing processing, so that the consensus node generates an abstract of the address mapping data and the shared data, and stores the abstract in the ordinary node of the ordinary principal in the alliance chain where the ordinary principal is located. The application can effectively guarantee the authenticity and integrity of the shared data, and improve the scalability of a data sharing system.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of blockchains, in particular to a data sharing method based on a blockchain network and related devices. BACKGROUND

[0002] The demand for data sharing exists widely among various subjects (such as enterprises or institutions, etc.), at present, the data sharing method of various subjects is usually to build a unified sharing platform based on the internal information system of each subject for sharing or to share based on a traditional blockchain network, under the unified sharing platform, the data integrity and authenticity are difficult to guarantee, and under the traditional blockchain network, the system scalability is usually poor due to too large data volume. Therefore, there are problems of difficult guarantee of data authenticity and integrity when sharing data and poor scalability of data sharing system. SUMMARY

[0003] The embodiments of the present application provide a data sharing method based on a blockchain network and related devices, which can effectively guarantee the authenticity and integrity of shared data and improve the scalability of the data sharing system.

[0004] To solve the above technical problems, the embodiments of the present application provide the following technical solutions:

[0005] According to one embodiment of the present application, a data sharing method based on a blockchain network, the network includes a public chain and at least one alliance chain, each of the alliance chains includes an ordinary node of an ordinary subject and a consensus node of a specific subject, the public chain includes the consensus node, the method is applied to an information node of the ordinary subject, and the method includes: receiving shared data, address mapping data corresponding to the shared data and a shared data identifier; storing the shared data identifier and the address mapping data in association to the information node; calling the consensus node in the public chain to perform digest writing processing, so that the consensus node generates a digest of the address mapping data and the shared data, and stores the digest in the ordinary node of the ordinary subject in the alliance chain where the ordinary subject is located.

[0006] According to an embodiment of the present application, a data sharing device based on a blockchain network, the network comprising a public chain and at least one consortium chain, each of the consortium chains comprising a common node of a common principal and a consensus node of a specific principal, the public chain comprising the consensus nodes, the device being applied to an information node of the common principal, the device comprising: a receiving unit configured to receive shared data and address mapping data corresponding to the shared data and a shared data identifier; a storage unit configured to store the shared data identifier and the address mapping data in association to the information node; and a calling unit configured to call the consensus nodes in the public chain to perform a digest writing process, so that the consensus nodes generate a digest of the address mapping data and the shared data, and store the digest in the common node of the common principal in the consortium chain where the common principal is located.

[0007] In some embodiments of the present application, the shared data, the shared data identifier and the address mapping data are contained in a target message, and the target message is signed by a private key of the target common principal; the device further comprises a verification unit configured to: query verification information from the common node of the target common principal, the verification information comprising a principal sub-identifier and a public key corresponding to the target common principal; perform signature verification on the target message according to the public key to obtain a signature verification result; and if the signature verification result indicates that the private key is paired with the public key, verify the principal sub-identifier to obtain a verification result.

[0008] In some embodiments of the present application, the verification information further comprises authorization permission information, and the verification unit is further configured to: determine a data registration permission of the target common principal according to the authorization permission information, the data registration permission being used to indicate whether the target common principal has a permission to register data in the blockchain network.

[0009] In some embodiments of the present application, the information nodes of the common principals in each of the consortium chains are connected to form a local area network, and the target information nodes in the information nodes in each of the local area networks are connected to form a global network; the receiving unit is configured to: receive a target message distributed by the global network, the target message carrying the shared data, the shared data identifier and the address mapping data, the target message being sent to the global network by a target client.

[0010] In some embodiments of the present application, the consensus node further generates a data transaction record corresponding to the digest, and stores the data transaction record in a blockchain ledger; the public chain further comprises a supervision node, and the supervision node supervises the storage of the blockchain ledger.

[0011] In some embodiments of the present application, the apparatus further comprises a resolving unit configured to: receive a target shared data identifier sent by a query client for querying data; query address mapping data corresponding to the target shared data identifier to obtain target address mapping data; obtain shared data corresponding to the target shared data identifier from a storage of a normal principal pointed by the target address mapping data to obtain query shared data; and send the query shared data to the query client.

[0012] In some embodiments of the present application, the resolving unit is further configured to: obtain a target digest corresponding to the target shared data identifier from a normal node of the normal principal to obtain a target digest; verify the target address mapping data and the query shared data according to the target digest to obtain a verification result; and send the verification result to the query client.

[0013] In some embodiments of the present application, the information nodes of the normal principals in each of the alliance chains are connected to form a local area network, and target information nodes in the information nodes in each of the local area networks are connected to form a global network; and the resolving unit can be configured to receive the target shared data identifier sent by the local area network or the global network for querying data.

[0014] According to another embodiment of the present application, a computer readable storage medium has a computer program stored thereon, and when the computer program is executed by a processor of a computer, the computer program causes the computer to perform the method according to the embodiments of the present application.

[0015] According to another embodiment of the present application, an electronic device comprises a memory storing a computer program, and a processor reading the computer program stored in the memory to perform the method according to the embodiments of the present application.

[0016] According to another embodiment of the present application, a computer program product or a computer program comprises computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in various optional implementation manners according to the embodiments of the present application.

[0017] In the embodiments 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 alliance chain. Each of the alliance chains includes a common node of a common principal and a consensus node of a specific principal. The public chain includes the consensus nodes. The method is applied to an information node of the common principal. The method includes: receiving shared data, address mapping data corresponding to the shared data, and a shared data identifier; storing the shared data identifier and the address mapping data in association in the information node; calling the consensus nodes in the public chain to perform summary writing processing, so that the consensus nodes generate a summary of the address mapping data and the shared data, and store the summary in the common node of the common principal in the alliance chain where the common principal is located.

[0018] In this way, the public chain and the at least one alliance chain form a hybrid blockchain network. The information nodes of the common principals in each of the alliance chains maintain the address mapping data. The consensus nodes in the public chain calculate summaries of the address mapping data and the shared data and write the summaries into the corresponding common nodes for distributed storage. The consensus nodes perform calculation processing. The common nodes in each of the alliance chains maintain a small amount of summaries in a distributed manner, which occupies less space and has high data query performance. The entire network system is lightweight and high-performance, the scalability is effectively improved, and based on the summaries on the chain, the data can be completely restored and reliably verified. The data authenticity is effectively guaranteed. Thus, the authenticity and integrity of the shared data are effectively guaranteed, and the scalability of the data sharing system is improved. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0020] Figure 1 A flowchart of a data sharing method based on a blockchain network according to an embodiment of the present application is shown.

[0021] Figure 2 A schematic diagram of a system to which the embodiments of the present application can be applied is shown.

[0022] Figure 3 Another schematic diagram of a system based on Figure 2 an embodiment of the present application is shown.

[0023] Figure 4 Another flowchart of a data sharing method based on a blockchain network according to an embodiment of the present application is shown.

[0024] Figure 5A flowchart of a data registration process according to an embodiment of the present application is shown.

[0025] Figure 6 A flowchart of a data analysis process according to an embodiment of the present application is shown.

[0026] Figure 7 A flowchart of a data analysis process according to an embodiment of the present application is shown.

[0027] Figure 8 A flowchart of an identity authentication process according to an embodiment of the present application is shown.

[0028] Figure 9 A block diagram of a data sharing device based on a blockchain network according to an embodiment of the present application is shown.

[0029] Figure 10 A block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by a person of ordinary skill in the art without creative work fall within the protection scope of the present application.

[0031] In the following description, specific embodiments of the present application will be described with reference to steps and symbolic representations of operations that are performed by one or more computers. Unless specifically stated otherwise, as is apparent from the following discussions, it is appreciated that throughout the specification, discussions utilizing terms such as "processing," "computing," "calculating," "determining," "displaying," and / or "generating" involve the actions and / or processes of a computer system, or similar electronic computing device.

[0032] Figure 1 A flowchart of a data sharing method based on a blockchain network according to an embodiment of the present application is shown schematically. The execution subject of the data sharing method based on a blockchain network can be any information node, which can be a device (such as a server or a terminal, etc.) or a functional module established by a container technology in a device.

[0033] As Figure 1 shown, the data sharing method based on the blockchain network can include steps S110 to S130. The blockchain network includes a public chain and at least one alliance chain, each alliance chain including ordinary nodes of ordinary subjects and consensus nodes of specific subjects, and the public chain including consensus nodes, and the method is applied to an information node of an ordinary subject.

[0034] Step S110, receiving shared data and address mapping data corresponding to the shared data and a shared data identifier; step S120, storing the shared data identifier and the address mapping data in association to the information node; and step S130, calling the consensus nodes in the public chain to perform summary writing processing, so that the consensus nodes generate summaries of the address mapping data and the shared data, and store the summaries in the ordinary nodes of the ordinary subjects in the alliance chain where the ordinary subject is located.

[0035] Each alliance chain includes ordinary nodes of ordinary subjects and consensus nodes of specific subjects, and in one example, each alliance chain includes at least two ordinary nodes and one consensus node. The public chain includes consensus nodes in all alliance chains, for example, there are five alliance chains, and each alliance chain has one consensus node, so the public chain includes five consensus nodes.

[0036] The ordinary subject and the specific subject are both data sharing subjects (such as enterprises or institutions, etc.), and the ordinary node and the consensus node are both blockchain nodes. The data sharing subjects in each alliance chain can be divided according to industry and region, etc., for example, the data sharing subjects in the alliance chain HBN1 are subjects in the same industry and the same region. The specific subject in each alliance chain can be at least one representative subject elected by all data sharing subjects in the alliance chain, for example, the specific subject is a subject with industry representation.

[0037] The specific subject can correspond to its own blockchain node (i.e. consensus node), for example, the subject node (such as server or terminal device, etc.) of the specific subject can be used as the blockchain node (i.e. consensus node). Each ordinary subject can correspond to its own blockchain node (i.e. ordinary node), information node (non-blockchain node) and storage.

[0038] The shared data identifier is an identifier corresponding to the shared data, and the shared data identifier can also correspond to the ordinary subject, for example, the shared data identifier can be composed of a subject sub-identifier of the ordinary subject and a data sub-identifier of the shared data. The shared data is the data to be shared, for example, the detailed information of a product such as production ingredients, suppliers, expiration date, etc. The address mapping data is data that maps storage addresses, and the address mapping data can indicate the storage address of the shared data, for example, the address of the storage such as server or database.

[0039] The information node of the common principal can receive a target message for registering data, and the target message can include shared data and address mapping data corresponding to the shared data and a shared data identifier. For example, when the address mapping data or the shared data maintained by a certain principal changes, the information node can send a target message to the information node, and then the information node receives the target message.

[0040] The information node of the common principal can 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, the historical address mapping data is replaced with the received address mapping data, or when there is no historical address mapping data corresponding to the shared data identifier locally, the received address mapping data is stored in association with the shared data identifier.

[0041] The information node of the common principal can call a consensus node in the public chain to perform digest writing processing, so that the consensus node generates a digest of the address mapping data and the shared data, and the consensus node stores the generated digest in the common node of the common principal in the alliance chain where the common principal is located. The digest can be stored in association with the corresponding shared data identifier.

[0042] In this way, the public chain and the at least one alliance chain form a hybrid blockchain network. The information nodes of the common principals in each alliance chain maintain address mapping data, the consensus node in the public chain calculates the digest of the address mapping data and the shared data and writes it to the corresponding common node for distributed storage. The consensus node performs calculation processing, the common nodes in each alliance chain distribute a small amount of digest for distributed maintenance, which occupies less space and has high data query performance. The entire network system is lightweight and high-performance, the scalability is effectively improved, and based on the digest on the chain, the data can be completely restored and trusted verified, the data authenticity is effectively guaranteed, thereby effectively guaranteeing the authenticity and integrity of the shared data and improving the scalability of the data sharing system.

[0043] The specific process of each step when data sharing is performed based on the blockchain network is described below.

[0044] In step S110, the shared data and the address mapping data corresponding to the shared data and the shared data identifier are received.

[0045] In one embodiment, the information nodes of the common principals 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. In step S110, the shared data and the address mapping data corresponding to the shared data and the shared data identifier are received, including: receiving a target message distributed by the global network, the target message carrying the shared data, the shared data identifier and the address mapping data, and the target message being sent by a target client to the global network.

[0046] Referring toFigure 2 The information nodes of the ordinary subjects in each alliance chain can be connected to form a local area network 203. For example, the information nodes corresponding to the ordinary enterprises in the alliance chain HBN1 can be connected to form a local area network DHT1, and the information nodes corresponding to the ordinary enterprises in the alliance chain HBN2 can 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 platform) 204, and the target information node can forward messages across local area networks based on the global network.

[0047] The target client that registers the data can send a target message to the global network (unified centralized management platform) 204, and the global network (unified centralized management platform) 204 can send the target message to the corresponding information node directly or through each local area network. For example, the global network (unified centralized management platform) 204 can send the target message to the information node of the ordinary subject corresponding to the shared data identifier.

[0048] In an embodiment, the target client can directly send the target message to a certain information node, and the information node can further forward the target message through the local area network and the global network. The information node that receives the target message can be directly the information node of the ordinary subject corresponding to the shared data identifier.

[0049] In step S120, the shared data identifier and the address mapping data are stored in association in the information node.

[0050] The information node of the ordinary subject can be responsible for storing the shared data identifier and the address mapping data in association in the local area. For example, when there is historical address mapping data corresponding to the shared data identifier in the local area, the received address mapping data is used to replace the historical address mapping data, or when there is no historical address mapping data corresponding to the shared data identifier in the local area, the received address mapping data is stored in association with the shared data identifier.

[0051] Each data sharing subject can be assigned a corresponding unique subject sub-identifier in the system, for example, each enterprise is assigned a specific prefix identifier as a subject sub-identifier; each shared data can be assigned a corresponding unique data sub-identifier, for example, each product can customize a unique suffix identifier as a data sub-identifier; the combination of the subject sub-identifier and the data sub-identifier can form a shared data identifier, and the corresponding data sharing subject (such as an ordinary subject) can be matched according to the shared data identifier, and in some ways, the corresponding shared data is also matched.

[0052] In an embodiment, the shared data, the shared data identifier, and the address mapping data are included in a target message, and the target message is signed by a private key of a target general principal; before the shared data identifier and the address mapping data are stored in the storage of the general principal corresponding to the shared data identifier, the method further includes: querying verification information from a general node of the target general principal, the verification information including a principal sub-identifier and a public key corresponding to the target general principal; signing the target message according to the public key to obtain a signature result; and if the signature result indicates that the private key is paired with the public key, verifying the principal sub-identifier to obtain a verification result.

[0053] Referring to Figure 3 The general node (blockchain node) of each general principal can store information such as a principal sub-identifier (e.g., a specific identifier prefix) and a public key corresponding to the general principal in the blockchain network. After the general node of the general principal is successfully authenticated into the chain (blockchain network), the blockchain network can generate a public-private key pair (including a public key and a private key) corresponding to the general principal through a key generation function of the blockchain. The information node of the general principal can call the general node of other general principals to obtain this information.

[0054] The target message can be a message generated by a target general principal (e.g., a target enterprise), for example, the target general principal generates the target message when it wants to register data in the message in the system. The target message is signed by the private key of the target general principal, and the information node can call the blockchain module (i.e., the general node of the target general principal in the blockchain network) to query the verification information. The signature result indicating whether the private key can be successfully paired with the public key can be obtained by decrypting the target message signed by the private key through the obtained public key. If the signature result indicates that the private key is paired with the public key, the principal sub-identifier is verified, and the principal sub-identifier can be generated according to a certain rule. By verifying whether the principal sub-identifier conforms to the generation rule, a verification result indicating whether the principal sub-identifier is legal can be obtained.

[0055] In one example, if the verification result indicates that the principal sub-identifier is not legal, steps S120 and subsequent steps are not performed, and vice versa. In one example, if the signature result indicates that the private key is not paired with the public key, the verification of the principal sub-identifier is not performed, and steps S120 and subsequent steps are not performed.

[0056] In an embodiment, the verification information further includes authorization permission information, and the method further includes: determining a data registration permission of the target general principal according to the authorization permission information, the data registration permission being used to indicate whether the target general principal has the permission to register data in the blockchain network.

[0057] When the common node of the target common principal registers the entry chain, the blockchain network can grant the target common principal authorization permission information, which can reflect whether the target common principal has the permission to register data in the blockchain network. Wherein, after the verification result indicates that the principal sub-identifier is legal, the data registration permission of the target common principal is further determined according to the authorization permission information. If the target common principal has the permission to register data in the blockchain network, step S120 and subsequent steps are performed, otherwise step S120 and subsequent steps are not performed.

[0058] In step S130, the consensus node in the public chain is called to perform the summary writing process, so that the consensus node generates the summary of the address mapping data and the shared data, and stores the summary into the common node of the common principal in the alliance chain where the common principal is located.

[0059] The common node maintains a small amount of partial summary information and does not perform calculation processing. The information node of the common principal can call the consensus node in the public chain to perform the summary writing process, the consensus node generates the summary of the address mapping data and the shared data, and the consensus node stores the generated summary into the common node of the common principal in the alliance chain where the common principal is located, so that the summary is distributed stored in the entire blockchain network.

[0060] In an embodiment, the consensus node can calculate the corresponding summary of the address mapping data and the shared data through the one-way hash function respectively, and store the summary into the common node of the common principal in the alliance chain where the common principal is located according to the consistent hash of the shared data identifier.

[0061] Wherein, the consensus node in the public chain can take the predetermined block time as a round, and in the time period of the round, the consensus node calculates the summary of the address mapping data and the shared data corresponding to the final state of the data change in the round through the one-way hash function respectively.

[0062] Referring to Figure 5 , in the time period of a round, the information node DHT1 receives the first target message including: shared data identifier: ABC, address mapping data: 210.122.1.1:8080 and shared data: shelf life range; the information node DHT2 receives the second target message including: shared data identifier: XYZ, address mapping data: 110.222.2.2:8080 and shared data: dairy products; and the information node DHT1 further receives the third target message including: shared data identifier: ABC, address mapping data: 210.122.1.1:8080 and shared data: expired food.

[0063] The consensus node in the public chain generates a digest for the address mapping data in the final state of data change ("ABC-210.122.1.1:8080-expired food" and "XYZ-110.222.2.2:8080-dairy products") and shared data respectively, and sends the digest to the corresponding normal node NN1 and NN2 for storage according to the consistent hash identified by the shared data, wherein the digest is stored in association with the corresponding shared data identifier.

[0064] In an embodiment, the consensus node also generates a data transaction record corresponding to the digest, and stores the data transaction record in the blockchain ledger; the public chain further includes a supervision node, which supervises the storage of the blockchain ledger.

[0065] The consensus node can perform consensus verification and take turns to block. In one block generation round, the data transaction record can be generated after the digest writing process is completed and stored in the blockchain ledger in the consensus node. Specifically, the consensus node can generate a block for the data transaction record of the digest writing process, and record the block in the blockchain ledger of the consensus node. Furthermore, the normal node does not store the blockchain ledger, and only the consensus node stores the full amount of the blockchain ledger, which can further ensure data authenticity and at the same time ensure lightweight operation of the entire system.

[0066] The block in the round can include multiple data transaction records, and the new record corresponding to the same entry (such as a shared data identifier) can overwrite the old record, which can reduce data redundancy.

[0067] Further, the public chain further includes a supervision node, which can be a node of a regulatory agency or an enterprise with regulatory functions, etc. The supervision node and the consensus node supervise each other, and the supervision node can at least supervise the storage of the blockchain ledger to ensure the legality and effectiveness of data chaining and data change.

[0068] Further, in an embodiment, the consensus node and the supervision node in the public chain can jointly supervise the subjects (including normal subjects and specific subjects) in each alliance chain, for example, the network access information of the information nodes in each local area network and various requests received by the information nodes can be stored in the public chain.

[0069] In an embodiment, the method further comprises querying the corresponding shared data according to the shared data identifier or resolving the shared data identifier, specifically, the information node of the common principal can: receive the target shared data identifier sent by the query client for querying the data; query the target address mapping data corresponding to the target shared data identifier to obtain the target address mapping data; obtain the shared data corresponding to the target shared data identifier from the storage repository of the common principal pointed by the target address mapping data to obtain the query shared data; and send the query shared data to the query client.

[0070] The information node of the common principal can query the address mapping data associated with the target shared data identifier from the local database to obtain the target address mapping data, and further obtain the query shared data according to the shared data corresponding to the target shared data identifier obtained from the storage repository of the common principal pointed by the target address mapping data.

[0071] In an embodiment, the method further comprises performing trusted authentication on the target address mapping data and the query shared data, specifically: obtaining the target digest corresponding to the target shared data identifier from the common node of the common principal; verifying the target address mapping data and the query shared data according to the target digest to obtain a verification result; and sending the verification result to the query client.

[0072] The common node, i.e., the blockchain node, records the digest of the registered data in the system, and the target digest corresponding to the target shared data identifier can be queried from the blockchain node of the blockchain network by calling the common node. Based on the target digest, the target address mapping data and the query shared data obtained from the storage repository can be verified whether they are tampered with to obtain a verification result, which can include no tampering or tampering.

[0073] Referring to Figure 6 , the target address mapping data and the query shared data are verified according to the target digest, for example, the target shared data identifier is ABC, the target address mapping data queried is 210.122.1.1:8080, and the query shared data is expired food. If the target digest is 210.122.1.1:8080 (digest) and expired video (digest), at this time, the verification result is that the target address mapping data and the query shared data are not tampered with, and the trusted verification is successful.

[0074] Further, referring to Figure 7 , for example, the target shared data identifier is ABC, the target address mapping data queried is tampered 110.222.2.2:8080, and the query shared data is tampered within the shelf life range. At this time, the verification result is that the target address mapping data is tampered with (i.e., the trusted verification fails), and the query shared data is tampered with (i.e., the trusted verification fails).

[0075] In an embodiment, the information nodes of the ordinary subjects in each alliance chain are connected to form a local area network, and 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 sent by a query client, comprising: receiving a target shared data identifier for querying data sent by a query client in a local area network or a global network.

[0076] The target shared data identifier can be included in a query message, and each ordinary subject's information node can receive a query message forwarded by other information nodes in a local area network or a global network, and then receive a target shared data identifier for querying data, and data queries can be performed across local area networks.

[0077] It can be understood that each information node can directly receive a query message sent by a query client, and then receive a target shared data identifier for querying data.

[0078] According to the method described in the above embodiment, the following will be further described in detail in conjunction with an application scenario. The meanings of the related terms in this scenario are the same as those in the foregoing embodiments, and reference can be made to the descriptions in the foregoing embodiments. In this application scenario, data sharing subjects are enterprises, ordinary subjects are ordinary enterprises, and specific subjects are specific enterprises (such as enterprises elected to have a demonstration in the industry), and the foregoing embodiments of the present application are applied in this scenario for data sharing.

[0079] Figure 2 A schematic diagram of a system 200 to which embodiments of the present application can be applied is shown. As shown in Figure 2 The system 200 can include a blockchain network and an information network, the blockchain network can include a public chain 201 and at least one alliance chain 202, and the information network can include a global network 204 and at least one local area network 203.

[0080] The alliance chain 202 includes ordinary nodes of ordinary enterprises (ordinary subjects) and consensus nodes of specific enterprises (specific subjects), the public chain includes consensus nodes in all alliance chains 202, and the ordinary enterprises and the specific enterprises are data sharing subjects (such as enterprises or institutions, etc.), and the ordinary nodes and the consensus nodes are all blockchain nodes. Supervision nodes can also be added to the public chain, and the supervision nodes are also blockchain nodes.

[0081] The data sharing subjects in each alliance chain can be divided according to the industry and the region, etc., for example, the data sharing subjects in the alliance chain HBN1 are multiple enterprises (such as enterprise 1, enterprise 2, and enterprise 3, etc.) in the same industry and the same region. The specific subject in each alliance chain can be at least one representative enterprise elected by all data sharing subjects (i.e., multiple enterprises) in the alliance chain, for example, the specific enterprise is an enterprise with industry representation.

[0082] A specific enterprise can correspond to its own blockchain node (i.e., consensus node), for example, the enterprise node (i.e., subject node, such as a server or terminal device) of the specific enterprise can serve as a blockchain node (i.e., consensus node). Each ordinary enterprise can correspond to its own blockchain node (i.e., ordinary node), information node, and storage.

[0083] In an embodiment of the present example, further referring to Figure 3 Through network function virtualization, container technology, etc., the enterprise node 301 (such as a server or terminal device) of an ordinary enterprise can form an information module, a blockchain module, and a storage therein, the information module serving as an information node 3011, the blockchain module serving as a blockchain node (i.e., ordinary node) 3012, and the internal database serving as a storage 3013. The enterprise node of the ordinary enterprise can serve as both an information node in a local area network and a blockchain node (i.e., ordinary node) in an alliance chain on the basis of being responsible for the maintenance and management of its own internal storage (such as a storage server or database).

[0084] The information nodes of the ordinary enterprises in each alliance chain can be connected to form a local area network 203, for example, the information nodes corresponding to the ordinary enterprises in the alliance chain HBN1 can be connected to form a local area network DHT1, and the information nodes corresponding to the ordinary enterprises in the alliance chain HBN2 can be connected to form a local area network DHT2. At least one information node in each local area network 203 can participate in a global network (unified centralized management platform) 104, and message forwarding can be performed across local area networks based on the global network. Further, each alliance chain corresponds to one local area network, for example, the alliance chain HBN1 corresponds to the local area network DHT1.

[0085] A hybrid blockchain network (HBN) is built using a secure hash table technology (Distributed Hash Table, DHT, also known as distributed hash table technology), and the entire system forms a hybrid network, the information nodes in the local area network are DHT nodes, and the nodes in the alliance chain are blockchain nodes (HBN nodes); based on the hybrid network, the registration and resolution of shared data between different data sharing subjects can be realized, and the identity authentication of the data sharing subjects and data acquisition parties and the trusted verification of the data accessed are combined with the blockchain.

[0086] The server as a node can be a standalone physical server, a server cluster or a distributed system composed of multiple physical servers, a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and basic cloud computing services such as big data and artificial intelligence platforms. The terminal as a node can be a mobile phone, a computer, and the like. Each information node can interact with the client to receive the target message (such as a message containing the target shared data identifier), and the client can be installed in an interactive terminal, which can include but is not limited to a mobile phone, a computer, a smart voice interactive device, a smart home appliance, a vehicle-mounted terminal, a VR / AR device, a smart watch, and a computer, and the like.

[0087] From the overall system architecture, the alliance chain and the local area network are at the same level. The local area network can be responsible for the registration and resolution of shared data, the alliance chain can be responsible for access control and data trusted authentication, the public chain and the global network have the same status, and both are responsible for global information processing but have different specific functions. The global network can maintain the entry information of the local area network and forward the request across the local area network. The public chain (also known as the supervision chain) can jointly supervise the nodes of all supervision agencies and departments to supervise the enterprises on the chain and store the block chain ledger, and can realize reliable decentralized data sharing.

[0088] Referring to Figure 4 In the system, data registration can be performed. When data registration is performed, the information node of the ordinary enterprise can perform steps S410 to S450.

[0089] Step S410, receiving a target message: receiving shared data and address mapping data corresponding to the shared data and a shared data identifier, specifically, receiving a target message allocated by a global network, the target message carrying shared data, a shared data identifier and address mapping data, the target message being sent to the global network by a target client. The target message is signed by a private key of the target ordinary enterprise.

[0090] Step S420, obtaining verification information: querying the verification information from the ordinary node of the target ordinary enterprise, the verification information including a subject sub-identifier, a public key and authorization permission information corresponding to the target ordinary enterprise.

[0091] Referring to Figure 3 The ordinary node (blockchain node) of each ordinary enterprise can store the subject sub-identifier (such as a specific identifier prefix) and the public key of the ordinary enterprise in the blockchain network. After the ordinary node of the ordinary enterprise is successfully authenticated into the chain (blockchain network), the blockchain network can generate a public-private key pair (including a public key and a private key) corresponding to the ordinary enterprise through the key generation function of the blockchain.

[0092] Step S430, verifying the authority and storing the data.

[0093] When verifying the authority, the target message is verified according to the public key to obtain a verification result; if the verification result indicates that the private key is paired with the public key, the subject sub-identity is verified to obtain a verification result; the data registration authority of the target ordinary subject is determined according to the authorized authority information, and the data registration authority is used to indicate whether the target ordinary enterprise has the authority to register data in the blockchain network. When storing the data, the shared data identifier is associated with the address mapping data and stored in the information node.

[0094] Step S440, sending a message of successful registration to the target client.

[0095] Step S450, abstract writing: calling the consensus node in the public chain to perform abstract writing processing, so that the consensus node generates the abstract of the address mapping data and the shared data, and stores the abstract in the ordinary node of the ordinary subject in the alliance chain.

[0096] The consensus node can calculate the corresponding abstracts of the address mapping data and the shared data through the one-way hash function respectively, and store the abstracts in the ordinary node of the ordinary subject in the alliance chain according to the consistent hash of the shared data identifier.

[0097] Among them, the consensus node in the public chain can take the predetermined block time as a round, and in the time period of this round, the address mapping data and the shared data corresponding to the final state of the data change in this round are calculated through the one-way hash function to calculate the abstract.

[0098] Referring to Figure 5 , the information node DHT1 receives the first target message including: shared data identifier: ABC, address mapping data: 210.122.1.1:8080, shared data: shelf life range; the information node DHT2 receives the second target message including: shared data identifier: XYZ, address mapping data: 110.222.2.2:8080, and shared data: dairy products; the information node DHT1 also receives the third target message including: shared data identifier: ABC, address mapping data: 210.122.1.1:8080, and shared data: expired food.

[0099] The consensus node in the public chain generates a digest for the address mapping data in the final state of data change ("ABC-210.122.1.1:8080-expired food" and "XYZ-110.222.2.2:8080-dairy products") and shared data respectively, and sends the digest to the corresponding normal node NN1 and NN2 for storage according to the consistent hash identified by the shared data, wherein the digest is stored in association with the corresponding shared data identifier.

[0100] The consensus node also generates a data transaction record corresponding to the digest and stores the data transaction record in the blockchain ledger. The public chain also includes a regulatory node that supervises and records the blockchain ledger.

[0101] The consensus node can perform consensus verification and take turns to generate blocks. In one block generation round, the data transaction record can be generated after the digest write processing is completed and stored in the blockchain ledger in the consensus node. Specifically, the consensus node can generate a block for the data transaction record of the digest write processing and record the block in the blockchain ledger of the consensus node. Furthermore, the normal node does not store the blockchain ledger, and only the consensus node stores the full blockchain ledger, which can further ensure data authenticity and at the same time ensure lightweight operation of the entire system.

[0102] The block in the round can include multiple data transaction records, and the new record corresponding to the same entry (such as the shared data identifier) can overwrite the old record, which can reduce data redundancy.

[0103] Further, the public chain also includes a regulatory node, which can be a regulatory agency or a node of an enterprise with regulatory functions, etc. The regulatory node and the consensus node supervise each other, and the regulatory node can at least supervise and record the blockchain ledger to ensure the legality and effectiveness of data chaining and data change.

[0104] Further, in an embodiment, the consensus node and the regulatory node in the public chain can jointly regulate the subjects (including normal subjects and specific subjects) in each alliance chain. For example, the network access information of the information nodes in each local area network and various requests received by the information nodes can be stored in the public chain.

[0105] Further reference Figure 4 In the system, data analysis can be performed, and the information node of the ordinary enterprise can perform steps S460 to S4120 during data analysis.

[0106] Step S460, receiving an identifier: receiving a target shared data identifier sent by a query client for querying data.

[0107] Step S470, query mapping data: query the target shared data identifier corresponding address mapping data, and obtain target address mapping data;

[0108] Step S480, query shared data: query the shared data according to the target address mapping data: from the storage repository of the target address mapping data pointing to the ordinary principal, obtain the shared data corresponding to the target shared data identifier, and obtain the query shared data.

[0109] Step S490, send the query shared data to the query client.

[0110] Step S4100, obtain the digest: obtain the digest corresponding to the target shared data identifier from the ordinary node of the ordinary principal, and obtain the target digest.

[0111] Step S4110, data trusted authentication: verify the target address mapping data and the query shared data according to the target digest, and obtain the verification result.

[0112] The ordinary node records the digest of the registered data in the system in the blockchain node, and the target shared data identifier corresponding digest, i.e. target digest, can be queried from the blockchain node of the blockchain network by calling the ordinary node. Based on the target digest, whether the target address mapping data and the query shared data obtained from the storage repository are tampered with can be verified, and the verification result can include no tampering or tampering.

[0113] Referring to Figure 6 , the target address mapping data and the query shared data are verified according to the target digest, for example, the target shared data identifier is ABC, the target address mapping data queried is 210.122.1.1:8080, and the query shared data is expired food. If the target digest is 210.122.1.1:8080 (digest) and expired video (digest), at this time, the verification result is that the target address mapping data and the query shared data are not tampered with.

[0114] Further, referring to Figure 7 , for example, the target shared data identifier is ABC, the target address mapping data queried is tampered 110.222.2.2:8080, and the query shared data is tampered within the shelf life range. At this time, the verification result is that the target address mapping data is tampered with, and the query shared data is tampered with.

[0115] Step S4120, return the authentication success message to the query client.

[0116] Further, referring to Figure 8In the blockchain network, the enterprise node participating in the enterprise node (specifically, the ordinary node in the enterprise node) needs to be identity compliant in the registration access link, and the enterprise node participating in data sharing and access needs to be identity compliant. First, the identity information of the enterprise node can be identified by three elements or enterprise payment, and after confirming the real-name authentication information of the enterprise node, the identity authentication is completed, and the enterprise node is registered in the chain. After successful authentication, the key generation function of the blockchain is used to generate a unique public and private key pair for the enterprise node, and based on the mechanism of multi-party participation of the blockchain, the blockchain identity certificate corresponding to the enterprise node is formed.

[0117] Referring to Figure 8 The identity compliance authentication process of the enterprise node can include steps 1 to 9, wherein the querying enterprise is an enterprise node that has entered the chain (such as a consensus node that has entered the chain), and the queried enterprise is an enterprise node that applies to enter the chain.

[0118] Step 1, the querying enterprise sends an identity data query request to the queried enterprise. Specifically, the querying enterprise can apply to "query and verify" the valid identity of the market subject of the certificate holder (the queried enterprise).

[0119] Step 2, if the queried enterprise refuses the identity data query request, the verification fails.

[0120] Step 3, if the queried enterprise passes the identity data query request, the queried enterprise will "output the identity certificate with the signature of the certificate authority", and the certificate authority generally refers to the CA authority.

[0121] Step 4, the queried enterprise obtains the public key of the querying enterprise through public information.

[0122] Step 5, the queried enterprise hashes the chain, specifically, the "querying enterprise public key" obtained is used to perform encryption, and the encrypted ciphertext is obtained by calling the Hash algorithm. The encrypted ciphertext is executed on the chain interface and chained to the blockchain network.

[0123] Step 6, the queried enterprise broadcasts the query record, specifically, the queried enterprise broadcasts the query and verification action record corresponding to the identity data query request to all other enterprise nodes in the blockchain network.

[0124] Step 7, the querying enterprise private key decrypts and verifies the certificate authority signature, specifically, the querying enterprise can obtain the encrypted ciphertext chained to the blockchain network, and decrypt it through the private key decryption template to verify the signature of the queried enterprise and the certificate authority.

[0125] Step 8, taking the "queried enterprise identity" decrypted from the encrypted ciphertext, the identity certificate is extracted from the blockchain to calculate the Hash, and the Hash verification is performed with the record of the queried enterprise in the enterprise information registration.

[0126] Step 9, the queried enterprise receives the "verification success or failure" message returned in the blockchain network, and realizes high-credibility identity authentication.

[0127] In this scenario, by applying the embodiments of the present application, it can be applied to data sharing between data sharing subjects. Taking data registration and data analysis for sharing data between enterprises as an example, a high-performance and lightweight hybrid blockchain model (HBN, Hybrid Blockchain Network) is realized. Without changing the existing deployment of enterprises, exemplary enterprises can be selected to build consensus nodes to store full blockchain account books, and change data backup can be realized. According to the shared data identifier, the digest can be distributed and stored in the normal nodes in the alliance chain by using consistent Hash, data effective recovery can be realized based on the digest, and efficient and reliable authentication of the analysis result (including target address mapping data and target shared data) can be provided.

[0128] Compared with the traditional blockchain system, the normal nodes of the hybrid blockchain model do not need to consume any computing resources, the storage overhead is small, the throughput is high, the global network (unified centralized management platform) can be expanded at a low cost, and efficient and reliable verification of massive data analysis results is realized. It provides an effective solution for performance guarantee and optimization of a distributed enterprise data sharing identification analysis system.

[0129] In summary, in this scenario, by applying the embodiments of the present application, the public chain and at least one alliance chain form a hybrid blockchain network, the information nodes of the normal subjects in each alliance chain maintain address mapping data, the consensus nodes in the public chain calculate the digest of the address mapping data and the shared data and write it into the corresponding normal node for distributed storage. The consensus nodes are calculated and processed, the normal nodes in each alliance chain distribute a small amount of digest, the space occupation is small and the data query performance is high, the entire network system is lightweight and high-performance, the scalability is effectively improved, and based on the digest on the chain, the data can be completely restored and reliably verified, the data authenticity is effectively guaranteed, and the authenticity and integrity of the shared data are effectively guaranteed, and the scalability of the data sharing system is improved.

[0130] To facilitate better implementation of the data sharing method based on the blockchain network provided in the embodiments of the present application, the embodiments of the present application further provide a data sharing device based on the blockchain network based on the data sharing method based on the blockchain network. The meanings of the nouns are the same as those in the data sharing method based on the blockchain network, and the specific implementation details can be referred to the description in the method embodiments. Figure 9 A block diagram of a data sharing device based on a blockchain network according to an embodiment of the present application is shown.

[0131] As shown in Figure 9 The data sharing device based on the blockchain network 500 can include a receiving unit 510, a storage unit 520, and a calling unit 530. The blockchain network includes a public chain and at least one alliance chain. Each of the alliance chains includes a common node of a common principal and a consensus node of a specific principal. The public chain includes the consensus node, and the device 500 is applied to an information node of the common principal.

[0132] The receiving unit 510 can be configured to receive shared data, address mapping data corresponding to the shared data, and a shared data identifier. The storage unit 520 can be configured to store the shared data identifier and the address mapping data in association with each other in the information node. The calling unit 530 can be configured to call the consensus node in the public chain to perform a digest writing process, so that the consensus node generates a digest of the address mapping data and the shared data, and stores the digest in the common node of the common principal in the alliance chain where the common principal is located.

[0133] In some embodiments of the present application, the shared data, the shared data identifier, and the address mapping data are contained in a target message, and the target message is signed by a private key of the target common principal. The device further includes a verification unit configured to: query verification information from the common node of the target common principal, the verification information including a principal sub-identifier and a public key corresponding to the target common principal; perform signature verification on the target message according to the public key to obtain a signature verification result; and if the signature verification result indicates that the private key is paired with the public key, verify the principal sub-identifier to obtain a verification result.

[0134] In some embodiments of the present application, the verification information further includes authorization permission information, and the verification unit is further configured to: determine a data registration authority of the target common principal according to the authorization permission information, the data registration authority being used to indicate whether the target common principal has the authority to register data in the blockchain network.

[0135] In some embodiments of the present application, the information nodes of the ordinary subjects in each of the alliance chains are connected to form a local area network, and target information nodes in the information nodes in each of the local area networks are connected to form a global network; the receiving unit is configured to receive a target message distributed by the global network, the target message carrying the shared data, a shared data identifier, and address mapping data, and the target message being sent by a target client to the global network.

[0136] In some embodiments of the present application, the consensus node further generates a data transaction record corresponding to the digest, and stores the data transaction record in a blockchain ledger; the public chain further includes a supervision node, and the supervision node supervises and notarizes the blockchain ledger.

[0137] In some embodiments of the present application, the device further includes an analysis unit configured to receive a target shared data identifier sent by a query client to query data; query address mapping data corresponding to the target shared data identifier to obtain target address mapping data; obtain shared data corresponding to the target shared data identifier from a storage library of an ordinary subject pointed to by the target address mapping data to obtain query shared data; and send the query shared data to the query client.

[0138] In some embodiments of the present application, the analysis unit is further configured to obtain a digest corresponding to the target shared data identifier from an ordinary node of the ordinary subject to obtain a target digest; verify the target address mapping data and the query shared data according to the target digest to obtain a verification result; and send the verification result to the query client.

[0139] In some embodiments of the present application, the information nodes of the ordinary subjects in each of the alliance chains are connected to form a local area network, and target information nodes in the information nodes in each of the local area networks are connected to form a global network; the analysis unit can be configured to receive the target shared data identifier sent by the local area network or the global network to query data.

[0140] It should be noted that, although several modules or units of a device for action execution are mentioned in the foregoing detailed description, such a division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into several modules or units.

[0141] In addition, the embodiments of the present application also provide an electronic device, which can be a terminal or a server, such as Figure 10As shown in FIG. 1, which shows a structural schematic diagram of an electronic device related to embodiments of the present application, in particular:

[0142] The electronic device can include a processor 601 having one or more processing cores, a memory 602 having one or more computer-readable storage media, a power supply 603, and an input unit 604, etc. Those skilled in the art can understand that the electronic device structure shown in FIG. 1 does not constitute a limitation on the electronic device, and can include more or fewer components than shown, or combine certain components, or different component arrangements. Among them: Figure 10

[0143] The processor 601 is the control center of the electronic device, which connects various parts of the computer device through various interfaces and lines, executes 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 overall monitoring the electronic device. Optionally, the processor 601 can include one or more processing cores; preferably, the processor 601 can integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 601.

[0144] The memory 602 can be used to store software programs and modules, and the processor 601 executes various functions and data processing by running the software programs and modules stored in the memory 602. The memory 602 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc.; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 602 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state memory device. Accordingly, the memory 602 can also include a memory controller to provide access for the processor 601 to the memory 602.

[0145] The electronic device further includes a power supply 603 for powering various components, and preferably the power supply 603 can be logically connected to the processor 601 through a power management system, so as to realize functions such as management of charging, discharging, and power consumption management through the power management system. The power supply 603 can also include one or more direct or alternating current power supplies, a recharging system, a power supply failure detection circuit, a power supply converter or inverter, a power supply state indicator, etc. any component.

[0146] ​The electronic device can further include an input unit 604, which can be used to receive inputted digital or character information, and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function controls.

[0147] Although not shown, the electronic device can further include a display unit, etc., which will not be described here. In particular in the present embodiment, the processor 601 in the electronic device will load one or more computer programs corresponding to the executable files of the processes of the computer programs into the memory 602 according to the following instructions, and run the computer programs stored in the memory 602 by the processor 601, so as to realize various functions in the foregoing embodiments of the present application.

[0148] The processor 601 can execute: receiving shared data and address mapping data corresponding to the shared data and a shared data identifier; storing the shared data identifier and the address mapping data in association with each other to the information node; calling a consensus node in the public chain for digest writing processing, so that the consensus node generates a digest of the address mapping data and the shared data, and stores the digest in a common node of a common principal in a common chain.

[0149] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by a computer program, or by a computer program controlling related hardware, which can be stored in a computer readable storage medium and loaded and executed by a processor.

[0150] To this end, the embodiments of the present application further provide a computer readable storage medium, which stores a computer program capable of being loaded by a processor to execute the steps in any one of the methods provided by the embodiments of the present application.

[0151] The computer readable storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0152] Since the computer program stored in the computer readable storage medium can execute the steps in any one of the methods provided by the embodiments of the present application, the beneficial effects that can be achieved by the methods provided by the embodiments of the present application can be achieved, which are described in detail in the foregoing embodiments and will not be described here.

[0153] According to an aspect of the present application, a computer program product or computer program is provided, which comprises computer instructions stored in a computer readable storage medium. A processor of a 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 method provided in various optional implementation manners in the above-mentioned embodiments of the present application.

[0154] 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. It is intended that the present application cover any and all variations of the application that come within the scope of the following claims and their equivalents. It is intended that the following claims be

[0155] It is to be understood that the application is not limited to the embodiments already described and shown in the drawings, that modifications and changes can be made by those skilled in the art, and that it is intended to cover in the appended claims all such modifications and changes as fall within the scope of the application.

Claims

1. A data sharing method based on a blockchain network, characterized in that, The network comprises a public chain and at least one alliance chain, each of the alliance chains comprises a common node of a common principal and a consensus node of a specific principal, the public chain comprises the consensus nodes in all the alliance chains, and the common principal comprises the common node and an information node in addition to the common node; the method is applied to the information node of the common principal, wherein the common node and the consensus node are both blockchain nodes, and the information node is a non-blockchain node; the method comprises: The information node receives shared data, address mapping data corresponding to the shared data, and a shared data identifier; The information node stores the shared data identifier and the address mapping data in association with each other in the information node; The information node calls the consensus node in the public chain to perform abstract writing processing, so that the consensus node generates an abstract of the address mapping data and the shared data, and stores the abstract in the common nodes of all common principals in the alliance chain in which the common principal is located.

2. The method of claim 1, wherein, The shared data, the shared data identifier, and the address mapping data are contained in a target message, and the target message is signed by a private key of a target common principal; Before the shared data identifier and the address mapping data are stored in association with each other in a storage library of a common principal corresponding to the shared data identifier, the method further comprises: Querying verification information from the common node of the target common principal, wherein the verification information comprises a principal sub-identifier and a public key corresponding to the target common principal; Verifying the target message according to the public key to obtain a verification result; If the verification result indicates that the private key is paired with the public key, the principal sub-identifier is verified to obtain a verification result.

3. The method of claim 2, wherein, The verification information further comprises authorization permission information, and the method further comprises: Determining a data registration permission of the target common principal according to the authorization permission information, wherein the data registration permission is used to indicate whether the target common principal has a permission to register data in the blockchain network.

4. The method of claim 1, wherein, The information nodes of the common principals in each of the alliance chains are connected to form a local area network, and target information nodes in the information nodes in each of the local area networks are connected to form a global network; The receiving of the shared data, the address mapping data corresponding to the shared data, and the shared data identifier comprises: 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 according to any one of claims 1 to 4, characterized in that, The consensus node further generates a data transaction record corresponding to the abstract, and stores the data transaction record in a blockchain ledger; the public chain further comprises a supervision node, and the supervision node supervises the storage of the blockchain ledger.

6. The method of claim 1, wherein, The method further comprises: Receiving a target shared data identifier sent by a query client and used to query data; Querying 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 a common principal pointed to by the target address mapping data to obtain query shared data; sending the query shared data to the query client.

7. The method of claim 6, wherein, The method further comprises: obtaining a target digest corresponding to the target shared data identifier from a common node of a common principal, to obtain a target digest; verifying the target address mapping data and the query shared data according to the target digest, to obtain a verification result; 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 alliance chains are connected to form a local area network, and target information nodes in the information nodes in each of the local area networks are connected to form a global network; The target shared data identifier for querying data sent by the receiving query client comprises: receiving the target shared data identifier for querying data sent by the local area network or the global network. 9.A data sharing apparatus based on a blockchain network, characterized by, The network comprises a public chain and at least one alliance chain, each of the alliance chains comprises a common node of a common principal and a consensus node of a specific principal, the public chain comprises the consensus nodes in all the alliance chains, the common principal comprises, in addition to the common node, an information node; the device is applied to the information node of the common principal, wherein the common node and the consensus node are both blockchain nodes, and the information node is a non-blockchain node; the device comprises: a receiving unit configured to receive 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 the address mapping data in association in the information node; a calling unit configured to call a consensus node in the public chain to perform digest writing processing, so that the consensus node generates a digest of the address mapping data and the shared data, and stores the digest in the common nodes of all the common principals in an alliance chain to which the common principal belongs.

10. A computer-readable storage medium, characterized in that, The computer program is stored on the computer and is executed by the processor of the computer, so that the computer executes the method of any one of claims 1 to 8.

11. An electronic device, comprising: comprise: a memory storing a computer program; a processor configured to read the computer program stored in the memory to execute the method of any one of claims 1 to 8.

12. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by the processor to implement the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Data sharing method and device based on block chain, computer equipment and storage medium

    CN110868424A

  • Prosomatic alliance chain of cone block chain

    CN112769917A