CN108322395A - A kind of message processing method, device and computer storage media, terminal device - Google Patents

A kind of message processing method, device and computer storage media, terminal device Download PDF

Info

Publication number
CN108322395A
CN108322395A CN201810099607.8A CN201810099607A CN108322395A CN 108322395 A CN108322395 A CN 108322395A CN 201810099607 A CN201810099607 A CN 201810099607A CN 108322395 A CN108322395 A CN 108322395A
Authority
CN
China
Prior art keywords
interface
equipment
message
broadcasting packet
multicast message
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.)
Pending
Application number
CN201810099607.8A
Other languages
Chinese (zh)
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.)
TP Link Technologies Co Ltd
Original Assignee
TP Link Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by TP Link Technologies Co Ltd filed Critical TP Link Technologies Co Ltd
Priority to CN201810099607.8A priority Critical patent/CN108322395A/en
Publication of CN108322395A publication Critical patent/CN108322395A/en
Pending legal-status Critical Current

Links

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/32Flooding
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/16Multipoint routing

Abstract

The invention discloses a kind of message processing method, device and computer storage media, terminal device, the method is executed respectively by each equipment in networking, including:When at least two upstream Interfaces by this equipment receive the broadcasting packet or multicast message of the transmission of the other equipment in the networking, a upstream Interface at least two upstream Interface of this equipment is set as usable interface, and other upstream Interfaces of this equipment are set as unavailable interface;Wherein, all downstream interfaces of this equipment are set as usable interface in advance;When receiving broadcasting packet or multicast message by usable interface, processing is forwarded to the broadcasting packet or multicast message that receive;When by unavailable interface to broadcasting packet or multicast message, discard processing is carried out to the broadcasting packet or multicast message that receive.The present invention can solve the problems, such as broadcast and multicast flooding, reduce the occupancy to system resource, and improve the forward efficiency of message.

Description

A kind of message processing method, device and computer storage media, terminal device
Technical field
The present invention relates to a kind of network technique field more particularly to message processing method, device and computer storage media, Terminal device.
Background technology
In multiplex roles networking, multiplex roles equipment has at least two interfaces that can be connect with other equipment, wherein sets Connection type between standby includes wireless connection, ethernet line connection and PLC etc.;When using multiplex roles equipment network, equipment Between will form a mesh network topologies, and any one loop in mesh network topologies is likely to that broadcast flood occurs It is general.
To solve the above-mentioned problems, in technical solution disclosed in the prior art, each equipment in networking is to It is preserved through forwarded over broadcasting packet, when any appliance receives the broadcasting packet of the transmission of the other equipment in networking, The broadcasting packet for inquiring preservation first judges whether the broadcasting packet received is forwarded over, if it is determined that the broadcast received Message is forwarded over, then directly abandons, and without forwarding, thereby may be ensured that the same broadcasting packet is at most only same Device forwards are primary, avoid the generation of broadcast flooding.
But the technical solution that the prior art provides is not handled the forward-path of message in networking, works as judgement When the broadcasting packet received is not forwarded over, the broadcast received can be forwarded to the other equipment in networking by equipment, may be led It causes other equipment to receive the broadcasting packet of repetition, therefore, broadcast flooding problem can not be fully solved;In addition, being looked into equipment Certain processing time is needed when asking the broadcasting packet preserved, if having in a large amount of different broadcasting packet short time concurrently, if It is standby to have little time to handle, then the forward efficiency of message can be influenced, broadcasting packet can also be accumulated always, since equipment is preserving broadcast report Occupying system resources are needed when literary, the continuous broadcasting packet that preserves causes more and more system resources occupied or even exhausts, And cause the forward efficiency of message lower and lower.
Invention content
Technical problem to be solved of the embodiment of the present invention is, provides a kind of message processing method, device and computer Storage medium, terminal device can solve the problems, such as broadcast and multicast flooding, reduce the occupancy to system resource, and improve message Forward efficiency.
In order to solve the above-mentioned technical problem, an embodiment of the present invention provides a kind of message processing method, the method is by group Each equipment in net executes respectively, including:
When at least two upstream Interfaces by this equipment receive the broadcast report of the transmission of the other equipment in the networking When text or multicast message, a upstream Interface at least two upstream Interface of this equipment is set as usable interface, and Other upstream Interfaces of this equipment are set as unavailable interface;Wherein, all downstream interfaces of this equipment are set as can be used in advance and connect Mouthful;
When receiving broadcasting packet or multicast message by usable interface, to the broadcasting packet or multicast message received It is forwarded processing;
When by unavailable interface to broadcasting packet or multicast message, the broadcasting packet or group that receive are reported Text carries out discard processing.
Further, described when receiving broadcasting packet or multicast message by usable interface, the broadcast to receiving Message or multicast message are forwarded processing, specifically include:
When receiving broadcasting packet by usable interface, the broadcasting packet forwarded in preset first time period is judged Whether quantity is more than preset first threshold;
If the quantity of the broadcasting packet forwarded in the first time period is less than the first threshold, to what is received Broadcasting packet, which is forwarded, to be handled and is counted to update the quantity of the broadcasting packet forwarded in the first time period;
If the quantity of the broadcasting packet forwarded in the first time period is more than the first threshold, wide to what is received It reports text and carries out discard processing.
Further, described when receiving broadcasting packet or multicast message by usable interface, the broadcast to receiving Message or multicast message are forwarded processing, specifically include:
When receiving multicast message by usable interface, IPv4/IPv6 forwarding tables are inquired, judge that the group received is reported Whether text needs the total interface being forwarded in the networking;
If the multicast message received need not be forwarded to the total interface in the networking, the group received is reported Text is forwarded processing;
If the multicast message received needs the total interface being forwarded in the networking, preset second time is judged Whether the quantity of the multicast message forwarded in section is more than preset second threshold;
If the quantity of the multicast message forwarded in the second time period is less than the second threshold, to what is received Multicast message, which is forwarded, to be handled and is counted to update the quantity of the multicast message forwarded in the second time period;
If the quantity of the multicast message forwarded in the second time period is more than the second threshold, to the group received It reports text and carries out discard processing.
Further, described to receive the other equipment in the networking by least two upstream Interfaces of this equipment When the broadcasting packet or multicast message of transmission, a upstream Interface at least two upstream Interface of this equipment is set as Usable interface, and other upstream Interfaces of this equipment are set as unavailable interface, it specifically includes:
The transmission rate of at least two upstream Interface of this equipment is obtained according to link selection algorithm;
The maximum upstream Interface of transmission rate at least two upstream Interface is set as usable interface, and by this equipment Other upstream Interfaces be set as unavailable interface.
Further, the method further includes:
After this equipment accesses the networking, the network level of the networking is obtained according to organization algorithm;
The total interface of this equipment is divided according to the network level, the interface being connect with high-rise level is set as The interface being connect with low layer level is set as downstream interface by upstream Interface.
Further, the method further includes:
When hot plug event occurs for the either interface of this equipment or link layer disconnects reconnect, all by this equipment connect Mouth reverts to usable interface.
Further, the method further includes:
When receiving the unicast message that the other equipment in the networking is sent by the either interface of this equipment, according to IPv4/IPv6 forwarding tables are forwarded processing to the unicast message received.
In order to solve the above-mentioned technical problem, the embodiment of the present invention additionally provides a kind of message process device, and described device is set It sets in each equipment in networking, described device includes:
Interface setup module, for receiving other in the networking when at least two upstream Interfaces by this equipment When broadcasting packet or multicast message that equipment is sent, by a upstream Interface at least two upstream Interface of this equipment It is set as usable interface, and other upstream Interfaces of this equipment are set as unavailable interface;Wherein, all downstream interfaces of this equipment It is set as usable interface in advance;
First message processing module (MPM), for when receiving broadcasting packet or multicast message by usable interface, to receiving To broadcasting packet or multicast message be forwarded processing;And
Second message processing module (MPM), for when by unavailable interface to broadcasting packet or multicast message, docking The broadcasting packet or multicast message received carries out discard processing.
In order to solve the above-mentioned technical problem, the embodiment of the present invention additionally provides a kind of computer storage media, the calculating Machine storage medium includes the computer program of storage;Wherein, the computer program controls the computer storage at runtime Equipment where medium executes message processing method described in any one of the above embodiments.
In order to solve the above-mentioned technical problem, the embodiment of the present invention additionally provides a kind of terminal device, including at least one deposits Reservoir and at least one processor;Wherein,
The memory includes at least one computer program of storage;
The processor for executing the computer program, when executing the computer program realize by the processor Message processing method described in any one of the above embodiments.
Compared with prior art, an embodiment of the present invention provides the storages of a kind of message processing method, device and computer to be situated between Matter, terminal device, when at least two upstream Interfaces by equipment receive broadcasting packet or the group report of other equipment transmission Wen Shi is configured the interface of equipment, and is carried out to the broadcasting packet or multicast message that receive according to the interface after setting Corresponding processing can ensure that equipment will not receive the broadcasting packet or multicast message of repetition, and turn without preserving The broadcasting packet or multicast message sent out, without broadcasting packet or multicast message that inquiry preserves, to solve broadcast and group Flooding problem is broadcast, reduces the occupancy to system resource, and improve the forward efficiency of message.
Description of the drawings
Fig. 1 is a kind of flow chart of a preferred embodiment of message processing method provided by the invention;
Fig. 2 is a kind of detailed process of a preferred embodiment of the step S12 of message processing method provided by the invention Figure;
Fig. 3 is a kind of specific stream of another preferred embodiment of the step S12 of message processing method provided by the invention Cheng Tu;
Fig. 4 is the detailed process for the preferred embodiment that a kind of interface of message processing method provided by the invention divides Figure;
Fig. 5 A to Fig. 5 B are the preferred embodiments that a kind of interface of message processing method provided by the invention divides Schematic diagram;
Fig. 6 is a kind of the schematic diagram of a preferred embodiment of message processing method provided by the invention;
Fig. 7 is a kind of structure diagram of a preferred embodiment of message process device provided by the invention;
Fig. 8 is the structure diagram of a preferred embodiment of terminal device provided by the invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, those of ordinary skill in the art are obtained all without creative efforts Other embodiment shall fall within the protection scope of the present invention.
It is shown in Figure 1, it is a kind of flow chart of a preferred embodiment of message processing method provided by the invention, institute It states method to be executed respectively by each equipment in networking, including step S11 to S13:
Step S11, it is sent when at least two upstream Interfaces by this equipment receive the other equipment in the networking Broadcasting packet or multicast message when, a upstream Interface at least two upstream Interface of this equipment is set as available Interface, and other upstream Interfaces of this equipment are set as unavailable interface;Wherein, all downstream interfaces of this equipment are set as in advance Usable interface;
Step S12, when receiving broadcasting packet or multicast message by usable interface, to the broadcasting packet that receives or Multicast message is forwarded processing;
Step S13, when by unavailable interface to broadcasting packet or multicast message, to the broadcasting packet received Or multicast message carries out discard processing.
It should be noted that when any one equipment in networking receives the message of other equipment transmission, root first Type of message (including broadcasting packet, multicast message and the unicast report of message are judged according to the target MAC (Media Access Control) address of the message received Text), when the message received be broadcasting packet or multicast message when, judge above-mentioned message whether be by this equipment at least two What a upstream Interface received, then handled accordingly according to judging result.
Specifically, when above-mentioned message is to be received by least two upstream Interfaces of this equipment, then to this equipment Interface (including upstream Interface and downstream interface) is configured, wherein will be at least two interfaces that receive above-mentioned message Any one upstream Interface is set as usable interface, and other upstream Interfaces of this equipment are disposed as unavailable connect Mouthful, in addition, all downstream interfaces of this equipment are set in advance as usable interface;After interface is provided with, when this equipment When receiving the broadcasting packet or multicast message of other equipment transmission by usable interface, can by the broadcasting packet received or Multicast message is forwarded to other equipment;The broadcasting packet or group sent by unavailable interface to other equipment when this equipment When reporting text, directly the broadcasting packet received or multicast message are abandoned, without forwarding.
It should be further noted that before interface is provided with, when equipment receives the message of other equipment transmission When, can message is handled accordingly according to the message forwarding path in former networking, after interface is provided with, understand according to The interface set handles the message received accordingly.
A kind of message processing method that the embodiment of the present invention is provided, is set by the interface to the equipment in networking It sets, limiting an equipment, only there are one upstream Interfaces and multiple downstream interfaces can receive and dispatch broadcasting packet or multicast message, to It sets mesh network topologies to tree network topology, there is no loop in tree network topology, therefore solve broadcast and multicast Flooding problem, and each equipment in networking ensure that broadcasting packet and multicast message are reachable in tree network topology; Meanwhile the broadcasting packet or multicast message that equipment is forwarded over without preservation, the broadcasting packet preserved without inquiry or group Text is reported, to greatly reduce the occupancy to system resource, and improves the forward efficiency of message.
It is shown in Figure 2, it is a preferred embodiment of the step S12 of message processing method provided by the invention a kind of Particular flow sheet, it is described when receiving broadcasting packet or multicast message by usable interface, to the broadcasting packet that receives or Multicast message is forwarded processing, specifically includes step S1211 to S1213:
Step S1211, when receiving broadcasting packet by usable interface, judge forwarding in preset first time period Whether the quantity of broadcasting packet is more than preset first threshold;
If the quantity of the broadcasting packet forwarded in step S1212, the described first time period is less than the first threshold, The broadcasting packet received is forwarded and handles and is counted to update the broadcasting packet forwarded in the first time period Quantity;
If the quantity of the broadcasting packet forwarded in step S1213, the described first time period is more than the first threshold, right The broadcasting packet received carries out discard processing.
The present embodiment is the forward process process to broadcasting packet, specifically, when being received by the usable interface of equipment When the broadcasting packet that the other equipment in networking is sent, this equipment in the pre-set period (such as single time cycle) is judged Whether the quantity of the broadcasting packet of forwarding is more than pre-set broadcasting packet threshold value, if forwarded in the single time cycle wide The quantity for reporting text is not above pre-set broadcasting packet threshold value, then above-mentioned broadcasting packet is forwarded to other in networking Equipment is carried out at the same time counting to update the quantity of the broadcasting packet forwarded in this equipment single time cycle;If the single time The quantity of the broadcasting packet forwarded in period is more than pre-set broadcasting packet threshold value, then directly loses above-mentioned broadcasting packet It abandons, without forwarding.
It should be noted that broadcasting packet threshold value is configured according to the performance of equipment, while in order to ensure in LAN Multicast performance, the quantity of the lower limit of broadcasting packet threshold value is traditionally arranged to be 5000.
It should be further noted that before interface is provided with, arrived when by any one interface of equipment When the broadcasting packet that the other equipment in networking is sent, the broadcasting packet of this device forwards pre-set period Nei is judged Quantity whether be more than pre-set broadcasting packet threshold value, and as stated above according to judging result to the broadcast report that receives Text is handled accordingly.
A kind of message processing method that the embodiment of the present invention is provided pre-sets broadcasting packet according to the performance of equipment and exists Forwarding threshold value in preset time period is only forwarded processing to the broadcasting packet for being less than forwarding threshold value, can ensure equipment It has the ability to forward, and bandwidth still has residue, can still forwarding for other messages further reduces the occupancy to system resource, And improve the forward efficiency of message.
It is shown in Figure 3, it is another preferred embodiment of the step S12 of message processing method provided by the invention a kind of Particular flow sheet, it is described when receiving broadcasting packet or multicast message by usable interface, to the broadcasting packet received Or multicast message is forwarded processing, specifically includes step S1221 to S1225:
Step S1221, when receiving multicast message by usable interface, IPv4/IPv6 forwarding tables is inquired, judge to receive To multicast message whether need the total interface being forwarded in the networking;
If multicast message step S1222, received need not be forwarded to the total interface in the networking, to receiving To multicast message be forwarded processing;
If multicast message step S1223, received needs the total interface being forwarded in the networking, judge default Second time period in forward multicast message quantity whether be more than preset second threshold;
If the quantity of the multicast message forwarded in step S1224, the described second time period is less than the second threshold, The multicast message received is forwarded and handles and is counted to update the multicast message forwarded in the second time period Quantity;
If the quantity of the multicast message forwarded in step S1225, the described second time period is more than the second threshold, right The multicast message received carries out discard processing.
The present embodiment is the forward process process to multicast message, specifically, when being received by the usable interface of equipment When the multicast message that the other equipment in networking is sent, the IPv4/IPv6 forwarding tables of this equipment are inquired, to judge to connect above-mentioned multicast Whether message needs the total interface for all devices being forwarded in networking, if you do not need to be forwarded to total interface, then according to Above-mentioned multicast message is forwarded to corresponding interface by the destination address of above-mentioned multicast message;It is forwarded to total interface if necessary, Then further judge the multicast message of this device forwards pre-set period (such as single time cycle) Nei quantity whether More than pre-set multicast message threshold value, if the quantity of the multicast message forwarded in the single time cycle is not above in advance The multicast message threshold value of setting, then be forwarded to the total interface in networking by above-mentioned multicast message, is carried out at the same time counting to update The quantity of the multicast message forwarded in this equipment single time cycle;If the number of the multicast message forwarded in the single time cycle Amount is more than pre-set multicast message threshold value, then directly abandons above-mentioned multicast message, without forwarding.
It should be noted that multicast message threshold value is configured according to the performance of equipment, while in order to ensure in LAN Multicast performance, the quantity of the lower limit of multicast message threshold value is traditionally arranged to be 5000.
It should be further noted that before interface is provided with, arrived when by any one interface of equipment When the multicast message that other equipment in networking is sent, judge whether the multicast message needs to be forwarded in networking all sets Standby total interface, and the multicast message received is handled accordingly according to judging result as stated above.
A kind of message processing method that the embodiment of the present invention is provided pre-sets multicast message according to the performance of equipment and exists Forwarding threshold value in preset time period, when multicast message needs to be forwarded to total interface, the group only to being less than forwarding threshold value It reports text and is forwarded processing, can ensure that equipment has the ability to forward, and bandwidth still has residue, other messages can still turn Hair, further reduces the occupancy to system resource, and improve the forward efficiency of message.
It is described to receive the networking by least two upstream Interfaces of this equipment in another preferred embodiment In other equipment send broadcasting packet or multicast message when, by one at least two upstream Interface of this equipment Upstream Interface is set as usable interface, and other upstream Interfaces of this equipment are set as unavailable interface, specifically includes:
The transmission rate of at least two upstream Interface of this equipment is obtained according to link selection algorithm;
The maximum upstream Interface of transmission rate at least two upstream Interface is set as usable interface, and by this equipment Other upstream Interfaces be set as unavailable interface.
The present embodiment is the selection course of usable interface, specifically, being received when by least two upstream Interfaces of equipment When the broadcasting packet or multicast message that send to the other equipment in networking, is calculated according to link selection algorithm and obtain this equipment The transmission rate of above-mentioned at least two upstream Interface, by comparing above-mentioned at least two upstream Interface transmission rate size, It selects the maximum upstream Interface of wherein transmission rate and is set as usable interface, all upstream Interfaces of others of this equipment are then arranged For unavailable interface.
It should be noted that if selecting usable interface without using link selection algorithm, can select on above-mentioned at least two Any one upstream Interface in line interface is as usable interface.
A kind of message processing method that the embodiment of the present invention is provided selects transmission rate maximum according to link selection algorithm Upstream Interface as usable interface, can over-subtraction understatement text transmission time, to optimize the performance of networking.
It is shown in Figure 4, it is the preferred embodiment that a kind of interface of message processing method provided by the invention divides Particular flow sheet, the method further includes step S21 to step S22:
Step S21, after this equipment accesses the networking, the network level of the networking is obtained according to organization algorithm;
Step S22, the total interface of this equipment is divided according to the network level, by what is connect with high-rise level Interface is set as upstream Interface, and the interface being connect with low layer level is set as downstream interface.
It should be understood that multiplex roles equipment has at least two interfaces that can be connect with other equipment, connect when using more When jaws equipment networking, equipment room will form a mesh network topologies, and the mesh network topologies are calculated according to organization algorithm Network level divides the total interface of equipment according to network level, specifically, being set for any one in networking Standby, it is high-rise level to be located at the network level residing for the equipment on this equipment upper layer, is located at the net residing for the equipment of this equipment lower layer Network layers grade is low layer level, then the interface that this equipment is connect with the equipment of high-rise level is set to upstream Interface, by this equipment The interface being connect with the equipment of low layer level is set as downstream interface.
It is that one of the interface division of a kind of message processing method provided by the invention is preferred in conjunction with shown in Fig. 5 A to Fig. 5 B The schematic diagram of embodiment, as shown in Figure 5A, the networking pass through wireless connection by device A, equipment B, equipment C, equipment D and Switch Composition is connected with ethernet line, wherein device A includes interface A1, interface A2 and interface A3, and equipment B includes interface B1, interface B2 Include interface C1 and interface C2 with interface B3, equipment C, equipment D includes interface D1 and interface D2, and dotted line indicates that equipment room is logical in figure It crosses and is wirelessly attached, solid line indicates that equipment room is attached by ethernet line.
For device A, other all devices are respectively positioned on the lower layer of device A, then by the interface A1 of device A, interface A2 and connect Mouth A3 is respectively set to downstream interface A1, downstream interface A2 and downstream interface A3, i.e. device A is root device, without upstream Interface; For equipment B, device A is located at the upper layer of equipment B, and equipment D is located at the lower layer of equipment B, then by the interface B1 of equipment B and interface B3 It is respectively set to upstream Interface B1 and downstream interface B3, since the interface B2 of equipment B can be connect by Switch with device A, Therefore the interface B2 of equipment B is set to upstream Interface B2;Similarly, the interface C1 of equipment C and interface C2 are respectively set to The interface D1 of equipment D and interface D2 are respectively set to upstream Interface D1 and upstream Interface D2 by line interface C1 and upstream Interface C2, Interface diagram after division is as shown in Figure 5 B.
In another preferred embodiment, the method further includes:
When hot plug event occurs for the either interface of this equipment or link layer disconnects reconnect, all by this equipment connect Mouth reverts to usable interface.
It should be understood that any one interface generation hot plug event or link layer when any one equipment in networking are disconnected When opening connection and reconnecting, network topology may change therewith, need to re-start calculating, therefore by this equipment Total interface reverts to usable interface, and re-starts setting to the interface of this equipment.
In another preferred embodiment, the method further includes:
When receiving the unicast message that the other equipment in the networking is sent by the either interface of this equipment, according to IPv4/IPv6 forwarding tables are forwarded processing to the unicast message received.
The present embodiment is the forward process process to unicast message, specifically, when any one equipment in networking receives To other equipment send message when, if according to the target MAC (Media Access Control) address of the message received judge message be unicast message, The unicast message how is forwarded according to the decision of the IPv4/IPv6 forwarding tables of this equipment.
It should be noted that the above method is provided with and is applicable in later with interface before interface is provided with, that is, work as When by the upstream Interface of equipment, downstream interface, usable interface or unavailable interface to unicast message, it is above-mentioned right to be performed both by The forward process process of unicast message.
It should be further noted that before sending unicast message, corresponded to since equipment can first send ARP Receive messages MAC Address, therefore under normal circumstances, IPv4/IPv6 forwarding tables are bound to be hit, and the attack message of special tectonic is not at this Within the scope of the description of the technical solution of invention.
It is shown in Figure 6, it is a kind of the schematic diagram of a preferred embodiment of message processing method provided by the invention, group The interface of each equipment in net is respectively provided with completion, wherein the interface with triangular marker indicates usable interface, without triangle The interface of shape label indicates unavailable interface, here by taking equipment B is to the forward process process of the broadcasting packet received as an example into Row illustrates.
When receiving broadcasting packet by the upstream Interface B1 of equipment B, since upstream Interface B1 is usable interface, equipment B judge the broadcasting packet forwarded in the single time cycle quantity whether be more than equipment B broadcast threshold, if it does, Then directly broadcasting packet is abandoned, without forwarding;If be not above, by broadcasting packet is forwarded in networking, other set Standby, device A passage path equipment B- > device As receive the broadcasting packet, equipment C passage path equipment B- > device As- > Switch- > equipment C receives the broadcasting packet, and equipment D passage path equipment B- > device A-> Switch- > are set Standby D receives the broadcasting packet.
Wherein, device A is also required to the broadcast for judging to have forwarded in the single time cycle before forwarding the broadcasting packet The quantity of message whether be more than device A broadcast threshold, due to broadcasting packet have entire networking in all devices can receive To primary characteristic, the broadcast threshold that can be worked normally in networking is the lowest threshold of all devices, if the broadcast of device A Threshold value is minimum, then being dropped more than broadcasting packet after the broadcast threshold of device A causes not forward, it is the technical side of the present invention The normal condition that case is approved.
It is shown in Figure 7, it is a kind of structure diagram of a preferred embodiment of message process device provided by the invention, In each equipment that described device is arranged in networking, described device includes:
Interface setup module 11, for receiving its in the networking when at least two upstream Interfaces by this equipment When broadcasting packet or multicast message that his equipment is sent, a uplink at least two upstream Interface of this equipment is connect Mouth is set as usable interface, and other upstream Interfaces of this equipment are set as unavailable interface;Wherein, all downlinks of this equipment connect Mouth is set as usable interface in advance;
First message processing module (MPM) 12, for when receiving broadcasting packet or multicast message by usable interface, docking The broadcasting packet or multicast message received is forwarded processing;And
Second message processing module (MPM) 13 is used for when by unavailable interface to broadcasting packet or multicast message, right The broadcasting packet or multicast message received carries out discard processing.
Preferably, first message processing module (MPM) 12 specifically includes:
First judging unit, for when receiving broadcasting packet by usable interface, judging preset first time period Whether the quantity of the broadcasting packet of interior forwarding is more than preset first threshold;
First message process unit, if the quantity of the broadcasting packet for being forwarded in the first time period be less than it is described First threshold is then forwarded the broadcasting packet received and handles and counted and forwarded with updating in the first time period Broadcasting packet quantity;And
Second message process unit, if the quantity of the broadcasting packet for forwarding in the first time period is more than described the One threshold value then carries out discard processing to the broadcasting packet received.
Preferably, first message processing module (MPM) 12 specifically includes:
Second judgment unit, for when receiving multicast message by usable interface, inquiring IPv4/IPv6 forwarding tables, Judge whether the multicast message received needs the total interface being forwarded in the networking;
Third message process unit, if all the connecing of need not being forwarded in the networking of the multicast message for receiving Mouthful, then processing is forwarded to the multicast message received;
Third judging unit, if the multicast message for receiving needs the total interface being forwarded in the networking, Judge whether the quantity of the multicast message forwarded in preset second time period is more than preset second threshold;
4th message process unit, if the quantity of the multicast message for being forwarded in the second time period be less than it is described Second threshold is then forwarded the multicast message received and handles and counted and forwarded with updating in the second time period Multicast message quantity;And
5th message process unit, if the quantity of the multicast message for forwarding in the second time period is more than described the Two threshold values then carry out discard processing to the multicast message received.
Preferably, the interface setup module 11 specifically includes:
Transmission rate computing unit, at least two upstream Interface for obtaining this equipment according to link selection algorithm Transmission rate;And
Interface setting unit, for be set as the maximum upstream Interface of transmission rate at least two upstream Interface can With interface, and other upstream Interfaces of this equipment are set as unavailable interface.
Preferably, described device further includes:
Network level computing module, for after this equipment accesses the networking, described group to be obtained according to organization algorithm The network level of net;And
Interface division module will be with high level for being divided to the total interface of this equipment according to the network level The interface of level connection is set as upstream Interface, and the interface being connect with low layer level is set as downstream interface.
Preferably, described device further includes:
Interface resets module, for being reconnected when the either interface generation hot plug event or link layer of this equipment disconnect When, the total interface of this equipment is reverted into usable interface.
Preferably, described device further includes:
Third message processing module (MPM) receives the other equipment in the networking for working as by the either interface of this equipment When the unicast message of transmission, processing is forwarded to the unicast message received according to IPv4/IPv6 forwarding tables.
A kind of message process device that the embodiment of the present invention is provided, can realize at the message in any of the above-described embodiment All flows of reason method, the technique effect of effect and the realization of modules and unit in device respectively with above-mentioned implementation The technique effect of effect and the realization of message processing method in example corresponds to identical, and which is not described herein again.
The embodiment of the present invention additionally provides a kind of computer storage media, and the computer storage media includes the meter of storage Calculation machine program;Wherein, the equipment where the computer program controls the computer storage media at runtime executes above-mentioned Message processing method described in any embodiment.
The embodiment of the present invention additionally provides a kind of terminal device, shown in Figure 8, is terminal device provided by the invention The structure diagram of one preferred embodiment, including at least one processor 10 and at least one processor 20;Wherein,
The memory 10 includes at least one computer program of storage;
The processor 20 is for executing the computer program, and the processor 20 is when executing the computer program Realize the message processing method described in any of the above-described embodiment.
It should be noted that Fig. 8 only by the terminal device a memory and a processor be connected for into Row explanation, in some specific embodiments, in the terminal device can also include multiple memories and/or multiple processors, Its specific number and connection type can need to be configured and be adaptively adjusted according to actual conditions.
To sum up, the embodiment of the present invention is provided a kind of message processing method, device and computer storage media, terminal are set It is standby, it is configured by the interface to the equipment in networking, limiting an equipment, only there are one upstream Interfaces and multiple downlinks to connect Mouth can receive and dispatch broadcasting packet or multicast message, and to set mesh network topologies to tree network topology, tree network is opened up There is no loop in flutterring, therefore solves the problems, such as broadcast and multicast flooding;Meanwhile equipment is without preserving forwarded over broadcast report Text or multicast message pre-set broadcast report without broadcasting packet or multicast message that inquiry preserves according to the performance of equipment Text and forwarding threshold value of the multicast message within the monocycle only turn the broadcasting packet and multicast message that are less than forwarding threshold value Hair processing can ensure that equipment has the ability to forward, and bandwidth still has residue, other messages can still forward, to subtract significantly Lack the occupancy to system resource, and improves the forward efficiency of message.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, without departing from the technical principles of the invention, several improvement and deformations can also be made, these improvement and deformations Also it should be regarded as protection scope of the present invention.

Claims (10)

1. a kind of message processing method, which is characterized in that the method is executed respectively by each equipment in networking, including:
When at least two upstream Interfaces by this equipment receive the other equipment in the networking transmission broadcasting packet or When multicast message, a upstream Interface at least two upstream Interface of this equipment is set as usable interface, and incite somebody to action this Other upstream Interfaces of equipment are set as unavailable interface;Wherein, all downstream interfaces of this equipment are set as usable interface in advance;
When receiving broadcasting packet or multicast message by usable interface, the broadcasting packet or multicast message that receive are carried out Forward process;
When by unavailable interface to broadcasting packet or multicast message, to the broadcasting packet that receives or multicast message into Row discard processing.
2. message processing method as described in claim 1, which is characterized in that described to receive broadcast report by usable interface When text or multicast message, processing is forwarded to the broadcasting packet or multicast message that receive, is specifically included:
When receiving broadcasting packet by usable interface, the quantity of the broadcasting packet forwarded in preset first time period is judged Whether it is more than preset first threshold;
If the quantity of the broadcasting packet forwarded in the first time period is less than the first threshold, the broadcast to receiving Message, which is forwarded, to be handled and is counted to update the quantity of the broadcasting packet forwarded in the first time period;
If the quantity of the broadcasting packet forwarded in the first time period is more than the first threshold, to the broadcast report received Text carries out discard processing.
3. message processing method as claimed in claim 1 or 2, which is characterized in that described to be received extensively by usable interface When reporting text or multicast message, processing is forwarded to the broadcasting packet or multicast message that receive, is specifically included:
When receiving multicast message by usable interface, IPv4/IPv6 forwarding tables are inquired, judge that the multicast message received is The no total interface for needing to be forwarded in the networking;
If the multicast message received need not be forwarded to the total interface in the networking, to the multicast message that receives into Row forward process;
If the multicast message received needs the total interface being forwarded in the networking, judge in preset second time period Whether the quantity of the multicast message of forwarding is more than preset second threshold;
If the quantity of the multicast message forwarded in the second time period is less than the second threshold, to the multicast received Message, which is forwarded, to be handled and is counted to update the quantity of the multicast message forwarded in the second time period;
If the quantity of the multicast message forwarded in the second time period is more than the second threshold, the group received is reported Text carries out discard processing.
4. message processing method as described in claim 1, which is characterized in that at least two uplinks when by this equipment When broadcasting packet or multicast message that interface is sent to the other equipment in the networking, by described in this equipment at least two A upstream Interface in a upstream Interface is set as usable interface, and other upstream Interfaces of this equipment are set as unavailable and are connect Mouthful, it specifically includes:
The transmission rate of at least two upstream Interface of this equipment is obtained according to link selection algorithm;
The maximum upstream Interface of transmission rate at least two upstream Interface is set as usable interface, and by this equipment its His upstream Interface is set as unavailable interface.
5. message processing method as described in claim 1, which is characterized in that the method further includes:
After this equipment accesses the networking, the network level of the networking is obtained according to organization algorithm;
The total interface of this equipment is divided according to the network level, the interface being connect with high-rise level is set as uplink The interface being connect with low layer level is set as downstream interface by interface.
6. message processing method as described in claim 1, which is characterized in that the method further includes:
It is when hot plug event occurs for the either interface of this equipment or link layer disconnects reconnect, the total interface of this equipment is extensive It is usable interface again.
7. message processing method as described in claim 1, which is characterized in that the method further includes:
When receiving the unicast message that the other equipment in the networking is sent by the either interface of this equipment, according to IPv4/IPv6 forwarding tables are forwarded processing to the unicast message received.
8. a kind of message process device, which is characterized in that in each equipment that described device is arranged in networking, described device packet It includes:
Interface setup module receives the other equipment in the networking for working as by least two upstream Interfaces of this equipment When the broadcasting packet or multicast message of transmission, a upstream Interface at least two upstream Interface of this equipment is set as Usable interface, and other upstream Interfaces of this equipment are set as unavailable interface;Wherein, all downstream interfaces of this equipment are advance It is set as usable interface;
First message processing module (MPM), for when receiving broadcasting packet or multicast message by usable interface, to what is received Broadcasting packet or multicast message are forwarded processing;And
Second message processing module (MPM) is used for when by unavailable interface to broadcasting packet or multicast message, to receiving Broadcasting packet or multicast message carry out discard processing.
9. a kind of computer storage media, which is characterized in that the computer storage media includes the computer program of storage;Its In, the equipment where the computer program controls the computer storage media at runtime is executed as in claim 1 to 7 Any one of them message processing method.
10. a kind of terminal device, which is characterized in that including at least one processor and at least one processor;Wherein,
The memory includes at least one computer program of storage;
The processor is realized when executing the computer program for executing the computer program, the processor as weighed Profit requires the message processing method described in any one of 1 to 7.
CN201810099607.8A 2018-01-31 2018-01-31 A kind of message processing method, device and computer storage media, terminal device Pending CN108322395A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810099607.8A CN108322395A (en) 2018-01-31 2018-01-31 A kind of message processing method, device and computer storage media, terminal device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810099607.8A CN108322395A (en) 2018-01-31 2018-01-31 A kind of message processing method, device and computer storage media, terminal device

Publications (1)

Publication Number Publication Date
CN108322395A true CN108322395A (en) 2018-07-24

Family

ID=62890455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810099607.8A Pending CN108322395A (en) 2018-01-31 2018-01-31 A kind of message processing method, device and computer storage media, terminal device

Country Status (1)

Country Link
CN (1) CN108322395A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109450692A (en) * 2018-11-21 2019-03-08 普联技术有限公司 A kind of networking method, system and terminal device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247306A (en) * 2008-03-13 2008-08-20 华为技术有限公司 Method for edge port block in ethernet ring, ethernet ring system and device
CN102546345A (en) * 2011-12-30 2012-07-04 Ut斯达康通讯有限公司 Method for realizing cross-ring protection of resilient packet ring by use of spanning tree protocol
CN102984027A (en) * 2012-11-27 2013-03-20 华为技术有限公司 Method and device for message loop detection
US20140269706A1 (en) * 2013-03-15 2014-09-18 Samsung Electronics Co., Ltd. Ring topology storage system, storage device in ring topology storage network and method for handling multicast command packets in ring topology
CN104113442A (en) * 2013-04-18 2014-10-22 上海斐讯数据通信技术有限公司 Ethernet loop detection system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101247306A (en) * 2008-03-13 2008-08-20 华为技术有限公司 Method for edge port block in ethernet ring, ethernet ring system and device
CN102546345A (en) * 2011-12-30 2012-07-04 Ut斯达康通讯有限公司 Method for realizing cross-ring protection of resilient packet ring by use of spanning tree protocol
CN102984027A (en) * 2012-11-27 2013-03-20 华为技术有限公司 Method and device for message loop detection
US20140269706A1 (en) * 2013-03-15 2014-09-18 Samsung Electronics Co., Ltd. Ring topology storage system, storage device in ring topology storage network and method for handling multicast command packets in ring topology
CN104113442A (en) * 2013-04-18 2014-10-22 上海斐讯数据通信技术有限公司 Ethernet loop detection system and method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109450692A (en) * 2018-11-21 2019-03-08 普联技术有限公司 A kind of networking method, system and terminal device

Similar Documents

Publication Publication Date Title
CN106411733B (en) A kind of SDN dynamic load leveling dispatching method based on link real time load
CN103460647B (en) For operating the technology of network node
CN105357046A (en) Network information detection method for software defined networking (SDN)
CN102387056A (en) Intelligent household electrical appliance control system
CN112350949B (en) Rerouting congestion control method and system based on flow scheduling in software defined network
CN103491015B (en) Realize public network and support the method and device of data multicast distribution tree
CN108174412A (en) A kind of RPL multi-path data transmission mechanisms of load balancing
CN108243123A (en) Processing method, device, controller and the interchanger of broadcasting packet
CN101997775B (en) Method for improving utility route in delay tolerant network
CN114285758A (en) Communication network optimization simulation system, method and device based on OPNET
CN100558108C (en) A kind of method and system of setting up neighborhood fast
CN202334567U (en) Intelligent household electrical apparatus control system
CN108768781A (en) Avoid deadlock without losing flow control methods and device
CN108322395A (en) A kind of message processing method, device and computer storage media, terminal device
CN109586932A (en) Method of multicasting and terminal device
CN103354567B (en) A kind of method and apparatus of synchronized multimedia accessing to control address
CN103326916A (en) System and method for automatic partition of intelligent substation and optimization of VLAN
CN104348736A (en) Method for selecting route under multicast load scene and routers
CN104813640B (en) A kind of Sink node method for routing and node device
CN106209633A (en) A kind of message forwarding method and device
CN107682265B (en) Message routing method and device of payment system
CN102546199B (en) A kind of guard method of aggregated links and Packet Switching Node
CN108900439A (en) A kind of PON OLT system and its method for realizing masterslave switchover
CN102843303B (en) Multicast message processing method in PIM and device
CN101567847A (en) Method and equipment for sending bootstrapping messages in multi-cast virtual private network

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180724

RJ01 Rejection of invention patent application after publication