Blockchain data flow computing device
By designing a blockchain data flow computing device, including blockchain adaptation, data analysis, acquisition and stream computing engines, the problem of real-time calculation of blockchain data is solved, meeting the needs of high-real-time business applications and improving the efficiency of blockchain The application potential of chain in time-sensitive business.
Patent Information
- Application Number
- CN202211077944.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-05
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2042-09-05
AI Technical Summary
Existing blockchain technology cannot meet the needs of higher-real-time business applications, such as real-time operational analysis, real-time business alarms, financial risk control and precision marketing, etc. It cannot efficiently and reliably combine high-trust, high-reliability business applications on the blockchain. Real-time calculation and utilization of high-value data.
A blockchain data flow computing device is designed, including a blockchain adaptation device, a general blockchain model storage device, a data analysis device, a blockchain data acquisition device and a stream computing engine. Through these components, the target block is obtained from the target block. The chain obtains data, generates a general blockchain data stream, and performs stream computing to achieve real-time data processing and storage.
It realizes the real-time computing capability of blockchain data, meets business application scenarios with high real-time requirements, and improves the potential application and value-added product service capabilities of blockchain in time-sensitive businesses.
Smart Images

Figure CN115460222B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of blockchain, and in particular, to a blockchain data flow computing device. Background Art
[0002] With the popularization of blockchain, its advantages in enhancing trust and promoting cross-institutional collaboration have been increasingly recognized. Blockchain has been widely applied in many industries around the world, and more and more business data has been deposited and accumulated on the chain.
[0003] On the other hand, these governments, enterprises, and scientific research institutions are also gradually increasing their demands for more real-time business applications, such as real-time operation analysis, real-time business alerts, financial risk control, precision marketing, real-time reconciliation, etc.
[0004] From the user's perspective, connecting the highly trusted, high-value business data on the blockchain to real-time business applications in an efficient and reliable manner can timely mine and utilize the commercial value of data, enhance business insight capabilities, and develop new business models of multi-party collaboration.
[0005] From the perspective of blockchain manufacturers, achieving the general capability of real-time computing of blockchain data will help further explore potential application scenarios of blockchain in businesses with high real-time requirements or time-sensitive. It will also help to build blockchain downlinks and richer value-added product service capabilities for business data. Summary of the invention
[0006] According to one aspect of the present disclosure, a blockchain data flow computing device is provided, comprising:
[0007] A blockchain adapter device is configured to obtain target blockchain data from a target blockchain;
[0008] A general blockchain model storage device, configured to store a general blockchain model;
[0009] A data parsing device, configured to generate a data stream of a general blockchain according to the general blockchain model and the acquired target blockchain data;
[0010] A blockchain data acquisition device, configured to receive a data stream of the universal blockchain;
[0011] A stream computing engine is configured to perform stream computing according to the data stream of the universal blockchain.
[0012] In some embodiments according to the present disclosure, the blockchain data acquisition device is also configured to instruct the blockchain adaptation device to obtain the target blockchain data from the target blockchain according to a request of the stream computing engine.
[0013] In some embodiments according to the present disclosure, the request includes the target blockchain and target blockchain data.
[0014] In some embodiments according to the present disclosure, the target blockchain data includes at least one of the following: blocks within a predetermined block height range, transactions within a predetermined range, and events within a predetermined time period.
[0015] In some embodiments according to the present disclosure, the blockchain data flow computing device further includes:
[0016] The message storage module is configured to store the data stream of the universal blockchain in a queue manner.
[0017] In some embodiments according to the present disclosure, the blockchain data flow computing device further includes:
[0018] The state management module is configured to record the state of the data stream of the universal blockchain received by the blockchain data acquisition device.
[0019] In some embodiments according to the present disclosure, the state includes at least one of the following: a block height of the universal blockchain, a transaction in the universal blockchain, and a timestamp of an event in the universal blockchain.
[0020] According to another aspect of the present disclosure, a blockchain data flow computing device is provided, including: a blockchain data gateway, a blockchain data connector, and a flow computing engine.
[0021] Wherein, the blockchain data gateway includes:
[0022] A blockchain adapter device is configured to obtain target blockchain data from a target blockchain;
[0023] A general blockchain model storage device configured to store a general blockchain model; and
[0024] The data parsing device is configured to generate a data stream of the general blockchain according to the general blockchain model and the acquired target blockchain data,
[0025] The blockchain data connector includes:
[0026] A blockchain data acquisition device is configured to receive a data stream of the universal blockchain,
[0027] The stream computing engine is configured to perform stream computing according to the data stream of the general blockchain.
[0028] In some embodiments according to the present disclosure, the blockchain data acquisition device is also configured to instruct the blockchain adaptation device to obtain the target blockchain data from the target blockchain according to a request of the stream computing engine.
[0029] In some embodiments according to the present disclosure, the request includes the target blockchain and target blockchain data.
[0030] In some embodiments according to the present disclosure, the target blockchain data includes at least one of the following: a predetermined range of blocks, a predetermined range of transactions, and events in a predetermined time period.
[0031] In some embodiments according to the present disclosure, the blockchain data flow computing device further includes:
[0032] The message storage module is configured to store the data stream of the universal blockchain in a queue manner.
[0033] In some embodiments according to the present disclosure, the blockchain data flow computing device further includes:
[0034] The state management module is configured to record the state of the data stream of the universal blockchain received by the blockchain data acquisition device.
[0035] In some embodiments according to the present disclosure, the state includes at least one of the following: the height of the universal blockchain, the transaction in the universal blockchain, and the timestamp of the event in the universal blockchain.
[0036] According to another aspect of the present disclosure, a blockchain data flow calculation method is provided, comprising:
[0037] Receive a request from the stream computing engine to obtain a target blockchain;
[0038] Determine a target block according to the request;
[0039] Get target blockchain data from the target blockchain;
[0040] Generate a data stream of a general blockchain based on the general blockchain model and the acquired target blockchain data;
[0041] Stream computing is performed according to the data stream of the general blockchain.
[0042] In some embodiments according to the present disclosure, the request includes the target blockchain and target blockchain data.
[0043] In some embodiments according to the present disclosure, the target blockchain data includes at least one of the following: a predetermined range of blocks, a predetermined range of transactions, and events in a predetermined time period.
[0044] In some embodiments according to the present disclosure, the blockchain data flow calculation method further includes:
[0045] The data stream of the universal blockchain is stored in a queue manner.
[0046] In some embodiments according to the present disclosure, the blockchain data flow calculation method further includes:
[0047] Record the status of the received data stream of the universal blockchain.
[0048] In some embodiments according to the present disclosure, the state includes at least one of the following: the height of the universal blockchain, the transaction in the universal blockchain, and the timestamp of the event in the universal blockchain.
[0049] According to another aspect of the present disclosure, a computer device is provided, including a memory and a processor, wherein a computer program executable by the processor is stored on the memory, and when the processor executes the computer program, the blockchain data flow calculation method as described above is performed.
[0050] Other features and advantages of the present disclosure will become more apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings, which constitute a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0052] The present disclosure may be more clearly understood from the following detailed description with reference to the accompanying drawings, in which:
[0053] Figure 1 A schematic diagram of a blockchain stream computing device according to one or more exemplary embodiments of the present disclosure is shown.
[0054] Figure 2 A schematic diagram of a blockchain stream computing device according to one or more exemplary embodiments of the present disclosure is shown.
[0055] Figure 3 A schematic diagram of a blockchain stream computing device according to one or more exemplary embodiments of the present disclosure is shown.
[0056] Figure 4 A schematic diagram of a blockchain stream computing device according to one or more exemplary embodiments of the present disclosure is shown.
[0057] Figure 5 A flowchart of a blockchain stream computing method performed by a blockchain stream computing device according to one or more exemplary embodiments of the present disclosure is shown.
[0058] Figure 6 A flowchart of a blockchain stream computing method performed by a blockchain stream computing device according to one or more exemplary embodiments of the present disclosure is shown.
[0059] Figure 7 A diagram showing different types of blockchains.
[0060] Figure 8 A block diagram of a computing device according to an exemplary embodiment of the present disclosure is shown.
[0061] Note that in the embodiments described below, sometimes the same reference numerals are used in common between different drawings to represent the same parts or parts with the same functions, and their repeated descriptions are omitted. In some cases, similar numbers and letters are used to represent similar items, so once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0062] For ease of understanding, the positions, sizes, and ranges of various structures shown in the drawings and the like may not represent actual positions, sizes, and ranges, etc. Therefore, the present disclosure is not limited to the positions, sizes, and ranges disclosed in the drawings and the like. DETAILED DESCRIPTION
[0063] Various exemplary embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be noted that unless otherwise specifically stated, the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present disclosure.
[0064] The following description of at least one exemplary embodiment is in fact merely illustrative and is in no way intended to limit the present disclosure and its application or use. That is, the structures and methods herein are shown in an exemplary manner to illustrate different embodiments of the structures and methods in the present disclosure. However, those skilled in the art will appreciate that they merely illustrate exemplary ways of the present disclosure that can be implemented, rather than exhaustive ways. In addition, the drawings need not be drawn to scale, and some features may be enlarged to illustrate the details of specific components.
[0065] Technologies, methods, and apparatus known to ordinary technicians in the relevant field may not be discussed in detail, but where appropriate, such technologies, methods, and apparatus should be considered part of the authorization specification.
[0066] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0067] Blockchain is a distributed, multi-party shared ledger technology. It uses mathematical methods to make transaction data and historical records immutable, and uses consensus algorithms and smart contracts to achieve joint confirmation and ledger records of transactions by all parties involved. The execution of basic operations such as transfer and evidence storage on the blockchain by users or the call of smart contracts and their data constitute blockchain transactions, which are stored in blocks in a certain order. At the same time, changes in the state of the blockchain or the execution of contracts can trigger system-standard or user-defined events, which can be received and processed by blockchain applications.
[0068] Stream computing is a computing technology for streaming data. It receives real-time, continuous data stream input from upstream, performs efficient computing in the stream computing engine according to pre-defined stream computing logic, and then outputs it to various types of downstream data storage terminals in real time. Stream computing is widely used in big data business application scenarios with high real-time requirements or time-sensitive, such as e-commerce recommendation systems, financial real-time risk control, website user analysis, IoT data analysis, etc.
[0069] Figure 1 A schematic diagram of a blockchain flow computing device according to an embodiment of the present disclosure is shown. Figure 1 As shown, the blockchain stream computing device 100 may include a general blockchain model storage device 111, a data parsing device 112, a blockchain adaptation device 113, a blockchain data acquisition device 121, a stream computing engine interface calling module 122, a stream computing engine 130, a business data model storage device 133 and a module generator 132.
[0070] The blockchain adapter 113 can obtain data on the blockchain from various blockchains. For example, the blockchain adapter 113 can obtain data on the blockchain 101 from the blockchain 101, or can obtain data on the blockchain 102 from the blockchain 102, as needed.
[0071] Depending on the type of blockchain, the data obtained from the blockchain by the blockchain adapter 113 may be blocks, transactions, or events. For example, according to the instruction from the blockchain data acquisition device 121, the blockchain adapter 113 may obtain blocks within a predetermined block height range from the blockchain, transactions within a predetermined range in blocks of a predetermined block height, or events within a predetermined timestamp range (i.e., time period).
[0072] The general blockchain model may be stored in the general blockchain model storage device 111. For example, the general blockchain model may be various known blockchain models and formats such as JSON String, or any custom blockchain model and format.
[0073] The data parsing device 112 may convert the blockchain data obtained by the blockchain adapting device 113 into general blockchain data. For example, the data parsing device 112 may convert the data of the blockchain 101 obtained by the blockchain adapting device 113 from the data model and format specific to the blockchain 101 into the data model and format of the general blockchain according to the general blockchain model stored in the general blockchain model storage device and the type of the blockchain 101.
[0074] For example, in some embodiments according to the present disclosure, the data parsing device 112 can directly call the known interface of the blockchain 101, obtain various data required to generate a general blockchain from the data of the blockchain 101, and then generate blocks, transactions and / or events of the general blockchain according to the general blockchain model.
[0075] In addition, in some embodiments of the present disclosure, the universal blockchain model storage device 111 may also pre-store conversion relationship models between various known blockchains and universal blockchains. The data parsing device 112 may convert the data of the blockchain 101 into the data of the universal blockchain according to the conversion relationship model based on the type of the blockchain 101 provided by the blockchain adapter 113.
[0076] In addition, after obtaining the data of the general blockchain, the data parsing device 112 can also send the data of the general blockchain as a business data stream to the blockchain data acquisition device 121.
[0077] The blockchain data acquisition device 121 can forward the received business data stream to the stream computing engine 130. For example, the blockchain data acquisition device 121 can use the stream computing engine interface calling module to call the stream computing engine interface, and send the business data stream to the stream computing engine 130 through the stream computing engine interface.
[0078] The stream computing engine 130 includes a stream computing logic 131. The stream computing logic 131 can use the business data stream provided by the blockchain data acquisition device 121 as an input source, and execute computing tasks based on the description and arrangement of computing tasks by the stream computing engine (including the call of basic operators, the extension of custom computing logic, etc.).
[0079] The business data model storage 133 can store the business data model. And the template generator 132 can generate a business model table and a data table according to the business data model, and provide them to the stream computing engine 130 so as to parse and process the blockchain business data flow.
[0080] The stream computing engine 130 may output the computing result data stream to a designated data storage 140 .
[0081] In the present disclosure, the stream computing engine 130 can be implemented based on existing stream computing technologies in the industry, such as Apache Flink, etc. Therefore, the present disclosure will not further describe the stream computing engine 130 in detail.
[0082] It should be understood that the above description of the embodiments of the present disclosure takes blockchain 101 as an example, but the same processing process is also applicable to blockchain 102, which will not be repeated here.
[0083] By adopting the blockchain data flow computing device of the above embodiment of the present disclosure, using the same flow computing engine, flow computing can be performed on various types of blockchains.
[0084] Figure 2 A schematic diagram of a blockchain flow computing device according to an embodiment of the present disclosure is shown. Figure 2 As shown, the blockchain stream computing device 200 includes a general blockchain model storage device 111, a data parsing device 112, a blockchain adaptation device 113, a blockchain data acquisition device 121, a stream computing engine interface calling module 122, a stream computing engine 130, a business data model storage device 133 and a module generator 132.
[0085] same Figure 1 Compared with the blockchain stream computing device 100 of FIG. 1 , the difference is that in the blockchain stream computing device 200, a blockchain data gateway 210 and a blockchain data connector 220 are provided. The blockchain data gateway 210 and the blockchain data connector 220 are two relatively independent devices. Among them, the blockchain data gateway 210 may include a general blockchain model storage device 111, a data parsing device 112, and a blockchain adapter device 113. The blockchain data connector 220 may include a blockchain data acquisition device 121 and a stream computing engine interface calling module 122.
[0086] Using the system architecture of the blockchain stream computing device 200, the blockchain data connector 220 can achieve a unified and efficient architecture, focusing on the reliability management and maintenance of blockchain stream data acquisition. The blockchain data gateway 210 can not only serve blockchain data stream computing, but also has good scalability and can be used as an independent blockchain data pull basic service for business applications and other blockchain middleware.
[0087] For example, Figure 3 A schematic diagram of a blockchain flow computing device according to an embodiment of the present disclosure is shown. Figure 2 Compared with the blockchain stream computing device 200 shown in the figure, the difference is that the blockchain data gateway 310 of the blockchain stream computing device 300 also includes an application API 314, a message queue 315 and a task manager 316.
[0088] Among them, by applying API 314, people can obtain the data of the general blockchain generated by the data analysis device 112, and can also obtain the data of blockchain 101 or blockchain 102 received by the blockchain adaptation device 113.
[0089] The task manager 316 can coordinate and manage the work of each module in the blockchain data gateway 310.
[0090] The message queue (ie, message storage module) 315 can receive the business data stream generated by the data analysis device 112, and implement temporary storage and subsequent reliable output or push of data in a scenario where the downstream consumer is temporarily unavailable, for example, in an asynchronous queue manner.
[0091] Figure 4 FIG. 4 is a schematic diagram of a blockchain flow computing device 400 according to an embodiment of the present disclosure. Figure 3 Compared with the blockchain flow computing device 300, the difference is that the blockchain data connector 420 of the blockchain flow computing device 400 also includes a state management module 423.
[0092] The state management module 423 can record the state of the data stream of the blockchain 101 obtained by the blockchain data gateway 310. For example, the state management module 423 can record the latest obtained block height, transaction sequence number, and / or event timestamp of the blockchain 101.
[0093] Figure 7 A schematic diagram of a common blockchain data flow is shown. Among them, for a block-type blockchain data flow (block flow), it can be transmitted and sent in units of blocks. The block-type data flow is in the order of block height, and the smaller the block height is, the older the record (the earlier generated block), and the larger the block height is, the newer the record (the later generated block). For the block-type data flow, the state management module 423 can record the block height of the latest acquired block.
[0094] For the transaction type blockchain data stream (transaction stream), each transaction is identified by the block height and the relative order of the transaction in the block. When a block contains multiple transactions, the relative order between transactions is fixed. For the transaction type data stream, the state management module 423 can record the block height of the block where the latest acquired transaction is located and the relative order of the transaction in the block.
[0095] The time-type blockchain data stream (event stream) is ordered by the timestamps of the blockchain events generated on the blockchain. The state management module 423 can record the timestamp of the latest blockchain event.
[0096] In the embodiment of the present disclosure, the stream computing engine interface call module can also provide a reliability guarantee or fault tolerance mechanism of the stream computing engine. The state management module 423 can store the state of the data stream of the general blockchain according to the reliability guarantee or fault tolerance mechanism of the stream computing engine. In this way, in the event of a failure or anomaly, data and computing tasks can be restored more quickly.
[0097] Figure 5 The flowchart of the blockchain stream computing method performed by the blockchain stream computing device 400 according to an embodiment of the present disclosure is shown.
[0098] First, according to the needs of stream computing, the stream computing engine sends a request to the blockchain data connector 420 to read the data stream of the blockchain 101. In the request, in addition to specifying the name of the blockchain 101, the data range to be read in the blockchain 101 can also be specified in detail. Depending on the type of blockchain, for example, the block height range, transaction range, or event timestamp range to be read can be specified.
[0099] The blockchain data acquisition device 121 of the blockchain data connector 420 can forward the request from the stream computing device 130 to the blockchain data gateway 310.
[0100] The blockchain adapter 113 of the blockchain data gateway 310 can read the blockchain data of the corresponding range from the blockchain 101 according to the request from the stream computing engine 130 forwarded by the blockchain data acquisition device 121, such as blocks in a specified block height range, transactions in a specified range, or events in a specified timestamp range. In some embodiments, the request from the stream computing engine 130 may only specify the blockchain 101 without specifying the data range. In this case, the blockchain adapter 113 can obtain all the data of the blockchain 101.
[0101] After the blockchain adapter 113 obtains the data of the blockchain 101, the data parsing device 112 of the blockchain data gateway 310 can parse the data of the blockchain 101. For example, the data parsing device 112 can generate a data stream of a general blockchain based on the data of the blockchain 101 and the blockchain model stored in the general blockchain model storage device 111.
[0102] The generated data stream of the general blockchain can be stored in the message queue module 315, and the data stream in the message queue module 315 is provided to the blockchain data connector 420 in a queue manner. As described above, the message queue module 315 can realize the temporary storage and subsequent reliable output or push of data in a scenario where the downstream consumer (such as the blockchain data connector, etc.) is temporarily unavailable, such as in an asynchronous queue or the like.
[0103] The blockchain data acquisition device 121 of the blockchain data connector 420 receives the data stream from the blockchain data gateway 310. Before providing the data stream to the stream computing engine 130, the blockchain data acquisition device 121 can save the state of the data stream of the latest acquired blockchain 101 in the state management module 423. As described above, the state management module 423 can store the state of the data stream according to the reliability guarantee or fault tolerance mechanism of the stream computing engine provided by the stream computing engine interface calling module 122. For example, the state management module 423 can record at least one of the following: the block height of the latest acquired block, the block height of the block where the latest acquired transaction is located and the relative order of the transaction in the block, and the timestamp of the latest acquired blockchain event, etc.
[0104] After saving the state of the data flow, the blockchain data connector 420 can call the stream computing engine call interface module 122 to forward the data flow to the stream computing engine 130.
[0105] After receiving the data stream of the general blockchain, the stream computing engine 130 can use the stream computing logic 131 to execute the stream computing function or operator.
[0106] Figure 6 The present invention shows a blockchain data flow computing method performed by a blockchain data flow computing device according to an embodiment of the present disclosure.
[0107] like Figure 6 As shown, in order to perform stream computing, the stream computing engine needs to obtain data from blockchain 101 and blockchain 102 respectively. The stream computing engine can Figure 6 The process shown in FIG. 1 is to obtain the data of blockchain 101 and blockchain 102 in sequence (that is, after obtaining the data stream of blockchain 101, a request to read the data of blockchain 102 is issued). Since the specific process of obtaining the blockchain data stream is the same as Figure 5 Similarly, the present disclosure will not be described repeatedly. However, the present disclosure is not limited thereto. For example, the stream computing engine can send data to blockchain 101 and blockchain 102 at the same time. That is, if the processing capacity of the blockchain data gateway and the blockchain data connector is sufficient, the process of obtaining data from blockchain 101 and blockchain 102 can be performed simultaneously.
[0108] Figure 8 A block diagram of a computing device according to an exemplary embodiment of the present disclosure is shown, which is an example of a hardware device applicable to various aspects of the present disclosure.
[0109] refer to Figure 8, a computing device 700 will now be described, which is an example of a hardware device applicable to various aspects of the present disclosure. The computing device 700 can be any machine configured to perform processing and / or computing, and can be but is not limited to a workstation, a server, a desktop computer, a laptop computer, a tablet computer, a personal digital assistant, a smart phone, a vehicle-mounted computer, or any combination thereof. The aforementioned various devices / servers / client devices can be implemented in whole or in part by the computing device 700 or similar devices or systems.
[0110] The computing device 700 may include components that may be connected or communicated with the bus 702 via one or more interfaces. For example, the computing device 700 may include a bus 702, one or more processors 704, one or more input devices 706, and one or more output devices 708. The one or more processors 704 may be any type of processor and may include, but are not limited to, one or more general-purpose processors and / or one or more special-purpose processors (e.g., special processing chips). The input device 706 may be any type of device capable of inputting information to the computing device and may include, but are not limited to, a mouse, a keyboard, a touch screen, a microphone, and / or a remote controller. The output device 708 may be any type of device capable of presenting information and may include, but are not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The computing device 700 may also include or be connected to a non-transient storage device 710, which may be any storage device that is non-transient and capable of data storage, and may include, but is not limited to, a disk drive, an optical storage device, a solid-state memory, a floppy disk, a floppy disk, a hard disk, a tape or any other magnetic medium, an optical disk or any other optical medium, a ROM (read-only memory), a RAM (random access memory), a cache memory, and / or any memory chip or cassette, and / or any other medium from which a computer can read data, instructions, and / or code. The non-transient storage device 710 may be detachable from the interface. The non-transient storage device 710 may have data / instructions / code for implementing the above methods and steps. The computing device 700 may also include a communication device 712. The communication device 712 can be any type of device or system that can communicate with internal devices and / or with a network and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication device and / or a chipset, such as a BluetoothTM device, a 1302.11 device, a WiFi device, a WiMax device, a cellular communication device and / or the like.
[0111] The bus 702 may include, but is not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an Enhanced ISA (EISA) bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus. In particular, for vehicle-mounted devices, the bus 702 may also include a Controller Area Network (CAN) bus or other structures designed for automotive applications.
[0112] The computing device 700 may also include a working memory 714 , which may be any type of working memory capable of storing instructions and / or data that facilitate the operation of the processor 704 and may include, but is not limited to, random access memory and / or read-only storage devices.
[0113] Software components may be located in the working memory 714, including but not limited to an operating system 716, one or more application programs 718, drivers and / or other data and codes. Instructions for implementing the above methods and steps may be included in the one or more application programs 718, and the modules / units / components of the aforementioned various devices / servers / client devices may be implemented by the processor 704 reading and executing the instructions of the one or more application programs 718.
[0114] It should also be recognized that changes can be made according to specific needs. For example, custom hardware can also be used, and / or specific components can be implemented in hardware, software, firmware, middleware, microcode, hardware description language, or any combination thereof. In addition, connections to other computing devices, such as network input / output devices, etc. can be used. For example, part or all of the disclosed methods and devices can be implemented using logic and algorithms according to the present disclosure by programming hardware (e.g., programmable logic circuits including field programmable gate arrays (FPGAs) and / or programmable logic arrays (PLAs)) with assembly language or hardware programming languages (e.g., VERILOG, VHDL, C++).
[0115] As used herein, the word "exemplary" means "serving as an example, instance, or illustration," rather than as a "model" to be exactly copied. Any implementation described as an example herein is not necessarily to be construed as preferred or advantageous over other implementations. Furthermore, the present disclosure is not limited by any expressed or implied theory given in the above technical field, background technology, summary of the invention, or detailed description.
[0116] In addition, the terms "first", "second" and the like may also be used herein for reference purposes only, and thus are not intended to be limiting. For example, the terms "first", "second" and other such numerical terms referring to structures or elements do not imply a sequence or order unless the context clearly indicates otherwise.
[0117] It should also be understood that when the term “include / comprises” is used in this document, it indicates the presence of the specified features, integers, steps, operations, units and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, units and / or components and / or their combinations.
[0118] Those skilled in the art will appreciate that the boundaries between the above operations are merely illustrative. Multiple operations can be combined into a single operation, a single operation can be distributed in additional operations, and operations can be performed at least partially overlapping in time. Moreover, alternative embodiments may include multiple instances of specific operations, and the order of operations may be changed in other various embodiments. However, other modifications, variations, and replacements are equally possible. Therefore, this specification and accompanying drawings should be considered illustrative, not restrictive.
[0119] Although some specific embodiments of the present disclosure have been described in detail by way of example, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. The various embodiments disclosed herein may be combined in any manner without departing from the spirit and scope of the present disclosure. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.
Claims
1. A blockchain data flow computing device, comprising: A blockchain adapter device is configured to obtain target blockchain data from a target blockchain; A general blockchain model storage device configured to store a general blockchain model and a conversion relationship model; A data parsing device, configured to convert the target blockchain into a universal blockchain according to the type of the target blockchain and the conversion relationship model, and convert the acquired target blockchain data into data of the universal blockchain according to the universal blockchain model to generate a data stream of the universal blockchain; A blockchain data acquisition device, configured to receive a data stream of the universal blockchain; A stream computing engine is configured to perform stream computing according to the data stream of the universal blockchain.
2. The blockchain data flow computing device according to claim 1, wherein: The blockchain data acquisition device is also configured to instruct the blockchain adaptation device to obtain the target blockchain data from the target blockchain according to the request of the stream computing engine.
3. The blockchain data flow computing device according to claim 2, wherein: The request includes the target blockchain and target blockchain data.
4. The blockchain data flow computing device according to claim 3, wherein: The target blockchain data includes at least one of the following: blocks within a predetermined block height range, transactions within a predetermined range, and events within a predetermined time period.
5. The blockchain data flow computing device according to claim 1, further comprising: The message storage module is configured to store the data stream of the universal blockchain in a queue manner.
6. The blockchain data flow computing device according to claim 1, further comprising: The state management module is configured to record the state of the data stream of the universal blockchain received by the blockchain data acquisition device.
7. The blockchain data flow computing device according to claim 6, wherein: The state includes at least one of the following: a block height of the universal blockchain, a transaction in the universal blockchain, and a timestamp of an event in the universal blockchain.
8. A blockchain data flow computing device, comprising: Blockchain data gateway, blockchain data connector and stream computing engine, Wherein, the blockchain data gateway includes: A blockchain adapter device is configured to obtain target blockchain data from a target blockchain; A general blockchain model storage device configured to store a general blockchain model and a conversion relationship model; and The data parsing device is configured to convert the target blockchain into a universal blockchain according to the type of the target blockchain and the conversion relationship model, and convert the acquired target blockchain data into the data of the universal blockchain according to the universal blockchain model to generate a data stream of the universal blockchain, The blockchain data connector includes: A blockchain data acquisition device is configured to receive a data stream of the universal blockchain, The stream computing engine is configured to perform stream computing according to the data stream of the general blockchain.
9. The blockchain data flow computing device according to claim 8, wherein: The blockchain data acquisition device is also configured to instruct the blockchain adaptation device to obtain the target blockchain data from the target blockchain according to the request of the stream computing engine.
10. The blockchain data flow computing device according to claim 9, wherein: The request includes the target blockchain and target blockchain data.
11. The blockchain data flow computing device according to claim 10, wherein: The target blockchain data includes at least one of the following: blocks within a predetermined range, transactions within a predetermined range, and events within a predetermined time period.
12. The blockchain data flow computing device according to claim 8, further comprising: The message storage module is configured to store the data stream of the universal blockchain in a queue manner.
13. The blockchain data flow computing device according to claim 8, further comprising: The state management module is configured to record the state of the data stream of the universal blockchain received by the blockchain data acquisition device.
14. The blockchain data flow computing device according to claim 13, wherein: The state includes at least one of: a height of the universal blockchain, a transaction in the universal blockchain, and a timestamp of an event in the universal blockchain.
15. A blockchain data flow calculation method, comprising: Receive a request from the stream computing engine to obtain a target blockchain; Determine a target block according to the request; Get target blockchain data from the target blockchain; Convert the target blockchain into a general blockchain according to the type of the target blockchain and the conversion relationship model, and convert the acquired target blockchain data into data of the general blockchain according to the general blockchain model to generate a data stream of the general blockchain; Stream computing is performed according to the data stream of the general blockchain.
16. The blockchain data flow calculation method according to claim 15, wherein: The request includes the target blockchain and target blockchain data.
17. The blockchain data flow calculation method according to claim 16, wherein: The target blockchain data includes at least one of the following: blocks within a predetermined range, transactions within a predetermined range, and events within a predetermined time period.
18. The blockchain data flow calculation method according to claim 15 further comprises: The data stream of the universal blockchain is stored in a queue manner.
19. The blockchain data flow calculation method according to claim 15 further comprises: Record the status of the received data stream of the universal blockchain.
20. The blockchain data flow calculation method according to claim 19, wherein: The state includes at least one of: a height of the universal blockchain, a transaction in the universal blockchain, and a timestamp of an event in the universal blockchain.
21. A computer device comprising a memory and a processor, wherein the memory stores a computer program executable by the processor, and when the processor executes the computer program, the blockchain data flow calculation method according to any one of claims 15 to 20 is executed.
