CN111130813B - Information processing method based on network and electronic equipment - Google Patents
Information processing method based on network and electronic equipment Download PDFInfo
- Publication number
- CN111130813B CN111130813B CN201911235472.4A CN201911235472A CN111130813B CN 111130813 B CN111130813 B CN 111130813B CN 201911235472 A CN201911235472 A CN 201911235472A CN 111130813 B CN111130813 B CN 111130813B
- Authority
- CN
- China
- Prior art keywords
- node
- message
- information
- multicast
- unicast
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/02—Details
- H04L12/16—Arrangements for providing special services to substations
- H04L12/18—Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/16—Multipoint routing
Abstract
The application discloses a network-based information processing method and electronic equipment, wherein the method comprises the following steps: receiving a multicast message through a first path, wherein the multicast message comprises identity information of nodes which the multicast message passes through; under the condition that the multicast message is determined to record the first identity information of the multicast message, a unicast message containing message content of the multicast message and node information of the multicast message is sent to an initiator node serving as a message initiator in a unicast mode, so that the initiator node obtains the overall information of the network according to the unicast message, wherein the initiator node is an initial node recorded in the multicast message. The method can conveniently and completely acquire the information of all the nodes in the network, further acquire the detailed related information of the network, and effectively improve the acquisition efficiency.
Description
Technical Field
The present disclosure relates to the field of computer networks, and in particular, to a network-based information processing method and an electronic device.
Background
A Network includes a plurality of nodes with different connection structures, and in many cases, it is necessary to obtain detailed related information of the Network, that is, to obtain a Network Topology corresponding to the Network, where a Network Topology (Network Topology) structure refers to a physical layout in which various devices are interconnected by a transmission medium, and is a specific physical, that is, a real, or logical arrangement manner among members constituting the Network. The current network environment is known and known as a whole through the network topology, such as network fault positioning, performance analysis and the like. However, at present, when acquiring detailed relevant information of a network, information acquisition is performed through a plurality of network protocols, so that the use efficiency is low, and when a current node in the network (such as a network based on an SNMP protocol) performs broadcast detection, the operation is terminated at a neighboring node, and if the relevant information of all nodes needs to be acquired, the acquisition operation can be performed only periodically, which is time-consuming and labor-consuming.
Disclosure of Invention
An object of the embodiments of the present application is to provide a network-based information processing method and an electronic device, where the method can simply and completely acquire information of all nodes in a network, so as to further acquire detailed relevant information of the network, and effectively improve acquisition efficiency.
In order to solve the technical problem, the embodiment of the application adopts the following technical scheme: a network-based information processing method includes:
receiving a multicast message through a first path, wherein the multicast message comprises identity information of nodes which the multicast message passes through;
under the condition that the multicast message is determined to record the first identity information of the multicast message, a unicast message containing message content of the multicast message and node information of the multicast message is sent to an initiator node serving as a message initiator in a unicast mode, so that the initiator node obtains the overall information of the network according to the unicast message, wherein the initiator node is an initial node recorded in the multicast message.
Preferably, the method further comprises:
and under the condition that the multicast message is determined not to record the first identity information of the multicast message, forwarding the multicast message to a neighbor node through a second path.
Preferably, the sending a unicast packet containing the packet content of the multicast packet and the node information of the multicast packet to an initiator node serving as a packet initiator in a unicast manner includes:
adding first identity information of the user to the multicast message;
and sending a unicast message to the initiator node, wherein the unicast message comprises the message content of the multicast message and the node information of the node.
Preferably, the method further comprises:
after receiving the multicast message through the first path, adding first identity information of the user to the current position of a list of the multicast message;
and under the condition that the first identity information of the multicast message is determined to be recorded in the list history record of the multicast message, determining that the first identity information is recorded in the multicast message.
Preferably, the method further comprises:
and sending the unicast message containing the plurality of pieces of first identity information to the initiator node, so that the initiator node determines that a network has a loop according to the unicast message and acquires loop information of the loop, wherein the loop is a closed loop of the network on a physical link, and the loop information comprises address information of the closed loop.
Preferably, the message type information used for representing the message action is added to the list header of the multicast message, and the receiving of the multicast message through the first path specifically includes: receiving the multicast message based on the message type information;
correspondingly, the unicast message containing the message content of the multicast message and the node information of the unicast message is sent to the initiator node serving as the message initiator in a unicast manner, which specifically includes: and sending the unicast message to the initiator node based on the message type information.
The embodiment of the application also provides another information processing method based on the network, which comprises the following steps:
sending a multicast message with initiator identity information to a neighbor node so that the neighbor node receives the multicast message and adds the first identity information of the neighbor node to the multicast message;
receiving a unicast message sent by a node in the network, wherein the unicast message comprises the message content of the multicast message and the node information of the node;
and obtaining the whole information of the network according to the unicast message.
Preferably, the method further comprises:
determining that a loop exists in the network if it is determined that the repeated first identity information of the node exists in the unicast message;
and acquiring loop information of the loop based on the received unicast message, wherein the loop is a closed loop of the network on a physical link, and the loop information comprises address information of the closed loop.
An embodiment of the present application further provides an electronic device, including:
the receiving module is configured to receive a multicast message through a first path, wherein the multicast message includes identity information of nodes through which the multicast message passes;
a sending module, configured to send a unicast message including message content of the multicast message and node information of the multicast message to an initiator node serving as a message initiator in a unicast manner under the condition that it is determined that the first identity information of the initiator node is recorded in the multicast message, so that the initiator node obtains the overall information of the network according to the unicast message, where the initiator node is an initial node recorded in the multicast message.
An embodiment of the present application further provides another electronic device, including:
a sending module configured to send a multicast packet with originator identity information to a neighboring node, so that the neighboring node receives the multicast packet and adds its own first identity information to the multicast packet;
a receiving module configured to receive a unicast packet sent by a node in the network, where the unicast packet includes a packet content of the multicast packet and node information of the node;
and the processing module is configured to obtain the overall information of the network according to the unicast message.
The beneficial effects of the embodiment of the application are that: according to the method, the nodes in the network can conveniently add the self information into the multicast message by the mode that the nodes of the initiator send the multicast message, and send the unicast message comprising the information of all the nodes to the nodes of the initiator in a unicast mode, so that the information of all the nodes in the network is completely acquired, further the detailed related information of the network is acquired, and the acquisition efficiency is effectively improved.
Drawings
Fig. 1 is a flowchart of a network-based information processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of one embodiment of step S2 of FIG. 1 according to an embodiment of the present application;
FIG. 3 is a flow chart of another network-based information processing method according to an embodiment of the present application;
FIG. 4 is a flowchart of another embodiment of a method for network-based information processing according to an embodiment of the present application;
FIG. 5 is a schematic diagram illustrating a network-based information processing method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of another electronic device according to an embodiment of the present application.
Detailed Description
Various aspects and features of the present application are described herein with reference to the drawings.
It will be understood that various modifications may be made to the embodiments of the present application. Accordingly, the foregoing description should not be construed as limiting, but merely as exemplifications of embodiments. Those skilled in the art will envision other modifications within the scope and spirit of the application.
The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of preferred forms of embodiment, given as non-limiting examples, with reference to the attached drawings.
It should also be understood that, although the present application has been described with reference to some specific examples, a person of skill in the art shall certainly be able to achieve many other equivalent forms of application, having the characteristics as set forth in the claims and hence all coming within the field of protection defined thereby.
The above and other aspects, features and advantages of the present application will become more apparent in view of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application are described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application of unnecessary or unnecessary detail. Therefore, specific structural and functional details disclosed herein are not to be interpreted as limiting, but merely as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the phrases "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments in accordance with the application.
Fig. 1 is a flowchart of a network-based information processing method according to an embodiment of the present application, where a network includes a large number of nodes, the nodes may be one or a group of devices, and the nodes and neighboring nodes have contact via corresponding paths to perform data interaction. The method can simply and completely acquire the information of all the nodes in the network, and further acquire the detailed related information of the network. The method may be applied to a node in a network, as shown in fig. 1 in combination with fig. 5, the method comprising the steps of:
s1, receiving a multicast packet through a first path, where the multicast packet includes identity information of a node through which the multicast packet passes.
A first path is arranged between a current node (such as a node B) and a neighbor node (such as a node A), and the multicast message sent by the neighbor node can be received through the first path. The multicast packet in this embodiment may be a multi-layer multicast packet, including a two-layer multicast packet, and may be transmitted to a two-layer network device, so as to achieve the purpose of avoiding traffic redundancy caused by multicast traffic broadcast in a two-layer network. The multicast packet may be a packet sent by a neighboring node (e.g., node a) to a plurality of other nodes adjacent to the neighboring node, and the multicast packet may be received when the current node is adjacent to the neighboring node, where the multicast packet includes identity information of nodes through which the multicast packet has passed. For example, the multicast packet is forwarded by a plurality of nodes, and thus is received by the current node (e.g., node B) in the current situation, and the multicast packet includes identity information of each node through which the multicast packet passes, such as identity information of a neighbor node (e.g., node a) of the current node, identity information of other nodes forwarded to the neighbor node (e.g., node a), and the like. Because the multicast message contains the identity information of each node passing through the way, if the initiator node sending the multicast message can send the multicast message to a plurality of neighbor nodes, most or all nodes in the network can receive the multicast message and add the identity information of the nodes into the multicast message, thereby recording the overall situation of each node in the network.
S2, sending a unicast packet containing the packet content of the multicast packet and the node information of the multicast packet to an initiator node serving as a packet initiator in a unicast manner under the condition that it is determined that the first identity information of the initiator node is recorded in the multicast packet, so that the initiator node obtains the whole information of the network according to the unicast packet, where the initiator node is an initial node recorded in the multicast packet.
If the multicast packet is forwarded to the current node for the first time, the first identity information of the current node (such as a node B) is not recorded in the multicast packet, and the current node may record its own identity information in the multicast packet and forward the identity information. If the multicast message has recorded the first identity information of itself, it indicates that the multicast message is forwarded to the current node again, and at this time, the current node does not need to forward the multicast message, but sends a unicast message to the initiator node (the initiator node is the initial node recorded in the multicast message, that is, the initial sender of the multicast message) in a unicast manner, where the unicast message includes the message content of the multicast message and the node information of the current node, the node information is the relevant information of the current node, such as identity information, ID information, location information, and the like, and the information amount of the node information is greater than the first identity information, so that the detailed condition of the current node can be known by the initiator node. In addition, because the unicast message contains the message content of the multicast message received by the current node, the initiator node can acquire the information of all nodes where the multicast message is routed according to the message content of the multicast message. Because the initiator node can send the multicast message to different neighbor nodes, the initiator node can receive a plurality of unicast messages sent by different nodes through the step of forwarding the multicast message, so that the initiator node can obtain the overall information of the network according to the plurality of unicast messages, namely obtain the topology information of the global network.
According to the method, the nodes in the network can conveniently add the self information into the multicast message by the mode that the nodes of the initiator send the multicast message, and send the unicast message comprising the information of all the nodes to the nodes of the initiator in a unicast mode, so that the information of all the nodes in the network is completely acquired, further the detailed related information of the network is acquired, and the acquisition efficiency is effectively improved.
In an embodiment of the present application, the network-based information processing method further includes the steps of:
and under the condition that the multicast message is determined not to record the first identity information of the multicast message, forwarding the multicast message to a neighbor node through a second path.
In case the multicast message is sent to the current node for the first time, the current node may analyze the content in the multicast message, if it is determined that the multicast message does not record the first identity information of the current node, the first identity information of itself may be added to the multicast packet (of course, the timing of adding the first identity may be multiple conditions), the multicast packet is forwarded to its neighbor node by a second path, the second path is different from the first path, so that the current node does not retransmit the multicast message to the neighbor node sending the multicast message to itself, if the current node B receives the multicast packet sent by the neighbor node a (which may also be an initiator node), the node B adds the first identity information of itself to the multicast packet and forwards the multicast packet to the neighbor node C through the second path.
In an embodiment of the present application, the sending a unicast packet including the packet content of the multicast packet and the node information of the multicast packet to an initiator node serving as a packet initiator in a unicast manner, as shown in fig. 2 in combination with fig. 5, includes:
and S21, adding the first identity information of the user to the multicast message.
After receiving the multicast message, the current node judges that the first identity information of the current node is recorded in the history data of the multicast message, and at this time, the first identity information of the current node can be added into the multicast message. For example, the multicast packet may include a header and a plurality of data units, where the data units record identity information of nodes through which the multicast packet passes, and each data unit may record identity information of one node, and a current node may add its first identity information to a last data unit, so that the multicast packet includes first identity information of two (more) current nodes.
S22, sending a unicast packet to the initiator node, where the unicast packet includes the packet content of the multicast packet and the node information of the node.
The unicast message includes the message content of the multicast message received by the current node and the node information of the current node, where the node information may be detailed information related to the current node, and may include identity information, location information, ID information, and the like. For example, after receiving the multicast packet sent by the node a, the node B determines that the first identity information of the node B already exists in the multicast packet (exists in the history data of the multicast packet), and then may add the first identity information to the current position of the multicast packet, form a unicast packet based on the content of the multicast packet and the node information of the node B, and send the unicast packet to the initiator node.
In another embodiment, for example, after receiving the multicast packet sent by the node a, the node B determines that the first identity information of the node B already exists in the multicast packet (exists in the history data of the multicast packet), and then the node B does not add the first identity information of the node B to the multicast packet any more, forms a unicast packet based on the content of the current multicast packet and the node information of the node B, and sends the unicast packet to the initiator node.
In an embodiment of the present application, the network-based information processing method further includes the steps of:
after receiving the multicast message through the first path, adding first identity information of the user to the current position of a list of the multicast message;
and under the condition that the first identity information of the multicast message is determined to be recorded in the list history record of the multicast message, determining that the first identity information is recorded in the multicast message.
In particular, the multicast message may include a current location of the multicast message and a list history of the multicast message, the header and the identity information of the nodes involved in the history flow of multicast messages are recorded in the list history, the current node (e.g., node B) may, upon receiving the multicast packet, add its own first identity information to the current location of the list of multicast packets, then searching whether the first identity information of the multicast message exists in the list history record or not, if the first identity information of the multicast message already exists in the list history record, determining that the first identity information is already recorded in the multicast message, if the first identity information of the multicast message is not recorded in the list history record, the multicast message is not considered to have been recorded with the first identity information (although the first identity information of the multicast message is added to the current position of the list of the multicast message currently).
In an embodiment of the present application, the network-based information processing method further includes the steps of:
and sending the unicast message containing the plurality of pieces of first identity information to the initiator node, so that the initiator node determines that a network has a loop according to the unicast message and acquires loop information of the loop, wherein the loop is a closed loop of the network on a physical link, and the loop information comprises address information of the closed loop.
Specifically, the unicast message includes the message content of the multicast message and the node information of the corresponding node, after the current node (or other nodes) sends the unicast message to the initiator node, if the unicast message includes the first identity information of a plurality of current nodes (or the identity information of other nodes), the initiator node may determine that a loop exists in the network, that is, due to the loop, the same multicast message is forwarded to the same node for a plurality of times, so that the initiator node may further obtain the relevant loop information of the closed loop, including the address information of the closed loop, according to the content in the unicast message, thereby being able to locate the closed loop in the physical link according to the address information. For example, the network includes node a, node B, node C, node D, and node E, where node a is an initiator node, node B, node C, and node D are closed loops, node a is an initiator node, and sends a multicast packet to node B, node B forwards the multicast packet to node D, node D forwards the multicast packet to node C, and node C forwards the multicast packet to node B, and then node B receives the multicast packet sent by node C, finds that the multicast packet has stored its first identity information (the multicast packet has passed through node B), and node B writes its first identity information into the multicast packet again, and then sends a corresponding unicast packet to node a (initiator node), so that node a can learn about the corresponding closed loop according to the unicast packet and obtain the loop information of the closed loop, including address information of the closed loop so that the closed loop in the physical link can be located based on the address information.
In an embodiment of the present application, the list header of the multicast packet is added with packet type information used for characterizing a packet action, and the receiving of the multicast packet through the first path specifically includes: receiving the multicast message based on the message type information;
correspondingly, the unicast message containing the message content of the multicast message and the node information of the unicast message is sent to the initiator node serving as the message initiator in a unicast manner, which specifically includes: and sending the unicast message to the initiator node based on the message type information.
Specifically, the message type information may indicate the role of the multicast message, for example, may indicate node information of the entire network of the multicast message user, and all nodes receiving the multicast message perform processing according to the above method, where the message type information may be placed in a list header of the multicast message. This allows each node in the network to learn about the role of the multicast packet through the list header.
The embodiment of the present application further provides another network-based information processing method, which may be applied to an initiator node that first sends a multicast packet in a network, where the multicast packet in this embodiment may be a multi-layer multicast packet, including a two-layer multicast packet, and may be transmitted to a two-layer network device, so as to achieve a purpose of avoiding traffic redundancy caused by multicast traffic broadcast in a two-layer network. As shown in fig. 3 in conjunction with fig. 5, the method includes the steps of:
s3, sending the multicast message with the identity information of the initiator to the neighbor node, so that the neighbor node receives the multicast message and adds the first identity information of itself to the multicast message.
The first path is between the initiator node (e.g. node A) and its neighbor node (e.g. node B), and the multicast packet with the initiator identity information (e.g. node A identity information) sent by the neighbor node can be received through the first path. Of course, the initiator node may also send the multicast packet to other neighboring nodes adjacent to the initiator node. The neighbor node (e.g., node B) may receive the multicast packet and add its own first identity information to the multicast packet. The neighbor node (e.g., node B) may then forward the multicast packet to other nodes (e.g., node D) adjacent to the neighbor node, and in the forwarding process, the multicast packet includes the identity information of each node through which the multicast packet passes, such as the identity information of the originator node (e.g., node a), and the identity information of the neighbor node (e.g., node B) and other nodes (e.g., node D). Because the multicast message contains the identity information of each node passing through the way, if the initiator node sending the multicast message can send the multicast message to a plurality of neighbor nodes, most or all nodes in the network can receive the multicast message and add the identity information of the nodes into the multicast message, thereby recording the overall situation of each node in the network.
S4, receive a unicast packet sent by a node in the network, where the unicast packet includes a packet content of the multicast packet and node information of the node.
The multicast packet may be forwarded to a first node (e.g., a node B) for the first time, or may be forwarded to the first node again, and if the multicast packet is forwarded to the first node for the first time, the first identity information of the first node is not recorded in the multicast packet, and the first node may record its own identity information in the multicast packet and forward the multicast packet. If the multicast message has recorded the first identity information of the multicast message, it indicates that the multicast message is forwarded to the first node again, and at this time, the first node does not need to forward the multicast message, but sends a unicast message to the initiator node (e.g., node a) in a unicast manner, where the unicast message includes the message content of the multicast message and the node information of the current node, the node information is related information of the first node, such as identity information, ID information, location information, and the like, and the information amount of the node information is greater than that of the first identity information, so that the initiator node can know the detailed condition of the first node.
S5, obtaining the whole information of the network according to the unicast message.
Because the unicast message contains the message content of the multicast message received by the first node, the initiator node can acquire the information of all nodes where the multicast message is routed according to the message content of the multicast message. Because the initiator node can send the multicast message to different neighbor nodes, the initiator node can receive a plurality of unicast messages sent by other different nodes through the step of forwarding the multicast message, so that the initiator node can obtain the overall information of the network according to the plurality of unicast messages, namely obtain the topology information of the global network.
In one embodiment of the present application, as shown in fig. 4 in combination with fig. 5, the method further comprises the steps of:
s6, determining that a loop exists in the network when it is determined that the first identity information of the node is duplicated in the unicast packet;
s7, obtaining loop information of the loop based on the received unicast packet, where the loop is a closed loop of the network on a physical link, and the loop information includes address information of the closed loop.
Specifically, the unicast message includes the message content of the multicast message and the node information of the corresponding node, after a node in the network sends the unicast message to an initiator node (e.g., node a), if the single broadcast message includes the first identity information of a plurality of nodes, the initiator node may determine that a loop exists in the network, that is, due to the loop, the same multicast message is forwarded to the same node for a plurality of times, so that the initiator node may further obtain the relevant loop information of the closed loop, including the address information of the closed loop, according to the content in the single broadcast message. For example, the network includes node a, node B, node C, node D, and node E, where node a is an initiator node, node B, node C, and node D are closed loops, node a is an initiator node, and sends a multicast packet to node B, node B forwards the multicast packet to node D, node D forwards the multicast packet to node C, and node C forwards the multicast packet to node B, and then node B receives the multicast packet sent by node C, finds that the multicast packet has stored its first identity information (the multicast packet has passed through node B), and node B writes its first identity information into the multicast packet again, and then sends a corresponding unicast packet to node a (initiator node), so that node a can learn about the corresponding closed loop according to the unicast packet and obtain the loop information of the closed loop, including address information of the closed loop so that the closed loop in the physical link can be located based on the address information.
An embodiment of the present application further provides an electronic device, where the electronic device may be applied to a node in a network, and the electronic device may be one or a group of devices in the network, and may serve as a node in the network, as shown in fig. 6, the electronic device includes:
the receiving module is configured to receive a multicast message through a first path, where the multicast message includes identity information of a node through which the multicast message passes.
Specifically, the electronic device may be a current node, a first path is provided between the current node (e.g., node B) and a neighboring node (e.g., node a, which is another electronic device), and the receiving module is capable of receiving a multicast packet sent by the neighboring node through the first path. The multicast packet in this embodiment may be a multi-layer multicast packet, including a two-layer multicast packet, and may be transmitted to a two-layer network device, so as to achieve the purpose of avoiding traffic redundancy caused by multicast traffic broadcast in a two-layer network. The multicast packet may be a packet sent by a neighboring node (e.g., node a) to a plurality of other nodes (other electronic devices) adjacent to the neighboring node, and if the current node is adjacent to the neighboring node, the receiving module may receive the multicast packet, where the multicast packet includes identity information of nodes that the multicast packet has passed through. For example, the multicast packet is forwarded by a plurality of nodes, and thus is received by a current node (e.g., node B) in the current situation, and the multicast packet includes identity information of each node (e.g., a plurality of electronic devices in a network) through which the multicast packet passes, such as identity information of a neighbor node (e.g., node a) of the current node, identity information of other nodes forwarded to the neighbor node (e.g., node a), and the like. Because the multicast message contains the identity information of each node (each electronic device) passing through the path, if the initiator node (initiator electronic device) sending the multicast message can send the multicast message to a plurality of neighbor nodes, most or all nodes in the network can receive the multicast message and add the identity information of the nodes into the multicast message, so that the overall situation of each node in the network can be recorded.
A sending module, configured to send a unicast message including message content of the multicast message and node information of the multicast message to an initiator node serving as a message initiator in a unicast manner under the condition that it is determined that the first identity information of the initiator node is recorded in the multicast message, so that the initiator node obtains the overall information of the network according to the unicast message, where the initiator node is an initial node recorded in the multicast message.
If the multicast packet is forwarded to the current node for the first time, the first identity information of the electronic device (i.e., the current node, such as a node B) is not originally recorded in the multicast packet, and the electronic device may record the identity information of itself in the multicast packet and forward the multicast packet. If the multicast message records the first identity information of the multicast message, the multicast message is forwarded to the electronic device (current node) again, at this time, the sending module does not need to forward the multicast message, but sends a unicast message to the initiator node (initiator electronic device) in a unicast mode, the unicast message includes the message content of the multicast message and the node information of the electronic device (current node), the node information is related information of the electronic device (current node), such as identity information, ID information, location information and the like, and the information amount of the node information is greater than that of the first identity information, so that the detailed condition of the current node can be known by the initiator node. In addition, because the unicast message contains the message content of the multicast message received by the electronic device (current node), the electronic device (initiator node) on the initiator can acquire the information of all nodes where the multicast message is routed according to the message content of the multicast message. Because the initiator electronic device (initiator node) can send the multicast packet to different neighbor nodes, the initiator electronic device (initiator node) receives a plurality of unicast packets sent by different nodes through the forwarding step of the multicast packet, so that the initiator electronic device (initiator node) can obtain the overall information of the network according to the plurality of unicast packets, namely obtain the global network topology information.
The electronic equipment can conveniently add the self information into the multicast message, and send the unicast message comprising the information of all the nodes to the initiator electronic equipment (initiator node) in a unicast mode, so that the initiator electronic equipment can completely acquire the information of all the nodes in the network, further acquire the detailed related information of the network, and effectively improve the acquisition efficiency.
In one embodiment of the present application, the sending module is further configured to: and under the condition that the multicast message is determined not to record the first identity information of the multicast message, forwarding the multicast message to a neighbor node through a second path.
In one embodiment of the present application, the sending module is further configured to:
adding first identity information of the user to the multicast message;
and sending a unicast message to the initiator node, wherein the unicast message comprises the message content of the multicast message and the node information of the node.
In one embodiment of the present application, the sending module is further configured to:
after receiving the multicast message through the first path, adding first identity information of the user to the current position of a list of the multicast message;
and under the condition that the first identity information of the multicast message is determined to be recorded in the list history record of the multicast message, determining that the first identity information is recorded in the multicast message.
In one embodiment of the present application, the sending module is further configured to:
and sending the unicast message containing the plurality of pieces of first identity information to the initiator node, so that the initiator node determines that a network has a loop according to the unicast message and acquires loop information of the loop, wherein the loop is a closed loop of the network on a physical link, and the loop information comprises address information of the closed loop.
In an embodiment of the present application, a message type information used for characterizing a message function is added to a list header of the multicast message, and the sending module is specifically configured to: receiving the multicast message based on the message type information;
accordingly, the sending module is further configured to: and sending the unicast message to the initiator node based on the message type information.
The embodiment of the present application further provides another electronic device, where the electronic device may be an electronic device that first sends a multicast packet in a network, and may serve as an initiator node in the network, and the multicast packet in this embodiment may be a multi-layer multicast packet, including a two-layer multicast packet, and may be transmitted to a two-layer network device, so as to achieve a purpose of avoiding traffic redundancy caused by multicast traffic broadcast in a two-layer network. As shown in fig. 7, the electronic apparatus includes:
a sending module configured to send a multicast packet with originator identity information to a neighboring node, so that the neighboring node receives the multicast packet and adds its own first identity information to the multicast packet;
a receiving module configured to receive a unicast packet sent by a node in the network, where the unicast packet includes a packet content of the multicast packet and node information of the node;
and the processing module is configured to obtain the overall information of the network according to the unicast message.
In one embodiment of the present application, the processing module is further configured to:
determining that a loop exists in the network if it is determined that the repeated first identity information of the node exists in the unicast message;
and acquiring loop information of the loop based on the received unicast message, wherein the loop is a closed loop of the network on a physical link, and the loop information comprises address information of the closed loop.
The above embodiments are only exemplary embodiments of the present application, and are not intended to limit the present application, and the protection scope of the present application is defined by the claims. Various modifications and equivalents may be made by those skilled in the art within the spirit and scope of the present application and such modifications and equivalents should also be considered to be within the scope of the present application.
Claims (10)
1. A network-based information processing method includes:
receiving a multicast message through a first path, wherein the multicast message comprises identity information of nodes which the multicast message passes through;
under the condition that it is determined that first identity information of the multicast message is recorded in the multicast message, a unicast message containing message content of the multicast message and node information of the multicast message is sent to an initiator node serving as a message initiator in a unicast mode, so that the initiator node obtains overall information of the network according to the unicast message, wherein the initiator node is an initial node recorded in the multicast message, the initiator node sends the multicast message to one or more different neighbor nodes, the unicast message comprises the message content of the multicast message and the node information of the node, and the node information comprises at least one of the following: identity information, ID information and location information of the node.
2. The method of claim 1, further comprising:
and under the condition that the multicast message is determined not to record the first identity information of the multicast message, forwarding the multicast message to a neighbor node through a second path.
3. The method according to claim 1, wherein the sending a unicast message containing the message content of the multicast message and the node information of the unicast message to an initiator node serving as a message initiator in a unicast manner comprises:
adding first identity information of the user to the multicast message;
and sending a unicast message to the initiator node.
4. The method of claim 1, further comprising:
after receiving the multicast message through the first path, adding first identity information of the user to the current position of a list of the multicast message;
and under the condition that the first identity information of the multicast message is determined to be recorded in the list history record of the multicast message, determining that the first identity information is recorded in the multicast message.
5. The method of claim 1, further comprising:
and sending the unicast message containing the plurality of pieces of first identity information to the initiator node, so that the initiator node determines that a network has a loop according to the unicast message and acquires loop information of the loop, wherein the loop is a closed loop of the network on a physical link, and the loop information comprises address information of the closed loop.
6. The method according to claim 1, wherein the list header of the multicast packet is added with packet type information for characterizing the packet role, and the receiving of the multicast packet through the first path specifically includes: receiving the multicast message based on the message type information;
correspondingly, the unicast message containing the message content of the multicast message and the node information of the unicast message is sent to the initiator node serving as the message initiator in a unicast manner, which specifically includes: and sending the unicast message to the initiator node based on the message type information.
7. A network-based information processing method includes:
sending a multicast message with initiator identity information to one or more different neighbor nodes, so that the neighbor nodes receive the multicast message and add the first identity information of the neighbor nodes to the multicast message;
receiving a unicast message sent by a node in the network, wherein the unicast message includes message content of the multicast message and node information of the node, and the node information includes at least one of the following: identity information, ID information and location information of the node;
and obtaining the whole information of the network according to the unicast message.
8. The method of claim 7, further comprising:
determining that a loop exists in the network if it is determined that the repeated first identity information of the node exists in the unicast message;
and acquiring loop information of the loop based on the received unicast message, wherein the loop is a closed loop of the network on a physical link, and the loop information comprises address information of the closed loop.
9. An electronic device, comprising:
the receiving module is configured to receive a multicast message through a first path, wherein the multicast message includes identity information of nodes through which the multicast message passes;
a sending module, configured to send a unicast message including a message content of the multicast message and node information of the multicast message to an initiator node serving as a message initiator in a unicast manner under the condition that it is determined that first identity information of the multicast message is recorded in the multicast message, so that the initiator node obtains overall network information according to the unicast message, where the initiator node is an initiator node recorded in the multicast message, the initiator node sends the multicast message to one or more different neighbor nodes, the unicast message includes the message content of the multicast message and the node information of the node, and the node information includes at least one of: identity information, ID information and location information of the node.
10. An electronic device, comprising:
a sending module configured to send a multicast packet with initiator identity information to one or more different neighbor nodes, so that the neighbor nodes receive the multicast packet and add their own first identity information to the multicast packet;
a receiving module, configured to receive a unicast packet sent by a node in a network, where the unicast packet includes a packet content of the multicast packet and node information of the node, and the node information includes at least one of the following: identity information, ID information and location information of the node;
and the processing module is configured to obtain the overall information of the network according to the unicast message.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911235472.4A CN111130813B (en) | 2019-12-05 | 2019-12-05 | Information processing method based on network and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911235472.4A CN111130813B (en) | 2019-12-05 | 2019-12-05 | Information processing method based on network and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111130813A CN111130813A (en) | 2020-05-08 |
CN111130813B true CN111130813B (en) | 2021-08-17 |
Family
ID=70497678
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911235472.4A Active CN111130813B (en) | 2019-12-05 | 2019-12-05 | Information processing method based on network and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111130813B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112188320B (en) * | 2020-09-30 | 2022-09-23 | 联想(北京)有限公司 | Information processing method and device and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6027254A (en) * | 1983-07-25 | 1985-02-12 | Hitachi Ltd | Structure recognizing system of loop transmission system |
CN101242315A (en) * | 2008-02-26 | 2008-08-13 | 中兴通讯股份有限公司 | Loop detection method |
CN101753376A (en) * | 2009-12-30 | 2010-06-23 | 杭州华三通信技术有限公司 | Method and equipment for detecting link state |
CN103004141A (en) * | 2011-07-12 | 2013-03-27 | 华为技术有限公司 | Method, device and system for detecting network loop |
CN109246017A (en) * | 2018-11-28 | 2019-01-18 | 新华三技术有限公司 | A kind of method and device for inquiring multicast forwarding path |
-
2019
- 2019-12-05 CN CN201911235472.4A patent/CN111130813B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6027254A (en) * | 1983-07-25 | 1985-02-12 | Hitachi Ltd | Structure recognizing system of loop transmission system |
CN101242315A (en) * | 2008-02-26 | 2008-08-13 | 中兴通讯股份有限公司 | Loop detection method |
CN101753376A (en) * | 2009-12-30 | 2010-06-23 | 杭州华三通信技术有限公司 | Method and equipment for detecting link state |
CN103004141A (en) * | 2011-07-12 | 2013-03-27 | 华为技术有限公司 | Method, device and system for detecting network loop |
CN109246017A (en) * | 2018-11-28 | 2019-01-18 | 新华三技术有限公司 | A kind of method and device for inquiring multicast forwarding path |
Also Published As
Publication number | Publication date |
---|---|
CN111130813A (en) | 2020-05-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7995574B2 (en) | Detection of forwarding problems for external prefixes | |
US9712381B1 (en) | Systems and methods for targeted probing to pinpoint failures in large scale networks | |
JP4369374B2 (en) | System and method for boundary scan testing of wired or wireless networks | |
CN108111432B (en) | Message forwarding method and device | |
KR101495226B1 (en) | Method and system for looping back traffic in qiq ethernet rings and 1:1 protected pbt trunks | |
JP3880477B2 (en) | How to identify bad network components during network investigation | |
CN104168193B (en) | A kind of method and routing device of Virtual Router Redundancy Protocol fault detect | |
CN107547252A (en) | A kind of network failure processing method and device | |
WO2009052765A1 (en) | Detecting and processing method and device of node fault within a peer-to-peer network | |
JP2004328752A (en) | Inserting address for performing oam functions | |
CN102647312B (en) | A kind of detection method of whole net multicast topology and device | |
US20140043981A1 (en) | Generating packets to test fragmentation | |
CN101729391A (en) | Method, node and system for acquiring link aggregation group information | |
JP5233295B2 (en) | COMMUNICATION DEVICE, COMMUNICATION SYSTEM, AND COMMUNICATION METHOD | |
WO2003084129A1 (en) | A network topology information collecting method | |
CN109981323A (en) | A kind of method and the network equipment of detection data Link-Layer Multicast path status | |
CN106330531A (en) | Node fault recording and processing method and device | |
US20080130503A1 (en) | Method and system for forwarding ethernet frames over redundant networks with all links enabled | |
Sridhar | Decentralized local failure detection in dynamic distributed systems | |
CN111130813B (en) | Information processing method based on network and electronic equipment | |
CN111953555A (en) | Link detection method, CPE (customer premises equipment) and storage medium | |
CN109412851B (en) | Link layer path detection method, device and system | |
CN115883444A (en) | Network data transmission method, system, medium and device based on optimal path | |
CN114500366B (en) | Method and device for preventing routing loop between main node and standby node | |
JP2015204538A (en) | Call processing sequence analyzer and communication system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |