WO2024001039A1 - 一种维护区块链数据的方法、装置、电子设备和存储介质 - Google Patents
一种维护区块链数据的方法、装置、电子设备和存储介质 Download PDFInfo
- Publication number
- WO2024001039A1 WO2024001039A1 PCT/CN2022/135626 CN2022135626W WO2024001039A1 WO 2024001039 A1 WO2024001039 A1 WO 2024001039A1 CN 2022135626 W CN2022135626 W CN 2022135626W WO 2024001039 A1 WO2024001039 A1 WO 2024001039A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- blockchain
- data
- relational database
- database
- node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/27—Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/14—Error detection or correction of the data by redundancy in operations
- G06F11/1446—Point-in-time backing up or restoration of persistent data
- G06F11/1458—Management of the backup or restore process
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F21/00—Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
- G06F21/60—Protecting data
- G06F21/64—Protecting data integrity, e.g. using checksums, certificates or signatures
Definitions
- the embodiments of this specification belong to the field of blockchain technology, and particularly relate to a method, device, electronic device and storage medium for maintaining blockchain data.
- Blockchain is a new application model of computer technology such as distributed data storage, point-to-point transmission, consensus mechanism, and encryption algorithm.
- data blocks are combined into a chained data structure in a chronological manner and are cryptographically guaranteed to be an untamperable and unforgeable distributed ledger.
- non-relational databases In traditional blockchain technology, in order to meet the storage needs of blockchain nodes for large amounts of data when running blockchain services, blockchain nodes usually use non-relational databases with efficient access efficiency for data storage.
- non-relational databases lack transaction relationships, lack connections between data and are not standardized, which is not conducive to data analysis. Relational databases have complete transaction relationships, connections between data and a strict standardized structure. If the non-relational database in traditional blockchain technology is replaced by a relational database, although it is beneficial to data analysis, it will not be used in the block chain.
- the direct use of relational databases in the chain's underlying system will bring huge challenges to the online read and write performance of blockchain nodes when running blockchain services. Therefore, how to implement convenient data analysis services while ensuring that the blockchain service execution process has high access efficiency is an urgent problem in this field that needs to be solved.
- the purpose of the present invention is to provide a method, device, electronic device and storage medium for maintaining blockchain data.
- a method for maintaining blockchain data is proposed, which is applied to node devices deployed with blockchain nodes, and the node devices maintain blockchain non-relational Database and blockchain relational database, the blockchain non-relational database is used to maintain the blockchain data generated when the blockchain node runs the blockchain service; the method includes:
- the standard data is maintained in the blockchain relational database, and the blockchain relational database is used to provide data analysis services to analysis demanders.
- a device for maintaining blockchain data which is applied to node equipment deployed with blockchain nodes, and the node equipment maintains blockchain non-relational Database and blockchain relational database, the blockchain non-relational database is used to maintain the blockchain data generated when the blockchain node runs the blockchain service; the device includes:
- a blockchain data acquisition unit used to acquire the blockchain data maintained in the blockchain non-relational database
- a data conversion unit configured to convert the blockchain data into standard data defined by database schema information corresponding to the blockchain relational database
- a standard data maintenance unit is used to maintain the standard data in the blockchain relational database, and the blockchain relational database is used to provide data analysis services to analysis demanders.
- an electronic device including:
- Memory used to store instructions executable by the processor
- the processor implements the method described in the first aspect by running the executable instructions.
- a computer-readable storage medium on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect are implemented.
- the embodiment of this specification separately deploys a blockchain non-relational database and a blockchain relational database on the node device.
- the blockchain non-relational database is used to maintain the blockchain node when running the blockchain service.
- the generated blockchain data enables efficient access to blockchain data when the blockchain node runs the blockchain service; on the other hand, by maintaining the blockchain from the blockchain non-relational database
- the data is converted into standard data and synchronously maintained in the blockchain relational database, thereby using the blockchain relational database to achieve convenient data analysis services.
- the method for maintaining blockchain data involved in the embodiment of this specification realizes the backup of one data in two places, objectively improves the disaster recovery capability, realizes the separation of reading and writing of blockchain data through different types of databases, and ensures that the blockchain
- the service execution process realizes convenient data analysis services with high access efficiency.
- Figure 1 is a flow chart of a method for maintaining blockchain data provided by an exemplary embodiment.
- Figure 2 is a system architecture diagram for maintaining blockchain data provided by an exemplary embodiment.
- Figure 3 is a schematic structural diagram of a device provided by an exemplary embodiment.
- Figure 4 is a block diagram of a device for maintaining blockchain data provided in an exemplary embodiment.
- Figure 1 is a flow chart of a method for maintaining blockchain data provided by an exemplary embodiment. This method is applied to node equipment deployed with blockchain nodes.
- the node equipment maintains a blockchain non-relational database and a blockchain relational database.
- the blockchain non-relational database is used to maintain the area.
- FIG. 2 is a system architecture diagram for maintaining blockchain data provided by an exemplary embodiment.
- each blockchain node in the blockchain network is deployed on the corresponding node device, and each node device maintains both a blockchain non-relational database and a blockchain relational database.
- the blockchain non-relational database belongs to the non-relational database
- the blockchain relational database belongs to the relational database.
- the blockchain non-relational database serves as the native database for blockchain nodes to run blockchain services, that is, as part of the infrastructure of the underlying system of the blockchain, it is used to run blockchain services on blockchain nodes.
- the blockchain data generated during the process is efficiently accessed.
- blockchain non-relational databases can specifically use Key-Value databases (key-value databases, a typical non-relational database, referred to as K-V database).
- K-V databases do not know how to store data. Value, and there is no concept of schema (database schema information) like MySQL (relational database management system) and PostgreSQL (a free software object-relational database management system with very complete features).
- the blockchain underlying system including blockchain nodes and corresponding blockchain databases
- a non-relational database with efficient access speed i.e., blockchain non-relational type database
- the blockchain node can efficiently access data from the blockchain non-relational database when running the blockchain service, thereby ensuring the efficient operation of the blockchain service.
- the node devices involved in the embodiments of this specification also maintain an additional blockchain relational database as a native database for providing data analysis services to users, that is, as part of the infrastructure of the data analysis system, used to provide analysis services to users.
- the demander provides data analysis services.
- blockchain non-relational databases can specifically use relational databases such as Oracle database and MySQL.
- a relational database refers to a database that uses a relational model to organize data. It stores data in the form of rows and columns to facilitate user understanding. The series of rows and columns in a relational database are called tables, and a set of tables consists of database. Users retrieve data from a database through queries, which are executable codes that limit certain areas of the database.
- the relational model can be simply understood as a two-dimensional table model, and a relational database is a data organization composed of two-dimensional tables and the relationships between them.
- a relational database needs to define the table structure, table relationships, and standardized Database schema information such as data structure is then stored in data based on the database schema information. It supports SQL and has strong data analysis capabilities.
- relational databases place great emphasis on data consistency, they pay a huge price for reducing read and write performance.
- the reliability of relational database for storing and processing data is very good, the efficiency will become very poor once faced with the processing of massive data, especially when encountering high concurrent reading and writing, the performance will drop very much. sharp.
- relational databases have powerful data analysis capabilities but poor access speed and read and write performance, and are not suitable for large-scale concurrent read and write application scenarios.
- the data analysis system deployed under the node device chain (including the data analysis engine and corresponding database not shown in Figure 2) adopts a non-relational database (i.e., block database) with efficient access speed, chain relational database), thus enabling node devices to utilize the powerful data analysis capabilities of blockchain non-relational databases when running data analysis services by calling the data analysis engine, thereby ensuring that convenient data analysis is provided to analysis demand parties.
- a non-relational database i.e., block database
- the data maintained in the blockchain relational database involved in the embodiments of this specification is obtained through data conversion and migration in the blockchain non-relational database.
- the process of data conversion and migration will be introduced in detail below.
- obtaining the blockchain data maintained in the blockchain non-relational database includes: receiving the blockchain data actively pushed by the blockchain node; and/ Or, send a blockchain data request to the blockchain node, and receive the blockchain data returned by the blockchain node in response to the blockchain data request.
- the method for maintaining blockchain data involved in the embodiments of this specification is applied to node devices, specifically to the data conversion engine deployed under the node device chain.
- the node device can obtain the blockchain data maintained in the non-relational database of the blockchain in at least one of two ways.
- the two ways include: first, by receiving the area actively pushed by the blockchain node.
- Blockchain data for example, every time a blockchain node adds or modifies blockchain data to the blockchain non-relational database during the process of running the blockchain service, the blockchain node will send it to the off-chain
- the data conversion engine actively pushes data update messages carrying the latest newly added or modified blockchain data.
- This method can timely convert and synchronize the data in the blockchain non-relational database to the blockchain relational database, thus Ensure the symmetry and timeliness of data in the blockchain relational database; secondly, send a blockchain data request to the blockchain node through the node device to obtain the response of the blockchain node to the blockchain data request For the returned blockchain data, this method obtains the blockchain data through the request-response mode, which can effectively control the scope of the requested blockchain data and thus shield some data that does not need to be maintained in the blockchain relational database. .
- sending a blockchain data request to the blockchain node includes: initiating to the smart contract deployed by the blockchain node a non-relational database maintained in the blockchain for the smart contract.
- Blockchain data request includes: initiating to the smart contract deployed by the blockchain node a non-relational database maintained in the blockchain for the smart contract.
- the blockchain data request for the blockchain data in the blockchain node or, initiating to the blockchain node the zone for the blockchain data maintained in the blockchain non-relational database.
- the blockchain data involved in the embodiments of this specification includes block data, status data and event data.
- block data refers to the blockchain ledger maintained by each blockchain node in the blockchain network (the blockchain ledger is actually maintained in the blockchain non-relational database), because the blockchain ledger is A special data structure, which is composed of multiple blocks connected end to end through hash anchoring, and cannot be tampered with.
- Each block consists of a block header and a block body.
- the block header of any block Contains information such as the status tree root, transaction number root, receipt tree root, block height and the hash value of the corresponding parent block of the block, and the block body contains the transaction data contained in the block ( transaction hash).
- the block data involved in the embodiments of this specification refers to the data contained in the blockchain ledger.
- the status data and event data involved in the embodiments of this specification are maintained by each smart contract deployed by the blockchain node (essentially, the contract storage space corresponding to each smart contract is maintained in the blockchain non-relational database) .
- the blockchain node is deployed with several smart contracts, and each smart contract maintains corresponding status data. These status data are maintained in the blockchain non-relational database corresponding to any one of the smart contracts.
- the node device can initiate a blockchain data request to the smart contract deployed by the blockchain node (in fact, any smart contract is deployed on each blockchain node in the blockchain network).
- the blockchain data request is Formally it is a blockchain transaction. After the blockchain transaction is received by the blockchain node, the blockchain node will further call the smart contract instructed by the blockchain transaction to execute the blockchain transaction.
- the smart contract When the smart contract executes the blockchain transaction, it searches for and obtains the blockchain data indicated by the blockchain transaction from the contract storage space corresponding to the smart contract in the blockchain non-relational database, and uses it as a block.
- the response message corresponding to the chain data request (such as in the form of a blockchain event) is called back to the node device, thereby achieving the method of calling a smart contract to obtain the blockchain data maintained in the blockchain non-relational database.
- the node device can directly initiate a blockchain data request to the blockchain node, for example, initiate a blockchain data request through the data query interface of the blockchain node.
- the blockchain data request is used to make the district
- the blockchain node retrieves the block data indicated by the blockchain data request from the blockchain non-relational database and calls back to the node device.
- the node device can directly initiate a blockchain data request to the blockchain non-relational database, for example, through the database interface of the blockchain non-relational database, which is equivalent to the node.
- the blockchain non-relational database directly responds to the received blockchain data request and returns the blockchain data indicated by the blockchain data request.
- a blockchain data request is in the same form as a blockchain transaction, it does not necessarily have all the properties of a blockchain transaction.
- a blockchain node may not necessarily Instead of consensus in the blockchain network, it is processed as a local call request.
- This kind of blockchain transaction that will only be executed within the local blockchain node without consensus is called a local transaction; of course, the blockchain Data requests can also have all the properties of a blockchain transaction, that is, after completing consensus in the blockchain network as a consensus transaction, they are executed separately by each blockchain node in the blockchain network.
- S104 Convert the blockchain data into standard data defined by database schema information corresponding to the blockchain relational database.
- Schema is an abstract collection of metadata, including a set of schema components: mainly the declaration of elements and attributes, and the definition of complex and simple data types. , specifically including: defining the elements that can appear in the document; defining the attributes that can appear in the document; defining which element is a sub-element; defining the order of sub-elements; defining the number of sub-elements; defining whether the element is empty or whether it can Contains text; defines data types for elements and attributes; defines default and fixed values for elements and attributes.
- schema is the organization and structure of the database.
- Database schema information contains schema objects, which can be tables, columns, data types, views, stored procedures, relationships, and primary keys. , foreign key, etc.
- Database schema information can be represented by a visual diagram that shows database objects and their relationships to each other. Since the database schema information is used to describe the structure of the database and can be used as a blueprint for creating a database, by specifying the database schema information corresponding to a database, it can guide how the data in the database is stored.
- the node device After the node device obtains the blockchain data, it will convert the blockchain data into the standard data defined by the database schema information based on the database schema information corresponding to the blockchain relational database, which means that the converted standard data It can be maintained in the blockchain relational database according to certain rules, and the standard data already has a standardized structure and has a defined relationship with other data in the blockchain relational database.
- the conversion process of blockchain data to standard data includes but is not limited to the conversion of data tables, rows, and columns.
- the block is implemented through the ETL (Extract-Transform-Load, data warehouse technology based on data extraction, conversion, and loading) mechanism.
- ETL Extract-Transform-Load, data warehouse technology based on data extraction, conversion, and loading
- the method further includes:
- the database schema information corresponding to the blockchain relational database can be maintained at the node device in advance (for example, set by the administrator user of the node device), or can be obtained by requesting a smart contract.
- each smart contract deployed by the blockchain node has a corresponding contract storage space in the blockchain non-relational database, and each smart contract has different characteristics when processing data, organizing data, and storing data. characteristics, so the corresponding contract storage spaces of different smart contracts in the non-relational blockchain have different data organization forms, and this data organization form includes the format, relationship and connotation of the data organization, etc. It is also based on database schema information The form is maintained in the smart contract.
- the embodiment of this specification obtains the data maintained in the smart contract corresponding to the smart contract by requesting the corresponding smart contract.
- the contract maintains the first database schema information of the blockchain data in the non-relational database as an organizational schema for maintaining the standard data converted from the blockchain data involved in the smart contract in the blockchain relational database, thereby Correctly maintain the standard data involved in the smart contract in the blockchain relational database.
- the database schema information corresponding to each smart contract can be obtained through the embodiments of this specification, and the database schema information corresponding to the smart contract can be obtained according to the corresponding smart contract.
- the database schema information is used as the database schema information corresponding to the blockchain relational database to realize the conversion of the blockchain data involved in the corresponding smart contract into standard data, and finally realizes according to the respective database schema information of different smart contracts.
- the correct maintenance of standard data involved in multiple smart contracts in the blockchain relational database is equivalent to the blockchain relational database application having multiple different database schema information, and the database schema information corresponding to any smart contract Only the standard data involved in the maintenance of any smart contract (that is, the standard data obtained from the blockchain data conversion in any smart contract) is supported, thereby supporting the maintenance of multiple smart contracts using different data organization forms on the blockchain. After the blockchain data in the relational database is correctly converted into standard data, it is finally migrated to the blockchain relational database in the form of standard data for maintenance.
- S106 Maintain the standard data in the blockchain relational database, which is used to provide data analysis services to analysis demanders.
- the node device After the node device obtains the standard data, it can store the standard data in the blockchain relational database according to the blockchain mode information corresponding to the blockchain relational database to implement blocks in the blockchain non-relational database. Conversion and migration of chain data to standard data in blockchain relational database. Since the blockchain relational database supports a variety of SQL and has powerful data analysis capabilities (such as data query capabilities based on various conditions, indexes, and relationships), the blockchain relational database can easily provide analysis needs to parties. data analysis services. For example, the data analysis engine deployed on and off the chain of the node device provides a data analysis interface to the outside world to provide data analysis services for the blockchain relational database to the external analysis requester who calls the analysis interface.
- the embodiment of this specification separately deploys a blockchain non-relational database and a blockchain relational database on the node device.
- the blockchain non-relational database is used to maintain the blockchain node when running the blockchain service.
- the generated blockchain data enables efficient access to blockchain data when the blockchain node runs the blockchain service; on the other hand, by maintaining the blockchain from the blockchain non-relational database
- the data is converted into standard data and synchronously maintained in the blockchain relational database, thereby using the blockchain relational database to achieve convenient data analysis services.
- the method for maintaining blockchain data involved in the embodiment of this specification realizes the backup of one data in two places, objectively improves the disaster recovery capability, realizes the separation of reading and writing of blockchain data through different types of databases, and ensures that the blockchain
- the service execution process realizes convenient data analysis services with high access efficiency.
- the method further includes: receiving a data analysis request sent by the analysis requester; and returning an analysis result obtained by analyzing the blockchain relational database based on the data analysis request to the analysis requester.
- the data analysis engine deployed on and off-chain on the node device can also be used to receive data analysis requests sent by the analysis requester, and then call the blockchain relational database based on the data analysis engine. Analyze some of the data, and finally return the analysis results to the analysis requester, thereby realizing a complete data analysis service.
- the data analysis engine will query the data that satisfies both condition A and condition B in the blockchain relational database and use these data as the analysis results. Return to analyzing the demand side.
- Figure 3 is a schematic structural diagram of a device provided by an exemplary embodiment.
- the device includes a processor 302, an internal bus 303, a network interface 306, a memory 308 and a non-volatile memory 310.
- the processor 302 reads the corresponding computer program from the non-volatile memory 310 into the memory 308 and then runs it.
- the execution subject of the following processing flow is not limited to each A logic unit can also be a hardware or logic device.
- FIG 4 is a block diagram of a device for maintaining blockchain data provided in this specification according to an exemplary embodiment.
- This device can be applied to the equipment shown in Figure 3 to implement the instructions of this specification.
- Technical solution: This device is applied to node equipment deployed with blockchain nodes.
- the node equipment maintains a blockchain non-relational database and a blockchain relational database.
- the blockchain non-relational database is used to maintain The blockchain data generated when the blockchain node runs the blockchain service; the device includes:
- the blockchain data acquisition unit 401 is used to acquire the blockchain data maintained in the blockchain non-relational database
- the data conversion unit 402 is used to convert the blockchain data into standard data defined by the database schema information corresponding to the blockchain relational database;
- the standard data maintenance unit 403 is used to maintain the standard data in the blockchain relational database, and the blockchain relational database is used to provide data analysis services to analysis demanders.
- the blockchain data acquisition unit 401 is specifically used to:
- the blockchain data acquisition unit 401 is further used to:
- the device further includes:
- the mode information query request sending unit 404 is configured to initiate a mode information query request to the smart contract, and determine the first database mode information recorded in the smart contract returned by the smart contract in response to the mode information query request. It is the database schema information corresponding to the blockchain relational database.
- the blockchain data includes block data, status data and event data.
- Optional also includes:
- the data analysis request receiving unit 405 is used to receive the data analysis request sent by the analysis requester;
- the analysis result return unit 406 is used to return the analysis result obtained by analyzing the blockchain relational database based on the data analysis request to the analysis requester.
- PLD Programmable Logic Device
- FPGA Field Programmable Gate Array
- HDL Hardware Description Language
- the controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer readable medium storing computer readable program code (eg, software or firmware) executable by the (micro)processor. , logic gates, switches, Application Specific Integrated Circuit (ASIC), programmable logic controllers and embedded microcontrollers.
- controllers include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, For Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the memory's control logic.
- the controller in addition to implementing the controller in the form of pure computer-readable program code, the controller can be completely programmed with logic gates, switches, application-specific integrated circuits, programmable logic controllers and embedded logic by logically programming the method steps. Microcontroller, etc. to achieve the same function. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the means for implementing various functions can be considered as structures within hardware components as well as software modules implementing the methods.
- the systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions.
- a typical implementation device is a server system.
- the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, or a personal digital assistant. , media player, navigation device, email device, game console, tablet, wearable device, or a combination of any of these devices.
- the functions are divided into various modules and described separately.
- the functions of each module can be implemented in the same or multiple software and/or hardware, or the modules that implement the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. .
- the device embodiments described above are only illustrative.
- the division of the units is only a logical function division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
- the coupling or direct coupling or communication connection between each other shown or discussed may be through some interfaces, and the indirect coupling or communication connection of the devices or units may be in electrical, mechanical or other forms.
- These computer program instructions may also be stored in a computer-readable memory that causes a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction means, the instructions
- the device implements the functions specified in a process or processes of the flowchart and/or a block or blocks of the block diagram.
- These computer program instructions may also be loaded onto a computer or other programmable data processing device, causing a series of operating steps to be performed on the computer or other programmable device to produce computer-implemented processing, thereby executing on the computer or other programmable device.
- Instructions provide steps for implementing the functions specified in a process or processes of a flowchart diagram and/or a block or blocks of a block diagram.
- a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
- processors CPUs
- input/output interfaces network interfaces
- memory volatile and non-volatile memory
- Memory may include non-permanent storage in computer-readable media, random access memory (RAM) and/or non-volatile memory in the form of read-only memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
- RAM random access memory
- ROM read-only memory
- flash RAM flash random access memory
- Computer-readable media includes both persistent and non-volatile, removable and non-removable media that can be implemented by any method or technology for storage of information.
- Information may be computer-readable instructions, data structures, modules of programs, or other data.
- Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), and read-only memory.
- PRAM phase change memory
- SRAM static random access memory
- DRAM dynamic random access memory
- RAM random access memory
- read-only memory read-only memory
- ROM read-only memory
- EEPROM electrically erasable programmable read-only memory
- flash memory or other memory technology
- compact disc read-only memory CD-ROM
- DVD digital versatile disc
- Magnetic tape magnetic tape storage, graphene storage or other magnetic storage devices or any other non-transmission medium can be used to store information that can be accessed by a computing device.
- computer-readable media does not include transitory media, such as modulated data signals and carrier waves.
- one or more embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, one or more embodiments of the present description may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment that combines software and hardware aspects. Furthermore, one or more embodiments of the present description may employ a computer program implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein. Product form.
- computer-usable storage media including, but not limited to, disk storage, CD-ROM, optical storage, etc.
- program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types.
- program modules may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network.
- program modules may be located in both local and remote computer storage media including storage devices.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Databases & Information Systems (AREA)
- Quality & Reliability (AREA)
- Data Mining & Analysis (AREA)
- Computing Systems (AREA)
- Health & Medical Sciences (AREA)
- Bioethics (AREA)
- General Health & Medical Sciences (AREA)
- Computer Hardware Design (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Description
Claims (10)
- 一种维护区块链数据的方法,应用于部署有区块链节点的节点设备,所述节点设备维护有区块链非关系型数据库和区块链关系型数据库,所述区块链非关系型数据库用于维护所述区块链节点运行区块链服务时生成的区块链数据;所述方法包括:获取所述区块链非关系型数据库中维护的所述区块链数据;将所述区块链数据转换为所述区块链关系型数据库对应的数据库模式信息定义的标准数据;将所述标准数据维护在所述区块链关系型数据库中,所述区块链关系型数据库用于向分析需求方提供数据分析服务。
- 根据权利要求1所述的方法,所述获取所述区块链非关系型数据库中维护的所述区块链数据,包括:接收所述区块链节点主动推送的所述区块链数据;和/或,向所述区块链节点发送区块链数据请求,接收所述区块链节点响应于所述区块链数据请求返回的所述区块链数据。
- 根据权利要求2所述的方法,所述向所述区块链节点发送区块链数据请求,包括:向所述区块链节点部署的智能合约发起针对所述智能合约维护在所述区块链非关系型数据库中的所述区块链数据的所述区块链数据请求;或者,向所述区块链节点发起针对所述区块链非关系型数据库中维护的所述区块链数据的所述区块链数据请求。
- 根据权利要求3所述的方法,在所述区块链数据请求针对于所述智能合约维护在所述区块链非关系型数据库中的所述区块链数据的情况下,所述方法还包括:向所述智能合约发起模式信息查询请求,将所述智能合约响应于所述模式信息查询请求返回的记录于所述智能合约中的第一数据库模式信息确定为所述区块链关系型数据库对应的所述数据库模式信息。
- 根据权利要求1所述的方法,所述区块链数据包括区块数据、状态数据和事件数据。
- 根据权利要求1所述的方法,还包括:接收所述分析需求方发送的数据分析请求;将基于所述数据分析请求对所述区块链关系型数据库进行分析得到的分析结果返回所述分析需求方。
- 一种维护区块链数据的装置,应用于部署有区块链节点的节点设备,所述节点设备维护有区块链非关系型数据库和区块链关系型数据库,所述区块链非关系型数据库用于维护所述区块链节点运行区块链服务时生成的区块链数据;所述装置包括:区块链数据获取单元,用于获取所述区块链非关系型数据库中维护的所述区块链数据;数据转换单元,用于将所述区块链数据转换为所述区块链关系型数据库对应的数据库模式信息定义的标准数据;标准数据维护单元,用于将所述标准数据维护在所述区块链关系型数据库中,所述区块链关系型数据库用于向分析需求方提供数据分析服务。
- 根据权利要求7所述的装置,还包括:数据分析请求接收单元,用于接收所述分析需求方发送的数据分析请求;分析结果返回单元,用于将基于所述数据分析请求对所述区块链关系型数据库进行分析得到的分析结果返回所述分析需求方。
- 一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器通过运行所述可执行指令以实现如权利要求1-6中任一项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机指令,该指令被处理器执行时实现如权利要求1-6中任一项所述方法的步骤。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210761453.0A CN115129786A (zh) | 2022-06-29 | 2022-06-29 | 一种维护区块链数据的方法、装置、电子设备和存储介质 |
| CN202210761453.0 | 2022-06-29 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2024001039A1 true WO2024001039A1 (zh) | 2024-01-04 |
Family
ID=83381448
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/135626 Ceased WO2024001039A1 (zh) | 2022-06-29 | 2022-11-30 | 一种维护区块链数据的方法、装置、电子设备和存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN115129786A (zh) |
| WO (1) | WO2024001039A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115129786A (zh) * | 2022-06-29 | 2022-09-30 | 蚂蚁区块链科技(上海)有限公司 | 一种维护区块链数据的方法、装置、电子设备和存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110597835A (zh) * | 2019-09-17 | 2019-12-20 | 深圳前海微众银行股份有限公司 | 一种基于区块链的交易数据删除方法及装置 |
| US20210152363A1 (en) * | 2018-11-23 | 2021-05-20 | Advanced New Technologies Co., Ltd. | Blockchain recording methods and apparatuses, and computer devices |
| CN113420046A (zh) * | 2021-06-22 | 2021-09-21 | 康键信息技术(深圳)有限公司 | 非关系型数据库的数据操作方法、装置、设备及存储介质 |
| CN113742386A (zh) * | 2021-11-03 | 2021-12-03 | 环球数科集团有限公司 | 一种对区块链账本的区块数据的加工解析方法 |
| CN115129786A (zh) * | 2022-06-29 | 2022-09-30 | 蚂蚁区块链科技(上海)有限公司 | 一种维护区块链数据的方法、装置、电子设备和存储介质 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN110827008B (zh) * | 2018-08-08 | 2023-07-18 | 华为技术有限公司 | 一种区块链节点和交易方法 |
| US11611560B2 (en) * | 2020-01-31 | 2023-03-21 | Salesforce.Com, Inc. | Systems, methods, and apparatuses for implementing consensus on read via a consensus on write smart contract trigger for a distributed ledger technology (DLT) platform |
| CN114461673B (zh) * | 2022-01-19 | 2025-06-13 | 北京工业大学 | 一种基于链上-链下协同的区块链查询优化方法 |
| CN114647700A (zh) * | 2022-03-21 | 2022-06-21 | 中国工商银行股份有限公司 | 基于区块链的数据同步方法及系统、电子设备及存储介质 |
-
2022
- 2022-06-29 CN CN202210761453.0A patent/CN115129786A/zh active Pending
- 2022-11-30 WO PCT/CN2022/135626 patent/WO2024001039A1/zh not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20210152363A1 (en) * | 2018-11-23 | 2021-05-20 | Advanced New Technologies Co., Ltd. | Blockchain recording methods and apparatuses, and computer devices |
| CN110597835A (zh) * | 2019-09-17 | 2019-12-20 | 深圳前海微众银行股份有限公司 | 一种基于区块链的交易数据删除方法及装置 |
| CN113420046A (zh) * | 2021-06-22 | 2021-09-21 | 康键信息技术(深圳)有限公司 | 非关系型数据库的数据操作方法、装置、设备及存储介质 |
| CN113742386A (zh) * | 2021-11-03 | 2021-12-03 | 环球数科集团有限公司 | 一种对区块链账本的区块数据的加工解析方法 |
| CN115129786A (zh) * | 2022-06-29 | 2022-09-30 | 蚂蚁区块链科技(上海)有限公司 | 一种维护区块链数据的方法、装置、电子设备和存储介质 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN115129786A (zh) | 2022-09-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110674228B (zh) | 数据仓库模型构建和数据查询方法、装置及设备 | |
| JP6602355B2 (ja) | クラウドベースの分散永続性及びキャッシュデータモデル | |
| CN110032604B (zh) | 数据存储装置、转译装置及数据库访问方法 | |
| CN106611046B (zh) | 一种基于大数据技术的空间数据存储处理中间件系统 | |
| US10122783B2 (en) | Dynamic data-ingestion pipeline | |
| US9753960B1 (en) | System, method, and computer program for dynamically generating a visual representation of a subset of a graph for display, based on search criteria | |
| KR102634058B1 (ko) | 입력 및 출력 스키마 매핑 | |
| WO2024001029A1 (zh) | 一种维护区块链数据的方法、装置、电子设备和存储介质 | |
| CN102012912B (zh) | 一种基于云计算环境的非结构化数据的管理方法 | |
| CN110019218A (zh) | 数据存储与查询方法及设备 | |
| CN110784419A (zh) | 铁路电务专业数据可视化方法及系统 | |
| CN110196871A (zh) | 数据入库方法和系统 | |
| CN106844682B (zh) | 数据交换方法、装置及系统 | |
| WO2024001028A1 (zh) | 一种维护区块链数据的方法、装置、电子设备和存储介质 | |
| CN107038207A (zh) | 一种数据查询方法、数据处理方法及装置 | |
| CN106202207A (zh) | 一种基于HBase‑ORM的索引及检索系统 | |
| CN106708993A (zh) | 基于大数据技术的空间数据存储处理中间件框架实现方法 | |
| CN113779349A (zh) | 数据检索系统、装置、电子设备和可读存储介质 | |
| CN111782886A (zh) | 元数据管理的方法和装置 | |
| CN105405070A (zh) | 一种分布式内存电网系统构建方法 | |
| CN111723161A (zh) | 一种数据处理方法、装置及设备 | |
| CN104408084A (zh) | 一种大数据筛选方法及装置 | |
| CN119576943B (zh) | 一种数据索引的构建系统、方法、存储介质及电子设备 | |
| CN111143329B (zh) | 一种数据处理方法及装置 | |
| Ye | Research on the key technology of big data service in university library |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22949118 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22949118 Country of ref document: EP Kind code of ref document: A1 |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22949118 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 24.06.2025) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22949118 Country of ref document: EP Kind code of ref document: A1 |