Blockchain data processing system and method, apparatus, electronic device, computer readable medium

CN116932460BActive Publication Date: 2026-10-23JINGDONG TECH HLDG CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210348277.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-01
Publication Date
2026-10-23
Estimated Expiration
2042-04-01

AI Technical Summary

Benefits of technology

[0019]本公开的实施例提供的区块链数据处理系统,通过区块链即服务平台的前端服务方得到数据归档指令,将数据归档指令通过区块链即服务平台的后端服务方转发给区块链代理方,区块链代理方基于数据归档指令,对区块链节点的数据进行归档。由此,可以按照可视化的归档配置界面设置的策略,动态对区块链的数据进行归档,提高了数据归档的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116932460B_ABST
    Figure CN116932460B_ABST
Patent Text Reader

Abstract

The present disclosure provides a kind of blockchain data processing system, it is related to blockchain, cloud service and other technical field.The system is based on blockchain as a service platform implementation, the system includes: blockchain as a service front-end service party, for the archival configuration interface of visual display blockchain network, and based on the configuration information of archival configuration interface generation data archiving instruction;Blockchain as a service back-end service party, for data archiving instruction is forwarded to blockchain agent party;Blockchain agent party is based on data archiving instruction, the data of the blockchain node in blockchain network is archived.This embodiment improves the data archiving efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, specifically to the fields of blockchain, cloud services, and other related technologies, and particularly to blockchain data processing systems and methods, apparatuses, electronic devices, computer-readable media, and computer program products. Background Technology

[0002] When deploying a blockchain network, the block data archiving function is configured to be enabled. Once the network is running, it can only be controlled by professional operations and maintenance personnel through the backend. If there is a need to archive blocks or restore changes, it can only be achieved by operations and maintenance personnel manually modifying the archiving configuration and manually restarting the service. Summary of the Invention

[0003] Embodiments of this disclosure provide blockchain data processing systems and methods, apparatuses, electronic devices, computer-readable media, and computer program products.

[0004] In a first aspect, embodiments of this disclosure provide a blockchain data processing system, comprising: a blockchain-as-a-service front-end service provider, used to visually display the archiving configuration interface of the blockchain network and generate data archiving instructions based on the configuration information of the archiving configuration interface; a blockchain-as-a-service back-end service provider, used to forward the data archiving instructions to a blockchain agent; and a blockchain agent, based on the data archiving instructions, archiving the data of blockchain nodes in the blockchain network.

[0005] In some embodiments, the aforementioned Blockchain-as-a-Service front-end service provider is also used to visualize the data recovery interface of the blockchain nodes in the blockchain network and generate data recovery instructions based on the configuration information of the data recovery interface; the Blockchain-as-a-Service back-end service provider is used to forward the data recovery instructions to the blockchain agent; the blockchain agent recovers the archived data of the blockchain nodes in the blockchain network based on the data recovery instructions.

[0006] In some embodiments, the aforementioned Blockchain-as-a-Service front-end service provider is also used to visualize the ledger configuration interface of each blockchain node in the blockchain network, and generate ledger setting instructions based on the configuration information of the ledger configuration interface; the Blockchain-as-a-Service back-end service provider forwards the ledger setting instructions to the blockchain agent; the blockchain agent creates a ledger in the blockchain node of the blockchain network based on the ledger setting instructions.

[0007] In some embodiments, the ledger configuration interface includes: an archive button for each ledger; for each ledger in the ledger configuration interface, when the Blockchain-as-a-Service front-end service provider receives the archive button trigger information for that ledger, it determines whether the ledger stops the archive function or enables the archive function; the ledger setting instructions sent to the Blockchain-as-a-Service back-end service provider include stopping data archiving for that ledger or starting data archiving for that ledger.

[0008] In some embodiments, the configuration information of the above-mentioned archiving configuration interface includes: data archiving period, number of concurrent archived ledgers, maximum number of block files, maximum block file size, number of reserved block files, and storage area; data archiving instructions include: period key-value pairs corresponding to the data archiving period, ledger number key-value pairs corresponding to the number of concurrent archived ledgers, file number key-value pairs corresponding to the maximum number of block files, file size key-value pairs corresponding to the maximum block file size, reserved file key-value pairs corresponding to the number of reserved block files, and storage area key-value pairs corresponding to the storage area; the period indicated by the blockchain broker based on the period key-value pairs. Periodically archive data from blockchain nodes; simultaneously archive the ledgers of the specified number indicated by the ledger quantity key-value pair in each archiving period; archive block files exceeding the specified number indicated by the file quantity key-value pair in each archiving period; archive block files other than those corresponding to the reserved file key-value pair when the sum of all block files exceeds the value indicated by the file size key-value pair in each archiving period, wherein the block files corresponding to the reserved file key-value pair are the most recent block files of the specified number indicated by the reserved file key-value pair; store the archived block files in the storage area indicated by the storage area key-value pair.

[0009] In some embodiments, the configuration information of the data recovery interface includes: the name of the blockchain network to be recovered, the name of the ledger to be recovered, and the recovery mode; the data recovery instructions include: a network key-value pair corresponding to the name of the blockchain network to be recovered, a ledger key-value pair corresponding to the name of the ledger to be recovered, and a mode key-value pair corresponding to the recovery mode; the blockchain agent determines the recovery mode of the data to be recovered based on the mode key-value pair; in response to the recovery mode being full recovery, all the data to be recovered is recovered to the ledger indicated by the ledger key-value pair of the blockchain network indicated by the network key-value pair.

[0010] Secondly, embodiments of this disclosure provide a blockchain data processing method, which includes: receiving a data archiving instruction sent by a Blockchain-as-a-Service backend service provider, the data archiving instruction being generated by a Blockchain-as-a-Service frontend service provider based on configuration information from a visually displayed archiving configuration interface; and archiving data of blockchain nodes in the blockchain network based on the data archiving instruction.

[0011] In some embodiments, the above method further includes: receiving a data recovery instruction sent by a Blockchain-as-a-Service backend service provider, wherein the data recovery instruction is generated by a Blockchain-as-a-Service frontend service provider based on configuration information of a visually displayed data recovery interface; and recovering archived data of blockchain nodes in the blockchain network based on the data recovery instruction.

[0012] In some embodiments, the above method further includes: receiving a ledger setting instruction sent by a Blockchain-as-a-Service backend service provider, the ledger setting instruction being generated by a Blockchain-as-a-Service frontend service provider based on configuration information from a visually displayed ledger configuration interface; and creating a ledger in a blockchain node of the blockchain network based on the ledger setting instruction.

[0013] Thirdly, embodiments of this disclosure provide a blockchain data processing apparatus, comprising: an archiving receiving unit configured to receive a data archiving instruction sent by a Blockchain-as-a-Service backend service provider, the data archiving instruction being generated by a Blockchain-as-a-Service frontend service provider based on configuration information from a visually displayed archiving configuration interface; and a data archiving unit configured to archive data of blockchain nodes in the blockchain network based on the data archiving instruction.

[0014] In some embodiments, the above apparatus further includes: a recovery receiving unit configured to receive a data recovery instruction sent by a Blockchain-as-a-Service backend service provider, the data recovery instruction being generated by a Blockchain-as-a-Service frontend service provider based on configuration information of a visually displayed data recovery interface; and a data recovery unit configured to recover archived data of blockchain nodes in the blockchain network based on the data recovery instruction.

[0015] In some embodiments, the apparatus further includes: a ledger configuration unit configured to receive a ledger setting instruction sent by a Blockchain-as-a-Service backend service provider, the ledger setting instruction being generated by a Blockchain-as-a-Service frontend service provider based on configuration information displayed in a visual ledger configuration interface; and a ledger creation unit configured to create a ledger in a blockchain node of the blockchain network based on the ledger setting instruction.

[0016] Fourthly, embodiments of this disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method described in any implementation of the second aspect.

[0017] Fifthly, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon that, when executed by a processor, implements the method as described in any implementation of the second aspect.

[0018] In a sixth aspect, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the method described in any implementation of the second aspect.

[0019] The blockchain data processing system provided in this disclosure receives data archiving instructions from the front-end service provider of a Blockchain-as-a-Service (BAS) platform. These instructions are then forwarded to a blockchain agent by the back-end service provider of the BAS platform. The blockchain agent then archives the data of the blockchain nodes based on these instructions. This allows for dynamic archiving of blockchain data according to strategies set through a visual archiving configuration interface, improving the efficiency of data archiving. Attached Figure Description

[0020] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings: Figure 1 This is a schematic diagram of a structure of an embodiment of the blockchain data processing system according to the present disclosure; Figure 2 This is a schematic diagram illustrating the archiving of data from blockchain nodes within this publicly disclosed blockchain data processing system; Figure 3 This is a schematic diagram illustrating the recovery of archived data in this publicly disclosed blockchain data processing system; Figure 4 This is a flowchart of one embodiment of the blockchain data processing method according to the present disclosure; Figure 5 This is a schematic diagram of the structure of an embodiment of the blockchain data processing apparatus according to the present disclosure; Figure 6 This is a schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure. Detailed Implementation

[0021] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings.

[0022] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0023] Blockchain refers to a traceable and tamper-proof distributed ledger mechanism that utilizes cryptographic technology, peer-to-peer networks, consensus mechanisms, and a time-ordered, block-chain data structure. Blockchain is a time-ordered chain of blocks.

[0024] Blockchain as a Service (BaaS) is a new type of cloud service that integrates blockchain technology. This service creates a space within a cloud network to run a blockchain node. BaaS allows for the rapid creation, deployment, operation, and monitoring of blockchain applications. Compared to regular nodes and exchange nodes, BaaS primarily aims to quickly establish the necessary development environment, providing a range of services such as blockchain-based search queries, transaction submissions, and data analysis. These services can be centralized or decentralized, helping developers validate their concepts and models more quickly. The service-oriented nature of BaaS is characterized by its enhanced toolability, facilitating the creation, deployment, operation, and monitoring of blockchains.

[0025] Data archiving is the process of identifying inactive data in blockchain blocks, removing the inactive data from the current system and database, and moving it to a long-term storage system.

[0026] In a blockchain network, each blockchain node needs to persistently store transaction data on a block-by-block basis upon transaction confirmation (commit) and maintain all historical transaction data long-term. To meet the high-throughput IO performance requirements of the blockchain network, high-performance IO storage facilities are needed; to meet the long-term storage capacity requirements of the system, large-capacity storage facilities are required. However, in practice, high-performance storage is used for recently generated blocks (with frequent read / write probability), while only large-capacity storage facilities are needed for historical transaction records (with lower access rates). This significantly reduces the storage resource budget. Therefore, archiving historical transactions stored on a block-by-block basis aims to meet the storage capacity and performance requirements for persistent ledger data storage in the blockchain system with a smaller storage resource budget.

[0027] To address the shortcomings of the aforementioned requirement for block archiving changes, which can only be achieved by operations and maintenance personnel manually modifying archiving configurations and manually restarting the service, the blockchain data processing system disclosed herein provides a visual archiving configuration interface. This allows for dynamic and visual control of ledger data archiving, improving the efficiency of blockchain data archiving. Figure 1The diagram illustrates a structural schematic 100 of an embodiment of a blockchain data processing system according to this disclosure. This blockchain data processing system is implemented based on a blockchain-as-a-service platform. Specifically, the blockchain data processing system includes: a blockchain-as-a-service front-end service provider 101, a blockchain-as-a-service back-end service provider 102, a blockchain agent 103, and a blockchain network 104. The blockchain-as-a-service front-end service provider 101 is used to visually display the archiving configuration interface of the blockchain network 104 and generate data archiving instructions based on the configuration information of the archiving configuration interface. The blockchain-as-a-service back-end service provider 102 is used to forward the data archiving instructions to the blockchain agent. The blockchain agent 103, based on the data archiving instructions, processes the data on the blockchain nodes (…) in the blockchain network 104. Figure 1 Data (not shown in the image) is archived.

[0028] In this embodiment, as Figure 1 As shown, Blockchain-as-a-Service (BAS) front-end service provider 101 and BAS back-end service provider 102 belong to the BAS platform. Both are service components of the BAS platform. For example, BAS front-end service provider 101 is software developed using the React language and can run on either a physical machine or a virtual machine; similarly, BAS back-end service provider 102 is software developed using the Go language and can also run on either a physical machine or a virtual machine. BAS front-end service provider 101 can display an archiving configuration interface. Users can configure the archiving configuration interface to obtain configuration information. After the user completes the configuration, BAS back-end service provider 102 receives data archiving instructions to archive data from various blockchain nodes in the blockchain network.

[0029] In this embodiment, the blockchain agent 103 is mainly responsible for communicating with the blockchain-as-a-service platform and the blockchain network respectively. Like the blockchain-as-a-service backend service provider 102, it is a service component. The blockchain-as-a-service platform specifies the archiving strategy to the blockchain agent 103 through data archiving instructions.

[0030] In this embodiment, since the users served by the Blockchain-as-a-Service platform are different, the blockchain agent can be a service component deployed on a single server or a service component deployed on various servers in a server cluster. It should be noted that each server in the server cluster corresponds to a different user, and each user has its own blockchain agent. Each server in the server cluster corresponds to a user's blockchain agent, and each user's blockchain agent manages the user's blockchain network.

[0031] For example, users Zhang San and Li Si belong to the same blockchain network. Zhang San can activate his corresponding blockchain agent and, through his corresponding blockchain agent, activate the blockchain node in the blockchain network corresponding to Zhang San. Li Si can activate his corresponding blockchain agent and, through his corresponding blockchain agent, control the blockchain node in the blockchain network corresponding to Li Si. Thus, each user will activate their own blockchain agent (each user has one blockchain agent by default. If external requests need to go through multiple blockchain agents, a cluster mode can be activated to make a user have multiple blockchain agents).

[0032] For each user, when they operate the archiving configuration interface or data recovery interface of the Blockchain-as-a-Service (BAS) front-end service provider on the BAS platform, the data archiving and recovery instructions forwarded by the BAS back-end service provider will only be sent to the blockchain agent 103 corresponding to that user. The specific archiving logic is implemented by blockchain agent 103, which is also the actual entry point for operating the user's blockchain network. All operations that enable the blockchain network are implemented on blockchain agent 103.

[0033] In this embodiment, the blockchain-as-a-service platform is connected to the blockchain network 104 through the blockchain agent 103, so as to realize the autonomous and dynamic data archiving of blockchain data in the blockchain network 104.

[0034] Further, see Figure 2 As shown, the Blockchain-as-a-Service (BAS) front-end service sends a data archiving instruction to the BAS back-end service provider.

[0035] The Blockchain-as-a-Service (BAS) backend provider forwards data archiving instructions to the blockchain agent. The blockchain agent then performs the actual data archiving operation on the specified ledger within the blockchain network. Figure 2 In this blockchain network, there are: blockchain nodes peer0, peer1, peer2, peer3, storage A, and storage B. Under blockchain node peer2, there are ledgers 1, 2, ..., N (N>1). Data archiving instructions determine which ledger or block file (or only block file) of a blockchain node the blockchain agent needs to archive. Compared to storage A, storage B is a longer-term storage system, and storage B can serve as the storage area for archived data from storage A.

[0036] In this embodiment, ledger data is archived, and it can be specified to be archived to different storage areas. Figure 2In the illustrated scenario, the aforementioned blockchain agent archives ledgers 1...N under blockchain node peer2 from storage A to storage B. Ledger 2 has already archived block files 1 and 2. Once data archiving is complete, the archived block files (block files 1 and 2) under ledger 2 under blockchain node peer2 can be cleared, and the current archived point value is recorded in the state machine. This facilitates quick location of the specific block file when the next archiving task is triggered, allowing archiving to continue downwards.

[0037] In this embodiment, the generated data archiving instructions differ depending on the configuration information in the archiving configuration interface. The configuration information in the archiving configuration interface may include: data archiving period, archived data information, and archiving destination. The above-mentioned archiving of data from blockchain nodes in the blockchain network based on data archiving instructions includes: periodically retrieving data from the blocks corresponding to the archived data information in the blockchain network based on the data archiving period, and storing the retrieved data in a storage area, thereby completing the archiving of the retrieved data. Optionally, the above-mentioned archiving of data from blockchain nodes in the blockchain network based on data archiving instructions further includes: deleting the retrieved data from the blockchain network.

[0038] In this embodiment, the data archiving cycle represents how often data archiving is initiated, and can be set by second, minute, hour, day, or month. For example, clicking the "Generate" button (the button to generate the data archiving cycle) on the archiving configuration interface will automatically generate a time task expression.

[0039] In this embodiment, archived data information refers to the data type and data range of blockchain nodes within the blockchain network. It should be noted that the format of archived data information varies depending on the data storage method within a blockchain node. For example, when a blockchain node stores different block data in units of ledgers (a ledger can include at least one block file, and each block file can be the same or different in size), the archived data information can be information based on the ledger unit. When a blockchain node does not have a ledger, the archived data information can be information based on the block file unit.

[0040] Optionally, when blockchain nodes are organized by ledger, the configuration information in the archiving configuration interface may include: the number of concurrently archived ledgers, where the number of concurrently archived ledgers represents the number of ledgers that can be archived simultaneously.

[0041] In this embodiment, the storage area refers to the area where the archive block files are archived, such as... Figure 2 In the middle, the storage area is storage B. Figure 2Storage A and Storage B in Kubernetes can be understood as different storage directories or disks. In essence, they can be Kubernetes PersistentVolumes, or PVs for short. Kubernetes can create multiple PVs (a storage space in an external storage system). When archiving, different StorageClasses can be specified (used to define how to create PVs).

[0042] In some optional implementations of this embodiment, the configuration information of the archiving configuration interface includes: data archiving period, number of concurrent archive ledgers, maximum number of block files, maximum block file size, number of reserved block files, and storage area.

[0043] In this optional implementation, the maximum number of block files refers to the number of blocks in the blockchain network that are archived if they exceed this maximum number. The maximum block file size refers to the number of blocks in the blockchain network that are archived if the sum of all the block files exceeds this maximum block file size. The number of retained block files refers to the number of block files that can be retained and do not need to be archived. For example, the most recent M (M>1, and M is a natural number) block files are not archived, and the rest are archived.

[0044] In this embodiment, the Blockchain-as-a-Service front-end service provider generates corresponding data archiving instructions based on the configuration content of the above configuration information. Different configuration content in the archiving configuration interface results in different generated configuration information, and different data archiving instructions are generated for different configuration information.

[0045] Based on the above configuration information, the generated data archiving instructions include: a periodic key-value pair corresponding to the data archiving period, a ledger number key-value pair corresponding to the number of concurrently archived ledgers, a file number key-value pair corresponding to the maximum number of block files, a file size key-value pair corresponding to the maximum block file size, a reserved file key-value pair corresponding to the number of reserved block files, and a storage area key-value pair corresponding to the storage area. The blockchain agent performs periodic archiving of the blockchain node data based on the period indicated by the periodic key-value pair; simultaneously archives the ledgers indicated by the ledger number key-value pair in each archiving period; archives block files exceeding the number indicated by the file number key-value pair in each archiving period; archives block files other than the block files corresponding to the reserved file key-value pair when the sum of all block files exceeds the value indicated by the file size key-value pair in each archiving period, wherein the block files corresponding to the reserved file key-value pair are the most recent block files of the number indicated by the reserved file key-value pair; and stores the archived block files in the area indicated by the storage area key-value pair.

[0046] In this embodiment, the data archiving instruction is an instruction composed of at least one key-value pair. Each key-value pair has a key and a value. Each key corresponds to a configuration item in the configuration information of the archiving configuration interface, and each value is the specific value of that configuration item. For example, if the configuration item "Maximum number of block files" in the configuration information of the archiving configuration interface has a value of 128 in the key-value pair, then the maximum number of block files is 128. The executing entity archives block files exceeding 128 in each archiving cycle.

[0047] In a blockchain, each block is a block file. The total storage occupied by all block files is the maximum block file size. When the sum of all block files exceeds the value indicated by the file size key-value pair in each archiving cycle, all block files except those corresponding to the file key-value pair are archived. An example is shown below: If the block height in the existing ledger is 100, and the block file size (from 1 to 100) has exceeded the maximum block file size (e.g., 128MB), then the block files corresponding to the reserved file key-value pairs will not be archived (the block files corresponding to the reserved file key-value pairs are 100 and 99), and all blocks from 98 to the first genesis block in the block file will be archived, so that only blocks 99 and 100 will be retained after archiving.

[0048] Furthermore, as blocks 101, 102...200 are added to the blockchain network, the blockchain agent calculates whether the size of all block files from block 99 to the latest block height has reached the maximum block file size; if so, the block files corresponding to the key-value pairs of the reserved files (such as 199 and 200) are retained, and the block files from 99 to 199 are archived.

[0049] In this optional implementation, by setting the configuration information of the archiving configuration interface to the data archiving period, concurrent archived ledger data, maximum number of block files, maximum block file size, number of retained block files, and storage area, an effective archiving strategy can be provided for blockchain data archiving, thereby improving the reliability of the archiving configuration.

[0050] Optionally, the configuration information of the archiving configuration interface may also include: archiving options and engine type. The archiving options indicate whether the archiving configuration interface is displayed; the archiving options can be either yes or no. When the archiving options are yes, the archiving configuration interface is displayed; when the archiving options are no, the archiving configuration interface is not displayed, and the user cannot configure archiving on the blockchain network. The engine type indicates what method (e.g., file system) is used to archive block files.

[0051] The blockchain data processing system provided in this disclosure receives data archiving instructions from the blockchain-as-a-service front-end service provider 101 of the blockchain-as-a-service platform. These instructions are then forwarded to the blockchain agent 103 via the blockchain-as-a-service back-end service provider 102. The blockchain agent 103 then archives the data of the blockchain nodes in the blockchain network 104 based on the data archiving instructions. This allows for dynamic archiving of blockchain data according to strategies set through a visual archiving configuration interface, improving the efficiency of data archiving.

[0052] In one embodiment of this disclosure, the Blockchain-as-a-Service (BAS) front-end service provider is further configured to visualize the data recovery interface of the blockchain nodes in the blockchain network and generate data recovery instructions based on the configuration information of the data recovery interface; the BAS back-end service provider is configured to forward the data recovery instructions to the blockchain agent; the blockchain agent recovers the archived data of the blockchain nodes in the blockchain network based on the data recovery instructions.

[0053] In some optional implementations of this embodiment, the configuration information of the data recovery interface includes: the name of the blockchain network to be recovered, the name of the ledger to be recovered, and the recovery mode. The name of the blockchain network to be recovered indicates the name of the blockchain network to which the data to be recovered in the storage area will be restored; the name of the ledger to be recovered refers to the name of the ledger under the blockchain node in the blockchain network to which the data to be recovered in the storage area will be restored, such as... Figure 3 In the data recovery interface, the ledger to be recovered is named Ledger 2. Recovery modes include full recovery and partial recovery. When the recovery mode is full recovery, all data from the corresponding ledger in the storage area is recovered to the blockchain node. When the recovery mode is partial recovery, the data recovery interface displays a recovery range, which includes the starting block file number and the ending block file number. The ending block file number is the current maximum block file number for this ledger, returned by the backend interface and cannot be modified. The starting block file number can be specified by the user on the data recovery interface as needed, with the rule being greater than 0 and less than the ending block file number.

[0054] Accordingly, the data recovery instruction includes: a network key-value pair corresponding to the name of the blockchain network to be recovered, a ledger key-value pair corresponding to the name of the ledger to be recovered, and a pattern key-value pair corresponding to the recovery mode; the blockchain agent determines the recovery mode of the data to be recovered based on the pattern key-value pair; in response to the recovery mode being full recovery, all the data to be recovered is restored to the ledger indicated by the ledger key-value pair of the blockchain network indicated by the network key-value pair.

[0055] Optionally, the configuration information of the data recovery interface also includes: recovery range, and the data recovery instructions also include: range key-value pairs corresponding to the recovery range. When the blockchain agent determines that the recovery mode of the data to be recovered is partial recovery based on the mode key-value pairs, it will restore the block file corresponding to the range key-value pairs to the ledger indicated by the ledger key-value pairs of the blockchain network indicated by the network key-value pairs.

[0056] In this optional implementation, by setting the configuration information of the data recovery interface to the name of the blockchain network to be recovered, the name of the ledger to be recovered, and the recovery mode, an effective recovery strategy can be provided for blockchain data recovery, thereby improving the reliability of data recovery configuration.

[0057] Optionally, the configuration information of the data recovery interface may also include: recovery content, wherein the recovery content refers to which area of ​​the blockchain node the data in the storage area will be recovered to. When the blockchain node includes at least one ledger, and each ledger includes at least one block file, the recovery content includes: which ledger of the blockchain network the data in the storage area will be recovered to. On the data recovery interface, the ledger corresponding to the recovery content can be selected from a drop-down menu.

[0058] Optionally, the configuration information of the data recovery interface may also include: clear configuration information, wherein the clear configuration information is used to indicate whether to clean up the archive area for the recovered block files. Figure 3 As shown, after block file 1 and block file 2 in storage B are restored to the blockchain node, if the "clear configuration information" setting is "yes", then block file 1 and block file 2 in storage B will be directly cleared. Conversely, if the "clear configuration information" setting is "no", then block file 1 and block file 2 in storage B will not be cleared.

[0059] like Figure 3 As shown, the Blockchain-as-a-Service (BAS) front-end service sends a data recovery command to the BAS back-end service. The BAS back-end service forwards the data recovery command to the blockchain agent. The blockchain agent then performs the recovery operation on a specific block file of a specific ledger within a specified network. Figure 3 In the example scenario shown, the aforementioned blockchain agent restores ledger 2 under blockchain node peer2, along with block files 1 and 2 under storage B, to the original ledger directory of blockchain node peer2. It should be noted that the restoration must start from the larger archive number and proceed backwards. For block files 1 and 2 already archived under ledger 2 in storage B, whether they should be deleted can be specified according to user needs (removal configuration information in the data recovery interface configuration information). Figure 3 After the recovery is complete, block file 1 and block file 2 are cleaned up. After successfully restoring the ledger data, the archive point values ​​in the state machine need to be updated synchronously (equivalent to rolling back the archive points).

[0060] The blockchain data processing system provided in this embodiment can dynamically recover blockchain data according to the strategy set in the visualized data recovery interface through the data recovery interface provided by the blockchain-as-a-service front-end service provider, thereby improving the efficiency of data recovery.

[0061] In another embodiment of this disclosure, the Blockchain-as-a-Service (BAS) front-end service provider is also used to visualize the ledger configuration interface of each blockchain node in the blockchain network, and generate ledger setting instructions based on the configuration information of the ledger configuration interface; the BAS back-end service provider forwards the ledger setting instructions to the blockchain agent; the blockchain agent creates a ledger in the blockchain node of the blockchain network based on the ledger setting instructions.

[0062] In this embodiment, the ledger configuration interface includes: Ledger Name, Number of Data Accounts, Creation Time, and Ledger Status. The Ledger Name represents the name of the created ledger. The Number of Data Accounts represents the number of block files in the created ledger. The Creation Time is the time the ledger was created. The Ledger Status represents the current state of the created ledger, such as whether the current state is public or not.

[0063] The blockchain data processing system provided in this embodiment can dynamically partition the data in the blockchain according to the strategy set in the visual ledger configuration interface provided by the blockchain-as-a-service front-end service provider. This improves the reliability of data partitioning in the blockchain and allows users to configure the ledger through blockchain-as-a-service, thus enhancing the user experience.

[0064] In some optional implementations of this embodiment, the ledger configuration interface includes: an archive button corresponding to each ledger; for each ledger in the ledger configuration interface, when the Blockchain-as-a-Service front-end service provider receives the archive button trigger information for that ledger, it determines whether the ledger stops the archive function or enables the archive function; the ledger setting instruction sent to the Blockchain-as-a-Service back-end service provider includes stopping data archiving for that ledger or starting data archiving for that ledger.

[0065] In this optional implementation, the archive button trigger information may include at least one trigger state. When the user triggers the state of the archive button to stop archiving, it is determined that the ledger stops the archiving function; when the user triggers the state of the archive button to enable archiving, it is determined that the ledger enables the archiving function.

[0066] In the ledger configuration interface of the specified blockchain network, determine the archiving button for each ledger. The archiving button has the function of stopping or enabling, and can display "Stop Archiving" and "Enable Archiving". For example, when the user clicks the archiving button that displays "Stop Archiving", archiving of all block data in the ledger will stop, and the archiving button will display "Enable Archiving". When the user clicks the archiving button that displays "Enable Archiving", all block data in the ledger will be archived according to the configuration information in the archiving configuration interface.

[0067] In the ledger configuration interface, the "Stop / Enable" archiving option is displayed in the operation column of each ledger row. For example, in a block network A, which has ledgers L1 and L2, the archiving button is displayed as shown in Table 1.

[0068]

[0069] Optionally, after clicking the "Stop Archiving" archiving button, the status of the archiving button can also be changed to "Stop Archiving"; when the blockchain network actually stops archiving the ledger, the display status of the archiving button will change from "Stop Archiving" to "Enable Archiving".

[0070] After clicking the "Enable Archiving" button, the status of the archive button can change to "Enable Archiving in Progress". When the blockchain network re-enables archiving and restarts the blockchain nodes, the status of the archive button will change from "Enable Archiving in Progress" to "Stop Archiving".

[0071] The blockchain data processing system provided by this optional implementation allows users to set up archive buttons for each ledger in the configuration interface. This allows users to stop ledger archiving at any time when needed, or to easily enable ledger archiving after it has been stopped.

[0072] Further reference Figure 4 As an implementation of the systems shown in the above figures, this disclosure provides an embodiment of a blockchain data processing method, illustrating a flowchart 400 of an embodiment of the blockchain data processing method according to this disclosure, which includes: Step 401: Receive data archiving instructions sent by the Blockchain-as-a-Service backend service provider.

[0073] In this embodiment, the backend service provider of Blockchain as a Service (BaaS) belongs to the Blockchain as a Service (BaaS) platform. The Blockchain as a Service (BaaS) platform is a new type of cloud service that combines blockchain. This cloud service opens up a space in the cloud network to run a blockchain node, and the Blockchain as a Service (BaaS) platform can also quickly create, deploy, run and monitor blockchain applications.

[0074] In this embodiment, the data archiving instruction is generated by the Blockchain-as-a-Service front-end service provider based on the configuration information of the visually displayed archiving configuration interface.

[0075] The Blockchain-as-a-Service (BAS) front-end service provider belongs to the BAS platform and can display an archiving configuration interface. Users can configure the archiving configuration interface to obtain configuration information. After the user completes the archiving configuration interface, they will receive data archiving instructions to archive the data in each blockchain node in the blockchain network.

[0076] In some optional implementations of this embodiment, the configuration information of the archiving configuration interface includes: data archiving period, number of concurrent archive ledgers, maximum number of block files, maximum block file size, number of reserved block files, and storage area.

[0077] Based on the above configuration information, the generated data archiving instructions include: period key-value pairs corresponding to the data archiving period, ledger number key-value pairs corresponding to the number of concurrent archived ledgers, file number key-value pairs corresponding to the maximum number of block files, file size key-value pairs corresponding to the maximum block file size, reserved file key-value pairs corresponding to the number of reserved block files, and storage area key-value pairs corresponding to the storage area.

[0078] Optionally, the configuration information in the archive configuration interface may also include: archive options and engine type.

[0079] Step 402: Archive the data of the blockchain nodes in the blockchain network based on the data archiving instruction.

[0080] In this embodiment, the execution entity running on the blockchain data processing method can communicate with the blockchain network and generate a strategy to control the data of blockchain nodes based on data archiving instructions.

[0081] In this embodiment, the execution entity running on the blockchain data processing method is primarily responsible for communicating with the blockchain network. Like the backend service provider of Blockchain-as-a-Service, it is a service component. The Blockchain-as-a-Service platform specifies the archiving strategy to the execution entity through data archiving instructions. The execution entity implements the specific archiving logic and is also the entry point for actually operating the blockchain network. All operations that enable the blockchain network are implemented on the execution entity.

[0082] In this embodiment, the data recovery instruction may include: periodic key-value pairs, ledger quantity key-value pairs, file quantity key-value pairs, file size key-value pairs, retained file key-value pairs, and storage area key-value pairs.

[0083] In response to this data recovery instruction, the aforementioned data archiving instruction archives the data of blockchain nodes in the blockchain network, including: periodically archiving the data of blockchain nodes based on the period indicated by the period key-value pair; simultaneously archiving the ledger number indicated by the ledger number key-value pair in each archiving period; archiving block files exceeding the number indicated by the file number key-value pair in each archiving period; archiving block files other than the block files corresponding to the reserved file key-value pair when the sum of all block files exceeds the value indicated by the file size key-value pair in each archiving period, wherein the block files corresponding to the reserved file key-value pair are the most recent block files of the number indicated by the reserved file key-value pair; and storing the archived block files in the area indicated by the storage area key-value pair.

[0084] In this embodiment, the generated data archiving instructions differ depending on the configuration information in the archiving configuration interface. The archiving configuration interface may include: data archiving period, archived data information, and archiving destination. The above-mentioned archiving of data from blockchain nodes in the blockchain network based on data archiving instructions includes: periodically retrieving data from the blocks corresponding to the archived data information in the blockchain network based on the data archiving period, and storing the retrieved data in the storage area, thereby completing the archiving of the retrieved data.

[0085] Optionally, the above-mentioned archiving of data of blockchain nodes in the blockchain network based on data archiving instructions also includes: deleting the acquired data in the blockchain network.

[0086] The blockchain data processing method provided in the embodiments of this disclosure, through a blockchain-as-a-service platform, can dynamically manipulate the archiving of ledger data in a visual manner, so that data in blockchain nodes can be effectively archived to a designated storage area.

[0087] The blockchain data processing method provided in this disclosure obtains data archiving instructions from the front-end service provider of a Blockchain-as-a-Service (BAS) platform, and forwards these instructions to a blockchain agent through the back-end service provider of the BAS platform. The blockchain agent then archives the data of the blockchain nodes based on the data archiving instructions. Therefore, blockchain data can be dynamically archived according to the strategies set in the visual archiving configuration interface, improving the efficiency of data archiving.

[0088] In one embodiment of this disclosure, the blockchain data processing method further includes: receiving a data recovery instruction sent by a Blockchain-as-a-Service backend service provider, wherein the data recovery instruction is generated by a Blockchain-as-a-Service frontend service provider based on configuration information of a visually displayed data recovery interface; and recovering archived data of blockchain nodes in the blockchain network based on the data recovery instruction.

[0089] In this embodiment, the configuration information of the data recovery interface includes: the name of the blockchain network to be recovered, the name of the ledger to be recovered, and the recovery mode. Correspondingly, the data recovery instructions include: the network key-value pair corresponding to the name of the blockchain network to be recovered, the ledger key-value pair corresponding to the name of the ledger to be recovered, and the mode key-value pair corresponding to the recovery mode. The above-mentioned data recovery based on data recovery instructions for recovering archived data of blockchain nodes in a blockchain network includes: determining the recovery mode of the data to be recovered based on the pattern key-value pair; and, in response to the recovery mode being full recovery, recovering all the data to be recovered to the ledger indicated by the ledger key-value pair of the blockchain network indicated by the network key-value pair.

[0090] Optionally, the configuration information of the data recovery interface may also include: the recovery range, and the data recovery command may also include: the range key-value pairs corresponding to the recovery range.

[0091] The above-mentioned data recovery instruction for recovering archived data of blockchain nodes in a blockchain network also includes: when the recovery mode of the data to be recovered is determined to be partial recovery based on the pattern key-value pair, the block file corresponding to the interval key-value pair is recovered to the ledger indicated by the ledger key-value pair of the blockchain network indicated by the network key-value pair.

[0092] Optionally, the configuration information of the data recovery interface may further include: clearing configuration information. The blockchain data processing method provided in the embodiments of this disclosure, through a blockchain-as-a-service platform, allows for dynamic and visual control of ledger data recovery, enabling data in the storage area to be quickly restored to the original blockchain node.

[0093] The blockchain data processing method provided in this disclosure can dynamically recover blockchain data according to the strategy set in the visualized data recovery interface through the data recovery interface provided by the blockchain-as-a-service front-end service provider, thereby improving the efficiency of data recovery.

[0094] In another embodiment of this disclosure, the blockchain data processing method further includes: receiving a ledger setting instruction sent by a Blockchain-as-a-Service backend service provider, wherein the ledger setting instruction is generated by a Blockchain-as-a-Service frontend service provider based on configuration information from a visually displayed ledger configuration interface; and creating a ledger in a blockchain node of the blockchain network based on the ledger setting instruction.

[0095] In this embodiment, the ledger configuration interface includes: ledger name, number of data accounts, creation time, and ledger status.

[0096] The blockchain data processing method provided in this disclosure, through the ledger configuration interface provided by the Blockchain-as-a-Service front-end service provider, can dynamically divide the data in the blockchain according to the strategy set in the visual ledger configuration interface, thereby improving the reliability of data division in the blockchain. It also allows users to configure the ledger through Blockchain-as-a-Service, thus enhancing the user experience.

[0097] Optionally, the above-mentioned blockchain data processing method further includes: receiving the archive button trigger information of the ledger, and based on the archive button trigger information, stopping data archiving of the ledger, or starting data archiving of the ledger.

[0098] The blockchain data processing method provided in this embodiment can visually display whether the ledger has enabled data archiving, the set archiving strategy, and the latest archiving point; it can also stop or enable ledger archiving (and reset the ledger archiving strategy), improving the convenience of ledger configuration.

[0099] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a blockchain data processing device, which is similar to... Figure 4 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0100] like Figure 5 As shown, embodiments of this disclosure provide a blockchain data processing apparatus 500, which includes an archiving receiving unit 501 and a data archiving unit 502. The archiving receiving unit 501 can be configured to receive data archiving instructions sent by a Blockchain-as-a-Service (BAS) backend service provider. These data archiving instructions are generated by the BAS frontend service provider based on configuration information from a visually displayed archiving configuration interface. The data archiving unit 502 can be configured to archive data from blockchain nodes in the blockchain network based on the data archiving instructions.

[0101] In this embodiment, the specific processing of the archiving receiving unit 501 and the data archiving unit 502 in the blockchain data processing device 500 and the resulting technical effects can be referred to respectively. Figure 2 The corresponding steps 401 and 402 in the embodiment.

[0102] In some embodiments, the apparatus 500 further includes: a recovery receiving unit (not shown in the figure) and a data recovery unit (not shown in the figure). The recovery receiving unit can be configured to receive data recovery instructions sent by the Blockchain-as-a-Service backend service provider, the data recovery instructions being generated by the Blockchain-as-a-Service frontend service provider based on configuration information from a visually displayed data recovery interface. The data recovery unit can be configured to recover archived data from blockchain nodes in the blockchain network based on the data recovery instructions.

[0103] In some embodiments, the apparatus 500 further includes: a ledger configuration unit (not shown in the figure) and a ledger creation unit (not shown in the figure). The ledger configuration unit can be configured to receive ledger setting instructions sent by the Blockchain-as-a-Service backend service provider, the ledger setting instructions being generated by the Blockchain-as-a-Service frontend service provider based on configuration information from a visually displayed ledger configuration interface. The ledger creation unit can be configured to create a ledger in a blockchain node of the blockchain network based on the ledger setting instructions.

[0104] The blockchain data processing apparatus provided in the embodiments of this disclosure firstly includes an archiving receiving unit 501, which can be configured to receive data archiving instructions sent by the Blockchain-as-a-Service (BAS) backend service provider. These data archiving instructions are generated by the BAS frontend service provider based on configuration information from a visually displayed archiving configuration interface. Secondly, a data archiving unit 502 can be configured to archive data from blockchain nodes in the blockchain network based on the data archiving instructions. Therefore, blockchain data can be dynamically archived according to the strategy set in the visual archiving configuration interface, improving the efficiency of data archiving.

[0105] The following is for reference. Figure 6 It shows a schematic diagram of the structure of an electronic device 600 suitable for implementing embodiments of the present disclosure.

[0106] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.

[0107] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can represent a device or multiple devices as needed.

[0108] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by a processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.

[0109] It should be noted that the computer-readable medium in the embodiments of this disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium may be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In the embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In the embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (Radio Frequency), etc., or any suitable combination thereof.

[0110] The aforementioned computer-readable medium may be included in the aforementioned server; or it may exist independently and not assembled into the server. The aforementioned computer-readable medium carries one or more programs that, when executed by the server, cause the server to: receive data archiving instructions sent by the Blockchain-as-a-Service backend service provider, the data archiving instructions being generated by the Blockchain-as-a-Service frontend service provider based on configuration information from a visually displayed archiving configuration interface; and archive data from blockchain nodes in the blockchain network based on the data archiving instructions.

[0111] Computer program code for performing the operations of embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages—such as Java, Smalltalk, and C++—and conventional procedural programming languages—such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0112] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0113] The units described in the embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, it can be described as: a processor including an archive receiving unit and a data archive unit. The names of these units do not necessarily limit the unit itself; for example, the archive receiving unit can also be described as a unit "configured to receive data archive instructions sent by a Blockchain-as-a-Service backend service provider."

[0114] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.

Claims

1. A blockchain data processing system, the system being implemented based on a blockchain-as-a-service platform, the system comprising: A Blockchain-as-a-Service (BAS) front-end service provider is used to visually display the archiving configuration interface and data recovery interface of the blockchain network. It generates data archiving instructions based on the configuration information of the archiving configuration interface and data recovery instructions based on the configuration information of the data recovery interface. The configuration information of the archiving configuration interface includes: archiving options, engine type, data archiving period, and archived data information. The archiving options indicate whether the archiving configuration interface is displayed, and the engine type indicates the method used to archive block files. The configuration information of the data recovery interface includes: recovery mode and recovery interval. The data recovery instructions include: mode key-value pairs corresponding to the recovery mode and interval key-value pairs corresponding to the recovery interval. The Blockchain-as-a-Service backend service provider is used to forward the data archiving instructions and the data recovery instructions to the blockchain agent. The blockchain agent archives the data of the blockchain nodes in the blockchain network based on the data archiving instruction, and restores the archived data of the blockchain nodes in the blockchain network based on the data recovery instruction. This includes: periodically retrieving data from the blocks corresponding to the archived data information in the blockchain network based on the data archiving period, storing the retrieved data in a storage area, deleting the retrieved data in the blockchain network, and, based on the pattern key-value pair, determining that the recovery mode of the data to be restored is partial recovery, restoring the block file corresponding to the interval key-value pair to the ledger indicated by the ledger key-value pair of the blockchain network indicated by the network key-value pair.

2. The system according to claim 1, wherein, The Blockchain-as-a-Service front-end service provider is also used to visually display the ledger configuration interface of each blockchain node in the blockchain network, and generate ledger setting instructions based on the configuration information of the ledger configuration interface. The Blockchain-as-a-Service backend forwards the ledger setting instructions to the blockchain agent. The blockchain agent creates a ledger in the blockchain node of the blockchain network based on the ledger setting instructions.

3. The system according to claim 1, wherein, The ledger configuration interface includes: an archive button for each ledger; for each ledger in the ledger configuration interface, when the Blockchain-as-a-Service front-end service provider receives the archive button trigger information for that ledger, it determines whether to stop or enable the archive function for that ledger; the ledger setting instructions sent to the Blockchain-as-a-Service back-end service provider include stopping data archiving for that ledger or starting data archiving for that ledger.

4. The system according to any one of claims 1-3, wherein, The configuration information in the archiving configuration interface includes: data archiving cycle, number of concurrent archiving ledgers, maximum number of block files, maximum block file size, number of reserved block files, and storage area; The data archiving instructions include: a period key-value pair corresponding to the data archiving period, a ledger number key-value pair corresponding to the concurrent archive ledger number, a file number key-value pair corresponding to the maximum block file number, a file size key-value pair corresponding to the maximum block file size, a reserved file key-value pair corresponding to the reserved block file number, and a storage area key-value pair corresponding to the storage area. The blockchain agent performs periodic archiving of the blockchain node data based on the period indicated by the periodic key-value pair; simultaneously archives the number of ledgers indicated by the ledger quantity key-value pair in each archiving period; archives block files exceeding the number indicated by the file quantity key-value pair in each archiving period; archives block files other than the block files corresponding to the reserved file key-value pair when the sum of all block files exceeds the value indicated by the file size key-value pair in each archiving period, wherein the block files corresponding to the reserved file key-value pair are the most recent block files of the number indicated by the reserved file key-value pair; and stores the archived block files in the area indicated by the storage area key-value pair.

5. The system according to any one of claims 1-3, wherein, The configuration information of the data recovery interface includes: the name of the blockchain network to be recovered, the name of the ledger to be recovered, and the recovery mode; The data recovery instruction includes: a network key-value pair corresponding to the name of the blockchain network to be recovered, a ledger key-value pair corresponding to the name of the ledger to be recovered, and a mode key-value pair corresponding to the recovery mode; The blockchain agent determines the recovery mode of the data to be recovered based on the pattern key-value pair; in response to the recovery mode being full recovery, the data to be recovered is fully restored to the ledger indicated by the ledger key-value pair of the blockchain network indicated by the network key-value pair.

6. A blockchain data processing method, applied to the system of any one of claims 1-5, the method comprising: Receive data archiving instructions sent by the Blockchain-as-a-Service backend service provider, wherein the data archiving instructions are generated by the Blockchain-as-a-Service frontend service provider based on the configuration information of the visually displayed archiving configuration interface; Based on the data archiving instruction, the data of blockchain nodes in the blockchain network is archived.

7. The method according to claim 6, further comprising: Receive data recovery instructions sent by the Blockchain-as-a-Service backend service provider, wherein the data recovery instructions are generated by the Blockchain-as-a-Service frontend service provider based on the configuration information of the visually displayed data recovery interface; Based on the data recovery instruction, the archived data of the blockchain nodes in the blockchain network is recovered.

8. The method according to claim 6 or 7, further comprising: Receive the ledger setting instruction sent by the Blockchain-as-a-Service backend service provider, the ledger setting instruction being generated by the Blockchain-as-a-Service frontend service provider based on the configuration information of the visually displayed ledger configuration interface; A ledger is created in the blockchain node of the blockchain network based on the ledger setup instructions.

9. A blockchain data processing device, applied to the system of any one of claims 1-5, the device comprising: The archiving receiving unit is configured to receive data archiving instructions sent by the Blockchain-as-a-Service backend service provider. The data archiving instructions are generated by the Blockchain-as-a-Service frontend service provider based on the configuration information of the visually displayed archiving configuration interface. The data archiving unit is configured to archive data of blockchain nodes in the blockchain network based on the data archiving instructions.

10. An electronic device, comprising: One or more processors; A storage device on which one or more programs are stored; When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 6-8.

11. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 6-8.

12. A computer program product comprising a computer program that, when executed by a processor, implements the method of any one of claims 6-8.

Citation Information

Patent Citations

  • Data processing method in blockchain system and related equipment

    CN112291376A

  • Method and device for checking archived data in block chain

    CN113742786A