Account data reading and writing method and device

By maintaining an independent database in the node device and determining read and write operations based on the blockchain network, the problem of account data isolation in the blockchain network is solved, and safe and efficient data management is achieved.

CN114357080BActive Publication Date: 2024-11-08ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111669730.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2024-11-08
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

In a blockchain network, when multiple different blockchain nodes are deployed in a node device, how to achieve isolation of account data to avoid data interaction and changes between different blockchain networks.

Method used

By maintaining the independent databases corresponding to each blockchain node in the node device, the read and write requests of the target account are obtained, and the account data of the target account is recorded in the independent database of the specific blockchain network to determine the database, thereby performing reading Write operations ensure that only the data of the corresponding blockchain network is operated.

Benefits of technology

The isolation of account data in different blockchain networks is achieved, data changes in other blockchain networks are avoided, and the security and efficiency of data management are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114357080B_ABST
    Figure CN114357080B_ABST
Patent Text Reader

Abstract

One or more embodiments of the present specification provide a method and device for reading and writing account data. The method is applied to a first blockchain node in a first blockchain network, and the node device where the first blockchain node is located also deploys blockchain nodes of other blockchain networks, and the node device maintains independent databases corresponding to each blockchain node, and the independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. The method includes: obtaining a read and write request for the target account; when the account data of the target account is recorded in the independent database corresponding to the first blockchain network, determining the independent database corresponding to the first blockchain network on the node device; searching for the target account from the determined independent database and performing read and write operations on the account data of the target account.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the field of blockchain technology, and more particularly, to a method and device for reading and writing account data. Background Art

[0002] Blockchain technology is built on a peer-to-peer network. Nodes in a blockchain network use chain data structures to verify and store data, and use distributed node consensus algorithms to generate and update data. In some blockchain networks, node members corresponding to some nodes sometimes need to participate in multiple blockchain networks, that is, a node device may simultaneously deploy multiple blockchain nodes belonging to different blockchain networks. In this scenario, the node device needs to isolate the account data of the blockchain accounts in the different blockchain networks it participates in. Summary of the invention

[0003] In view of this, one or more embodiments of the present specification provide a method and device for reading and writing account data.

[0004] To achieve the above purpose, one or more embodiments of this specification provide the following technical solutions:

[0005] According to a first aspect of one or more embodiments of the present specification, a method for reading and writing account data is proposed, which is applied to a first blockchain node in a first blockchain network, and the node device where the first blockchain node is located also has blockchain nodes of other blockchain networks deployed, and the node device maintains independent databases corresponding to each blockchain node, respectively, and the independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs, and the method includes:

[0006] Get read and write requests for the target account;

[0007] In a case where the account data of the target account is recorded in an independent database corresponding to the first blockchain network, determining an independent database corresponding to the first blockchain network on the node device;

[0008] The target account is searched from the determined independent database and the account data of the target account is read and written.

[0009] According to a second aspect of one or more embodiments of the present specification, a method for reading and writing account data is proposed, which is applied to a node device, wherein a plurality of blockchain nodes respectively belonging to different blockchain networks are deployed in the node device, and the node device maintains an independent database corresponding to each blockchain node, wherein the independent database is used to record the account data of a target account in the blockchain network to which the corresponding blockchain node belongs, and the method comprises:

[0010] Get read and write requests for the target account;

[0011] In a case where the account data of the target account is recorded in an independent database corresponding to a first blockchain network, determining an independent database corresponding to the first blockchain network on the node device, wherein the first blockchain network is a blockchain network to which any blockchain node among the multiple blockchain nodes belongs;

[0012] The target account is searched from the determined independent database and the account data of the target account is read and written.

[0013] According to a third aspect of one or more embodiments of the present specification, a device for reading and writing account data is proposed, which is applied to a first blockchain node in a first blockchain network, and the node device where the first blockchain node is located also has blockchain nodes of other blockchain networks deployed, and the node device maintains independent databases corresponding to each blockchain node, respectively, and the independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs, and the device includes:

[0014] The request acquisition module is used to obtain read and write requests for the target account;

[0015] A database determination module, configured to determine, when the account data of the target account is recorded in an independent database corresponding to the first blockchain network, an independent database corresponding to the first blockchain network on the node device;

[0016] The first read-write module is used to search the target account from the determined independent database and perform read-write operations on the account data of the target account.

[0017] According to a fourth aspect of one or more embodiments of the present specification, a device for reading and writing account data is proposed, which is applied to a node device, wherein a plurality of blockchain nodes belonging to different blockchain networks are deployed in the node device, and the node device maintains an independent database corresponding to each blockchain node, wherein the independent database is used to record the account data of a target account in the blockchain network to which the corresponding blockchain node belongs, and the device comprises:

[0018] The request acquisition module is used to obtain read and write requests for the target account;

[0019] A database determination module, configured to determine, when the account data of the target account is recorded in an independent database corresponding to the first blockchain network, an independent database corresponding to the first blockchain network on the node device, wherein the first blockchain network is a blockchain network to which any blockchain node among the multiple blockchain nodes belongs;

[0020] The first read-write module is used to search the target account from the determined independent database and perform read-write operations on the account data of the target account.

[0021] According to a fifth aspect of one or more embodiments of this specification, an electronic device is provided, including:

[0022] processor;

[0023] a memory for storing processor-executable instructions;

[0024] The processor implements the method as described in the first aspect or the second aspect by running the executable instructions.

[0025] According to a sixth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in the first aspect or the second aspect are implemented.

[0026] In summary, through the technical solution of this specification, for multiple blockchain nodes deployed in the node device and belonging to different blockchain networks, the node device maintains an independent database corresponding to each blockchain node, and each independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. Based on this recording method of account data, for the read and write request obtained for the target account, the first blockchain node or node device can determine the independent database when the account data of the target account is recorded in the independent database corresponding to the first blockchain network, and then search for the target account from the determined independent database and perform read and write operations on its account data.

[0027] In this way, the node device can save the account data of the target accounts in different blockchain networks in different independent databases respectively, and can respond to read and write requests by only performing read and write operations on the account data in the independent database that records the account data of the target account, without operating other independent databases, thereby avoiding changes to the account data of the target accounts belonging to other blockchain networks recorded in other independent databases, thereby effectively isolating the account data corresponding to different blockchain nodes in the same node device. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a schematic diagram of creating a smart contract provided by an exemplary embodiment.

[0029] Figure 2 This is a schematic diagram of calling a smart contract provided by an exemplary embodiment.

[0030] Figure 3It is a schematic diagram of creating and calling a smart contract provided by an exemplary embodiment.

[0031] Figure 4 It is a structural schematic diagram of a multi-level tree structure provided by an exemplary embodiment.

[0032] Figure 5 This is a schematic diagram of database deployment in a node device provided by an exemplary embodiment.

[0033] Figure 6 It is a flowchart of a method for reading and writing account data provided by an exemplary embodiment.

[0034] Figure 7 It is a flowchart of another method for reading and writing account data provided by an exemplary embodiment.

[0035] Figure 8 It is a structural schematic diagram of a device provided by an exemplary embodiment.

[0036] Fig. 9 It is a block diagram of a device for reading and writing account data provided by an exemplary embodiment.

[0037] Fig.10 The block diagram of another account data reading and writing device is provided by an exemplary embodiment. DETAILED DESCRIPTION

[0038] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0039] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0040] Blockchain is generally divided into three types: public blockchain, private blockchain and consortium blockchain. In addition, there are many types of combinations, such as private blockchain + consortium blockchain, consortium blockchain + public blockchain and other different combinations. Among them, the public chain has the highest degree of decentralization. Participants who join the public chain can read the data records on the chain, participate in transactions, and compete for the right to record new blocks. Moreover, each participant (i.e., node) can freely join and exit the network and perform related operations. On the contrary, the private chain has the write permission of the network controlled by a certain organization or institution, and the data reading permission is stipulated by the organization. In simple terms, the private chain can be a weakly centralized system with strictly limited and few participating nodes. This type of blockchain is more suitable for use within a specific organization. The consortium chain is a blockchain between the public chain and the private chain, which can achieve "partial decentralization". Each node in the consortium chain usually has a corresponding entity or organization; participants join the network through authorization and form a stakeholder alliance to jointly maintain the operation of the blockchain.

[0041] Whether it is a public chain, a private chain or a consortium chain, it may provide the function of smart contracts. Smart contracts on the blockchain are contracts that can be triggered and executed by transactions on the blockchain system. Smart contracts can be defined in the form of code.

[0042] Taking Ethereum as an example, it supports users to create and call some complex logic in the Ethereum network. The core of Ethereum as a programmable blockchain is the Ethereum Virtual Machine (EVM), and each Ethereum node can run EVM. EVM is a Turing-complete virtual machine, which means that various complex logics can be implemented through it. Users publish and call smart contracts in Ethereum on EVM. In fact, the virtual machine directly runs the virtual machine code (virtual machine bytecode, hereinafter referred to as "bytecode"). Smart contracts deployed on the blockchain can be in the form of bytecode.

[0043] For example Figure 1 As shown in the figure, after Bob sends a transaction containing information about creating a smart contract to the Ethereum network, the EVM of node 1 can execute this transaction and generate the corresponding contract instance. Figure 1The "0x6f8ae93..." in the transaction represents the address of this contract. The data field of the transaction can store bytecode, and the to field of the transaction is empty. After the nodes reach an agreement through the consensus mechanism, the contract is successfully created and can be called in the subsequent process. After the contract is created, a contract account corresponding to the smart contract appears on the blockchain and has a specific address. The contract code will be saved in the contract account. The behavior of the smart contract is controlled by the contract code. In other words, the smart contract generates a virtual account on the blockchain that contains the contract code and account storage.

[0044] like Figure 2 As shown in the figure, still taking Ethereum as an example, after Bob sends a transaction for calling a smart contract to the Ethereum network, the EVM of a certain node can execute this transaction and generate a corresponding contract instance. Figure 2 The from field of the transaction is the address of the account of the transaction initiator (i.e. Bob), the "0x6f8ae93..." in the to field represents the address of the smart contract being called, the value field can be the value of the digital asset in Ethereum, and the data field of the transaction stores the method and parameters of calling the smart contract. After calling the smart contract, the value of balance may change. Later, a client can use a blockchain node (such as Figure 2 Node 6) in the blockchain network to check the current value of balance. Smart contracts are executed independently on each node in the blockchain network in a prescribed manner, and all execution records and data are stored on the blockchain. Therefore, when the transaction is completed, the blockchain stores transaction credentials that cannot be tampered with or lost.

[0045] The schematic diagram of creating and calling smart contracts is as follows: Figure 3 To create a smart contract in Ethereum, you need to go through the process of writing the smart contract, compiling it into bytecode, and deploying it to the blockchain. To call a smart contract in Ethereum is to initiate a transaction pointing to the smart contract address. The smart contract code runs in a distributed manner in the virtual machines of each node in the Ethereum network.

[0046] It should be noted that in addition to being able to be created by users, smart contracts can also be set by the system in the genesis block. This type of contract is generally called a genesis contract. Generally, some blockchain network data structures, parameters, properties, and methods can be set in the genesis contract. In addition, accounts with system administrator privileges can create system-level contracts or modify system-level contracts (referred to as system contracts). In addition to the EVM in Ethereum, different blockchain networks may also use various virtual machines, which are not limited here.

[0047] After executing a transaction that calls a smart contract, a node in the blockchain network will generate a corresponding receipt to record information related to the execution of the smart contract. In this way, relevant information about the contract execution result can be obtained by querying the transaction receipt. The contract execution result can be expressed as an event in the receipt. The message mechanism can realize message transmission through the event in the receipt to trigger the blockchain node or the node device that deploys the blockchain node to perform corresponding processing. The structure of the event can be, for example:

[0048] Event:

[0049] [topic][data]

[0050] [topic][data] ......

[0052] In the above example, the number of events can be one or more, wherein each event includes fields such as topic and data. The blockchain node or the node device deploying the blockchain node can monitor the topic of the event, and when a predefined topic is monitored, perform a preset process, or read relevant content from the data field of the corresponding event, and perform a preset process based on the read content.

[0053] In the above event mechanism, it is equivalent to having a client with a monitoring function at the listening party (such as a user with a monitoring demand), such as running an SDK for implementing the monitoring function on the client, and the client monitors the events generated by the blockchain node, and the blockchain node only needs to generate receipts normally. In addition to the above event mechanism, the disclosure of transaction information can also be achieved in other ways. For example, the listening code can be embedded in the blockchain platform code running on the blockchain node, so that the listening code can monitor one or more data such as the transaction content of the blockchain transaction, the contract status of the smart contract, and the receipt generated by the contract, and send the monitored data to the predefined listening party. Since the listening code is deployed in the blockchain platform code, rather than at the client of the listening party, this implementation method based on the listening code is relatively more active than the event mechanism. Among them, the above listening code can be added to the blockchain platform code by the developers of the blockchain platform during the development process, or it can be embedded by the listening party based on its own needs, and this specification does not limit this.

[0054] One of the decentralized features that distinguishes blockchain technology from traditional technologies is that it records accounts on each node, or distributed accounting, rather than traditional centralized accounting. In order for a blockchain system to become a decentralized, honest and trustworthy system that is difficult to break, public, and cannot be tampered with, it is necessary to make distributed data records secure, clear, and irreversible in the shortest possible time. In different types of blockchain networks, in order to maintain the consistency of the ledgers in each node that records the ledger, a consensus algorithm is usually used to ensure that it is the consensus mechanism mentioned above. For example, a consensus mechanism of block granularity can be implemented between blockchain nodes. For example, after a node (such as a unique node) generates a block, if the generated block is recognized by other nodes, other nodes record the same block. For another example, a consensus mechanism of transaction granularity can be implemented between blockchain nodes. For example, after a node (such as a unique node) obtains a blockchain transaction, if the blockchain transaction is recognized by other nodes, each node that recognizes the blockchain transaction can add the blockchain transaction to the latest block maintained by itself, and ultimately ensure that each node generates the same latest block. The consensus mechanism is a mechanism for blockchain nodes to reach a consensus on block information (or block data) across the entire network, which can ensure that the latest block is accurately added to the blockchain. The current mainstream consensus mechanisms include: Proof of Work (POW), Proof of Stake (POS), Delegated Proof of Stake (DPOS), Practical Byzantine Fault Tolerance (PBFT) algorithm, HoneyBadgerBFT algorithm, etc.

[0055] Due to the decentralized nature of the blockchain network, all blockchain nodes in the blockchain network will maintain the same block data, which cannot meet the special needs of some nodes. Taking the alliance chain as an example, all alliance members (i.e., node members within the alliance) can form a blockchain network, and all alliance members have corresponding blockchain nodes in the blockchain network, and can obtain all transactions and related data occurring on the blockchain network through the corresponding blockchain nodes. However, in some cases, some alliance members may also participate in the formation of other blockchain networks, so these members will also deploy other blockchain nodes in the node devices where the corresponding blockchain nodes in the above blockchain network are located.

[0056] For example, some alliance members may want to complete some transactions with confidentiality requirements. These alliance members hope that these transactions can be stored on the blockchain or with the help of other advantages of blockchain technology, and can prevent other alliance members from viewing these transactions and related data. Although these alliance members can create a new blockchain network in a similar way to the blockchain network containing all alliance members, it takes a lot of resources to build a new blockchain network from scratch, and both the establishment process and the configuration process after the establishment of the blockchain network are very time-consuming. The needs between alliance members are often temporary or have a certain timeliness, so that the newly built blockchain network will soon lose its meaning of existence due to the disappearance of needs, thereby further increasing the cost of building the above blockchain network. The needs between alliance members often change, and the alliance members corresponding to each need are often different. Therefore, whenever the alliance members change, it may be necessary to create a new blockchain network, resulting in a lot of waste of resources and time.

[0057] To this end, the created blockchain network can be used as the blockchain main network, and a blockchain subnet can be created based on the blockchain main network. Then, in the above-mentioned alliance chain scenario, alliance members can create the required blockchain subnet based on the blockchain main network based on their own needs after participating in the blockchain main network. Since the blockchain subnet is established on the basis of the blockchain main network, the creation process of the blockchain subnet greatly reduces the resources consumed and the time required compared to creating a completely independent blockchain network, and is extremely flexible.

[0058] The following briefly introduces the process of quickly creating a blockchain subnet based on the blockchain main network: each main network node in the blockchain main network obtains the transaction for creating a blockchain subnet to reveal the configuration information. When the configuration information includes the identity information of the node member corresponding to the first main network node, the node device deploying the first main network node starts the first subnet node belonging to the blockchain subnet based on the genesis block containing the configuration information.

[0059] The transaction of creating a blockchain subnet can be initiated by the administrator of the blockchain main network, that is, only the administrator is allowed to create a blockchain subnet based on the blockchain main network, and avoid opening the creation permission of the blockchain subnet to ordinary users to prevent the security problems caused by this. In some cases, ordinary users of the blockchain main network can also be allowed to initiate the above-mentioned transaction of creating a blockchain subnet to meet the networking needs of ordinary users, so that ordinary users can still quickly create a blockchain subnet when it is inconvenient for the administrator to initiate the transaction.

[0060] by Figure 4As shown in the example, the blockchain mainnet is mainnet0, and the blockchain nodes contained in mainnet0 are nodeA, nodeB, nodeC, nodeD, and nodeE. Assume that nodeA, nodeB, nodeC, and nodeD want to create a blockchain subnet: if nodeA is an administrator and only administrators are allowed to initiate transactions to create blockchain subnets, then nodeA can initiate the above-mentioned transaction to create blockchain subnets to mainnet0; or, nodeB~nodeE can make a request to nodeA so that nodeA initiates the above-mentioned transaction to create blockchain subnets to mainnet0. If nodeA is an administrator but ordinary users are allowed to initiate transactions to create blockchain subnets, then nodeA~nodeE can initiate the above-mentioned transaction to create blockchain subnets to mainnet0. Of course, whether it is an administrator or an ordinary user, the blockchain node that initiates the transaction to create a blockchain subnet does not necessarily participate in the created blockchain subnet. For example, although the blockchain subnet is ultimately created by nodeA, nodeB, nodeC, and nodeD, the above-mentioned transaction to create a blockchain subnet can be initiated by nodeE to mainnet0, and it is not necessarily initiated by nodeA~nodeD.

[0061] When creating a blockchain subnet based on the blockchain mainnet, it is easy to understand that there will be a logical hierarchical relationship between the blockchain subnet and the blockchain mainnet. Figure 4 When creating blockchain subnet1 on mainnet0, it can be considered that mainnet0 is at the first layer and subnet1 is at the second layer, that is, mainnet0 is the parent network of subnet1, and subnet1 is the subnet of mainnet0. And on the basis of blockchain subnet, the next level of blockchain subnet can be further created. For example, Figure 4 On the basis of subnet1, another blockchain subnet subnet1.1 is further created. At this time, it can be considered that subnet is in the third layer, subnet1 is the parent network corresponding to subnet1.1, subnet1.1 is the subnet of subnet1, and subnet1.1 is the grandchild network of mainnet0. Similarly, subnet1.1 can still create a new blockchain subnet on its basis, so that each blockchain network forms this multi-level tree structure.

[0062] In this specification, any blockchain network can be managed by its corresponding parent network, that is, by the blockchain network that created the blockchain network. Figure 4In this multi-level tree structure with the blockchain main network as the root node (the root node has the lowest level) and each blockchain subnet as other nodes, the blockchain subnet represented by any node is managed by the blockchain network corresponding to its parent node. As a special case, when the blockchain main network is the underlying blockchain network, the blockchain main network is managed by the blockchain main network itself. The blockchain main network in this specification can be the underlying blockchain network. The underlying blockchain network refers to a blockchain subnet that is not created on the basis of other blockchain networks. Therefore, there is no other blockchain network other than the blockchain main network that can manage the blockchain main network, such as Figure 4 The mainnet0 in the figure can be considered as a blockchain mainnet belonging to the underlying blockchain network type, and mainnet0 manages mainnet0 itself. Of course, the blockchain mainnet can also be a subnet of other blockchain networks, and this manual does not impose any restrictions on this. The above multi-level tree structure realizes layer-by-layer management by managing the corresponding child nodes through the parent node, reducing the management pressure of the blockchain mainnet, while avoiding exposing the subnet information of the upper network to the lower network, thereby realizing the secret management of networks at all levels.

[0063] In this specification, a node device can implement the deployment of a blockchain node by creating an instance running a blockchain platform code in a process. For example, a node device can first create a first instance in a process to form a blockchain node in the blockchain main network; and when a node member corresponding to the node device wishes to participate in the creation of a blockchain subnet, a second instance can be created in the above process, which is different from the above first instance, and the blockchain node in the blockchain subnet is formed by the second instance. When the first instance and the second instance are in the same process, since there is no cross-process interaction involved, the deployment difficulty of the first subnet node can be reduced and the deployment efficiency can be improved. Of course, the second instance may also be in a different process on the node device from the first instance, and this specification does not limit this.

[0064] In fact, each blockchain node deployed on any node device involved in the embodiments of this specification is a different blockchain instance running on any node device, and the blocks generated by each blockchain node deployed on any node device and the account data of the created target account are respectively stored in different independent databases on any node device, and the independent databases used by each blockchain node deployed by any node device are isolated from each other. For example, a node device can create a first instance in a first process to form a first blockchain node in the blockchain main network; and when the node member corresponding to the node device wants to participate in the creation of a blockchain subnet, a second process different from the first process can be started, and a second instance can be created in the second process, and the second instance is different from the above-mentioned first instance, and then the second blockchain node in the blockchain subnet is formed by the second instance.

[0065] Through the above method, a blockchain subnet managed by the blockchain main network can be created on the blockchain main network. Figure 4 For example, for mainnet0 including nodeA~nodeE, subnet1 can be created on the basis of mainnet0, and subnet1 includes nodeA1~nodeD1, and any subnet node in subnet1 and its corresponding mainnet node in mainnet0 are deployed on the same node device, for example, nodeA and nodeA1 are deployed on node device A, nodeB and nodeB1 are deployed on node device B, nodeC and nodeC1 are deployed on node device C, and nodeD and nodeD1 are deployed on node device D. Similarly, subnet2 or more blockchain subnets can be created on mainnet0, where subnet2 includes nodeA2, nodeB2, nodeC2 and nodeE2, and nodeA and nodeA1, nodeA2, nodeB and nodeB1, nodeB2, nodeC and nodeC1, nodeD and nodeD1, nodeE and nodeE2 are deployed on the same node device respectively. And, subnet1, subnet2, etc. can be used as the main blockchain network, and further blockchain subnets can be created on this basis. For example, a blockchain subnet subnet1.1 is created on the basis of subnet1. The process is similar to the creation of subnet1 or subnet2, except that the main blockchain network is replaced with the blockchain subnet subnet1. It will not be repeated here. Finally, subnet1.1 contains nodeA3, nodeB3 and nodeC3, so that nodeA and nodeA1, nodeA2, nodeA3, nodeB and nodeB1, nodeB2, nodeB3, nodeC and nodeC1, nodeC2, nodeC3 are respectively deployed on the same node device. It can be seen that the main network node nodeA and subnet nodes nodeA1, nodeA2 and nodeA1.1 are deployed in node device A, the main network node nodeB and subnet nodes nodeB1, nodeB2 and nodeB1.1 are deployed in node device B, and node devices B and node devices C are similar to node device A and will not be repeated. The node device D is deployed with the main network node nodeD and the sub-network node nodeD, and the node device E is deployed with the main network node nodeE and the sub-network node nodeE2.

[0066] In addition, the node device where any of the above nodes is located maintains an independent database corresponding to the node, and the independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. Figure 4 Take the node device A where the four blockchain nodes nodeA, nodeA1, nodeA1.1, and nodeA2 are located as an example. Figure 5 As shown, the node device is deployed with independent databases corresponding to the four blockchain nodes: independent database 0 corresponding to nodeA, independent database 1 corresponding to nodeA, independent database 1.1 corresponding to nodeA1.1, and independent database 2 corresponding to nodeA2. Among them, any of the above independent databases is used to record the account data of the target account created in the corresponding blockchain node. For example, independent database 0 is used to record the account data of the target account created in nodeA, such as Accounts on mainnet0 in the figure, wherein the above independent account can be an external account or a contract account; the account data of any target account can be the account address of the account, the public and private key pair of the account, the historical operation record of the account, etc. In addition, the independent database corresponding to any blockchain node can also record the smart contract created in the blockchain network where the account is located, such as Contract in the figure, and the historical blocks generated in the blockchain network where the account is located, such as Block in the figure.

[0067] Understandably, Figure 4 The multi-level tree structure including the blockchain main network and blockchain subnet is only exemplary and is a possible structural form between the first blockchain network and other blockchain networks in this scheme. In actual applications, the blockchain network to which the multiple blockchain nodes deployed in the node device belong may not follow the above-mentioned multi-level structural form. In other words, in addition to the blockchain main network and the blockchain subnet it manages, the blockchain network to which any blockchain node deployed in the node device described in this scheme belongs may also be an independent blockchain network, and the aforementioned management / managed relationship does not exist between this type of independent blockchain network and other blockchain networks. Figure 1As shown, the independent blockchain network mainnet1 is independent of the aforementioned main network mainnet0 and subnets subnet1, subnet2, subnet1.1, etc., that is, mainnet1 and other blockchains do not have the aforementioned management / managed relationship between the main blockchain network and the blockchain subnet. However, any independent blockchain network can also achieve cross-chain interaction with other blockchain networks. For example, when nodeF, nodeG and nodeH in mainnet1 are respectively deployed in the aforementioned node device A, node device B and node device C, the aforementioned network connection links are established between the above nodes of mainnet1 and the nodes nodeA1, nodeB1 and nodeC1 in subnet1, respectively. Therefore, the independent blockchain network mainnet1 and the blockchain subnet subnet1 can achieve cross-chain interaction based on the above network connection links. Similarly, the independent blockchain network mainnet1 and the blockchain subnet subnet2 and the blockchain mainnet0 can also achieve cross-chain interaction based on the corresponding network connection links. It is also worth noting that even if the node devices of each node of any two blockchain networks are not exactly the same or even completely different, cross-chain interaction between the two blockchain networks can still be achieved based on the inter-device network connection between the node devices where each node is located and other node devices. The specific process will not be repeated here.

[0068] In fact, in addition to the blockchain main network and the blockchain subnets it manages, the blockchain network to which any blockchain node deployed in the node device described in this solution belongs can also be an independent blockchain network. There is no aforementioned management / managed relationship between such independent blockchain networks and other blockchain networks. Figure 1As shown, the independent blockchain network mainnet1 is independent of the aforementioned main network mainnet0 and subnets subnet1, subnet2, subnet1.1, etc., that is, mainnet1 and other blockchains do not have the aforementioned management / managed relationship between the main blockchain network and the blockchain subnet. However, any independent blockchain network can also achieve cross-chain interaction with other blockchain networks. For example, when nodeF, nodeG and nodeH in mainnet1 are respectively deployed in the aforementioned node device A, node device B and node device C, the aforementioned network connection links are established between the above nodes of mainnet1 and the nodes nodeA1, nodeB1 and nodeC1 in subnet1, respectively. Therefore, the independent blockchain network mainnet1 and the blockchain subnet subnet1 can achieve cross-chain interaction based on the above network connection links. Similarly, the independent blockchain network mainnet1 and the blockchain subnet subnet2 and the blockchain mainnet0 can also achieve cross-chain interaction based on the corresponding network connection links. It is also worth noting that even if the node devices of each node of any two blockchain networks are not exactly the same or even completely different, cross-chain interaction between the two blockchain networks can still be achieved based on the inter-device network connection between the node devices where each node is located and other node devices. The specific process will not be repeated here.

[0069] As mentioned above, multiple blockchain nodes belonging to different blockchain networks can be deployed in the same node device. In the process of realizing functions such as message consensus and contract execution, any blockchain network may create and maintain corresponding accounts. The account data of these accounts are usually recorded in the database by the node device. In other words, the node device will maintain the account system of the blockchain network to which each blockchain node belongs.

[0070] In the above scenario, in order to manage and utilize the relevant accounts and their account data in the blockchain network, the node device and the blockchain nodes deployed therein need to record the account data of the blockchain accounts in each blockchain network through the database and perform read and write operations on it. In the process of recording account data and performing read and write operations, how to effectively isolate the account data corresponding to different blockchain nodes in the same node device is an urgent problem to be solved.

[0071] To this end, this specification proposes a method for reading and writing account data. For multiple blockchain nodes that belong to different blockchain networks and are deployed in a node device, the node device maintains an independent database corresponding to each blockchain node, and uses each independent database to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. Then, based on the data recording method, the corresponding account data is read and written in response to the read and write request for the target account. The following is an explanation of the creation scheme of the blockchain subnet of this specification in conjunction with the accompanying drawings.

[0072] Figure 6 FIG. 1 is a flowchart of a method for reading and writing account data provided by an exemplary embodiment. Figure 6 As shown, the method is applied to a first blockchain node in a first blockchain network, and the node device where the first blockchain node is located also has blockchain nodes of other blockchain networks deployed therein, and the node device maintains independent databases corresponding to each blockchain node, respectively, and the independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs, and the method includes the following steps:

[0073] Step 602: Obtain a read / write request for the target account.

[0074] As mentioned above, multiple blockchain nodes are deployed in the node device described in this specification, and each blockchain node belongs to a different blockchain network. In addition, the node device maintains an independent database corresponding to each blockchain node. The independent database corresponding to any blockchain node is used to record the account data of the independent account in the blockchain network to which the node belongs. Among them, the first blockchain node can be any of the multiple blockchain nodes deployed in the node device. Obviously, the first blockchain network to which the node belongs is any of the multiple blockchain networks mentioned above. In addition, the blockchain network to which each blockchain node deployed in the node device described in this specification belongs can follow the aforementioned multi-level tree structure. For example, the first blockchain network can be any of the blockchain networks, that is, the first blockchain network can be any blockchain subnet or blockchain main network in the multi-level tree structure.

[0075] The independent account in the first blockchain network is a blockchain account used only for the network. The account data of the blockchain account is only recorded in the independent database corresponding to the first blockchain network, and will not be recorded in other databases. In one embodiment, in addition to independent accounts, the first blockchain network may also include public accounts, that is, the blockchain accounts in the first blockchain network may include two categories: independent accounts and public accounts; accordingly, any blockchain account in the first blockchain network may be an independent account or a public account. Among them, the above-mentioned public account may be a blockchain account shared by the first blockchain network and the second blockchain network (at least one blockchain network in other blockchain networks except the first blockchain network). The account data of such accounts can be stored in the public database maintained by the node device. For the public account and the public database, please refer to the detailed records of the following embodiments, which will not be repeated here.

[0076] In this embodiment, the above-mentioned read and write request for the target account is used to trigger the read and write operation of the account data of the target account, which can be a data read operation or a data write operation. Among them, the read and write request can include the network identifier of the blockchain network to which the target account belongs (hereinafter referred to as the target blockchain network), so that the first blockchain node can determine which blockchain network needs to respond to the request; the read and write request can also include the account address and / or public key of the target account and other identity information, so that the first blockchain node can determine which account the target account is; the read and write request can also include the operation information of the read and write operation for the target account, such as the data identifier of the data to be read, the data to be written, etc., so that the first blockchain node can perform the corresponding read and write operation accordingly. It is worth noting that from the perspective of the underlying operation of the database, the above-mentioned data read operation can correspond to the reading behavior of the data, and the above-mentioned data write operation can correspond to the adding, deleting and modifying behavior of the data.

[0077] In addition, the first blockchain node can obtain the read and write request in a variety of ways. For example, the first blockchain node can receive the read and write request obtained and sent by the node device; for another example, the first blockchain node can also receive the read and write request sent by other blockchain nodes deployed in the node device (such as blockchain nodes in the first blockchain network or other blockchain networks); in these two acquisition methods, the read and write request can be a blockchain transaction or a non-transactional blockchain message. For another example, the first blockchain node can also generate the above-mentioned read and write request in the process of executing a blockchain transaction. At this time, the request can be a non-transactional blockchain message, and the embodiments of this specification do not limit this.

[0078] Typically, accounts in a blockchain network may include external accounts and contract accounts, wherein external accounts may be controlled by corresponding public-private key pairs, and contract accounts may be created by smart contracts and controlled by corresponding contract codes. Any independent account in the first blockchain network may be an external account or a contract account, so the target account described in this specification may be both an external account and a contract account. Of course, in the case where there are multiple target accounts, the multiple target accounts may be multiple external accounts, multiple contract accounts, or at least one external account and at least one contract account. The embodiments of this specification are only described for any one of these accounts.

[0079] Step 604, when the account data of the target account is recorded in the independent database corresponding to the first blockchain network, determine the independent database corresponding to the first blockchain network on the node device.

[0080] In response to the acquired read / write request, the first blockchain node may first determine whether the account data of the target account is recorded in the independent database corresponding to the first blockchain network to which it belongs. For example, in the case where the first blockchain node maintains the account addresses of each blockchain account in the first blockchain network, the first blockchain node may determine whether the target account is a blockchain account maintained by itself based on the account address of the target account carried in the read / write request: if the account address of any blockchain account maintained by itself is the same as the account address of the target account, the blockchain account may be determined as the target account; conversely, if the account addresses of each blockchain account maintained by itself are different from the account address of the target account, it may be determined that the target account does not belong to the first blockchain network, and thus the response process to the read / write request may be terminated.

[0081] When it is determined that the target account is maintained by itself, the first blockchain node can determine the independent database corresponding to the first blockchain network based on the correspondence between the network identifier of the first blockchain network and the independent database.

[0082] Step 606: search the target account from the determined independent database and perform read and write operations on the account data of the target account.

[0083] After determining the independent database corresponding to the first blockchain network on the node device, the first blockchain node can search for the target account from the independent database and perform read and write operations on its account data.

[0084] Through the above scheme, for multiple blockchain nodes belonging to different blockchain networks deployed in the node device, the node device maintains an independent database corresponding to each blockchain node, and each independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. Based on this recording method of account data, for the read and write request for the target account obtained, the first blockchain node can determine the independent database when the account data of the target account is recorded in the independent database corresponding to the first blockchain network, and then find the target account from the determined independent database and perform read and write operations on its account data. In this way, the node device can save the account data of the target account in different blockchain networks in different independent databases, and can respond to the read and write request, only for the account data in the independent database that records the account data of the target account, and will not operate other independent databases, avoiding the change of the account data of the target account belonging to other blockchain networks recorded in other independent databases, thereby effectively isolating the account data corresponding to different blockchain nodes in the same node device.

[0085] In one embodiment, the above-mentioned read and write request may be a blockchain transaction containing the account address of the target account. The first blockchain node may determine the independent database and perform the read and write operation in a corresponding manner according to the recording method of the account address in the blockchain transaction. As an exemplary embodiment, the account address of the target account may be included in the from field of the blockchain transaction. The recording method indicates that the above-mentioned blockchain transaction is initiated by the target account, so that the first blockchain node can find the target account in the independent database corresponding to the first blockchain network according to the account address, and read the recorded account public key from the found target account. It can be seen that the read and write operation performed by the first blockchain node is to read the account public key of the target account from the target account, that is, the read and write operation is a data reading operation. Among them, the account public key of the target account read in the above manner can be used to verify the transaction signature of the blockchain transaction (that is, verify the transaction signature added by the target account for the transaction). If the verification is passed, the first blockchain node can submit the transaction to the first blockchain network to participate in the consensus or directly execute the transaction; if the verification fails, the first blockchain node can terminate the response process for the transaction, and can record, warn, etc. for the illegal transaction. In this way, the first blockchain node can read the account public key of an independent account from an independent database that records the account data of the target account in response to a read or write request, and verify the blockchain transaction initiated by the target account based on the public key, thereby helping to ensure the legitimacy and reliability of the blockchain transaction responded by the first blockchain node.

[0086] As another exemplary embodiment, the account address of the target account may be included in the to field of the blockchain transaction, and the data field of the transaction may also include input parameter information. The above-mentioned recording method of the account address of the target account indicates that the blockchain transaction is initiated by other accounts to the target account, so that the first blockchain node can search for the target account in the independent database corresponding to the first blockchain network according to the account address, and perform read and write operations on the account data of the found target account according to the input parameter information. Among them, the read and write operation performed by the first blockchain node can be a data reading operation, in which case the input parameter information can be the data reading method or the data identifier of the data to be read, the account balance and other information; or, the read and write operation performed by the first blockchain node can also be a data writing operation, in which case the input parameter information can be the data to be written. In this way, the first blockchain node can perform read and write operations on the account data of the target account according to the input parameter information in response to the read and write request, thereby completing the execution process of the above-mentioned blockchain transaction.

[0087] As mentioned above, for the above-mentioned read and write requests obtained by the first blockchain node, the account data of the corresponding target account may be recorded in the independent database corresponding to the first blockchain network, or may be recorded in the independent database corresponding to other blockchain networks. Based on this, when it is determined that the account data of the target account is not recorded in the independent database corresponding to the first blockchain network, the first blockchain node can pass the read and write request to the node device, so that the node device can determine the independent database that records the account data of the target account from other independent databases maintained by itself, and submit the request to the blockchain network corresponding to the determined independent database. It can be understood that the node device can access any locally deployed database, so the node device can access the independent database corresponding to the first blockchain network and the independent databases corresponding to other blockchain networks.

[0088] Based on this, when the first blockchain node determines that the account data of the target account is not recorded in the independent database corresponding to itself (that is, the target blockchain network is not the first blockchain network), the request can be transparently transmitted to the node device, so that the node device can determine the target blockchain network from other blockchain networks and submit the request to the determined target blockchain network. Of course, after the node device submits the read and write request to the target blockchain network, the blockchain node belonging to the network deployed in the node device can also respond to the request and perform read and write operations on the account data of the target account recorded in the independent database corresponding to the network. The specific process is similar to the execution process of the first blockchain node and will not be repeated. In this way, by utilizing the characteristic that the node device can access any locally deployed database, when the account data of the target account is not recorded in the independent database corresponding to the first blockchain network, an effective response to the read and write request can still be achieved.

[0089] As mentioned above, in addition to maintaining an independent database, a public database can also be maintained in the node device to record the account data of the public account between the first blockchain network and the second blockchain network. Among them, multiple public databases can be maintained in the same node device, and any public database can be used to record the account data of the public account between at least two blockchains; or, only one public database can be maintained in the same node device, and the public database can record the account data of the public account between any multiple blockchains, and in order to avoid confusion between any public account and its corresponding blockchain network, the account data of each public account can be added with a corresponding network identifier to indicate which blockchain networks each account can be shared by. The public database described in the embodiment of this specification can be any public database maintained by the node device, and any public account recorded in the database can be jointly managed by each blockchain network corresponding to the account, and accordingly, the blockchain nodes of each blockchain network corresponding to the account deployed in the node device can perform read and write operations respectively.

[0090] like Figure 4 As shown, public databases D1 and D2 can be deployed in node device A, wherein public database D1 can be used to record account data of public accounts between subnet1 and subnet2, and public database D2 can be used to record account data of public accounts between mainnet0, subnet1 and subnet2. Of course, other public databases can also be deployed to record account data of public accounts between subnet1 and subnet2, account data of public accounts between subnet2 and subnet1.1, etc. Alternatively, when any node in mainnet1 (such as nodeF) is deployed in node device A, other public databases can also be deployed to record account data of public accounts between mainnet0 and mainnet1, account data of public accounts between mainnet1subnet1 and subnet2, etc., which will not be described one by one. Alternatively, a public database D can also be deployed in node device A, wherein the public database D can be used to record Figure 1The account data of the public accounts between any multiple networks shown in the figure can record the account data of the public accounts between subnet1 and subnet2, and the network identifiers of the two networks can be added to this part of the account data to indicate that this part of the account data is jointly managed by subnet1 and subnet2; the public database D can also record the account data of the public accounts between mainnet0, subnet1 and subnet2, and the network identifiers of the three networks can be added to this part of the account data to indicate that this part of the account data is jointly managed by mainnet0, subnet1 and subnet2, which will not be repeated here.

[0091] It is worth noting that for the account data of the public accounts between multiple blockchain networks recorded in any public database, the blockchain nodes of any blockchain network in the multiple blockchain networks can perform read and write operations on the account data. Among them, in the case of performing a write operation, the new data written can be read by the blockchain nodes of any blockchain network in the multiple blockchain networks, and of course, it can also be changed by rewriting other data by the blockchain nodes of any blockchain network in the multiple blockchain networks, which will not be repeated.

[0092] It can be seen that each independent database maintained in the node device is only used to record the account data of the independent account in the blockchain network to which the corresponding blockchain node belongs, and the public database maintained in the node device is used to record the account data of the public account between the first blockchain network and the second blockchain network. In this scenario, the first blockchain node can perform read and write operations according to the account type of the target account. For example, when the account type of the target account is an independent account, the first blockchain node can search for the target account from the independent database corresponding to the first blockchain node, and perform read and write operations on the account data of the target account in the independent database; and when the account type of the target account is a public account, the first blockchain node can search for the target account from the public database, and perform read and write operations on the account data of the target account in the public database.

[0093] For example, when it is determined that the target account is indeed maintained by itself, the first blockchain node can perform read and write operations according to the account type of the target account: if the account type of the target account is an independent account, the first blockchain node can determine that the account data of the target account is stored in the independent database corresponding to the first blockchain network on the node device, so the independent database can be further determined for read and write operations. Conversely, if the account type of the target account is a public account, the first blockchain node can determine a public database for recording the account data of the public account in the first blockchain network, and perform read and write operations on the account data of the target account in the database. The specific process can be referred to the records of the subsequent embodiments, which will not be repeated here.

[0094] Among them, in the case where the read / write request is a blockchain transaction, the transaction may include an account type field to characterize the account type of the target account. For example, the account type field may be part of the data field of the blockchain transaction, that is, the account type of the target account is recorded in the data field of the blockchain transaction. Thus, the first blockchain node can determine the account type of the target account based on the field value of the above account type field. In this way, the initiator of the blockchain transaction can directly specify the account type of the target account to be operated, so that the first blockchain node can quickly perform read and write operations on the account data of the target account according to the account type, which helps to reduce the data maintenance of the first blockchain node and improve the response efficiency of read and write requests.

[0095] In fact, the account data of the above-mentioned target account may not only not be recorded in the independent database corresponding to the first blockchain network, but also not be recorded in the public database. In this case, the characteristic that the node device can access any database deployed locally can also be used to achieve effective response to read and write requests. For example, the first blockchain node can transparently transmit the read and write request to the node device, so that the node device determines the independent database recording the account data of the target account from other independent databases maintained by itself, and submits the read and write request to the blockchain network corresponding to the determined independent database. Based on this, when the first blockchain node determines that the account data of the target account is neither recorded in the independent database corresponding to itself nor in the aforementioned public database, the request can be transparently transmitted to the node device, so that the node device can determine the target blockchain network from other blockchain networks and submit the request to the corresponding blockchain network. In this way, by utilizing the characteristic that the node device can access any database deployed locally, when the account data of the target account is not recorded in the independent database and the second database corresponding to the first blockchain network, an effective response to the read and write request can still be achieved.

[0096] As mentioned above, when the account data of the target account is not recorded in the independent database corresponding to the first blockchain network, or is not recorded in the independent database corresponding to the first blockchain network and the public database, the node device can determine the independent database recording the account data of the target account from the independent databases corresponding to other blockchain networks outside the first blockchain network, wherein the node device can determine the independent database in a variety of ways. For example, based on the node device being able to access any database maintained by itself, the node device can determine the independent database recording the account data of the target account from all independent databases maintained by itself. For another example, considering that the first blockchain node in the first blockchain network performs the read and write operation in response to the above-mentioned read and write request, the node device can determine the independent data recording the account data of the target account from the independent databases corresponding to other blockchain networks when the first blockchain network has access rights to the independent databases corresponding to other blockchain networks. The independent database determined in this way records the account data of the target account, the first blockchain network has access rights to the database, and the first blockchain node in the first blockchain network naturally also has access rights, so the first blockchain node can perform read and write operations on the account data in the database based on the access rights. For the independent database, the first blockchain node that performs read and write operations on the account data recorded therein has legal access rights, thereby ensuring the legality of the read and write operations performed. In addition, the first blockchain network may only have access rights to some independent databases deployed in the node devices. Therefore, in order to improve the efficiency of determining the independent database that records the account data of the target account, the node device can first determine some independent databases that the first blockchain network has access rights to, and then determine the independent database that records the account data of the target account from these databases.

[0097] Specifically, the node device can maintain the network identifier of the blockchain network to which each locally deployed blockchain node belongs, so that it can determine which network among the blockchain networks to which each locally deployed blockchain node belongs is the target blockchain network based on the network identifier of the target blockchain network contained in the read and write requests. The database corresponding to the target blockchain network can serve as an independent database for recording the account data of the target account.

[0098] Furthermore, the blockchain networks to which the multiple blockchain nodes deployed on the node device belong can constitute a multi-level blockchain system, in which any blockchain network can be managed by the parent blockchain network in the multi-level blockchain system. The independent database corresponding to the first blockchain node can inherit and maintain a copy of the account data of the target account in its parent blockchain network. The multi-level blockchain system can be as follows: Figure 4 The multi-level tree structure shown below is combined with Figure 5The node device A shown is used for explanation: Let’s assume that the first blockchain network is subnet1 and the parent blockchain network is mainnet0. When node device A participates in creating subnet1 based on mainnet0, it can first determine the account to be inherited from all blockchain accounts of mainnet0, and then read the account data of the account to be inherited from independent database 0, and write this part of data into the independent database 1 corresponding to the newly created subnet1, thereby forming a copy of the account data of the account to be inherited in the database.

[0099] It can be understood that the copy of the account data stored in the above-mentioned independent database 1 is only the account data recorded in mainnet0 at the time of creation of subnet1 (i.e., the time when the account data of the account to be inherited is read from independent database 0), that is, the data copy can be considered as a "snapshot" of the account data stored in independent database 1 at the above-mentioned creation time. After the creation of subnet1 is completed, the account data recorded in independent database 0 can be updated as mainnet0 runs, and the copy of the account data recorded in independent database 1 can be updated as subnet1 runs, and the update process of the two is independent of each other. Of course, the node device can also only create each account to be inherited in the independent database 1 corresponding to the newly created subnet1, without copying the copy of the corresponding account data, so as to only save the account data generated by the subnet1 running node in the independent database 1. Through the above method, the first blockchain network can inherit the original target account from its parent blockchain network, or inherit the original target account and its account data, so that users do not need to repeatedly create accounts that already exist in mainnet0 in the newly created subnet1, and each node in subnet1 does not need to obtain account data from other blockchain networks, thereby simplifying the creation process of the new network and helping to improve creation efficiency.

[0100] Alternatively, the first blockchain node may also have access to the independent database corresponding to its parent blockchain network. Figure 4 and Figure 5For example, let's assume that the first blockchain network is subnet1, the parent blockchain network is mainnet0, and nodeA1 in subnet1 is the first blockchain node. The first blockchain node can have access rights to the independent database 0 corresponding to mainnet0. In order to ensure the security of the account data recorded in the independent database of the parent blockchain network as much as possible, only some nodes may have access rights to the independent database 0, such as the master node of subnet1 has this access right, while other nodes do not have this access right. Among them, the above-mentioned first blockchain node is a node with access rights to the independent database corresponding to the parent blockchain network. Of course, any node in mainnet0 can also have access rights to the independent database 1 corresponding to subnet1, which will not be repeated.

[0101] Based on the description of the above embodiments, this specification also proposes another method for reading and writing account data. Figure 7 As shown, the method is applied to a node device, in which a plurality of blockchain nodes belonging to different blockchain networks are deployed, and the node device maintains an independent database corresponding to each blockchain node, and the independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. The method includes the following steps:

[0102] Step 702: Obtain a read / write request for the target account.

[0103] Step 704, when the account data of the target account is recorded in an independent database corresponding to the first blockchain network, determine the independent database corresponding to the first blockchain network on the node device, where the first blockchain network is a blockchain network to which any blockchain node among the multiple blockchain nodes belongs.

[0104] Step 706: search the target account from the determined independent database and perform read and write operations on the account data of the target account.

[0105] In one embodiment, it further includes:

[0106] Receiving an assistance request transparently transmitted by a first blockchain node in a first blockchain network, wherein the assistance request is transparently transmitted by the first blockchain node when account data of the target account is not recorded in an independent database corresponding to the first blockchain network;

[0107] An independent database recording the account data of the target account is determined from other independent databases maintained by the independent database, and the assistance request is submitted to the blockchain network corresponding to the determined independent database.

[0108] In one embodiment, the node device further maintains a public database, and the public database is used to record account data of public accounts between the first blockchain network and the second blockchain network;

[0109] The performing a read and write operation on the account data of the target account includes: when the account type of the target account is an independent account, performing a read and write operation on the account data of the target account;

[0110] The method further includes: when the account type of the target account is a public account, searching the target account from the public database and performing read and write operations on the account data of the target account.

[0111] In one embodiment, it further includes:

[0112] Receiving an assistance request transparently transmitted by a first blockchain node in a first blockchain network, wherein the assistance request is transparently transmitted by the first blockchain node when the account data of the target account is not recorded in the independent database corresponding to the first blockchain network and the public database;

[0113] An independent database recording the account data of the target account is determined from other independent databases maintained by the independent database, and the assistance request is submitted to the blockchain network corresponding to the determined independent database.

[0114] In one embodiment, determining the independent database recording the account data of the target account from other independent databases maintained by the independent database includes:

[0115] Determine an independent database recording the account data of the target account from other independent databases maintained by the node device; or,

[0116] In a case where the first blockchain network has access permissions to other independent databases corresponding to other blockchain networks, an independent database recording the account data of the target account is determined from the other independent databases.

[0117] In one embodiment, the blockchain networks to which the multiple blockchain nodes deployed on the node device belong respectively constitute a multi-level blockchain system, and any blockchain network is managed by the parent blockchain network in the multi-level blockchain system; wherein:

[0118] The independent database corresponding to the first blockchain node inherits and maintains a copy of the account data of the target account in its parent blockchain network; or,

[0119] The first blockchain node has access rights to the independent database corresponding to its parent blockchain network.

[0120] In one embodiment, the target account includes: an external account and / or a contract account.

[0121] In the above scheme, for multiple blockchain nodes belonging to different blockchain networks deployed in the node device, the node device maintains an independent database corresponding to each blockchain node, and each independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. Based on this recording method of account data, for the read and write request for the target account obtained, the node device can determine the independent database when the account data of the target account is recorded in the independent database corresponding to the first blockchain network, and then search the target account from the determined independent database and perform read and write operations on its account data. In this way, the node device can save the account data of the target account in different blockchain networks in different independent databases, and can respond to the read and write request, only perform read and write operations on the account data in the independent database that records the account data of the target account, and will not operate other independent databases, avoiding changes to the account data of the target account belonging to other blockchain networks recorded in other independent databases, thereby effectively isolating the account data corresponding to different blockchain nodes in the same node device.

[0122] Figure 8 This is a schematic diagram of a device structure provided by an exemplary embodiment. Figure 8 At the hardware level, the device includes a processor 802, an internal bus 804, a network interface 806, a memory 808, and a non-volatile memory 810, and may also include hardware required for other services. One or more embodiments of this specification may be implemented based on software, such as the processor 802 reading the corresponding computer program from the non-volatile memory 810 into the memory 808 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0123] Fig. 9 This is a block diagram of an account data reading and writing device provided by an exemplary embodiment. Fig. 9 , the device can be applied to Figure 8The device shown in the figure is used to implement the technical solution of this specification. The account data reading and writing device is applied to the first blockchain node in the first blockchain network, and the node device where the first blockchain node is located also deploys blockchain nodes of other blockchain networks, and the node device maintains independent databases corresponding to each blockchain node, and the independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. The device includes:

[0124] The request acquisition module 901 is used to acquire a read and write request for a target account;

[0125] A database determination module 902 is used to determine the independent database corresponding to the first blockchain network on the node device when the account data of the target account is recorded in the independent database corresponding to the first blockchain network;

[0126] The first read-write module 903 is used to search for the target account from the determined independent database and perform read-write operations on the account data of the target account.

[0127] Optionally, the read / write request is a blockchain transaction, and the from field of the blockchain transaction includes the account address of the target account; the first read / write module 903 is further used to:

[0128] The target account is searched in an independent database corresponding to the first blockchain network according to the account address, and the recorded account public key is read from the found target account, where the account public key is used to verify the transaction signature of the blockchain transaction.

[0129] Optionally, the data read / write request is a blockchain transaction, the to field of the blockchain transaction includes the account address of the target account, and the data field of the blockchain transaction includes input parameter information; the first read / write module 903 is further used to:

[0130] Searching for the target account in an independent database corresponding to the first blockchain network according to the account address;

[0131] Perform read and write operations on the account data of the target account found according to the input parameter information.

[0132] Optionally, the node device further maintains a public database, and the public database is used to record account data of public accounts between the first blockchain network and the second blockchain network;

[0133] The first read-write module 903 is further used to: when the account type of the target account is an independent account, perform a read-write operation on the account data of the target account;

[0134] The device further includes a second read-write module 904, which is used to search the target account from the public database and perform read-write operations on the account data of the target account when the account type of the target account is a public account.

[0135] Optionally, the data read / write request is a blockchain transaction, and the blockchain transaction includes an account type field, and the device further includes:

[0136] The type determination module 905 is used to determine the account type of the target account according to the field value of the account type field.

[0137] Optionally, also include:

[0138] The first transparent transmission module 906 is used to transparently transmit the read and write request to the node device when the account data of the target account is not recorded in the independent database corresponding to the first blockchain network and the public database, so that the node device determines the independent database that records the account data of the target account from other independent databases maintained by itself, and then submits the read and write request to the blockchain network corresponding to the determined independent database.

[0139] Optionally, also include:

[0140] The second transparent transmission module 907 is used to transparently transmit the read and write request to the node device when the account data of the target account is not recorded in the independent database corresponding to the first blockchain network, so that the node device determines the independent database that records the account data of the target account from other independent databases maintained by itself, and then submits the read and write request to the blockchain network corresponding to the determined independent database.

[0141] Optionally, the node device determines an independent database recording the account data of the target account from other independent databases maintained by the node device, including:

[0142] Determine an independent database recording the account data of the target account from all independent databases maintained by the node device; or,

[0143] In the case where the first blockchain network has access permissions to independent databases corresponding to other blockchain networks, an independent database recording the account data of the target account is determined from the independent databases corresponding to other blockchain networks.

[0144] Optionally, the blockchain networks to which the multiple blockchain nodes deployed on the node device belong respectively constitute a multi-level blockchain system, and any blockchain network is managed by a parent blockchain network in the multi-level blockchain system; wherein:

[0145] The independent database corresponding to the first blockchain node inherits and maintains a copy of the account data of the target account in its parent blockchain network; or,

[0146] The first blockchain node has access rights to the independent database corresponding to its parent blockchain network.

[0147] Optionally, the target account includes: an external account and / or a contract account.

[0148] Fig.10 This is a block diagram of an account data reading and writing device provided by an exemplary embodiment. Fig.10 , the device can be applied to Figure 8 The device shown in the figure is used to implement the technical solution of this specification. The reading and writing device of the account data is applied to a node device, in which a plurality of blockchain nodes belonging to different blockchain networks are deployed, and the node device maintains an independent database corresponding to each blockchain node, and the independent database is used to record the account data of the target account in the blockchain network to which the corresponding blockchain node belongs. The device includes:

[0149] The request acquisition module 1001 is used to acquire a read and write request for a target account;

[0150] A database determination module 1002 is used to determine an independent database corresponding to the first blockchain network on the node device when the account data of the target account is recorded in an independent database corresponding to the first blockchain network, wherein the first blockchain network is a blockchain network to which any blockchain node among the multiple blockchain nodes belongs;

[0151] The first read-write module 1003 is used to search for the target account from the determined independent database and perform read-write operations on the account data of the target account.

[0152] Optionally, also include:

[0153] A first assistance request receiving module 1004 is used to receive an assistance request transparently transmitted by a first blockchain node in a first blockchain network, wherein the assistance request is transparently transmitted by the first blockchain node when the account data of the target account is not recorded in an independent database corresponding to the first blockchain network;

[0154] The first assistance request submission module 1005 is used to determine an independent database that records the account data of the target account from other independent databases maintained by itself, and submit the assistance request to the blockchain network corresponding to the determined independent database.

[0155] Optionally, the node device further maintains a public database, and the public database is used to record account data of public accounts between the first blockchain network and the second blockchain network;

[0156] The request acquisition module 1001 is further used to: when the account type of the target account is an independent account, perform a read and write operation on the account data of the target account;

[0157] The device further includes a second read-write module 1006, which is used to search the target account from the public database and perform read-write operations on the account data of the target account when the account type of the target account is a public account.

[0158] Optionally, also include:

[0159] A second assistance request receiving module 1007 is used to receive an assistance request transparently transmitted by a first blockchain node in the first blockchain network, wherein the assistance request is transparently transmitted by the first blockchain node when the account data of the target account is not recorded in the independent database corresponding to the first blockchain network and the public database;

[0160] The second assistance request submission module 1008 is used to determine an independent database that records the account data of the target account from other independent databases maintained by itself, and submit the assistance request to the blockchain network corresponding to the determined independent database.

[0161] Optionally, the first assistance request submitting module or the second assistance request submitting module is further configured to:

[0162] Determine an independent database recording the account data of the target account from all independent databases maintained by the node device; or,

[0163] In a case where the first blockchain network has access permissions to other independent databases corresponding to other blockchain networks, an independent database recording the account data of the target account is determined from the other independent databases.

[0164] Optionally, the blockchain networks to which the multiple blockchain nodes deployed on the node device belong respectively constitute a multi-level blockchain system, and any blockchain network is managed by a parent blockchain network in the multi-level blockchain system; wherein:

[0165] The independent database corresponding to the first blockchain node inherits and maintains a copy of the account data of the target account in its parent blockchain network; or,

[0166] The first blockchain node has access rights to the independent database corresponding to its parent blockchain network.

[0167] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0168] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0169] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0170] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0171] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media including storage devices.

[0172] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0173] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 In a typical configuration, a computer includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0174] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0175] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage, quantum memory, graphene-based storage media or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0176] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0177] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0178] The terms used in one or more embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of this specification. The singular forms of "a", "said" and "the" used in one or more embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0179] It should be understood that although the terms first, second, third, etc. may be used to describe various information in one or more embodiments of this specification, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of this specification, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0180] The above description is merely a preferred embodiment of one or more embodiments of the present specification and is not intended to limit one or more embodiments of the present specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of one or more embodiments of the present specification shall be included in the scope of protection of one or more embodiments of the present specification.

Claims

1. A method for reading and writing account data, applied to a first blockchain node in a first blockchain network, wherein the node device where the first blockchain node is located also has blockchain nodes of other blockchain networks deployed therein, and the node device maintains independent databases corresponding to each blockchain node, wherein the independent database corresponding to any blockchain node is used to record the account data of an independent account in the blockchain network to which the blockchain node belongs, and the independent account is a blockchain account that only belongs to the blockchain network to which the blockchain node belongs; the method comprises: Get read and write requests for the target account; In a case where the account data of the target account is recorded in an independent database corresponding to the first blockchain network, determining an independent database corresponding to the first blockchain network on the node device; The target account is searched from the determined independent database and the account data of the target account is read and written.

2. According to the method of claim 1, the read / write request is a blockchain transaction, and the from field of the blockchain transaction contains the account address of the target account; searching the target account from the determined independent database and performing read / write operations on the account data of the target account comprises: The target account is searched in an independent database corresponding to the first blockchain network according to the account address, and the recorded account public key is read from the found target account, where the account public key is used to verify the transaction signature of the blockchain transaction.

3. According to the method of claim 1, the data read and write request is a blockchain transaction, the to field of the blockchain transaction includes the account address of the target account, and the data field of the blockchain transaction includes input parameter information; The step of searching the target account from the determined independent database and performing a read and write operation on the account data of the target account includes: Searching for the target account in an independent database corresponding to the first blockchain network according to the account address; Perform read and write operations on the account data of the target account found according to the input parameter information.

4. According to the method of claim 1, the node device further maintains a public database, and the public database is used to record account data of the public account between the first blockchain network and the second blockchain network; The performing a read and write operation on the account data of the target account includes: When the account type of the target account is an independent account, performing a read and write operation on the account data of the target account; The method further includes: when the account type of the target account is a public account, searching the target account from the public database and performing read and write operations on the account data of the target account.

5. According to the method of claim 4, the data read and write request is a blockchain transaction, and the blockchain transaction includes an account type field, and the method further includes: The account type of the target account is determined according to the field value of the account type field.

6. The method according to claim 4, further comprising: In the case where the account data of the target account is not recorded in the independent database corresponding to the first blockchain network and the public database, the read / write request is transparently transmitted to the node device, so that the node device determines the independent database that records the account data of the target account from other independent databases maintained by itself, and then submits the read / write request to the blockchain network corresponding to the determined independent database.

7. The method according to claim 1, further comprising: In the case where the account data of the target account is not recorded in the independent database corresponding to the first blockchain network, the read / write request is transparently transmitted to the node device, so that the node device determines the independent database that records the account data of the target account from other independent databases maintained by itself, and then submits the read / write request to the blockchain network corresponding to the determined independent database.

8. The method according to claim 6 or 7, wherein the node device determines the independent database recording the account data of the target account from other independent databases maintained by the node device, comprising: Determining an independent database recording the account data of the target account from all independent databases maintained by the node device; or, In the case where the first blockchain network has access permissions to independent databases corresponding to other blockchain networks, an independent database recording the account data of the target account is determined from the independent databases corresponding to other blockchain networks.

9. According to the method of claim 8, the blockchain networks to which the multiple blockchain nodes deployed on the node devices belong respectively constitute a multi-level blockchain system, and any blockchain network is managed by the parent blockchain network in the multi-level blockchain system; wherein: The independent database corresponding to the first blockchain node inherits and maintains a copy of the account data of the target account in its parent blockchain network; or, The first blockchain node has access rights to the independent database corresponding to its parent blockchain network.

10. The method according to claim 1, wherein the target account comprises: External accounts and / or contract accounts.

11. A method for reading and writing account data, applied to a node device, wherein the node device is deployed with multiple blockchain nodes belonging to different blockchain networks, and the node device maintains independent databases corresponding to each blockchain node, wherein the independent database corresponding to any blockchain node is used to record the account data of an independent account in the blockchain network to which the blockchain node belongs, and the independent account is a blockchain account that only belongs to the blockchain network to which the blockchain node belongs; the method comprises: Get read and write requests for the target account; In a case where the account data of the target account is recorded in an independent database corresponding to a first blockchain network, determining an independent database corresponding to the first blockchain network on the node device, wherein the first blockchain network is a blockchain network to which any blockchain node among the multiple blockchain nodes belongs; The target account is searched from the determined independent database and the account data of the target account is read and written.

12. The method according to claim 11, further comprising: Receiving an assistance request transparently transmitted by a first blockchain node in a first blockchain network, wherein the assistance request is transparently transmitted by the first blockchain node when account data of the target account is not recorded in an independent database corresponding to the first blockchain network; An independent database recording the account data of the target account is determined from other independent databases maintained by the independent database, and the assistance request is submitted to the blockchain network corresponding to the determined independent database.

13. According to the method of claim 11, the node device further maintains a public database, and the public database is used to record account data of public accounts between the first blockchain network and the second blockchain network; The performing a read and write operation on the account data of the target account includes: When the account type of the target account is an independent account, performing a read and write operation on the account data of the target account; The method further includes: when the account type of the target account is a public account, searching the target account from the public database and performing read and write operations on the account data of the target account.

14. The method according to claim 13, further comprising: Receiving an assistance request transparently transmitted by a first blockchain node in a first blockchain network, wherein the assistance request is transparently transmitted by the first blockchain node when the account data of the target account is not recorded in the independent database corresponding to the first blockchain network and the public database; An independent database recording the account data of the target account is determined from other independent databases maintained by the independent database, and the assistance request is submitted to the blockchain network corresponding to the determined independent database.

15. The method according to claim 12 or 14, wherein determining the independent database recording the account data of the target account from other independent databases maintained by the independent database comprises: Determine an independent database recording the account data of the target account from other independent databases maintained by the node device; or, In a case where the first blockchain network has access permissions to other independent databases corresponding to other blockchain networks, an independent database recording the account data of the target account is determined from the other independent databases.

16. According to the method of claim 15, the blockchain networks to which the multiple blockchain nodes deployed on the node devices belong respectively constitute a multi-level blockchain system, and any blockchain network is managed by the parent blockchain network in the multi-level blockchain system; wherein: The independent database corresponding to the first blockchain node inherits and maintains a copy of the account data of the target account in its parent blockchain network; or, The first blockchain node has access rights to the independent database corresponding to its parent blockchain network.

17. The method according to claim 11, wherein the target account comprises: External accounts and / or contract accounts.

18. A device for reading and writing account data, applied to a first blockchain node in a first blockchain network, wherein the node device where the first blockchain node is located also deploys blockchain nodes of other blockchain networks, and the node device maintains independent databases corresponding to each blockchain node, wherein the independent database corresponding to any blockchain node is used to record the account data of an independent account in the blockchain network to which the blockchain node belongs, and the independent account is a blockchain account that only belongs to the blockchain network to which the blockchain node belongs; the device comprises: The request acquisition module is used to obtain read and write requests for the target account; A database determination module, configured to determine, when the account data of the target account is recorded in an independent database corresponding to the first blockchain network, an independent database corresponding to the first blockchain network on the node device; The first read-write module is used to search the target account from the determined independent database and perform read-write operations on the account data of the target account.

19. A device for reading and writing account data, applied to a node device, wherein the node device is deployed with a plurality of blockchain nodes belonging to different blockchain networks, and the node device maintains independent databases corresponding to each blockchain node, wherein the independent database corresponding to any blockchain node is used to record the account data of an independent account in the blockchain network to which the blockchain node belongs, and the independent account is a blockchain account that only belongs to the blockchain network to which the blockchain node belongs; the device comprises: The request acquisition module is used to obtain read and write requests for the target account; A database determination module, configured to determine, when the account data of the target account is recorded in an independent database corresponding to the first blockchain network, an independent database corresponding to the first blockchain network on the node device, wherein the first blockchain network is a blockchain network to which any blockchain node among the multiple blockchain nodes belongs; The first read-write module is used to search the target account from the determined independent database and perform read-write operations on the account data of the target account.

20. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 17 by running the executable instructions.

21. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 17.