CN111835570B - Global state persistence decentralized blockchain network node device and working method - Google Patents
Global state persistence decentralized blockchain network node device and working method Download PDFInfo
- Publication number
- CN111835570B CN111835570B CN202010696826.1A CN202010696826A CN111835570B CN 111835570 B CN111835570 B CN 111835570B CN 202010696826 A CN202010696826 A CN 202010696826A CN 111835570 B CN111835570 B CN 111835570B
- Authority
- CN
- China
- Prior art keywords
- node
- node information
- nodes
- information
- attenuation coefficient
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/145—Network analysis or design involving simulating, designing, planning or modelling of a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols 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]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention provides a global state continuous decentralized block chain network node device and a working method, wherein the node device comprises: the query module receives the query request and transmits the query request to the routing module; the data management module is used for setting the storage space of the node according to the supply consumption ratio, and storing and reading the node information; the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the network for storing the node information of the node; the routing module is used for connecting the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table; the gossip protocol module is used for transmitting the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient.
Description
Technical Field
The invention relates to the technical field of computer information processing, in particular to a global state continuous decentralized blockchain network node device and a working method.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
Information about businesses, websites, and individuals is subject to change, such as a website recorded in the past, which cannot be found after the change. Thus, if a business relies on a website maintained by the business to record information, and not to say that the information is not actively and continuously recorded for a fee, the information is subject to total loss when the business is no longer continuously operating.
If operators or national authorities rely on multiple clouds, there is a high probability that the cost problem will make it hard to persist, especially if many consumers are not willing to pay an annual fee for maintaining one piece of information on a continuous basis, but may not be sustainable even if they were initially willing.
If the design idea of the classical blockchain network is used, all nodes are required to record all information, which results in that large-capacity nodes must be used, and the upper capacity limit causes system breakdown.
Therefore, how to provide a new solution, which can solve the above technical problems, is a technical problem to be solved in the art.
Disclosure of Invention
The embodiment of the invention provides a global state persistent decentralized blockchain network node device, which realizes the persistent storage of information and does not need to pay a third party, and the method comprises the following steps:
the query module is used for receiving the query request and transmitting the query request to the routing module;
the data management module is used for setting the storage space of the node according to the supply consumption ratio, and storing and reading the node information; wherein the node information includes: node information storage space upper limit and node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network;
the routing module is used for connecting the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table;
the gossip protocol module is used for transmitting the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient.
An embodiment of the present invention further provides a working method of the global state persistent decentralized blockchain network node apparatus, including:
the query module receives the query request and transmits the query request to the routing module;
the data management module sets the storage space of the node according to the supply consumption ratio, and stores and reads the node information; wherein the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network;
the routing module connects the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table;
the gossip protocol module transmits the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient.
The embodiment of the invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, wherein when the processor executes the computer program, the processor realizes the working method of the global state continuous decentralized blockchain network node device.
An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program for executing a working method of the global state persistent decentralized blockchain network node apparatus.
The embodiment of the invention provides a global state continuous decentralized blockchain network node device and a working method, wherein a query request is received through a query module and is transmitted to a routing module, and a data management module is used for setting a storage space of a node according to a supply consumption ratio, and storing and reading node information; the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network; by holding the node device, the storage of the node information can be borne on the node device itself without paying a third party, so that extra cost is not generated; the routing module connects the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table; the gossip protocol module transmits the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient. The embodiment of the invention controls the spreading times of the node information by using the node information attenuation coefficient, does not need to store the node information on each node in the global state persistent decentralized block chain network, does not record the global information, and only records the local information, so that the local node information is controlled according to the capacity of the current node storage space while the node information gradually expands. Meanwhile, the embodiment of the invention does not depend on a certain server and a certain enterprise, and uses part of nodes in the global state continuous decentralized block chain network to record information, thereby realizing that the information cannot be continuously recorded because the server or the enterprise stops operating.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts. In the drawings:
fig. 1 is a schematic diagram of a global state persistent decentralized blockchain network node device according to an embodiment of the present invention.
Fig. 2 is a schematic diagram of a global state persistent decentralized blockchain network formed by global state persistent decentralized blockchain network node devices according to an embodiment of the invention.
Fig. 3 is a schematic diagram of a working method of a global state continuation decentralized blockchain network node device according to an embodiment of the present invention.
Fig. 4 is a schematic diagram illustrating a process of broadcasting node information of a local node stored in the local node to other nodes by using a gossip protocol according to a node information attenuation coefficient when applying a working method of a global state continuation decentralized blockchain network node device according to an embodiment of the present invention.
Fig. 5 is a schematic diagram of a process of spreading node information of other nodes transmitted from other nodes stored in the node to nodes not storing the node information by using a gossip protocol according to a node information attenuation coefficient when applying a working method of a global state continuation decentralized blockchain network node device according to an embodiment of the present invention.
FIG. 6 is a schematic diagram of a computer device running a method of operating a global state continuation decentralized blockchain network node device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the embodiments of the present invention are further described in detail below with reference to the accompanying drawings. The exemplary embodiments and descriptions of the present invention are provided to explain the present invention, but not to limit the present invention.
Fig. 1 is a schematic diagram of a global state persistence decentralized blockchain network node device according to an embodiment of the present invention, and as shown in fig. 1, an embodiment of the present invention provides a global state persistence decentralized blockchain network node device, which implements persistent storage of information without paying a third party, where the method includes:
the query module is used for receiving the query request and transmitting the query request to the routing module;
the data management module is used for setting the storage space of the node according to the supply consumption ratio, and storing and reading the node information; wherein the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network;
the routing module is used for connecting the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table;
the gossip protocol module is used for transmitting the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient.
The embodiment of the invention provides a global state continuous decentralized blockchain network node device and a working method, wherein a query request is received through a query module and is transmitted to a routing module, and a data management module is used for setting a storage space of a node according to a supply consumption ratio, and storing and reading node information; the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network; by holding the node device, the storage of the node information can be borne on the node device itself without paying a third party, so that extra cost is not generated; the routing module connects the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table; the gossip protocol module transmits the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient. The embodiment of the invention controls the spreading times of the node information by using the node information attenuation coefficient, does not need to store the node information on each node in the global state persistent decentralized block chain network, does not record the global information, and only records the local information, so that the local node information is controlled according to the capacity of the current node storage space while the node information gradually expands. Meanwhile, the embodiment of the invention does not depend on a certain server and a certain enterprise, and uses part of nodes in the global state persistent decentralized block chain network to record information, thereby realizing that the information cannot be continuously recorded because the server or the enterprise stops operating, and realizing the persistent storage of the information.
As shown in fig. 1, which is a schematic diagram of a global state continuation decentralized blockchain network node device according to an embodiment of the present invention, and fig. 2, which is a schematic diagram of a global state continuation decentralized blockchain network formed by a global state continuation decentralized blockchain network node device according to an embodiment of the present invention, a node device may include various forms, for example, which may include: personal mobile nodes, personal office nodes, small enterprise nodes, and large enterprise nodes; the various node devices form a global state continuous decentralized block chain network, and meanwhile the global state continuous decentralized block chain network is further connected with a public cloud, wherein each node can be connected with the public cloud to provide an external storage space. In particular, an apparatus for global state persistence and decentralized blockchain network node according to an embodiment of the present invention may include:
the query module is used for receiving the query request and transmitting the query request to the routing module;
the data management module is used for setting the storage space of the node according to the supply consumption ratio, and storing and reading the node information; wherein the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network;
the routing module is used for connecting the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table;
the gossip protocol module is used for transmitting the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient.
In an embodiment of the invention, when the global state continues to go to the centralized blockchain network node device, the query module is configured to receive a query request and transmit the query request to the routing module, and may include: in the global state persistent decentralized block chain network, when one node sends out a query request, the query request is sent to the associated node, the query module of the associated node receives the query request, transmits the query request to the routing module, and queries node information on the node or other associated nodes through the routing module.
In an embodiment of the invention, when the global state continues to go to the centralized blockchain network node device provided in the embodiment of the invention is implemented, the routing module is configured to connect the node with other nodes; according to the query request, node information is queried on the node and other nodes connected through the routing table, and the node information comprises the following steps: the routing module is connected with the query module, is provided with a routing table, records the position information of all nodes in the global state continuous decentralized block chain network when each node is accessed to the global state continuous decentralized block chain network, and pushes the position information of the node to other nodes, and the node can be connected with any one or more other nodes in the global state continuous decentralized block chain network through the routing table; the routing module is also used for discovering and recording the positions of other nodes through the routing table. When the routing module receives the query request, whether the node information is stored or not is firstly queried on the node, and if the node information is stored, the node information is returned to the node sending the query request; and if the node does not store the required node information, connecting other nodes through the routing table, and inquiring on other nodes.
In an embodiment of the invention, when the node device of the global state persistent decentralized blockchain network provided by the embodiment of the invention is implemented, the routing module is further configured to, when node information is queried, directly return the node information to a node that sends a query request within a set time interval for the same node information and when the node information is not stored in the node. In the embodiment, because a plurality of nodes exist in the global state persistent decentralized block chain network, the connection between the nodes has the limitation of distance and response time, and in order to acquire the node information required to be queried more quickly, the node information is directly returned to the node sending the query request within a set time interval when the same node information is not stored in the node, so that the node information is queried and responded quickly.
In an embodiment of the invention, when the global state is continuously used to remove the centralized blockchain network node device provided in the embodiment of the present invention, the routing module is further configured to store the required node information in the storage space of the node through the data management module for information maintenance when the required node information is queried on other nodes connected through the routing table.
In the embodiment, because each node has the non-full data storage characteristic, when information is queried, if the node does not store the node information, the final storage position of the node information needs to be queried from the routing table of the node; when the node information is inquired, the node participating in the node information inquiry is concerned about the node information, therefore, when the required node information is inquired on other nodes connected with the routing table, the required node information is stored in the storage space of the node for information maintenance, and the node inquiring the information is added into the maintenance of the node information.
In an embodiment of the invention, when the global state persistence decentralized block chain network node device provided in the embodiment of the present invention is implemented specifically, the data management module is further configured to connect a public cloud as an external storage space of the node when the storage space of the node does not satisfy a supply consumption ratio. The data management module is further configured to provide functions such as data caching.
In an embodiment, the supply consumption ratio is a ratio of a storage space of the node to a storage space required for storing node information of the node by using the global state continuation decentralized blockchain network.
In an embodiment, the supply-consumption ratio is: the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized blockchain network; for example, when the supply/consumption ratio N =100, an enterprise node wants to maintain its own web address (e.g., maintain 1 piece of information) on the global state persistent decentralized blockchain network, and the storage space of the enterprise node has a capacity of at least 100 pieces of information for storing node information of other user nodes. By setting the supply consumption ratio, the storage of the node information can be loaded in each node device, and the consumer holds the node device without paying a third party, so that extra cost is not generated. The aforementioned consumers refer to users who wish to continuously maintain and maintain certain information of themselves. For example, the mobile node may be used as a storage main body for carrying a global state storage decentralized block chain network, so that the node device is miniaturized, and the running data and information are acceptable or imperceptible to the micro device. In a global state persistent decentralized block chain network, a supply consumption ratio is set to N, the information capacity that each customer desires to maintain is enlarged by N times (the numerical value of N can be calculated by a model) as a lower limit of a storage space of a node device, and N is set as a global value. Can be dynamically updated to balance the state of the entire network. That is, an enterprise wants to maintain its own web address (1 message) on the network, the node of the enterprise should have a capacity of at least 100 messages (for example, N = 100) for storing node information of other user nodes. Each piece of node information can ensure the upper limit of the storage space by setting the upper limit of the storage space of the node information. In order to meet the supply consumption ratio and the difficulty of controlling the processing of information in cooperation with the node, it is necessary to set an upper limit M of the node information storage space, for example, each piece of node information may be controlled to 1K, that is, M =1K. Considering that for a user node with a large amount of information required to be issued, the storage space of the user node may require an excessively large capacity due to a supply consumption ratio, which exceeds the upper limit of the storage capacity of a single node. The method can adopt a mode of renting the public cloud, transfer the capacity required to be borne by the enterprise node to the public cloud, connect the public cloud through the data management module, and use the public cloud as an external storage space of the node.
In an embodiment of the present invention, when implementing the global state continuously decentralized blockchain network node device provided in the embodiment of the present invention, the gossip protocol module is configured to store node information transmitted from other nodes according to an upper limit of a node information storage space, and includes: and when the upper limit of the node information storage space of the node information meets the storage space of the node, storing the node information.
In an embodiment of the present invention, when implementing a global state persistent decentralized blockchain network node device provided in the embodiment of the present invention, in an embodiment, the foregoing spreading node information stored in the node to other nodes by using a gossip protocol according to a node information attenuation coefficient includes:
according to the node information attenuation coefficient, spreading the node information stored by the node to other nodes by using a gossip protocol;
and spreading other node information transmitted from other nodes stored in the node to nodes which do not store the node information by using a gossip protocol according to the node information attenuation coefficient.
In the embodiment, one node device stores the node information generated by the node device itself and also stores other node information transmitted by other nodes; when the node information of the node is broadcasted, the node information stored by the node is broadcasted to other nodes by using a gossip protocol according to the attenuation coefficient of the node information; and when other node information transmitted by other nodes is disseminated, the node information of the other nodes stored in the node is disseminated to the node which does not store the node information by using the gossip protocol according to the node information attenuation coefficient.
In particular, when the node apparatus of the global state persistence decentralized block chain network provided in the embodiments of the present invention is implemented, in one embodiment, the attenuation coefficient of the node information is greater than or equal to zero;
the aforementioned dissemination of the node information of the local node stored by the local node to other nodes by using the gossip protocol according to the node information attenuation coefficient includes:
acquiring a node information attenuation coefficient of the node information, and judging whether the node information attenuation coefficient is equal to zero or not;
if the node information attenuation coefficient is equal to zero, the node information stops spreading;
and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and scattering the node information to the nodes which do not store the node information.
In an embodiment, the node information attenuation coefficient refers to that, in a process of transmitting a piece of node information to other nodes, a node data transmission range in which the piece of node information is stored needs to be controlled, so that the total capacity of a network is not too large. When the node information attenuation coefficient is attenuated to 0, the node information is not continuously propagated. For example, when the node information attenuation coefficient P =5, the transmission is performed at most 5 times from the node from which the node information originates. Therefore, after receiving a piece of node information, firstly, the node information attenuation coefficient of the node information needs to be obtained, and whether the node information attenuation coefficient is equal to zero or not is judged; if the attenuation coefficient of the node information is equal to zero, the node information stops being spread, and the node information is only stored in the node; and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and spreading the node information to nodes which do not store the node information. The step of scattering the node information to the nodes which do not store the node information comprises the step of scattering the node information to the nodes concerned about the node information. The node information attenuation coefficient is used for controlling the spreading times of the node information, the node information does not need to be stored on each node in the global state continuous decentralized block chain network, the global information is not recorded, only the local information is recorded, and the local information is controlled according to the capacity of the current node storage space while the node information gradually expands. The repeated storage of the node information on too many nodes is limited by successively attenuating the attenuation coefficient of the node information. When the node information of the node is broadcasted, the node information stored by the node is broadcasted to other nodes by using a gossip protocol according to the attenuation coefficient of the node information, and the method comprises the following steps: acquiring a node information attenuation coefficient of the node information of the node, and judging whether the node information attenuation coefficient is equal to zero or not; if the attenuation coefficient of the node information is equal to zero, the node information stops being spread, and the node information is only stored in the node; and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and spreading the node information to nodes which do not store the node information. The step of scattering the node information to the nodes which do not store the node information comprises the step of scattering the node information to the nodes concerned about the node information.
In an embodiment of the present invention, when the global state is continuously removed from the node apparatus of the centralized blockchain network, the attenuation coefficient of the node information is greater than or equal to zero;
according to the node information attenuation coefficient, spreading other node information transmitted from other nodes stored in the node to nodes which do not store the node information by using a gossip protocol, wherein the method comprises the following steps:
acquiring node information attenuation coefficients of other node information transmitted by other nodes, and judging whether the node information attenuation coefficients are equal to zero or not;
if the node information attenuation coefficient is equal to zero, the node information stops spreading;
and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and spreading the node information to nodes which do not store the node information.
In the embodiment, when the node receives node information transmitted by other nodes and needs to broadcast the node information of the other nodes, the node information attenuation coefficient of the node information of the other nodes transmitted by the other nodes is firstly obtained, and whether the node information attenuation coefficient is equal to zero or not is judged; if the attenuation coefficient of the node information is equal to zero, the node information stops being spread, and the node information is only stored in the node; and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and scattering the node information to the nodes which do not store the node information. The step of scattering the node information to the nodes which do not store the node information includes scattering to the nodes concerned about the node information.
In an embodiment of the present invention, when implementing a global state persistent decentralized blockchain network node device, the node device further includes:
the consensus module is used for temporarily forming a consensus network by the node and the related nodes and carrying out consensus processing on the node information needing consensus;
after the consensus processing is completed, the node information after the consensus processing is stored in the storage space of each node of the consensus network through the data management module.
In an embodiment, consensus techniques are used to form records of more important information. And the node information which needs to be identified is identified, and after the identification is finished, the node information after the identification processing is written into respective storage space.
In an embodiment of the invention, when the node device of the global state continuous decentralized blockchain network provided by the embodiment of the invention is implemented, in the embodiment, the consensus module is further configured to delete the node information in a manner that a plurality of nodes are in consensus when the node information is outdated and the holder of the node information has no capability to delete the node information.
In an embodiment, some node information determined to be no longer used may be submitted by a node held by a consumer to request deletion, and delete a state value in all nodes stored in the node information, so as to empty the node information in the global state existence decentralized blockchain network, thereby avoiding others from querying out-of-date information. When the node information is outdated and the holder of the node information has no ability to delete, the node information is deleted in a mode that a plurality of nodes are commonly identified.
In an embodiment of the present invention, when implementing a global state persistent decentralized blockchain network node device, the node device further includes: and the information processing module is used for recording and updating the node information in the storage space of the node and keeping the node information in the latest state.
In the embodiment, the global state is recorded in the decentralized blockchain network, and the modification details of the information are not concerned, so that each node information only records the latest state (including the last information, the modification date, the modification times and the like) in all the stored node devices, the amount of the node information is not expanded sharply due to frequent use of the information, and the node information in the storage space is recorded and updated through the information processing module, so that the node information is kept in the latest state.
In particular, when the node apparatus for global state persistence decentralized block chaining network provided in the embodiments of the present invention is implemented, in an embodiment, the node apparatus further includes: and the storage network basic kernel module is used for bearing the query module, the data management module, the routing module, the gossip protocol module, the consensus module and the information processing module and carrying out node initialization and module upgrading. In an embodiment, the storage network basic kernel module is configured to load and bear other functional modules, such as a bearing query module, a data management module, a routing module, a gossip protocol module, a consensus module, and an information processing module, and load other functional modules, so that the basic information of a node can be stored without operating a specific service function, and tasks such as initialization of the node and upgrading of the module are completed.
In particular, when the node apparatus for global state persistence decentralized block chaining network provided in the embodiments of the present invention is implemented, in an embodiment, the node apparatus further includes: the node container is used for deploying a storage network basic kernel module; to accommodate miniature devices, a global state-persistent decentralized blockchain network is deployed using node containers that are as miniature as possible. For an enterprise-level system, the node containers may be deployed in a cluster manner on multiple servers.
The embodiment of the present invention further provides a working method of the global state persistence decentralized blockchain network node apparatus, which is described in the following embodiments. Because the principle of solving the problem of the method is similar to that of a global state continuous decentralized blockchain network node device, the implementation of the device can refer to the implementation of the global state continuous decentralized blockchain network node device, and repeated parts are not described again.
Fig. 3 is a schematic diagram of a working method of a global state continuation decentralized blockchain network node device according to an embodiment of the present invention, and as shown in fig. 3, the embodiment of the present invention further provides a working method of the global state continuation decentralized blockchain network node device, including:
step 301: the query module receives the query request and transmits the query request to the routing module;
step 302: the data management module sets the storage space of the node according to the supply consumption ratio, and stores and reads the node information; wherein the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network;
step 303: the routing module connects the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table;
step 304: the gossip protocol module transmits the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient.
In one embodiment, when the routing module queries the node information, the routing module directly returns the node information to the node sending the query request within a set time interval for the same node information and when the node information is not stored in the node.
In one embodiment, when the routing module queries the required node information from other nodes connected through the routing table, the routing module stores the required node information in the storage space of the node through the data management module for information maintenance.
In a specific implementation of the working method for a global state persistence decentralized block chain network node device according to the embodiment of the present invention, in an embodiment, when the storage space of the node does not satisfy the supply consumption ratio, the data management module connects a public cloud as an external storage space of the node.
In an embodiment of the present invention, when implementing the working method of the global state persistent decentralized blockchain network node device provided in the embodiment of the present invention, in the step of broadcasting the node information stored in the node to other nodes by using a gossip protocol according to the node information attenuation coefficient, the method includes:
according to the node information attenuation coefficient, the node information stored by the node is disseminated to other nodes by using a gossip protocol;
and spreading other node information transmitted from other nodes stored in the node to nodes which do not store the node information by using a gossip protocol according to the node information attenuation coefficient.
Fig. 4 is a schematic diagram illustrating a process of broadcasting node information of a local node stored in the local node to other nodes by using a gossip protocol according to a node information attenuation coefficient when applying a working method of a global state continuation decentralized blockchain network node device according to an embodiment of the present invention, where as shown in fig. 4, when the working method of the global state continuation decentralized blockchain network node device according to the embodiment of the present invention is specifically implemented, in an embodiment, the node information attenuation coefficient is greater than or equal to zero;
the method for spreading the node information stored by the node to other nodes by using the gossip protocol according to the node information attenuation coefficient comprises the following steps:
step 401: acquiring a node information attenuation coefficient of the node information, and judging whether the node information attenuation coefficient is equal to zero or not;
step 402: if the node information attenuation coefficient is equal to zero, the node information stops spreading;
step 403: and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and spreading the node information to nodes which do not store the node information.
Fig. 5 is a schematic diagram illustrating a process of spreading node information of other nodes transmitted from other nodes stored in a node to a node not storing the node information by using a gossip protocol according to a node information attenuation coefficient when applying a working method of a global state continuation decentralized blockchain network node device according to an embodiment of the present invention, as shown in fig. 5, when specifically implementing the working method of the global state continuation decentralized blockchain network node device according to the embodiment of the present invention, in an embodiment, the node information attenuation coefficient is greater than or equal to zero;
according to the node information attenuation coefficient, other node information transmitted by other nodes stored by the node is disseminated to nodes which do not store the node information by using a gossip protocol, and the method comprises the following steps:
step 501: acquiring node information attenuation coefficients of other node information transmitted by other nodes, and judging whether the node information attenuation coefficients are equal to zero or not;
step 502: if the node information attenuation coefficient is equal to zero, the node information stops spreading;
step 503: and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and scattering the node information to the nodes which do not store the node information.
In an embodiment of the present invention, when the working method of the global state persistent decentralized blockchain network node device is implemented, the working method of the node device further includes:
the consensus module temporarily forms a consensus network by the node and the related node, and performs consensus processing on the node information needing consensus;
and after the consensus processing is finished, the node information after the consensus processing is respectively stored into the storage space of each node of the consensus network through the data management module.
In an embodiment of the present invention, when the node information is outdated and the holder of the node information has no ability to delete the node information, the consensus module deletes the node information by means of consensus among a plurality of nodes.
In an embodiment of the present invention, when the working method of the global state persistent decentralized blockchain network node device is implemented, the working method of the node device further includes: the information processing module records and updates the node information in the storage space of the node, and keeps the node information in the latest state.
In an embodiment of the present invention, when the working method of the global state persistent decentralized blockchain network node device is implemented, the working method of the node device further includes: the storage network basic kernel module bears an inquiry module, a data management module, a routing module, a gossip protocol module, a consensus module and an information processing module, and carries out initialization and module upgrading of the nodes.
Fig. 6 is a schematic diagram of a computer device operating a method for implementing a global state continuous decentralized blockchain network node device according to the present invention, and as shown in fig. 6, an embodiment of the present invention further provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method for implementing the operation of the global state continuous decentralized blockchain network node device when executing the computer program.
An embodiment of the present invention further provides a computer-readable storage medium, which stores a computer program for implementing a working method of the global state persistence decentralized blockchain network node apparatus.
In summary, the embodiment of the present invention provides a global state persistence decentralized block chain network node device and a working method thereof, wherein a query request is received by a query module, and is transmitted to a routing module, and a data management module is used to set a storage space of a local node according to a supply consumption ratio, and store and read node information; the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network; by holding the node device, the storage of the node information can be borne on the node device itself without paying a third party, so that extra cost is not generated; the routing module connects the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table; the gossip protocol module transmits the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient. The embodiment of the invention controls the spreading times of the node information by using the node information attenuation coefficient, does not need to store the node information on each node in the global state persistent decentralized block chain network, does not record the global information, and only records the local information, so that the local node information is controlled according to the capacity of the current node storage space while the node information gradually expands. Meanwhile, the embodiment of the invention does not depend on a certain server and a certain enterprise, and uses part of nodes in the global state continuous decentralized block chain network to record information, thereby realizing that the information cannot be continuously recorded because the server or the enterprise stops operating. Considering that for a user node with a large amount of information required to be issued, the storage space of the user node may require an excessively large capacity due to the supply consumption ratio, exceeding the upper limit of the storage capacity of a single node. The method can adopt a mode of renting the public cloud, the capacity required to be borne by the enterprise is transferred to the public cloud, the public cloud is connected through the data management module, and the public cloud is used as an external storage space of the node.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention 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 invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the 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.
The above-mentioned embodiments are provided to further explain the objects, technical solutions and advantages of the present invention in detail, and it should be understood that the above-mentioned embodiments are only examples of the present invention and should not be used to limit the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (13)
1. A global state persistence decentralized blockchain network node apparatus, comprising:
the query module is used for receiving the query request and transmitting the query request to the routing module;
the data management module is used for setting the storage space of the node according to the supply consumption ratio, and storing and reading the node information; wherein the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network;
the routing module is used for connecting the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table;
the gossip protocol module is used for transmitting the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient.
2. The apparatus of claim 1, wherein the routing module is further configured to, when querying the node information, directly return the node information to the node that issued the query request within a set time interval for the same node information and when the node information is not stored in the node.
3. The apparatus of claim 1, wherein the routing module is further configured to, when the required node information is queried on other nodes connected through the routing table, store the required node information in the local node storage space through the data management module for information maintenance.
4. The apparatus of claim 1, wherein the data management module is further configured to connect a public cloud as an external storage space of the node when the storage space of the node does not satisfy the supply consumption ratio.
5. The apparatus of claim 1, wherein the dissemination of the node information stored by the node to other nodes using a gossip protocol according to the node information attenuation coefficient comprises:
according to the node information attenuation coefficient, spreading the node information stored by the node to other nodes by using a gossip protocol;
and spreading other node information transmitted by other nodes stored in the node to nodes which do not store the node information by using a gossip protocol according to the node information attenuation coefficient.
6. The apparatus of claim 5, wherein the node information attenuation coefficient is greater than or equal to zero;
the method for spreading the node information stored by the node to other nodes by using the gossip protocol according to the node information attenuation coefficient comprises the following steps:
acquiring a node information attenuation coefficient of the node information, and judging whether the node information attenuation coefficient is equal to zero or not;
if the node information attenuation coefficient is equal to zero, the node information stops spreading;
and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and spreading the node information to nodes which do not store the node information.
7. The apparatus of claim 5, wherein the node information attenuation coefficient is greater than or equal to zero;
according to the node information attenuation coefficient, other node information transmitted by other nodes stored by the node is disseminated to nodes which do not store the node information by using a gossip protocol, and the method comprises the following steps:
acquiring node information attenuation coefficients of other node information transmitted by other nodes, and judging whether the node information attenuation coefficients are equal to zero or not;
if the node information attenuation coefficient is equal to zero, the node information stops spreading;
and if the node information attenuation coefficient is larger than zero, subtracting one from the node information attenuation coefficient, and spreading the node information to nodes which do not store the node information.
8. The apparatus of claim 1, further comprising:
the consensus module is used for temporarily forming a consensus network by the node and the related nodes and carrying out consensus processing on the node information needing consensus;
after the consensus processing is completed, the node information after the consensus processing is stored in the storage space of each node of the consensus network through the data management module.
9. The apparatus of claim 8, wherein the consensus module is further configured to delete the node information by means of consensus among a plurality of nodes when the node information is outdated and the holder of the node information has no ability to delete the node information.
10. The apparatus of claim 1, further comprising: and the information processing module is used for recording and updating the node information in the storage space of the node and keeping the node information in the latest state.
11. A method of operating a global state persistence decentralized blockchain network node device according to any one of claims 1 to 10, comprising:
the query module receives the query request and transmits the query request to the routing module;
the data management module sets the storage space of the node according to the supply consumption ratio, and stores and reads the node information; wherein the node information includes: an upper limit of a node information storage space and a node information attenuation coefficient; the supply consumption ratio is the ratio of the storage space of the node to the storage space required by the node information of the node stored by using the global state continuous decentralized block chain network;
the routing module connects the node with other nodes according to the routing table; according to the query request, node information is queried on the node and other nodes connected through the routing table;
the gossip protocol module transmits the node information transmitted by other nodes to the data management module for storage according to the upper limit of the node information storage space; and spreading the node information stored by the node to other nodes by using a gossip protocol according to the node information attenuation coefficient.
12. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of claim 11 when executing the computer program.
13. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a computer, causes the computer to implement the method of claim 11.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010696826.1A CN111835570B (en) | 2020-07-20 | 2020-07-20 | Global state persistence decentralized blockchain network node device and working method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010696826.1A CN111835570B (en) | 2020-07-20 | 2020-07-20 | Global state persistence decentralized blockchain network node device and working method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111835570A CN111835570A (en) | 2020-10-27 |
CN111835570B true CN111835570B (en) | 2022-11-11 |
Family
ID=72923650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010696826.1A Active CN111835570B (en) | 2020-07-20 | 2020-07-20 | Global state persistence decentralized blockchain network node device and working method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111835570B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112104517B (en) * | 2020-11-23 | 2021-02-05 | 腾讯科技(深圳)有限公司 | Data processing method based on block chain network and related device |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102656922A (en) * | 2009-12-18 | 2012-09-05 | 英特尔公司 | System and method of utilizing a framework for information routing in large-scale distributed systems using swarm intelligence |
CN107466457A (en) * | 2017-05-18 | 2017-12-12 | 北京小米移动软件有限公司 | Reduce method, apparatus, base station and the user equipment of user equipment temperature |
CN108230109A (en) * | 2018-01-02 | 2018-06-29 | 罗梅琴 | A kind of shared system and method based on block chain technology |
CN108769150A (en) * | 2018-05-14 | 2018-11-06 | 百度在线网络技术(北京)有限公司 | Data processing method, device, clustered node and the storage medium of block chain network |
CN108932297A (en) * | 2018-06-01 | 2018-12-04 | 阿里巴巴集团控股有限公司 | A kind of data query, data sharing method, device and equipment |
CN109412953A (en) * | 2018-12-27 | 2019-03-01 | 北京比新科技有限公司 | A kind of routing iinformation exchange method based on block chain overlay network |
CN110990408A (en) * | 2019-12-02 | 2020-04-10 | 中国银行股份有限公司 | Block chain-based business information cooperation method, business system and alliance chain |
-
2020
- 2020-07-20 CN CN202010696826.1A patent/CN111835570B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102656922A (en) * | 2009-12-18 | 2012-09-05 | 英特尔公司 | System and method of utilizing a framework for information routing in large-scale distributed systems using swarm intelligence |
CN107466457A (en) * | 2017-05-18 | 2017-12-12 | 北京小米移动软件有限公司 | Reduce method, apparatus, base station and the user equipment of user equipment temperature |
CN108230109A (en) * | 2018-01-02 | 2018-06-29 | 罗梅琴 | A kind of shared system and method based on block chain technology |
CN108769150A (en) * | 2018-05-14 | 2018-11-06 | 百度在线网络技术(北京)有限公司 | Data processing method, device, clustered node and the storage medium of block chain network |
CN108932297A (en) * | 2018-06-01 | 2018-12-04 | 阿里巴巴集团控股有限公司 | A kind of data query, data sharing method, device and equipment |
CN109412953A (en) * | 2018-12-27 | 2019-03-01 | 北京比新科技有限公司 | A kind of routing iinformation exchange method based on block chain overlay network |
CN110990408A (en) * | 2019-12-02 | 2020-04-10 | 中国银行股份有限公司 | Block chain-based business information cooperation method, business system and alliance chain |
Also Published As
Publication number | Publication date |
---|---|
CN111835570A (en) | 2020-10-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106130882B (en) | The method and apparatus for being used for transmission message | |
CN102333029B (en) | Routing method in server cluster system | |
US7991835B2 (en) | Distributed client services based on execution of service attributes and data attributes by multiple nodes in resource groups | |
CN107888666B (en) | Cross-region data storage system and data synchronization method and device | |
CN102708165B (en) | Document handling method in distributed file system and device | |
US7970856B2 (en) | System and method for managing and distributing assets over a network | |
US8250171B2 (en) | Content delivery apparatus, content delivery method, and content delivery program | |
CN103166991B (en) | Cross nodal point storage implementation method and device based on P2P and cloud storage | |
CN101449559A (en) | Distributed storage | |
CN110968586A (en) | Distributed transaction processing method and device | |
KR101545626B1 (en) | System for interoperation between dds and dbms | |
CN109684282A (en) | A kind of method and device constructing metadata cache | |
CN109873855A (en) | A kind of resource acquiring method and system based on block chain network | |
CN101330431B (en) | Method and system for storing instant information | |
CN102012899A (en) | Method, system and equipment for updating data | |
CN111460038A (en) | Quasi-real-time data synchronization method and device | |
CN111835570B (en) | Global state persistence decentralized blockchain network node device and working method | |
CN110012050A (en) | Message Processing, storage method, apparatus and system | |
RU2586598C2 (en) | Data replication | |
US6687221B1 (en) | Communication management control system, communication control unit therefor and computer program product | |
CN105354312A (en) | File storage method and method, and file downloading method and system | |
US20080307045A1 (en) | Method, system and apparatus for managing directory information | |
US20140025630A1 (en) | Data-store management apparatus, data providing system, and data providing method | |
CN101610289A (en) | The methods, devices and systems of data download and node | |
CN112001800B (en) | Method and device for processing business in block chain 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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |