CN113364693A - Block chain data distribution method and system based on type attribute information - Google Patents

Block chain data distribution method and system based on type attribute information Download PDF

Info

Publication number
CN113364693A
CN113364693A CN202110916417.2A CN202110916417A CN113364693A CN 113364693 A CN113364693 A CN 113364693A CN 202110916417 A CN202110916417 A CN 202110916417A CN 113364693 A CN113364693 A CN 113364693A
Authority
CN
China
Prior art keywords
node
data
routing table
type
attribute 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.)
Granted
Application number
CN202110916417.2A
Other languages
Chinese (zh)
Other versions
CN113364693B (en
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.)
Guowang Xiongan Finance Technology Group Co ltd
State Grid Blockchain Technology Beijing Co ltd
State Grid Digital Technology Holdings Co ltd
Original Assignee
Guowang Xiongan Finance Technology Group Co ltd
State Grid Blockchain Technology Beijing Co ltd
State Grid E Commerce 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 Guowang Xiongan Finance Technology Group Co ltd, State Grid Blockchain Technology Beijing Co ltd, State Grid E Commerce Co Ltd filed Critical Guowang Xiongan Finance Technology Group Co ltd
Priority to CN202110916417.2A priority Critical patent/CN113364693B/en
Publication of CN113364693A publication Critical patent/CN113364693A/en
Application granted granted Critical
Publication of CN113364693B publication Critical patent/CN113364693B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/54Organization of routing tables

Abstract

The invention discloses a block chain data distribution method and a system based on type attribute information, wherein the method comprises the following steps: each node on the block chain generates a dynamic routing table based on the type attribute information of the node; and each node on the block chain transmits data based on the dynamic routing table corresponding to the node. By adopting the routing table with the node type attribute information, the invention can reduce the number of unnecessary nodes participating in consensus on the premise of ensuring the normal transmission of data, reduce the unnecessary data transmission among the nodes, reduce the network load and improve the data transmission efficiency.

Description

Block chain data distribution method and system based on type attribute information
Technical Field
The present invention relates to the field of blockchain technologies, and in particular, to a method and a system for distributing blockchain data based on type attribute information.
Background
In the application of the block chain in the power grid, a large number of data acquisition nodes can be accessed, wherein the data acquisition nodes comprise equipment monitoring sensor network nodes, industrial internet control nodes, equipment operation and maintenance side nodes, power plants and the like. The data of the nodes need to be uploaded to a block chain network, the current power grid system is of a layered central structure, the data acquisition nodes are dispersed in the power internet and are connected with a central server in the organization, and the central server reports the data layer by layer.
After the block chain is introduced, for data uplink, a direct uplink mode can be adopted, the data acquisition node is directly added into the block chain network, block chain service is deployed at the end of data acquisition equipment, uplink data is directly sent to other nodes of the block chain in a broadcasting mode, and the data uplink is realized by packing the uplink data into blocks by a billing node. The direct uplink has the disadvantage that the number of nodes of the whole block chain is greatly increased, and especially for a alliance chain, originally, several or dozens of nodes may become thousands or even more nodes, so that the consensus time is greatly influenced, the consensus time is increased by thousands or tens of thousands times, and the overall efficiency is reduced.
Therefore, how to effectively reduce the consensus time and improve the data distribution efficiency during data distribution is an urgent problem to be solved.
Disclosure of Invention
In view of this, the invention provides a block chain data distribution method based on type attribute information, which can effectively reduce consensus time and effectively improve data distribution efficiency during data distribution.
The invention provides a block chain data distribution method based on type attribute information, which comprises the following steps:
each node on the block chain generates a dynamic routing table based on the type attribute information of the node;
and each node on the block chain transmits data based on the dynamic routing table corresponding to the node.
Preferably, each node on the block chain generates a dynamic routing table based on the type attribute information of the node, respectively, including:
the nodes on the block chain respectively send messages containing the type attribute information of the nodes;
a node on a block chain receives messages containing type attribute information of the node sent by other nodes on the block chain;
analyzing the received message containing the type attribute information of the node to obtain message analysis data;
judging the message analysis data, judging whether to add the message analysis data into a routing table of the node according to preset conditions, if so, then:
judging the type attribute of the message analysis data, and classifying adjacent nodes according to different types to obtain a classification result;
and modifying the original routing table of the node based on the classification result to generate a dynamic routing table containing type attribute information.
Preferably, each node on the block chain transmits data based on a dynamic routing table corresponding to the node, and the method includes:
reading a dynamic routing table of a node, and acquiring type attribute information of an adjacent node in the dynamic routing table of the node;
reading a data distribution rule of a node, wherein the data distribution rule comprises: a node type data sending rule;
and acquiring the sending node information of the corresponding type from the dynamic routing table of the node based on the node type data sending rule, and sending the specific data to the node of the corresponding type.
Preferably, the data distribution rule further includes: the method comprises the following steps of receiving a node type data receiving rule, and after the data distribution rule of the reading node, the method further comprises the following steps:
receiving broadcast data;
judging whether the received broadcast data accords with the node type data receiving rule, if so, then:
writing the received broadcast data into a cache;
performing account book verification on the received broadcast data, and judging whether consensus is achieved, if so:
and storing the broadcast data in a certificate uplink.
Preferably, the dynamic routing table includes: type of neighboring node and IP information.
A system for blockchain data distribution based on type attribute information, comprising:
the routing table initialization module is used for generating a dynamic routing table by each node on the block chain based on the type attribute information of the node;
and the data transmission module is used for transmitting data by each node on the block chain based on the dynamic routing table corresponding to the node.
Preferably, the routing table initialization module includes: the network detection module and the routing table maintenance module; wherein:
the network detection module is used for respectively sending messages containing type attribute information of the nodes by the nodes on the block chain;
the network detection module is also used for receiving messages containing the type attribute information of the nodes sent by other nodes on the block chain by the nodes on the block chain;
the network detection module is also used for analyzing the received message containing the type attribute information of the node to obtain message analysis data;
the network detection module is further configured to determine the packet analysis data, and determine whether to add the packet analysis data into a routing table of the node according to a preset condition;
the routing table maintenance module is used for judging the type attribute of the message analysis data when judging to add the message analysis data into the routing table of the node according to preset conditions, and classifying adjacent nodes according to different types to obtain a classification result;
and the routing table maintenance module is also used for modifying the original routing table of the node based on the classification result and generating a dynamic routing table containing type attribute information.
Preferably, the data transmission module includes:
the first reading module is used for reading a dynamic routing table of a node and acquiring the type attribute information of an adjacent node in the dynamic routing table of the node;
a second reading module, configured to read a data distribution rule of a node, where the data distribution rule includes: a node type data sending rule;
and the data sending module is used for acquiring sending node information of a corresponding type from the dynamic routing table of the node based on the node type data sending rule and sending specific data to the node of the corresponding type.
Preferably, the data distribution rule further includes: the node type data receiving rule, the data transmission module further includes:
a receiving module for receiving broadcast data;
the judging module is used for judging whether the received broadcast data conforms to the node type data receiving rule or not;
a writing module, configured to write the received broadcast data into a cache when the received broadcast data conforms to the node type data receiving rule;
the account book verification module is used for performing account book verification on the received broadcast data and judging whether consensus is achieved;
and the evidence uplink storing module is used for storing the broadcast data into an evidence uplink when the common identification is achieved.
Preferably, the dynamic routing table includes: type of neighboring node and IP information.
In summary, the present invention discloses a method for distributing blockchain data based on type attribute information, wherein when data needs to be distributed, first, each node in a blockchain generates a dynamic routing table based on the type attribute information of the node, and then each node in the blockchain transmits the data based on the dynamic routing table corresponding to the node. The invention can generate the dynamic routing table based on the type attribute information of the node to distribute the data, thereby effectively reducing the consensus time and improving the efficiency of data distribution.
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.
Fig. 1 is a flowchart of a method of an embodiment of a method for distributing blockchain data based on type attribute information according to the present disclosure;
FIG. 2 is a flow chart of a method for updating a routing table according to the present invention;
FIG. 3 is a flow chart of a method for data distribution according to the present disclosure;
FIG. 4 is a schematic structural diagram of an embodiment of a system for distributing blockchain data based on type attribute information according to the present invention;
FIG. 5 is a schematic structural diagram of a routing table initialization module according to the present invention;
fig. 6 is a schematic structural diagram of a data transmission module disclosed in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, 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 invention.
As shown in fig. 1, which is a flowchart of an embodiment 1 of a method for distributing blockchain data based on type attribute information disclosed in the present invention, the method may include the following steps:
s101, each node on the block chain generates a dynamic routing table based on the type attribute information of the node;
when data needs to be distributed, firstly, each node on the block chain generates a dynamic routing table corresponding to each node according to the type attribute information of the adjacent node.
S102, each node on the block chain transmits data based on the dynamic routing table corresponding to the node.
Then, when data is distributed, each node on the block chain distributes the data to the nodes with the attributes meeting the rule requirements according to the corresponding dynamic routing table.
In summary, in the above embodiment, when data needs to be distributed, first, each node in the block chain generates a dynamic routing table based on the type attribute information of the node, and then each node in the block chain transmits the data based on the dynamic routing table corresponding to the node. By adopting the routing table with the node type attribute information, the number of unnecessary nodes participating in consensus can be reduced on the premise of ensuring normal data transmission, unnecessary data transmission among the nodes is reduced, network load is reduced, and data transmission efficiency is improved.
Specifically, in the foregoing embodiment, one implementation manner of generating the dynamic routing table by each node on the blockchain based on the type attribute information of the node is shown in fig. 2, and may include the following steps:
s201, respectively sending messages containing type attribute information of nodes by the nodes on the block chain;
and aiming at each node on the block chain, when a dynamic routing table of each node needs to be generated, each node on the block chain respectively starts to detect the routing table and sends a message containing the type attribute information of the node.
S202, receiving messages containing type attribute information of nodes sent by other nodes on a block chain by the nodes on the block chain;
when each node in the block chain sends a message containing the type attribute information of the node, each node in the block chain receives messages containing the type attribute information of the node sent by other nodes in the block chain by monitoring the specific port of the node.
S203, analyzing the received message containing the type attribute information of the node to obtain message analysis data;
after receiving messages containing the type attribute information of the nodes sent by other nodes on the block chain, further analyzing the received messages containing the type attribute information of the nodes to obtain message analysis data.
S204, judging the message analysis data, judging whether to add the message analysis data into a routing table of the node according to preset conditions, if so, then:
and then, judging the message analysis data, and judging whether to add the message analysis data into a routing table of the node according to a preset condition. And when the preset condition of adding the routing table of the node is not met, restarting to execute the step that the nodes on the block chain respectively send the messages containing the type attribute information of the nodes. The preset conditions can be flexibly set according to actual requirements. For example, the network detection module may determine node attributes and calculate distances between nodes by broadcasting block link points in the detection network, and record nodes whose distances satisfy certain conditions in the routing table of the node.
S205, judging the type attribute of the message analysis data, and classifying adjacent nodes according to different types to obtain a classification result;
and when the preset condition of the routing table added to the node is met, further performing type attribute judgment on the message analysis data, and classifying the adjacent nodes according to different types according to the judgment result.
S206, modifying the original routing table of the node based on the classification result, and generating a dynamic routing table containing type attribute information.
And finally, modifying the original routing table of the node according to the classification result to generate a dynamic routing table containing type attribute information. Each node on the block chain respectively maintains an IP information table of an adjacent node, wherein the IP information table comprises attribute information and IP information of the adjacent node, that is, a routing table maintained by each node dynamically changes according to network detection conditions.
Specifically, in the above embodiment, one implementation manner of each node in the block chain transmitting data based on the dynamic routing table corresponding to the node is shown in fig. 3, and may include the following steps:
s301, reading a dynamic routing table of a node, and acquiring type attribute information of an adjacent node in the dynamic routing table of the node;
when a node on the block chain needs to transmit data, a dynamic routing table corresponding to the node is read first, and type attribute information of an adjacent node is read in the dynamic routing table. Wherein the type attribute information includes the type and IP information of the neighboring node.
S302, reading a data distribution rule of the node, wherein the data distribution rule comprises the following steps: a node type data sending rule and a node type data receiving rule;
and then, reading the data distribution rule to obtain the data distribution rule related to the node type. Wherein, the data distribution rule comprises: a node type data sending rule and a node type data receiving rule.
S303, when the data distribution rule is a node type data sending rule, based on the node type data sending rule, obtaining sending node information of a corresponding type from a dynamic routing table of the node, and sending specific data to the node of the corresponding type;
when the data distribution rule is a node type data sending rule, the node acquires sending node information of a corresponding type from the dynamic routing table, wherein the sending node information comprises information such as IP (Internet protocol), ports and the like, and then sends specific data to the node of the corresponding type according to the rule.
S304, when the data distribution rule is a node type data receiving rule, receiving broadcast data;
when the data distribution rule is a node-type data reception rule, broadcast data is received first.
S305, judging whether the received broadcast data accords with the node type data receiving rule, if so, entering S306:
and then the node judges whether the broadcast data accords with a data receiving rule corresponding to the node type, if not, the broadcast data is discarded, the port is monitored continuously, and new broadcast data is received.
S306, writing the received broadcast data into a cache;
and when the received broadcast data accords with the node type data receiving rule, writing the received broadcast data into the cache, continuing monitoring the port, and receiving new broadcast data.
S307, performing account book verification on the received broadcast data, judging whether consensus is achieved, if yes, entering S308:
then, the received broadcast data is subjected to account book verification to judge whether consensus is achieved. If the consensus is not reached, the broadcast data is discarded.
S308, the broadcast data is stored and uplink is carried out.
If the agreement is achieved, the agreed upon broadcast data is credited uplink.
To further illustrate the technical solution of the present invention, the following is described with specific examples:
as shown in table 1, a routing table is provided for this example. In the routing table of this example, type a represents a data collection node, type B represents an accounting node, and type C represents a policing node.
Table 1 routing table
Figure 31611DEST_PATH_IMAGE001
First, a routing table is initialized. Each node accessing the blockchain reads an initialized routing table from the database when the node program is started. The initialized routing table has two sources, if the node is a restarting node, the initialized routing table is the last routing table maintained by the node before restarting, and if the node is added into the block chain network for the first time, the routing table is a long-term active or stable node IP carried by the node program.
Then, according to the system rule, reading the initialized routing table, and sending message information through a port in the initialized routing table, wherein the message information comprises the IP address of the node, the network service information, the type information, the time information, the detected adjacent node information and necessary verification information. Then, monitoring a preset interface, receiving the message information, analyzing the network service of the adjacent node and calculating the network delay. And judging whether the network service and the network delay meet the requirement of the routing table of the current node, and if not, continuing to send and receive the message. If the routing table meets the requirement, the message information is analyzed, the information of the type, IP, port and the like of the adjacent node is obtained, and then the initialized routing table is updated.
In the process of chaining the collected power grid data, firstly, the power grid data collection node collects the power grid related data and signs the data.
And then, a data transmission module of the data acquisition node reads a preset rule and a routing table, and for the data acquisition node, the data transmission module is positioned at the most marginal end of the whole block chain network, so that the data acquisition node does not need to have the capacity to participate in accounting rights competition and does not store blocks. So the routing rule for data collection node is a- > B, i.e. data of data collection node a is only broadcast to accounting node B.
And broadcasting the signed data and the certificate address by a data transmission module of the data acquisition node according to the IP address of the type B in the distributed routing table.
And the data transmission module of the accounting node receives the data sent by the data transmission module of the data acquisition node, and stores the data in the data cache.
And starting an account book verification module according to the signature data received by the data transmission module of the accounting node, analyzing and obtaining the public key of the node according to the certificate address, verifying the signature through the public key, passing the verification, and writing the signature into a block chain to be generated.
The accounting node starts an accounting right contention module to contend for accounting right.
And the data transmission module of the node acquiring the accounting right reads a preset rule and reads a classified dynamic routing table, wherein the type A in the dynamic routing table represents a data acquisition node, the type B represents an accounting node, and the type C represents a supervision node. For a new block, the predetermined rule is B- > BC needs to broadcast all nodes except type A.
And the data transmission module of the node acquiring the accounting right proves the IP addresses corresponding to the broadcast type B, the broadcast type C and the node by the new block and the accounting right.
In summary, the present invention employs a classified routing technology to directly access all nodes to the blockchain network, so that the capacity of the blockchain network is greatly increased, the data security is ensured, and meanwhile, the performance degradation caused by the increase of nodes is avoided. By adopting the routing table with the attribute information, the number of unnecessary nodes participating in consensus can be reduced on the premise of ensuring normal data transmission, unnecessary data transmission among the nodes is reduced, network load is reduced, and transmission efficiency is improved. Through testing, compared with a direct uplink mode, the time required for achieving consensus by adopting the method of the patent is reduced by 95% under the virtual machine testing environment of the Ethernet with 100 nodes. In the aspect of safety, compared with the existing central data uploading process, the data uploading and modification need to be agreed by all accounting nodes in the block chain, so that the possibility of data tampering is greatly reduced, and the safety of the system is greatly improved.
As shown in fig. 4, which is a schematic structural diagram of an embodiment 1 of a system for distributing blockchain data based on type attribute information disclosed in the present invention, the system may include:
a routing table initialization module 401, configured to generate a dynamic routing table based on type attribute information of each node on the block chain;
when data needs to be distributed, firstly, each node on the block chain generates a dynamic routing table corresponding to each node according to the type attribute information of the adjacent node.
And a data transmission module 402, configured to transmit data by each node in the block chain based on the dynamic routing table corresponding to the node.
Then, when data is distributed, each node on the block chain distributes the data to the nodes with the attributes meeting the rule requirements according to the corresponding dynamic routing table.
In summary, in the above embodiment, when data needs to be distributed, first, each node in the block chain generates a dynamic routing table based on the type attribute information of the node, and then each node in the block chain transmits the data based on the dynamic routing table corresponding to the node. By adopting the routing table with the node type attribute information, the number of unnecessary nodes participating in consensus can be reduced on the premise of ensuring normal data transmission, unnecessary data transmission among the nodes is reduced, network load is reduced, and data transmission efficiency is improved.
Specifically, in the foregoing embodiment, one of the structures of the routing table initialization module is shown in fig. 5, and may include: a network detection module 501 and a routing table maintenance module 502, wherein:
a network detection module 501, configured to send, by a node in a block chain, a packet including type attribute information of the node;
and aiming at each node on the block chain, when a dynamic routing table of each node needs to be generated, each node on the block chain respectively starts to detect the routing table and sends a message containing the type attribute information of the node.
The network detection module 501 is further configured to receive, by a node in the block chain, a packet that includes type attribute information of the node and is sent by another node in the block chain;
when each node in the block chain sends a message containing the type attribute information of the node, each node in the block chain receives messages containing the type attribute information of the node sent by other nodes in the block chain by monitoring the specific port of the node.
The network detection module 501 is further configured to analyze the received message including the type attribute information of the node, so as to obtain message analysis data;
after receiving messages containing the type attribute information of the nodes sent by other nodes on the block chain, further analyzing the received messages containing the type attribute information of the nodes to obtain message analysis data.
The network detection module 501 is further configured to determine the packet analysis data, and determine whether to add the packet analysis data into the routing table of the node according to a preset condition;
and then, judging the message analysis data, and judging whether to add the message analysis data into a routing table of the node according to a preset condition. And when the preset condition of adding the routing table of the node is not met, restarting to execute the step that the nodes on the block chain respectively send the messages containing the type attribute information of the nodes. The preset conditions can be flexibly set according to actual requirements. For example, the network detection module may determine node attributes and calculate distances between nodes by broadcasting block link points in the detection network, and record nodes whose distances satisfy certain conditions in the routing table of the node.
A routing table maintenance module 502, configured to, when judging to add to the routing table of the node according to a preset condition, perform type attribute judgment on the packet analysis data, and classify adjacent nodes according to different types to obtain a classification result;
and when the preset condition of the routing table added to the node is met, further performing type attribute judgment on the message analysis data, and classifying the adjacent nodes according to different types according to the judgment result.
The routing table maintenance module 502 is further configured to modify the original routing table of the node based on the classification result, and generate a dynamic routing table containing type attribute information.
And finally, modifying the original routing table of the node according to the classification result to generate a dynamic routing table containing type attribute information. Each node on the block chain respectively maintains an IP information table of an adjacent node, wherein the IP information table comprises attribute information and IP information of the adjacent node, that is, a routing table maintained by each node dynamically changes according to network detection conditions.
Specifically, in the above embodiment, one of the structures of the data transmission module is as shown in fig. 6, and may include:
a first reading module 601, configured to read a dynamic routing table of a node, and obtain type attribute information of an adjacent node in the dynamic routing table of the node;
when a node on the block chain needs to transmit data, a dynamic routing table corresponding to the node is read first, and type attribute information of an adjacent node is read in the dynamic routing table. Wherein the type attribute information includes the type and IP information of the neighboring node.
A second reading module 602, configured to read a data distribution rule of a node, where the data distribution rule includes: a node type data sending rule and a node type data receiving rule;
and then, reading the data distribution rule to obtain the data distribution rule related to the node type. Wherein, the data distribution rule comprises: a node type data sending rule and a node type data receiving rule.
A data sending module 603, configured to, when the data distribution rule is a node type data sending rule, obtain, based on the node type data sending rule, sending node information of a corresponding type from a dynamic routing table of a node, and send specific data to the node of the corresponding type;
when the data distribution rule is a node type data sending rule, the node acquires sending node information of a corresponding type from the dynamic routing table, wherein the sending node information comprises information such as IP (Internet protocol), ports and the like, and then sends specific data to the node of the corresponding type according to the rule.
A receiving module 604, configured to receive broadcast data when the data distribution rule is a node type data receiving rule;
when the data distribution rule is a node-type data reception rule, broadcast data is received first.
A determining module 605, configured to determine whether the received broadcast data meets a node type data receiving rule;
and then the node judges whether the broadcast data accords with a data receiving rule corresponding to the node type, if not, the broadcast data is discarded, the port is monitored continuously, and new broadcast data is received.
A writing module 606, configured to write the received broadcast data into a cache when the received broadcast data meets the node type data receiving rule;
and when the received broadcast data accords with the node type data receiving rule, writing the received broadcast data into the cache, continuing monitoring the port, and receiving new broadcast data.
The account book verification module 607 is configured to perform account book verification on the received broadcast data, and determine whether consensus is achieved;
then, the received broadcast data is subjected to account book verification to judge whether consensus is achieved. If the consensus is not reached, the broadcast data is discarded.
A evidence uplink module 608 for broadcasting data evidence uplink when the consensus is achieved.
If the agreement is achieved, the agreed upon broadcast data is credited uplink.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for distributing blockchain data based on type attribute information is characterized by comprising the following steps:
each node on the block chain generates a dynamic routing table based on the type attribute information of the node;
and each node on the block chain transmits data based on the dynamic routing table corresponding to the node.
2. The method of claim 1, wherein each node on the blockchain generates a dynamic routing table based on type attribute information of the node, respectively, and comprises:
the nodes on the block chain respectively send messages containing the type attribute information of the nodes;
a node on a block chain receives messages containing type attribute information of the node sent by other nodes on the block chain;
analyzing the received message containing the type attribute information of the node to obtain message analysis data;
judging the message analysis data, judging whether to add the message analysis data into a routing table of the node according to preset conditions, if so, then:
judging the type attribute of the message analysis data, and classifying adjacent nodes according to different types to obtain a classification result;
and modifying the original routing table of the node based on the classification result to generate a dynamic routing table containing type attribute information.
3. The method according to claim 1, wherein each node in the block chain transmits data based on a dynamic routing table corresponding to the node, respectively, and the method comprises:
reading a dynamic routing table of a node, and acquiring type attribute information of an adjacent node in the dynamic routing table of the node;
reading a data distribution rule of a node, wherein the data distribution rule comprises: a node type data sending rule;
and acquiring the sending node information of the corresponding type from the dynamic routing table of the node based on the node type data sending rule, and sending the specific data to the node of the corresponding type.
4. The method of claim 3, wherein the data distribution rule further comprises: the method comprises the following steps of receiving a node type data receiving rule, and after the data distribution rule of the reading node, the method further comprises the following steps:
receiving broadcast data;
judging whether the received broadcast data accords with the node type data receiving rule, if so, then:
writing the received broadcast data into a cache;
performing account book verification on the received broadcast data, and judging whether consensus is achieved, if so:
and storing the broadcast data in a certificate uplink.
5. The method of claim 1, wherein the dynamic routing table comprises: type of neighboring node and IP information.
6. A system for blockchain data distribution based on type attribute information, comprising:
the routing table initialization module is used for generating a dynamic routing table by each node on the block chain based on the type attribute information of the node;
and the data transmission module is used for transmitting data by each node on the block chain based on the dynamic routing table corresponding to the node.
7. The system of claim 6, wherein the routing table initialization module comprises: the network detection module and the routing table maintenance module; wherein:
the network detection module is used for respectively sending messages containing type attribute information of the nodes by the nodes on the block chain;
the network detection module is also used for receiving messages containing the type attribute information of the nodes sent by other nodes on the block chain by the nodes on the block chain;
the network detection module is also used for analyzing the received message containing the type attribute information of the node to obtain message analysis data;
the network detection module is further configured to determine the packet analysis data, and determine whether to add the packet analysis data into a routing table of the node according to a preset condition;
the routing table maintenance module is used for judging the type attribute of the message analysis data when judging to add the message analysis data into the routing table of the node according to preset conditions, and classifying adjacent nodes according to different types to obtain a classification result;
and the routing table maintenance module is also used for modifying the original routing table of the node based on the classification result and generating a dynamic routing table containing type attribute information.
8. The system of claim 6, wherein the data transmission module comprises:
the first reading module is used for reading a dynamic routing table of a node and acquiring the type attribute information of an adjacent node in the dynamic routing table of the node;
a second reading module, configured to read a data distribution rule of a node, where the data distribution rule includes: a node type data sending rule;
and the data sending module is used for acquiring sending node information of a corresponding type from the dynamic routing table of the node based on the node type data sending rule and sending specific data to the node of the corresponding type.
9. The system according to claim 8, wherein the data distribution rule further comprises: the node type data receiving rule, the data transmission module further includes:
a receiving module for receiving broadcast data;
the judging module is used for judging whether the received broadcast data conforms to the node type data receiving rule or not;
a writing module, configured to write the received broadcast data into a cache when the received broadcast data conforms to the node type data receiving rule;
the account book verification module is used for performing account book verification on the received broadcast data and judging whether consensus is achieved;
and the evidence uplink storing module is used for storing the broadcast data into an evidence uplink when the common identification is achieved.
10. The system of claim 6, wherein the dynamic routing table comprises: type of neighboring node and IP information.
CN202110916417.2A 2021-08-11 2021-08-11 Block chain data distribution method and system based on type attribute information Active CN113364693B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110916417.2A CN113364693B (en) 2021-08-11 2021-08-11 Block chain data distribution method and system based on type attribute information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110916417.2A CN113364693B (en) 2021-08-11 2021-08-11 Block chain data distribution method and system based on type attribute information

Publications (2)

Publication Number Publication Date
CN113364693A true CN113364693A (en) 2021-09-07
CN113364693B CN113364693B (en) 2021-10-29

Family

ID=77522952

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110916417.2A Active CN113364693B (en) 2021-08-11 2021-08-11 Block chain data distribution method and system based on type attribute information

Country Status (1)

Country Link
CN (1) CN113364693B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180337847A1 (en) * 2017-05-16 2018-11-22 Peking University Shenzhen Graduate School Indexing a multi-layer blockchain system
CN110324415A (en) * 2019-06-28 2019-10-11 百度在线网络技术(北京)有限公司 A kind of route implementation method of peer-to-peer network, device, equipment and medium
CN111917868A (en) * 2020-07-29 2020-11-10 数网金融有限公司 Addressing method and device for block chain node, routing equipment and storage medium
CN111934997A (en) * 2020-09-25 2020-11-13 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN111934999A (en) * 2020-09-25 2020-11-13 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN111935000A (en) * 2020-09-25 2020-11-13 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN112200681A (en) * 2020-12-04 2021-01-08 腾讯科技(深圳)有限公司 Service processing method, information processing method and node equipment of block chain network
CN112231741A (en) * 2020-12-14 2021-01-15 腾讯科技(深圳)有限公司 Data processing method, device, medium and electronic equipment based on block chain system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180337847A1 (en) * 2017-05-16 2018-11-22 Peking University Shenzhen Graduate School Indexing a multi-layer blockchain system
CN110324415A (en) * 2019-06-28 2019-10-11 百度在线网络技术(北京)有限公司 A kind of route implementation method of peer-to-peer network, device, equipment and medium
CN111917868A (en) * 2020-07-29 2020-11-10 数网金融有限公司 Addressing method and device for block chain node, routing equipment and storage medium
CN111934997A (en) * 2020-09-25 2020-11-13 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN111934999A (en) * 2020-09-25 2020-11-13 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN111935000A (en) * 2020-09-25 2020-11-13 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN113079079A (en) * 2020-09-25 2021-07-06 支付宝(杭州)信息技术有限公司 Message transmission method and device
CN112200681A (en) * 2020-12-04 2021-01-08 腾讯科技(深圳)有限公司 Service processing method, information processing method and node equipment of block chain network
CN112231741A (en) * 2020-12-14 2021-01-15 腾讯科技(深圳)有限公司 Data processing method, device, medium and electronic equipment based on block chain system

Also Published As

Publication number Publication date
CN113364693B (en) 2021-10-29

Similar Documents

Publication Publication Date Title
CN109587125B (en) Network security big data analysis method, system and related device
De Domenico et al. Modeling structure and resilience of the dark network
CN110535727B (en) Asset identification method and device
CN110209820A (en) User identifier detection method, device and storage medium
CN108259269A (en) The monitoring method and system of the network equipment
CN107769992B (en) Message parsing and shunting method and device
CN113225339B (en) Network security monitoring method and device, computer equipment and storage medium
CN113938524B (en) Method and system for monitoring sensitive information leakage of Internet of things terminal based on flow agent
CN112256542A (en) eBPF-based micro-service system performance detection method, device and system
CN107168844B (en) Performance monitoring method and device
CN111343003A (en) Data analysis method and device based on block chain and SDN edge computing network system
CN110620777A (en) Smoke monitoring data uplink method and system of Internet of things on block chain
CN110177024B (en) Monitoring method of hotspot equipment, client, server and system
CN111679978A (en) Program testing method, program testing device, electronic equipment and storage medium
CN111275495A (en) Advertisement putting monitoring method, device and system based on block chain
CN113315785B (en) Alarm reduction method, device, equipment and computer readable storage medium
WO2021233109A1 (en) Blockchain-based message processing method and apparatus, and device and storage medium
CN112202647B (en) Test method, device and test equipment in block chain network
CN102271331A (en) Method and system for detecting reliability of service provider (SP) site
CN111680282B (en) Node management method, device, equipment and medium based on block chain network
CN113364693B (en) Block chain data distribution method and system based on type attribute information
CN112306871A (en) Data processing method, device, equipment and storage medium
CN110619023A (en) Water source detection data chaining method and device of Internet of things by combining block chains
CN116546028A (en) Service request processing method and device, storage medium and electronic equipment
CN115603938A (en) Attack protection method, terminal device and computer readable storage medium

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
CP03 Change of name, title or address
CP03 Change of name, title or address

Address after: 100032 room 8018, 8 / F, building 7, Guangyi street, Xicheng District, Beijing

Patentee after: State Grid Digital Technology Holdings Co.,Ltd.

Patentee after: State Grid blockchain Technology (Beijing) Co.,Ltd.

Patentee after: Guowang Xiongan Finance Technology Group Co.,Ltd.

Address before: 100053 room 8018, 8 / F, building 7, Guangyi street, Xicheng District, Beijing

Patentee before: STATE GRID ELECTRONIC COMMERCE Co.,Ltd.

Patentee before: State Grid blockchain Technology (Beijing) Co.,Ltd.

Patentee before: Guowang Xiongan Finance Technology Group Co.,Ltd.