Data sharing method and device based on block chain, equipment and medium
By introducing a global routing chain into the blockchain to perform cross-chain data sharing tasks, the problem of centralized malicious risks is solved and efficient data sharing among multiple blockchains is achieved.
Patent Information
- Application Number
- CN202410248052.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-04
- Publication Date
- 2025-09-05
AI Technical Summary
In existing technologies, data sharing methods based on control consoles have the risk of centralized malicious activities, which affects the data sharing process and cannot share data across blockchains.
Adopting a blockchain-based data sharing method, by creating data sharing tasks and using the global routing chain to transmit information across chains, data sharing between multiple business chains is achieved, reducing the risk of centralized malicious activities and improving data sharing efficiency.
It improves the connectivity between multiple blockchains, reduces the risk of centralized malicious activities, and improves the efficiency and security of data sharing.
Smart Images

Figure CN120602479A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of blockchain, and in particular to a blockchain-based data sharing method, apparatus, device, and medium. Background Art
[0002] In network activities, there may be a situation where a user needs the data held by another user. At this time, the user will apply to the other user for data sharing.
[0003] In related technologies, there are methods for sharing data based on the control of a control console, as well as methods for sharing data by combining blockchain and a control console. These methods can all achieve data sharing.
[0004] However, the above-mentioned technologies all have the risk of centralized malicious behavior, that is, the control console as the implementation center may carry out malicious behavior, thereby affecting the overall data sharing process. Summary of the Invention
[0005] This application provides a blockchain-based data sharing method, device, equipment, and medium. The technical solution at least includes:
[0006] According to one aspect of an embodiment of the present application, a data sharing method based on a blockchain is provided, wherein the blockchain includes at least two service chains and a global routing chain. The method is executed by a first server and includes:
[0007] Creating a data sharing task, where the data sharing task is used to apply for a first data directory provided by the second server;
[0008] Sending a data sharing task to the global routing chain and the first business chain. The global routing chain is used to transmit information in at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with the first server, and the second business chain is associated with the second server.
[0009] receiving first data corresponding to the first data directory, where the first data is sent by the second server to the first server based on a data sharing task, where the data sharing task is learned by the second server from a global routing chain;
[0010] The first data is stored in a first database, and the first database is associated with the first server.
[0011] According to another aspect of an embodiment of the present application, a data sharing method based on a blockchain is provided, wherein the blockchain includes at least two service chains and a global routing chain. The method is executed by a second server and includes:
[0012] Send the first data directory to the global routing chain and the second business chain. The global routing chain is used to transmit information in at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with the first server, and the second business chain is associated with the second server. The first data directory is the data directory corresponding to the first data held by the second server.
[0013] Acquire a data sharing task on the global routing chain, where the data sharing task is sent by the first server to the global routing chain and the first service chain when applying for the first data directory;
[0014] Based on the data sharing task, the first data is sent to the first server.
[0015] According to another aspect of an embodiment of the present application, a data sharing device based on a blockchain is provided, wherein the blockchain includes at least two service chains and a global routing chain, and the device includes:
[0016] A processing module, configured to create a data sharing task, wherein the data sharing task is used to apply for a first data directory provided by the second server;
[0017] A sending module is used to send a data sharing task to the global routing chain and the first business chain. The global routing chain is used to transmit information in at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with a blockchain-based data sharing device, and the second business chain is associated with a second server.
[0018] a receiving module, configured to receive first data corresponding to a first data directory, where the first data is sent by the second server to the first server based on a data sharing task, where the data sharing task is learned by the second server from a global routing chain;
[0019] The storage module is used to store the first data in a first database, and the first database is associated with the blockchain-based data sharing device.
[0020] According to another aspect of an embodiment of the present application, a data sharing device based on a blockchain is provided, wherein the blockchain includes at least two service chains and a global routing chain, and the device includes:
[0021] A sending module, configured to send the first data directory to a global routing chain and a second business chain. The global routing chain is configured to transmit information in at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with a first server, and the second business chain is associated with a blockchain-based data sharing device. The first data directory is a data directory corresponding to the first data held by the blockchain-based data sharing device.
[0022] A receiving module, configured to obtain a data sharing task on the global routing chain, wherein the data sharing task is sent by the first server to the global routing chain and the first service chain when applying for the first data directory;
[0023] The sending module is used to send the first data to the first server based on the data sharing task.
[0024] According to another aspect of an embodiment of the present application, a first server is provided, comprising: a processor and a memory, wherein at least one program is stored in the memory; the processor is configured to execute at least one program in the memory to implement the blockchain-based data sharing method according to the various aspects described above.
[0025] According to another aspect of an embodiment of the present application, a second server is provided, comprising: a processor and a memory, wherein at least one program is stored in the memory; the processor is configured to execute at least one program in the memory to implement the blockchain-based data sharing method according to the various aspects described above.
[0026] According to another aspect of an embodiment of the present application, a computer-readable storage medium is provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the blockchain-based data sharing method as described in the above aspects.
[0027] According to another aspect of an embodiment of the present application, a computer program product (or computer program) is provided, which includes computer instructions, which are stored in a computer-readable storage medium. A processor obtains the computer instructions from the computer-readable storage medium, and executes the computer instructions to implement the blockchain-based data sharing method as described in the above aspects.
[0028] The technical solutions provided by the embodiments of the present application may have the following beneficial effects:
[0029] This method creates a data sharing task, which is used to apply for a first data directory provided by a second server; sends the data sharing task to a global routing chain and a first business chain, which is used to cross-chain transmit information from at least two business chains, including a first business chain and a second business chain, the first business chain being associated with a first server, and the second business chain being associated with a second server; receives first data corresponding to the first data directory, which is sent by the second server to the first server based on the data sharing task, and the data sharing task is learned by the second server from the global routing chain; and stores the first data in a first database, which is associated with the first server. This method improves the connectivity between multiple blockchains, reduces the risk of centralized malicious behavior, and improves the efficiency of data sharing. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0031] Figure 1 A schematic diagram of a computer system provided by an exemplary embodiment of the present application is shown;
[0032] Figure 2 A schematic diagram of a distributed system provided by an exemplary embodiment of the present application is shown;
[0033] Figure 3 A schematic diagram showing a block structure provided by an exemplary embodiment of the present application is shown;
[0034] Figure 4 A schematic diagram showing a data sharing method provided by related technologies;
[0035] Figure 5 A schematic diagram of a data sharing method based on blockchain provided by related technologies is shown;
[0036] Figure 6 A schematic diagram of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0037] Figure 7 A schematic diagram of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0038] Figure 8 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0039] Figure 9 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0040] Figure 10 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0041] Figure 11 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0042] Figure 12 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0043] Figure 13 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0044] Figure 14 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0045] Figure 15 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0046] Figure 16 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0047] Figure 17 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown;
[0048] Figure 18 A block diagram of a data sharing device based on blockchain provided by an exemplary embodiment of the present application is shown;
[0049] Figure 19 A block diagram of a data sharing device based on blockchain provided by an exemplary embodiment of the present application is shown;
[0050] Figure 20 A structural block diagram of a first server or a second server provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0051] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0052] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0053] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. As used in this application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
[0054] It should be noted that the object information (including but not limited to object device information, object personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the object or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0055] It should be understood that although the terms first, second, etc. may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this application, a first parameter may also be referred to as a second parameter, and similarly, a second parameter may also be referred to as a first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0056] First, some of the terms used in this application are explained:
[0057] Blockchain: A blockchain consists of a series of blocks that are connected to each other in chronological order. Once a new block is added to the blockchain, it cannot be removed. The block records the record data submitted by the nodes in the blockchain system. A blockchain is usually composed of multiple blocks. The genesis block includes a block header and a block body. The block header stores the input information feature value, version number, timestamp, and difficulty value, and the block body stores the input information. The next block of the genesis block uses the genesis block as its parent block. The next block also includes a block header and a block body. The block header stores the input information feature value of the current block, the block header feature value, version number, timestamp, and difficulty value of the parent block, and so on. Therefore, the block data stored in each block in the blockchain is associated with the block data stored in the parent block, ensuring the security of the input information in the block.
[0058] Hash value: Also known as an information characteristic value or eigenvalue, a hash value is generated by converting input data of any length into a cryptographically encoded form, producing a fixed output. The original input data cannot be retrieved by decrypting the hash value; it is a one-way encryption function. In a blockchain, each block (except the initial block) contains the hash value of the previous block, which is called the parent block of the current block. Hash values are the core foundation and most important aspect of the potential of blockchain technology, preserving the authenticity of recorded and viewed data and the integrity of the blockchain as a whole.
[0059] Evidence storage: For example, when storing information in a blockchain, the node where the blockchain is located verifies the input information upon receiving it. After verification, the node stores the input information in the memory pool and updates the hash tree used to record the input information. After that, the update timestamp is updated to the time when the input information was received, and different random numbers are tried, and the eigenvalue calculation is performed multiple times so that the calculated eigenvalue can satisfy the following formula:
[0060] SHA256(SHA256(version+prev_hash+merkle_root+ntime+
[0061] nbits+x)) <TARGET;
[0062] Among them, SHA256 is the eigenvalue algorithm used to calculate the eigenvalue; version (version number) is the version information of the relevant block protocol in the blockchain; prev_hash is the block header eigenvalue of the parent block of the current block; merkle_root is the eigenvalue of the input information; ntime is the update time of the update timestamp; nbits is the current difficulty, which is a fixed value within a period of time and is determined again after exceeding the fixed time period; x is a random number; TARGET is the eigenvalue threshold, which can be determined based on nbits.
[0063] In this way, when a random number that satisfies the above formula is calculated, the information can be stored accordingly, and the block header and block body can be generated to obtain the current block. Subsequently, the blockchain node sends the newly generated block to other nodes in the data sharing system based on the node identifiers of other nodes in the data sharing system. The other nodes verify the newly generated block and, after verification, add the newly generated block to their stored blockchain.
[0064] Figure 1 A schematic diagram of a computer system 100 provided by an exemplary embodiment of the present application is shown. The computer system 100 includes a terminal device 120 and a data sharing system 140 .
[0065] The terminal device 120 may be an electronic device such as a mobile phone, a tablet computer, a vehicle-mounted terminal (vehicle computer), a wearable device, a personal computer (PC), etc.
[0066] The data sharing system 140 refers to a system for sharing data between nodes. The data sharing system may include multiple nodes 130, and the multiple nodes 130 may refer to various clients in the data sharing system 140. Each node 130 may receive input information during normal operation and maintain the shared data within the data sharing system 140 based on the received input information. In order to ensure information intercommunication within the data sharing system 140, an information connection may exist between each node 130 in the data sharing system 140, and information can be transmitted between the nodes 130 through the above-mentioned information connection. For example, when any node 130 in the data sharing system 140 receives input information, the other nodes 130 in the data sharing system 140 obtain the input information according to the consensus algorithm and store the input information as data in the shared data, so that the data stored on all nodes 130 in the data sharing system 140 are consistent.
[0067] Each node 130 in the data sharing system 140 has a corresponding node identifier, and each node 130 in the data sharing system 140 can store the node identifiers of other nodes 130 in the data sharing system 140, so that the generated blocks can be broadcast to other nodes in the data sharing system 140 based on the node identifiers of other nodes. Each node 130 can maintain a node identifier list as shown in Table 1, and store the node name and node identifier in the node identifier list accordingly. The node identifier can be an Internet Protocol (IP) address for interconnection between networks or any other information that can be used to identify the node. Table 1 only uses the IP address as an example for explanation.
[0068] Table 1
[0069] Node Name Node ID Node 1 xxx.xxx.xxx.xxx Node 2 xxx.xxx.xxx.xxx … … Node N xxx.xxx.xxx.xxx
[0070] Each node 130 in the data sharing system 140 stores an identical blockchain. The terminal device 120 and the data sharing system 140 can communicate via a network, such as a wired network or a wireless network.
[0071] Figure 2 The schematic diagram of a distributed system 200 provided by an exemplary embodiment of the present application is shown, and the distributed system 200 includes: a node 210 and a client 220. The node 210 is any form of computing device in an access network, such as a server, a user terminal, and Figure 1 The node 130 in the embodiment has the same meaning as the client 220. Figure 1 The terminal device 120 in the embodiment has the same meaning.
[0072] Taking the distributed system 200 as an example of a blockchain system, it is formed by multiple nodes 210 and clients 220. In the distributed system 200, any machine such as a server or a terminal can join and become a node 210. The node 210 includes a hardware layer, an intermediate layer, an operating system layer, and an application layer.
[0073] See also Figure 2 The functions of each node 210 in the distributed system 200 shown include at least one of the following:
[0074] (1) Routing: a basic function of a node 210 , used to support communication between nodes 210 .
[0075] (2) Application: used to be deployed in the blockchain to implement specific business according to actual business needs, record data related to the implementation of the function to form record data, carry a digital signature in the record data to indicate the source of the task data, and send the record data to other nodes 210 in the distributed system 200, so that other nodes 210 can add the record data to the temporary block when they successfully verify the source and integrity of the record data.
[0076] For example, the services implemented by the application include:
[0077] (2.1) Wallet: Provides functionality for conducting electronic currency transactions, including initiating transactions (i.e., sending the transaction record of the current transaction to other nodes 210 in the distributed system 200. Upon successful verification by other nodes 210, the transaction record data is stored in a temporary block of the blockchain as a response to acknowledge the validity of the transaction). The wallet also supports querying the remaining electronic currency in an electronic currency address.
[0078] (2.2) Shared ledger: It is used to provide functions such as storage, query, and modification of account data. It sends the record data of the operation on the account data to other nodes 210. After the other nodes 210 verify the validity of the account data, they store the record data in a temporary block as a response to acknowledge the validity of the account data. They can also send a confirmation to the node 210 that initiated the operation.
[0079] (2.3) Smart Contract: A computerized protocol that can enforce the terms of a contract. This is implemented through code deployed on a shared ledger that executes when certain conditions are met. Based on actual business needs, this code can be used to automate transactions, such as querying the logistics status of a buyer's purchased goods and transferring the buyer's electronic currency to the merchant's address after the buyer signs for the goods. Smart contracts are not limited to executing contracts for transactions; they can also execute contracts that process received information.
[0080] (3) Blockchain: It includes a series of blocks that are connected to each other in the order of their generation. Once a new block is added to the blockchain, it will not be removed. The block records the record data submitted by the node 210 in the distributed system 200.
[0081] The blockchain consists of multiple blocks, such as Figure 3 As shown, the genesis block 310 includes a block body 311 and a block header 312. The block header 312 stores a version number 3121, an input information feature value 3122, a timestamp 3123, and a difficulty value 3124. The block body 311 stores the input information. The next block 320 of the genesis block 310 uses the genesis block 310 as its parent block. The next block 320 also includes a block body 321 and a block header 322. The block header 322 stores the block header feature value 3221, input information feature value 3222, version number 3223, timestamp 3224, and difficulty value 3225 of the parent block of the current block (next block 320). The same applies to other blocks, so that the block data stored in each block in the blockchain is associated with the block data stored in the parent block, thereby ensuring the security of the input information in the block.
[0082] The data sharing method based on blockchain provided in the embodiment of the present application can be performed by a node device corresponding to any node 130 in the data sharing system 140, and the node device can be a computer device. A computer device refers to an electronic device with data calculation, processing and storage capabilities, and a computer device includes a server, which can be a physical server or a cloud server. Figure 1 Taking the implementation environment shown as an example, the blockchain-based data sharing method can be executed by a node device corresponding to any node 130 in the data sharing system 140, or by the terminal device 120 and the node device corresponding to the node 130 in the data sharing system 140 interacting and cooperating to execute, and the embodiments of the present application are not limited to this.
[0083] Those skilled in the art will appreciate that the number of the above-mentioned terminal devices or node devices may be greater or lesser. For example, the above-mentioned terminal device or node device may be only one, or the above-mentioned terminal devices or node devices may be dozens, hundreds, or even more. The embodiments of the present application do not limit the number and device types of terminal devices and node devices.
[0084] In online activities, there may be a situation where a user needs the data held by another user. At this time, the user will apply to the other user for data sharing. In the related technology, there are methods for sharing data based on the control of the control console, and there are methods for sharing data by combining blockchain and the control console. These methods can achieve data sharing. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0085] Figure 4 A schematic diagram of a data sharing method provided by related art is shown. This method utilizes a control console 410 for data sharing. Regarding step ①, a task creator 420 creates a task. This task can be referred to as a data sharing task. Task creator 420 is typically a user who uses the data, but can also simply create a data sharing task without using the data.
[0086] The data sharing task includes at least one of the data to be shared and the information of the data user. The data to be shared is provided by the data provider 430, and there are one or more data users. Here, one data user 440 is used as an example for description.
[0087] In step ②, data provider 430 and data user 440 approve the task. Data provider 430 approves the data sharing task and sends a first approval result to control center 410. Data user 440 approves the data sharing task and sends a second approval result to control center 410.
[0088] Regarding step ③, the control center 410 pushes the task. If the first approval result is approval to provide data and the second approval result is approval to apply for data, the control center 410 pushes the data sharing task to the data proxy gateway 1 corresponding to the data provider 430 for execution.
[0089] Steps 4, 5, and 6 are the process of executing the data sharing task. For step 4, pulling data, Data Proxy Gateway 1 pulls the data requested by data user 440 from data source database 450 corresponding to data provider 430. For step 5, pushing data, Data Proxy Gateway 1 pushes the pulled data to Data Proxy Gateway 2 corresponding to data user 440. For step 6, storing data in the database, Data Proxy Gateway 2 sends the data to result database 460, storing it in the local database. If there are multiple data users, the pulled data will be pushed to the data proxy gateways corresponding to each of these data users.
[0090] Figure 5 A schematic diagram of a data sharing method based on blockchain provided by related technologies is shown. Figure 4 Compared with the method of the embodiment, blockchain technology is adopted.
[0091] Regarding step ① task submission, the task creator submits the data sharing task to the blockchain 510 through the control console 3. The blockchain 510 includes multiple chain nodes, such as chain node 1 to chain node 4, and data and control commands are allowed to be transmitted between multiple chain nodes.
[0092] Regarding step ② of obtaining tasks, the control console corresponding to each server can obtain the data sharing tasks from the blockchain 510.
[0093] Servers include physical servers or cloud servers. Servers are controlled by organizations, enterprises, institutions, or other entities. Each server includes a control console and multiple data proxy gateways. In some embodiments, the control console corresponds to one server, and each data proxy gateway corresponds to one server. This embodiment of the application illustrates an example in which one control console and multiple data proxy gateways correspond to only one server.
[0094] The data sharing task execution process for Server 1 and Server 2 follows the same principles. This section will use Server 1 as an example. Regarding step 3, pushing the task, Control Center 1 will push the data sharing task to the relevant data proxy gateway for execution. For example, if the data sharing task requires sharing second data, and the second data is provided by the database corresponding to Data Proxy Gateway 2, Control Center 1 will push the data sharing task to Data Proxy Gateway 2.
[0095] The execution process of data sharing tasks Figure 4 The execution process of the embodiments is the same and will not be repeated here.
[0096] However, the above-mentioned technologies all have the risk of centralization, that is, the control console as the implementation center may carry out malicious behavior, thereby affecting the overall data sharing process. Figure 4In the implementation example, the process of task creation, approval, and execution all needs to go through a centralized control console, which has the risk of centralized malicious behavior. The information of different users is stored on the control console, and all participants need to fully trust the control console. Figure 5 This embodiment requires interaction between the control console and the data proxy gateway, which requires a separate center in addition to the blockchain, making it less than a purely decentralized application (a purely decentralized application has no other center besides the blockchain). Furthermore, all participants must be based on the same blockchain, and data cannot be shared between multiple participants across blockchains.
[0097] To address the above issues, this application provides a blockchain-based data sharing method that can solve the centralization problem and enable data sharing across blockchains. Before introducing this method, we first introduce a data sharing method in a non-cross-blockchain situation, that is, data sharing on the same blockchain. Figure 6 A schematic diagram of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown. The method is executed by multiple servers, each of which corresponds to an independent control console, each of which corresponds to an independent user, and each user can be a data provider or a data user.
[0098] For step ①, taking the example that the user corresponding to server 1 is data provider 620, the control console 1 corresponding to data provider 620 sends the data directory information to the chain node 1 in the blockchain 610. The data directory information includes at least one of the following: data login configuration, database instance name, database name, data table name, etc.
[0099] Data users corresponding to different control consoles learn about data providers through the control consoles, including the data provider's identifier, the provided data directory, etc. In some embodiments, data users learn about data providers by using the data market provided by the control console. The data market can be displayed in the form of a front-end webpage for easy user viewing.
[0100] For step ②, the data user can send a first pre-application task to the control center. This task is used to pre-apply for the data provider's data. The pre-application content includes the pre-application data directory and at least one of the pre-application fields. For example, applying for permission to use the two fields Fname and Fstatus in data directory A.
[0101] In some embodiments, there are one or more data users, server 3 corresponds to the first data user 630 and the first result database 632, and server 4 corresponds to the second data user 640 and the second result database 642. For server 3 and server 4, the execution process of the data sharing task is the same. In the embodiment of this application, server 3 is used as an example for illustration.
[0102] The first data user 630 sends the first pre-application task to the control center 3, and the control center 3 sends the first pre-application task to the chain node 3 (not shown in the figure) in the blockchain 610, and the data provider 620 approves the task.
[0103] In step ③, the data provider 620 approves the first pre-application task. If approved, the pre-application content is submitted to the blockchain 610. When a data user subsequently applies for the pre-application content, the data provider does not need to approve it again. If not approved, the pre-application content is not submitted to the blockchain 610.
[0104] For step ④, the data user creates a data sharing task, which specifies the data provider (only one) and the data user (one or more).
[0105] If all the first pre-application tasks corresponding to each data user are approved, the data provider 620 does not need to approve again; if not all the first pre-application tasks corresponding to each data user are approved, the data provider 620 approves whether the data users related to the data sharing task have the authority to share data.
[0106] For step ⑤, the control center submits the data sharing task to the blockchain 610. Taking the first data user 630 as an example, the control center 3 submits the data sharing task to the chain node 3, and the other chain nodes in the blockchain 610 also save the data sharing task.
[0107] For step ⑥, the data proxy gateway 1 corresponding to the data provider 620 pulls the data sharing tasks related to itself from the blockchain 610.
[0108] For step ⑦, the data proxy gateway 1 performs data sharing task verification on the blockchain 610. If the first pre-application task is approved, step ⑦ can be skipped and step ⑧ can be executed directly.
[0109] When the data sharing task passes the verification, the data proxy gateway 1 executes step ⑧, and pulls the first shared data from the data source database 622 according to the data sharing task. The first shared data is the data required by the data user specified in the data sharing task.
[0110] Regarding step ⑨, taking the first data user 630 as an example, the first shared data is sent to the data proxy gateway 3 through the data proxy gateway 1.
[0111] With respect to step ⑩, after receiving the first shared data, the data proxy gateway 3 writes the first shared data into the first result database 632 .
[0112] Target steps When the first shared data is written into the first result database 632, the data proxy gateway 3 feeds back to the data proxy gateway 1 that the data sharing task is successfully executed (not shown in the figure), and the data proxy gateway 1 updates the execution status of the data sharing task on the blockchain 610 to task success by sending a message of task success to the chain node 1; when the first shared data is not written into the first result database 632, the data proxy gateway 3 feeds back to the data proxy gateway 1 that the data sharing task fails to execute (not shown in the figure), and the data proxy gateway 1 updates the execution status of the data sharing task on the blockchain 610 to task failure by sending a message of task failure to the chain node 1.
[0113] For data sharing across blockchains, this application provides a data sharing method based on blockchain. Figure 7 A schematic diagram of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown, and the method is executed by at least two servers. Figure 7 The solid lines in represent control flow, and the dotted lines represent data flow.
[0114] Figure 7 It includes multiple service chains and one global routing chain 700. Each service chain can be used to represent Figure 6 In the embodiment, the blockchain 610 and the global routing chain 700 are used to transmit information in at least two business chains, including data sharing control instructions between each business chain. The embodiment of the present application does not limit the number of business chains, and only uses three business chains: business chain 1, business chain 2, and business chain 3 as an example. The three business chains can complete data sharing within their own chains. For data sharing methods that do not cross blockchains, refer to Figure 6 The embodiments will not be described in detail here.
[0115] Figure 7 There are 5 servers in total, including server 1 to server 5. The embodiment of this application does not limit the servers related to each business chain. Figure 7 This is an example. The method can be performed by more or fewer servers. The servers include physical servers or cloud servers. The servers are controlled by an organization, enterprise, institution, or other entity. A server includes a control console and multiple data proxy gateways.
[0116] In some embodiments, the data provider 720 in the server 5 sends the first data directory to the business chain 2 through the control console 5. The control console 5 subscribes to (acquires) the first data directory and synchronizes it to the data source database 722. In the case where the first data directory is a data directory that can be shared across blockchains, the data provider 720 also sends it to the global routing chain 700 through the control console 5, for example, to the business chain 2 node 702. The data directory is descriptive information used to describe the data in the database, which can be understood as data index, data identification, and other meanings.
[0117] In some embodiments, each control console obtains all data directories from the global routing chain 700 and synchronizes (stores) them into a local database. Data directories not on the local service chain are also synchronized into the local database. For example, if control console 1 obtains the first data directory from the global routing chain 700, and the first data directory is not on service chain 1, it will synchronize the first data directory into the result database 712.
[0118] In some embodiments, the control console 1 obtains a data directory, which includes a data directory on a local business chain and a data directory on other business chains. The data directory on other business chains is obtained from the global routing chain 700 .
[0119] In some embodiments, when the data user 710 needs to use data, a data directory use application is sent through the control console 1 .
[0120] When the data to be used is data on the local business chain, a data directory use application is sent to the local business chain. For example, data user 710 sends a data directory use application to chain node 11 in business chain 1 through control console 1. For specific implementation details, refer to Figure 6 The embodiments will not be described in detail here.
[0121] When the data to be used is data on other service chains, a data directory use application is sent to the global routing chain 700 , for example, a data directory use application is sent to the service chain 1 node 701 .
[0122] In some embodiments, each control console obtains a data directory usage application from the global routing chain 700 .
[0123] If the data directory corresponding to the data directory usage application is not created by a related object of the business chain related to the control console, the data directory usage application is ignored.
[0124] If the requested data directory was created by an object in a business chain associated with the control center, the control center notifies the object for approval. The approval result is first submitted to the local business chain, and the control center then subscribes to the approval result and synchronizes it to the local database. For cross-blockchain data directory use requests, the approval result is also submitted to the global routing chain 700.
[0125] In some embodiments, for the approval results of the cross-blockchain data directory usage application, each control console will obtain the approval results and synchronize them to their respective local databases.
[0126] For example, data consumer 710 creates a data sharing task requesting the use of data directory A provided by data provider 720. Control console 1 sends this data sharing task to business chain 1 and global routing chain 700. After receiving this data sharing task from business chain 1, data sharing proxy gateway 1 opens firewall 1 to allow data sharing proxy gateway 5 in server 5 to transmit data. In this embodiment of the present application, terms such as data sharing proxy gateway, data proxy gateway, data sharing gateway, shared proxy gateway, proxy gateway, and gateway have the same meaning as gateways.
[0127] The control console 5 in the server 5 subscribes to the data sharing task from the global routing chain 700 and sends it to the service chain 2.
[0128] After receiving the data sharing task from business chain 2, data sharing proxy gateway 5 determines whether to provide the data corresponding to data directory A based on whether data provider 720 permits sharing of data directory A specified in the data sharing task. If the approval result of the data directory use application corresponding to data directory A is approved, data directory A is allowed to be shared. If sharing is allowed, data sharing proxy gateway 5 extracts the data corresponding to data directory A from data source database 722 and sends it to data sharing proxy gateway 1 through firewall 5 and firewall 1. Data sharing proxy gateway 1 synchronizes this data with result database 712.
[0129] In some embodiments, if the data enters the result database 712 , it indicates that the data sharing task is successful; if the data does not enter the result database 712 , it indicates that the data sharing task has failed.
[0130] In some embodiments, after the data sharing proxy gateway 1 updates the task status in the service chain 1, the control console 1 obtains the task status from the service chain 1 and sends it to the global routing chain 700, thereby updating the task status on the global routing chain 700.
[0131] In some embodiments, when the task status of the data sharing task is completed, the data sharing proxy gateway 1 closes the firewall 1 so that the data sharing proxy gateway 1 does not transmit data with other data sharing proxy gateways. The completed status includes task success and task failure.
[0132] In summary, the method provided in this embodiment creates a data sharing task, which is used to apply for a first data directory provided by a second server; sends the data sharing task to the global routing chain and the first business chain, which is used to cross-chain transmit information from at least two business chains, including a first business chain and a second business chain, the first business chain being associated with the first server, and the second business chain being associated with the second server; receives first data corresponding to the first data directory, which is sent by the second server to the first server based on the data sharing task, and the data sharing task is learned by the second server from the global routing chain; and stores the first data in a first database, which is associated with the first server. This improves the connectivity between multiple blockchains, reduces the risk of centralized malicious behavior, and improves the efficiency of data sharing.
[0133] The method provided in this embodiment further improves the security of each server during a period when no data transmission is performed by closing the firewall when the task status of the data sharing task is completed.
[0134] The method provided in this embodiment also reduces the burden on the control center and improves the efficiency of data sharing by using the control center to transmit control information and using the gateway to transmit data.
[0135] Figure 8 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown. The blockchain includes at least two business chains and a global routing chain. The method is executed by a first server and includes:
[0136] Step 810: Create a data sharing task.
[0137] The data sharing task is used to apply for the first data directory provided by the second server.
[0138] In some embodiments, a data directory is descriptive information used to describe data in a database. The data is stored in the database in the form of a data table. The data directory includes at least one of the database IP address, login username, password, table fields, and description of the data table. It can also be understood as a data index, data identifier, or other meanings.
[0139] In some embodiments, the second server sends the first data directory to the global routing chain, and the first server obtains all data directories on the global routing chain, and all data directories include the first data directory required by the first server.
[0140] In some embodiments, the first server creates a data sharing task when it needs to use the first data corresponding to the first data directory.
[0141] Step 820: Send the data sharing task to the global routing chain and the first service chain.
[0142] Among them, the global routing chain is used to transmit information in at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with a first server, and the second business chain is associated with a second server.
[0143] In some embodiments, the global routing chain is used to transmit data sharing control instructions between at least two business chains across the chain.
[0144] In some embodiments, the global routing chain is a blockchain used to facilitate communication between at least two business chains, passing control instructions between at least two business chains without transmitting data.
[0145] In some embodiments, at least two business chains cannot communicate without a global routing chain, and at least two business chains are independent blockchains.
[0146] In some embodiments, the association between the first business chain and the first server means that the first server uploads the data it holds to the first business chain, or obtains the data it needs from the first business chain; the association between the second business chain and the second server means that the second server uploads the data it holds to the second business chain, or obtains the data it needs from the second business chain.
[0147] Step 830: Receive first data corresponding to the first data directory.
[0148] The first data is sent by the second server to the first server based on the data sharing task, and the data sharing task is learned by the second server from the global routing chain.
[0149] In some embodiments, the second server learns about the data sharing task through the global routing chain, and sends the first data to the first server if the first data directory allows sharing.
[0150] Step 840: Store the first data into the first database.
[0151] The first database is associated with the first server.
[0152] In some embodiments, the first database is a local database corresponding to the first server, which may be referred to as a result database.
[0153] In some embodiments, the success of storing the first data into the first database or the failure of storing the first data into the first database both indicate that the data sharing task is completed.
[0154] In summary, the method provided in this embodiment creates a data sharing task, which is used to apply for a first data directory provided by a second server; sends the data sharing task to the global routing chain and the first business chain, which is used to cross-chain transmit information from at least two business chains, including a first business chain and a second business chain, the first business chain being associated with the first server, and the second business chain being associated with the second server; receives first data corresponding to the first data directory, which is sent by the second server to the first server based on the data sharing task, and the data sharing task is learned by the second server from the global routing chain; and stores the first data in a first database, which is associated with the first server. This improves the connectivity between multiple blockchains, reduces the risk of centralized malicious behavior, and improves the efficiency of data sharing.
[0155] Figure 9 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown. The blockchain includes at least two business chains and a global routing chain. The method is executed by a first server and includes:
[0156] Step 810: Create a data sharing task.
[0157] Step 822: Send a data sharing task to the global routing chain and the first service chain through the first control console.
[0158] In some embodiments, the first server includes a first control console and a first gateway, the first control console interacts with the global routing chain and the first service chain, the first gateway interacts with the first service chain, and the first gateway does not interact with the global routing chain.
[0159] In some embodiments, the first control station only transmits control information such as trusted collaboration and task status changes, and does not transmit data. Data sharing related data is transmitted by the gateway between each server, thereby reducing the burden on the first control station.
[0160] For example, in Figure 7 In the example, the first server is server 1, the first control console is control console 1, the first gateway is data sharing agent gateway 1, and the first business chain is business chain 1. Server 1 sends a data sharing task to the global routing chain 700 and business chain 1 through control console 1.
[0161] Step 832: Receive first data corresponding to the first data directory through the first gateway.
[0162] In some embodiments, the second server includes a second gateway, and the first server receives the first data sent by the second server through the second gateway through the first gateway.
[0163] In some embodiments, after the first gateway obtains the data sharing task from the first service chain, it turns on the first firewall. When turned on, the first firewall is used to transmit data between the first gateway and other gateways, for example, to transmit the first data between the first gateway and the second gateway.
[0164] For example, in Figure 7 In the example, the first server is server 1, the first gateway is data sharing proxy gateway 1, the first business chain is business chain 1, the first firewall is firewall 1, and the second server is server 5. Server 1 receives the first data sent by server 5 through data sharing proxy gateway 5 through data sharing proxy gateway 1, and the first data passes through firewall 5 in server 5 and firewall 1 in server 1.
[0165] In some embodiments, the second server includes a second control console and a second gateway. The first data is sent by the second gateway after obtaining the data sharing task on the second business chain. The data sharing task is obtained by the second control console from the global routing chain and then sent to the second business chain.
[0166] The second gateway does not interact with the global routing chain, but only with the second service chain. The second control console receives the data sharing task sent by the first control console from the global routing chain and then sends it to the second service chain. After receiving the data sharing task from the second service chain, the second gateway sends the first data to the first gateway.
[0167] Step 840: Store the first data into the first database.
[0168] In summary, the method provided in this embodiment reduces the burden on the control center and improves the efficiency of data sharing by using the control center to transmit control information and using the gateway to transmit data.
[0169] The method provided in this embodiment also improves the security of each server during the period when no data transmission is performed by setting up a firewall and opening the firewall to allow data to be transmitted between gateways only during the execution of the data sharing task.
[0170] Figure 10 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown. The blockchain includes at least two business chains and a global routing chain. The method is executed by a first server and includes:
[0171] Step 800: Send a first application to the global routing chain.
[0172] The first application is used to apply for authorization to use the first data directory, and may be referred to as a data directory use application.
[0173] In some embodiments, the first server includes a first control console and a first gateway. The first control console interacts with the global routing chain and the first service chain, and the first gateway interacts with the first service chain. The first server obtains all data directories on the global routing chain through the first control console. The data directories include data directories on the first service chain and data directories on other service chains.
[0174] In some embodiments, when the first server needs to use data, it sends a first request through the first control console. If the data to be used is data on the first service chain, the first request is sent to the first service chain; if the data to be used is data on another service chain, the first request is sent to the global routing chain.
[0175] Step 810: Create a data sharing task.
[0176] Step 820: Send the data sharing task to the global routing chain and the first service chain.
[0177] Step 830: Receive first data corresponding to the first data directory.
[0178] In some embodiments, the first data is sent by the second server to the first server based on the data sharing task when the first application is approved.
[0179] In some embodiments, the first server sends the first application to obtain authorization to use the first data directory in advance. After obtaining authorization to use the first data directory, the second server does not need to review and approve the data sharing task and directly sends the first data corresponding to the first data directory to the first server.
[0180] Step 840: Store the first data into the first database.
[0181] Step 850: Obtain the task status of the data sharing task from the global routing chain through the first control console.
[0182] The task status is sent to the global routing chain by the second server.
[0183] In some embodiments, the first server includes a first control console and a first gateway, the first control console interacts with the global routing chain and the first service chain, and the first gateway interacts with the first service chain.
[0184] In some embodiments, the second server includes a second control console and a second gateway, the second control console interacts with the global routing chain and the second service chain, and the second gateway interacts with the second service chain.
[0185] After the first data is stored in the first database, the first gateway feeds back a response message to the second gateway of the second server, indicating that the data sharing task is successful. The second gateway updates the task status of the data sharing task to a successful state based on the response message and uploads it to the second business chain. The second control console subscribes to the success of the data sharing task from the second business chain and sends it to the global routing chain. The first control console obtains the task status of the data sharing task from the global routing chain.
[0186] Step 860: Send the task status to the first business chain through the first control console.
[0187] Step 870: Obtain the task status from the first service chain through the first gateway.
[0188] In some embodiments, the task status includes at least one of a success status, a failure status, and an unfinished status, and the method further includes: if the task status is a success status or a failure status, shutting down the first firewall;
[0189] The first firewall is associated with the first server. When the first firewall is closed, it is used to prevent data from being transmitted between the first gateway and other gateways, for example, it is used to prevent data from being transmitted between the first gateway and the second gateway.
[0190] For example, in Figure 7 In the example, the first server is server 1, the first gateway is data sharing proxy gateway 1, the first business chain is business chain 1, the first firewall is firewall 1, and the second server is server 5. After firewall 1 is closed, data cannot be transmitted between the first gateway and the second gateway.
[0191] In some embodiments, there are multiple data users, and each data user can only know whether the data is stored in its own related database and send the result to the second server. When all data users successfully store the data in the database, it means that the data sharing task is successful.
[0192] by Figure 7 For example, server 1 is the first server, server 5 is the second server, business chain 1 is the first business chain, business chain 5 is the second business chain, data sharing proxy gateway 1 is the first gateway, data sharing proxy gateway 5 is the second gateway, control station 1 is the first control station, and control station 5 is the second control station. Figure 11 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown, and the method includes:
[0193] Step 1101: The data user 710 creates a first application.
[0194] The first application is used to apply for authorization to use the first data directory.
[0195] Step 1102: The first control station 711 adds the first application to the local service chain.
[0196] The first control station 711 uploads the first application to the first service chain 712 .
[0197] Step 1103: The first service chain 712 returns a transaction identifier (Transaction IDentification, TxID).
[0198] The first service chain 712 feeds back a TxID to the first control console 711 for identifying the first application.
[0199] Step 1104: The first control station 711 adds the first application to the global routing chain.
[0200] The first control station 711 uploads the first application to the global routing chain 700 .
[0201] Step 1105: The first service chain 712 returns TxID.
[0202] The global routing chain 700 feeds back a TxID to the first control console 711 for identifying the first application.
[0203] Figure 12 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown, and the method includes:
[0204] Step 1201: The data consumer 710 creates a task.
[0205] The data user 710 needs the data held by the second server, and therefore creates a data sharing task, which applies for the first data directory provided by the second server.
[0206] Step 1202: The first control console 711 performs task preprocessing.
[0207] Before executing the data sharing task, the first control console 711 performs some preprocessing work, including but not limited to the following preprocessing: checking the legitimacy of parameters related to the data sharing task; checking the identity information of all participants; configuring data providers (including the data sharing proxy gateway corresponding to the data provider); configuring the data user list (including the data sharing proxy gateway corresponding to each data user); checking whether the control console has resource permissions; and constructing the data structure of the data sharing task.
[0208] Step 1203: The first control station 711 adds the task to the local service chain.
[0209] The first control console 711 uploads the data sharing task to the first service chain 712 .
[0210] Step 1204: The first service chain 712 returns TxID.
[0211] The first service chain 712 feeds back a TxID to the first control console 711 for identifying the data sharing task.
[0212] Step 1205: The first control station 711 adds the task to the global routing chain.
[0213] The first control console 711 uploads the data sharing task to the global routing chain 700 .
[0214] Step 1206: The global routing chain 700 returns the TxID.
[0215] The global routing chain 700 feeds back a TxID to the first control console 711 for identifying the data sharing task.
[0216] Step 1207: The second control console 721 subscribes to the task from the global routing chain.
[0217] The second control console 721 subscribes to the data sharing task related to the second server to which it belongs from the global routing chain 700 .
[0218] Step 1208: The second control console 721 uploads the task.
[0219] The second control console 721 sends a data sharing task to the second service chain.
[0220] Step 1209: The second control console 721 subscribes to the task and stores it in the local database.
[0221] After the second control console 721 subscribes to the data sharing task, it stores it in the second database.
[0222] Step 1210: The first gateway 713 subscribes to the task to be executed.
[0223] The first gateway 713 subscribes to the data sharing task from the first service chain 712 .
[0224] Step 1211: The first gateway 713 turns on the firewall.
[0225] After the first gateway 713 subscribes to the data sharing task, it opens the firewall to allow data transmission between the second gateway 723 and the first gateway 713 .
[0226] Step 1212: The second gateway 723 subscribes to the task to be executed.
[0227] The second gateway 723 subscribes to the data sharing task from the second service chain 722 .
[0228] Step 1213: The second gateway 723 queries the authorization information.
[0229] After the second gateway 723 subscribes to the data sharing task, it queries the authorization status of the first data directory on the second service chain 722 (ie Figure 11 whether the first application in the embodiment is approved).
[0230] Step 1214: If not authorized, ignore.
[0231] When the authorization status of the first data directory is unauthorized (the first application is not approved), the second gateway 723 ignores the data sharing task.
[0232] Step 1215: If authorized, send data.
[0233] When the authorization status of the first data directory is authorized (the first application is approved), the second gateway 723 sends the first data corresponding to the first data directory to the first gateway 713 .
[0234] In summary, the method provided in this embodiment creates a data sharing task, which is used to apply for a first data directory provided by a second server; sends the data sharing task to the global routing chain and the first business chain, which is used to cross-chain transmit information from at least two business chains, including a first business chain and a second business chain, the first business chain being associated with the first server, and the second business chain being associated with the second server; receives first data corresponding to the first data directory, which is sent by the second server to the first server based on the data sharing task, and the data sharing task is learned by the second server from the global routing chain; and stores the first data in a first database, which is associated with the first server. This improves the connectivity between multiple blockchains, reduces the risk of centralized malicious behavior, and improves the efficiency of data sharing.
[0235] The method provided in this embodiment also determines whether the data directory allows sharing before executing the data sharing task by sending the first application, thereby improving the efficiency of data transmission during the execution of the data sharing task.
[0236] Figure 13 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown. The blockchain includes at least two business chains and a global routing chain. The method is executed by a second server and includes:
[0237] Step 1310: Send the first data directory to the global routing chain and the second service chain.
[0238] Among them, the global routing chain is used to transmit information in at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with the first server, and the second business chain is associated with the second server. The first data directory is the data directory corresponding to the first data held by the second server.
[0239] In some embodiments, the data directory is descriptive information used to describe the data in the database. The data is stored in the database in the form of a data table. The data directory includes at least one of the database's IP address, login username, password, table fields and descriptions of the data table.
[0240] In some embodiments, if the first data directory is a data directory that allows cross-blockchain sharing, the first data directory is sent to the global routing chain and the second business chain; if the first data directory is a data directory that does not allow cross-blockchain sharing, the first data directory is sent to the second business chain.
[0241] In some embodiments, the global routing chain is used to transmit data sharing control instructions between at least two business chains across the chain.
[0242] In some embodiments, the global routing chain is a blockchain used to facilitate communication between at least two business chains, passing control instructions between at least two business chains without transmitting data.
[0243] In some embodiments, at least two business chains cannot communicate without a global routing chain, and at least two business chains are independent blockchains.
[0244] In some embodiments, the association between the first business chain and the first server means that the first server uploads the data it holds to the first business chain, or obtains the data it needs from the first business chain; the association between the second business chain and the second server means that the second server uploads the data it holds to the second business chain, or obtains the data it needs from the second business chain.
[0245] Step 1320: Acquire data sharing tasks on the global routing chain.
[0246] The data sharing task is sent by the first server to the global routing chain and the first service chain when applying for the first data directory.
[0247] In some embodiments, the first server obtains all data directories on the global routing chain, including a first data directory required by the first server. When the first server needs to use the first data corresponding to the first data directory, the first server creates a data sharing task.
[0248] Step 1330: Based on the data sharing task, send the first data to the first server.
[0249] In some embodiments, when the first data directory allows sharing, the second server extracts the first data from the corresponding second database and sends the first data to the first server.
[0250] In summary, the method provided in this embodiment improves connectivity between multiple blockchains, reduces the risk of centralized malicious behavior, and improves data sharing efficiency by sending a first data directory to a global routing chain and a second business chain. The global routing chain is used to transmit information from at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with a first server, and the second business chain is associated with a second server. The first data directory is the data directory corresponding to the first data held by the second server. The method also obtains a data sharing task on the global routing chain. The data sharing task is sent to the global routing chain and the first business chain by the first server when applying for the first data directory. Based on the data sharing task, the first data is sent to the first server.
[0251] Figure 14 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown. The blockchain includes at least two business chains and a global routing chain. The method is executed by a second server and includes:
[0252] Step 1310: Send the first data directory to the global routing chain and the second service chain.
[0253] In some embodiments, the second server includes a second control console and a second gateway, and sends the data directory to the global routing chain and the second service chain. Figure 15 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown, and the method includes:
[0254] Step 1501: The second control station 721 performs pre-processing before sending.
[0255] Before sending the first data directory, the second control console 721 needs to perform some preprocessing, including but not limited to the following preprocessing: creating a data connection with the data provider 720; obtaining the second database table structure; filling in the database field description; checking the legitimacy and permissions of parameters related to the data directory.
[0256] Step 1502: The second control console 721 adds the data directory to the local business chain.
[0257] The second control console 721 sends the first data directory to the second service chain 722 .
[0258] Step 1503: The second service chain 722 returns TxID.
[0259] The second service chain 722 feeds back a TxID to the second control console 721 for identifying the first data directory.
[0260] Step 1504: The second control console 721 feeds back corresponding information.
[0261] The second control console 721 feeds back corresponding information to the data provider 720 , including information that the first data directory has been uploaded to the second business chain 722 .
[0262] Step 1505: The second control console 721 subscribes to the data directory creation information from the local service chain.
[0263] The second control console 721 continuously detects the data directory creation information on the second service chain 722 and obtains the data directory creation information, where the data directory creation information is used to indicate information about the data directory created by the server.
[0264] Step 1506: The second control console 721 synchronizes the data directory to the local database.
[0265] The second control console 721 stores the data directory related to the data directory creation information in the second database.
[0266] Step 1507: The second control station 721 adds the data directory to the global routing chain.
[0267] The second control console 721 sends the first data directory to the global routing chain 700 .
[0268] Step 1508: The global routing chain returns TxID.
[0269] The global routing chain 700 feeds back a TxID to the second control console 721 for identifying the first data directory.
[0270] Step 1509: The second control console 721 subscribes to the data directory creation information from the global routing chain.
[0271] The second control console 721 subscribes to data directory creation information of non-business chains from the global routing chain. These data directory creation information are created by servers related to other business chains.
[0272] Step 1510: The second control console 721 synchronizes the data directory to the local database.
[0273] The second control console 721 stores the data directory related to the data directory creation information of the non-business chain into the second database.
[0274] Step 1322: Obtain the data sharing task on the global routing chain through the second control console.
[0275] The second server includes a second control console and a second gateway. The second control console interacts with the global routing chain and the second service chain, and the second gateway interacts with the second service chain.
[0276] In some embodiments, the second control console only transmits control information such as trusted collaboration and task status changes, and does not transmit data. Data sharing related data is transmitted by the gateway between each server, thereby reducing the burden on the second control console.
[0277] Step 1324: Send the data sharing task to the second business chain through the second control console.
[0278] Step 1326: Obtain the data sharing task on the second service chain through the second gateway.
[0279] In some embodiments, after obtaining the data sharing task, the second server verifies whether the first data directory related to the data sharing task is allowed to be shared. If sharing is allowed, step 1332 is executed; if sharing is not allowed, the data sharing task is ignored.
[0280] Step 1332: Based on the data sharing task, the first data is sent to the first gateway through the second gateway.
[0281] The first server includes a first gateway, the second server includes a second gateway, the first gateway interacts with the first service chain, and the second gateway interacts with the second service chain.
[0282] In some embodiments, after acquiring the data sharing task, the second gateway opens a second firewall corresponding to the second gateway to allow data transmission between the second gateway and the first gateway.
[0283] In summary, the method provided in this embodiment improves connectivity between multiple blockchains, reduces the risk of centralized malicious behavior, and improves data sharing efficiency by sending a first data directory to a global routing chain and a second business chain. The global routing chain is used to transmit information from at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with a first server, and the second business chain is associated with a second server. The first data directory is the data directory corresponding to the first data held by the second server. The method also obtains a data sharing task on the global routing chain. The data sharing task is sent to the global routing chain and the first business chain by the first server when applying for the first data directory. Based on the data sharing task, the first data is sent to the first server.
[0284] The method provided in this embodiment also reduces the burden on the control center and improves the efficiency of data sharing by using the control center to transmit control information and using the gateway to transmit data.
[0285] Figure 16 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown. The blockchain includes at least two business chains and a global routing chain. The method is executed by a second server and includes:
[0286] Step 1310: Send the first data directory to the global routing chain and the second service chain.
[0287] Step 1315: Obtain the first application on the global routing chain.
[0288] The first application is used by the first server to apply for authorization to use the first data directory, and may be referred to as a data directory use application.
[0289] In some embodiments, the first server includes a first control console and a first gateway. The first control console interacts with the global routing chain and the first service chain, and the first gateway interacts with the first service chain. The first server obtains all data directories on the global routing chain through the first control console. The data directories include data directories on the first service chain and data directories on other service chains.
[0290] In some embodiments, when a first server needs to use data, it sends a first request through the first control console. When the data to be used is data on the first service chain, the first request is sent to the first service chain; when the data to be used is data on another service chain, the first request is sent to the global routing chain. For example, when the data to be used is the first data on the second service chain, the first request is sent to the global routing chain, so that the second server obtains the first request on the global routing chain.
[0291] Step 13161: When the first application is approved, the first approval result of the first application is sent to the global routing chain.
[0292] In some embodiments, when the first application is approved, a first approval result is sent to the global routing chain, where the first approval result indicates that the first application is approved and the first data directory is allowed to be shared with the first server.
[0293] Step 13162: If the first application is not approved, the second approval result of the first application is sent to the global routing chain.
[0294] In some embodiments, if the first application is not approved, a second approval result is sent to the global routing chain, and the second approval result indicates that the first application is not approved and the first data directory is not allowed to be shared with the first server.
[0295] Step 1320: Acquire data sharing tasks on the global routing chain.
[0296] Step 1334: When the first application is approved, the first data is sent to the first server based on the data sharing task.
[0297] In some embodiments, the second server includes a second gateway and the first server includes a first gateway. After the second server obtains the data sharing task, since the first application is approved, that is, the first data directory is allowed to be shared with the first server, the second server sends the first data to the first gateway through the second gateway.
[0298] Regarding the approval of the first application, Figure 17 A flowchart of a blockchain-based data sharing method provided by an exemplary embodiment of the present application is shown, and the method includes:
[0299] Step 1701: The second control station 721 subscribes to a data directory usage application from the global routing chain.
[0300] The second control console 721 subscribes to a data directory usage application from the global routing chain 700 . The data directory usage application is not created by the second server, such as the first application.
[0301] Step 1702: The second control console 721 synchronizes the data directory usage application to the local database.
[0302] The second control console 721 stores the data directory use application in the second database.
[0303] Step 1703: If the data directory use application does not require approval by the data provider 720, the data directory use application is ignored.
[0304] If the data directory corresponding to the data directory use request is unrelated to the data held by the second server, the data directory use request is ignored.
[0305] Step 1704: If the application for using the data directory requires approval from the data provider 720, notify the data provider 720 for approval.
[0306] If the data directory corresponding to the data directory usage application is related to the data held by the second server, such as the first application, then the data provider is notified 720 for approval.
[0307] Step 1705: The data provider 720 sends the approval result.
[0308] After the data provider 720 approves the application for using the data directory, it sends the approval result of the application to the second control station 721, indicating whether the application is approved or not.
[0309] Step 1706: The second control station 721 uploads the approval result to the local business chain.
[0310] The second control console 721 sends the approval result to the second service chain 722 .
[0311] Step 1707: The second service chain 722 returns TxID.
[0312] The second service chain 722 feeds back a TxID to the second control console 721 for identifying the approval result.
[0313] Step 1708: The second control console 721 subscribes to the approval result from the local business chain.
[0314] The second control console 721 subscribes to the approval result from the second business chain 722 .
[0315] Step 1709: The second control console 721 synchronizes the approval result to the local database.
[0316] The second control station 721 stores the approval result in the second database.
[0317] Step 1710: The second control station 721 uploads the approval result to the global routing chain.
[0318] The second control console 721 sends the approval result to the global routing chain 700 .
[0319] Step 1711: The global routing chain returns TxID.
[0320] The global routing chain 700 feeds back a TxID to the second control console 721 for identifying the approval result.
[0321] Step 1712: The first control station 711 subscribes to the approval result from the global routing chain.
[0322] The first control console 711 subscribes to the approval result from the global routing chain 700 , and the approval result is used to indicate whether the first data directory corresponding to the first application is allowed to be shared.
[0323] Step 1713: The first control console 711 synchronizes the approval result to the local database.
[0324] The first control station 711 stores the approval result in the first database.
[0325] In summary, the method provided in this embodiment improves connectivity between multiple blockchains, reduces the risk of centralized malicious behavior, and improves data sharing efficiency by sending a first data directory to a global routing chain and a second business chain. The global routing chain is used to transmit information from at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with a first server, and the second business chain is associated with a second server. The first data directory is the data directory corresponding to the first data held by the second server. The method also obtains a data sharing task on the global routing chain. The data sharing task is sent to the global routing chain and the first business chain by the first server when applying for the first data directory. Based on the data sharing task, the first data is sent to the first server.
[0326] The method provided in this embodiment also determines whether the data directory allows sharing before executing the data sharing task by obtaining the first application, thereby improving the efficiency of data transmission during the execution of the data sharing task.
[0327] In the above embodiment, steps with the same sequence number can be considered as the same step. Figure 8 Corresponding embodiments, Figure 9 Corresponding embodiments, Figure 10 Corresponding embodiments, Figure 13 Corresponding embodiments, Figure 14 The corresponding embodiments and Figure 16 The corresponding embodiments can be implemented individually or in combination, and this application does not limit this.
[0328] Figure 18 A block diagram of a blockchain-based data sharing device provided by an exemplary embodiment of the present application is shown. The device can be implemented as a first server, or as part of a first server, through software or hardware or a combination of both. The blockchain includes at least two business chains and a global routing chain. The device includes at least one of a processing module 1810, a sending module 1820, a receiving module 1830 and a storage module 1840.
[0329] Processing module 1810 is used to create a data sharing task, where the data sharing task is used to apply for a first data directory provided by the second server;
[0330] A sending module 1820 is configured to send a data sharing task to a global routing chain and a first business chain. The global routing chain is configured to transmit information from at least two business chains across the chain. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with a blockchain-based data sharing device, and the second business chain is associated with a second server.
[0331] a receiving module 1830 configured to receive first data corresponding to a first data directory, where the first data is sent by the second server to the first server based on a data sharing task, where the data sharing task is learned by the second server from a global routing chain;
[0332] The storage module 1840 is used to store the first data in a first database, where the first database is associated with the blockchain-based data sharing device.
[0333] In one possible design of this embodiment, the blockchain-based data sharing device includes a first control console and a first gateway, and a sending module 1820 for sending a data sharing task to the global routing chain and the first service chain through the first control console;
[0334] The receiving module 1830 is configured to receive first data corresponding to the first data directory through the first gateway;
[0335] The first control console interacts with the global routing chain and the first service chain, and the first gateway interacts with the first service chain.
[0336] In a possible design of this embodiment, the second server includes a second control console and a second gateway. The first data is sent by the second gateway after obtaining the data sharing task on the second business chain. The data sharing task is obtained by the second control console from the global routing chain and then sent to the second business chain.
[0337] In one possible design of this embodiment, the blockchain-based data sharing device includes a first control console and a first gateway, and a receiving module 1830 is configured to obtain the task status of the data sharing task from the global routing chain through the first control console, where the task status is sent to the global routing chain by the second server;
[0338] A sending module 1820 is configured to send the task status to the first service chain via the first control console;
[0339] The receiving module 1830 is configured to obtain the task status from the first service chain via the first gateway.
[0340] In a possible design of this embodiment, the task status includes at least one of a success status, a failure status, and an unfinished status. The processing module 1810 is configured to shut down the first firewall when the task status is a success status or a failure status.
[0341] The first firewall is associated with a blockchain-based data sharing device, and when closed, the first firewall is used to prevent data from being transmitted between the first gateway and other gateways.
[0342] In a possible design of this embodiment, the sending module 1820 is used to send a first application to the global routing chain, where the first application is used to apply for authorization to use the first data directory.
[0343] In this embodiment, the sending module 1820 can be split into multiple sending modules, such as a first sending module, a second sending module, and a third sending module. The first sending module is used to send a data sharing task to the global routing chain and the first business chain, the second sending module is used to send the task status to the first business chain through the first control console, and the third sending module is used to send the first application to the global routing chain; or the first sending module is used to send the task status to the first business chain through the first control console, the second sending module is used to send the first application to the global routing chain, and the third sending module is used to send the data sharing task to the global routing chain and the first business chain; or the first sending module is used to send the first application to the global routing chain, the second sending module is used to send the data sharing task to the global routing chain and the first business chain, and the third sending module is used to send the task status to the first business chain through the first control console. This embodiment does not limit the functions of different sending modules.
[0344] In this embodiment, the receiving module 1830 can be split into multiple receiving modules, such as a first receiving module, a second receiving module, and a third receiving module. The first receiving module is used to receive the first data corresponding to the first data directory, the second receiving module is used to obtain the task status of the data sharing task from the global routing chain through the first control console, and the third receiving module is used to obtain the task status from the first business chain through the first gateway; or the first receiving module is used to obtain the task status of the data sharing task from the global routing chain through the first control console, the second receiving module is used to obtain the task status from the first business chain through the first gateway, and the third receiving module is used to receive the first data corresponding to the first data directory; or the first receiving module is used to obtain the task status from the first business chain through the first gateway, the second receiving module is used to receive the first data corresponding to the first data directory, and the third receiving module is used to obtain the task status of the data sharing task from the global routing chain through the first control console. This embodiment does not limit the functions of different receiving modules.
[0345] This embodiment is described by taking one sending module 1820 and one receiving module 1830 as an example, and the number of the sending modules 1820 and the receiving modules 1830 is not limited.
[0346] For an introduction to the functions of the processing module 1810, please refer to Figure 8 The content of step 810 in the embodiment;
[0347] For an introduction to the functions of the sending module 1820, please refer to Figure 8 The content of step 820 in the embodiment, Figure 9The content of step 822 in the embodiment, Figure 10 The contents of step 800 and step 860 in the embodiment.
[0348] For an introduction to the functions of the receiving module 1830, please refer to Figure 8 The content of step 830 in the embodiment, Figure 9 The content of step 832 in the embodiment, Figure 10 The contents of step 850 and step 870 in the embodiment.
[0349] For an introduction to the functions of the storage module 1840, please refer to Figure 8 The content of step 840 in the embodiment.
[0350] Figure 19 A block diagram of a blockchain-based data sharing device provided by an exemplary embodiment of the present application is shown. The device can be implemented as a second server, or as part of a second server, through software or hardware or a combination of both. The blockchain includes at least two business chains and a global routing chain. The device includes at least one of a sending module 1910 and a receiving module 1920.
[0351] Sending module 1910, configured to send the first data directory to the global routing chain and the second business chain. The global routing chain is configured to transmit information in at least two business chains across chains. The at least two business chains include a first business chain and a second business chain. The first business chain is associated with the first server, and the second business chain is associated with a blockchain-based data sharing device. The first data directory is a data directory corresponding to the first data held by the blockchain-based data sharing device.
[0352] The receiving module 1920 is configured to obtain a data sharing task on the global routing chain, where the data sharing task is sent by the first server to the global routing chain and the first service chain when applying for the first data directory.
[0353] The sending module 1910 is configured to send the first data to the first server based on the data sharing task.
[0354] In a possible design of this embodiment, the second server includes a second control console and a second gateway, and the receiving module 1920 is configured to obtain the data sharing task on the global routing chain through the second control console;
[0355] A sending module 1910 is configured to send the data sharing task to the second service chain via the second control console;
[0356] A receiving module 1920 is configured to obtain a data sharing task on a second service chain through a second gateway;
[0357] The second control console interacts with the global routing chain and the second service chain, and the second gateway interacts with the second service chain.
[0358] In a possible design of this embodiment, the first server includes a first gateway, the second server includes a second gateway, and the sending module 1910 is configured to send the first data to the first gateway via the second gateway based on the data sharing task;
[0359] The first gateway interacts with the first service chain, and the second gateway interacts with the second service chain.
[0360] In a possible design of this embodiment, the receiving module 1920 is further configured to obtain a first application on the global routing chain, where the first application is used by the first server to apply for authorization to use the first data directory.
[0361] The sending module 1910 is further configured to send a first approval result of the first application to the global routing chain if the first application is approved; and send a second approval result of the first application to the global routing chain if the first application is not approved.
[0362] In this embodiment, the sending module 1910 can be divided into multiple sending modules, such as a first sending module, a second sending module, and a third sending module. The first sending module is used to send the first data directory to the global routing chain and the second service chain. The second sending module is used to send the first data to the first server based on the data sharing task. The third sending module is used to send the first approval result of the first application to the global routing chain if the first application is approved; and send the second approval result of the first application to the global routing chain if the first application is rejected. Alternatively, the first sending module is used to send the first data to the first server based on the data sharing task. The second sending module is used to send the first approval result of the first application to the global routing chain if the first application is approved; and send the second approval result of the first application to the global routing chain if the first application is rejected. The third sending module is used to send the first data directory to the global routing chain and the second service chain. Alternatively, the first sending module is used to send the first approval result of the first application to the global routing chain if the first application is approved; and send the second approval result of the first application to the global routing chain if the first application is rejected. The second sending module is used to send the first data directory to the global routing chain and the second service chain. The third sending module is used to send the first data to the first server based on the data sharing task. This embodiment does not limit the functions of the different sending modules.
[0363] In this embodiment, the receiving module 1920 can be divided into multiple receiving modules, such as a first receiving module and a second receiving module. The first receiving module is used to obtain a data sharing task on the global routing chain, and the second receiving module is used to obtain a first application on the global routing chain; or the first receiving module is used to obtain a first application on the global routing chain, and the second receiving module is used to obtain a data sharing task on the global routing chain. This embodiment does not limit the functions of different receiving modules.
[0364] This embodiment is described by taking one sending module 1910 and one receiving module 1920 as an example, and the number of the sending modules 1910 and the receiving modules 1920 is not limited.
[0365] This embodiment is described by taking one sending module 1910 and one receiving module 1920 as an example, and the number of the sending modules 1910 and the receiving modules 1920 is not limited.
[0366] For an introduction to the functions of the sending module 1910, please refer to Figure 13 The contents of step 1310 and step 1330 in the embodiment, Figure 14 The contents of step 1324 and step 1332 in the embodiment, Figure 16 The contents of step 13161, step 13162 and step 1334 in the embodiment.
[0367] For an introduction to the functions of the receiving module 1920, please refer to Figure 13 The content of step 1320 in the embodiment, Figure 14 The contents of step 1322 and step 1326 in the embodiment, Figure 16 The content of step 1315 in the embodiment.
[0368] An embodiment of the present application also provides a first server or a second server, which includes: a processor and a memory, wherein at least one program is stored in the memory; the processor is used to execute at least one program in the memory to implement the blockchain-based data sharing method provided by the above-mentioned method embodiments.
[0369] Figure 20 FIG2 is a block diagram of a first server or a second server 2000 provided by an exemplary embodiment of the present application. Generally, the first server or the second server 2000 includes: a processor 2001 and a memory 2002 .
[0370] The processor 2001 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 2001 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 2001 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 2001 may include a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 2001 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0371] Memory 2002 may include one or more computer-readable storage media, which may be non-transitory. Memory 2002 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in memory 2002 is used to store at least one instruction, which is executed by processor 2001 to implement the blockchain-based data sharing method provided in the method embodiment of this application.
[0372] In some embodiments, the first server or the second server 2000 may further optionally include an input interface 2003 and an output interface 2004. The processor 2001, the memory 2002, and the input interface 2003 and the output interface 2004 may be connected via a bus or signal lines. Each peripheral device may be connected to the input interface 2003 and the output interface 2004 via a bus, signal lines, or a circuit board. The input interface 2003 and the output interface 2004 may be used to connect at least one input / output-related peripheral device to the processor 2001 and the memory 2002. In some embodiments, the processor 2001, the memory 2002, and the input interface 2003 and the output interface 2004 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 2001, the memory 2002, and the input interface 2003 and the output interface 2004 may be implemented on a separate chip or circuit board, which is not limited in this embodiment of the present application.
[0373] Those skilled in the art will appreciate that the structure shown above does not limit the first server or the second server 2000 , and may include more or fewer components than shown, or combine certain components, or adopt a different component arrangement.
[0374] In an exemplary embodiment, a chip is also provided, which includes a programmable logic circuit and / or program instructions. When the chip runs on the first server or the second server 2000, it is used to implement the blockchain-based data sharing method provided in the embodiment of the present application.
[0375] In an exemplary embodiment, a computer program product is also provided, comprising computer instructions stored in a computer-readable storage medium. A processor reads the computer instructions from the computer-readable storage medium, and the processor reads and executes the computer instructions from the computer-readable storage medium to implement the blockchain-based data sharing method provided in an embodiment of the present application.
[0376] In an exemplary embodiment, a computer-readable storage medium is also provided, in which at least one program is stored. The at least one program is loaded and executed by a processor to implement the blockchain-based data sharing method provided in an embodiment of the present application.
[0377] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program instructing the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.
[0378] Those skilled in the art will appreciate that in one or more of the above examples, the functions described in the embodiments of the present application can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any media that facilitates the transmission of computer programs from one place to another. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0379] The above are merely optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A data sharing method based on blockchain, characterized in that: The blockchain includes at least two business chains and a global routing chain. The method is executed by a first server, and the method includes: Creating a data sharing task, wherein the data sharing task is used to apply for a first data directory provided by the second server; Sending the data sharing task to the global routing chain and the first service chain, where the global routing chain is used to transmit information in the at least two service chains across chains, where the at least two service chains include the first service chain and the second service chain, where the first service chain is associated with the first server, and the second service chain is associated with the second server; receiving first data corresponding to the first data directory, where the first data is sent by the second server to the first server based on the data sharing task, and the data sharing task is learned by the second server from the global routing chain; The first data is stored in a first database, and the first database is associated with the first server.
2. The method according to claim 1, characterized in that The first server includes a first control console and a first gateway, and sending the data sharing task to the global routing chain and the first service chain includes: Sending the data sharing task to the global routing chain and the first service chain through the first control console; The receiving the first data corresponding to the first data directory includes: receiving, through the first gateway, first data corresponding to the first data directory; The first control console interacts with the global routing chain and the first service chain, and the first gateway interacts with the first service chain.
3. The method according to claim 2, characterized in that The second server includes a second control console and a second gateway. The first data is sent by the second gateway after obtaining the data sharing task on the second business chain. The data sharing task is obtained by the second control console from the global routing chain and then sent to the second business chain.
4. The method according to any one of claims 1 to 3, characterized in that: The first server includes a first control console and a first gateway. After storing the first data in the first database, the method further includes: Obtaining the task status of the data sharing task from the global routing chain through the first control console, wherein the task status is sent to the global routing chain by the second server; Sending the task status to the first service chain through the first control console; The task status is obtained from the first service chain through the first gateway.
5. The method according to claim 4, characterized in that The task status includes at least one of a success status, a failure status, and an unfinished status. The method further includes: When the task status is the success status or the failure status, shutting down the first firewall; The first firewall is associated with the first server, and when closed, the first firewall is used to prevent data from being transmitted between the first gateway and other gateways.
6. The method according to any one of claims 1 to 3, characterized in that: Before creating the data sharing task, the method further includes: A first application is sent to the global routing chain, where the first application is used to apply for authorization to use the first data directory.
7. A data sharing method based on blockchain, characterized in that: The blockchain includes at least two business chains and a global routing chain. The method is executed by a second server, and the method includes: Sending the first data directory to the global routing chain and the second service chain, where the global routing chain is used to transmit information in the at least two service chains across the chain, where the at least two service chains include a first service chain and a second service chain, where the first service chain is associated with a first server, and the second service chain is associated with the second server, and where the first data directory is a data directory corresponding to the first data held by the second server; Acquire a data sharing task on the global routing chain, where the data sharing task is sent by the first server to the global routing chain and the first service chain when applying for the first data directory; Based on the data sharing task, the first data is sent to the first server.
8. The method according to claim 7, characterized in that The second server includes a second control console and a second gateway, and obtaining the data sharing task on the global routing chain includes: Obtaining the data sharing task on the global routing chain through the second control console; Sending the data sharing task to the second service chain through the second control console; Obtaining the data sharing task on the second service chain through the second gateway; The second control console interacts with the global routing chain and the second service chain, and the second gateway interacts with the second service chain.
9. The method according to claim 7, characterized in that The first server includes a first gateway, the second server includes a second gateway, and sending the first data to the first server based on the data sharing task includes: Based on the data sharing task, sending the first data to the first gateway through the second gateway; The first gateway interacts with the first service chain, and the second gateway interacts with the second service chain.
10. The method according to claim 7, characterized in that Before acquiring the data sharing task on the global routing chain, the method further includes: Obtaining a first application on the global routing chain, where the first application is used by the first server to apply for authorization to use the first data directory; If the first application is approved, sending a first approval result of the first application to the global routing chain; If the first application is not approved, a second approval result of the first application is sent to the global routing chain.
11. A data sharing device based on blockchain, characterized in that: The blockchain includes at least two business chains and one global routing chain, and the device includes: a processing module, configured to create a data sharing task, wherein the data sharing task is used to apply for a first data directory provided by the second server; a sending module, configured to send the data sharing task to the global routing chain and the first business chain, wherein the global routing chain is configured to transmit information in the at least two business chains across chains, wherein the at least two business chains include the first business chain and the second business chain, wherein the first business chain is associated with the blockchain-based data sharing device, and the second business chain is associated with the second server; a receiving module, configured to receive first data corresponding to the first data directory, where the first data is sent by the second server to the first server based on the data sharing task, and the data sharing task is learned by the second server from the global routing chain; A storage module is used to store the first data in a first database, and the first database is associated with the blockchain-based data sharing device.
12. A data sharing device based on blockchain, characterized in that: The blockchain includes at least two business chains and one global routing chain, and the device includes: a sending module, configured to send a first data directory to the global routing chain and the second service chain, wherein the global routing chain is configured to transmit information in the at least two service chains across chains, wherein the at least two service chains include a first service chain and a second service chain, wherein the first service chain is associated with a first server, and the second service chain is associated with the blockchain-based data sharing device, and wherein the first data directory is a data directory corresponding to the first data held by the blockchain-based data sharing device; a receiving module, configured to obtain a data sharing task on the global routing chain, wherein the data sharing task is sent by the first server to the global routing chain and the first service chain when applying for the first data directory; A sending module is used to send the first data to the first server based on the data sharing task.
13. A first server, characterized in that: The first server includes: a processor and a memory, wherein the memory stores at least one program; the processor is used to execute the at least one program in the memory to implement the blockchain-based data sharing method as described in any one of claims 1 to 6.
14. A second server, characterized in that: The second server includes: a processor and a memory, wherein the memory stores at least one program; the processor is used to execute the at least one program in the memory to implement the blockchain-based data sharing method as described in any one of claims 7 to 10.
15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one program, which is loaded and executed by a processor to implement the blockchain-based data sharing method according to any one of claims 1 to 6, or the blockchain-based data sharing method according to any one of claims 7 to 10.