Blockchain oracle network, data interaction method, device and medium

Through the multi-layer network model of main network + subnet and the exchange Byzantine fault tolerance algorithm, the problems of block chain system enclosure and data interoperability are solved, and stable and reliable blockchain oracle services are realized to adapt to the diverse data sharing needs and Avoid single point of failure.

CN115314496BActive Publication Date: 2025-01-03CHINA TELECOM CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210952081.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-09
Publication Date
2025-01-03
Estimated Expiration
2042-08-09

AI Technical Summary

Technical Problem

Since smart contracts can only be triggered passively, the blockchain system is closed and cannot effectively communicate with real-world data. The centralized blockchain oracle service cannot meet the needs of data sharing and exchange.

Method used

Using the multi-layer network model of main network + subnet, the main network of blockchain oracle machine and the distributed deployment of multiple blockchain oracle machine subnets are responsible for the core services and specific services of data sharing and exchange. The main network synchronously summarizes the subnet The network state data is used to realize cross-chain interaction and adopt a consensus mechanism based on the exchange Byzantine fault tolerance algorithm.

Benefits of technology

Achieve stable and reliable blockchain oracle services, break through the data barriers between blockchain and the real world, provide fast, reliable and secure off-chain data services, adapt to diversified data sharing and exchange needs, and avoid single points Failure and high scalability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115314496B_ABST
    Figure CN115314496B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of blockchain technology, and provides a blockchain oracle network, a data interaction method, a device and a medium. The blockchain oracle network includes: a blockchain oracle main network; a plurality of distributedly deployed blockchain oracle subnets, which communicate with the blockchain oracle main network respectively; the blockchain oracle main network and each blockchain oracle subnet respectively provide data interaction services to the blockchain clients connected to them based on the consensus mechanism and the external resource nodes connected to them respectively. The blockchain oracle solution of the present invention adopts a multi-layer network model of main network + subnet, and realizes that the blockchain oracle main network and the distributedly deployed plurality of blockchain oracle subnets are respectively responsible for the core business of the data sharing and exchange blockchain platform and various specific data sharing and exchange businesses, and the blockchain oracle main network can synchronously summarize the network status data of each blockchain oracle subnet, so as to realize stable and reliable blockchain oracle services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of blockchain technology, and in particular to a blockchain oracle network, a data interaction method, a device and a medium. Background Art

[0002] In the context of big data, the security and privacy issues in the process of data sharing and exchange can be solved through blockchain technology to achieve the purpose of open sharing, traceability, and non-tampering in the data exchange process. However, the characteristic that smart contracts can only be triggered passively leads to the closed nature of the blockchain system. There are barriers between the blockchain network and the data flow in the real world, and they cannot intersect, which seriously hinders the exchange and sharing of data between different entities through the blockchain network in a secure and traceable manner. Therefore, in the data exchange scenario, it is crucial to promote the interconnection and interoperability of on-chain and off-chain data.

[0003] A blockchain oracle is a mechanism that writes data outside the blockchain into the blockchain. It allows smart contracts to reflect the outside world of the blockchain, completing the data exchange between the blockchain network and the real world. It is an interface for data interaction between the blockchain and the real world.

[0004] Currently, centralized blockchain oracle services are mostly used. The acquisition of external data sources of the blockchain must all be achieved through this centralized oracle system. As the scope of data sharing and exchange becomes larger and larger, centralized blockchain oracle services can no longer meet the rich data sharing and exchange needs.

[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention

[0006] In view of this, the present invention provides a blockchain oracle network, a data interaction method, a device and a medium, which adopts a main network + subnet multi-layer network model to realize that the blockchain oracle main network and multiple distributedly deployed blockchain oracle subnets are responsible for the core business of the data sharing and exchange blockchain platform and various specific data sharing and exchange businesses respectively, and the blockchain oracle main network can synchronously summarize the network status data of each blockchain oracle subnet, assist cross-chain interaction between blockchain oracle subnets, and realize stable and reliable blockchain oracle services.

[0007] According to one aspect of the present invention, there is provided a blockchain oracle network, comprising: a blockchain oracle main network; a plurality of distributedly deployed blockchain oracle subnets, each communicating with the blockchain oracle main network; the blockchain oracle main network and each of the blockchain oracle subnets respectively providing data interaction services to their respective connected blockchain clients based on a consensus mechanism and according to their respective connected external resource nodes.

[0008] In some embodiments, the blockchain oracle main network and the oracle nodes in each of the blockchain oracle subnets include consensus nodes; the consensus nodes are used to perform data consensus to provide corresponding data interaction services.

[0009] In some embodiments, the blockchain oracle main network also consensuses the network status data of multiple blockchain oracle subnets based on a consensus mechanism.

[0010] In some embodiments, the oracle node in the blockchain oracle main network includes a main network anchor node, and the oracle node in each of the blockchain oracle subnets includes a subnet anchor node; the subnet anchor node of each of the blockchain oracle subnets is used to synchronize the consensus result of the blockchain oracle subnet to the corresponding main network anchor node, so that the blockchain oracle main network can consensus on the network status data of multiple blockchain oracle subnets.

[0011] In some embodiments, a secure communication channel is established between the subnet anchor node of each of the blockchain oracle subnets and the corresponding mainnet anchor node; the subnet anchor node is used to synchronize the consensus result through the corresponding secure communication channel.

[0012] In some embodiments, the blockchain oracle mainnet also supports cross-chain interactions between multiple blockchain oracle subnets.

[0013] In some embodiments, the consensus mechanism adopts a consensus mechanism based on an exchange Byzantine fault-tolerant algorithm.

[0014] According to another aspect of the present invention, a data interaction method is provided, based on the blockchain oracle network as described in any of the above embodiments, the data interaction method comprising: a consensus node in a blockchain oracle system responds to a data request from a blockchain client connected to the blockchain oracle system; the consensus node obtains the consensus result of the blockchain oracle system based on a consensus mechanism, and returns it to the blockchain client as consensus response data; wherein the blockchain oracle system is the blockchain oracle main network or the blockchain oracle subnet.

[0015] In some embodiments, the consensus node obtains the consensus result of the blockchain oracle system based on a consensus mechanism, including: the consensus node forwards the data request to the remaining consensus nodes in the blockchain oracle system; each of the remaining consensus nodes obtains response data based on the data request from the external resource nodes to which they are connected, and returns it to the consensus node; the consensus node obtains the consensus result based on aggregating the response data returned by each of the remaining consensus nodes.

[0016] In some embodiments, the consensus nodes in the blockchain oracle system take turns responding to data requests from blockchain clients connected to the blockchain oracle system.

[0017] In some embodiments, the data interaction method also includes: each of the blockchain oracle subnets periodically synchronizes the obtained consensus results to the blockchain oracle main network; the blockchain oracle main network, based on a consensus mechanism, reaches consensus on the consensus results of the network status data representing each of the blockchain oracle subnets.

[0018] In some embodiments, the data interaction method also includes: when any blockchain oracle subnet fails, the blockchain oracle main network forwards the data request in the failed blockchain oracle subnet to the remaining blockchain oracle subnets.

[0019] According to another aspect of the present invention, there is provided a computer device, comprising: a distributed processor; a memory, wherein the memory stores executable instructions; wherein when the executable instructions are executed by the distributed processor, the data interaction method as described in any of the above embodiments is implemented.

[0020] According to another aspect of the present invention, a computer-readable storage medium is provided for storing a program, wherein the program, when executed by a distributed processor, implements the data interaction method as described in any of the above embodiments.

[0021] The beneficial effects of the present invention compared with the prior art include at least:

[0022] The blockchain oracle solution of the present invention adopts a multi-layer network model of main network + subnet, and realizes that the core business of the data sharing and exchange blockchain platform and various specific data sharing and exchange businesses are respectively responsible for the blockchain oracle main network and multiple distributedly deployed blockchain oracle subnets. The blockchain oracle main network can synchronously summarize the network status data of each blockchain oracle subnet, assist cross-chain interaction between blockchain oracle subnets, and realize stable and reliable blockchain oracle services.

[0023] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present invention, and together with the specification are used to explain the principles of the present invention. Obviously, the accompanying drawings described below are only some embodiments of the present invention, and for those of ordinary skill in the art, other accompanying drawings can be obtained based on these accompanying drawings without creative work.

[0025] Figure 1 A network model diagram of a blockchain oracle network in an embodiment of the present invention is shown;

[0026] Figure 2 A schematic diagram showing an architecture in which a blockchain oracle network is connected to an external resource node in an embodiment of the present invention;

[0027] Figure 3 A schematic diagram of data interaction between a blockchain oracle main network and a blockchain oracle subnet in an embodiment of the present invention is shown;

[0028] Figure 4 A schematic diagram showing the steps of a data interaction method based on a blockchain oracle network in an embodiment of the present invention is shown;

[0029] Figure 5 A consensus flow chart of a data interaction method based on a blockchain oracle network in an embodiment of the present invention is shown;

[0030] Figure 6 A schematic diagram showing the structure of a computer device in an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0031] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the embodiments set forth herein. Instead, these embodiments are provided to make the present invention comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art.

[0032] The accompanying drawings are only schematic illustrations of the present invention and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0033] In addition, the processes shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps can be decomposed, some steps can be combined or partially combined, and the actual execution order may change according to the actual situation. It should be noted that the embodiments of the present invention and the features in different embodiments can be combined with each other without conflict.

[0034] Oracles are an important component of building a blockchain-based data sharing and trading platform, providing off-chain data support for blockchains and on-chain smart contracts. In the context of research on data element value technology, the present invention proposes a blockchain oracle network solution in a data sharing and exchange scenario. The blockchain oracle solution of the present invention can serve as a bridge connecting the blockchain network with the real world, effectively strengthening the exchange and circulation of on-chain and off-chain data, and solving the pain point that the blockchain-based data sharing and exchange network is closed and difficult to obtain external data. The blockchain oracle solution of the present invention adopts a decentralized blockchain oracle network to provide a unified general data protocol for off-chain data for different data sharing and exchange systems, and provide the data exchange market with fast, reliable and secure off-chain data services to supplement and enhance the data sharing and exchange system built on the blockchain as the underlying layer.

[0035] Figure 1 The network model of the blockchain oracle network in one embodiment is shown, referring to Figure 1 As shown, in this embodiment, the blockchain oracle network includes:

[0036] The blockchain oracle main network 110; multiple blockchain oracle subnets 120 deployed in a distributed manner, communicating with the blockchain oracle main network 110 respectively; the blockchain oracle main network 110 and each blockchain oracle subnet 120 provide data interaction services to their respective connected blockchain clients based on the consensus mechanism and according to their respective connected external resource nodes.

[0037] The above-mentioned blockchain oracle solution adopts a multi-layer network model of main network + subnet, and realizes that the core business of the data sharing and exchange blockchain platform and various specific data sharing and exchange businesses are respectively responsible for the blockchain oracle main network 110 and multiple distributed blockchain oracle subnets 120. The blockchain oracle main network 110 can synchronously summarize the network status data of each blockchain oracle subnet 120, assist cross-chain interaction between blockchain oracle subnets 120, and realize stable and reliable blockchain oracle services.

[0038] Due to the variety of scenarios for data sharing and exchange, the oracle services required for different data sharing and exchange businesses are also different. With the rapid development and growth of the data sharing and exchange market, blockchain language machines need to cope with more and more application requirements. Therefore, oracle services also need to be able to complete simple and efficient expansion to adapt to various potential unknown forms. The blockchain oracle solution of the multi-layer network model of the main network + subnet is adopted, so that the blockchain oracle main network 110 is responsible for the core business of the data sharing and exchange platform built based on blockchain technology, and each blockchain oracle subnet 120 serves the data sharing and exchange business in a specific field according to customized business needs, that is, it is responsible for the various branch businesses of the data sharing and exchange platform built based on blockchain technology.

[0039] The above-mentioned mainnet + subnet hierarchical network model also has the following flexibility: Data flexibility: The blockchain oracle network is universal and can support different methods of data retrieval and aggregation, which may include unauthorized, publicly available data, and data protected by trusted third parties; Application scalability: Scalability refers to the high throughput and low response latency of the blockchain oracle network. Even when the network nodes are overloaded or there is a large-scale traffic surge, the application can still provide stable services.

[0040] Figure 2 The architecture of a blockchain oracle network connected to an external resource node in one embodiment is shown, referring to Figure 2 As shown, the blockchain oracle network 200 is capable of connecting to a large number of external resource nodes, including access entities, software resources, and hardware resources.

[0041] Access Entities: These include registered users and regulators who use oracles to provide or obtain services.

[0042] Software resources: Provide various software services, such as Web services, blockchain clients, artificial intelligence algorithms, storage services, and various data services such as weather data, etc. These software services continuously provide various rich data for the blockchain oracle network 200 to constitute the core functions of the blockchain oracle network 200.

[0043] Hardware resources: Provide basic computing power and storage device hardware support for the blockchain oracle network 200, such as computing power equipment, databases, etc.

[0044] In one embodiment, the oracle nodes in the blockchain oracle main network and each blockchain oracle subnet include consensus nodes; the consensus nodes are used to perform data consensus to provide corresponding data interaction services.

[0045] In the blockchain oracle main network / blockchain oracle subnet, most oracle nodes are consensus nodes. The consensus mechanism mentioned above can specifically adopt a consensus mechanism based on the exchange Byzantine Fault Tolerance (xBFT) algorithm.

[0046] Furthermore, in one embodiment, the blockchain oracle mainnet also consensuses the network status data of multiple blockchain oracle subnets based on a consensus mechanism (e.g., the xBFT consensus mechanism).

[0047] Specifically, the oracle nodes in the blockchain oracle mainnet include mainnet anchor nodes, and the oracle nodes in each blockchain oracle subnet include subnet anchor nodes; the subnet anchor node of each blockchain oracle subnet is used to synchronize the consensus results of the blockchain oracle subnet to the corresponding mainnet anchor node, so that the blockchain oracle mainnet can consensus on the network status data of multiple blockchain oracle subnets.

[0048] A secure communication channel is established between the subnet anchor node of each blockchain oracle subnet and the corresponding mainnet anchor node; the subnet anchor node is used to synchronize the consensus results through the corresponding secure communication channel.

[0049] Figure 3 The data interaction scenario between the blockchain oracle main network and the blockchain oracle subnet in one embodiment is shown, referring to Figure 3 As shown in the figure, the data interaction between the main network and the subnet includes:

[0050] The blockchain oracle subnet 120 reaches consensus on the data status of each oracle in its business network based on the xBFT consensus mechanism to obtain a consensus result; each blockchain oracle subnet 120 has multiple oracle nodes, including a majority of consensus nodes and a minority of subnet anchor nodes 310. The consensus node is responsible for the data consensus of the subnet and synchronizes the consensus result to the subnet anchor node 310;

[0051] The subnet anchor node 310 establishes a secure communication channel with the mainnet anchor node 320, and sends the consensus results within a period of time, that is, the network status data of the subnet, to the mainnet anchor node 320;

[0052] Each mainnet anchor node 320 uses the received subnet consensus result as the data content that requires consensus, and conducts consensus based on the xBFT consensus mechanism in the blockchain oracle mainnet 110, thereby achieving consensus on various business data in the subnet and consensus on the network status data of each subnet in the mainnet.

[0053] In the above embodiments, the blockchain oracle mainnet also supports cross-chain interaction between multiple blockchain oracle subnets, and can realize data interaction through other blockchain oracle subnets when a blockchain oracle subnet fails.

[0054] In summary, the blockchain oracle network of the present invention is different from the traditional centralized oracle solution for processing off-chain data. It adopts a decentralized blockchain oracle solution, which can effectively avoid the problems of single point failure and single point attack; the blockchain oracle network of the present invention is oriented to data sharing transaction scenarios built on blockchain, and has the characteristics of strong adaptability and low cost of use. At the same time, a consensus mechanism is designed specifically, which can serve as a security anchor for the oracle network to make the states between network nodes consistent; and the blockchain oracle network model of the present invention adopts a layered network architecture and uniquely designs the main network + subnet form, so that the oracle system can meet more data sharing and exchange scenarios, and is easy to expand and highly flexible.

[0055] When constructing the blockchain oracle network of the present invention, in order to meet the data sharing and exchange scenarios, the blockchain oracle network has the characteristics of high throughput and low latency, so that in the data sharing and exchange scenarios, even when the traffic overflows or the network node scale is large, it can still provide stable services. The blockchain oracle network of the present invention can specifically meet the following characteristics:

[0056] Strong stability: The blockchain oracle network can continue to provide reliable services even when attacked, without denial of service or downtime;

[0057] High response speed: Data requests from the blockchain oracle network can be responded to promptly by network nodes;

[0058] High precision: The blockchain oracle network can provide accurate data, with higher accuracy for sensitive and high-value data;

[0059] Low usage cost: In the application scenario of data sharing and interaction, the number of network interactions is huge, and the application cost of the blockchain oracle network of the present invention can be controlled within the cost threshold.

[0060] The embodiment of the present invention also provides a data interaction method, which is based on the blockchain oracle network described in any of the above embodiments. The characteristics and principles of the blockchain oracle network described in any of the above embodiments can be applied to the following data interaction method embodiments. In the following data interaction method embodiments, the characteristics and principles of the blockchain oracle network that have been explained will not be repeated.

[0061] Figure 4 The main steps of the data interaction method based on the blockchain oracle network in one embodiment are shown, referring to Figure 4 As shown, the data interaction method based on the blockchain oracle network includes:

[0062] Step S410, a consensus node in a blockchain oracle system responds to a data request from a blockchain client connected to the blockchain oracle system;

[0063] Step S420: The consensus node obtains the consensus result of the blockchain oracle system based on the consensus mechanism, and returns it to the blockchain client as consensus response data;

[0064] Among them, the blockchain oracle system is the blockchain oracle mainnet or the blockchain oracle subnet.

[0065] The consensus node obtains the consensus result of the blockchain oracle system based on the consensus mechanism, which may specifically include: the consensus node forwards the data request to the remaining consensus nodes in the blockchain oracle system; each remaining consensus node obtains response data based on the data request from the external resource node to which it is connected, and returns it to the consensus node; the consensus node obtains the consensus result based on the response data returned by the remaining consensus nodes.

[0066] In addition, the consensus nodes in the blockchain oracle system take turns responding to data requests from blockchain clients connected to the blockchain oracle system.

[0067] Figure 5 The consensus process of the data interaction method based on the blockchain oracle network in one embodiment is shown, referring to Figure 5 As shown, the blockchain oracle network uses the following xBFT consensus mechanism to enable users in the blockchain oracle network to obtain oracle services with strong stability, high bandwidth, and high accuracy. The xBFT consensus provides consistency guarantee for the blockchain oracle system 500. Assume that the set of consensus nodes included in the blockchain oracle system 500 is O = {O1, O2, O3, O4}, and the consensus process is as follows:

[0068] Step 1: The blockchain client sends a data request Req to the blockchain oracle system 500.

[0069] Step 2: Consensus node O1 responds to the data request Req and forwards the data request Req to other consensus nodes O2, O3, O4 in the blockchain oracle system 500.

[0070] Step 3: Consensus nodes O2, O3, and O4 forward the received data request Req to their respective connected resource servers S2, S3, and S4.

[0071] Step 4: Resource servers S2, S3, and S4 return response data Res2, Res3, and Res4 to the connected consensus nodes O2, O3, and O4 respectively.

[0072] Step 5: Consensus nodes O2, O3, and O4 return the received response data Res2, Res3, and Res4 to consensus node O1 respectively.

[0073] Step 6: Consensus node O1 uses the xBFT consensus algorithm to aggregate the response data Res2, Res3, and Res4 returned by other consensus nodes O2, O3, and O4, obtain the consensus response result Res, and return the consensus response result Res to the blockchain client.

[0074] After receiving the data request again, the consensus node that responds to the data request is rotated and the above steps are repeated.

[0075] Furthermore, in one embodiment, the data interaction method based on the blockchain oracle network also includes: each blockchain oracle subnet periodically synchronizes the obtained consensus results to the blockchain oracle main network; the blockchain oracle main network, based on the consensus mechanism, reaches consensus on the consensus results of the network status data representing each blockchain oracle subnet.

[0076] The data interaction between the blockchain oracle main network and each blockchain oracle subnet can be found in the above Figure 3 The description of the corresponding embodiments will not be repeated here.

[0077] In addition, in one embodiment, the data interaction method based on the blockchain oracle network also includes: when any blockchain oracle subnet fails, the blockchain oracle main network forwards the data request in the failed blockchain oracle subnet to the remaining blockchain oracle subnets.

[0078] The blockchain oracle network and data interaction method of the present invention can be applied to the technical architecture of data element value and key technology research projects. With the continuous acceleration of the digitalization process of society, data is gradually growing exponentially, and the demand for data sharing and exchange is increasing. Building a data sharing and exchange platform based on blockchain can meet users' needs for transparency and security in the data flow process while strengthening the traceability supervision of on-chain data. The blockchain oracle can collaboratively break through the data flow barriers on and off the chain, provide a fast, safe and reliable channel for the data sharing and exchange platform, and assist smart contracts in linking off-chain computing power to enhance and supplement blockchain infrastructure.

[0079] Through the blockchain oracle network and data interaction method of the present invention, it is possible to achieve a safe and reliable flow of off-chain data to the chain for data sharing and exchange scenarios, so as to open up the blockchain closed system, enhance the collaborative work between the chain and the off-chain, improve the liquidity of data, and give full play to the intrinsic value of data.

[0080] The blockchain oracle solution of the present invention adopts a distributed blockchain oracle network, and the network adopts a hierarchical network model of main network + subnet, and designs a consensus mechanism with strong security and high efficiency for data sharing and exchange scenarios to achieve consistency between oracle network nodes. The blockchain oracle solution and data interaction method of the present invention can serve as a bridge between the blockchain network and the real society, break through the barriers between on-chain and off-chain data, and provide fast, safe and reliable off-chain data for on-chain applications, thereby enhancing and supplementing the data sharing and exchange business based on blockchain.

[0081] An embodiment of the present invention further provides a computer device, including a distributed processor and a memory, wherein executable instructions are stored in the memory, and when the executable instructions are executed by the distributed processor, the data interaction method described in any of the above embodiments is implemented.

[0082] Figure 6 is a schematic diagram of the structure of a computer device in an embodiment of the present invention. It should be understood that: Figure 6 The modules are only schematically shown, and these modules may be virtual software modules or actual hardware modules. The combination and splitting of these modules and the addition of other modules are all within the protection scope of the present invention.

[0083] like Figure 6 As shown, the computer device 600 is in the form of a general-purpose computing device. The components of the computer device 600 include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different platform components (including the storage unit 620 and the processing unit 610), a display unit 640, etc.

[0084] The storage unit 620 stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps of the data interaction method described in any of the above embodiments. For example, the processing unit 610 can execute the following steps: Figure 4 Steps shown.

[0085] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0086] The storage unit 620 may also include a program / utility 6204 having one or more program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0087] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.

[0088] The computer device 600 can also communicate with one or more external devices, which can be one or more of the devices such as keyboards, pointing devices, Bluetooth devices, etc. These external devices enable users to communicate interactively with the computer device 600. The computer device 600 can also communicate with one or more other computing devices, and the computer device shown includes a router and a modem. This communication can be carried out through an input / output (I / O) interface 650. In addition, the computer device 600 can also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 660. The network adapter 660 can communicate with other modules of the computer device 600 through a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the computer device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, etc.

[0089] The embodiment of the present invention further provides a computer-readable storage medium for storing a program, and when the program is executed by a distributed processor, the data interaction method described in any of the above embodiments is implemented. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a distributed processor, the program code is used to enable the distributed processor to execute the data interaction method described in any of the above embodiments.

[0090] The storage medium may be a portable compact disk read-only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the storage medium of the present invention is not limited thereto, and may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0091] The storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination thereof. More specific examples of readable storage media include, but are not limited to, an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.

[0092] The readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a readable program code is carried. The data signal of this propagation may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by an instruction execution system, an apparatus, or a device or used in combination with it. The program code contained on the readable signal medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.

[0093] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device, such as through the Internet using an Internet service provider.

[0094] The above contents are further detailed descriptions of the present invention in combination with specific preferred embodiments, and it cannot be determined that the specific implementation of the present invention is limited to these descriptions. For ordinary technicians in the technical field to which the present invention belongs, several simple deductions or substitutions can be made without departing from the concept of the present invention, which should be regarded as falling within the protection scope of the present invention.

Claims

1. A blockchain oracle network, characterized in that: include: Blockchain oracle mainnet; Multiple distributed blockchain oracle subnets communicate with the blockchain oracle mainnet respectively; The blockchain oracle main network and each of the blockchain oracle subnets provide data interaction services to their respective connected blockchain clients based on the consensus mechanism and according to their respective connected external resource nodes; The oracle nodes in the blockchain oracle main network and each of the blockchain oracle subnets include consensus nodes; the consensus nodes are used to perform data consensus to provide corresponding data interaction services, including: A consensus node in a blockchain oracle system responds to a data request from a blockchain client connected to the blockchain oracle system, wherein the blockchain oracle system is the blockchain oracle main network or the blockchain oracle subnet; The consensus node obtains the consensus result of the blockchain oracle system based on the consensus mechanism, including: the consensus node forwards the data request to the remaining consensus nodes in the blockchain oracle system; each of the remaining consensus nodes obtains response data based on the data request from the external resource nodes connected to each other, and returns it to the consensus node; the consensus node aggregates the response data returned by each of the remaining consensus nodes to obtain the consensus result; The consensus node returns the consensus result as consensus response data to the blockchain client.

2. The blockchain oracle network of claim 1, wherein: The blockchain oracle main network also consensuses the network status data of multiple blockchain oracle subnets based on a consensus mechanism.

3. The blockchain oracle network of claim 2, wherein: The oracle node in the blockchain oracle main network includes a main network anchor node, and the oracle node in each blockchain oracle subnet includes a subnet anchor node; The subnet anchor node of each blockchain oracle subnet is used to synchronize the consensus result of the blockchain oracle subnet to the corresponding main network anchor node, so that the blockchain oracle main network can consensus on the network status data of multiple blockchain oracle subnets.

4. The blockchain oracle network of claim 3, wherein: A secure communication channel is established between the subnet anchor node of each blockchain oracle subnet and the corresponding mainnet anchor node; The subnet anchor node is used to synchronize the consensus result through the corresponding secure communication channel.

5. The blockchain oracle network of claim 1, wherein: The blockchain oracle mainnet also supports cross-chain interactions between multiple blockchain oracle subnets.

6. The blockchain oracle network according to any one of claims 1 to 5, characterized in that: The consensus mechanism adopts a consensus mechanism based on the exchange Byzantine fault tolerance algorithm.

7. A data interaction method, characterized in that: Based on the blockchain oracle network according to any one of claims 1 to 6, the data interaction method includes: A consensus node in a blockchain oracle system responds to a data request from a blockchain client connected to the blockchain oracle system; The consensus node obtains the consensus result of the blockchain oracle system based on the consensus mechanism, and returns it to the blockchain client as consensus response data; The consensus node obtains the consensus result of the blockchain oracle system based on the consensus mechanism, including: the consensus node forwards the data request to the remaining consensus nodes in the blockchain oracle system; each of the remaining consensus nodes obtains response data based on the data request from the external resource nodes connected to each other, and returns it to the consensus node; the consensus node aggregates the response data returned by each of the remaining consensus nodes to obtain the consensus result; Among them, the blockchain oracle system is the blockchain oracle main network or the blockchain oracle subnet.

8. The data interaction method according to claim 7, characterized in that: Each consensus node in the blockchain oracle system takes turns responding to data requests from the blockchain client connected to the blockchain oracle system.

9. The data interaction method according to claim 7, characterized in that: Also includes: Each of the blockchain oracle subnets periodically synchronizes the obtained consensus results to the blockchain oracle mainnet; The blockchain oracle main network reaches consensus on the consensus results of the network status data representing each of the blockchain oracle subnets based on the consensus mechanism.

10. The data interaction method according to claim 7, characterized in that: Also includes: When any blockchain oracle subnet fails, the blockchain oracle main network will forward the data requests in the failed blockchain oracle subnet to the remaining blockchain oracle subnets.

11. A computer device, characterized in that: include: Distributed processors; A memory, wherein executable instructions are stored in the memory; Wherein, when the executable instruction is executed by the distributed processor, the data interaction method as described in any one of claims 7-10 is implemented.

12. A computer-readable storage medium for storing a program, characterized in that: When the program is executed by a distributed processor, the data interaction method as described in any one of claims 7 to 10 is implemented.