CN115174599A - Method, device, equipment and medium for creating service filing node and processing data - Google Patents

Method, device, equipment and medium for creating service filing node and processing data Download PDF

Info

Publication number
CN115174599A
CN115174599A CN202210523933.3A CN202210523933A CN115174599A CN 115174599 A CN115174599 A CN 115174599A CN 202210523933 A CN202210523933 A CN 202210523933A CN 115174599 A CN115174599 A CN 115174599A
Authority
CN
China
Prior art keywords
account
blockchain
block chain
height
state information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210523933.3A
Other languages
Chinese (zh)
Inventor
陈敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Dazhi Robot Chengdu Co ltd
Original Assignee
Dazhi Robot Chengdu Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Dazhi Robot Chengdu Co ltd filed Critical Dazhi Robot Chengdu Co ltd
Priority to CN202210523933.3A priority Critical patent/CN115174599A/en
Publication of CN115174599A publication Critical patent/CN115174599A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks

Abstract

The embodiment of the application provides a method, a device, equipment and a medium for establishing a service filing node and processing data. In the embodiment of the application, a novel business filing node can be created in the block chain network, so that the inquiry requirement of some business scenes on account state data of each block chain account can be met, and because the business filing node is a lightweight filing node, the consumption of storage resources caused by the use of the filing node can be greatly reduced, and the storage cost is reduced.

Description

Method, device, equipment and medium for creating service filing node and processing data
Technical Field
The present application relates to the field of block chain technologies, and in particular, to a method, an apparatus, a device, and a medium for creating a service archiving node and processing data.
Background
The block chain network introduces different types of nodes such as a Full Node (Full Node) light Node (Lightweight Node) and an Archive Node (Archive Node) so as to meet different service requirements. Specifically, the full node has the following functions: and storing complete blockchain data, and confirming the validity of the transaction by the aid of independent verification. The light node has the following functions: the block header data is stored. The filing node has the following functions: all data remaining in the full node is stored, while additionally storing account status data for each blockchain account at each blockheight. Account status data includes, for example, but is not limited to: statement of account, balance, random number nounce, code hash, and storage root, among others.
In practical applications, a plurality of archive nodes are usually added to a blockchain network to satisfy the query requirements of some business scenarios on account status data of each blockchain account. However, the data storage capacity of the archiving nodes is large, and the more archiving nodes are added, the more storage resources are consumed, and the storage cost is higher. Therefore, on the premise of meeting the inquiry requirement of the account state data, how to reduce the consumption of storage resources becomes an urgent technical problem to be solved.
Disclosure of Invention
Aspects of the present application provide a method, an apparatus, a device, and a medium for creating a service archive node and processing data, so as to reduce consumption of storage resources on the premise of satisfying a query requirement of account status data.
The embodiment of the application provides a method for creating a service filing node, which comprises the following steps: determining at least one first blockchain account which is associated with the service requirement from all blockchain accounts on the blockchain network; controlling any blockchain node in the blockchain network to repeatedly execute the following steps so as to enable the blockchain node to be established as a service archiving node: in response to the current block height of the block chain, acquiring account state information of at least one first block chain account under the current block height; and saving the account state information of each first blockchain account under the current block height to a database.
An embodiment of the present application further provides a data processing method, including: responding to the current block height of the block chain, and acquiring account state information of at least one first block chain account under the current block height, wherein the first block chain account is a block chain account which is associated with a service requirement on a block chain network; and saving the account state information of each first blockchain account under the current block height to a database.
An embodiment of the present application further provides a device for creating a service archiving node, including: the system comprises a determining module, a determining module and a judging module, wherein the determining module is used for determining at least one first blockchain account which has relevance with a service requirement from all blockchain accounts on a blockchain network; the control module is used for controlling any block chain node in the block chain network to repeatedly execute the following steps so as to enable the block chain node to be established as a service archiving node: in response to the current block height of the block chain, acquiring account state information of at least one first block chain account under the current block height; and saving the account state information of each first blockchain account under the current block height to a database.
An embodiment of the present application further provides a data processing apparatus, including: the system comprises an acquisition module, a service module and a service module, wherein the acquisition module is used for responding to the current block height of a block chain, and acquiring account state information of at least one first block chain account under the current block height, and the first block chain account is a block chain account which is associated with a service requirement on a block chain network; and the storage module is used for storing the account state information of the at least one first block chain account under the current block height into the database.
An embodiment of the present application further provides a computer device, including: a memory and a processor; a memory for storing a computer program; a processor is coupled to the memory for executing a computer program for performing the steps in the traffic archiving node creation method or the data processing method.
Embodiments of the present application further provide a computer storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the steps in the service filing node creation method or the data processing method.
In the embodiment of the application, a novel business filing node can be created in the blockchain network, so that the inquiry requirements of some business scenes on account state data of each blockchain account can be met, and the consumption of storage resources caused by the use of the filing node can be greatly reduced and the storage cost is reduced because the business filing node is a lightweight filing node.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is an architecture diagram of a blockchain network provided in the present application;
fig. 2 is a flowchart of a method for creating a service archive node according to an embodiment of the present application;
FIG. 3 is an exemplary block corresponding state tree;
fig. 4 is a flowchart of a data processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a service archiving node creation apparatus according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
On the premise of meeting the inquiry requirement of account state data, how to reduce the consumption of storage resources becomes an urgent technical problem to be solved. Therefore, the embodiment of the application provides a method, a device, equipment and a medium for creating a service filing node and processing data. In the embodiment of the application, a novel business filing node can be created in the blockchain network, so that the inquiry requirements of some business scenes on account state data of each blockchain account can be met, and the consumption of storage resources caused by the use of the filing node can be greatly reduced and the storage cost is reduced because the business filing node is a lightweight filing node.
First, some terms related to embodiments of the present application are described:
a blockchain account: uniquely identifying the identity of the user in the blockchain network. Taking etherhouses as an example, the blockchain accounts can be divided into external accounts (external owned accounts) and contract accounts (contract accounts). The account status information of the external account includes, for example, but is not limited to: account identification (also known as account address), balance, and random number (nounce). The account status information of a contract account includes, for example, but is not limited to: account identification, balance, random number (nounce), code, and stub of the smart contract, etc.
And (3) a service filing node: refers to a block link node having a data storage capacity greater than a full node but less than an archive node. In the embodiment of the application, the business filing node additionally stores account state information of the blockchain account related to the business demand at each block height according to the business demand relative to the whole node. Compared with the filing node, the business filing node is a lightweight filing node, and on the premise of meeting the inquiry requirement of account state data required by business requirements, the consumption of storage resources is reduced, and the storage cost is reduced.
Block height: the sequence number of the chunk added to the blockchain may be used as a unique identifier of the chunk, indicating the location of the chunk in the blockchain, and the height of the chunk starts from 0, for example. The current block height refers to the sequence number of a new block currently added to the block chain; the historical block height refers to the sequence number of the existing block which is added into the block chain earlier than the new block, that is, the appearance time of the historical block height is earlier than the current block height.
And (3) state tree: for a state tree, each node basically comprises a key value mapping, wherein the keys are blockchain accounts, and the values are account state information including account statement, balance, random number notice, code, storage root and the like.
P2P (Peer-to-Peer networking) network: also known as Peer-to-Peer networks, or Peer-to-Peer networks, the participants of the network share a portion of the hardware resources (such as processing power, storage power, network connectivity, printers, etc.) they own, and these shared resources provide services and content over the network and can be accessed directly by other Peer nodes (peers) without going through intermediate entities.
Smart contract (Smart contract): is a computer protocol intended to propagate, validate or execute contracts in an informational manner. Smart contracts allow trusted transactions, which are traceable and irreversible, to be conducted without a third party. Essentially, the working principle of these automatic contracts is similar to if-then statements of other computer programs. Smart contracts interact with real-world assets only in this manner. When a pre-programmed condition is triggered, the intelligent contract executes the corresponding contract clause.
The technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
Fig. 1 is an architecture diagram of a blockchain network provided in the present application. As shown in fig. 1, the blockchain network may include a plurality of blockchain nodes, each of which collectively form a blockchain network, which is a P2P network. The block chain link points can be terminal equipment or servers, the positions of the block chain nodes in the block chain network are equal, and the block chain link points maintain a block chain together.
In this embodiment of the present application, the type of the Block chain network is not limited, and may be, for example, a Public Block chain (Public Block Chains), a Private Block chain (Private Block Chains), a federation Block chain, a permission Block chain, and the like. The public block chain has the characteristic of public deployment, and any person can participate randomly; the private block chain has the characteristic of private deployment and is limited to be used in a certain organization; the block chain of alliance and the block chain of permission have the characteristic of private deployment, and multiple organizations use together and have admission and authority management mechanisms.
In the embodiments of the present application, the blockchain network includes, for example, but not limited to: an ethernet network.
The terminal device may be hardware or software. When the terminal device is hardware, the terminal device is, for example, a mobile phone, a tablet computer, a desktop computer, a wearable smart device, a smart home device, or the like. When the terminal device is software, it may be installed in the above listed hardware devices, in this case, the terminal device is, for example, a plurality of software modules or a single software module, and the embodiments of the present application are not limited. The server may be hardware or software. When the server is hardware, the server is a single server or a distributed server cluster composed of a plurality of servers. When the server is software, the server may be a plurality of software modules or a single software module, and the embodiments of the present application are not limited.
It should be understood that the block link points in fig. 1 are merely schematic. In practical application, any number of block link points are deployed according to actual requirements.
Fig. 2 is a flowchart of a method for creating a service archive node according to an embodiment of the present application. The method may be performed by a traffic archive node creation means, which may be implemented in software and/or hardware, and may typically be integrated in a block chaining point. As shown in fig. 2, the method may include the steps of:
201. determining at least one first blockchain account which is associated with the service requirement from all blockchain accounts on the blockchain network; any blockchain node in the control blockchain network repeats steps 202-203 so that a blockchain link node is created as a traffic archive node.
202. In response to the current block height of the blockchain, account status information of each of the at least one first blockchain account at the current block height is obtained.
203. And storing the account state information of each of the at least one first blockchain account under the current blockheight into a database.
In the embodiment of the present application, different blockchain accounts are required for different business requirements, and for this purpose, at least one blockchain account associated with a business requirement is determined from all blockchain accounts on a blockchain network, and the at least one blockchain account associated with the business requirement is determined as at least one first blockchain account. Wherein, the number of the first block chain accounts can be one or more.
In this embodiment, any blockchain node may be selected from the blockchain network for function expansion, so that the blockchain node becomes a service archive node. In practical application, one blockchain node can be randomly selected from each blockchain node for function expansion. One of the block link nodes having good resource use, good load, or good communication quality may be selected from each of the block link nodes according to the resource use, the load, or the communication quality of each of the block link nodes, and the function may be expanded.
In the specific implementation, for the block chain link points which are selected for function expansion, when the block height of the block chain is updated, that is, a new block is added to the block chain, the account state information of each first block chain account at the current block height is obtained, and the account state information of at least one first block chain account at the current block height is stored in the database, so that the query requirement of the account state data of the block chain account related to the service requirement is met.
According to the technical scheme, the novel business filing node can be established in the blockchain network, the inquiry requirements of some business scenes on account state data of each blockchain account can be met, and the consumption of storage resources caused by the use of the filing node can be greatly reduced due to the fact that the business filing node is a light filing node, and the storage cost is reduced.
In practical applications, in the case that the blockchain is at the current blockheight, if only the account status information of the blockchain account associated with the business requirement at the current blockheight is kept in the database, some business failures may be caused. Thus, further optionally, in order to ensure availability and reliability of the services provided by the blockchain network, the traffic archiving node may further: and responding to the current block height of the block chain, acquiring the account state information of each second block chain account under the current block height, wherein the second block chain account is not related to the service requirement, and storing the account state information of each second block chain account under the current block height in a database.
It should be noted that, in the case that the blockchain is at the current blockheight, although the account status information of all blockchain accounts at the current blockheight is simultaneously stored in the database, the account status information of blockchain accounts not related to the business requirement at the current blockheight is only temporarily stored in the database, and is then deleted from the database as appropriate.
Thus, as a further alternative, the service archiving node may further select, in response to the current block height of the block chain, a target historical block height that meets a preset archiving threshold condition with the current block height from among historical block heights occurring earlier than the current block height on the block chain; and deleting the account state information of each second blockchain account which is saved in the database and is at the height of the target historical block.
In this embodiment, the predetermined archive threshold condition is determined according to actual conditions, for example, the number of blocks is 5 or 8. For example, if the predetermined archiving threshold condition is the number of M blocks, M is a positive integer. And when the current block height on the block chain is N + M, deleting the account state information of at least one second block chain account which is already stored in the database under the block height N on the block chain, wherein N is a positive integer.
It should be noted that the deletion time of the account status information of the second blockchain account at the target historical block height in the database is constrained by using the preset archive threshold condition, so as to ensure the stability of blockchain generation.
In practice, although the second blockchain account is determined according to whether the second blockchain account is related to the service requirement, due to the complexity of the blockchain network, account status information of the second blockchain account may be required in the blockchain generation process. Thus, it is further optional to accurately identify in conjunction with the status tree whether account status information for a second blockchain account in the database can be deleted to further ensure availability and reliability of services provided by the blockchain network. Specifically, an alternative implementation manner for deleting the account status information of each of the at least one second blockchain account stored in the database at the target historical blockheight is to: for any second blockchain account, judging whether a node corresponding to the second blockchain account in the state tree corresponding to the height of the target historical blockchain is referred by the state tree corresponding to the height of the current blockchain; if not, deleting the account state information of the second block chain account stored in the database under the height of the target historical block; if yes, the account state information of the second block chain account stored in the database under the height of the target historical block is reserved.
Specifically, each tile corresponds to a state tree, and the leaf nodes of the state tree of each tile represent a chain of tiles account. Whether reference relations exist among nodes of different state trees or not can be determined by analyzing node information of the state trees corresponding to the blocks.
Referring to fig. 3, account a is a first blockchain account and account b is a second blockchain account. Taking M as an example, when the currently added block in the block chain is a block N, the account state information of the account b in the database under the block N-1 needs to be deleted originally, but since a node in the state tree of the block N references a node in the state tree of the block N-1, which corresponds to the account b (a connection line exists between corresponding nodes in fig. 3 indicates that there is a reference relationship), the account state information of the account b in the database under the block N-1 does not need to be deleted.
In some embodiments, the service archiving node may further receive an account status information recovery instruction, where the account status information recovery instruction is used to instruct the database to recover the account status information of the deleted second blockchain account at each historical block height; responding to the account state information recovery instruction, and sequentially executing the transaction related to the deleted second blockchain account in each block on the blockchain so as to obtain the account state information of the deleted second blockchain account at each historical block height; and the acquired account state information of the deleted second blockchain account at each historical block height is saved in the database again.
In this embodiment, the service archiving node further has a re-archiving capability, so that the account status information of the blockchain account that has been deleted in the database is restored to the database, so as to meet flexible and changeable service requirements, and further ensure availability and reliability of the service provided by the blockchain network.
For example, in the case where the currently added block on the blockchain is block N, the account status information for account b under blocks 1 through N-1 has been deleted from the database. If there is a need to restore the account status information of the account b in the blocks 1 to N-1 in the database, the transaction data recorded in each of the blocks 1 to N-1 may be obtained, and the corresponding transaction data is executed again to obtain the account status information of the account b in the blocks 1 to N-1 again, and the account status information of the account b in the blocks 1 to N-1 is stored in the database, so as to realize the re-filing of the account status information of the account b in the blocks 1 to N-1 in the database.
Fig. 4 is a flowchart of a data processing method according to an embodiment of the present application. The method may be performed by a data processing device, which may be implemented in software and/or hardware, and may be generally integrated in block-linked points. As shown in fig. 4, the method may include the steps of:
401. and responding to the current block height of the block chain, and acquiring account state information of at least one first block chain account under the current block height, wherein the first block chain account is a block chain account which is associated with the service requirement on the block chain network.
402. And saving the account state information of each first blockchain account under the current block height to a database.
Further optionally, the method may further include: and responding to the current block height of the block chain, acquiring the account state information of each second block chain account under the current block height, wherein the second block chain account is not related to the service requirement, and storing the account state information of each second block chain account under the current block height in a database.
Further optionally, the method may further include: responding to the current block height of the block chain, and selecting a target historical block height which meets a preset archiving threshold condition with the current block height from various historical block heights which appear on the block chain earlier than the current block height; and deleting the account state information of each second blockchain account which is saved in the database and is at the height of the target historical block.
Further optionally, deleting account status information of each of the at least one second blockchain account already stored in the database at the target historical block height comprises: for any second blockchain account, judging whether a node corresponding to the second blockchain account in the state tree corresponding to the height of the target historical blockchain is referred by the state tree corresponding to the height of the current blockchain; if not, deleting the account state information of the second block chain account stored in the database under the height of the target historical block; if yes, the account state information of the second block chain account stored in the database under the height of the target historical block is reserved.
Further optionally, the method further includes: receiving an account state information recovery instruction, wherein the account state information recovery instruction is used for indicating that the account state information of the deleted second blockchain account at each historical block height is recovered in the database; responding to the account state information recovery instruction, and sequentially executing the transaction related to the deleted second blockchain account in each block on the blockchain so as to obtain the account state information of the deleted second blockchain account at each historical block height; and the acquired account state information of the deleted second blockchain account at each historical block height is saved into the database again.
According to the technical scheme, the novel business filing node can be established in the blockchain network, the inquiry requirements of some business scenes on account state data of each blockchain account can be met, and the consumption of storage resources caused by the use of the filing node can be greatly reduced due to the fact that the business filing node is a light filing node, and the storage cost is reduced.
Fig. 5 is a schematic structural diagram of a service archiving node creating device according to an embodiment of the present application. Referring to fig. 5, the apparatus may include:
a determining module 51, configured to determine, from all blockchain accounts on a blockchain network, at least one first blockchain account that has an association with a service requirement;
a control module 52, configured to control any blockchain node in the blockchain network to repeatedly perform the following steps, so that a blockchain node is created as a service archiving node: in response to the current block height of the block chain, acquiring account state information of at least one first block chain account under the current block height; and storing the account state information of each of the at least one first blockchain account under the current blockheight into a database.
Further optionally, the control module 52 is further configured to control any blockchain node in the blockchain network to perform the following steps: and responding to the current block height of the block chain, acquiring account state information of each second block chain account under the current block height, wherein the second block chain account is not related to the service requirement, and storing the account state information of each second block chain account under the current block height into a database.
Further optionally, the control module 52 is further configured to control any blockchain node in the blockchain network to perform the following steps: responding to the current block height of the block chain, and selecting a target historical block height meeting a preset archiving threshold condition with the current block height from various historical block heights appearing earlier than the current block height on the block chain; and deleting the account state information of each at least one second blockchain account which is already stored in the database under the height of the target historical block.
Further optionally, deleting the account status information of each of the at least one second blockchain account already stored in the database at the target historical blockchain height comprises: for any second blockchain account, judging whether a node corresponding to the second blockchain account in the state tree corresponding to the height of the target historical blockchain is referred by the state tree corresponding to the height of the current blockchain; if not, deleting the account state information of the second block chain account stored in the database under the height of the target historical block; if yes, the account state information of the second block chain account stored in the database under the height of the target historical block is reserved.
Further optionally, the control module 52 is further configured to control any blockchain node in the blockchain network to perform the following steps: receiving an account state information recovery instruction, wherein the account state information recovery instruction is used for indicating that the account state information of the deleted second blockchain account at each historical block height is recovered in the database; responding to the account state information recovery instruction, and sequentially executing the transaction related to the deleted second blockchain account in each block on the blockchain so as to obtain the account state information of the deleted second blockchain account at each historical block height; and the acquired account state information of the deleted second blockchain account at each historical block height is saved in the database again.
The specific manner in which each module and unit of the service filing node creation apparatus shown in fig. 5 perform operations has been described in detail in the embodiment of the service filing node creation method, and will not be described in detail here.
Fig. 6 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application. Referring to fig. 6, the apparatus may include:
an obtaining module 61, configured to obtain account status information of at least one first blockchain account at a current blockchain height in response to the current blockchain height, where the first blockchain account is a blockchain account on a blockchain network that has a correlation with a service requirement;
a saving module 62, configured to save account status information of each of the at least one first blockchain account at the current block height to the database.
Further optionally, the obtaining module 61 is further configured to, in response to the current block height of the block chain, obtain account status information of each of the at least one second block chain account at the current block height, where the second block chain account has no association with the service requirement, and store the account status information of each of the at least one second block chain account at the current block height in the database.
Further optionally, the apparatus further comprises: a deletion module, configured to select, in response to a current block height of the block chain, a target historical block height that satisfies a preset archiving threshold condition with the current block height from among historical block heights that occur earlier in the block chain than the current block height; and deleting the account state information of each at least one second blockchain account which is already stored in the database under the height of the target historical block.
Further optionally, when the deleting module deletes the account status information of each second blockchain account stored in the database at the height of the target historical block, the deleting module is specifically configured to: for any second blockchain account, judging whether a node corresponding to the second blockchain account in the state tree corresponding to the height of the target historical blockchain is referred by the state tree corresponding to the height of the current blockchain; if not, deleting the account state information of the second block chain account stored in the database under the height of the target historical block; if yes, the account state information of the second block chain account stored in the database under the height of the target historical block is reserved.
Further optionally, the apparatus further comprises: the recovery module is used for receiving an account state information recovery instruction, and the account state information recovery instruction is used for indicating that the account state information of the deleted second block chain account at each historical block height is recovered in the database; responding to the account state information recovery instruction, and sequentially executing the transaction related to the deleted second blockchain account in each block on the blockchain so as to obtain the account state information of the deleted second blockchain account at each historical block height; and the acquired account state information of the deleted second blockchain account at each historical block height is saved in the database again.
The specific manner in which each module and unit of the data processing apparatus shown in fig. 6 perform operations has been described in detail in the embodiment of the service filing node creation method, and will not be described in detail here.
It should be noted that the execution subjects of the steps of the methods provided in the above embodiments may be the same device, or different devices may be used as the execution subjects of the methods. For example, the execution subjects of steps 301 to 302 may be device a; for another example, the execution subject of step 301 may be device a, and the execution subject of step 302 may be device B; and so on.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations are included in a specific order, but it should be clearly understood that the operations may be executed out of the order presented herein or in parallel, and the sequence numbers of the operations, such as 301, 302, etc., are merely used for distinguishing different operations, and the sequence numbers do not represent any execution order per se. Additionally, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first", "second", etc. in this document are used for distinguishing different messages, devices, modules, etc., and do not represent a sequential order, nor do they limit the types of "first" and "second".
Fig. 7 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 7, the computer apparatus includes: a memory 71 and a processor 72;
the memory 71 is used for storing computer programs and may be configured to store other various data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phonebook data, messages, pictures, videos, and so forth.
The memory 71 may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
A processor 72, coupled to the memory 71, for executing computer programs in the memory 71 for: determining at least one first blockchain account which is associated with the service requirement from all blockchain accounts on the blockchain network; controlling any blockchain node in the blockchain network to repeatedly execute the following steps so as to enable the blockchain node to be established as a service archiving node: responding to the current block height of the block chain, and acquiring account state information of at least one first block chain account under the current block height; storing account state information of at least one first blockchain account under the current block height into a database; alternatively, the first and second electrodes may be,
a processor 72, coupled to the memory 71, for executing computer programs in the memory 71 for: responding to the current block height of the block chain, and acquiring account state information of at least one first block chain account under the current block height, wherein the first block chain account is a block chain account which is associated with a service requirement on a block chain network; and saving the account state information of each first blockchain account under the current block height to a database.
Further, as shown in fig. 7, the computer apparatus further includes: communication components 73, display 74, power components 75, audio components 76, and the like. Only some of the components are shown schematically in fig. 7, and the computer device is not meant to include only the components shown in fig. 7. In addition, the components within the dashed box in fig. 7 are optional components, not necessary components, and may depend on the product form of the computer device. The computer device of this embodiment may be implemented as a terminal device such as a desktop computer, a notebook computer, a smart phone, or an IOT device, or may be a server device such as a conventional server, a cloud server, or a server array. If the computer device of this embodiment is implemented as a terminal device such as a desktop computer, a notebook computer, a smart phone, etc., the computer device may include components within a dashed line frame in fig. 7; if the computer device of this embodiment is implemented as a server device such as a conventional server, a cloud server, or a server array, components within a dashed box in fig. 7 may not be included.
For the detailed implementation process of the processor to execute each action, reference may be made to the related description of the foregoing method embodiments, and details are not repeated here.
Accordingly, the present application further provides a computer-readable storage medium storing a computer program, where the computer program can implement the steps that can be executed by a computer device in the foregoing method embodiments when executed.
Accordingly, the present application also provides a computer program product, which includes a computer program/instruction, when the computer program/instruction is executed by a processor, the processor is enabled to implement the steps that can be executed by a computer device in the method embodiments described above.
The communication component is configured to facilitate communication between the device in which the communication component is located and other devices in a wired or wireless manner. The device where the communication component is located can access a wireless network based on a communication standard, such as a WiFi, a 2G, 3G, 4G/LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the communication component further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, ultra Wideband (UWB) technology, bluetooth (BT) technology, and other technologies.
The display includes a screen, which may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
The power supply assembly provides power for various components of the equipment where the power supply assembly is located. The power components may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device in which the power component is located.
The audio component may be configured to output and/or input an audio signal. For example, the audio component includes a Microphone (MIC) configured to receive an external audio signal when the device in which the audio component is located is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal may further be stored in a memory or transmitted via a communication component. In some embodiments, the audio assembly further comprises a speaker for outputting audio signals.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art to which the present application pertains. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (10)

1. A method for creating a service archive node, comprising:
determining at least one first blockchain account which has relevance with the service requirement from all blockchain accounts on the blockchain network;
controlling any blockchain node in the blockchain network to repeatedly execute the following steps so as to enable the blockchain node to be established as a service archiving node:
in response to the current block height of the block chain, acquiring account state information of at least one first block chain account under the current block height;
and saving the account state information of each first blockchain account under the current block height to a database.
2. The method of claim 1, further comprising:
and responding to the current block height of the block chain, acquiring account state information of at least one second block chain account under the current block height, wherein the second block chain account is not related to the service requirement, and storing the account state information of the at least one second block chain account under the current block height into a database.
3. The method of claim 2, further comprising:
in response to the current block height of the block chain, selecting a target historical block height meeting a preset archiving threshold condition with the current block height from among historical block heights occurring earlier than the current block height on the block chain;
deleting account status information for each of the at least one second blockchain account already saved in the database at the target historical blockheight.
4. The method of claim 3, wherein deleting account status information for each of the at least one second blockchain account already stored in the database at the target historical blockheight comprises:
for any second blockchain account, judging whether a node corresponding to the second blockchain account in the state tree corresponding to the target historical blockchain height is referred by the state tree corresponding to the current blockchain height;
if not, deleting the account state information of the second block chain account stored in the database under the height of the target historical block;
if yes, the account state information of the second block chain account stored in the database under the height of the target historical block is reserved.
5. The method of any of claims 2 to 4, further comprising:
receiving an account state information recovery instruction, wherein the account state information recovery instruction is used for instructing to recover the account state information of the deleted second blockchain account at each historical block height in the database;
responding to the account state information recovery instruction, and sequentially executing the transaction related to the deleted second blockchain account in each block on the blockchain so as to obtain the account state information of the deleted second blockchain account at each historical block height;
and the obtained account state information of the deleted second blockchain account at each historical block height is saved in the database again.
6. A method of data processing, comprising:
responding to the current block height of a block chain, and acquiring account state information of at least one first block chain account under the current block height, wherein the first block chain account is a block chain account which is associated with a service requirement on a block chain network;
and storing the account state information of each at least one first blockchain account under the current blockheight into a database.
7. A traffic archive node creation apparatus, comprising:
the system comprises a determining module, a determining module and a judging module, wherein the determining module is used for determining at least one first blockchain account which has relevance with a service requirement from all blockchain accounts on a blockchain network;
a control module, configured to control any blockchain node in the blockchain network to repeatedly perform the following steps, so that the blockchain node is created as a service archiving node: responding to the current block height of a block chain, and acquiring account state information of at least one first block chain account under the current block height; and saving the account state information of each first blockchain account under the current block height to a database.
8. A data processing apparatus, comprising:
the system comprises an acquisition module, a service module and a service module, wherein the acquisition module is used for responding to the current block height of a block chain, and acquiring account state information of at least one first block chain account under the current block height, and the first block chain account is a block chain account which is in relevance with service requirements on a block chain network;
and the storage module is used for storing the account state information of at least one first block chain account under the current block height into a database.
9. A computer device, comprising: a memory and a processor; the memory for storing a computer program; the processor is coupled to the memory for executing the computer program for performing the steps of the method of any of claims 1-6.
10. A computer storage medium having a computer program stored thereon, which, when executed by a processor, causes the processor to carry out the steps of the method of any one of claims 1 to 6.
CN202210523933.3A 2022-05-13 2022-05-13 Method, device, equipment and medium for creating service filing node and processing data Pending CN115174599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210523933.3A CN115174599A (en) 2022-05-13 2022-05-13 Method, device, equipment and medium for creating service filing node and processing data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210523933.3A CN115174599A (en) 2022-05-13 2022-05-13 Method, device, equipment and medium for creating service filing node and processing data

Publications (1)

Publication Number Publication Date
CN115174599A true CN115174599A (en) 2022-10-11

Family

ID=83483863

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210523933.3A Pending CN115174599A (en) 2022-05-13 2022-05-13 Method, device, equipment and medium for creating service filing node and processing data

Country Status (1)

Country Link
CN (1) CN115174599A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109656873A (en) * 2018-11-02 2019-04-19 平安科技(深圳)有限公司 Data archiving method, device and terminal device based on block chain
CN110264217A (en) * 2018-10-11 2019-09-20 腾讯科技(深圳)有限公司 A kind of information processing method, equipment and storage medium
CN111444185A (en) * 2020-03-26 2020-07-24 平安壹钱包电子商务有限公司 Block information updating method and device, computer equipment and storage medium
CN112291376A (en) * 2020-12-31 2021-01-29 腾讯科技(深圳)有限公司 Data processing method and related equipment in block chain system
WO2021017421A1 (en) * 2019-07-31 2021-02-04 创新先进技术有限公司 Blockchain state data recovery method and device, and electronic device
CN114202329A (en) * 2020-09-18 2022-03-18 腾讯科技(深圳)有限公司 Service processing method, device, node equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110264217A (en) * 2018-10-11 2019-09-20 腾讯科技(深圳)有限公司 A kind of information processing method, equipment and storage medium
CN109656873A (en) * 2018-11-02 2019-04-19 平安科技(深圳)有限公司 Data archiving method, device and terminal device based on block chain
WO2021017421A1 (en) * 2019-07-31 2021-02-04 创新先进技术有限公司 Blockchain state data recovery method and device, and electronic device
CN111444185A (en) * 2020-03-26 2020-07-24 平安壹钱包电子商务有限公司 Block information updating method and device, computer equipment and storage medium
CN114202329A (en) * 2020-09-18 2022-03-18 腾讯科技(深圳)有限公司 Service processing method, device, node equipment and storage medium
CN112291376A (en) * 2020-12-31 2021-01-29 腾讯科技(深圳)有限公司 Data processing method and related equipment in block chain system

Similar Documents

Publication Publication Date Title
US11206283B2 (en) Security management of devices using blockchain technology
US20170127366A1 (en) Masterless slot allocation
US20190181901A1 (en) Local profile assistant and application programming interface
US20170031948A1 (en) File synchronization method, server, and terminal
CN103136658A (en) Automatically aggregating contact information
US10708763B2 (en) On-boarding entity for remote embedded universal integrated circuit card management
CN113726846A (en) Edge cloud system, resource scheduling method, equipment and storage medium
US9628567B2 (en) Methods and systems for efficient discovery of devices in a peer-to-peer network
CN113392158A (en) Service data processing method and device and data center
CN105531977A (en) Mobile device connection control for synchronization and remote data access
CN109672752A (en) The synchronous method of data and node
US10853892B2 (en) Social networking relationships processing method, system, and storage medium
CN113301558B (en) Message transmission method, device, system and storage medium
CN113300866B (en) Node capacity control method, device, system and storage medium
CN114844788B (en) Network data analysis method, system, equipment and storage medium
CN114385647B (en) Alliance link-out block method, alliance link-out block device, electronic equipment and medium
CN115174599A (en) Method, device, equipment and medium for creating service filing node and processing data
CN112579877A (en) Information source system control method, device, storage medium and equipment
US11914553B2 (en) Methods and systems for analyzing similarities across tables and databases to perform de-duplication in a storage server
US10171285B2 (en) Proactive M2M framework using device-level vCard for inventory, identity, and network management
CN111240933B (en) Method, system, device and medium for monitoring performance data of multiple data centers
CN114239963A (en) Method and device for detecting directed graph circulation path
CN113138717B (en) Node deployment method, device and storage medium
CN112910675A (en) Equipment management method, device and system
CN109962931B (en) Information pushing method, device and system

Legal Events

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