Data access method, apparatus and system, and medium
Through the heterogeneous chain gateway routing and unified access platform, the problem of data access complexity between heterogeneous alliance chains is solved, cross-chain data mutual access and interoperability are realized, the difficulty and development cost of alliance chain access are reduced, and multiple alliance chains are supported. Access to an underlying alliance chain.
Patent Information
- Application Number
- PCT/CN2023/141178
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-22
- Filing Date
- 2023-12-22
- Publication Date
- 2024-09-26
AI Technical Summary
The lack of data sharing and interoperability tools between different blockchain application systems makes data access between heterogeneous alliance chains complex and difficult. It is necessary to solve the problems of mutual recognition of identities and mutual recognition of application data, which increases the difficulty of developing upper-layer applications. and access complexity.
Provide a data access method that forwards operation requests to the target alliance chain gateway through heterogeneous chain gateway routing, obtains address information and executes operation requests, supports cross-chain data mutual access and interoperation, and shields the interface differences and differences of different alliance chains. Data format differences enable a unified access platform.
It reduces the difficulty and development cost of accessing the alliance chain, supports cross-chain data exchange within the platform, solves the problem of information islands and difficulty in mutual access, allows one blockchain application to access multiple underlying alliance chains, and simplifies the development of upper-layer applications. access and integration.
Smart Images

Figure CN2023141178_26092024_PF_FP
Abstract
Description
Data access method, device, system and medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 22, 2023, with application number 202310280736.8 and application name “A Data Access Method, Device, System and Medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of data processing technology, and in particular to a data access method, device, system, and non-volatile readable storage medium. Background Art
[0004] Currently, there are a variety of blockchain-based application systems on the market. These systems are often developed based on consortium blockchain technology. Mainstream consortium blockchain technologies include Hyperledger Fabric, FISCO BCOS, and Changan Chain. The access interfaces and block structures of these different blockchain application systems are heterogeneous and diverse, and there is a lack of tools or platforms for data sharing and interaction between blockchains.
[0005] There are significant differences between heterogeneous consortium chains, with different block data structures, data protocols, basic function abstractions, ledger storage methods, etc. In addition, different upper-layer applications also have differences in application data structure definitions, smart contracts, and consensus mechanisms. In order to achieve mutual access between heterogeneous consortium chains, it is also necessary to solve problems such as identity mutual recognition and application data mutual recognition. Therefore, the complexity and difficulty are much greater than the data mutual access problem between homogeneous consortium chains.
[0006] Due to the significant differences in the interfaces used to access different consortium chains, upper-layer applications must develop multiple additional adapter interfaces. These complex interfaces hinder system expansion and integration, increasing the difficulty for upper-layer applications to access consortium chains. Furthermore, according to the current mainstream solution, homogeneous consortium chains are discretely connected to the relay chain, lacking categorization and the aggregation and management of homogeneous resources. These issues, such as the development of additional adapter interfaces and the discrete connection of homogeneous consortium chains to the relay chain, further complicate consortium chain access.
[0007] Summary of the Invention
[0008] The purpose of some embodiments of the present application is to provide a data access method, device, system and non-volatile readable storage medium that can reduce the difficulty of accessing the alliance chain.
[0009] To solve the above technical problems, some embodiments of the present application provide a data access method, including:
[0010] Receive an operation request from a blockchain application; the operation request carries the identifier of the target chain to be accessed;
[0011] Forward the operation request to the consortium chain gateway to which the target chain belongs through the heterogeneous chain gateway routing;
[0012] When the alliance chain gateway receives an operation request sent by the heterogeneous chain gateway router, it obtains the address information that matches the identifier of the target chain;
[0013] Access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feedback the operation results to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0014] In some embodiments of the present application, further comprising:
[0015] Obtain the target underlying consortium chain that meets the access requirements of blockchain applications;
[0016] Obtain the block data of the target underlying consortium chain;
[0017] Call the contract interface function to operate the ledger data recorded on the target underlying consortium chain.
[0018] In some embodiments of the present application, further comprising:
[0019] Receive user identity information sent by the blockchain application, and open access rights to the blockchain application if the user identity information matches the pre-recorded identity information.
[0020] In some embodiments of the present application, before forwarding the operation request to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing, the following is also included:
[0021] Determine whether the blockchain application that issued the operation request has opened access rights;
[0022] If the blockchain application that issues the operation request has opened access rights, determine whether the target chain accessed by the operation request belongs to the underlying consortium chain included in the access rights;
[0023] If the target chain accessed by the operation request belongs to the underlying consortium chain included in the access permission, the step of forwarding the operation request to the consortium chain gateway to which the target chain belongs through the heterogeneous chain gateway routing is executed;
[0024] If the blockchain application that issues the operation request does not open access rights or the target chain accessed by the operation request does not belong to the underlying consortium chain included in the access rights, a prompt message indicating that the access rights are not granted will be fed back to the blockchain application.
[0025] In some embodiments of the present application, after opening access rights for the blockchain application, the method further includes:
[0026] Record the correspondence between user identity information and the identifier of the underlying consortium chain with access rights.
[0027] In some embodiments of the present application, after opening access rights for the blockchain application, the method further includes:
[0028] Record the correspondence between user identity information and the channels or groups of the underlying consortium chain with access rights.
[0029] In some embodiments of the present application, when the operation request is a data read request, accessing the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feeding back the operation result to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer includes:
[0030] Access the target chain based on the address information to obtain the required target data; and feed the target data back to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0031] In some embodiments of the present application, further comprising:
[0032] Parse the acquired target data to determine the source chain and target chain of the target data;
[0033] Verify the source of the target data based on its source chain to obtain verified target data;
[0034] Call the chain address mapping table to query the address information of the target chain;
[0035] According to the address information of the target chain, the verified target data is sent to the target chain.
[0036] In some embodiments of the present application, further comprising:
[0037] Receive the data request sent by the first alliance chain gateway;
[0038] Obtain block data based on the block header identification information carried in the data request;
[0039] Convert block data into the target chain’s block format;
[0040] When the block data after block format conversion meets the access rights, the block data after block format conversion is sent to the second alliance chain gateway to which the target chain belongs; wherein the first alliance chain gateway and the second alliance chain gateway belong to two different types of gateways.
[0041] In some embodiments of the present application, when the block data after the block format conversion satisfies the access rights, sending the block data after the block format conversion to the second alliance chain gateway to which the target chain belongs includes:
[0042] Query access rights from the access control module of the access platform layer. If it is determined that the target chain is allowed to access, the block data after block format conversion will be sent to the second alliance chain gateway to which the target chain belongs.
[0043] In some embodiments of the present application, further comprising:
[0044] When the block data after the block format conversion does not meet the access rights, an error prompt will be fed back to the first alliance chain gateway.
[0045] Some embodiments of the present application further provide a data access device, comprising a receiving unit, a forwarding unit, an acquiring unit, an executing unit, and a feedback unit;
[0046] A receiving unit, configured to receive an operation request issued by a blockchain application; wherein the operation request carries an identifier of a target chain to be accessed;
[0047] The forwarding unit is used to forward the operation request to the consortium chain gateway to which the target chain belongs through the heterogeneous chain gateway routing;
[0048] An acquisition unit, configured to acquire address information matching the identifier of a target chain when the alliance chain gateway receives an operation request sent by the heterogeneous chain gateway router;
[0049] an execution unit, configured to access a target chain based on the address information, so as to execute an operation corresponding to the operation request on the target chain;
[0050] The feedback unit is used to feed back the operation results to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0051] Some embodiments of the present application further provide a data access system, comprising an access platform layer, a heterogeneous alliance chain gateway layer, and an underlying alliance chain; wherein the access platform layer includes a heterogeneous chain gateway router; the heterogeneous alliance chain gateway layer includes multiple types of alliance chain gateways; each type of alliance chain gateway is connected to an underlying alliance chain of the same type;
[0052] The access platform layer is used to receive operation requests issued by blockchain applications through the interface; the operation request carries the identifier of the target chain to be accessed; and forwards the operation request to the consortium chain gateway to which the target chain belongs through the heterogeneous chain gateway routing;
[0053] The consortium chain gateway is used to obtain the address information that matches the identifier of the target chain when receiving an operation request sent by the heterogeneous chain gateway router; access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feedback the operation result to the blockchain application through the heterogeneous chain gateway router and the matching interface in the access platform layer.
[0054] In some embodiments of the present application, the heterogeneous alliance chain gateway layer includes a distributed ledger alliance chain gateway, a financial alliance chain gateway and a Changan Chain gateway.
[0055] In some embodiments of the present application, the distributed ledger consortium chain gateway is connected to a block node of each underlying consortium chain of the same type; the distributed ledger consortium chain gateway records the correspondence between the identifier of each underlying consortium chain and the IP address and port number of the block node connected to the distributed ledger consortium chain gateway.
[0056] In some embodiments of the present application, the distributed ledger consortium chain gateway is used to copy the digital certificate of the block node for accessing the underlying consortium chain and configure the relevant interface to complete the connection of a block node of each underlying consortium chain of the same type.
[0057] In some embodiments of the present application, there are multiple alliance chain gateways of the same type, among which one target alliance chain gateway is routed to the heterogeneous chain gateway; the remaining alliance chain gateways of the same type are respectively connected to the target alliance chain gateway, and the remaining alliance chain gateways of the same type are connected to the underlying alliance chain to which they belong.
[0058] Some embodiments of the present application also provide a data access method applicable to an access device interacting with a blockchain application; the method includes:
[0059] Receive an operation request from a blockchain application; the operation request carries the identifier of the target chain to be accessed;
[0060] The operation request is forwarded to the alliance chain gateway to which the target chain belongs, so that the alliance chain gateway can obtain the address information that matches the identifier of the target chain; the target chain is accessed based on the address information to perform the operation corresponding to the operation request on the target chain, and the operation result is fed back to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0061] Some embodiments of the present application also provide a data access device suitable for use as an access device for interacting with a blockchain application; the device includes a receiving unit and a forwarding unit;
[0062] A receiving unit, configured to receive an operation request issued by a blockchain application; wherein the operation request carries an identifier of a target chain to be accessed;
[0063] The forwarding unit is used to forward the operation request to the alliance chain gateway to which the target chain belongs, so that the alliance chain gateway can obtain the address information that matches the identifier of the target chain; access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feedback the operation result to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0064] Some embodiments of the present application also provide a data access method applicable to devices deployed with various types of alliance chain gateways, the method comprising:
[0065] Receive an operation request sent by an access device; wherein the operation request carries an identifier of a target chain to be accessed;
[0066] Get the address information that matches the target chain's identifier;
[0067] Access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain;
[0068] Feedback the operation results to the blockchain application through the access device.
[0069] Some embodiments of the present application further provide a data access device, applicable to devices deployed with various types of alliance chain gateways, the device including a receiving unit, an acquiring unit, an operating unit, and a feedback unit;
[0070] A receiving unit, configured to receive an operation request sent by an access device; wherein the operation request carries an identifier of a target chain to be accessed;
[0071] An acquisition unit, configured to acquire address information matching the identifier of the target chain;
[0072] an operation unit, configured to access a target chain based on the address information, so as to perform an operation corresponding to the operation request on the target chain;
[0073] The feedback unit is used to feed back the operation results to the blockchain application through the access device.
[0074] Some embodiments of the present application further provide a non-volatile readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data access method are implemented.
[0075] As can be seen from the above technical solution, the data access system comprises an access platform layer, a heterogeneous consortium chain gateway layer, and an underlying consortium chain. The access platform layer includes a heterogeneous chain gateway router, enabling interaction with the heterogeneous consortium chain gateway layer. The heterogeneous consortium chain gateway layer includes multiple types of consortium chain gateways; each type of consortium chain gateway is connected to an underlying consortium chain of the same type. The access platform layer is used to receive operation requests issued by blockchain applications through an interface. The operation requests carry the identifier of the target chain to be accessed and forward the operation requests to the consortium chain gateway to the target chain via the heterogeneous chain gateway router. Upon receiving an operation request from the heterogeneous chain gateway router, the consortium chain gateway is used to obtain address information matching the target chain identifier. Based on this address information, it accesses the target chain, performs the operation corresponding to the operation request on the target chain, and transmits the operation results to the blockchain application via the heterogeneous chain gateway router and the matching interface in the access platform layer. In this technical solution, blockchain applications can access the underlying consortium chain through the access platform, shielding against differences in interfaces, data formats, data protocols, and smart contracts caused by different consortium chain implementation technologies. By establishing a unified access platform, the barrier to entry for blockchain applications is lowered, reducing the difficulty and cost of developing blockchain applications. The data access system supports cross-chain data access and interoperability within the platform, resolving the issues of information silos and interoperability between different blockchains and simplifying access to consortium chains. Furthermore, through the heterogeneous consortium chain gateway layer, connections to various underlying consortium chains can be achieved, enabling a single blockchain application to access multiple underlying consortium chains, providing strong support for upper-layer applications involving multiple underlying consortium chains. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] In order to more clearly illustrate some embodiments of the present application, the following is a brief introduction to the drawings required for use in 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.
[0077] FIG1 is a flow chart of a data access method provided by some embodiments of the present application;
[0078] FIG2 is a schematic diagram of the structure of a data access system provided by some embodiments of the present application;
[0079] FIG3 is a schematic diagram of the structure of another data access system provided in some embodiments of the present application;
[0080] FIG4 is a schematic diagram of the structure of a financial alliance chain gateway provided in some embodiments of the present application;
[0081] FIG5 is a schematic diagram of the structure of a distributed ledger consortium chain gateway provided by some embodiments of the present application;
[0082] FIG6 is a schematic diagram of the structure of a heterogeneous chain gateway routing provided by some embodiments of the present application;
[0083] FIG7 is a schematic diagram of a deployment of a distributed ledger consortium chain gateway provided in some embodiments of the present application;
[0084] FIG8 is a schematic structural diagram of a data access device provided in some embodiments of the present application;
[0085] FIG9 is a flowchart of a data access method for an access device that interacts with a blockchain application, provided in some embodiments of the present application;
[0086] FIG10 is a schematic diagram of the structure of a data access device for an access device that interacts with a blockchain application, provided in some embodiments of the present application;
[0087] FIG11 is a flowchart of a data access method applicable to a device deployed with multiple types of alliance chain gateways, provided in some embodiments of the present application;
[0088] Figure 12 is a structural diagram of a data access device suitable for devices deployed with multiple types of alliance chain gateways, provided in some embodiments of the present application. DETAILED DESCRIPTION
[0089] The following will be combined with the accompanying drawings of some embodiments of the present application to clearly and completely describe the technical solutions of some embodiments of the present application. Obviously, the embodiments described are only some embodiments of the present application, not all embodiments. Based on the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of this application.
[0090] The terms "including" and "having" and any variations thereof in the specification and claims of this application and the accompanying drawings are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not limited to the listed steps or elements and may include steps or elements that are not listed.
[0091] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0092] Next, a data access method provided by some embodiments of the present application is described in detail. FIG1 is a flow chart of a data access method provided by some embodiments of the present application, the method comprising:
[0093] S101: Receive an operation request issued by a blockchain application.
[0094] The operation request carries the identifier of the target chain to be accessed.
[0095] S102: Forward the operation request to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing.
[0096] In some embodiments of the present application, different interface modules can be set up at the access platform layer, which are used to obtain the target underlying consortium chain that meets the access requirements of the blockchain application; obtain the block data of the target underlying consortium chain; and call the contract interface function to operate the ledger data recorded on the target underlying consortium chain.
[0097] To enhance the security of blockchain application access, users can verify their identities. Specifically, upon receiving user identity information from a blockchain application, the user identity information can be compared with pre-recorded identity information. If the user identity information matches the pre-recorded identity information, access to the blockchain application is granted.
[0098] Accordingly, before forwarding the operation request to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing, it is possible to first determine whether the blockchain application that issues the operation request has opened access rights.
[0099] When the blockchain application that issues the operation request has opened access rights, determine whether the target chain accessed by the operation request belongs to the underlying consortium chain included in the access rights.
[0100] In the case where the target chain accessed by the operation request belongs to the underlying consortium chain included in the access permission, the step of forwarding the operation request to the consortium chain gateway to which the target chain belongs through the heterogeneous chain gateway routing is executed.
[0101] If the blockchain application that issues the operation request does not open access rights or the target chain accessed by the operation request does not belong to the underlying consortium chain included in the access rights, a prompt message indicating that the access rights are not granted can be fed back to the blockchain application.
[0102] S103: When the alliance chain gateway receives an operation request sent by the heterogeneous chain gateway routing, it obtains the address information that matches the identifier of the target chain.
[0103] S104: Access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feed back the operation result to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0104] There are various types of operation requests. Taking a data read request as an example, in a specific implementation, the target chain can be accessed based on the address information to obtain the required target data; and the target data is fed back to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0105] After opening access rights for a blockchain application, in order to facilitate subsequent queries on the blockchain application's access rights to the underlying consortium chain, the correspondence between the user's identity information and the identifier of the underlying consortium chain with access rights can be recorded.
[0106] In some embodiments of the present application, in addition to setting the access rights of a blockchain application to the underlying consortium chain, access rights can be further subdivided, specifically to access channels or clusters within the underlying consortium chain. To facilitate subsequent queries regarding the access rights of a blockchain application to channels or clusters within the underlying consortium chain, in a specific implementation, the correspondence between user identity information and the channels or groups within the underlying consortium chain that have access rights can be recorded.
[0107] When data is transmitted on the same type of underlying consortium chain, the source chain can send the target data to the consortium chain gateway connected to it. The consortium chain gateway can parse the obtained target data to determine the source chain and target chain of the target data; based on the source chain of the target data, verify the source of the target data to obtain the verified target data; call the chain address mapping table to query the address information of the target chain; based on the address information of the target chain, send the verified target data to the target chain.
[0108] When data is transmitted between different types of underlying consortium chains, it can be implemented based on the consortium chain gateway and heterogeneous chain gateway routing of each type of underlying consortium chain. In a specific implementation, the heterogeneous chain gateway routing can receive a data request from a first consortium chain gateway; obtain block data based on the block header identification information carried in the data request; convert the block data into the block format of the target chain; and if the block data after the block format conversion meets the access rights, send the block data after the block format conversion to the second consortium chain gateway of the target chain; wherein, the first consortium chain gateway and the second consortium chain gateway are two different types of gateways.
[0109] If the block data after block format conversion meets the access rights, the heterogeneous chain gateway router can query the access rights from the access control module of the access platform layer. If it is determined that the target chain is allowed to access, the block data after block format conversion will be sent to the second alliance chain gateway to which the target chain belongs. If the block data after block format conversion does not meet the access rights, an error message will be fed back to the first alliance chain gateway.
[0110] As can be seen from the above technical solution, an operation request from a blockchain application is received, containing the identifier of the target chain to be accessed. The operation request is then forwarded to the consortium chain gateway to which the target chain belongs via the heterogeneous chain gateway router. Upon receiving the operation request from the heterogeneous chain gateway router, the consortium chain gateway obtains address information matching the target chain identifier. Based on this address information, the target chain is accessed, the operation corresponding to the operation request is performed on the target chain, and the operation result is fed back to the blockchain application via the heterogeneous chain gateway router and the matching interface in the access platform layer. In this technical solution, blockchain applications can access the underlying consortium chain through the access platform, shielding against differences in interfaces, data formats, data protocols, and smart contracts caused by different consortium chain implementation technologies. By establishing a unified access platform, the access threshold for blockchain applications is lowered, reducing the difficulty and cost of developing blockchain applications. Using heterogeneous chain gateway routers and different types of consortium chain gateways, cross-chain data access and interoperability within the platform are supported, resolving the issue of information silos and interoperability between different blockchains and simplifying consortium chain access. In addition, different types of consortium chain gateways can achieve connections with multiple types of underlying consortium chains, thereby supporting a blockchain application to access multiple underlying consortium chains, providing good support for some upper-level applications involving multiple underlying consortium chains.
[0111] Figure 2 is a schematic diagram of the structure of a data access system provided by some embodiments of the present application. The system includes an access platform layer, a heterogeneous consortium chain gateway layer, and an underlying consortium chain. The access platform layer includes a heterogeneous chain gateway router, which enables interaction with various types of consortium chain gateways. The heterogeneous consortium chain gateway layer includes multiple types of consortium chain gateways; each type of consortium chain gateway is connected to the underlying consortium chain of the same type.
[0112] The access platform layer is used to receive operation requests issued by blockchain applications through the interface; the operation request carries the identifier of the target chain to be accessed; and the operation request is forwarded to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing.
[0113] The consortium chain gateway is used to obtain the address information that matches the identifier of the target chain when receiving an operation request sent by the heterogeneous chain gateway router; access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feedback the operation result to the blockchain application through the heterogeneous chain gateway router and the matching interface in the access platform layer.
[0114] There are various types of operation requests, such as read requests and write requests. Taking a data read request as an example, the consortium chain gateway can access the target chain based on the address information to obtain the required target data; and then feed the target data back to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0115] By setting up heterogeneous chain gateway routing at the access platform layer, interaction between the access platform layer and the heterogeneous alliance chain gateway layer can be achieved.
[0116] In order to meet the access requirements of different blockchain applications, the access platform layer can provide a unified set of access interfaces for upper-layer blockchain applications, including chain and channel interface modules, on-chain data access interface modules, and contract access interface modules.
[0117] The chain and channel interface module is used to obtain the target underlying consortium chain that meets the access requirements of blockchain applications.
[0118] There can be many types of underlying alliance chains. Common types of underlying alliance chains include distributed ledger alliance chain (Hyperledger Fabric), financial alliance chain (FISCO BCOS), Chang'an Chain, and Haihe Smart Chain. In some embodiments of the present application, there is no limitation on the type of underlying alliance chain, and each type of underlying alliance chain has its corresponding type of alliance chain gateway. For the convenience of introduction, Figure 2 takes the three types of underlying alliance chains, namely distributed ledger alliance chain, financial alliance chain and Chang'an Chain, as examples. Correspondingly, the alliance chain gateway layer includes three types of gateways, namely distributed ledger alliance chain gateway, financial alliance chain gateway and Chang'an Chain gateway. Figure 2 is for illustration only and does not constitute a limitation on the types of gateways contained in the heterogeneous alliance chain gateway layer and the types of underlying alliance chains contained in the underlying alliance chain.
[0119] To distinguish between different underlying consortium chains, Figure 2 uses F as the underlying consortium chain to represent the distributed ledger consortium chain, B as the underlying consortium chain to represent the financial consortium chain, and L as the underlying consortium chain to represent the Chang'an Chain. There is no limit on the number of underlying consortium chains of each type. Figure 2 uses x distributed ledger consortium chains, y financial consortium chains, and z Chang'an Chains as an example.
[0120] The structures of different types of underlying consortium chains vary. For example, a distributed ledger consortium chain can be divided into different channels, and a financial consortium chain can be divided into different groups. In actual access, you can refine it to a specific channel or group.
[0121] For example, you can query the underlying consortium chains and channel information of all Hyperledger Fabric (distributed ledger consortium chains) types.
[0122] The on-chain data access interface module is used to obtain the block data of the target underlying consortium chain.
[0123] In the specific implementation, it can also be refined to a specific channel or group. The block data corresponding to the specified underlying alliance chain, channel or group and block number can be obtained through the on-chain data access interface module.
[0124] The contract access interface module is used to call the contract interface function to operate the ledger data recorded on the target underlying consortium chain.
[0125] In the specific implementation, the contract access interface module can call an interface function of a specified contract on a certain underlying consortium chain and channel (or group). The contract interface function can be used to obtain ledger data, and the contract interface function can also be used to write data to the ledger.
[0126] In some embodiments of the present application, by setting up a unified interface set at the access platform layer, the complex underlying heterogeneous chain implementation can be shielded, providing a way for upper-layer blockchain applications to obtain data or resources of the underlying consortium chain, and an upper-layer blockchain application can access the data or resources of multiple underlying consortium chains at the same time.
[0127] Blockchain applications have a corresponding relationship with users. In some embodiments of this application, to enhance the security of users accessing the underlying consortium chain through blockchain applications, an identity authentication module can be provided at the access platform layer. The identity authentication module is used to receive user identity information sent by the blockchain application and grant access rights to the blockchain application if the user identity information matches pre-recorded identity information.
[0128] The access platform layer provides a single sign-on service for blockchain applications. Upper-layer blockchain applications only need to complete identity authentication once to securely access resources or data of different underlying consortium chains based on the user's corresponding access rights.
[0129] In order to facilitate the management of access rights corresponding to each user, an access control module can be set up at the access platform layer.
[0130] The access control module can record the correspondence between user identity information and the identifier of the underlying alliance chain with access rights.
[0131] Access rights can also be divided more finely, accurately to channels or groups. Accordingly, the access control module can record the correspondence between user identity information and the channels or groups of the underlying alliance chain with access rights.
[0132] A simple implementation of the access control module can manage user access rights through a resource access control list. For example, a coarse-grained access control list can be created for each user and the underlying consortium chain. Before accessing data on a specific underlying consortium chain, a user can query the access control list to determine whether they have access rights. The system can also refine the access control granularity, for example, using channels or groups within the underlying consortium chain as a smaller control granularity.
[0133] In actual applications, when the access platform layer receives an operation request issued by a blockchain application, it can determine whether the blockchain application that issued the operation request has opened access rights.
[0134] When the blockchain application that issues the operation request has opened access rights, determine whether the target chain accessed by the operation request belongs to the underlying consortium chain included in the access rights; when the target chain accessed by the operation request belongs to the underlying consortium chain included in the access rights, then the step of forwarding the operation request to the consortium chain gateway to which the target chain belongs through heterogeneous chain gateway routing can be executed.
[0135] If the blockchain application that issues the operation request does not open access rights or the target chain accessed by the operation request does not belong to the underlying consortium chain included in the access rights, a prompt message indicating that the access rights are not granted can be fed back to the blockchain application.
[0136] Figure 3 is a structural diagram of another data access system provided by some embodiments of the present application. The access platform layer is also provided with an identity authentication module, an access control module, a chain and channel interface module, an on-chain data access interface module and a contract access interface module.
[0137] In some embodiments of the present application, the access platform layer can provide identity authentication and single-point access control to upper-layer blockchain applications, allowing access control of underlying multi-chain resources to be completed with a single login. Furthermore, a unified set of access interfaces (including chain and channel interfaces, on-chain data access interfaces, contract access interfaces, etc.) is provided to upper-layer blockchain applications, making access interfaces unified and controllable. A single upper-layer blockchain application can access data or resources from multiple underlying chains through the access platform layer, making data and resource access transparent and shielding differences in interfaces, data formats, data protocols, and smart contracts caused by different consortium chain implementation technologies.
[0138] The access platform layer is connected to multiple heterogeneous alliance chain gateways in the lower layer through heterogeneous chain gateway routing. Figure 2 takes three alliance chain gateways as examples, namely the distributed ledger alliance chain gateway (Fabric gateway), the financial alliance chain gateway (BCOS gateway) and the Changan Chain gateway.
[0139] Among them, Fabric Gateway (distributed ledger consortium chain gateway) is the access gateway of the consortium chain implemented based on the underlying technology of Hyperledger Fabric (distributed ledger consortium chain); BCOS Gateway (financial consortium chain gateway) is the access gateway of the consortium chain implemented based on the underlying technology of FISCO BCOS (financial consortium chain); Changan Chain Gateway is the access gateway of the consortium chain implemented based on the underlying technology of Changan Chain.
[0140] These heterogeneous consortium chain gateways constitute the heterogeneous consortium chain gateway layer. To simplify implementation, the interfaces between different consortium chain gateways and the access platform layer are consistent. However, different interfaces are permitted. In this case, an adapter module for each consortium chain gateway is required within the heterogeneous chain gateway routing at the access platform layer.
[0141] The above introduction takes the blockchain application accessing the underlying consortium chain as an example. In actual applications, the same type of underlying consortium chains can access each other, and different types of underlying consortium chains can also access each other.
[0142] A consortium chain gateway is only connected to the same underlying consortium chain, logically forming a convergence of the same underlying consortium chains; the data exchange between the same underlying consortium chains only needs to forward the data request through the consortium chain gateway to complete the cross-chain data interaction.
[0143] Taking a financial consortium chain gateway as an example, Figure 4 shows a schematic diagram of the structure of a financial consortium chain gateway provided in some embodiments of the present application. The financial consortium chain gateway includes a data receiving module, a data sending module, a block parsing and encapsulation module, and multiple underlying consortium chain data verification modules. The data receiving module is used to obtain target data sent to the target chain. The block parsing and encapsulation module is used to parse the target data to determine the source chain and target chain of the target data; the target data is then transmitted to the underlying consortium chain data verification module corresponding to the source chain.
[0144] The underlying consortium chain data verification module corresponding to the source chain is used to verify the source of the target data and feed the verified target data back to the block parsing and packaging module. Verifying the source of the target data can verify the authenticity and validity of the data source.
[0145] After receiving the verified target data fed back by the underlying consortium chain data verification module corresponding to the source chain, the block parsing and encapsulation module can call the chain address mapping table to query the address information of the target chain; and transmit the verified target data and the address information of the target chain to the data sending module.
[0146] The data sending module is used to send the verified target data to the target chain based on the verified target data transmitted by the block parsing and encapsulation module and the address information of the target chain.
[0147] Taking a distributed ledger consortium chain gateway as an example, Figure 5 shows a schematic diagram of the structure of a distributed ledger consortium chain gateway provided in some embodiments of the present application. The distributed ledger consortium chain gateway is connected to a block node of each underlying consortium chain of the same type. The distributed ledger consortium chain gateway records the correspondence between the identifier of each underlying consortium chain and the IP address and port number of the block node connected to the distributed ledger consortium chain gateway. For the distributed ledger consortium chain gateway, only one block node of each underlying consortium chain needs to establish a connection with the corresponding consortium chain gateway to achieve the connection between the underlying consortium chain and the consortium chain gateway.
[0148] The distributed ledger consortium chain gateway can record the underlying consortium chain address mapping table. In specific implementations, this underlying consortium chain address mapping table can be stored using key-value pairs. The key field can be the identifier of the underlying consortium chain, such as its ID, and the value field is the IP address and port number of the block node that connects the underlying consortium chain to the consortium chain gateway. The consortium chain gateway can use this value information to generate the interface address for accessing the underlying consortium chain.
[0149] In practical applications, a distributed ledger consortium chain gateway can copy the digital certificate of the underlying consortium chain's block node and configure the relevant interface to connect to a block node of each underlying consortium chain of the same type. The relevant interface can be the underlying consortium chain's Software Development Kit (SDK) interface or command line interface. Alternatively, the consortium chain gateway can connect to the underlying consortium chain's block node through a notary mechanism or cross-chain adapter software.
[0150] There is no direct connection between the two heterogeneous alliance chain gateways, and they need to be transferred through the heterogeneous chain gateway routing of the access platform layer to achieve interconnection. Figure 6 is a structural diagram of a heterogeneous chain gateway routing provided by some embodiments of the present application, including a data receiving module, a data sending module, a plurality of heterogeneous alliance chain block adaptation modules, a block data conversion module and a target chain routing module. Each type of underlying alliance chain has a corresponding block adaptation module. Figure 6 takes the distributed ledger alliance chain block adaptation module, the financial alliance chain block adaptation module and the Changan chain block adaptation module as examples. When heterogeneous underlying alliance chains exchange data, the data request needs to be forwarded to the heterogeneous chain gateway routing of the access platform through the alliance chain gateway to which the source chain belongs. The data receiving module of the heterogeneous chain gateway routing reads the data and calls the block adaptation module of the corresponding source chain according to the block header identification information, and receives the block data and data request fed back by the block adaptation module. The block data conversion module will convert the block data of the source chain into the block format of the target chain. The converted data will be processed by the target chain router module. The target chain router module will query the external access control module to confirm whether the target chain is allowed to access. If allowed, the converted data will be sent by the data sending module to the alliance chain gateway to which the target chain belongs, and forwarded to the target chain through the alliance chain gateway to which the target chain belongs; if not allowed, the data sending module will return an error prompt to the source chain.
[0151] Taking the interaction between two different types of consortium chain gateways as an example, these two types of consortium chain gateways can be referred to as the first consortium chain gateway and the second consortium chain gateway, respectively. The data receiving module of the heterogeneous chain gateway routing is used to receive data requests from the first consortium chain gateway and, based on the block header identification information carried in the data request, forward the data request to the block adapter module corresponding to the first consortium chain gateway. This block header identification information can be used to determine the type of chain from which the data request originated, allowing the selection of a block adapter module that matches the source chain type.
[0152] After receiving the block data and data request fed back by the block adaptation module corresponding to the first alliance chain gateway, the data receiving module can forward the block data and data request to the block data conversion module.
[0153] The block data conversion module is used to convert the block data carried by the data request into the block format of the target chain; and send the block data after block format conversion to the target chain routing module.
[0154] The target link router module is used to receive the block data after block format conversion transmitted by the block data conversion module; if the block data after block format conversion meets the access permission, the target link router module transmits the block data after block format conversion to the data sending module.
[0155] The data sending module is used to send the block data after block format conversion to the second alliance chain gateway to which the target chain belongs.
[0156] In the specific implementation, the target chain routing module can record an underlying chain lookup table and use key-value (key-value pair) to store the underlying chain lookup table. The key field can be the identifier of the underlying chain such as ID, and the value field is the identifier of the alliance chain gateway to which it belongs. The interface address for accessing the alliance chain gateway can be obtained through the identifier of the alliance chain gateway, so that the data sending module can send data to the corresponding alliance chain gateway based on the interface address.
[0157] In practical applications, the target chain router module can query access rights from the access control module of the access platform layer. If it determines that the target chain is allowed access, it will transmit the block data after block format conversion to the data transmission module. If the block data after block format conversion does not meet the access rights, an error message will be transmitted to the data transmission module, and the data transmission module can accordingly feedback the error message to the first consortium chain gateway.
[0158] In some embodiments of the present application, by deploying the access platform layer and the heterogeneous alliance chain gateway layer, a simple multi-chain architecture and multi-chain management structure are provided for the underlying alliance chain, simplifying the complexity of external blockchain application access and heterogeneous chain resource management.
[0159] A consortium chain gateway is only connected to isomorphic underlying consortium chains, logically forming a convergence of isomorphic underlying consortium chain resources. Furthermore, isomorphic underlying consortium chains converge on the isomorphic consortium chain gateway, facilitating the management of consortium chains, data, and resources. Heterogeneous underlying consortium chains are bridged through their respective consortium chain gateways and the heterogeneous chain gateway routing of the access platform layer to enable data interaction between heterogeneous chains within the platform. The data access system provided in the embodiments of the present application can enable upper-layer blockchain applications to access the data and resources of the underlying consortium chain, as well as enable cross-chain data access and interoperability within the platform, resolving the current problems of blockchain information silos and difficulty in mutual access. The access platform layer provides single sign-on and a unified interface set, simplifying the complexity of upper-layer blockchain application access and integration, and reducing the difficulty and cost of blockchain application development.
[0160] As can be seen from the above technical solution, the data access system comprises an access platform layer, a heterogeneous consortium chain gateway layer, and an underlying consortium chain. The access platform layer includes a heterogeneous chain gateway router, enabling interaction with the heterogeneous consortium chain gateway layer. The heterogeneous consortium chain gateway layer includes multiple types of consortium chain gateways; each type of consortium chain gateway is connected to an underlying consortium chain of the same type. The access platform layer is used to receive operation requests issued by blockchain applications through an interface. The operation requests carry the identifier of the target chain to be accessed and forward the operation requests to the consortium chain gateway to the target chain via the heterogeneous chain gateway router. Upon receiving an operation request from the heterogeneous chain gateway router, the consortium chain gateway is used to obtain address information matching the target chain identifier. Based on this address information, it accesses the target chain, performs the operation corresponding to the operation request on the target chain, and transmits the operation results to the blockchain application via the heterogeneous chain gateway router and the matching interface in the access platform layer. In this technical solution, blockchain applications can access the underlying consortium chain through the access platform, shielding against differences in interfaces, data formats, data protocols, and smart contracts caused by different consortium chain implementation technologies. By establishing a unified access platform, the barrier to entry for blockchain applications is lowered, reducing the difficulty and cost of developing blockchain applications. The data access system supports cross-chain data access and interoperability within the platform, resolving the issues of information silos and interoperability between different blockchains and simplifying access to consortium chains. Furthermore, through the heterogeneous consortium chain gateway layer, connections to various underlying consortium chains can be achieved, enabling a single blockchain application to access multiple underlying consortium chains, providing strong support for upper-layer applications involving multiple underlying consortium chains.
[0161] Figure 2 shows an example of deploying one consortium chain gateway of each type. In practice, to enhance platform scalability, multiple consortium chain gateways of the same type can be deployed. Taking the same type of consortium chain gateway as an example, any consortium chain gateway can be selected to route to a heterogeneous chain gateway. For ease of distinction, the consortium chain gateway routed to the heterogeneous chain gateway is referred to as the target consortium chain gateway. The remaining consortium chain gateways of the same type can each be connected to the target consortium chain gateway, and each remaining consortium chain gateway of the same type is connected to the underlying consortium chain to which it belongs.
[0162] Figure 7 is a schematic diagram of the deployment of a distributed ledger consortium chain gateway, provided in some embodiments of the present application. Each consortium chain gateway can connect to multiple isomorphic underlying consortium chains, and isomorphic consortium chain gateways can be interconnected to form a homogeneous chain gateway network. Figure 7 uses three distributed ledger consortium chain gateways as examples: Distributed Ledger Consortium Chain Gateway A, Distributed Ledger Consortium Chain Gateway B, and Distributed Ledger Consortium Chain Gateway C. Consortium chain gateways can record underlying chain lookup tables, using key-value pairs to store these tables. The key field is also the identifier of the underlying chain, such as an ID. Different consortium chain gateways have two types of data in the value field. For Distributed Ledger Consortium Chain Gateway B and Distributed Ledger Consortium Chain Gateway C, the value field they record can include the IP address and port number of a block node on the underlying chain. For Distributed Ledger Consortium Chain Gateway A, the value field they record can be the IP address and port number of the consortium chain gateway to which it belongs. Isomorphic consortium chain gateways can exchange messages, such as forwarding data access requests from the underlying chain.
[0163] In some embodiments of the present application, by deploying multiple homogeneous alliance chain gateways, the scalability of the data access system can be effectively enhanced and the processing capacity of the data access system can be expanded.
[0164] FIG8 is a data access device provided by some embodiments of the present application, comprising a receiving unit 81, a forwarding unit 82, an acquiring unit 83, an executing unit 84, and a feedback unit 85;
[0165] The receiving unit 81 is configured to receive an operation request issued by a blockchain application; wherein the operation request carries an identifier of a target chain to be accessed;
[0166] The forwarding unit 82 is used to forward the operation request to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing;
[0167] The acquisition unit 83 is used to obtain address information matching the identifier of the target chain when the alliance chain gateway receives the operation request sent by the heterogeneous chain gateway router;
[0168] An execution unit 84 is configured to access a target chain based on the address information to execute an operation corresponding to the operation request on the target chain;
[0169] The feedback unit 85 is used to feed back the operation results to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0170] In some embodiments of the present application, it further includes:
[0171] Obtain the target underlying consortium chain that meets the access requirements of blockchain applications;
[0172] Obtain the block data of the target underlying consortium chain;
[0173] Call the contract interface function to operate the ledger data recorded on the target underlying consortium chain.
[0174] In some embodiments of the present application, a permission opening unit is further included;
[0175] The permission opening unit is used to receive user identity information sent by the blockchain application, and open access rights to the blockchain application when the user identity information matches the pre-recorded identity information.
[0176] In some embodiments of the present application, a first judgment unit and a second judgment unit are further included;
[0177] A first judgment unit is used to judge whether the blockchain application that issues the operation request has opened access rights;
[0178] The second judgment unit is used to judge whether the target chain accessed by the operation request belongs to the underlying consortium chain included in the access permission when the blockchain application that issues the operation request has opened access permission; if the target chain accessed by the operation request belongs to the underlying consortium chain included in the access permission, triggering the forwarding unit to execute the step of forwarding the operation request to the consortium chain gateway to which the target chain belongs through the heterogeneous chain gateway routing;
[0179] The feedback unit is also used to feedback a prompt message indicating that the blockchain application does not have access rights when the blockchain application that issues the operation request does not open access rights or the target chain accessed by the operation request does not belong to the underlying consortium chain included in the access rights.
[0180] In some embodiments of the present application, a first recording unit is further included;
[0181] The first recording unit is used to record the correspondence between the user identity information and the identifier of the underlying alliance chain with access rights.
[0182] In some embodiments of the present application, a second recording unit is further included;
[0183] The second recording unit is used to record the correspondence between the user identity information and the channel or group of the underlying alliance chain with access rights.
[0184] In some embodiments of the present application, the execution unit is configured to access the target chain based on the address information to obtain the required target data;
[0185] Correspondingly, the feedback unit is used to feed back the target data to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0186] In some embodiments of the present application, a parsing unit, a verification unit, a query unit and a sending unit are further included;
[0187] A parsing unit, configured to parse the acquired target data to determine a source chain and a target chain of the target data;
[0188] A verification unit, used to verify the source of the target data based on the source chain of the target data to obtain the verified target data;
[0189] A query unit, used to call the chain address mapping table to query the address information of the target chain;
[0190] The sending unit is used to send the verified target data to the target chain according to the address information of the target chain.
[0191] In some embodiments of the present application, a conversion unit and a sending unit are further included;
[0192] The receiving unit is further configured to receive a data request sent by the first alliance chain gateway;
[0193] The acquisition unit is further configured to acquire block data according to the block header identification information carried in the data request;
[0194] The conversion unit is used to convert block data into the block format of the target chain;
[0195] The sending unit is used to send the block data after the block format conversion to the second alliance chain gateway to which the target chain belongs when the block data after the block format conversion meets the access permission; wherein the first alliance chain gateway and the second alliance chain gateway belong to two different types of gateways.
[0196] In some embodiments of the present application, the sending unit is used to query access rights from the access control module of the access platform layer, and when it is determined that the target chain is allowed to access, the block data after block format conversion is sent to the second alliance chain gateway to which the target chain belongs.
[0197] In some embodiments of the present application, the feedback unit is further configured to feed back an error message to the first alliance chain gateway when the block data after block format conversion does not meet the access rights.
[0198] For the description of the features in some embodiments of the present application corresponding to Figure 8, please refer to the relevant description of some embodiments of the present application corresponding to Figures 1 to 7, and no further details will be given here.
[0199] As can be seen from the above technical solution, an operation request from a blockchain application is received, containing the identifier of the target chain to be accessed. The operation request is then forwarded to the consortium chain gateway to which the target chain belongs via the heterogeneous chain gateway router. Upon receiving the operation request from the heterogeneous chain gateway router, the consortium chain gateway obtains address information matching the target chain identifier. Based on this address information, the target chain is accessed, the operation corresponding to the operation request is performed on the target chain, and the operation result is fed back to the blockchain application via the heterogeneous chain gateway router and the matching interface in the access platform layer. In this technical solution, blockchain applications can access the underlying consortium chain through the access platform, shielding against differences in interfaces, data formats, data protocols, and smart contracts caused by different consortium chain implementation technologies. By establishing a unified access platform, the access threshold for blockchain applications is lowered, reducing the difficulty and cost of developing blockchain applications. Using heterogeneous chain gateway routers and different types of consortium chain gateways, cross-chain data access and interoperability within the platform are supported, resolving the issue of information silos and interoperability between different blockchains and simplifying consortium chain access. In addition, different types of consortium chain gateways can achieve connections with multiple types of underlying consortium chains, thereby supporting a blockchain application to access multiple underlying consortium chains, providing good support for some upper-level applications involving multiple underlying consortium chains.
[0200] FIG9 is a flowchart of a data access method provided in some embodiments of the present application, which is applicable to an access device interacting with a blockchain application. The method includes:
[0201] S901: Receive an operation request issued by a blockchain application.
[0202] The operation request carries the identifier of the target chain to be accessed.
[0203] S902: Forward the operation request to the alliance chain gateway to which the target chain belongs, so that the alliance chain gateway can obtain the address information that matches the identifier of the target chain; access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feedback the operation result to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0204] For the description of the features in some embodiments of the present application corresponding to Figure 9, please refer to the relevant description of some embodiments of the present application corresponding to Figures 1 to 8, and will not be repeated here.
[0205] As can be seen from the above technical solution, an access device interacting with a blockchain application receives an operation request issued by the blockchain application; the operation request carries the identifier of the target chain to be accessed; the operation request is forwarded to the consortium chain gateway to which the target chain belongs, so that the consortium chain gateway can obtain address information matching the target chain identifier; based on the address information, the target chain is accessed to perform the operation corresponding to the operation request on the target chain, and the operation result is fed back to the blockchain application via the heterogeneous chain gateway routing and the matching interface in the access platform layer. In this technical solution, the blockchain application can interact directly with the access device, and the access device can access the underlying consortium chain through the consortium chain gateway. For blockchain applications, this shields the differences in interfaces, data formats, data protocols, and smart contracts caused by different consortium chain implementation technologies, lowering the access threshold for blockchain applications and reducing the difficulty and cost of blockchain application development. Furthermore, based on the access device and the consortium chain gateway, cross-chain data access and interoperability within the platform can be achieved, solving the problem of information silos and interoperability between different blockchains, and reducing the difficulty of consortium chain access.
[0206] FIG10 is a schematic diagram of the structure of a data access device provided in some embodiments of the present application, which is suitable for use as an access device for interacting with blockchain applications; the device includes a receiving unit 1001 and a forwarding unit 1002;
[0207] Receiving unit 1001, configured to receive an operation request issued by a blockchain application; wherein the operation request carries an identifier of a target chain to be accessed;
[0208] Forwarding unit 1002 is used to forward the operation request to the alliance chain gateway to which the target chain belongs, so that the alliance chain gateway obtains address information matching the identifier of the target chain; accesses the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feeds back the operation result to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
[0209] For the description of the features in some embodiments of the present application corresponding to Figure 10, please refer to the relevant description of some embodiments of the present application corresponding to Figures 1 to 9, and will not be repeated here.
[0210] As can be seen from the above technical solution, an access device interacting with a blockchain application receives an operation request issued by the blockchain application; the operation request carries the identifier of the target chain to be accessed; the operation request is forwarded to the consortium chain gateway to which the target chain belongs, so that the consortium chain gateway can obtain address information matching the target chain identifier; based on the address information, the target chain is accessed to perform the operation corresponding to the operation request on the target chain, and the operation result is fed back to the blockchain application via the heterogeneous chain gateway routing and the matching interface in the access platform layer. In this technical solution, the blockchain application can interact directly with the access device, and the access device can access the underlying consortium chain through the consortium chain gateway. For blockchain applications, this shields the differences in interfaces, data formats, data protocols, and smart contracts caused by different consortium chain implementation technologies, lowering the access threshold for blockchain applications and reducing the difficulty and cost of blockchain application development. Furthermore, based on the access device and the consortium chain gateway, cross-chain data access and interoperability within the platform can be achieved, solving the problem of information silos and interoperability between different blockchains, and reducing the difficulty of consortium chain access.
[0211] FIG11 is a flowchart of a data access method provided in some embodiments of the present application, which is applicable to devices deployed with various types of alliance chain gateways. The method includes:
[0212] S1101: Receive an operation request sent by an access device; wherein the operation request carries an identifier of a target chain to be accessed.
[0213] S1102: Acquire address information that matches the identifier of the target chain.
[0214] S1103: Access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain.
[0215] S1104: Feedback the operation results to the blockchain application through the access device.
[0216] For the description of the features in some embodiments of the present application corresponding to Figure 11, please refer to the relevant description of some embodiments of the present application corresponding to Figures 1 to 8, and will not be repeated here.
[0217] As can be seen from the above technical solution, a device deployed with various types of consortium chain gateways can receive operation requests sent by access devices, where the operation requests carry the identifier of the target chain to be accessed. The device then obtains address information matching the target chain's identifier, accesses the target chain based on the address information, and performs the operation corresponding to the operation request on the target chain. The operation results are then fed back to the blockchain application via the access device. In this technical solution, devices deployed with various types of consortium chain gateways can interact directly with the access device, lowering the barrier for blockchain applications to access the underlying consortium chain. By deploying various types of consortium chain gateways, cross-chain data access and interoperability within the platform are achieved, resolving the issue of information silos and interoperability between different blockchains and reducing the complexity of consortium chain access. Furthermore, various types of consortium chain gateways can connect to multiple types of underlying consortium chains, enabling a single blockchain application to access multiple underlying consortium chains, providing strong support for upper-layer applications that involve multiple underlying consortium chains.
[0218] FIG12 is a schematic diagram of the structure of a data access device provided in some embodiments of the present application, which is applicable to devices deployed with various types of alliance chain gateways. The device includes a receiving unit 1201, an acquiring unit 1202, an operating unit 1203, and a feedback unit 1204;
[0219] The receiving unit 1201 is configured to receive an operation request sent by an access device; wherein the operation request carries an identifier of a target chain to be accessed;
[0220] An acquiring unit 1202 is configured to acquire address information matching the identifier of the target chain;
[0221] The operation unit 1203 is configured to access the target chain based on the address information to perform an operation corresponding to the operation request on the target chain;
[0222] Feedback unit 1204 is used to feed back the operation results to the blockchain application through the access device.
[0223] For the description of the features in some embodiments of the present application corresponding to Figure 12, please refer to the relevant description of some embodiments of the present application corresponding to Figures 1 to 11, and no further details will be given here.
[0224] As can be seen from the above technical solution, a device deployed with various types of consortium chain gateways can receive operation requests sent by access devices, where the operation requests carry the identifier of the target chain to be accessed. The device then obtains address information matching the target chain's identifier, accesses the target chain based on the address information, and performs the operation corresponding to the operation request on the target chain. The operation results are then fed back to the blockchain application via the access device. In this technical solution, devices deployed with various types of consortium chain gateways can interact directly with the access device, lowering the barrier for blockchain applications to access the underlying consortium chain. By deploying various types of consortium chain gateways, cross-chain data access and interoperability within the platform are achieved, resolving the issue of information silos and interoperability between different blockchains and reducing the complexity of consortium chain access. Furthermore, various types of consortium chain gateways can connect to multiple types of underlying consortium chains, enabling a single blockchain application to access multiple underlying consortium chains, providing strong support for upper-layer applications that involve multiple underlying consortium chains.
[0225] It is understandable that if the data access method in some embodiments of the present application is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a non-volatile readable storage medium to execute all or part of the steps of the various embodiments of the present application. The aforementioned non-volatile readable storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk, etc. Various media that can store program codes.
[0226] Based on this, some embodiments of the present application further provide a non-volatile readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data access method are implemented.
[0227] In some embodiments of the present application, the functions of each functional module of the non-volatile readable storage medium can be specifically implemented according to the method in the above method embodiment. The specific implementation process can refer to the relevant description of the above method embodiment and will not be repeated here.
[0228] The above describes in detail a data access method, device, system, and non-volatile readable storage medium provided by some embodiments of the present application. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to in conjunction with each other. For the devices disclosed in some embodiments of the present application, since they correspond to the methods disclosed in some embodiments of the present application, the description is relatively simple, and the relevant parts can be referred to the method section.
[0229] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with some embodiments of the present application disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the composition and steps of each example according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0230] The above is a detailed introduction to a data access method, device, system and non-volatile readable storage medium provided by the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The above description of some embodiments of the present application is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A data access method, characterized in that: Applicable to devices deployed with access platform layer and heterogeneous alliance chain gateway layer, the method includes: Receive an operation request issued by a blockchain application; wherein the operation request carries an identifier of a target chain to be accessed; Forwarding the operation request to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing; When the alliance chain gateway receives the operation request sent by the heterogeneous chain gateway routing, obtain address information matching the identifier of the target chain; The target chain is accessed based on the address information to perform the operation corresponding to the operation request on the target chain, and the operation result is fed back to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
2. The data access method according to claim 1, characterized in that: Also includes: Obtain the target underlying consortium chain that meets the access requirements of blockchain applications; Obtain block data of the target underlying consortium chain; Call the contract interface function to operate the ledger data recorded on the target underlying consortium chain.
3. The data access method according to claim 1, characterized in that: Also includes: Receive user identity information sent by the blockchain application, and open access rights to the blockchain application when the user identity information matches the pre-recorded identity information.
4. The data access method according to claim 3, characterized in that: Before forwarding the operation request to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing, the method further includes: Determine whether the blockchain application that issued the operation request has opened access rights; In the case where the blockchain application that issues the operation request has opened access rights, determining whether the target chain accessed by the operation request belongs to the underlying consortium chain included in the access rights; In the case where the target chain accessed by the operation request belongs to the underlying alliance chain included in the access permission, the step of forwarding the operation request to the alliance chain gateway to which the target chain belongs through heterogeneous chain gateway routing is performed; If the blockchain application that issues the operation request does not open access rights or the target chain accessed by the operation request does not belong to the underlying alliance chain included in the access rights, a prompt message indicating that the access rights are not granted is fed back to the blockchain application.
5. The data access method according to claim 3, characterized in that: After opening access rights for the blockchain application, it also includes: Record the correspondence between the user identity information and the identifier of the underlying alliance chain with access rights.
6. The data access method according to claim 3, characterized in that: After opening access rights for the blockchain application, it also includes: The correspondence between the user identity information and the channels or groups of the underlying alliance chain with access rights is recorded.
7. The data access method according to claim 1, characterized in that: In the case where the operation request is a data read request; accessing the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feeding back the operation result to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer includes: Access the target chain based on the address information to obtain the required target data; and Feedback is given to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
8. The data access method according to claim 1, characterized in that: Also includes: Parsing the acquired target data to determine a source chain and a target chain of the target data; According to the source chain of the target data, verify the source of the target data to obtain the verified target data; Calling the chain address mapping table to query the address information of the target chain; According to the address information of the target chain, the verified target data is sent to the target chain.
9. The data access method according to claim 1, characterized in that: Also includes: Receive a data request sent by the first alliance chain gateway; Obtain block data according to the block header identification information carried in the data request; Convert the block data into the block format of the target chain; When the block data after the block format conversion meets the access rights, the block data after the block format conversion is sent to the second alliance chain gateway to which the target chain belongs; wherein the first alliance chain gateway and the second alliance chain gateway belong to two different types of gateways.
10. The data access method according to claim 9, characterized in that: When the block data after the block format conversion satisfies the access rights, sending the block data after the block format conversion to the second alliance chain gateway to which the target chain belongs includes: The access permission is queried from the access control module of the access platform layer, and when it is determined that the target chain is allowed to be accessed, the block data after the block format conversion is sent to the second alliance chain gateway to which the target chain belongs.
11. The data access method according to claim 9, characterized in that: Also includes: When the block data after the block format conversion does not satisfy the access rights, an error prompt is fed back to the first alliance chain gateway.
12. A data access device, characterized in that: Applicable to devices deployed with access platform layer and heterogeneous alliance chain gateway layer, the access platform layer includes heterogeneous chain gateway routing, identity authentication module, access control module, chain and channel interface module, on-chain data access interface module and contract access interface module, the device includes receiving unit, forwarding unit, acquisition unit, execution unit and feedback unit; The receiving unit is used to receive an operation request issued by a blockchain application; wherein the operation request carries an identifier of a target chain to be accessed; The forwarding unit is used to forward the operation request to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing; The acquisition unit is used to acquire address information matching the identifier of the target chain when the alliance chain gateway receives the operation request sent by the heterogeneous chain gateway routing; The execution unit is configured to access the target chain based on the address information to execute the operation corresponding to the operation request on the target chain; The feedback unit is used to feed back the operation results to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
13. A data access system, characterized in that: It includes an access platform layer, a heterogeneous alliance chain gateway layer and an underlying alliance chain; wherein the access platform layer includes a heterogeneous chain gateway routing, an identity authentication module, an access control module, a chain and channel interface module, an on-chain data access interface module and a contract access interface module; the heterogeneous alliance chain gateway layer includes multiple types of alliance chain gateways; each type of alliance chain gateway is connected to the underlying alliance chain of the same type; The access platform layer is used to receive an operation request issued by a blockchain application through an interface; wherein the operation request carries an identifier of the target chain to be accessed; and forward the operation request to the alliance chain gateway to which the target chain belongs through the heterogeneous chain gateway routing; The alliance chain gateway is used to obtain address information matching the identifier of the target chain upon receiving an operation request sent by the heterogeneous chain gateway router; access the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feed back the operation result to the blockchain application through the heterogeneous chain gateway router and the matching interface in the access platform layer.
14. The data access system according to claim 13, characterized in that: The heterogeneous alliance chain gateway layer includes a distributed ledger alliance chain gateway, a financial alliance chain gateway and a Changan chain gateway.
15. The data access system according to claim 13, characterized in that: There are multiple alliance chain gateways of the same type, among which a target alliance chain gateway is routed and connected to the heterogeneous chain gateway; the remaining alliance chain gateways of the same type are respectively connected to the target alliance chain gateway, and the remaining alliance chain gateways of the same type are connected to the underlying alliance chain to which they belong.
16. A data access method, characterized in that: An access device suitable for interacting with a blockchain application; the method comprising: Receive an operation request issued by a blockchain application; wherein the operation request carries an identifier of a target chain to be accessed; The operation request is forwarded to the alliance chain gateway to which the target chain belongs, so that the alliance chain gateway obtains the address information matching the identifier of the target chain; the target chain is accessed based on the address information to perform the operation corresponding to the operation request on the target chain, and the operation result is fed back to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
17. A data access device, characterized in that: An access device suitable for interacting with a blockchain application; the device comprises a receiving unit and a forwarding unit; The receiving unit is used to receive an operation request issued by a blockchain application; wherein the operation request carries an identifier of a target chain to be accessed; The forwarding unit is used to forward the operation request to the alliance chain gateway to which the target chain belongs, so that the alliance chain gateway obtains address information matching the identifier of the target chain; accesses the target chain based on the address information to perform the operation corresponding to the operation request on the target chain, and feeds back the operation result to the blockchain application through the heterogeneous chain gateway routing and the matching interface in the access platform layer.
18. A data access method, characterized in that: Applicable to a device with multiple types of alliance chain gateways deployed, the method includes: Receiving an operation request sent by an access device; wherein the operation request carries an identifier of a target chain to be accessed; Acquire address information matching the identifier of the target chain; Accessing the target chain based on the address information to perform the operation corresponding to the operation request on the target chain; The operation result is fed back to the blockchain application through the access device.
19. A data access device, characterized in that: Applicable to a device with multiple types of alliance chain gateways deployed, the device includes a receiving unit, an acquisition unit, an operation unit and a feedback unit; The receiving unit is used to receive an operation request sent by an access device; wherein the operation request carries an identifier of a target chain to be accessed; The acquisition unit is used to acquire address information matching the identifier of the target chain; The operation unit is configured to access the target chain based on the address information to perform an operation corresponding to the operation request on the target chain; The feedback unit is used to feed back the operation result to the blockchain application through the access device.
20. A non-volatile readable storage medium, characterized in that: The non-volatile readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data access method according to any one of claims 1 to 11, claim 16 and / or claim 18 are implemented.
Citation Information
Patent Citations
Block chain network system and information processing method
CN109347955A
Alliance chain-oriented block chain access system and implementation method thereof
CN110163751A
Alliance chain supervision system-oriented addressing route synchronization method and related device
CN113242317A
Cross-chain processing method, device and system between heterogeneous chains, and electronic equipment
CN113807960A
Data access method, device and system and medium
CN116016523A
Cited By
Data interaction method and control device thereof, computer equipment and system
CN119382968A
Integrated system of heterogeneous block chain platform and function calling method
CN121388047A
