CN115129786A - Method and device for maintaining block chain data, electronic equipment and storage medium - Google Patents

Method and device for maintaining block chain data, electronic equipment and storage medium Download PDF

Info

Publication number
CN115129786A
CN115129786A CN202210761453.0A CN202210761453A CN115129786A CN 115129786 A CN115129786 A CN 115129786A CN 202210761453 A CN202210761453 A CN 202210761453A CN 115129786 A CN115129786 A CN 115129786A
Authority
CN
China
Prior art keywords
data
blockchain
block chain
relational database
analysis
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.)
Pending
Application number
CN202210761453.0A
Other languages
Chinese (zh)
Inventor
闫莺
魏长征
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ant Blockchain Technology Shanghai Co Ltd
Original Assignee
Ant Blockchain Technology Shanghai Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Ant Blockchain Technology Shanghai Co Ltd filed Critical Ant Blockchain Technology Shanghai Co Ltd
Priority to CN202210761453.0A priority Critical patent/CN115129786A/en
Publication of CN115129786A publication Critical patent/CN115129786A/en
Priority to PCT/CN2022/135626 priority patent/WO2024001039A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/64Protecting data integrity, e.g. using checksums, certificates or signatures

Abstract

The present specification provides a method, an apparatus, an electronic device, and a storage medium for maintaining blockchain data, where the method is applied to a node device deployed with blockchain nodes, where the node device maintains a blockchain non-relational database and a blockchain relational database, and the blockchain non-relational database is used to maintain blockchain data generated when a blockchain service is run by a blockchain node; the method comprises the following steps: obtaining the block chain data maintained in the block chain non-relational database; converting the block chain data into standard data defined by database mode information corresponding to the block chain relational database; and maintaining the standard data in the blockchain relational database, wherein the blockchain relational database is used for providing data analysis service for an analysis demand side.

Description

Method and device for maintaining block chain data, electronic equipment and storage medium
Technical Field
The embodiment of the specification belongs to the technical field of block chains, and particularly relates to a method and device for maintaining block chain data, electronic equipment and a storage medium.
Background
The Blockchain (Blockchain) is a novel application mode of computer technologies such as distributed data storage, point-to-point transmission, a consensus mechanism, an encryption algorithm and the like. In the block chain system, data blocks are combined into a chain data structure in a sequential connection mode according to a time sequence, and a distributed account book which is not falsifiable and counterfeitable is ensured in a cryptographic mode.
In the conventional blockchain technology, in order to meet the storage requirement of blockchain nodes on a large amount of data in the course of running blockchain service, the blockchain nodes generally use a non-relational database with efficient access efficiency for data storage, however, the non-relational database is not favorable for data analysis due to lack of transaction relationship, lack of connection and non-standardization among data. The relational database has complete transaction relationship, data are linked and have strict standardized structure, if the non-relational database in the traditional block chain technology is replaced by the relational database, although the data analysis is facilitated, the direct use of the relational database in a block chain bottom layer system brings huge challenges to the online read-write performance in the block chain service process of block chain link point operation. Therefore, how to implement a convenient data analysis service while ensuring efficient access efficiency in the execution process of the blockchain service is a problem to be solved in the art.
Disclosure of Invention
The invention aims to provide a method, a device, electronic equipment and a storage medium for maintaining block chain data.
According to a first aspect of one or more embodiments of the present specification, a method for maintaining blockchain data is provided, where the method is applied to a node device deployed with blockchain nodes, where the node device maintains a blockchain non-relational database and a blockchain relational database, and the blockchain non-relational database is used to maintain blockchain data generated when a blockchain service is run by using the blockchain nodes; the method comprises the following steps:
obtaining the block chain data maintained in the block chain non-relational database;
converting the block chain data into standard data defined by database mode information corresponding to the block chain relational database;
and maintaining the standard data in the blockchain relational database, wherein the blockchain relational database is used for providing data analysis services for analysis demanders.
According to a second aspect of one or more embodiments of the present specification, there is provided an apparatus for maintaining blockchain data, which is applied to a node device deployed with blockchain nodes, where the node device maintains a blockchain non-relational database and a blockchain relational database, and the blockchain non-relational database is used to maintain blockchain data generated when a blockchain service is run by using the blockchain nodes; the device comprises:
a blockchain data acquisition unit, configured to acquire the blockchain data maintained in the blockchain non-relational database;
the data conversion unit is used for converting the block chain data into standard data defined by database mode information corresponding to the block chain relational database;
and the standard data maintenance unit is used for maintaining the standard data in the blockchain relational database, and the blockchain relational database is used for providing data analysis services for analysis demanders.
According to a third aspect of one or more embodiments of the present specification, there is provided an electronic apparatus including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of the first aspect by executing the executable instructions.
According to a fourth aspect of one or more embodiments of the present description, a computer-readable storage medium is presented, having stored thereon computer instructions which, when executed by a processor, implement the steps of the method according to the first aspect.
In the embodiment of the present specification, the block chain non-relational database and the block chain relational database are respectively deployed on the node device, and on one hand, the block chain non-relational database is used for maintaining block chain data generated when the block chain is operated by the block chain link point, so that the block chain data can be efficiently accessed when the block chain is operated by the block chain link point; on the other hand, the blockchain data maintained from the blockchain non-relational database is converted into standard data and synchronously maintained in the blockchain relational database, so that convenient data analysis service is realized by using the blockchain relational database. The method for maintaining the block chain data, which is related to the embodiment of the specification, realizes two backup of one data, objectively improves disaster recovery capability, realizes read-write separation of the block chain data through different types of databases, and realizes convenient data analysis service under the condition of ensuring high efficiency of access in the block chain service execution process.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments in the present specification, the drawings required to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments described in the present specification, and it is obvious for those skilled in the art that other drawings may be obtained according to these drawings without inventive labor.
FIG. 1 is a flow chart of a method of maintaining blockchain data in accordance with an exemplary embodiment.
Fig. 2 is a block diagram of a system architecture for maintaining blockchain data according to an exemplary embodiment.
Fig. 3 is a schematic structural diagram of an apparatus according to an exemplary embodiment.
Fig. 4 is a block diagram of an apparatus for maintaining blockchain data according to an exemplary embodiment.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person skilled in the art based on the embodiments in the present specification without any inventive step should fall within the scope of protection of the present specification.
FIG. 1 is a flow chart of a method of maintaining blockchain data in accordance with an exemplary embodiment. The method is applied to node equipment with block chain nodes, wherein the node equipment maintains a block chain non-relational database and a block chain relational database, and the block chain non-relational database is used for maintaining block chain data generated when block chain service is operated by the block chain nodes; the method comprises the following steps:
s102: and acquiring the block chain data maintained in the block chain non-relational database.
Fig. 2 is a block diagram of a system architecture for maintaining blockchain data according to an exemplary embodiment. As shown in fig. 2, each blockchain node in the blockchain network is deployed on a corresponding node device, and each node device maintains a blockchain non-relational database and a blockchain relational database at the same time. In the embodiments of the present specification, the blockchain non-relational database belongs to the non-relational database, and the blockchain relational database belongs to the relational database.
On the one hand, the blockchain non-relational database is used as a native database of the blockchain link point-to-point operation blockchain service, namely, as a part of the basic architecture of the blockchain underlying system, and is used for efficiently accessing blockchain data generated in the process of the blockchain link point-to-point operation blockchain service. For example, the blockchain non-relational database may specifically adopt a Key-Value database (Key-Value pair database, a typical non-relational database, abbreviated as K-V database), which, unlike a relational database, does not explicitly store the values of data, and does not have the concept of schema (database schema information) in MySQL (relational database management system) and PostgreSQL (object-relational database management system which is a very well-characterized free software). This means that it cannot filter and Query the partial contents of the stored data by using Structured Query Language (SQL) with where as a relational database. If you do not know which query you want from, you need to go through all key values, find the corresponding value, filter it, and finally keep only the part of data you want. This is very computationally intensive and means that the K-V database can only guarantee high performance if the key is known, otherwise its performance is significantly insufficient. Thus, while K-V databases are superior to relational databases in terms of absolute access speed, the requirement to know the key value limits its application scenarios. Although the above description only refers to the introduction of K-V databases, it is essentially applicable to most non-relational databases, which in general have efficient access speed but lack data analysis capabilities, such as querying capabilities based on indexing, relationships between data.
In the embodiment of the present specification, since the node device deployed blockchain underlying system (including the blockchain link point and the corresponding blockchain database) follows a non-relational database (i.e., a blockchain non-relational database) with an efficient access speed, when the blockchain service is operated, the blockchain node can efficiently access data from the blockchain non-relational database, thereby ensuring efficient operation of the blockchain service.
On the other hand, the node device related to the embodiments of the present specification additionally maintains a blockchain relational database as a native database for providing data analysis services to users, that is, as a part of an infrastructure of a data analysis system, for providing data analysis services to analysis demanders. For example, the blockchain non-relational database may specifically adopt an oracle database, MySQL, or other relational databases. A relational database refers to a database that uses a relational model to organize data, and stores data in rows and columns for a user to understand conveniently, a series of rows and columns of the relational database are called tables, and a group of tables constitutes the database. A user retrieves data in a database by a query, which is an executable code that defines certain areas in the database. The relational model can be simply understood as a two-dimensional table model, a relational database is a data organization formed by two-dimensional tables and relations between the two-dimensional tables, the relational database needs to define database mode information such as the structure of the tables, the relation of the tables, a normalized data structure and the like in advance, and then stores data according to the database mode information, supports SQL (structured query language), has strong data analysis capability, but has poor efficiency once processing massive data because the relational database emphasizes the consistency of the data and pays huge cost for reducing the read-write performance, and the reliability of storing data and processing data of the relational database is good, and the performance is reduced particularly when high concurrent read-write is encountered. In general, the relational database has strong data analysis capability but has poor access speed and read-write performance, and is not suitable for large-scale concurrent read-write application scenarios.
In this embodiment of the present specification, since the data analysis system (including the data analysis engine and the corresponding database not shown in fig. 2) deployed under the node device chain employs a non-relational database (i.e., a blockchain relational database) with an efficient access speed, when the node device executes the data analysis service by invoking the data analysis engine, the node device can utilize a strong data analysis capability of the blockchain non-relational database, thereby ensuring that a convenient data analysis service is provided to an analysis demand party.
The data maintained in the blockchain relational database related to the embodiments of the present specification is obtained by data conversion and migration in the blockchain non-relational database. The following describes the data conversion and migration process.
In an embodiment of this specification, the acquiring the blockchain data maintained in the blockchain non-relational database includes: receiving the block chain data actively pushed by the block chain link point; and/or sending a block chain data request to the block chain nodes, and receiving the block chain data returned by the block chain nodes in response to the block chain data request.
The method for maintaining block chain data according to the embodiments of the present description is applied to a node device, and in particular, to a data conversion engine deployed under a node device chain. The node device may obtain the blockchain data maintained in the blockchain non-relational database in at least one of two ways, where the two ways include: firstly, by receiving actively pushed blockchain data of blockchain nodes, for example, each time when a blockchain node adds or modifies blockchain data to a blockchain non-relational database in the process of running blockchain service, a blockchain link node actively pushes a data update message carrying the newly added or modified blockchain data to a data conversion engine under a chain, and the method can timely convert and synchronize data in the blockchain non-relational database to the blockchain relational database, so that the symmetry and timeliness of the data in the blockchain relational database are ensured; secondly, the node device sends a block chain data request to the block chain nodes to acquire the block chain data returned by the block chain nodes in response to the block chain data request, and the method acquires the block chain data through a request-response mode, so that the range of the requested block chain data can be effectively controlled, and data which do not need to be maintained in a block chain relational database can be shielded.
Optionally, the sending a block chain data request to the block chain node includes: initiating the blockchain data request for the intelligent contract to maintain the blockchain data in the blockchain non-relational database to the intelligent contract deployed at the blockchain link point; or, initiating the blockchain data request to the blockchain link point for the blockchain data maintained in the blockchain non-relational database.
The blockchain data according to the embodiments of the present specification includes blockchain data, status data, and event data. The blockchain account book is a special data structure, which is formed by connecting a plurality of blocks end to end through a hash anchor and has non-tamper-resistance, each block consists of a block head and a block body, the block head of any block contains information such as a state tree root, a transaction number root, a receipt tree root, a block height and a hash value of a corresponding parent block of the block, and the block body contains transaction data (transaction hash) contained by the block. The block data referred to in the embodiments of the present specification refers to data included in a block chain directory. The state data and event data referred to in the embodiments of the present description are maintained by the respective smart contracts deployed at the block chain nodes (in essence, contract storage space corresponding to the respective smart contracts in the block chain non-relational database is maintained).
In one embodiment, a plurality of intelligent contracts are deployed at block chain nodes, and corresponding state data is maintained in any intelligent contract and is maintained in a contract storage space corresponding to any intelligent contract in a block chain non-relational database. And the node device may initiate a blockchain data request to the intelligent contracts deployed at the blockchain nodes (in fact, any intelligent contract is deployed at each blockchain node in the blockchain network), wherein the blockchain data request is in the form of a blockchain transaction, and after the blockchain transaction is received by the blockchain nodes, the blockchain nodes further call the intelligent contract indicated by the blockchain transaction to execute the blockchain transaction. When the intelligent contract is about to execute the blockchain transaction, blockchain data indicated by the blockchain transaction is searched and obtained from a contract storage space corresponding to the intelligent contract in the blockchain non-relational database, and the blockchain data is called back to the node equipment as a response message (such as in the form of a blockchain event) corresponding to the blockchain data request, so that the blockchain data maintained in the blockchain non-relational database is obtained in a mode of calling the intelligent contract.
In another embodiment, the node device may directly initiate a blockchain data request to the blockchain link point, for example, initiate a blockchain data request through a data query interface of the blockchain node, where the blockchain data request is used for the blockchain link point to retrieve the blockchain data indicated by the blockchain data request from the blockchain non-relational database and call back to the node device.
In yet another embodiment, the node device may initiate the blockchain data request directly to the blockchain non-relational database, for example, by initiating the blockchain data request through a database interface of the blockchain non-relational database, which corresponds to a local call under the node device chain without passing through the blockchain node, and the blockchain non-relational database returns the blockchain data indicated by the blockchain data request directly in response to the received blockchain data request.
It should be noted that although the blockchain data request is identical in form to the blockchain transaction, it does not necessarily have all properties of the blockchain transaction, for example, after receiving the blockchain data request, the blockchain node does not necessarily recognize the blockchain data request in the blockchain network, but processes the blockchain data request as a local call request, and the blockchain transaction that is not recognized and is only executed inside the local blockchain node is called a local transaction; of course, the blockchain data request may also have all the properties of blockchain transaction, that is, after the consensus transaction is completed in the blockchain network, the consensus transaction is executed by each blockchain node in the blockchain network.
S104: and converting the block chain data into standard data defined by database mode information corresponding to the block chain relational database.
The database schema information related in the embodiments of the present specification specifically refers to a database schema, which is an abstract set of metadata and includes a set of schema components, mainly declaring elements and attributes, and defining complex and simple data types, and specifically includes: defining elements that may appear in a document; defining attributes that may appear in a document; defining which element is a child element; defining an order of the sub-elements; defining a number of sub-elements; defining whether an element is empty or whether it can contain text; defining data types of elements and attributes; default values for elements and attributes are defined, as well as fixed values. Whereas in a database, the schema is the organization and structure of the database. The database schema information includes schema objects, which may be tables (table), columns (column), data types (data type), views (view), stored procedures (stored procedure), relationships (relationships), primary keys (primary keys), foreign keys (foreign keys), and the like. The database schema information can be represented by a visual graph that shows the database objects and their relationship to each other. Since the database schema information is used for describing the structure of the database and can be used as a blueprint for creating a database, how data in the database is stored can be guided by specifying the database schema information corresponding to the database.
After acquiring the block chain data, the node device converts the block chain data into standard data defined by the database schema information based on the database schema information corresponding to the block chain relational database, which means that the converted standard data can be maintained in the block chain relational database according to a certain rule, and the standard data also has a standardized structure and is defined with a relationship with other data in the block chain relational database. The conversion process from the blockchain data to the standard data includes, but is not limited to, conversion of data tables, rows, and columns, for example, conversion from the blockchain data to the standard data is realized through an ETL (Extract-Transform-Load, a data warehouse technology based on data extraction, conversion, and loading) mechanism, and specific implementation manners thereof are described in the prior art, and are not described herein again.
Optionally, in a case that the blockchain data request maintains the blockchain data in the blockchain non-relational database for the intelligent contract, the method further includes:
and initiating a mode information query request to the intelligent contract, and determining first database mode information recorded in the intelligent contract, which is returned by the intelligent contract in response to the mode information query request, as the database mode information corresponding to the block chain relational database.
In this embodiment, the database schema information corresponding to the blockchain relational database may be maintained in advance at the node device (for example, set by an administrator user of the node device), or obtained by requesting from the smart contract. As mentioned above, since each intelligent contract deployed at a block chain node has a corresponding contract storage space in the block chain non-relational database, and each intelligent contract has different characteristics in processing data, organizing data, and storing data, the contract storage spaces corresponding to different intelligent contracts in the block chain non-relational database have different data organization forms, and the data organization forms include formats, relationships, and connotations of data organization, which are also maintained in the intelligent contracts in the form of database mode information. Therefore, in order to correctly deal with blockchain data with different organization characteristics maintained by different intelligent contracts in a blockchain non-relational database, the embodiment of the specification requests the corresponding intelligent contract to acquire the first database mode information maintained in the intelligent contract and corresponding to the blockchain data maintained by the intelligent contract in the non-relational database as the organization mode of the standard data converted by maintaining the blockchain data related to the intelligent contract in the blockchain relational database, so that the standard data related to the intelligent contract is correctly maintained in the blockchain relational database. When a block chain node contains a plurality of intelligent contracts and different intelligent contracts have different data organization forms, the embodiment of the specification can acquire database mode information corresponding to each intelligent contract, and according to the database mode information corresponding to the intelligent contract, the database mode information corresponding to the block chain relational database is used as the database mode information corresponding to the block chain relational database to realize the conversion of block chain data related to the corresponding intelligent contract into standard data, and finally according to the respective database mode information of different intelligent contracts, the standard data related to a plurality of intelligent contracts are correctly maintained in the block chain relational database, at this time, the database corresponding to the block chain relational database is applied with a plurality of different database mode information, and the database mode information corresponding to any intelligent contract only supports the maintenance of the standard data related to any intelligent contract (namely, the standard data obtained by the conversion of the block chain data in any intelligent contract), therefore, a plurality of intelligent contracts adopting different data organization forms are supported, after the blockchain data maintained in the blockchain non-relational database are correctly converted into the standard data, the blockchain data are finally transferred into the blockchain relational database in the form of the standard data for maintenance.
S106: and maintaining the standard data in the blockchain relational database, wherein the blockchain relational database is used for providing data analysis services for analysis demanders.
After obtaining the standard data, the node device may store the standard data in the blockchain relational database according to the blockchain mode information corresponding to the blockchain relational database, so as to implement the conversion and migration from the blockchain data in the blockchain non-relational database to the standard data in the blockchain relational database. Because the blockchain relational database supports various SQL and has strong data analysis capability (such as data query capability based on various conditions, indexes and relations), the blockchain relational database can conveniently provide convenient data analysis service for analysis demanders. For example, a data analysis interface is provided to the outside through a data analysis engine deployed uplink and downlink in the node device, so as to provide a data analysis service for the blockchain relational database to an analysis demander calling the analysis interface to the outside.
In the embodiment of the present specification, the block chain non-relational database and the block chain relational database are respectively deployed on the node device, and on one hand, the block chain non-relational database is used for maintaining block chain data generated when the block chain is operated by the block chain link point, so that the block chain data can be efficiently accessed when the block chain is operated by the block chain link point; on the other hand, the blockchain data maintained in the blockchain non-relational database is converted into standard data and is synchronously maintained in the blockchain relational database, so that convenient data analysis service is realized by using the blockchain relational database. The method for maintaining the block chain data, which is related to the embodiment of the specification, realizes two backup of one data, objectively improves disaster recovery capability, realizes read-write separation of the block chain data through different types of databases, and realizes convenient data analysis service under the condition of ensuring high efficiency of access in the block chain service execution process.
Optionally, the method further includes: receiving a data analysis request sent by the analysis demander; and returning an analysis result obtained by analyzing the block chain relational database based on the data analysis request to the analysis demander. As an embodiment of providing data analysis services, the data analysis engine deployed on the uplink and the downlink of the node device may be further configured to receive a data analysis request sent by an analysis demander, then call a part of data in the block chain relational database for analysis based on the data analysis engine, and finally return an analysis result obtained through analysis to the analysis demander, thereby implementing a complete data analysis service. For example, if the data analysis request is a data query request for simultaneously satisfying the condition a and the condition B, the data analysis engine queries the data having the condition a and the condition B in the blockchain relational database, and returns the data as the analysis result to the analysis demander.
FIG. 3 is a schematic block diagram of an apparatus provided in an exemplary embodiment. Referring to fig. 3, at the hardware level, the apparatus includes a processor 302, an internal bus 303, a network interface 306, a memory 308, and a non-volatile memory 310, but may also include hardware required for other functions. One or more embodiments of the present description may be implemented in software, such as by processor 302 reading a corresponding computer program from non-volatile storage 310 into memory 308 and then executing. Of course, besides software implementation, the one or more embodiments in this specification do not exclude other implementations, such as logic devices or combinations of software and hardware, and so on, that is, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or logic devices.
Fig. 4 is a block diagram of an apparatus for maintaining blockchain data according to an exemplary embodiment, which may be applied to the device shown in fig. 3 to implement the technical solution of the present specification; the device is applied to node equipment with block chain nodes, the node equipment maintains a block chain non-relational database and a block chain relational database, and the block chain non-relational database is used for maintaining block chain data generated when block chain service is operated by the block chain nodes; the device comprises:
a block chain data obtaining unit 401, configured to obtain the block chain data maintained in the block chain non-relational database;
a data conversion unit 402, configured to convert the blockchain data into standard data defined by database mode information corresponding to the blockchain relational database;
a standard data maintenance unit 403, configured to maintain the standard data in the blockchain relational database, where the blockchain relational database is configured to provide a data analysis service to an analysis demander.
Optionally, the block chain data obtaining unit 401 is specifically configured to:
receiving the block chain data actively pushed by the block chain link point; and/or the presence of a gas in the gas,
and sending a block chain data request to the block chain nodes, and receiving the block chain data returned by the block chain nodes in response to the block chain data request.
Optionally, the block chain data obtaining unit 401 is further configured to:
initiating the blockchain data request for the intelligent contract to maintain the blockchain data in the blockchain non-relational database to the intelligent contract deployed at the blockchain link point; alternatively, the first and second electrodes may be,
initiating the blockchain data request to the blockchain link point for the blockchain data maintained in the blockchain non-relational database.
Optionally, in a case that the blockchain data request maintains the blockchain data in the blockchain non-relational database for the intelligent contract, the apparatus further includes:
a mode information query request sending unit 404, configured to initiate a mode information query request to the intelligent contract, and determine first database mode information recorded in the intelligent contract and returned by the intelligent contract in response to the mode information query request as the database mode information corresponding to the block chain relational database.
Optionally, the blockchain data includes blockchain data, status data, and event data.
Optionally, the method further includes:
a data analysis request receiving unit 405, configured to receive a data analysis request sent by the analysis demander;
an analysis result returning unit 406, configured to return an analysis result obtained by analyzing the block chain relational database based on the data analysis request to the analysis demander.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain the corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry for implementing the logical method flows can be readily obtained by a mere need to program the method flows with some of the hardware description languages described above and into an integrated circuit.
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 that stores computer readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and embedded microcontrollers, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a server system. Of course, the present invention does not exclude that as future computer technology develops, the computer implementing the functionality of the above described 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, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device or a combination of any of these devices.
Although one or more embodiments of the present description provide method operational steps as described in the embodiments or flowcharts, more or fewer operational steps may be included based on conventional or non-inventive approaches. The order of steps recited in the embodiments is merely one manner of performing the steps in a multitude of orders and does not represent the only order of execution. When an actual apparatus or end product executes, it may execute sequentially or in parallel (e.g., parallel processors or multi-threaded environments, or even distributed data processing environments) according to the method shown in the embodiment or the figures. The terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, the presence of additional identical or equivalent elements in a process, method, article, or apparatus that comprises the recited elements is not excluded. For example, if the terms first, second, etc. are used to denote names, they do not denote any particular order.
For convenience of description, the above devices are described as being divided into various modules by functions, which are described separately. Of course, when implementing one or more of the present description, the functions of each module may be implemented in one or more software and/or hardware, or the modules implementing the same functions may be implemented by a combination of a plurality of sub-modules or sub-units, etc. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of logical functional division, and other divisions may be realized in practice, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, 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), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
As will be appreciated by one skilled in the art, 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 combining software and hardware aspects. Furthermore, one or more embodiments of the present description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
One or more embodiments of the present description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. One or more embodiments of the specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment. In the description of the specification, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the specification. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The above description is merely exemplary of one or more embodiments of the present disclosure and is not intended to limit the scope of one or more embodiments of the present disclosure. Various modifications and alterations to one or more embodiments described herein will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement made within the spirit and principle of the present specification shall be included in the scope of the claims.

Claims (10)

1. A method for maintaining block chain data is applied to node equipment with block chain nodes, the node equipment maintains a block chain non-relational database and a block chain relational database, and the block chain non-relational database is used for maintaining block chain data generated when block chain service is operated by the block chain nodes; the method comprises the following steps:
obtaining the block chain data maintained in the block chain non-relational database;
converting the block chain data into standard data defined by database mode information corresponding to the block chain relational database;
and maintaining the standard data in the blockchain relational database, wherein the blockchain relational database is used for providing data analysis services for analysis demanders.
2. The method of claim 1, the obtaining the blockchain data maintained in the blockchain non-relational database, comprising:
receiving the block chain data actively pushed by the block chain link point; and/or the presence of a gas in the gas,
and sending a block chain data request to the block chain nodes, and receiving the block chain data returned by the block chain nodes in response to the block chain data request.
3. The method of claim 2, the sending a block chain data request to the block chain linlc point, comprising:
initiating the blockchain data request for the intelligent contract to maintain the blockchain data in the blockchain non-relational database to the intelligent contract deployed at the blockchain link point; alternatively, the first and second electrodes may be,
initiating the blockchain data request to the blockchain link point for the blockchain data maintained in the blockchain non-relational database.
4. The method of claim 3, where the blockchain data request maintains the blockchain data in the blockchain non-relational database for the intelligent contract, the method further comprising:
and initiating a mode information query request to the intelligent contract, and determining first database mode information recorded in the intelligent contract, which is returned by the intelligent contract in response to the mode information query request, as the database mode information corresponding to the block chain relational database.
5. The method of claim 1, the blockchain data comprising blockchain data, status data, and event data.
6. The method of claim 1, further comprising:
receiving a data analysis request sent by the analysis demander;
and returning an analysis result obtained by analyzing the block chain relational database based on the data analysis request to the analysis demander.
7. A device for maintaining block chain data is applied to node equipment with block chain nodes, the node equipment maintains a block chain non-relational database and a block chain relational database, and the block chain non-relational database is used for maintaining block chain data generated when block chain service is operated by the block chain nodes; the device comprises:
a blockchain data acquisition unit, configured to acquire the blockchain data maintained in the blockchain non-relational database;
the data conversion unit is used for converting the block chain data into standard data defined by database mode information corresponding to the block chain relational database;
and the standard data maintenance unit is used for maintaining the standard data in the blockchain relational database, and the blockchain relational database is used for providing data analysis services for analysis demanders.
8. The apparatus of claim 7, further comprising:
a data analysis request receiving unit, configured to receive a data analysis request sent by the analysis demander;
and the analysis result returning unit is used for returning an analysis result obtained by analyzing the block chain relational database based on the data analysis request to the analysis demander.
9. An electronic device, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor implements the method of any one of claims 1-6 by executing the executable instructions.
10. A computer readable storage medium having stored thereon computer instructions which, when executed by a processor, carry out the steps of the method according to any one of claims 1 to 6.
CN202210761453.0A 2022-06-29 2022-06-29 Method and device for maintaining block chain data, electronic equipment and storage medium Pending CN115129786A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210761453.0A CN115129786A (en) 2022-06-29 2022-06-29 Method and device for maintaining block chain data, electronic equipment and storage medium
PCT/CN2022/135626 WO2024001039A1 (en) 2022-06-29 2022-11-30 Method and apparatus for maintaining blockchain data, electronic device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210761453.0A CN115129786A (en) 2022-06-29 2022-06-29 Method and device for maintaining block chain data, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115129786A true CN115129786A (en) 2022-09-30

Family

ID=83381448

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210761453.0A Pending CN115129786A (en) 2022-06-29 2022-06-29 Method and device for maintaining block chain data, electronic equipment and storage medium

Country Status (2)

Country Link
CN (1) CN115129786A (en)
WO (1) WO2024001039A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024001039A1 (en) * 2022-06-29 2024-01-04 蚂蚁区块链科技(上海)有限公司 Method and apparatus for maintaining blockchain data, electronic device, and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109947845A (en) * 2018-11-23 2019-06-28 阿里巴巴集团控股有限公司 A kind of block chain deposits card method, apparatus and computer equipment
CN110597835B (en) * 2019-09-17 2024-02-27 深圳前海微众银行股份有限公司 Transaction data deleting method and device based on blockchain
CN113420046A (en) * 2021-06-22 2021-09-21 康键信息技术(深圳)有限公司 Data operation method, device, equipment and storage medium of non-relational database
CN113742386B (en) * 2021-11-03 2022-02-08 环球数科集团有限公司 Processing and analyzing method for block data of block chain account book
CN115129786A (en) * 2022-06-29 2022-09-30 蚂蚁区块链科技(上海)有限公司 Method and device for maintaining block chain data, electronic equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024001039A1 (en) * 2022-06-29 2024-01-04 蚂蚁区块链科技(上海)有限公司 Method and apparatus for maintaining blockchain data, electronic device, and storage medium

Also Published As

Publication number Publication date
WO2024001039A1 (en) 2024-01-04

Similar Documents

Publication Publication Date Title
CN110674228B (en) Data warehouse model construction and data query method, device and equipment
KR102258437B1 (en) Blockchain-based data storage and query method and device
CN107038207B (en) Data query method, data processing method and device
Chavan et al. Survey paper on big data
CN102999537A (en) System and method for data migration
Al Naami et al. GISQF: An efficient spatial query processing system
Banane et al. Storing RDF data into big data NoSQL databases
CN104239377A (en) Platform-crossing data retrieval method and device
CN110716952A (en) Multi-source heterogeneous data processing method and device and storage medium
CN114461603A (en) Multi-source heterogeneous data fusion method and device
Vajk et al. Automatic NoSQL schema development: A case study
CN116483859A (en) Data query method and device
CN115129785A (en) Method and device for maintaining block chain data, electronic equipment and storage medium
CN115129786A (en) Method and device for maintaining block chain data, electronic equipment and storage medium
WO2024001029A1 (en) Method and apparatus for maintaining blockchain data, electronic device, and storage medium
Kim et al. Comprehensive Knowledge Archive Network harvester improvement for efficient open‐data collection and management
CN113779349A (en) Data retrieval system, apparatus, electronic device, and readable storage medium
CN112417225A (en) Joint query method and system for multi-source heterogeneous data
CN112035466A (en) Block chain query external index development framework
CN107463618B (en) Index creating method and device
CN106407345B (en) Dirty data updating method and device
Kondylakis et al. Enabling joins over cassandra NoSQL databases
Le-Phuoc et al. Querying heterogeneous personal information on the go
Serrano et al. From relations to multi-dimensional maps: A SQL-to-hbase transformation methodology
Kanojia et al. IT Infrastructure for Smart City: Issues and Challenges in Migration from Relational to NoSQL Databases

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination