CN109451039B - Network information transmission processing method - Google Patents

Network information transmission processing method Download PDF

Info

Publication number
CN109451039B
CN109451039B CN201811496088.5A CN201811496088A CN109451039B CN 109451039 B CN109451039 B CN 109451039B CN 201811496088 A CN201811496088 A CN 201811496088A CN 109451039 B CN109451039 B CN 109451039B
Authority
CN
China
Prior art keywords
node
network
nodes
neighbor
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.)
Active
Application number
CN201811496088.5A
Other languages
Chinese (zh)
Other versions
CN109451039A (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.)
Shanghai Distributed Technologies Co ltd
Original Assignee
Shanghai Distributed Technologies 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 Shanghai Distributed Technologies Co ltd filed Critical Shanghai Distributed Technologies Co ltd
Priority to CN201811496088.5A priority Critical patent/CN109451039B/en
Publication of CN109451039A publication Critical patent/CN109451039A/en
Application granted granted Critical
Publication of CN109451039B publication Critical patent/CN109451039B/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
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

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 network information transmission processing method, which comprises the following steps: the method comprises a network adaptability adjusting step, a network consensus step and a network fault tolerance processing step. The method comprises the steps of estimating the total points of a network to obtain an estimated value of the total number of network nodes, adjusting network parameters according to the estimated value of the total number of the network nodes, and initializing a link pool of a neighbor node when a new node is started, so that the adaptability of the network is improved, and the influence of the change of the total number of the network nodes on the stability of the network is prevented; the link of the node is adjusted through the information transmission modes of active broadcast and passive broadcast, so that the transmission efficiency of network information is ensured; the link state of the network is detected, the failed link is processed, the neighbor node link pool is adjusted after consensus switching, and the fault tolerance of the network is improved.

Description

Network information transmission processing method
Technical Field
The present invention relates to the field of block chain technology, and in particular, to a network information transmission processing method.
Background
As a distributed open network, the blockchain network needs to provide a fast, safe and stable P2P network information transmission processing method, so as to implement high-performance information propagation, consensus protocol, and the like on an upper layer.
Due to the openness of the block chain network, the information transmission processing method cannot estimate the number of nodes in the network, so that the number of neighbor nodes of each node cannot be adjusted, and the adaptability of the network is poor; most of the current blockchain systems are not peer-to-peer systems, so that the information broadcasting efficiency of the network is very low; and the existing broadcast algorithm has low fault tolerance.
Chinese patent application publication No. CN108108487A discloses a method for consensus of blockchain, wherein after a blockchain system generates a block, N verifiers (validators) are randomly selected to vote on the validity of the previous block in the next round of consensus, and if the validators have different opinions, the voting is continued until the validity of the previous block can be determined. The node number in the network is not estimated, when the network node number is changed greatly, the adaptability of the network is deteriorated, so that the stability of the network is seriously influenced, the network information transmission mode is single, the information transmission is limited, the information broadcasting efficiency is low, the link state of the network node cannot be detected, and the fault tolerance of the broadcasting algorithm is relatively low.
Disclosure of Invention
The invention aims to provide a network information transmission processing method to improve the broadcasting efficiency and the fault tolerance and adaptability of a network.
In order to achieve the above object, a network information transmission processing method according to the present invention includes: a network adaptability adjusting step, a network consensus step and a network fault tolerance processing step;
the network adaptation step comprises: estimating the total node number of the network through sampling estimation to obtain an estimated value of the total number of network nodes, then performing adaptive processing on network parameters according to the estimated value of the total number of the network nodes, and initializing a link pool of a neighbor node when a new node is started;
the network consensus step comprises: performing network consensus through an information transmission mode of active broadcasting and passive broadcasting, and performing consensus processing on nodes according to the information transmission mode and a request source;
the network fault tolerance processing step comprises the following steps: and performing link detection on the link state through the active broadcast and the passive broadcast, performing link failure processing on related nodes after judging that the information transmission fails, and performing consensus switching processing on the nodes according to the types of the link pools of the neighbor nodes.
The invention has the beneficial effects that: the method comprises the steps of estimating the total points of a network to obtain an estimated value of the total number of network nodes, adjusting network parameters according to the estimated value of the total number of the network nodes, and initializing a link pool of a neighbor node when a new node is started, so that the adaptability of the network is improved, and the influence of the change of the total number of the network nodes on the stability of the network is prevented; the link of the node is adjusted through the information transmission modes of active broadcast and passive broadcast, so that the transmission efficiency of network information is ensured; the link state of the network is detected, the failed link is processed, the neighbor node link pool is adjusted after consensus switching, and the fault tolerance of the network is improved.
Preferably, the neighbor nodes include active neighbor nodes and passive neighbor nodes.
Preferably, the active broadcast is that after any node receives information, the information is transmitted to the active neighbor node, and the beneficial effects are that: and the information transmission mode between adjacent nodes is activated, so that the information transmission efficiency is improved.
Preferably, the passive broadcast is that after any node receives information, the information is periodically transmitted to the passive neighbor node, and the passive neighbor node detects its own message pool and judges whether to store the information, which has the advantages that: and the information transmission mode between the passive neighbor nodes improves the information transmission efficiency.
Preferably, the sampling estimation comprises:
s11: the network randomly selects a node as a seed node, and the seed node generates a random number;
s12: the seed node counts the number of synchronous nodes in the neighbor node of the seed node to obtain a seed counting result;
s13: the seed node obtains seed sampling information by constructing an information formula according to the random number and the seed statistical result, and the seed node stores the seed sampling information into a message pool of the seed node;
s14: the seed node randomly selects a first synchronous node and a second synchronous node from neighbor nodes of the seed node, and transmits the seed sampling information to the first synchronous node and the second synchronous node;
s15: the first synchronization node receives and stores the seed sampling information, the first synchronization node counts the number of the synchronization nodes in the neighbor nodes of the first synchronization node to obtain a first statistical result, the first synchronization node constructs first sampling information through a new construction information formula according to the seed sampling information and the first statistical result, and the second synchronization node executes the same operation as the first synchronization node to construct second sampling information;
s16: the first synchronization node and the second synchronization node respectively select two new synchronization nodes, the new synchronization nodes receive the first sampling information and the second sampling information, and the step S15 is executed to construct new sampling information;
s17: and the seed node receives the return information and calculates the total number estimated value of the network nodes through a node number estimation formula according to the return information. The beneficial effects are that: by adopting the sampling estimation method, the estimated value of the total number of the network nodes can be quickly obtained.
Further preferably, information with the same random number as the stored information is ignored, and the random number is an information mark, and the method has the advantages that: the information unicity is ensured, and repeated statistics is avoided.
Further preferably, the node number estimation formula is N=(N-Nc+d×m)/2+NcSaid N isIs the estimated value of the total number of the network nodes, N is the total number of the initial network nodes, N is the total number of the network nodescAnd d is the total number of the consensus nodes in the network parameters, d is the seed statistical result, and m is the return information.
Further preferably, the seed node calculates, according to the return information received at the fifteenth time, the estimated value of the total number of the network nodes obtained by the node number estimation formula as an available value.
Preferably, the initialization process includes: the new node reads all seed nodes from the configuration file, establishes temporary links with all the seed nodes, and acquires neighbor node lists of all the seed nodes; all the seed nodes estimate the total node number to obtain n estimated total number values of the network nodes, and the average value of the n estimated total number values of the network nodes is calculated; the new node randomly selects k nodes from neighbor nodes of all the seed nodes as selected nodes, and the seed nodes acquire neighbor node lists of all the selected nodes; the new node randomly selects a node from the neighbor node list information of the selected node and the neighbor list information of the seed node to construct a new neighbor node list; and the new node applies for establishing a link with the node in the new neighbor node list so as to complete the initialization processing.
Further preferably, k is 2 xlnNiSaid N isiIs the average of the estimates of the total number of n said network nodes.
Preferably, the link detection comprises: the detection node transmits information to the neighbor node and judges whether the neighbor node receives the information or not through a transmission control protocol.
Preferably, the link failure processing includes: and if the active neighbor node of the detection node does not receive the information, randomly selecting a node from the passive neighbor nodes of the detection node, and transferring the node to the link pool of the active neighbor node of the detection node.
Further preferably, the link failure processing includes: and if the passive neighbor node of the detection node does not receive the information, deleting the passive neighbor node from the link pool.
Further preferably, when the number of the passive neighbor nodes of the detecting node is less than 2/3 of the number of the nodes defined in the network parameters, the initialization process is performed on the neighbor node link pool of the detecting node, and a node is randomly selected from the network and added to the link pool of the passive neighbor nodes.
Preferably, the consensus switching process includes: moving neighbor nodes of a new consensus period in a link pool of an active neighbor node of a target node to a link set of the active neighbor node of the target node; and moving the neighbor nodes of the new consensus period in the link pool of the passive neighbor node of the target node to the link set of the passive neighbor node of the target node.
Further preferably, when the number of links of the active neighbor node is greater than the number defined by the network parameter, the neighbor node of the new consensus period is moved to the link set of the passive neighbor node; and when the number of the links of the passive neighbor nodes is larger than the number defined by the network parameters, disconnecting the links of the new consensus period node.
Further preferably, when the number of links of the passive neighbor node is less than 2/3 of the network parameter definition number, the neighbor node is initialized, and a node is selected from the network and added to the link pool of the passive neighbor node.
Drawings
Fig. 1 is a flowchart of a network information transmission processing method according to the present invention.
FIG. 2 is a flow chart of sample estimation according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. 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. Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. As used herein, the word "comprising" and similar words are intended to mean that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items.
To solve the problems in the prior art, an embodiment of the present invention provides a network information transmission processing method, including: a network adaptability adjusting step, a network consensus step and a network fault tolerance processing step,
s1: the network adaptability adjusting step is that the total number of nodes of the network is estimated through sampling estimation to obtain the estimated value of the total number of network nodes, then network parameters are subjected to adaptability processing according to the estimated value of the total number of the network nodes, and a link pool of a neighbor node is subjected to initialization processing when a new node is started;
s2: the network consensus step is to perform network consensus through the information transmission modes of active broadcast and passive broadcast and perform consensus processing on the nodes according to the information transmission modes and the request sources;
s3: and the network fault tolerance processing step is to perform link detection on the link state through the active broadcast and the passive broadcast, perform link failure processing on related nodes after judging that the information transmission fails, and perform consensus switching processing on the nodes according to the types of the neighbor node link pools.
In some embodiments of the invention, the neighbor nodes comprise active neighbor nodes and passive neighbor nodes.
In some embodiments of the present invention, the active broadcast is that after any node receives information, the information is transmitted to the active neighbor node.
In some embodiments of the present invention, the passive broadcast is that after receiving information, any node periodically transmits the information to the passive neighbor node, and the passive neighbor node detects its own message pool and determines whether to store the information.
In some embodiments of the invention, the sample estimation comprises:
s11: the network randomly selects a node as a seed node, and the seed node generates a random number;
s12: the seed node counts the number of synchronous nodes in the neighbor node of the seed node to obtain a seed counting result;
s13: the seed node obtains seed sampling information by constructing an information formula according to the random number and the seed statistical result, and the seed node stores the seed sampling information into a message pool of the seed node;
s14: the seed node randomly selects a first synchronous node and a second synchronous node from neighbor nodes of the seed node, and transmits the seed sampling information to the first synchronous node and the second synchronous node;
s15: the first synchronization node receives and stores the seed sampling information, the first synchronization node counts the number of the synchronization nodes in the neighbor nodes of the first synchronization node to obtain a first statistical result, the first synchronization node constructs first sampling information through a new construction information formula according to the seed sampling information and the first statistical result, and the second synchronization node executes the same operation as the first synchronization node to construct second sampling information;
s16: the first synchronization node and the second synchronization node respectively select two new synchronization nodes, the new synchronization nodes receive the first sampling information and the second sampling information, and the step S15 is executed to construct new sampling information;
s17: and the seed node receives the return information and calculates the total number estimated value of the network nodes through a node number estimation formula according to the return information. The beneficial effects are that: by adopting the sampling estimation method, the estimated value of the total number of the network nodes can be quickly obtained.
In some embodiments of the invention, information is ignored that is the same as the stored information with the random number, which is the information label.
In some embodiments of the present invention, the node number estimation formula is N=(N-Nc+d×m)/2+NcSaid N isIs the estimated value of the total number of the network nodes, N is the total number of the initial network nodes, N is the total number of the network nodescAnd d is the total number of the consensus nodes in the network parameters, d is the seed statistical result, and m is the return information.
In some embodiments of the present invention, the seed node calculates, according to the return information received at the fifteenth time, a total number estimated value of the network nodes obtained by the node number estimation formula as an available value.
In some embodiments of the present invention, the current total number of nodes of the network is estimated:
s11: the network randomly selects nodes as seed nodes, and the seed nodes are PiSaid P isiGenerating a random number, wherein the random number is r;
s12: the P isiCounting the number of synchronous nodes in the neighbor nodes of the self node to obtain a seed statistical result, wherein the seed statistical result is di
S13: the P isiAccording to said r and diConstructing sampling information by hearing the construction information, wherein the sampling information is mr,iSaid P isiM is to ber,iStoring the message into a message pool of the user;
s14: the P isiRandomly selecting a first synchronous node and a second synchronous node from own neighbor nodes, wherein the first synchronous node is PjThe second synchronization node is PySaid P isiThe m isr,iTo the PjAnd said Py
S15: the P isiReceiving and storing said mr,iSaid P isjThe number of synchronous nodes in the self-neighbor node is djSaid P isjAccording to said mr,iAnd d isjConstructing new sampling information through a new construction information formula, wherein the new sampling information is mr,jSaid P isyCarrying out the PjThe same operation;
s16: the P isjAnd said PyExecuting the step S14 to respectively select two new synchronous nodes, and executing the step S15 to construct new sampling information by the new synchronous nodes;
s17: the P isiReceiving return information, wherein the return information is mr'. D, and according to mr'. D, obtaining the total number of network nodes estimated by the node number estimation formula, wherein the total number of network nodes estimated is N'.
In some embodiments of the invention, m isr,iComprising mr,iR and mr,i.D。
In some embodiments of the invention, the formula of the constructed information is mr,iR ═ R and mr,i.D=1/di
Hair brushIn some embodiments of the invention, the new construction information formula is mr,iR ═ R and mr,j.D=mr,i.D+1/djM is saidr,iThe value of the D position is determined by the m following the execution of the step S15r,jValue substitution of the D position, thereby calculating a new said mr,jThe value of the D position.
In some embodiments of the invention, the node number estimation formula is N ═ N (N-N)c+di×mr’.D)/2+Nc
In some embodiments of the present invention, in some embodiments,
wherein, the total number of the initial network nodes is N, and N is 45;
the total number of the consensus nodes in the network parameters is Nc,Nc=20;
S11: the network randomly selects nodes as seed nodes, and the seed nodes are PiSaid P isiGenerating a random number r, wherein r is 2;
s12: the P isiCounting the number of synchronous nodes in the neighbor nodes of the self node to obtain a seed statistical result, wherein the seed statistical result is di,di=30;
S13: the seed node is according to the r and the diSeed sampling information is constructed and stored through constructing an information formula, wherein the seed sampling information is mr,iM is saidr,iComprising m2,iR and m2,i.D,m2,i.R=2,m2,i.D=1/30。
S14: the P isiRandomly selecting a first synchronous node and a second synchronous node from own neighbor nodes, wherein the first synchronous node is PjThe second synchronization node is PySaid P isiThe m is2,iTo the PjAnd said Py
S15: the P isiReceiving and storing said m2,iSaid P isjThe number of synchronous nodes in the self-neighbor node is djD is saidj50, said PjAccording to said m2,iAnd d isjConstructing new sampling information through a new construction information formula, wherein the new sampling information is m2,jM is said2,jComprising m2,jR and m2,j.D,m2,j.R=2,m2,j.D=1/30+1/50;
S16: the P isjRandomly selecting P from own neighbor nodesxAnd PzSaid P isjThe m in the own message pool is added2,jTo randomly selected PxAnd PzSaid P isyCarry out PjThe same operation;
s17: the P isxReceiving and storing said m2,jSaid P isxCounting the number of synchronous nodes of the neighbor node of the self node, wherein the counted number of the nodes is dx,dx45, said PxAccording to said m2,jAnd d isxConstructing the m by a new construction information formula2,xM is said2,xComprising m2,xR and m2,x.D,m2,x.R=2,m2,xD-1/30 +1/50+1/45, said PxWill repeat the above Pi、PjEtc., said PzCarry out PxSame operation up to said PiReceiving return information with random walk, wherein the return information is m2', wherein said PiWill receive the return message m for a plurality of times2', wherein said PiReceived m at fifteenth time2' is available value, m received at the fifteenth time2' includes m2,nR and m2,n.D,m2,n.R=2,m2,n.D=
1/30+1/50+1/45+1/35+1/50+1/70+1/55+1/35+1/45+1/50+1/30+1/55+1/30+1/50+1/45+1/35+1/50+1/70+1/55+1/35+1/45+1/30+1/50+1/45+1/35+1/50+1/70+1/55+1/35+1/45+1/30+1/50+1/45+1/35+1/50+1/70+1/55+1/35+1/45,
M is obtained by calculation2,n.D=0.228688551778008,
Then calculating the total number estimated value of the network nodes by the node number estimation formula,
N’=(N-Nc+di×mr’.D)/2+Ncthe total number of nodes in the current network is 33, wherein the total number of nodes is (45-20+30 × 0.228688551778008)/2+20 ≈ 32.84303282766701 ≈ 33.
In some embodiments of the present invention, the initialization process is: the new node reads all seed nodes from the configuration file, establishes temporary links with all the seed nodes, and acquires neighbor node lists of all the seed nodes; all the seed nodes estimate the total node number to obtain n estimated total number values of the network nodes, and the average value of the n estimated total number values of the network nodes is calculated; the new node randomly selects k nodes from neighbor nodes of all the seed nodes as selected nodes, and the seed nodes acquire neighbor node lists of all the selected nodes; the new node randomly selects a node from the neighbor node list information of the selected node and the neighbor list information of the seed node to construct a new neighbor node list; and the new node applies for establishing a link with the node in the new neighbor node list so as to complete the initialization processing.
In some embodiments of the invention, k is 2 XlnNi and N isiIs the average of the estimates of the total number of n said network nodes.
In some embodiments of the present invention, the neighbor node list is Ngbi, where Ngbi ═ ac,As,Sc,Sc},
Wherein A iscSaving information of active neighbor consensus nodes in a neighborhood, wherein the information of each active neighbor consensus node comprises: a common key of the active common node, wherein the common key is an ID of the active common node; network information of the active consensus node, the network information comprising: IP/port; a link state with the active consensus node, the link state comprising: an active link state, a semi-standby link state, and a standby link state; a set of information received by the active consensus node.
AsSaving the information of active neighbor synchronous nodes in the neighborhood, wherein the information of each active neighbor synchronous node is the same as the information of the active neighbor synchronous node Ac
ScSaving the information of the passive neighbor consensus nodes in the neighborhood, wherein the information of each passive neighbor consensus node is the same as the information Ac
SsSaving the information of the passive neighbor synchronous nodes in the neighborhood, wherein the information of each dynamic neighbor synchronous node is the same as the information of the Ac
In some embodiments of the invention, the link detection comprises: the detection node transmits information to the neighbor node and judges whether the neighbor node receives the information or not through a transmission control protocol.
In some embodiments of the invention, the link failure handling comprises: and if the active neighbor node of the detection node does not receive the information, randomly selecting a node from the passive neighbor nodes of the detection node, and transferring the node to the link pool of the active neighbor node of the detection node.
In some embodiments of the invention, the link failure handling comprises: and if the passive neighbor node of the detection node does not receive the information, deleting the passive neighbor node from the link pool.
In some embodiments of the present invention, when the number of the passive neighboring nodes of the detecting node is less than 2/3 of the number of nodes defined in the network parameters, the initialization process is performed on the neighboring node link pool of the detecting node, and a node is randomly selected from the network and added to the link pool of the passive neighboring node.
In some embodiments of the present invention, the consensus switching process is: moving neighbor nodes of a new consensus period in a link pool of an active neighbor node of a target node to a link set of the active neighbor node of the target node; and moving the neighbor nodes of the new consensus period in the link pool of the passive neighbor node of the target node to the link set of the passive neighbor node of the target node.
In some embodiments of the present invention, when the number of links of the active neighbor node is greater than the number defined by the network parameter, the neighbor node of the new consensus period is moved to the link set of the passive neighbor node; and when the number of the links of the passive neighbor nodes is larger than the number defined by the network parameters, disconnecting the links of the new consensus period node.
In some embodiments of the present invention, when the number of links of the passive neighboring node is less than 2/3, which is the number defined by the network parameter, the neighboring node is initialized and a node is selected from the network and added to the link pool of the passive neighboring node.
In some examples of the present invention, the consensus switching process comprises: the method comprises the steps of active neighbor node processing, passive neighbor node processing and insufficient passive neighbor node processing.
The active neighbor node processing specifically comprises: the target node moves the link of the consensus neighbor node of the new consensus period in the active neighbor node link pool to the link set of the active consensus neighbor node; the target node moves the link of the synchronous neighbor node with the new consensus period in the active neighbor node link pool to the link set of the active synchronous neighbor node; and if the number of the links of the active neighbor nodes exceeds the number of the nodes defined in the network parameters, the target node moves the links of the active neighbor nodes to the corresponding link set of the passive neighbor nodes.
The passive neighbor node processing specifically comprises: the target node moves the link of the consensus neighbor node of the new consensus period in the passive neighbor node link pool to the link set of the passive consensus neighbor node; the target node moves the link of the synchronous neighbor node of the new consensus period in the passive neighbor node link pool to the link set of the passive synchronous neighbor node; and if the link number of the passive neighbor node of the target node exceeds the node number defined in the parameters, disconnecting the link.
The insufficient number of the passive neighbor nodes is specifically processed as follows: the passive neighbor node link number of the target node is 2/3 less than the node number defined in the network parameters, the target node performs the initialization processing on the link pool, reads the neighbor node list information of the neighbor node, and randomly selects the node from the neighbor node list information of the neighbor node to become the passive neighbor node.
In some embodiments of the present invention, the network consensus comprises that the operation node receives a new link request, the operation node receives a client information broadcast request, the operation node receives active broadcast information, and the operation node receives passive broadcast information.
In some embodiments of the present invention, the receiving, by the running node, the new link request specifically includes: the operating node receives a link request of a new node, and the new node and a request node of the operating node which receives the link request complete handshake and exchange node information with each other; and the request node detects whether the standby neighbor list of the request node is free or not and processes the standby neighbor list.
In some embodiments of the present invention, when the standby neighbor list of the requesting node is free, the new node is added to the standby neighbor list.
In some embodiments of the present invention, when the standby neighbor list of the requesting node is not free, the requesting node randomly replaces a node in the standby neighbor list.
In some embodiments of the present invention, when a node in the standby neighbor list is a link to a neighboring node, the requesting node is replaced into a neighbor node list.
In some examples of the present invention, the requesting node is replaced in the neighbor synchronization node list when the node in the standby neighbor list is a link to a synchronization node.
In some embodiments of the present invention, the receiving, by the running node, the new link request specifically includes: the operation node receives a link request of a new node, and the operation node is PaThe new node is PbSaid P isbAnd said PaFinishing handshaking and exchanging node information mutually; the P isaDetecting whether the standby neighbor list of the mobile terminal is free or not;if said P isaSpare neighbor list of, the P is freeaHas a standby neighbor list of { Pa1,Pa2,Pa3,Pa4,Pa5H, converting the P tobIs added to the PaIn the standby neighbor list of { P }a1,Pa2,Pa3,Pa4,Pa5,Pb}; if said P isaHas no spare neighbor list, the PaHas a standby neighbor list of { Pa1,Pa2,Pa3,Pa4,Pa5,Pa6P of saidbThen the P is replaced randomlyaA node in the standby neighbor list, the replaced PaHas a standby neighbor list of { Pa1,Pa2,Pa3,Pb,Pa5,Pa6}。
In some embodiments of the present invention, the receiving, by the operation node, the client information broadcast request specifically includes: the operation node receives and stores an information broadcast request of a client; the running node starts a first timer and a second timer, the recording time of the first timer is active information broadcasting delay time, and the recording time of the second timer is passive information broadcasting delay time; if the recording time of the first timer is greater than a first parameter preset value, the running node constructs active broadcast information and transmits the active broadcast information to all active neighbor nodes, if the recording time of the first timer is less than or equal to the first parameter preset value, no processing is performed, and the first parameter preset value is 0.2S; and if the recording time of the second timer is greater than a second parameter preset value, the operating node transmits the hash value of the information transmitted by the information broadcast request of the client to a passive neighbor node through passive broadcast, if the recording time of the timer is less than or equal to the second parameter preset value, no processing is performed, and the second parameter preset value is 5S.
In some embodiments of the present invention, the node link state transition specifically includes: the passive link state is upgraded to a semi-standby link state, and the semi-standby link state is upgraded to an active link state; the active link state is demoted to a semi-active link state, the semi-active link state being demoted to the passive link state.
In some embodiments of the present invention, the receiving of the active broadcast information by the operating node specifically includes: the operation node detects a message pool of the operation node after receiving the active broadcast information; the running node judges whether the active broadcast information is new information; if the operation node detects that the active broadcast information is new information, the operation node stores the active broadcast information into a message pool of the operation node and starts a first timer, wherein the recording time of the first timer is active information broadcast delay time; if the recording time of the first timer is greater than a first parameter preset value, the running node constructs active broadcast information and transmits the new information in the message pool to an active neighbor node, if the recording time of the first timer is less than or equal to the first parameter preset value, no processing is performed, and the first parameter preset value is 0.2S; if the recording time of the first timer is longer than a first parameter preset value, the network link state of the operating node is improved, if the link state of the operating node is upgraded to the active link state and an active link pool is full, the link in the semi-active link state is randomly selected to be degraded to the passive link state, and otherwise, the link is not processed; and if the active broadcast information detected by the operating node is repeated information, reducing the network link state of the operating node, and if the link state of the operating node is degraded to the standby link state and the number of links in the standby link pool of the operating node exceeds the number of links defined by the network parameters, randomly disconnecting one standby link.
In some embodiments of the present invention, the receiving of the passive broadcast information by the operating node specifically includes: the running node receives the passive broadcast information; judging whether a hash value of passive broadcast information exists in a message pool of the operating node; if the hash value of the passive broadcast information exists in the message pool of the operating node, ignoring the passive broadcast information; if the hash value of the passive broadcast information does not exist in the message pool of the operating node, the passive broadcast information is stored, and the link level of the operating node is improved; if the link state of the operation node is improved to the active link state, judging whether the number of links in an active link pool of the operation node exceeds the number of links to which the network parameter is fixed; if the number of links in the active link pool of the operating node exceeds the number of links defined by the network parameters, randomly selecting one node in the semi-active link state to move to the passive link pool of the operating node, otherwise, not processing; and if the link state of the operating node is not improved to the active link state, no processing is performed.
Although the embodiments of the present invention have been described in detail hereinabove, it is apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it is to be understood that such modifications and variations are within the scope and spirit of the present invention as set forth in the following claims. Moreover, the invention as described herein is capable of other embodiments and of being practiced or of being carried out in various ways.

Claims (16)

1. A network information transmission processing method is characterized by comprising the following steps: a network adaptability adjusting step, a network consensus step and a network fault tolerance processing step;
the network adaptation step comprises: estimating the total node number of the network through sampling estimation to obtain an estimated value of the total number of network nodes, then performing adaptive processing on network parameters according to the estimated value of the total number of the network nodes, and initializing a link pool of a neighbor node when a new node is started;
the network consensus step comprises: performing network consensus through an information transmission mode of active broadcasting and passive broadcasting, and performing consensus processing on nodes according to the information transmission mode and a request source;
the network fault tolerance processing step comprises the following steps: and performing link detection on the link state through the active broadcast and the passive broadcast, performing link failure processing on related nodes after judging that the information transmission fails, and performing consensus switching processing on the nodes according to the types of the link pools of the neighbor nodes.
2. The network information transmission processing method according to claim 1, wherein: the neighbor nodes include active neighbor nodes and passive neighbor nodes.
3. The network information transmission processing method according to claim 2, characterized in that: the active broadcast is that any node transmits information to the active neighbor node after receiving the information.
4. The network information transmission processing method according to claim 2, characterized in that: the passive broadcast is that after any node receives information, the information is periodically transmitted to the passive neighbor node, and the passive neighbor node detects the message pool of the passive neighbor node and judges whether the information is stored or not.
5. The network information transmission processing method according to claim 1, wherein the sampling estimation includes:
s11: the network randomly selects a node as a seed node, and the seed node generates a random number;
s12: the seed node counts the number of synchronous nodes in the neighbor node of the seed node to obtain a seed counting result;
s13: the seed node obtains seed sampling information by constructing an information formula according to the random number and the seed statistical result, and the seed node stores the seed sampling information into a message pool of the seed node;
s14: the seed node randomly selects a first synchronous node and a second synchronous node from neighbor nodes of the seed node, and transmits the seed sampling information to the first synchronous node and the second synchronous node;
s15: the first synchronization node receives and stores the seed sampling information, counts the number of synchronization nodes in a neighbor node of the first synchronization node to obtain a first statistical result, constructs first sampling information according to the seed sampling information and the first statistical result through a new constructed information formula, and executes the same operation as the first synchronization node to construct second sampling information;
s16: the first synchronization node and the second synchronization node respectively select two new synchronization nodes, the new synchronization nodes receive the first sampling information and the second sampling information, and the step S15 is executed to construct new sampling information;
s17: and the seed node receives the return information and calculates the total number estimated value of the network nodes through a node number estimation formula according to the return information.
6. The network information transmission processing method according to claim 5, wherein: and ignoring the information with the same random number as the stored information, wherein the random number is an information mark.
7. The network information transmission processing method according to claim 5, wherein: the node number estimation formula is N=(N-Nc+d×m)/2+NcSaid N isIs the estimated value of the total number of the network nodes, N is the total number of the initial network nodes, N is the total number of the network nodescAnd d is the total number of the consensus nodes in the network parameters, d is the seed statistical result, and m is the return information.
8. The network information transmission processing method according to claim 5, wherein: and the seed node calculates the total number estimated value of the network nodes according to the return information received at the fifteenth time by the node number estimation formula to obtain an available value.
9. The network information transmission processing method according to claim 1, wherein the initialization processing includes:
the new node reads all seed nodes from the configuration file, establishes temporary links with all the seed nodes, and acquires neighbor node lists of all the seed nodes;
all the seed nodes estimate the total node number to obtain n estimated total number values of the network nodes, and the average value of the n estimated total number values of the network nodes is calculated;
the new node randomly selects k nodes from neighbor nodes of all the seed nodes as selected nodes, and the seed nodes acquire neighbor node lists of all the selected nodes;
the new node randomly selects a node from the neighbor node list information of the selected node and the neighbor list information of the seed node to construct a new neighbor node list;
and the new node applies for establishing a link with the node in the new neighbor node list so as to complete the initialization processing.
10. The network information transmission processing method according to claim 9, wherein: k is 2 xlnNiSaid N isiIs the average of the estimates of the total number of n said network nodes.
11. The network information transmission processing method according to claim 1, wherein the link detection includes: the detection node transmits information to the neighbor node and judges whether the neighbor node receives the information or not through a transmission control protocol.
12. The network information transmission processing method according to claim 11, wherein the link failure processing includes: and if the active neighbor node of the detection node does not receive the information, randomly selecting a node from the passive neighbor nodes of the detection node, and transferring the node to the link pool of the active neighbor node of the detection node.
13. The network information transmission processing method according to claim 11, wherein the link failure processing includes: and if the passive neighbor node of the detection node does not receive the information, deleting the passive neighbor node from the link pool.
14. The network information transmission processing method according to claim 13, wherein: and when the number of the passive neighbor nodes of the detection node is less than 2/3 of the number of the nodes defined in the network parameters, performing the initialization processing on the neighbor node link pool of the detection node, and randomly selecting a node from the network to add to the link pool of the passive neighbor nodes.
15. The network information transmission processing method according to claim 1, wherein the consensus switching process comprises:
moving neighbor nodes of a new consensus period in a link pool of an active neighbor node of a target node to a link set of the active neighbor node of the target node;
and moving the neighbor nodes of the new consensus period in the link pool of the passive neighbor node of the target node to the link set of the passive neighbor node of the target node.
16. The network information transmission processing method according to claim 15, wherein:
when the number of the links of the active neighbor node is larger than the number defined by the network parameters, moving the neighbor node of the new consensus period to a link set of a passive neighbor node;
and when the number of the links of the passive neighbor nodes is larger than the number defined by the network parameters, disconnecting the links of the neighbor nodes in the new consensus period.
CN201811496088.5A 2018-12-07 2018-12-07 Network information transmission processing method Active CN109451039B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811496088.5A CN109451039B (en) 2018-12-07 2018-12-07 Network information transmission processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811496088.5A CN109451039B (en) 2018-12-07 2018-12-07 Network information transmission processing method

Publications (2)

Publication Number Publication Date
CN109451039A CN109451039A (en) 2019-03-08
CN109451039B true CN109451039B (en) 2021-06-04

Family

ID=65558384

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811496088.5A Active CN109451039B (en) 2018-12-07 2018-12-07 Network information transmission processing method

Country Status (1)

Country Link
CN (1) CN109451039B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111432011B (en) * 2020-03-30 2023-02-17 百度国际科技(深圳)有限公司 Block chain network communication method and equipment
CN111740915B (en) * 2020-08-05 2020-12-11 百度在线网络技术(北京)有限公司 Neighbor node determination method, device, equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874284A (en) * 2006-06-21 2006-12-06 中国科学院计算技术研究所 Distributed type clustering method in use for constructing cluster type peer-to-peer network
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN107579848A (en) * 2017-08-30 2018-01-12 上海保险交易所股份有限公司 The method that common recognition node is dynamically changed in practical Byzantine failure tolerance common recognition mechanism
CN108616596A (en) * 2018-05-09 2018-10-02 南京邮电大学 It is adaptively known together method based on the block chain that dynamic authorization and network environment perceive
CN108776929A (en) * 2018-04-02 2018-11-09 成都云创智融科技有限公司 Bill processing method, system based on block chain database and readable storage medium storing program for executing

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170017936A1 (en) * 2015-07-14 2017-01-19 Fmr Llc Point-to-Point Transaction Guidance Apparatuses, Methods and Systems

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1874284A (en) * 2006-06-21 2006-12-06 中国科学院计算技术研究所 Distributed type clustering method in use for constructing cluster type peer-to-peer network
CN106789095A (en) * 2017-03-30 2017-05-31 腾讯科技(深圳)有限公司 Distributed system and message treatment method
CN107579848A (en) * 2017-08-30 2018-01-12 上海保险交易所股份有限公司 The method that common recognition node is dynamically changed in practical Byzantine failure tolerance common recognition mechanism
CN108776929A (en) * 2018-04-02 2018-11-09 成都云创智融科技有限公司 Bill processing method, system based on block chain database and readable storage medium storing program for executing
CN108616596A (en) * 2018-05-09 2018-10-02 南京邮电大学 It is adaptively known together method based on the block chain that dynamic authorization and network environment perceive

Also Published As

Publication number Publication date
CN109451039A (en) 2019-03-08

Similar Documents

Publication Publication Date Title
CN109451039B (en) Network information transmission processing method
EP2645770B1 (en) A system and method for enhancing lifetime and throughput in a distributed wireless network
Yilmaz et al. Shortest hop multipath algorithm for wireless sensor networks
CN111781822B (en) Privacy protection grouping consistency control method of multi-agent system
CN104734962B (en) A kind of resource search method of non-structural P 2 P network
US8812801B2 (en) Method of data replication in a distributed data storage system and corresponding device
Scheideler et al. A distributed and oblivious heap
Khodashahi et al. Optimal location for mobile sink in wireless sensor networks
Jesus et al. Fault-tolerant aggregation by flow updating
US7680068B1 (en) System and method for artery node selection in an ad-hoc network
Wu et al. Dealing with selfishness and moral hazard in noncooperative wireless networks
Kadivar et al. Distributed topology control algorithm based on one-and two-hop neighbors’ information for ad hoc networks
WO2020134713A1 (en) Network node election method and node device
Yuan et al. Drip: A dynamic voronoi regions-based publish/subscribe protocol in mobile networks
Naz et al. Approximate-centroid election in large-scale distributed embedded systems
Mehto et al. Modified different neighbor history spray and wait using PROPHET in delay tolerant network
Le et al. Reinforcement-learning-based topology control for wireless sensor networks
Michizu et al. Energy balancing by wireless energy transfer in sensor networks
CN111385825B (en) Consistency time synchronization method for rapid convergence of wireless sensor network
Kawaguchi et al. Self-refining skip graph: Skip graph approaching to an ideal topology
Hatamian et al. A new greedy geographical routing in wireless sensor networks
Obermeier et al. CLCP–A Distributed Cross-Layer Commit Protocol for Mobile Ad Hoc Networks
CN107948342B (en) Big data network implementation method
Lee et al. Efficient delta synchronization algorithm in mobile cloud networks
US20140293805A1 (en) Method for turning off routers in a communications network and router implementing this method

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