WO2020224236A1 - 区块链数据处理的装置、方法、系统及存储介质 - Google Patents

区块链数据处理的装置、方法、系统及存储介质 Download PDF

Info

Publication number
WO2020224236A1
WO2020224236A1 PCT/CN2019/120589 CN2019120589W WO2020224236A1 WO 2020224236 A1 WO2020224236 A1 WO 2020224236A1 CN 2019120589 W CN2019120589 W CN 2019120589W WO 2020224236 A1 WO2020224236 A1 WO 2020224236A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
chain
data
predetermined
chain data
Prior art date
Application number
PCT/CN2019/120589
Other languages
English (en)
French (fr)
Inventor
褚镇飞
张培培
陈沐豪
李文强
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2020224236A1 publication Critical patent/WO2020224236A1/zh

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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • 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

Definitions

  • This application relates to the field of blockchain technology, and in particular to a device, method, system and storage medium for blockchain data processing.
  • Blockchain is generally understood as a distributed ledger, and its essence is also a distributed database.
  • a blockchain node In the consortium chain scenario, due to the introduction of multiple chains, a blockchain node often belongs to multiple blockchains at the same time.
  • the device where the blockchain node is located stores data from multiple chains, the block data will be stored and differentiated, but other data will be combined and stored, which is relatively simple to implement.
  • a new node needs to be created. The new node starts to synchronize data from the genesis block (ie the first block) in order to synchronize data on the same chain to On the newly created node.
  • the inventor realized that this method of data processing is cumbersome and low in efficiency, which increases network pressure on other nodes and wastes system resources.
  • the purpose of this application is to provide a block chain data processing device, method, system and storage medium, aiming to realize simple and efficient expansion operations in a multi-chain scenario.
  • the device for processing blockchain data includes a memory and a processor connected to the memory.
  • the processing system is executed by the processor, the following steps are implemented:
  • the monitoring smart contract is called to monitor the system information of the node, and the system information includes the storage capacity of the node;
  • the multi-chain data stored on the node is planned according to the chain name, and the multi-chain data with the same chain name is divided into the same pre-created directory in;
  • the multi-chain data is deleted.
  • the multi-chain data includes block data, index data, status data and historical data.
  • system information further includes data status information of multi-chain data, and when the processing system is executed by the processor, the following steps are further implemented:
  • the invalid Multi-chain data is planned according to the chain name, and invalid multi-chain data with the same chain name is divided into the same pre-created directory;
  • the invalid multi-chain data is deleted.
  • the current storage capacity of the node is sent to a predetermined terminal for display and warning.
  • this application also provides a method for processing blockchain data, and the method for processing blockchain data includes:
  • the monitoring smart contract is called to monitor the system information of the node, and the system information includes the storage capacity of the node;
  • the multi-chain data includes block data, index data, status data and historical data.
  • the system information further includes data status information of the multi-link data, and after the step S1, it further includes:
  • the invalid Multi-chain data is planned according to the chain name, and invalid multi-chain data with the same chain name is divided into the same pre-created directory;
  • the invalid multi-chain data is deleted.
  • the method further includes: if it is monitored that the current storage capacity of the node is greater than or equal to the predetermined first disk capacity, sending the current storage capacity of the node to a predetermined terminal for display and warning.
  • the method further includes: obtaining smart contract information from the configuration file of the node, and if the smart contract information does not include the monitoring smart contract, installing the monitoring smart contract.
  • the present application also provides a computer-readable storage medium on which a processing system is stored, and when the processing system is executed by a processor, the steps of the above-mentioned blockchain data processing method are realized.
  • this application monitors the storage capacity of the node by invoking the monitoring smart contract. If the storage capacity of a node reaches the bottleneck, the storage situation of the data node will be transformed, and the multi-chain data stored on the node will be The chain name is planned, and the multi-chain data of the same chain name is divided into the same pre-created directory, and the data is stored according to the chain. After the new node is started, the directory is synchronized to the new node. The new node By searching and reading the data corresponding to the chain name in the directory to this node, the application of the capacity expansion scenario is completed, so that the data of part of the chain can be moved to the new node to achieve expansion. This method is simple and efficient to operate. There is no need to synchronize data block by block, which reduces network pressure on other nodes and saves system resources.
  • FIG. 1 is a schematic diagram of the hardware architecture of an embodiment of a device for processing blockchain data in this application;
  • FIG. 2 is a program module diagram of an embodiment of the processing system in FIG. 1;
  • FIG. 3 is a schematic flowchart of an embodiment of a method for processing blockchain data in this application.
  • the block chain data processing device 1 is a device that can automatically perform numerical calculation and/or information processing according to pre-set or stored instructions.
  • the block chain data processing device 1 may be a computer, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing, where cloud computing is distributed A type of computing, a super virtual computer composed of a group of loosely coupled computer sets.
  • the block chain data processing device 1 may include, but is not limited to, a memory 11, a processor 12, and a network interface 13 that can be communicated with each other through a system bus.
  • the memory 11 is stored on the processor 12 Operating processing system 10. It should be pointed out that Figure 1 only shows the device 1 for blockchain data processing with components 11-13, but it should be understood that it is not required to implement all the components shown, and more or more can be implemented instead. Few components.
  • the memory 11 includes a memory and at least one type of readable storage medium.
  • the memory provides cache for the operation of the device 1 for blockchain data processing;
  • the readable storage medium can be, for example, flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static Non-volatile storage media such as random access memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory, magnetic disks, optical disks, etc. .
  • the readable storage medium may be an internal storage unit of the device 1 for blockchain data processing, such as the hard disk of the device 1 for blockchain data processing; in other embodiments, the non-volatile The storage medium can also be an external storage device of the device 1 for blockchain data processing, such as a plug-in hard disk equipped on the device 1 for blockchain data processing, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital). Digital, SD) card, flash card (Flash Card), etc.
  • the readable storage medium of the memory 11 is generally used to store the operating system and various application software installed in the blockchain data processing device 1, for example, to store the program code of the processing system 10 in an embodiment of the present application Wait.
  • the memory 11 can also be used to temporarily store various types of data that have been output or will be output.
  • the processor 12 may be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments, and is used to run data stored in the memory 11 Program code or processing data, such as running the processing system 10, etc.
  • CPU Central Processing Unit
  • controller microcontroller
  • microprocessor or other data processing chip in some embodiments, and is used to run data stored in the memory 11 Program code or processing data, such as running the processing system 10, etc.
  • the network interface 13 may include a standard wireless network interface and a wired network interface.
  • the network interface 13 is usually used to establish a communication connection between the block chain data processing apparatus 1 and other electronic devices.
  • the processing system 10 is stored in the memory 11, and includes at least one computer-readable instruction stored in the memory 11, and the at least one computer-readable instruction can be executed by the processor 12 to implement the method of each embodiment of the present application; And, the at least one computer-readable instruction can be divided into different logic modules according to the different functions implemented by its parts.
  • the above-mentioned processing system 10 implements the following steps when being executed by the processor 12:
  • the monitoring smart contract is called to monitor the system information of the node, and the system information includes the storage capacity of the node;
  • the multi-chain data stored on the node is planned according to the chain name, and the multi-chain data with the same chain name is divided into the same pre-created directory in;
  • the multi-chain data is deleted.
  • the multi-chain data includes block data, index data, status data and historical data.
  • system information further includes data status information of multi-chain data, and when the processing system is executed by the processor, the following steps are further implemented:
  • the invalid Multi-chain data is planned according to the chain name, and invalid multi-chain data with the same chain name is divided into the same pre-created directory;
  • the invalid multi-chain data is deleted.
  • the current storage capacity of the node is sent to a predetermined terminal for display and warning.
  • FIG. 2 it is a program module diagram of the processing system 10 in FIG. 1 and FIG. 2.
  • the processing system 10 is divided into multiple modules, and the multiple modules are stored in the memory 12 and executed by the processor 13 to complete the application.
  • the module referred to in this application refers to a series of computer program instruction segments that can complete specific functions.
  • the processing system 10 can be divided into: a monitoring module 101, a planning module 102, a synchronization module 103, and a deletion module 104.
  • the monitoring module 101 is used for invoking the monitoring smart contract to monitor the system information of the node in the multi-chain scenario of the alliance chain, and the system information includes the storage capacity of the node;
  • the monitoring smart contract is used to monitor the node's system information.
  • System information includes the storage capacity of the node (that is, the storage capacity of the device used by the node), the data status information of the multi-chain data (that is, whether the data is valid or invalid), and other business information.
  • the business information can include the current transaction pen of the blockchain.
  • the monitoring of different business information can be customized for different businesses.
  • the monitoring process includes: after the node is started, the monitoring smart contract is called to monitor the node, and the subsequent node itself can periodically execute the monitoring smart contract for monitoring.
  • a node executes a monitoring smart contract
  • conventional system tools can be used for monitoring. For example, on the Linux operating system, use the top and htop commands to monitor memory and CPU usage, use the iostat command to view the usage of data storage devices, and so on.
  • the processing system 10 further includes:
  • the installation module is used to obtain the smart contract information from the configuration file of the node. If the smart contract information does not include the monitoring smart contract, the monitoring smart contract is installed.
  • the processing system 10 further includes:
  • the monitoring module is used to call the monitoring smart contract to monitor the system information of the node in the multi-chain scenario of the alliance chain, and the system information includes the storage capacity of the node;
  • the planning module is used to plan the multi-chain data stored on the node according to the chain name if it is monitored that the current storage capacity of the node is greater than or equal to the predetermined first disk capacity, and divide the multi-chain data of the same chain name into the same In the pre-created directory;
  • the synchronization module is used to send a start message to a predetermined node if there is no transaction currently executing on the node, and after the predetermined node is started, synchronize at least one directory of divided multi-chain data to the predetermined node To expand the capacity of the node;
  • the deleting module is used to delete the multi-chain data after receiving the completion message of the predetermined node reading the multi-chain data in the directory.
  • the planning module 102 is configured to, if it is monitored that the current storage capacity of the node is greater than or equal to the predetermined first disk capacity, plan the multi-chain data stored on the node according to the chain name, and divide the multi-chain data with the same chain name into In the same pre-created directory;
  • multi-chain data includes block data, index data, status data, and historical data.
  • the multi-chain data stored on the node is planned according to the chain name (that is, the ledger name), the multi-chain data with the same chain name is divided into the same pre-created directory, and the multi-chain data with different chain names is divided into
  • each directory includes all the data of a chain, complete the data file path planning of the multi-chain data in the case of multi-chain, so as to move the data of part of the chain or the data of all the chains to the new node. Realize the expansion of this node.
  • the processing system 10 further includes:
  • the early warning module if it is monitored that the current storage capacity of the node is greater than or equal to the predetermined first disk capacity, it is used to send the current storage capacity of the node to a predetermined terminal for display and warning.
  • the synchronization module 103 is configured to send a start message to a predetermined node if there is no transaction currently executing on the node, and after the predetermined node is started, synchronize at least one directory of divided multi-chain data to the node A predetermined node to expand the capacity of the node;
  • the deleting module 104 is configured to delete the multi-chain data after receiving the completion message that the predetermined node reads the multi-chain data in the directory.
  • the current node before the expansion of the current node, if the current node does not have a transaction currently being executed, it can send a start message to a predetermined node (that is, a new node), if it is found that the current node is currently executing a transaction, in order to make the transaction If this expansion is not affected, the execution of the transaction will be suspended, and then the start message will be sent to the predetermined node to start the predetermined node to perform the expansion operation.
  • a predetermined node that is, a new node
  • the predetermined node After the predetermined node receives the start message, it starts. Then, the node synchronizes at least one directory of the divided multi-chain data to the predetermined node. After the predetermined node obtains the directory, it searches and merges Read the data corresponding to the chain name in the directory to this node, and perform the capacity expansion of the cross-chain data. After reading the data corresponding to the chain name in the directory, the predetermined node sends a completion message to the node, After receiving the completion message, the node deletes the corresponding data in the directory synchronized to the predetermined node to release the storage space of the node.
  • FIG. 3 is a schematic flowchart of an embodiment of a method for processing blockchain data according to this application. The method is implemented when the processor 13 of the device 1 for processing blockchain data executes the processing system 10 stored in the memory 12 The following steps:
  • Step S1 in the multi-chain scenario of the alliance chain, call the monitoring smart contract to monitor the system information of the node, and the system information includes the storage capacity of the node;
  • the configuration file includes which chains the node belongs to, the IP address and port information of the node (ie address information), and the smart contract information included in the node.
  • the monitoring smart contract can also be a system smart contract, that is, a smart contract built into the system, which exists and can provide services after the blockchain node is created, without additional resources. After the node is started for the first time, the system smart contract is automatically installed to reduce the workload of operation and maintenance.
  • system smart contract is automatically installed to reduce the workload of operation and maintenance.
  • the monitoring smart contract is used to monitor the node's system information.
  • System information includes the storage capacity of the node (that is, the storage capacity of the device used by the node), the data status information of the multi-chain data (that is, whether the data is valid or invalid), and other business information.
  • the business information can include the current transaction pen of the blockchain.
  • the monitoring of different business information can be customized for different businesses.
  • the monitoring process includes: after the node is started, the monitoring smart contract is called to monitor the node, and the subsequent node itself can periodically execute the monitoring smart contract for monitoring.
  • the smart contract engine on the node executes the monitoring smart contract, and the monitoring smart contract calls the query interface.
  • the smart contract engine reads the current storage capacity of the node through the standard system state collection interface, and returns it to the monitoring smart contract for feedback.
  • a node executes a monitoring smart contract
  • conventional system tools can be used for monitoring. For example, on the Linux operating system, use the top and htop commands to monitor memory and CPU usage, use the iostat command to view the usage of data storage devices, and so on.
  • Step S2 If it is monitored that the current storage capacity of the node is greater than or equal to the predetermined first disk capacity, the multi-chain data stored on the node is planned according to the chain name, and the multi-chain data with the same chain name is divided into the same pre- In the created directory;
  • the predetermined first disk capacity is, for example, 80% of the total storage capacity of the node.
  • multi-chain data includes block data, index data, status data, and historical data.
  • Index data is provided for querying blocks
  • status data is a snapshot of data provided to complete business functions
  • historical data records the historical information of data modification.
  • Block data is stored separately for each chain, but index data, status data, and historical data are stored together.
  • the multi-chain data stored on the node is planned according to the chain name (that is, the ledger name), the multi-chain data with the same chain name is divided into the same pre-created directory, and the multi-chain data with different chain names is divided into
  • each directory includes all the data of a chain, complete the data file path planning of the multi-chain data in the case of multi-chain, so as to move the data of part of the chain or the data of all the chains to the new node. Realize the expansion of this node.
  • the current storage capacity of the node is sent to a predetermined terminal for display and warning.
  • the current storage capacity of the node can be converted into a graphical form and sent to a predetermined terminal for display for more intuitive display.
  • the current storage capacity of the node is greater than or equal to the predetermined first disk capacity, indicating that the node is currently The storage capacity has reached the bottleneck state, and early warning is needed to take corresponding measures or human intervention.
  • Step S3 If there is no transaction currently executing on the node, send a start message to the predetermined node, and after the predetermined node is started, synchronize at least one directory of the divided multi-chain data to the predetermined node , To expand the node;
  • Step S4 after receiving the completion message that the predetermined node reads the multi-chain data in the directory, delete the multi-chain data.
  • the current node before the expansion of the current node, if the current node does not have a transaction currently being executed, it can send a start message to a predetermined node (that is, a new node), if it is found that the current node is currently executing a transaction, in order to make the transaction If this expansion is not affected, the execution of the transaction will be suspended, and then the start message will be sent to the predetermined node to start the predetermined node to perform the expansion operation.
  • a predetermined node that is, a new node
  • the predetermined node After the predetermined node receives the start message, it starts. Then, the node synchronizes at least one directory of the divided multi-chain data to the predetermined node. After the predetermined node obtains the directory, it searches and merges Read the data corresponding to the chain name in the directory to this node, and perform the capacity expansion of the cross-chain data. After reading the data corresponding to the chain name in the directory, the predetermined node sends a completion message to the node, After receiving the completion message, the node deletes the corresponding data in the directory synchronized to the predetermined node to release the storage space of the node.
  • this application monitors the storage capacity of the node by calling the monitoring smart contract. If the storage capacity of a node reaches the bottleneck, the storage situation of the data node will be modified, and the multi-chain data stored on the node will be The chain name is planned, and the multi-chain data of the same chain name is divided into the same pre-created directory, and the data is stored according to the chain. After the new node is started, the directory is synchronized to the new node. The new node By searching and reading the data corresponding to the chain name in the directory to this node, the application of the capacity expansion scenario is completed, so that the data of part of the chain can be moved to the new node to achieve expansion. This method is simple and efficient to operate. There is no need to synchronize data block by block, which reduces network pressure on other nodes and saves system resources.
  • the aforementioned system information further includes data status information of the multi-link data.
  • the method further includes:
  • the invalid Multi-chain data is planned according to the chain name, and invalid multi-chain data with the same chain name is divided into the same pre-created directory; if there is no transaction currently executing on the node, a start message is sent to the predetermined node, and After the predetermined node is started, the partitioned invalid multi-chain data directory is synchronized to the predetermined node to back up the invalid multi-chain data; when the predetermined node is received, the directory is read After the completion message of the invalid multi-chain data, delete the invalid multi-chain data.
  • the predetermined second disk capacity is, for example, 70% of the total storage capacity of the node.
  • the node if it is monitored that the current storage capacity of the node is greater than or equal to the predetermined second disk capacity but less than the predetermined first disk capacity, further monitoring whether the node has multi-chain data and the data status information is invalid, that is, whether the data is out of date or When offline, if the data status information of the multi-chain data is invalid, the invalid data can be eliminated, that is, delete directly or delete after backup to further release the storage space of the node.
  • node dynamic expansion and data elimination are necessary.
  • one node can store data of multiple chains.
  • the node Performance bottlenecks may be encountered. Data in some chains can be migrated to other new nodes, and when the data exceeds the validity period or goes offline, old data can be eliminated and hardware resources can be released.
  • the embodiments of the present application also propose a computer-readable storage medium, which may be a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a read-only memory (ROM), an erasable programmable Any one or any combination of read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, etc.
  • the computer-readable storage medium includes a processing system. For the functions implemented by the processing system when executed by the processor, please refer to the above descriptions of Fig. 2 and Fig. 3, which will not be repeated here.
  • the present application also provides a computer-readable storage medium.
  • the computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium.
  • the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on the computer, the computer executes the following steps:
  • the monitoring smart contract is called to monitor the system information of the node, and the system information includes the storage capacity of the node;
  • the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. ⁇
  • the technical solution of this application essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to enable a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the method described in each embodiment of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种区块链数据处理的装置、方法及存储介质,该方法包括:在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量(S1);若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中(S2);若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点以对该节点,进行扩容(S3);当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据(S4)。能够在多链场景下实现简便、高效的扩容操作。

Description

区块链数据处理的装置、方法、系统及存储介质
本申请要求于2019年5月6日提交中国专利局、申请号为201910371198.7、发明名称为“区块链数据处理的装置、方法及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及区块链技术领域,尤其涉及一种区块链数据处理的装置、方法、系统及存储介质。
背景技术
区块链一般被理解为一个分布式账本,它的本质也是一个分布式的数据库。在联盟链场景中,由于多链的引入,一个区块链节点往往同时属于多个区块链。区块链节点所在的设备存储多个链的数据时会对区块数据做存储区分,但对其他数据会做合并存储,实现上相对简单。这样的数据存储场景在节点所在的设备的存储容量状态达到瓶颈时,需要新建节点,该新建节点从创世区块(即第一个区块)开始同步数据,以便将同链的数据同步到该新建节点上。在历史数据多的情况下,发明人意识到这种数据处理的方法很繁琐、效率低,加重其他节点的网络压力,浪费系统资源。
发明内容
本申请的目的在于提供一种区块链数据处理的装置、方法、系统及存储介质,旨在在多链场景下实现简便、高效的扩容操作。
为实现上述目的,本申请提供一种区块链数据处理的装置,所述区块链数据处理的装置包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的处理系统,所述处理系统被所述处理器执行时实现如下步骤:
在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
优选地,所述多链数据包括区块数据、索引数据、状态数据及历史数据。
优选地,所述系统信息还包括多链数据的数据状态信息,所述处理系统被所述处理器执行时,还实现如下步骤:
若监控到该节点当前的存储容量大于等于预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据进行整合并删除,所述第二磁盘容量小于所述第一磁盘容量;或者
若监控到该节点当前的存储容量大于等于该预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据按照链名称进行规划,将相同链名称的无效的多链数据划分至相同的预先创建的目录中;
若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的无效的多链数据的目录同步给该预定的节点,以对该无效的多链数据进行备份;
当接收到该预定的节点读取该目录中的无效的多链数据的完成消息后,删除该无效的多链数据。
优选地,所述处理系统被所述处理器执行时,还实现如下步骤:
若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点当前的存储容量发送给预定的终端进行展示并预警。
为实现上述目的,本申请还提供一种区块链数据处理的方法,所述区块链数据处理的方法包括:
S1,在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
S2,若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
S3,若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
S4,当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
优选地,所述多链数据包括区块数据、索引数据、状态数据及历史数据。
优选地,所述系统信息还包括多链数据的数据状态信息,所述步骤S1之后,还包括:
若监控到该节点当前的存储容量大于等于预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据进行整合并删除,所述第二磁盘容量小于所述第一磁盘容量;或者
若监控到该节点当前的存储容量大于等于该预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据按照链名称进行规划,将相同链名称的无效的多链数据划分至相同的预先创建的目录中;
若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的无效的多链数据的目录同步给该预定的节点,以对该无效的多链数据进行备份;
当接收到该预定的节点读取该目录中的无效的多链数据的完成消息后,删除该无效的多链数据。
优选地,所述步骤S1之后,还包括:若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点当前的存储容量发送给预定的终端进行展示并预警。
优选地,所述步骤S1之前,还包括:从该节点的配置文件中获取智能合约信息,若该智能合约信息中不包括监控智能合约,则安装监控智能合约。
本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有处理系统,所述处理系统被处理器执行时实现上述的区块链数据处理的方法的步骤。
本申请的有益效果是:本申请通过调用监控智能合约对节点的存储容量进行监控,若有节点的存储容量达到瓶颈,则改造数据节点的存储情况,即将将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录,实现数据按链进行区分存储,在新的节点启动后,将该目录同步给新的节点,该新的节点通过搜索并读取该目录中的链名称对应的数据至本节点上,完成扩容量场景的应用,以便将部分链的数据移动到新的节点来实现扩容,该方法操作简便且高效,在扩容时不需要逐个区块数据进行同步,降低其他节点的网络压力,节省系统资源。
附图说明
图1为本申请区块链数据处理的装置一实施例的硬件架构的示意图;
图2为图1中处理系统一实施例的程序模块图;
图3为本申请区块链数据处理的方法一实施例的流程示意图。
具体实施方式
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
需要说明的是,在本申请中涉及“第一”、“第二”等的描述仅用于描述目的,而不能理解为指示或暗示其相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。另外,各个实施例之间的技术方案可以相互结合,但是必须是以本领域普通技术人员能够实现为基础,当技术方案的结合出现相互矛盾或无法实现时应当认为这种技术方案的结合不存在,也不在本申请要求的保护范围之内。
参阅图1所示,是本申请区块链数据处理的装置一实施例的硬件架构的示意图。在该实施例中,区块链数据处理的装置1是一种能够按照事先设定或者存储的指令,自动进行数值计算和/或信息处理的设备。所述区块链数据处理的装置1可以是计算机、也可以是单个网络服务器、多个网络服务器组成的服务器组或者基于云计算的由大量主机或者网络服务器构成的云,其中云计算是分布式计算的一种,由一群松散耦合的计算机集组成的一个超级虚拟计算机。
在本实施例中,区块链数据处理的装置1可包括,但不仅限于,可通过系统总线相互通信连接的存储器11、处理器12、网络接口13,存储器11存储有可在处理器12上运行的处理系统10。需要指出的是,图1仅示出了具有组件11-13的区块链数据处理的装置1,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。
其中,存储器11包括内存及至少一种类型的可读存储介质。内存为区块链数据处理的装置1的运行提供缓存;可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存储器、磁盘、光盘等的非易失性存储介质。在一些实施例中,可读存储介质可以是区块链数据处理的装置1的内部存储单元,例如该区块链数据处理的装置1的硬盘;在另一些实施例中,该非易失性存储介质也可以是区块链数据处理的装置1的外部存储设备,例如区块链数据处理的装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。本实施例中,存储器11的可读存储介质通常用于存储安装于区块链数据处理的装置 1的操作系统和各类应用软件,例如存储本申请一实施例中的处理系统10的程序代码等。此外,存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。
所述处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片,用于运行所述存储器11中存储的程序代码或者处理数据,例如运行处理系统10等。
所述网络接口13可包括标准的无线网络接口、有线网络接口,该网络接口13通常用于在所述区块链数据处理的装置1与其他电子设备之间建立通信连接。
所述处理系统10存储在存储器11中,包括至少一个存储在存储器11中的计算机可读指令,该至少一个计算机可读指令可被处理器器12执行,以实现本申请各实施例的方法;以及,该至少一个计算机可读指令依据其各部分所实现的功能不同,可被划为不同的逻辑模块。
在一实施例中,上述处理系统10被所述处理器12执行时实现如下步骤:
在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
进一步地,所述多链数据包括区块数据、索引数据、状态数据及历史数据。
进一步地,所述系统信息还包括多链数据的数据状态信息,所述处理系统被所述处理器执行时,还实现如下步骤:
若监控到该节点当前的存储容量大于等于预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据进行整合并删除,所述第二磁盘容量小于所述第一磁盘容量;或者
若监控到该节点当前的存储容量大于等于该预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据按照链名称进行规划,将相同链名称的无效的多链数据 划分至相同的预先创建的目录中;
若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的无效的多链数据的目录同步给该预定的节点,以对该无效的多链数据进行备份;
当接收到该预定的节点读取该目录中的无效的多链数据的完成消息后,删除该无效的多链数据。
进一步地,所述处理系统被所述处理器执行时,还实现如下步骤:
若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点当前的存储容量发送给预定的终端进行展示并预警。
进一步地,所述处理系统被所述处理器执行时,还实现如下步骤:
从该节点的配置文件中获取智能合约信息,若该智能合约信息中不包括监控智能合约,则安装监控智能合约。
具体原理请参照下述图2关于处理系统10的程序模块图及图3关于该方法的流程图的介绍。
参照图2所示,为图1、图2中处理系统10的程序模块图。所述处理系统10被分割为多个模块,该多个模块被存储于存储器12中,并由处理器13执行,以完成本申请。本申请所称的模块是指能够完成特定功能的一系列计算机程序指令段。
所述处理系统10可以被分割为:监控模块101、规划模块102、同步模块103及删除模块104。
监控模块101,用于在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
其中,利用监控智能合约对节点的系统信息进行监控。系统信息包括该节点的存储容量(即节点使用的设备的存储容量)、多链数据的数据状态信息(即数据是有效还是无效)及其他业务信息等,业务信息可以包括区块链当前交易笔数、当前交易资产总额等等,不同的业务可以定制不同的业务信息的监控。监控过程包括:节点启动后,调用监控智能合约对节点进行监控,后续节点自身可以定期执行监控智能合约以进行监控。
进一步地,节点执行监控智能合约时,可以采用常规系统工具进行监控。例如,在Linux操作系统上,使用top、htop命令来监控存储器和CPU使用情况,使用iostat命令来查看数据存储设备的使用情况,等等。
进一步地,利用监控智能合约对节点的系统信息进行监控之前,所述处理系统10还包括:
安装模块,用于从该节点的配置文件中获取智能合约信息,若该智能合约 信息中不包括监控智能合约,则安装监控智能合约。
进一步地,利用监控智能合约对节点的系统信息进行监控之后,所述处理系统10还包括:
监控模块,用于在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
规划模块,用于若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
同步模块,用于若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
删除模块,用于当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
规划模块102,用于若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
其中,多链数据包括区块数据、索引数据、状态数据及历史数据。
其中,将该节点上存储的多链数据按照链名称(也即账本名称)进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中,不同链名称的多链数据划分至不同的预先创建的目录中,每一个目录中包括一个链的全部数据,完成多链情况下多链数据的数据文件路径规划,以便将部分链的数据或者全部链的数据移动到新的节点来实现本节点的扩容。
进一步地,将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中之后,所述处理系统10还包括:
预警模块,若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则用于将该节点当前的存储容量发送给预定的终端进行展示并预警。
同步模块103,用于若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
删除模块104,用于当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
其中,在对本节点进行扩容之前,若本节点当前没有正在执行的交易,则可以发送启动消息给预定的节点(即新的节点),若发现本节点当前有正在执行的交易,为了使得该交易不影响本次扩容,则暂停执行交易,然后再发送启 动消息给预定的节点,以便启动该预定的节点,进行扩容操作。
在该预定的节点接收到启动消息后进行启动,然后,本节点将经划分后的多链数据的至少一个目录同步给该预定的节点,该预定的节点在获取到该目录后,通过搜索并读取该目录中的链名称对应的数据至本节点上,执行跨链数据的容量扩展,在读取完该目录中的链名称对应的数据后,该预定的节点发送完成消息给本节点,本节点接收到该完成消息后,删除已同步给该预定的节点的目录中对应的数据,以释放本节点的存储空间。
如图3所示,图3为本申请区块链数据处理的方法一实施例的流程示意图,区块链数据处理的装置1的处理器13执行存储器12中存储的处理系统10时实现该方法的如下步骤:
步骤S1,在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
首先,获取该节点的配置文件,该配置文件中包括节点属于哪些链、节点的IP地址和端口信息(即地址信息)、节点包括的智能合约信息等。从该节点的配置文件中获取智能合约信息,若该智能合约信息中不包括监控智能合约,则安装监控智能合约,若该智能合约信息中已包括监控智能合约,则说明该节点当前已经安装有智能合约,不需要安装。
进一步地,该监控智能合约也可以是系统智能合约,即系统内置的智能合约,其在区块链节点创建后即存在并可提供服务,不需要额外的资源。节点在首次启动后,自动安装该系统智能合约,降低运维工作量。
其中,利用监控智能合约对节点的系统信息进行监控。系统信息包括该节点的存储容量(即节点使用的设备的存储容量)、多链数据的数据状态信息(即数据是有效还是无效)及其他业务信息等,业务信息可以包括区块链当前交易笔数、当前交易资产总额等等,不同的业务可以定制不同的业务信息的监控。监控过程包括:节点启动后,调用监控智能合约对节点进行监控,后续节点自身可以定期执行监控智能合约以进行监控。
其中,节点上的智能合约引擎执行监控智能合约,监控智能合约调用查询接口。智能合约引擎通过标准系统状态采集接口读取该节点当前的存储容量,并且返回给监控智能合约,进而进行反馈。
进一步地,节点执行监控智能合约时,可以采用常规系统工具进行监控。例如,在Linux操作系统上,使用top、htop命令来监控存储器和CPU使用情况,使用iostat命令来查看数据存储设备的使用情况,等等。
步骤S2,若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据 划分至相同的预先创建的目录中;
其中,预定的第一磁盘容量例如为节点的总存储容量的80%。
其中,多链数据包括区块数据、索引数据、状态数据及历史数据。索引数据是为了查询区块而提供的,状态数据是为了完成业务功能而提供的数据快照,历史数据记录了数据修改的历史信息。区块数据针对每个链进行区分存储,但是索引数据、状态数据及历史数据是合并存储的。
其中,将该节点上存储的多链数据按照链名称(也即账本名称)进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中,不同链名称的多链数据划分至不同的预先创建的目录中,每一个目录中包括一个链的全部数据,完成多链情况下多链数据的数据文件路径规划,以便将部分链的数据或者全部链的数据移动到新的节点来实现本节点的扩容。
进一步地,若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点当前的存储容量发送给预定的终端进行展示并预警。
其中,可以将该节点当前的存储容量转化为图形化的形式发送给预定的终端进行展示,以便更直观展示,同时,该节点当前的存储容量大于等于预定的第一磁盘容量,说明该节点当前的存储容量已经到达瓶颈状态,需要进行预警以便采取相应的措施或者人为干预。
步骤S3,若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
步骤S4,当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
其中,在对本节点进行扩容之前,若本节点当前没有正在执行的交易,则可以发送启动消息给预定的节点(即新的节点),若发现本节点当前有正在执行的交易,为了使得该交易不影响本次扩容,则暂停执行交易,然后再发送启动消息给预定的节点,以便启动该预定的节点,进行扩容操作。
在该预定的节点接收到启动消息后进行启动,然后,本节点将经划分后的多链数据的至少一个目录同步给该预定的节点,该预定的节点在获取到该目录后,通过搜索并读取该目录中的链名称对应的数据至本节点上,执行跨链数据的容量扩展,在读取完该目录中的链名称对应的数据后,该预定的节点发送完成消息给本节点,本节点接收到该完成消息后,删除已同步给该预定的节点的目录中对应的数据,以释放本节点的存储空间。
与现有技术相比,本申请通过调用监控智能合约对节点的存储容量进行监控,若有节点的存储容量达到瓶颈,则改造数据节点的存储情况,即将将该节 点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录,实现数据按链进行区分存储,在新的节点启动后,将该目录同步给新的节点,该新的节点通过搜索并读取该目录中的链名称对应的数据至本节点上,完成扩容量场景的应用,以便将部分链的数据移动到新的节点来实现扩容,该方法操作简便且高效,在扩容时不需要逐个区块数据进行同步,降低其他节点的网络压力,节省系统资源。
在一实施例中,上述的系统信息还包括多链数据的数据状态信息,在上述实施例的基础上,在上述步骤S1之后,该方法还包括:
若监控到该节点当前的存储容量大于等于预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据进行整合并删除,所述第二磁盘容量小于所述第一磁盘容量;或者
若监控到该节点当前的存储容量大于等于该预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据按照链名称进行规划,将相同链名称的无效的多链数据划分至相同的预先创建的目录中;若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的无效的多链数据的目录同步给该预定的节点,以对该无效的多链数据进行备份;当接收到该预定的节点读取该目录中的无效的多链数据的完成消息后,删除该无效的多链数据。
其中,预定的第二磁盘容量例如为节点的总存储容量的70%。
其中,若监控到该节点当前的存储容量大于等于预定的第二磁盘容量但小于预定的第一磁盘容量时,进一步监控该节点是否有多链数据的数据状态信息为无效,即数据是否过期或者下线,若有多链数据的数据状态信息为无效,可对该无效的数据进行淘汰处理,即进行直接删除或者备份后删除,以进一步释放本节点的存储空间。
通过上面的描述可以看出,对于跨链的数据,节点动态扩容和数据淘汰是必须的,当节点的数据量较小时,可以一个节点存储多个链的数据,当节点的数据量变多时,节点可能碰到性能瓶颈,部分链的数据可以迁移到其他新的节点,以及当数据超过有效期或者下线时,可以淘汰旧数据,释放硬件资源。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质可以是硬盘、多媒体卡、SD卡、闪存卡、SMC、只读存储器(ROM)、可擦除可编程只读存储器(EPROM)、便携式紧致盘只读存储器(CD-ROM)、USB存储器等等中的任意一种或者几种的任意组合。所述计算机可读存储介质中包 括处理系统,该处理系统被处理器执行时实现的功能,请参照上述关于图2和图3的介绍,在此不再赘述。
本申请还提供一种计算机可读存储介质,该计算机可读存储介质可以为非易失性计算机可读存储介质,也可以为易失性计算机可读存储介质。计算机可读存储介质存储有计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
S1,在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
S2,若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
S3,若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
S4,当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (20)

  1. 一种区块链数据处理的装置,所述区块链数据处理的装置包括存储器及与所述存储器连接的处理器,所述存储器中存储有可在所述处理器上运行的处理系统,所述处理系统被所述处理器执行时实现如下步骤:
    在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
    若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
    若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
    当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
  2. 根据权利要求1所述的区块链数据处理的装置,所述处理器执行所述所述处理系统时,包括以下步骤:
    所述多链数据包括区块数据、索引数据、状态数据及历史数据。
  3. 根据权利要求1或2所述的区块链数据处理的装置,所述处理器执行所述处理系统实现所述系统信息还包括多链数据的数据状态信息,在所述在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量之后,还包括以下步骤:
    若监控到该节点当前的存储容量大于等于预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据进行整合并删除,所述第二磁盘容量小于所述第一磁盘容量;或者
    若监控到该节点当前的存储容量大于等于该预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据按照链名称进行规划,将相同链名称的无效的多链数据划分至相同的预先创建的目录中;
    若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的无效的多链数据的目录同步给该预定的节点,以对该无效的多链数据进行备份;
    当接收到该预定的节点读取该目录中的无效的多链数据的完成消息后,删除该无效的多链数据。
  4. 根据权利要求1所述的区块链数据处理的装置,所述处理器执行所述处理系统实现在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量之后,还包括以下步骤:
    若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点当前的存储容量发送给预定的终端进行展示并预警。
  5. 根据权利要求1所述的区块链数据处理的装置,所述处理器执行所述处理系统实现所述在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量之前,还包括以下步骤:
    从该节点的配置文件中获取智能合约信息,若该智能合约信息中不包括监控智能合约,则安装监控智能合约。
  6. 一种区块链数据处理的方法,所述区块链数据处理的方法包括:
    S1,在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
    S2,若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
    S3,若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
    S4,当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
  7. 根据权利要求6所述的区块链数据处理的方法,所述多链数据包括区块数据、索引数据、状态数据及历史数据。
  8. 根据权利要求6或7所述的区块链数据处理的方法,所述系统信息还包括多链数据的数据状态信息,所述步骤S1之后,还包括:
    若监控到该节点当前的存储容量大于等于预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则 将该无效的多链数据进行整合并删除,所述第二磁盘容量小于所述第一磁盘容量;或者
    若监控到该节点当前的存储容量大于等于该预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据按照链名称进行规划,将相同链名称的无效的多链数据划分至相同的预先创建的目录中;
    若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的无效的多链数据的目录同步给该预定的节点,以对该无效的多链数据进行备份;
    当接收到该预定的节点读取该目录中的无效的多链数据的完成消息后,删除该无效的多链数据。
  9. 根据权利要求6所述的区块链数据处理的方法,所述步骤S1之后,还包括:若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点当前的存储容量发送给预定的终端进行展示并预警。
  10. 根据权利要求6所述的区块链数据处理的方法,所述步骤S1之前,还包括:从该节点的配置文件中获取智能合约信息,若该智能合约信息中不包括监控智能合约,则安装监控智能合约。
  11. 一种处理系统,所述处理系统包括:
    监控模块,用于在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
    规划模块,用于若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
    同步模块,用于若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
    删除模块,用于当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
  12. 根据权利要求11所述的处理系统,所述处理系统具体用于:
    所述多链数据包括区块数据、索引数据、状态数据及历史数据。
  13. 根据权利要求11或12所述的处理系统,所述处理系统还包括:
    整合模块,若监控到该节点当前的存储容量大于等于预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则用于将该无效的多链数据进行整合并删除,所述第二磁盘容量小于所述第一磁盘容量;或者
    划分模块,若监控到该节点当前的存储容量大于等于该预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则用于将该无效的多链数据按照链名称进行规划,将相同链名称的无效的多链数据划分至相同的预先创建的目录中;
    备份模块,若该节点上当前无执行中的交易,则用于发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的无效的多链数据的目录同步给该预定的节点,以对该无效的多链数据进行备份;
    处理模块,当接收到该预定的节点读取该目录中的无效的多链数据的完成消息后,用于删除该无效的多链数据。
  14. 根据权利要求11所述的处理系统,所述处理系统还包括:
    预警模块,若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则用于将该节点当前的存储容量发送给预定的终端进行展示并预警。
  15. 根据权利要求11所述的处理系统,所述处理系统还包括:
    安装模块,用于从该节点的配置文件中获取智能合约信息,若该智能合约信息中不包括监控智能合约,则安装监控智能合约。
  16. 一种计算机可读存储介质,所述计算机可读存储介质中存储计算机指令,当所述计算机指令在计算机上运行时,使得计算机执行如下步骤:
    S1,在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量;
    S2,若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点上存储的多链数据按照链名称进行规划,将相同链名称的多链数据划分至相同的预先创建的目录中;
    S3,若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的多链数据的至少一个目录同步给该预定的节点,以对该节点进行扩容;
    S4,当接收到该预定的节点读取该目录中的多链数据的完成消息后,删除该多链数据。
  17. 根据权利要求16所述的计算机可读存储介质,当所述计算机指令在所述计算机上运行所述区块链数据处理的方法时,使得所述计算机执行如下步骤:
    所述多链数据包括区块数据、索引数据、状态数据及历史数据。
  18. 根据权利要求16或17所述的计算机可读存储介质,当所述计算机指令在所述计算机上运行所述S1,在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量之后,使得所述计算机还执行如下步骤:
    若监控到该节点当前的存储容量大于等于预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据进行整合并删除,所述第二磁盘容量小于所述第一磁盘容量;或者
    若监控到该节点当前的存储容量大于等于该预定的第二磁盘容量且小于所述第一磁盘容量,且监控到该节点的有多链数据的数据状态信息为无效时,则将该无效的多链数据按照链名称进行规划,将相同链名称的无效的多链数据划分至相同的预先创建的目录中;
    若该节点上当前无执行中的交易,则发送启动消息给预定的节点,并在该预定的节点启动后,将经划分后的无效的多链数据的目录同步给该预定的节点,以对该无效的多链数据进行备份;
    当接收到该预定的节点读取该目录中的无效的多链数据的完成消息后,删除该无效的多链数据。
  19. 根据权利要求16所述的计算机可读存储介质,当所述计算机指令在所述计算机上运行所述S1,在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量之后,使得所述计算机还执行如下步骤:
    若监控到该节点当前的存储容量大于等于预定的第一磁盘容量,则将该节点当前的存储容量发送给预定的终端进行展示并预警。
  20. 根据权利要求16所述的计算机可读存储介质,当所述计算机指令在所 述计算机上运行所述S1,在联盟链的多链场景中,调用监控智能合约对节点的系统信息进行监控,所述系统信息包括该节点的存储容量时,使得所述计算机还执行如下步骤:
    用于从该节点的配置文件中获取智能合约信息,若该智能合约信息中不包括监控智能合约,则安装监控智能合约。
PCT/CN2019/120589 2019-05-06 2019-11-25 区块链数据处理的装置、方法、系统及存储介质 WO2020224236A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910371198.7A CN110209736A (zh) 2019-05-06 2019-05-06 区块链数据处理的装置、方法及存储介质
CN201910371198.7 2019-05-06

Publications (1)

Publication Number Publication Date
WO2020224236A1 true WO2020224236A1 (zh) 2020-11-12

Family

ID=67786884

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/120589 WO2020224236A1 (zh) 2019-05-06 2019-11-25 区块链数据处理的装置、方法、系统及存储介质

Country Status (2)

Country Link
CN (1) CN110209736A (zh)
WO (1) WO2020224236A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115841285A (zh) * 2022-11-28 2023-03-24 浙江百世技术有限公司 基于区块链的商品物流追溯方法及系统

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209736A (zh) * 2019-05-06 2019-09-06 深圳壹账通智能科技有限公司 区块链数据处理的装置、方法及存储介质
CN112631994A (zh) * 2020-12-29 2021-04-09 深圳市商汤科技有限公司 数据迁移方法及系统
CN113407626B (zh) * 2021-06-16 2024-05-10 深圳大学 一种基于区块链的规划管控方法、存储介质及终端设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453896A (zh) * 2017-06-27 2017-12-08 阿里巴巴集团控股有限公司 多重区块链网络数据处理方法、装置及服务器
CN107832139A (zh) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 用于管理区块链节点的计算资源的方法、设备和系统
CN108829350A (zh) * 2018-05-31 2018-11-16 阿里巴巴集团控股有限公司 基于区块链的数据迁移方法和装置
US20190066101A1 (en) * 2017-08-22 2019-02-28 Sap Se Transaction Platform Providing Unified View on Multiple Heterogeneous Blockchains
CN110209736A (zh) * 2019-05-06 2019-09-06 深圳壹账通智能科技有限公司 区块链数据处理的装置、方法及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453896A (zh) * 2017-06-27 2017-12-08 阿里巴巴集团控股有限公司 多重区块链网络数据处理方法、装置及服务器
US20190066101A1 (en) * 2017-08-22 2019-02-28 Sap Se Transaction Platform Providing Unified View on Multiple Heterogeneous Blockchains
CN107832139A (zh) * 2017-09-26 2018-03-23 上海点融信息科技有限责任公司 用于管理区块链节点的计算资源的方法、设备和系统
CN108829350A (zh) * 2018-05-31 2018-11-16 阿里巴巴集团控股有限公司 基于区块链的数据迁移方法和装置
CN110209736A (zh) * 2019-05-06 2019-09-06 深圳壹账通智能科技有限公司 区块链数据处理的装置、方法及存储介质

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115841285A (zh) * 2022-11-28 2023-03-24 浙江百世技术有限公司 基于区块链的商品物流追溯方法及系统
CN115841285B (zh) * 2022-11-28 2023-09-19 浙江百世技术有限公司 基于区块链的商品物流追溯方法及系统

Also Published As

Publication number Publication date
CN110209736A (zh) 2019-09-06

Similar Documents

Publication Publication Date Title
WO2020224236A1 (zh) 区块链数据处理的装置、方法、系统及存储介质
US11397648B2 (en) Virtual machine recovery method and virtual machine management device
WO2020207010A1 (zh) 数据备份方法、装置及计算机可读存储介质
WO2019085471A1 (zh) 数据库同步方法、应用服务器及计算机可读存储介质
US8756199B2 (en) File level hierarchical storage management system, method, and apparatus
KR20210002574A (ko) 데이터 백업 방법, 저장 매체 및 컴퓨팅 기기
US7681001B2 (en) Storage system
CN110659259B (zh) 数据库迁移方法、服务器以及计算机存储介质
US20120278429A1 (en) Cluster system, synchronization controlling method, server, and synchronization controlling program
US20100153346A1 (en) Data integrity in a database environment through background synchronization
WO2020015116A1 (zh) 数据库监控方法及终端设备
WO2020224100A1 (zh) 区块链配置文件的处理装置、系统、方法及存储介质
CN110597887A (zh) 一种基于区块链网络的数据管理方法、装置及存储介质
US20160139996A1 (en) Methods for providing unified storage for backup and disaster recovery and devices thereof
JP6583975B1 (ja) データ処理装置、データ処理方法及びプログラム
WO2024131057A1 (zh) 获取文件系统差异数据的方法、装置、设备及介质
WO2018010603A1 (zh) 基于视频云存储系统的存储模式升级方法、装置和系统
CN112711606A (zh) 数据库访问方法、装置、计算机设备和存储介质
WO2020020170A1 (zh) 数据删除方法和装置
EP3082050A1 (en) Mass data fusion storage method and system
CN112764973B (zh) 数据容灾方法、装置、电子设备和可读存储介质
US11886439B1 (en) Asynchronous change data capture for direct external transmission
JP6292796B2 (ja) 情報処理装置、情報処理方法及びプログラム
CN108848136B (zh) 一种云服务集群的共享存储方法
CN102724080B (zh) 网络管理系统及方法

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: 19927613

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: 19927613

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 1205 DATED 18/03/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19927613

Country of ref document: EP

Kind code of ref document: A1