Data access method and device applied to blockchain
By using the corresponding relationship between channels and data and the binding relationship between membership on the blockchain, data access isolation is achieved, and the problems of insecure and inefficiency of data access on the blockchain are solved, and data security and reading are improved Efficiency.
Patent Information
- Application Number
- CN202011498966.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-17
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2040-12-17
AI Technical Summary
When data access on the blockchain is not isolated, the remittance business data and customer information of participating members are easily stolen. The existing channel data encryption method requires frequent switching of channels, resulting in low data reading efficiency and insufficient security.
Through the corresponding relationship between channels and data and the binding relationship between membership in the blockchain, participating members are allowed to access data from channels with access rights, decrypt and send data using the secret key, and set the corresponding relationship between channels and membership to Implement data access isolation and simplify read operations.
It realizes data access isolation, improves the security and reading efficiency of data on the blockchain, avoids the need for frequent switching channels, and simplifies the data reading operations of participating members.
Smart Images

Figure CN112613866B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the field of blockchain technology, and more specifically, relates to a data access method, device, system, and medium applied to blockchain. Background Art
[0002] The public and tamper-proof nature of blockchain technology makes decentralized trust mechanisms possible and has the potential to change the infrastructure of industries such as finance. Multiple banks in different countries can directly connect through blockchain and share data on remittance messages and remittance results on the chain.
[0003] However, if the data on the blockchain is not isolated for access, all participants on the chain can read the remittance message information sent and received between the parties on the chain, and the remittance business data and customer information between banks are at risk of being stolen and used by peers. Take inter-bank remittance as an example. When a customer of Bank A initiates a remittance to a customer of Bank B, Bank A organizes the remittance message after receiving the request, adds a new message on the chain through the smart contract, and Bank B queries the smart contract message uploaded by A on the chain, performs clearing processing and uploads the remittance message processing results. However, if the information is not isolated, Banks C and D can also query the message information uploaded by A on the chain to B. Then Banks C and D will have the detailed transaction information of the remittance between Banks A and B, and the information about the customers and fund transactions of the two parties of the remittance cannot be guaranteed to be information security, and can be easily stolen by Banks C and D.
[0004] In the related art, data access isolation can be achieved through channel data encryption. However, this channel data encryption can only be used one-to-one by participating members. If a participant has a cooperative relationship with multiple members, it is necessary to constantly switch channels to read data. Summary of the invention
[0005] In view of this, the embodiments of the present disclosure provide a data access method, device, system, and medium that can achieve access isolation and enable participating members to read on-chain data normally without frequently switching channels.
[0006] One aspect of the disclosed embodiment provides a data access method, which is applied to a blockchain. The method includes: receiving a data query request initiated by a first participating member, the data query request includes information of M first data to be queried, where M is an integer greater than or equal to 1; based on the correspondence between channels and data in the blockchain, determining the N first channels where the M first data are located, where N is an integer and 1≤N≤M; and based on the binding relationship between channels and member identities in the blockchain, allowing the first participating member to access data from the channels in the N first channels to which the first participating member has access rights, where the binding relationship between channels and member identities is information used to limit the channels to which each participating member has access rights.
[0007] According to an embodiment of the present disclosure, allowing the first participating member to access data from a channel among the N first channels to which the first participating member has access rights includes: determining, based on a binding relationship between the channel and member identity, accessible channels among the N first channels to which the first participating member has access rights, to obtain an accessible channel set; and when the accessible channel set is not an empty set, allowing the first participating member to access data from each of the accessible channels in the accessible channel set.
[0008] According to an embodiment of the present disclosure, allowing the first participating member to access data from each of the accessible channels in the accessible channel set includes: obtaining the secret key of the accessible channel based on the correspondence between the channel and the secret key in the blockchain; decrypting the encrypted first data stored in the accessible channel using the secret key of the accessible channel; and sending the decrypted first data to the first participating member.
[0009] According to an embodiment of the present disclosure, the method also includes setting a corresponding relationship between the channel and the secret key in the blockchain.
[0010] According to an embodiment of the present disclosure, the method further includes recording a correspondence between the first data and the first channel in a correspondence between the channel and the data when the first data is uploaded to the first channel.
[0011] According to an embodiment of the present disclosure, the method also includes: receiving a data upload request initiated by a second participating member, the data upload request including uploading the first data to a specified first channel; and based on the binding relationship between the channel and the member identity, uploading and storing the first data to the first channel when the second participating member has access rights to the first channel.
[0012] According to an embodiment of the present disclosure, the method further includes: allocating S channels for access isolation in the blockchain, where S is an integer greater than or equal to N, and one of the first channels is one of the S channels; and setting a binding relationship between the channel and the membership.
[0013] Another aspect of the disclosed embodiment provides a data access device, which is arranged in a blockchain node. The device includes a receiving module, a determining module, and an access module. The receiving module is used to receive a data query request initiated by a first participating member, and the data query request includes information of M first data to be queried, where M is an integer greater than or equal to 1. The determining module is used to determine the N first channels where the M first data are located based on the correspondence between the channels and the data in the blockchain, where N is an integer and 1≤N≤M. The access module is used to allow the first participating member to access data from the channels of the N first channels to which the first participating member has access rights based on the binding relationship between the channels and the membership in the blockchain, and the binding relationship between the channels and the membership is information used to limit the channels to which each participating member has access rights.
[0014] According to an embodiment of the present disclosure, the device further includes a relationship setting module. The relationship setting module is used to set the corresponding relationship between the channel and the secret key in the blockchain.
[0015] According to an embodiment of the present disclosure, the relationship setting module is further used to record the correspondence between the first data and the first channel in the correspondence between the channel and the data when the first data is uploaded to the first channel.
[0016] According to an embodiment of the present disclosure, the access module is also used to receive a data upload request initiated by a second participating member, the data upload request includes uploading the first data to a specified first channel, and based on the binding relationship between the channel and the member identity, uploading and storing the first data to the first channel when the second participating member has access rights to the first channel.
[0017] According to an embodiment of the present disclosure, the device further includes a channel allocation module. The channel allocation module is used to allocate S channels for access isolation in the blockchain, where S is an integer greater than or equal to N, and one of the first channels is one of the S channels. The relationship setting module is also used to set the binding relationship between the channel and the membership.
[0018] Another aspect of the embodiment of the present disclosure provides a data access system, which is set in a blockchain node. The data access system includes one or more memories and one or more processors. The memory stores executable instructions. The processor executes the executable instructions to implement the method as described above.
[0019] Another aspect of an embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the method described above when executed.
[0020] Another aspect of an embodiment of the present disclosure provides a computer program, wherein the computer program includes computer executable instructions, and the instructions are used to implement the method described above when executed.
[0021] One or more of the above embodiments have the following advantages or beneficial effects: when reading data, the member's access rights can be queried through the binding relationship between member identity and channel access rights without the need to frequently switch channels, which not only achieves access isolation, but also simplifies the data reading operations of participating members, improves the security of data on the blockchain, and improves the reading efficiency and experience on the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0023] Figure 1 The system architecture of a blockchain to which the data access method and device according to an embodiment of the present disclosure are applied is schematically shown;
[0024] Figure 2 A flowchart of a data access method according to an embodiment of the present disclosure is schematically shown;
[0025] Figure 3 A diagram schematically shows a binding relationship diagram between a channel and participating members according to an embodiment of the present disclosure;
[0026] Figure 4 A schematic diagram schematically shows isolated access by participating members through authorized channels according to an embodiment of the present disclosure;
[0027] Figure 5 A flowchart of a data access method according to another embodiment of the present disclosure is schematically shown;
[0028] Figure 6 Schematically shows a schematic diagram of adding channel encryption key encryption to read and write data according to an embodiment of the present disclosure;
[0029] Figure 7A flowchart of a data access method according to another embodiment of the present disclosure is schematically shown;
[0030] Figure 8 A schematic diagram schematically shows a diagram of matching participating members with authorized channels for data access according to a disclosed embodiment;
[0031] Fig. 9 A schematic diagram showing a storage data structure diagram of the corresponding relationship between channels and various types of information according to an embodiment of the present disclosure;
[0032] Fig.10 The flowchart of the participating members reading and writing data in the blockchain is schematically shown;
[0033] Fig.11 A block diagram schematically shows a data access device according to an embodiment of the present disclosure; and
[0034] Fig.12 The block diagram of a computer system suitable for implementing the data access method according to the embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0035] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0036] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0037] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.
[0038] In the case of using expressions such as "at least one of A, B, and C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.). In the case of using expressions such as "at least one of A, B, or C, etc.", it should generally be interpreted in accordance with the meaning of the expression generally understood by those skilled in the art (for example, "a system having at least one of A, B, or C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0039] Blockchain is a distributed database accounting system that encrypts and hashes data and data operation records through cryptographic methods to form an open, transparent, tamper-proof and traceable system. This technology can be widely used in payment and settlement, evidence storage and collection, value transfer, supply chain finance, user credit reporting, regulatory auditing and other fields.
[0040] The financial services industry is the driving force of global economic development and one of the most centralized industries. The information asymmetry between the two parties in the financial market makes it impossible to establish an effective credit mechanism. There are a large number of centralized credit intermediaries and information intermediaries in the industrial chain, which slows down the efficiency of the system and increases the cost of capital transactions. The public and tamper-proof properties of blockchain technology provide the possibility for a decentralized trust mechanism and have the potential to change the financial infrastructure. Various financial assets, such as equity, bonds, bills, warehouse receipts, fund shares, remittance services, etc. can be integrated into the blockchain ledger and become digital assets on the chain. They can be stored, transferred, and traded on the blockchain, which has broad application prospects in the financial field.
[0041] With the further development of international financial cooperation, in cross-border remittance and inter-bank remittance business scenarios, communications such as fund transfers, remittance message sending and receiving, status query and update between banks must be connected to clearing organizations such as SWIFT and UnionPay. Participating banks and clearing banks hope that remittance message communications can be open and transparent. Multiple banks in different countries can directly connect through blockchain to share data on remittance messages and remittance results on the chain.
[0042] The embodiments of the present disclosure provide a data access method, device, system, and medium applied to a blockchain, which can not only achieve access isolation, but also enable participating members to read the on-chain data normally without frequently switching channels. The data access method may include first receiving a data query request initiated by a first participating member, the data query request includes information of M first data to be queried, and M is an integer greater than or equal to 1. Then, based on the correspondence between channels and data in the blockchain, the N first channels where the M first data are located are determined, where N is an integer and 1≤N≤M. Finally, based on the binding relationship between channels and member identities in the blockchain, the first participating member is allowed to access data from the channels of the N first channels to which the first participating member has access rights, and the binding relationship between channels and member identities is information used to limit the channels to which each participating member has access rights.
[0043] According to the disclosed embodiment, a participant can have access rights to multiple channels. For example, when the first participant wants to access a message sent to him / her within a period of time, he / she can state his / her data access requirements when sending an access request to the blockchain. If the first participant has access rights to the channel where the data he / she is accessing is located, the blockchain will retrieve the data from these channels that he / she has access rights to according to the data access requirements of the first participant.
[0044] Although channels can also be used for access isolation in related technologies, they are mainly isolated through one-to-one channels, and the access members at both ends of the channel are specified. In this way, each participating member of the blockchain must specify a channel to read data. If the channel cannot be accessed, the channel must be switched. In comparison, when reading data, the disclosed embodiment can query the member's access rights through the binding relationship between the member identity and the channel access rights, without the need to frequently switch channels. This not only achieves access isolation, but also simplifies the data reading operations of the participating members, improves the security of data on the blockchain, and improves the reading efficiency and experience on the blockchain.
[0045] It should be noted that the data access method, device, system and medium of the embodiments of the present disclosure can be used in the financial field, and can also be used in any field other than the financial field, such as logistics, medical care, aviation, military industry, etc., and the present disclosure does not limit this.
[0046] Figure 1 The system architecture of the blockchain 100 to which the data access method and device according to the embodiments of the present disclosure are applied is schematically shown.
[0047] like Figure 1As shown, the blockchain 100 may include multiple nodes (for example, 101 to 108 in the example in the figure). The multiple nodes 101 to 108 can communicate with each other. Each node corresponds to one or more databases, and the multiple nodes can form a database storage system that is distributed all over the world and can operate in a collaborative manner. Each node has the same rights and obligations as all other nodes. Each node can determine whether a node can access the blockchain 100 through a consensus mechanism (for example, a consensus protocol determined based on the Byzantine consensus PBFT algorithm). Any consensus node performs read and write operations in its corresponding database, and other nodes will complete synchronization according to a certain mechanism, so as to achieve complete consistency of data in the databases corresponding to all nodes in the blockchain 100.
[0048] Each participant of the blockchain 100 can access the blockchain 100 through one or more of the multiple nodes 101-108. The multiple nodes 101-108 can respectively perform basic blockchain operation functions such as transaction consensus, smart contract execution, and block packaging in the blockchain.
[0049] The blockchain 100 can execute the data access method of the embodiment of the present disclosure, allowing participating members to obtain the data to be queried from one or more authorized channels. Among them, after a node receives a data upload request or a data query request initiated by a participating member on the node, it will broadcast the request to the entire network. After that, each node on the blockchain 100 can independently perform various operations, and confirm the execution results of various operations through consensus verification between all nodes in the blockchain 100 (for example, multiple nodes 101 to 108). Finally, when it is determined that the participating member has access rights to the channel where the accessed data is located, the accessed data is fed back to the participating member.
[0050] The blockchain 100 can divide and allocate multiple read-write isolated channels according to the agreement of multiple participating members, and set one or more channels with access rights for each participating member based on its membership (for example, the binding relationship between the set channels and membership). Therefore, when a participating member initiates a transaction message of a data query request, the list of channels that the participating member has access to is matched according to the identification information of the participating member, and mapped and matched with the corresponding channel data on the blockchain. If the channel where the data to be queried by the participating member is stored allows the participating member to access, it can be directly queried and used without the need to enter the channel information for hard matching. In this way, the operation of the message receiver is simplified while ensuring data security isolation.
[0051] It should be understood that Figure 1 The number and types of nodes in the blockchain 100 are merely illustrative. Depending on the implementation requirements, there may be any number and type of blockchain nodes. It should be noted that Figure 1The examples shown are merely examples of system architectures of blockchains to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but do not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0052] The following combination Figure 1 The blockchain 100 in the embodiment is used to exemplarily illustrate the method and device of the embodiment of the present disclosure.
[0053] Figure 2 The flowchart of a data access method according to an embodiment of the present disclosure is schematically shown.
[0054] like Figure 2 As shown, the data access method may include operations S210 to S230. The data access method may be applied to the blockchain 100.
[0055] First, in operation S210, a data query request initiated by a first participating member is received, the data query request including information of M first data to be queried, where M is an integer greater than or equal to 1. The query request may be a request to query only one data at a time, or a request to query multiple data at a time.
[0056] Then in operation S220, based on the correspondence between the channels and the data in the blockchain, N first channels where the M first data are located are determined, where N is an integer and 1≤N≤M.
[0057] The correspondence between the channel and the data can be set in the smart contract. In operation S220, the blockchain can obtain the channel where the data to be queried by the first participating member is located by querying the smart contract. In one extreme case, the multiple data to be queried by the first participating member can all be stored in one channel, and N is 1. In another extreme case, different data among the multiple data to be queried by the first participating member are stored in different channels, and N=M. The usual situation may be between the above two situations, that is, some of the M data are multiple data stored in one channel, and some data are stored in one channel respectively, and accordingly N is an integer greater than 1 and less than M.
[0058] Next, in operation S230, based on the binding relationship between the channel and the member identity in the blockchain, the first participating member is allowed to access data from the channel to which the first participating member has access rights among the N first channels, and the binding relationship between the channel and the member identity is information for limiting the channels to which each participating member has access rights. The binding relationship between the channel and the member identity can be set in a smart contract, so that when performing a data query, the blockchain determines whether the first participating member has access rights to the corresponding channel by querying the smart contract.
[0059] Figure 3The figure schematically shows a binding relationship diagram between channels and memberships according to an embodiment of the present disclosure.
[0060] Take blockchain 100 as an example for illustration. Figure 1 and Figure 3 The blockchain 100 can be allocated with three channels, namely, channel 1, channel 2, and channel 3. Meanwhile, the blockchain 100 may include multiple participating members, wherein the multiple participating members may include, for example, A, B, C, D, E, and F. Each participating member of A, B, C, D, E, and F may access the blockchain 100 through one of the multiple nodes 101 to 108.
[0061] like Figure 3 As shown, participating members A, B, and D may have access to channel 1, participating members C, E, and F may have access to channel 2, and participating members B and F may have access to channel 3.
[0062] Among them, participant B has access rights to both channel 1 and channel 3, and participant F has access rights to both channel 2 and channel 3. It can be seen that according to the embodiment of the present disclosure, in the binding relationship between channels and membership, a participant can have access rights to multiple channels. Therefore, if the first participant is participant B, and the multiple data accessed by participant B are stored in channel 1 and channel 3 respectively, in operation S230, participant B can read the data to be accessed from channel 1 and channel 3 respectively.
[0063] Figure 4 The diagram schematically shows isolated access by participating members through authorized channels according to an embodiment of the present disclosure.
[0064] Figure 4 For Figure 3 The following are examples of scenarios where the corresponding blockchain has isolated access to authorized channels. Figure 4 Blockchain node 1 and blockchain node 2 may represent any node in blockchain 100, for example. The node may include functions such as uploading data, querying data, data synchronization, data encryption, etc., and may complete the deployment and operation of smart contracts. Remittance messages RM1 to RM8 may be remittance messages or message receipts between members on the chain who have remittance business transactions with each other.
[0065] Specifically, the remittance message RM1 may be, for example, a remittance message initiated or received by participating member A, the remittance message RM2 may be a remittance message initiated or received by participating member B, the remittance message RM3 may be a remittance message initiated or received by participating member C, the remittance message RM4 may be a remittance message initiated or received by participating member B, the remittance message RM5 may be a remittance message initiated or received by participating member D, the remittance message RM6 may be a remittance message initiated or received by participating member E, the remittance message RM7 may be a remittance message initiated or received by participating member F, and the remittance message RM8 may be a remittance message initiated or received by participating member F.
[0066] Two participants can send remittance messages to each other through a channel to which both participants have access rights. For example, participants A and D both have access rights to channel 1, and remittance message RM1 can be a remittance message sent by participant A to participant D through channel 1.
[0067] Each participating member can also read the remittance message sent to him / her by other participating members through one or more channels that he / she has access to at one time. For example, the remittance message RM2 is a report message sent by participating member 5 to participating member B through channel 1, and the remittance message RM4 is a remittance message sent by participating member F to participating member B through channel 3. In this case, according to one embodiment of the present disclosure, if participating member B sends a request to blockchain 100 to read the remittance message with the recipient as himself / herself, participating member B can read remittance message RM2 from channel 1 and remittance message RM4 from channel 2 respectively. In this way, not only the isolated access of different channels in blockchain 100 is realized, and the remittance messages between participating member B and different participating members are avoided from being spied on by other members, but also when participating member B obtains the message sent to himself / herself, it also avoids the continuous switching of channels, thereby improving the efficiency of data access.
[0068] Participating members can only indicate their data access needs when sending access requests to blockchain 100. Blockchain 100 can execute the method according to the embodiment of the present disclosure and retrieve data from one or more channels that the first participating member has access to according to the needs of participating members, without the need to frequently switch channels. This not only achieves access isolation, but also simplifies the data reading operations of participating members, thereby improving the security of data on blockchain 100.
[0069] Figure 5 The flowchart of a data access method according to another embodiment of the present disclosure is schematically shown.
[0070] like Figure 5 As shown, the data access method according to the embodiment of the present disclosure may include operation S210, operation S220, and operations S531 to S534.
[0071] First, after operations S210 and S220, a data query request initiated by the first participating member is received, and based on the correspondence between the channels and the data in the blockchain 100, the N first channels where the M first data to be queried are located are determined. The specific implementation of operations S210 and S220 can be referred to Figure 2 The relevant description of some parts will not be repeated here.
[0072] Next, in operation S531, based on the binding relationship between the channel and the member identity, the accessible channels to which the first participating member has access rights among the N first channels are determined to obtain an accessible channel set.
[0073] Then in operation S532, when the accessible channel set is not an empty set, the key of the accessible channel is obtained based on the correspondence between the channel and the key in the blockchain 100.
[0074] Next, in operation S533, the encrypted first data stored in the accessible channel is decrypted using the secret key of the accessible channel.
[0075] Then, in operation S534, the decrypted first data is sent to the first participating member.
[0076] In this way, for example, when the first data is a remittance message, on the one hand, the hash fingerprint of the original remittance message data is stored on the blockchain 100, that is, the hash value and access address of the remittance message data, which ensures that the data fingerprint of the remittance message data is stored on the chain and cannot be tampered with; on the other hand, the remittance message data is encrypted and decrypted using the channel key, and the blockchain 100 records the access key after the remittance message data is uploaded to the authorized channel and encrypted, and matches the mapping between digital identity authentication and channel authority isolation identification. When participating members read the remittance message data protected by the channel, the authorized channel key preset on the chain is used in association for real-time decryption, thereby realizing the control of the access rights of the remittance message data, which can effectively prevent data tampering and effective data isolation.
[0077] Figure 6 The diagram schematically shows a schematic diagram of adding channel encryption key encryption to read and write data according to an embodiment of the present disclosure.
[0078] like Figure 6 As shown, it is a schematic diagram of adding channel encryption key encryption to read and write remittance message data, combined with Figure 3 and Figure 4, the participating members AF can represent multiple financial institutions participating in the blockchain 100, which can be banks, fund companies, bond companies, branches and subsidiaries of banks, etc. Channels 1-3 can be three read-write isolation channels agreed upon by the participating financial institutions. The channel 1-3 secret key can be the secret key generated by the blockchain certificate node for different channels when the blockchain 100 is networked and the channels are allocated, which is used to encrypt and decrypt the remittance message data of the designated corresponding channel. The encrypted data of channel 1-3 can be the remittance message data sent by the participating financial institutions and encrypted by the secret key configured for the corresponding channel and stored on the chain.
[0079] Participating member B has access to channel 1 and channel 3, and can specify access to the encrypted data in channel 1 through the member private key. Channel 1 determines that participating member B has access, obtains the encryption key corresponding to channel 1, decrypts the encrypted data in channel 1 and returns it to participating member B. Similarly, participating member B can specify access to the encrypted data in channel 3 through the member private key, and channel 3 determines that participating member B has access, obtains the encryption key corresponding to channel 3, decrypts the encrypted data in channel 3 and returns it to participating member B.
[0080] Optionally, participating member C has access to channel 2 but not to channel 1 and channel 3. The dotted line in the diagram may be that participating member C attempts to access the unauthorized channel and is unable to successfully complete the query or upload of the remittance message data, thereby achieving data isolation protection for the original message transaction parties in channel 1 and channel 3, which cannot be obtained or accessed by third-party participating member institutions on the chain.
[0081] Figure 6 The scenario shown can be applied to the field of cross-border remittances. Thus, according to the disclosed embodiment, a data reading permission control mechanism can be established between participating member banks of cross-border remittances, supporting authorized participating members to view the designated remittance message and processing result information. On the blockchain 100, channel-based encryption isolation technology can be added to the inter-bank remittance message information. After the financial institutions, central banks and other organizations in the remittance business are connected as participating nodes, permission control is implemented through digital certificates and channel encryption technology, access to data under designated authorized channels, and control access to the authorized function operation linked list data in the smart contract to achieve data isolation.
[0082] Figure 7 The following schematically shows a flow chart of a data access method according to another embodiment of the present disclosure.
[0083] like Figure 7 As shown, the data access method according to the embodiment of the present disclosure may further include operations S710 to S740.
[0084] In operation S710, S channels for accessing isolation are allocated in the blockchain 100, where S is an integer greater than or equal to N, and a first channel is one of the S channels.
[0085] In operation S720, a binding relationship between a channel and a membership is set.
[0086] In operation S730, a correspondence between a channel and a secret key is set in the blockchain 100.
[0087] In operation S740, a correspondence between a channel and data is set in the blockchain 100. For example, when a first data is uploaded to a first channel, the correspondence between the first data and the first channel can be recorded in the correspondence between the channel and the data. The first data is uploaded to the first channel by a participating member (e.g., a second participating member) in the blockchain 100 who has access to the first channel, and the first data is written in the first channel. The process of writing data may include first receiving a data upload request initiated by a second participating member, the data upload request including uploading a first data to a specified first channel, and then uploading and storing the first data to the first channel when the second participating member has access to the first channel based on the binding relationship between the channel and the membership.
[0088] Figure 8 A schematic diagram of matching participating members with authorized channels for data access according to the disclosed embodiment is schematically shown.
[0089] like Figure 8 As shown, before participating members access the channel, a binding relationship between members and channels can be set in each node of blockchain 100.
[0090] According to the embodiment of the present disclosure, when the first participating member accesses the data in the blockchain 100, each node 101-108 in the blockchain 100 can obtain the channel where the data (for example, one or more remittance message data) to be accessed by the first participating member is located, and at the same time, each node 101-108 in the blockchain 100 can also determine the channel that the first participating member has the right to access through the consensus protocol, and then the blockchain 100 can allocate the secret key corresponding to the authorized channel to decrypt the data and return it to the first participating member. Therefore, when the first participating member accesses the blockchain 100, he does not need to care which channel the accessed data is located in, as long as he has the right to access, he can query it, and if he does not have the right to access, an error message such as "no access to the data" will be returned.
[0091] Fig. 9 The diagram schematically shows a storage data structure diagram of the correspondence between channels and various types of information according to an embodiment of the present disclosure.
[0092] like Fig. 9As shown, according to the embodiment of the present disclosure, a channel and membership KV table 901, a channel and secret key KV table 902, and a data and channel KV table 903 can be pre-set in each node 101-108 of the blockchain 100. Among them, the channel and membership KV table 901, the channel and secret key KV table 902, and the data and channel KV table 903 can be set in the smart contract of the blockchain 100.
[0093] The channel and member identity KV table 901 can be a KV table of the binding relationship between the on-chain unstructured data storage channel and member identity, where DID can be the primary key information of the table data, CID can be the primary key information corresponding to the channel, and UID can be the primary key information corresponding to the participating member, which can be associated with the specific participating member.
[0094] The channel and key KV table 902 can be a KV table of the corresponding relationship between the channel and the key used when encrypting the on-chain channel and channel data, where DID can be the primary key information of the table data, CID can be the unique identification information of the channel, and the key field can be the specific content of the key.
[0095] The data and channel KV table 903 may be a correspondence table of the channel where the data is located, wherein DID may be the primary key information of the table data, Hash may be the unique hash primary key of the original data, and CID may be the unique identification information of the channel. The data and channel KV table 903 may be a table that records the correspondence between the data and the upload channel of the data when the data is uploaded to a specific channel.
[0096] According to one embodiment of the present disclosure, when the first participating member sends a request to the blockchain 100 to query one or more data, the blockchain 100 may first query the data and channel KV table 903, and query the channel CID where the one or more data are located through hash. Then query the channel and membership KV table 901 through the channel CID to query whether the first participating member has the authority to access the channel where the data is located. If the first participating member does not have access rights to certain channels, a message such as "You do not have access rights to the data in this channel!" may be returned. If the first participating member has access rights to the channel, the channel and secret key KV table 902 is queried through the channel CID, and the secret key used for encryption corresponding to the channel is obtained and decrypted, and then returned to the first participating member who initiated the query.
[0097] Fig.10 The flowchart of participating members reading and writing data in blockchain 100 is schematically shown.
[0098] like Fig.10 As shown, the data reading and writing process according to this embodiment may include steps S01 to S11.
[0099] Step S01: The second participating member can initiate uploading of remittance message data to a designated channel. A designated channel is required when uploading messages, which are generally processed one by one.
[0100] Step S02: The blockchain 100 queries the channel and member identity KV table 901 to obtain whether the second participating member has the permission to access the specified channel uploaded in step S01. If the second participating member has the permission to access the specified channel, the second participating member proceeds to step S04; if the second participating member does not have the permission to access the specified channel, the second participating member proceeds to step S03.
[0101] Step S03: The second participating member does not have the authority to specify the channel, the operation is canceled, and an error message may be returned to the second participating member: "You do not have the authority to access this channel."
[0102] Step S04: The blockchain 100 queries the channel and key KV table 902, obtains the key information associated with the specified channel in step S1, and proceeds to step S05.
[0103] Step S05: The blockchain 100 uses the secret key obtained in step S04 to encrypt and store the remittance message data uploaded in step S01, and registers the data with the channel KV table 903.
[0104] Step S06: The first participating member may initiate a remittance message data query. The first participating member and the second participating member may be the same or different. The query may be a single data query or a batch query. When querying, the first participating member does not need to specify a channel, but only initiates the data request to be queried. The blockchain 100 will determine which channel or channels the data to be queried is in based on the data request and the data and channel KV table 903.
[0105] For example, there are currently 47 remittance message data to be sent to the first participating member in the blockchain 100 (for example only). Among them, the statistical result 47 can be calculated by the blockchain 100's own algorithm, for example, the number of remittance messages whose message recipients are the first participating members can be counted by a function. Assume that the first participating member has previously read 39 messages sent to him from the blockchain 100. In this way, in step S06, the first participating member can send a data query request to the blockchain 100, and the content of the query request can include, for example, that the message recipient is the first participating member, and the serial number of the read message is 40 to 47, etc. This means that the first participating member wants to batch query the remittance messages sent to him in the blockchain 100.
[0106] Step S07: The blockchain 100 queries the data and channel KV table 903 registered in step S05, and obtains the channel information of the data according to the data to be queried. For example, the blockchain 100 first queries the 8 messages whose message receiver is the first participating member and the messages with sequence numbers 40 to 47, and then searches the data and channel KV table 903 for the channel information of the 8 messages.
[0107] Step S08: The blockchain 100 obtains the channel information queried in step S07, and queries the channel and member identity KV table 901 through the first participating member identity information to obtain whether the first participating member has access rights to the corresponding channel. For channels that the first participating member does not have access rights to, step S09 is executed, and for channels that the first participating member has access rights to, step S10 is executed.
[0108] Step S09: The first participating user has no right to access the data in the corresponding channel, and the blockchain 100 returns an error code and describes: "You have no right to access the channel data."
[0109] Step S10: The first participating user has the right to access the data in the channel. The blockchain 100 queries the channel and key KV table 902 and queries the corresponding key through the channel association.
[0110] Step S11: Blockchain 100 uses the secret key obtained in step S10 to decrypt the specified data and returns it to the first participating member who initiated the query, and the process ends.
[0111] In this way, the first participating member can access data from the blockchain 100 without having to care about the channel where the data is stored. Moreover, data can be accessed from multiple authorized channels at one time without having to constantly switch channels to access data from multiple channels.
[0112] Fig.11 A block diagram of a data access device according to an embodiment of the present disclosure is schematically shown.
[0113] like Fig.11 As shown, the data access device 1100 according to an embodiment of the present disclosure may include a receiving module 1110, a determining module 1120, and an access module 1130. According to other embodiments of the present disclosure, the data access device 1100 may further include a relationship setting module 1140 and a channel allocation module 1150. The data access device 1100 may be set at any node in the blockchain 100, for example, to implement the reference Figure 2 to Figure 10 Described data access method.
[0114] The receiving module 1110 is used to receive a data query request initiated by a first participating member, where the data query request includes information of M first data to be queried, where M is an integer greater than or equal to 1.
[0115] The determination module 1120 is used to determine N first channels where the M first data are located based on the correspondence between the channels and the data in the blockchain, where N is an integer and 1≤N≤M.
[0116] The access module 1130 is used to allow the first participating member to access data from the channel to which the first participating member has access rights among N first channels based on the binding relationship between the channel and the member identity in the blockchain. The binding relationship between the channel and the member identity is information used to limit the channels to which each participating member has access rights.
[0117] The channel allocation module 1150 is used to allocate S channels for access isolation in the blockchain, where S is an integer greater than or equal to N, and a first channel is one of the S channels.
[0118] The relationship setting module 1140 is used to set the binding relationship between the channel and the membership.
[0119] According to another embodiment of the present disclosure, the access module 1130 is also used to receive a data upload request initiated by a second participating member, the data upload request includes uploading a first data to a specified first channel, and based on the binding relationship between the channel and the member identity, uploading and storing the first data to the first channel when the second participating member has access rights to the first channel.
[0120] According to another embodiment of the present disclosure, the relationship setting module 1140 is also used to set the corresponding relationship between the channel and the secret key in the blockchain. According to another embodiment of the present disclosure, the relationship setting module 1150 is also used to set the corresponding management of the corresponding relationship between the channel and the data, for example, when a first data is uploaded to a first channel, the corresponding relationship between the first data and the first channel is recorded in the corresponding relationship between the channel and the data.
[0121] According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits, or at least part of the functions of any one of them can be implemented in one module. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be split into multiple modules for implementation. According to the embodiments of the present invention, any one or more of the modules, submodules, units, and subunits can be at least partially implemented as hardware circuits, such as field programmable gate arrays (FPGAs), programmable logic arrays (PLAs), systems on chips, systems on substrates, systems on packages, application specific integrated circuits (ASICs), or can be implemented by hardware or firmware in any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, according to the embodiments of the present invention, one or more of the modules, submodules, units, and subunits can be at least partially implemented as computer program modules, and when the computer program modules are run, the corresponding functions can be performed.
[0122] For example, any multiple of the receiving module 1110, the determining module 1120, the access module 1130, the relationship setting module 1140, and the channel allocation module 1150 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the receiving module 1110, the determining module 1120, the access module 1130, the relationship setting module 1140, and the channel allocation module 1150 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware or in a suitable combination of any of them. Alternatively, at least one of the receiving module 1110, the determining module 1120, the accessing module 1130, the relationship setting module 1140, and the channel allocating module 1150 may be at least partially implemented as a computer program module, which may perform a corresponding function when executed.
[0123] Fig.12 The block diagram of a computer system 1200 suitable for implementing the data access method according to an embodiment of the present disclosure is schematically shown. Fig.12 The computer system 1200 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0124] like Fig.12 As shown, the computer system 1200 according to an embodiment of the present disclosure includes a processor 1201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1202 or a program loaded from a storage part 1208 into a random access memory (RAM) 1203. The processor 1201 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 1201 may also include an onboard memory for caching purposes. The processor 1201 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0125] In RAM 1203, various programs and data required for the operation of system 1200 are stored. Processor 1201, ROM 1202, and RAM 1203 are connected to each other via bus 1204. Processor 1201 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 1202 and / or RAM 1203. It should be noted that the program can also be stored in one or more memories other than ROM 1202 and RAM 1203. Processor 1201 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in one or more memories.
[0126] According to an embodiment of the present disclosure, the system 1200 may further include an input / output (I / O) interface 1205, which is also connected to the bus 1204. The system 1200 may further include one or more of the following components connected to the I / O interface 1205: an input section 1206 including a keyboard, a mouse, etc.; an output section 1207 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1208 including a hard disk, etc.; and a communication section 1209 including a network interface card such as a LAN card, a modem, etc. The communication section 1209 performs communication processing via a network such as the Internet. A drive 1210 is also connected to the I / O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1210 as needed, so that a computer program read therefrom is installed into the storage section 1208 as needed.
[0127] According to an embodiment of the present disclosure, the method flow according to an embodiment of the present disclosure can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program contains a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1209, and / or installed from the removable medium 1211. When the computer program is executed by the processor 1201, the above-mentioned functions defined in the system of the embodiment of the present disclosure are executed. According to an embodiment of the present disclosure, the system, equipment, device, module, unit, etc. described above can be implemented by a computer program module.
[0128] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0129] According to an embodiment of the present disclosure, a computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus, or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 1202 and / or RAM 1203 described above and / or one or more memories other than ROM 1202 and RAM 1203.
[0130] An embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains a program code for executing the method provided by the embodiment of the present disclosure. When the computer program product runs on an electronic device, the program code is used to enable the electronic device to implement the image recognition method provided by the embodiment of the present disclosure.
[0131] When the computer program is executed by the processor 1201, the above functions defined in the system / device of the embodiment of the present disclosure are executed. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0132] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 1209, and / or installed from the removable medium 1211. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0133] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0134] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0135] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0136] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A data access method, applied to a blockchain, wherein: The method comprises: receiving a data upload request initiated by a second participating member, wherein the data upload request includes uploading first data to a designated first channel; Based on the binding relationship between the channel and the member identity in the blockchain, uploading and storing the first data to the first channel when the second participating member has access rights to the first channel; wherein, when the recipient of the first data is the first participating member, the first channel is a channel to which both the second participating member and the first participating member have access rights, and wherein the first participating member is a different party from the second participating member; When the first data is uploaded to the first channel, the correspondence between the first data and the first channel is recorded in the correspondence between the channel and the data in the blockchain; receiving a data query request initiated by the first participating member, wherein the data query request includes information of M first data to be queried, where M is an integer greater than or equal to 1; Based on the correspondence between the channels and the data, determining N first channels where the M first data are located, where N is an integer and 1≤N≤M; and Based on the binding relationship between the channel and the membership, the first participating member is allowed to access data from the channel to which the first participating member has access rights among the N first channels. The binding relationship between the channel and the membership is information used to limit the channels to which each participating member has access rights.
2. The method according to claim 1, wherein The allowing the first participating member to access data from a channel to which the first participating member has access rights among the N first channels includes: Based on the binding relationship between the channel and the member identity, determining the accessible channels to which the first participating member has access rights among the N first channels to obtain an accessible channel set; and When the accessible channel set is not an empty set, the first participating member is allowed to access data from each of the accessible channels in the accessible channel set.
3. The method according to claim 2, wherein: The allowing the first participating member to access data from each of the accessible channels in the set of accessible channels comprises: Based on the correspondence between channels and keys in the blockchain, obtaining the key of the accessible channel; decrypting the encrypted first data stored in the accessible channel using the secret key of the accessible channel; and The first decrypted data is sent to the first participating member.
4. The method according to claim 3, wherein: The method further comprises: A correspondence between the channel and the secret key is set in the blockchain.
5. The method according to any one of claims 1 to 4, wherein The method further comprises: Allocating S channels for accessing isolation in the blockchain, where S is an integer greater than or equal to N, and the first channel is one of the S channels; and Set the binding relationship between the channel and the membership.
6. A data access device, provided at a blockchain node, wherein: The device comprises: an access module, configured to: receive a data upload request initiated by a second participating member, the data upload request including uploading first data to a designated first channel; and, based on a binding relationship between channels and member identities in the blockchain, upload and store the first data to the first channel when the second participating member has access rights to the first channel; wherein, when the recipient of the first data is the first participating member, the first channel is a channel to which both the second participating member and the first participating member have access rights, and wherein the first participating member is a different party from the second participating member; a relationship setting module, configured to record, when the first data is uploaded to the first channel, a correspondence between the first data and the first channel in the correspondence between channels and data in the blockchain; A receiving module, configured to receive a data query request initiated by a first participating member, wherein the data query request includes information of M first data to be queried, where M is an integer greater than or equal to 1; a determining module, configured to determine, based on a correspondence between the channels and the data, N first channels where the M first data are located, where N is an integer and 1≤N≤M; and The access module is further configured to allow the first participating member to access data from a channel to which the first participating member has access rights among the N first channels based on a binding relationship between channels and member identities in the blockchain, where the binding relationship between channels and member identities is information used to limit the channels to which each participating member has access rights.
7. A data access system, provided at a blockchain node, comprising: one or more memories storing executable instructions; as well as One or more processors execute the executable instructions to implement the method according to any one of claims 1 to 5.
8. A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to perform the method according to any one of claims 1 to 5.
