CN114465944B - Method, device, equipment and storage medium for updating node information - Google Patents

Method, device, equipment and storage medium for updating node information Download PDF

Info

Publication number
CN114465944B
CN114465944B CN202210142319.2A CN202210142319A CN114465944B CN 114465944 B CN114465944 B CN 114465944B CN 202210142319 A CN202210142319 A CN 202210142319A CN 114465944 B CN114465944 B CN 114465944B
Authority
CN
China
Prior art keywords
node
description information
local
information
updated
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
CN202210142319.2A
Other languages
Chinese (zh)
Other versions
CN114465944A (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.)
Beijing Shengzhe Science & Technology Co ltd
Original Assignee
Beijing Shengzhe Science & Technology 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 Beijing Shengzhe Science & Technology Co ltd filed Critical Beijing Shengzhe Science & Technology Co ltd
Priority to CN202210142319.2A priority Critical patent/CN114465944B/en
Publication of CN114465944A publication Critical patent/CN114465944A/en
Application granted granted Critical
Publication of CN114465944B publication Critical patent/CN114465944B/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
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/44Star or tree networks
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention discloses a method, a device, equipment and a storage medium for updating node information. The method is executed by network nodes in a tree network, and comprises the steps of acquiring node description information corresponding to updated nodes when node state update occurs on a branch where the node state update occurs; according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed; and when determining that the direct connection superior node corresponding to the local node exists, transmitting the node description information to the direct connection superior node so as to realize the information updating of all network nodes on the branch step by step. The technical scheme of the embodiment of the invention provides a new method for updating the node information of the tree network, which can accurately and effectively update the associated node information and ensure the effective communication among all nodes in the tree network.

Description

Method, device, equipment and storage medium for updating node information
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device, equipment and a storage medium for updating node information.
Background
As networks evolve, network devices (such as switches, routers, and optical network products) are becoming more and more widely used, network topologies become more and more complex, and network maintenance and management are becoming important.
Because of the structural specificity of the tree network, all uplink data of the network nodes are sent to the following nodes through the own upper node, so that the uplink route is not required to be established, and all nodes only need to maintain the topology table and the downlink route table of the whole network.
Disclosure of Invention
The embodiment of the invention provides a method, a device, equipment and a storage medium for updating node information, which are used for providing a new method for updating the node information of a tree network, accurately and effectively updating associated node information and guaranteeing effective communication among nodes in the tree network.
In a first aspect, an embodiment of the present invention provides a method for updating node information, which is performed by a network node in a tree network, where the method includes:
when it is determined that node state update occurs on the branch, node description information corresponding to the updated node is acquired, where the node description information includes: a state update type, an update node identification ID and an associated upper node ID corresponding to the update node;
according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed;
and when determining that the direct connection superior node corresponding to the local node exists, transmitting the node description information to the direct connection superior node so as to realize the information updating of all network nodes on the branch step by step.
In a second aspect, an embodiment of the present invention further provides an apparatus for updating node information, where the apparatus includes:
the node description information acquisition module is used for acquiring node description information corresponding to an updated node when the node state update occurs on the branch where the node description information is located, and the node description information comprises: a state update type, an update node identification ID and an associated upper node ID corresponding to the update node;
the updating operation execution module is used for executing the information updating operation of the local routing table and the topology table item corresponding to the local node according to the node description information;
and the information updating step-by-step realizing module is used for transmitting the node description information to the directly-connected upper node when the directly-connected upper node corresponding to the local node exists, so as to realize the information updating of all network nodes on the branch step by step.
In a third aspect, an embodiment of the present invention further provides an electronic device, including:
one or more processors;
a storage means for storing one or more programs;
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of updating node information according to any embodiment of the present invention.
In a fourth aspect, an embodiment of the present invention provides a computer readable storage medium having a computer program stored thereon, where the program when executed by a processor implements a method for updating node information according to any embodiment of the present invention.
According to the embodiment of the invention, when node state update occurs on the branch where the node state update is determined, node description information corresponding to the updated node is acquired; according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed; when determining that the direct connection superior node corresponding to the local node exists, the node description information is sent to the direct connection superior node so as to update information of all network nodes on the branch step by step, thereby solving the problem of communication faults among nodes caused by inaccurate update of associated node information when the node state in the tree-like network in the prior art, providing a new method for updating the tree-like network node information, accurately and effectively updating the associated node information and guaranteeing effective communication among all nodes in the tree-like network.
Drawings
Fig. 1 is a flowchart of a method for updating node information according to a first embodiment of the present invention;
fig. 1a is a schematic view of a network access scenario of a new node according to a first embodiment of the present invention;
fig. 2 is a flowchart of another method for updating node information according to the second embodiment of the present invention;
fig. 2a is a schematic diagram of a specific scenario in which a node topology table entry is updated when node deletion occurs in the second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a node information updating device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
Embodiments of the present invention will be described in further detail below with reference to the drawings and examples. It should be understood that the particular embodiments described herein are illustrative only and are not limiting of embodiments of the invention. It should be further noted that, for convenience of description, only some, but not all of the structures related to the embodiments of the present invention are shown in the drawings.
Example 1
Fig. 1 is a flowchart of a method for updating node information according to an embodiment of the present invention, where the method may be performed by a network node of a tree network when nodes in the tree network access to the network or leave the network, and the method may be performed by a device for updating node information, and the device may be implemented by software and/or hardware and integrated in a server. The method specifically comprises the following steps:
and S110, when the node state update occurs on the branch where the node state update is determined, acquiring node description information corresponding to the updated node.
The node status update may be a new network entry or an offline network entry. The updated nodes may include newly-entered nodes and off-network nodes. The node description information may refer to description information describing an update node's network entry or exit actions. For example, the node description information may include: a status update type, an update node ID, and an associated upper node ID corresponding to the update node. The state update type can refer to node network entry and node network exit, namely node addition and node deletion. The associated upper nodes can be all upper nodes of branches where the update nodes are located in the tree network, and the number of the associated upper nodes corresponding to the update nodes can be one or more, and the number of the associated upper nodes is specifically related to the position of the update nodes in the tree network. For example, if the update node is directly connected with the root node in the tree network, that is, the update node is a direct connection lower node of the root node, at this time, the associated upper node of the update node has only one root node; if the update node is not directly connected with the root node in the tree network, the number of the associated upper nodes of the update node is at least two.
In this embodiment, if it is determined that a node status update occurs on the branch where the node status update exists, the type of the update, the node ID of the occurrence of the status update, and each associated upper node ID corresponding to the updated node may be acquired.
In an optional implementation manner of this embodiment, determining that a node status update occurs on the leg may include:
when a node update message sent by a direct connection subordinate node of a local node is received, determining that node state update occurs on a branch where the node is located; and/or
And when detecting that the local node generates the direct connection lower node state update, determining that the node state update occurs on the branch.
Optionally, since a tree network may include multiple branches, each branch may include multiple nodes, a node where a state update occurs, i.e., an updated node may directly or indirectly affect information of multiple nodes on the branch where the updated node is located. Correspondingly, each associated upper node of the update node can update own information step by step according to the node description information of the update node.
The manner in which the node state update is determined to occur for the branch may be different for different local nodes. Specifically, if the local node receives a node update message sent by the directly connected lower node, the local node can determine that node state update occurs on a branch where the current local node is located; if the local node detects that the state of the directly connected lower node is updated, the node state update on the branch where the current local node is located can be determined.
Optionally, after determining that the node status update occurs on the leg, the method may further include:
if the state update type in the node description information is determined to be node addition, detecting a new node network access request sent by the update node or a direct lower node relay of the local node in real time; when receiving the network access request of the new node, if the direct connection superior node corresponding to the local node exists, the network access request of the new node is transmitted to the direct connection superior node in a relay mode, and when receiving the network access confirmation response transmitted by the direct connection superior node, the network access confirmation response is transmitted to the updating node or the direct connection inferior node; and if the local node is determined to be the root node of the tree network, generating a matched network access confirmation response according to the new node network access request, and sending the matched network access confirmation response to the updating node or the direct connection subordinate node.
Fig. 1a is a schematic diagram of a scenario in which a new node is connected to the network according to a first embodiment of the present invention.
When a new node is connected to the network, a network access request join_req is sent to a directly connected upper node, and after the directly connected upper node detects the network access request of the new node, the network access request of the new node is sent to a next upper node as a relay message join_req_relay until the relay message is sent to an access node; the receiving node generates a network access response join_rsp_relay aiming at the new node, and after the relay node receives the join_rsp_relay step by step, the relay node sends the join_rsp to the new node, simultaneously adds a routing table entry of the new node, updates a topology table and realizes network access of the new node.
It should be noted that, the upper node (i.e., the relay node) does not directly forward the join_req message, but adopts the join_req_relay message because the new node is not yet connected to the network, and the access node cannot route the message when replying to the join_rsp, so that the upper node of the new node needs to be used as a communication anchor point.
The join_req data structure may include a message type and a source node ID (i.e., a new node ID), the join_req_relay data structure may include a message type, a source node ID (i.e., a directly connected upper node ID), and a request to access the network node ID (i.e., a new node ID), the join_rsp_relay data structure may include a message type, a destination node ID (i.e., a directly connected lower node ID), a request to access the network node ID, and an access result, and the join_rsp data structure may include a message type, a destination node ID (i.e., a new node ID), and an access result.
And S120, according to the node description information, performing information updating operation on the local routing table and the topology table item corresponding to the local node.
The local routing table may refer to a routing table corresponding to each network node in the tree network. The routing table data format may be as shown in table 1. Wherein DstId represents a destination node ID, nextId represents a next Hop node ID of the local node reaching the destination node, hop represents a Hop count of the local node reaching the destination node, TTL represents a time-to-live value, and after exceeding the time-to-live value, the routing table entry is deleted.
TABLE 1
DstId NextId Hop TTL
The data format of the topology table entry corresponding to the local node may be as shown in table 2. Wherein NodeId represents node Id, num represents the number of one-hop neighbor nodes of the node, neiborid [ ] represents all one-hop neighbor node IDs of the node.
TABLE 2
NodeId Num NeiborId[]
Based on the specificity of the tree network structure, the uplink data of the network nodes are sent to the access node through the own directly connected upper node, namely the root node of the tree network, so that the uplink route does not need to be established. And all network nodes need to maintain topology tables and downlink routing tables of the whole network.
In this embodiment, according to the node description information corresponding to the update node, the update operation may be performed on the local routing table of each network node in the branch where the update node is located in the network and the topology table entry corresponding to each network node respectively.
And S130, when determining that the direct connection upper node corresponding to the local node exists, transmitting the node description information to the direct connection upper node so as to realize information updating of all network nodes on the branch step by step.
Optionally, if the current local node executing the node information updating operation determines that there is a directly connected upper node, the node description information may be sent to the directly connected upper node as a node updating message, so as to implement information updating of all network nodes on the branch step by step.
According to the technical scheme, when node state update occurs on the branch, node description information corresponding to an updated node is acquired; according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed; when determining that the direct connection superior node corresponding to the local node exists, the node description information is sent to the direct connection superior node so as to update information of all network nodes on the branch step by step, thereby solving the problem of communication faults among nodes caused by inaccurate update of associated node information when the node state in the tree-like network in the prior art, providing a new method for updating the tree-like network node information, accurately and effectively updating the associated node information and guaranteeing effective communication among all nodes in the tree-like network.
Example two
Fig. 2 is a flowchart of another method for updating node information according to the second embodiment of the present invention, where, based on the foregoing embodiments, it is preferable to further refine the information updating operation of the local routing table and the topology table entry corresponding to the local node according to the node description information, and the technical solution in this embodiment may be combined with each of the alternatives in the foregoing one or more embodiments. The method may comprise the steps of:
and S210, when the node state update occurs on the branch where the node state update is determined, acquiring node description information corresponding to the updated node.
The node description information may include: a status update type, an update node ID, and an associated upper node ID corresponding to the update node. The node description information may also include an updated number of nodes.
S220, when the state update type in the node description information is determined to be node addition, a first target routing table item, of which the target node ID is matched with the related upper node ID in the node description information, is queried in a local routing table.
The first target routing table entry may be a routing table entry in which a destination node ID matches with an associated upper node ID in the node description information in a local routing table corresponding to the local node currently being processed.
In this embodiment, if it is determined that the state update type of the node is node addition, the destination node ID of the local routing table may be queried, and the routing table entry in which the destination node ID matches with the associated upper node ID in the node description information is determined as the first target routing table entry.
S230, according to each first target routing table item, a new routing table item taking the updated node ID as a target node ID is established.
Optionally, after determining the first target routing table entry from the local routing table, a new routing table entry using the updated node ID in the node description information as the destination node ID may be established according to the first target routing table entry and the node description information.
In an optional implementation manner of this embodiment, according to each first target routing table entry, establishing a new routing table entry with the updated node ID as a destination node ID may include:
if Hop count hop=1 of the local node in the first target routing table item reaching the destination node, taking the updated node ID in the node description information as the destination node ID, taking the associated upper node ID in the node description information as the next Hop node ID, taking hop+1 in the first target routing table item as the Hop, and taking MAX_TTL as the TTL, and establishing a newly added routing table item;
if Hop >1 in the first target routing table item, using the updated node ID in the node description information as a destination node ID, using the next-Hop node ID in the first target routing table item as a next-Hop node ID, using hop+1 in the first target routing table item as a Hop, and using MAX_TTL as TTL, and establishing a newly added routing table item.
When hop=1 in the first target routing table entry, the newly added routing table entry may be as shown in table 3.
TABLE 3 Table 3
Figure BDA0003507557320000091
When Hop >1 in the first target routing table entry, the newly added routing table entry may be as shown in table 4.
TABLE 4 Table 4
Figure BDA0003507557320000092
S240, deleting a destination node ID or a second target routing table item of which the next hop node ID reaching the destination node is matched with the updated node ID in the local routing table when the state update type in the node description information is determined to be node deletion.
The second target routing table entry may be a routing table entry in which a destination node ID or a next-hop node ID reaching the destination node matches with an updated node ID in the node description information in a local routing table corresponding to the local node currently processed.
In this embodiment, if it is determined that the state update type of the node is node deletion, dstId and NextId in the local routing table may be queried, and a routing table entry matching DstId or NextId with the updated node ID is determined as a second target routing table entry and deleted.
And S250, when the state update type in the node description information is determined to be node addition, increasing the number of the update nodes to the number Num of one-hop neighbor nodes of the local node in the topology list item corresponding to the local node, and increasing each update node ID to all one-hop neighbor nodes IDNeiborid of the local node to obtain the updated topology list item corresponding to the local node.
And S260, inquiring a first target topology table item with the node ID matched with the updated node ID in the node description information when the state update type in the node description information is determined to be node deletion.
The first target topology table entry may refer to a topology table entry in which a node ID matches an updated node ID in a full-network topology table corresponding to the entire tree network. The full network topology table may include a plurality of topology entries corresponding to respective network nodes.
Optionally, if it is determined that the status update type of the node is node deletion, each node ID of the full-network topology table may be queried, and a topology table entry in which the node ID is the same as the updated node ID is determined as the first target topology table entry.
S270, deleting the first target topology table entry according to the Num of each first target topology table entry to obtain an updated topology table corresponding to the tree network.
In an optional implementation manner of this embodiment, deleting the first target topology table entry according to Num of each first target topology table entry may include:
if num=0, deleting the first target topology table entry; if Num is not equal to 0, deleting the first target topology table item, determining each node ID corresponding to Neiborid in the first target topology table item as a new updated node ID, and returning to execute the operation of inquiring the first target topology table item with the node ID matched with the updated node ID in the node description information until all associated lower nodes with the updated node as a root node are deleted.
Fig. 2a is a schematic diagram of a specific scenario in which a node topology table entry is updated when node deletion occurs according to a second embodiment of the present invention.
The node B detects that the node C is off-line, and the node B sends a node update message to the node A. At this time, node a searches for Num not equal to 0 in the topology table entry corresponding to node C, and neiborid not equal to node D and node E, and after node a deletes the node C, node D and node E need to be deleted. When deleting the node D, looking up num=0 in the topology table item corresponding to the node D, directly deleting the topology table item corresponding to the node D, and when deleting the node E, inquiring Num not equal to 0 in the topology table item corresponding to the node E, and Neiborid not corresponding to the node F and the node G, and after deleting the node E, continuing deleting the node F and the node G. When deleting the node F and the node G, looking up num=0 in the topology list items corresponding to the node F and the node G respectively, and directly deleting the topology list items corresponding to the node F and the node G respectively.
According to the technical scheme, when node state update occurs on the branch, node description information corresponding to an updated node is acquired; according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed; when determining that the direct connection superior node corresponding to the local node exists, the node description information is sent to the direct connection superior node so as to update information of all network nodes on the branch step by step, thereby solving the problem of communication faults among nodes caused by inaccurate update of associated node information when the node state in the tree-like network in the prior art, providing a new method for updating the tree-like network node information, accurately and effectively updating the associated node information and guaranteeing effective communication among all nodes in the tree-like network.
Example III
Fig. 3 is a schematic structural diagram of a node information updating device according to a third embodiment of the present invention, where the device may execute the node information updating method according to the foregoing embodiments. Referring to fig. 3, the apparatus includes: the node description information acquisition module 310, the update operation execution module 320, and the information update stage-by-stage implementation module 330. Wherein:
the node description information obtaining module 310 is configured to obtain node description information corresponding to an updated node when it is determined that node state update occurs on a branch where the node description information includes: a state update type, an update node identification ID and an associated upper node ID corresponding to the update node;
an update operation execution module 320, configured to execute an information update operation on a local routing table and a topology table entry corresponding to a local node according to the node description information;
and the information updating step-by-step implementation module 330 is configured to send the node description information to the directly connected upper node when it is determined that there is a directly connected upper node corresponding to the local node, so as to implement information updating of all network nodes on the branch step by step.
According to the technical scheme, when node state update occurs on the branch, node description information corresponding to an updated node is acquired; according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed; when determining that the direct connection superior node corresponding to the local node exists, the node description information is sent to the direct connection superior node so as to update information of all network nodes on the branch step by step, thereby solving the problem of communication faults among nodes caused by inaccurate update of associated node information when the node state in the tree-like network in the prior art, providing a new method for updating the tree-like network node information, accurately and effectively updating the associated node information and guaranteeing effective communication among all nodes in the tree-like network.
In the above apparatus, optionally, the node description information obtaining module 310 may be specifically configured to:
when a node update message sent by a direct connection subordinate node of a local node is received, determining that node state update occurs on a branch where the node is located; and/or
And when detecting that the local node generates the direct connection lower node state update, determining that the node state update occurs on the branch.
In the above apparatus, optionally, the update operation execution module 320 includes:
the first target routing table item inquiring unit is used for inquiring a first target routing table item with a target node ID matched with an associated upper node ID in the node description information in a local routing table when the state update type in the node description information is determined to be node addition;
a new route table item establishing unit, configured to establish a new route table item using the updated node ID as a destination node ID according to each of the first target route table items;
and the second target routing table item deleting unit is used for deleting a target node ID or a second target routing table item of which the next hop node ID reaching the target node is matched with the updated node ID in the local routing table when the state update type in the node description information is determined to be node deletion.
In the above apparatus, optionally, the newly added routing table entry creating unit may be specifically configured to:
if Hop count hop=1 of the local node in the first target routing table item reaching the destination node, taking the updated node ID in the node description information as the destination node ID, taking the associated upper node ID in the node description information as the next Hop node ID, taking hop+1 in the first target routing table item as the Hop, and taking MAX_TTL as the TTL, and establishing a newly added routing table item;
if Hop >1 in the first target routing table item, using the updated node ID in the node description information as a destination node ID, using the next-Hop node ID in the first target routing table item as a next-Hop node ID, using hop+1 in the first target routing table item as a Hop, and using MAX_TTL as TTL, and establishing a newly added routing table item.
In the above apparatus, optionally, the node description information further includes updating the number of nodes;
the update operation execution module 320 further includes:
the local node topology table item updating unit is used for increasing the number of the updated nodes to the number Num of one-hop neighbor nodes of the local node in the topology table item corresponding to the local node when the state update type in the node description information is determined to be node addition, and increasing the IDs of the updated nodes to the IDs Neiborid of all one-hop neighbor nodes of the local node to obtain the updated topology table item corresponding to the local node;
the first target topology table entry query unit is used for querying a first target topology table entry with a node ID matched with the updated node ID in the node description information when the state update type in the node description information is determined to be node deletion;
and the tree network topology table acquisition unit is used for deleting the first target topology table items according to the Num of each first target topology table item to obtain an updated topology table corresponding to the tree network.
In the above apparatus, optionally, the tree network topology table obtaining unit may be specifically configured to:
if num=0, deleting the first target topology table entry;
if Num is not equal to 0, deleting the first target topology table item, determining each node ID corresponding to Neiborid in the first target topology table item as a new updated node ID, and returning to execute the operation of inquiring the first target topology table item with the node ID matched with the updated node ID in the node description information until all associated lower nodes with the updated node as a root node are deleted.
The above apparatus optionally further comprises a network access response sending module, configured to, after determining that the node state update occurs on the branch where the node state update occurs:
if the state update type in the node description information is determined to be node addition, detecting a new node network access request sent by the update node or a direct lower node relay of the local node in real time;
when receiving the network access request of the new node, if the direct connection superior node corresponding to the local node exists, the network access request of the new node is transmitted to the direct connection superior node in a relay mode, and when receiving the network access confirmation response transmitted by the direct connection superior node, the network access confirmation response is transmitted to the updating node or the direct connection inferior node;
and if the local node is determined to be the root node of the tree network, generating a matched network access confirmation response according to the new node network access request, and sending the matched network access confirmation response to the updating node or the direct connection subordinate node.
The updating device of the node information provided by the embodiment of the invention can execute the updating method of the node information provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the executing method.
Example IV
Fig. 4 is a schematic structural diagram of an electronic device according to a fourth embodiment of the present invention, where, as shown in fig. 4, the device includes a processor 410, a storage device 420, an input device 430, and an output device 440; the number of processors 410 in the device may be one or more, one processor 410 being taken as an example in fig. 4; the processor 410, the storage 420, the input 430, and the output 440 in the apparatus may be connected by a bus or other means, which is illustrated in fig. 4 as a bus connection.
The storage device 420 is a computer readable storage medium, and may be used to store a software program, a computer executable program, and a module, such as program instructions/modules corresponding to the method for updating node information in the embodiment of the present invention (for example, the node description information acquisition module 310, the update operation execution module 320, and the information update progressive implementation module 330 in the node information updating device). The processor 410 executes various functional applications of the device and data processing by running software programs, instructions and modules stored in the storage 420, i.e. implements the above-described node information updating method, which is performed by network nodes in a tree network and includes:
when it is determined that node state update occurs on the branch, node description information corresponding to the updated node is acquired, where the node description information includes: a state update type, an update node identification ID and an associated upper node ID corresponding to the update node;
according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed;
and when determining that the direct connection superior node corresponding to the local node exists, transmitting the node description information to the direct connection superior node so as to realize the information updating of all network nodes on the branch step by step.
The storage device 420 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for functions; the storage data area may store data created according to the use of the terminal, etc. In addition, the storage 420 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage device. In some examples, the storage 420 may further include memory remotely located with respect to the processor 410, which may be connected to the device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input means 430 may be used to receive entered numeric or character information and to generate key signal inputs related to user settings and function control of the device. The output 440 may include a display device such as a display screen.
Example five
A fifth embodiment of the present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, is for performing a method of updating node information, the method being performed by a network node in a tree network, comprising:
when it is determined that node state update occurs on the branch, node description information corresponding to the updated node is acquired, where the node description information includes: a state update type, an update node identification ID and an associated upper node ID corresponding to the update node;
according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed;
and when determining that the direct connection superior node corresponding to the local node exists, transmitting the node description information to the direct connection superior node so as to realize the information updating of all network nodes on the branch step by step.
Of course, the computer readable storage medium provided by the embodiments of the present invention has a computer program stored thereon, and the computer program is not limited to the method operations described above, but may also perform related operations in the node information updating method provided by any embodiment of the present invention.
From the above description of embodiments, it will be clear to a person skilled in the art that the present invention may be implemented by means of software and necessary general purpose hardware, but of course also by means of hardware, although in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a computer readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, etc., and include several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the method according to the embodiments of the present invention.
It should be noted that, in the embodiment of the node information updating apparatus, each unit and module included are only divided according to the functional logic, but not limited to the above-mentioned division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for distinguishing from each other, and are not used to limit the protection scope of the present invention.
Note that the above is only a preferred embodiment of the present invention and the technical principle applied. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, while the invention has been described in connection with the above embodiments, the invention is not limited to the embodiments, but may be embodied in many other equivalent forms without departing from the spirit or scope of the invention, which is set forth in the following claims.

Claims (9)

1. A method for updating node information, performed by a network node in a tree network, comprising:
when it is determined that node state update occurs on the branch, node description information corresponding to the updated node is acquired, where the node description information includes: a state update type, an update node identification ID and an associated upper node ID corresponding to the update node;
according to the node description information, information updating operation of a local routing table and topology table items corresponding to the local nodes is executed;
when determining that a direct-connection superior node corresponding to a local node exists, sending the node description information to the direct-connection superior node so as to realize information updating of all network nodes on the branch step by step;
wherein the node description information further includes an update node number; and according to the node description information, executing information updating operation on topology table items corresponding to the local nodes, wherein the information updating operation comprises the following steps:
when the state update type in the node description information is determined to be node addition, increasing the number of the update nodes to the number Num of one-hop neighbor nodes of the local node in the topology list item corresponding to the local node, and increasing each update node ID to all one-hop neighbor node IDs Neiborid of the local node to obtain an updated topology list item corresponding to the local node;
inquiring a first target topology table item with a node ID matched with the updated node ID in the node description information when the state update type in the node description information is determined to be node deletion;
deleting the first target topology table entry according to the Num of each first target topology table entry to obtain an updated topology table corresponding to the tree network.
2. The method of claim 1, wherein determining that a node state update occurred on the leg comprises:
when a node update message sent by a direct connection subordinate node of a local node is received, determining that node state update occurs on a branch where the node is located; and/or
And when detecting that the local node generates the direct connection lower node state update, determining that the node state update occurs on the branch.
3. The method of claim 1, wherein performing an information update operation on a local routing table based on the node description information comprises:
when the state update type in the node description information is determined to be node addition, inquiring a first target routing table item of which the target node ID is matched with the related upper node ID in the node description information in a local routing table;
according to each first target routing table item, a newly added routing table item taking the updated node ID as a target node ID is established;
and when the state update type in the node description information is determined to be node deletion, deleting a destination node ID or a second target routing table item of which the next hop node ID reaching the destination node is matched with the update node ID in the local routing table.
4. A method according to claim 3, wherein creating a new routing table entry having the updated node ID as a destination node ID based on each of the first destination routing table entries, comprises:
if Hop count hop=1 of the local node in the first target routing table item reaching the destination node, taking the updated node ID in the node description information as the destination node ID, taking the associated upper node ID in the node description information as the next Hop node ID, taking hop+1 in the first target routing table item as the Hop, and taking MAX_TTL as the TTL, and establishing a newly added routing table item;
if Hop >1 in the first target routing table item, using the updated node ID in the node description information as a destination node ID, using the next-Hop node ID in the first target routing table item as a next-Hop node ID, using hop+1 in the first target routing table item as a Hop, and using MAX_TTL as TTL, and establishing a newly added routing table item.
5. The method of claim 1, wherein deleting the first target topology entry based on Num of each of the first target topology entries comprises:
if num=0, deleting the first target topology table entry;
if Num is not equal to 0, deleting the first target topology table item, determining each node ID corresponding to Neiborid in the first target topology table item as a new updated node ID, and returning to execute the operation of inquiring the first target topology table item with the node ID matched with the updated node ID in the node description information until all associated lower nodes with the updated node as a root node are deleted.
6. The method of claim 2, further comprising, after determining that a node status update occurred on the leg:
if the state update type in the node description information is determined to be node addition, detecting a new node network access request sent by the update node or a direct lower node relay of the local node in real time;
when receiving the network access request of the new node, if the direct connection superior node corresponding to the local node exists, the network access request of the new node is transmitted to the direct connection superior node in a relay mode, and when receiving the network access confirmation response transmitted by the direct connection superior node, the network access confirmation response is transmitted to the updating node or the direct connection inferior node;
and if the local node is determined to be the root node of the tree network, generating a matched network access confirmation response according to the new node network access request, and sending the matched network access confirmation response to the updating node or the direct connection subordinate node.
7. An updating apparatus of node information, comprising:
the node description information acquisition module is used for acquiring node description information corresponding to an updated node when the node state update occurs on the branch where the node description information is located, and the node description information comprises: a state update type, an update node identification ID and an associated upper node ID corresponding to the update node;
the updating operation execution module is used for executing the information updating operation of the local routing table and the topology table item corresponding to the local node according to the node description information;
the information updating step-by-step implementation module is used for sending the node description information to the directly-connected upper node when the directly-connected upper node corresponding to the local node exists, so as to realize the information updating of all network nodes on the branch step by step;
the node description information also comprises the number of updated nodes;
the updating operation execution module comprises a local node topology table item updating unit, a first target topology table item inquiring unit and a tree network topology table obtaining unit;
the local node topology table item updating unit is configured to, when determining that the state update type in the node description information is node addition, increase the number of updated nodes to the number Num of one-hop neighbor nodes of the local node in the topology table item corresponding to the local node, and increase each updated node ID to all one-hop neighbor node IDs NeiborId of the local node to obtain an updated topology table item corresponding to the local node;
the first target topology table entry query unit is configured to query a first target topology table entry whose node ID matches an updated node ID in the node description information when it is determined that the state update type in the node description information is node deletion;
the tree network topology table obtaining unit is configured to delete the first target topology table entry according to Num of each first target topology table entry, and obtain an updated topology table corresponding to the tree network.
8. An electronic device, the electronic device comprising:
one or more processors;
a storage means for storing one or more programs;
when executed by the one or more processors, causes the one or more processors to implement a method of updating node information as claimed in any one of claims 1 to 6.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a method of updating node information according to any of claims 1-6.
CN202210142319.2A 2022-02-16 2022-02-16 Method, device, equipment and storage medium for updating node information Active CN114465944B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210142319.2A CN114465944B (en) 2022-02-16 2022-02-16 Method, device, equipment and storage medium for updating node information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210142319.2A CN114465944B (en) 2022-02-16 2022-02-16 Method, device, equipment and storage medium for updating node information

Publications (2)

Publication Number Publication Date
CN114465944A CN114465944A (en) 2022-05-10
CN114465944B true CN114465944B (en) 2023-06-16

Family

ID=81413340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210142319.2A Active CN114465944B (en) 2022-02-16 2022-02-16 Method, device, equipment and storage medium for updating node information

Country Status (1)

Country Link
CN (1) CN114465944B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420463A (en) * 2007-10-25 2009-04-29 厦门大学 Wireless sensor network address allocation mechanism
CN101420445A (en) * 2007-10-25 2009-04-29 厦门大学 Fast routing protocol of wireless sensor network
CN101459534A (en) * 2008-12-03 2009-06-17 福建星网锐捷网络有限公司 Network topology collecting method for tree shaped network and network equipment
CN102098729A (en) * 2010-10-21 2011-06-15 无锡泛联软件科技有限公司 Construction method and related packet forwarding method for tree backbone structure in wireless network

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101611592B (en) * 2006-12-22 2012-12-05 意大利电信股份公司 Dynamic routing of optical signals in optical networks
CN101272395B (en) * 2008-05-20 2012-07-11 北京交通大学 Hierarchical access control method of communication network
US8310931B2 (en) * 2008-07-18 2012-11-13 International Business Machines Corporation Discovering network topology from routing information
CN106921580A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 The method and apparatus that route is realized in tree network
CN110489415B (en) * 2019-07-23 2023-11-03 平安科技(深圳)有限公司 Data updating method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420463A (en) * 2007-10-25 2009-04-29 厦门大学 Wireless sensor network address allocation mechanism
CN101420445A (en) * 2007-10-25 2009-04-29 厦门大学 Fast routing protocol of wireless sensor network
CN101459534A (en) * 2008-12-03 2009-06-17 福建星网锐捷网络有限公司 Network topology collecting method for tree shaped network and network equipment
CN102098729A (en) * 2010-10-21 2011-06-15 无锡泛联软件科技有限公司 Construction method and related packet forwarding method for tree backbone structure in wireless network

Also Published As

Publication number Publication date
CN114465944A (en) 2022-05-10

Similar Documents

Publication Publication Date Title
WO2020001393A1 (en) Method and network node for sending network performance parameter and calculating network performance
US8817798B2 (en) Constraining topology size and recursively calculating routes in large networks
US9225641B2 (en) Communication between hetrogenous networks
US9264327B2 (en) Communication network management system, method and program, and management computer
JP2017028698A (en) Traffic switching method, device, and system
CN108429680B (en) Route configuration method, system, medium and equipment based on virtual private cloud
CN104283789B (en) Route convergent method and system
US11411858B2 (en) Method for updating route in network, network device, and system
CN106921578B (en) Method and device for generating forwarding table item
CN110430135B (en) Message processing method and device
CN109246785B (en) Method for realizing future mobile network
US9590890B2 (en) Transfer apparatus, server, and route changing method
CN113055297B (en) Network topology discovery method and device
US20230116548A1 (en) Route Processing Method and Related Device
CN103825826A (en) Method and device for implementing dynamic routing
US20160043878A1 (en) Multicast communications method and aggregation switch
CN111245725B (en) Future network implementation method based on distribution
CN114465944B (en) Method, device, equipment and storage medium for updating node information
US20200336385A1 (en) BGP Logical Topology Generation Method, and Device
CN115529266B (en) Routing method, device and equipment
CN112600915B (en) Application method, device, equipment and storage medium of network resources
CN111193667B (en) Routing method, leaf node and storage medium of ad hoc network
CN116827886A (en) Message forwarding method, device, node equipment, medium and system
CN108965138B (en) Method for implementing new generation multimedia sensor network
CN110752991A (en) Method for selecting shortest path of dynamic route

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