CN106789425B - A kind of method and device of determining duplicate message - Google Patents

A kind of method and device of determining duplicate message Download PDF

Info

Publication number
CN106789425B
CN106789425B CN201611197683.XA CN201611197683A CN106789425B CN 106789425 B CN106789425 B CN 106789425B CN 201611197683 A CN201611197683 A CN 201611197683A CN 106789425 B CN106789425 B CN 106789425B
Authority
CN
China
Prior art keywords
message
port
quantity
receives
counter
Prior art date
Application number
CN201611197683.XA
Other languages
Chinese (zh)
Other versions
CN106789425A (en
Inventor
樊晓冬
Original Assignee
北京东土科技股份有限公司
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 北京东土科技股份有限公司 filed Critical 北京东土科技股份有限公司
Priority to CN201611197683.XA priority Critical patent/CN106789425B/en
Publication of CN106789425A publication Critical patent/CN106789425A/en
Application granted granted Critical
Publication of CN106789425B publication Critical patent/CN106789425B/en

Links

Abstract

The embodiment of the invention provides a kind of method and devices of determining duplicate message, applied to the first network equipment in redundant looped network, the first network equipment includes: first port and second port, wherein, the first port and the second port are used to receive the message of second network equipment transmission, the described method includes: receiving the first message in the first port, the quantity for the message that the first port receives is counted;Judge whether the quantity for the message that the first port receives is less than or equal to the quantity for the message that the second port receives;When the quantity for the message that the first port receives is less than or equal to the quantity for the message that the second port receives, determine that first message is duplicate message.Using the embodiment of the present invention, the speed of determining duplicate message is improved.

Description

A kind of method and device of determining duplicate message

Technical field

The present invention relates to telecommunication technology fields, more particularly to a kind of method and device of determining duplicate message.

Background technique

With the progress of industrial technology, in order to further enhance the reliability of Industrial Ethernet, IEC62439-3 agreement rule Fixed: transmitting terminal will need the message sent to replicate, and obtain two identical messages;The two messages are passed through into difference Port send;When the different port of receiving end receives the two messages, according to preset rules, the message received is judged For the message or duplicate message of primary reception, wherein original message is exactly the message that receiving end receives for the first time, is repeated Message is exactly message identical with received message for the first time.If the message received is original message, according in the message Target IP (Internet Protocol, the agreement interconnected between network) address, the message received is forwarded, if receiving Message be duplicate message, then abandon duplicate message.This mode avoids in transmission process because network cause causes message to be lost The problem of mistake, improves the reliability of network.

The prior art is by using TCAM (Ternary Content Addressable Memory, three-state content addressing Memory) combine RAM (Random Access Memory, random access memory) to table look-up, so that it is determined that receive Whether message is duplicate message.Specific steps are as follows: when receiving end receives message, obtain the source MAC (Media in the message Access Control, physical address) address and sequence number;The MAC Address and sequence number are searched in established table, And judge with the presence or absence of the MAC Address and sequence number in the table, if it is judged that determining that the message is to repeat for when being Message abandons the message, if it is judged that then establishing corresponding table for storing the MAC Address and sequence when being no Number.The repetitive process of table, processing table of tabling look-up, build since each message will be undergone makes so several clock cycle will be expended The time delay that message must be handled is longer.

Summary of the invention

A kind of method and device for being designed to provide determining duplicate message of the embodiment of the present invention determines repetition to improve The speed of message.Specific technical solution is as follows:

On the one hand, the embodiment of the invention discloses a kind of methods of determining duplicate message, applied in redundant looped network One network equipment, the first network equipment includes: first port and second port, wherein the first port and described Two-port netwerk is used to receive the message that second network equipment in parallel redundancy network is sent, which comprises

The first message is received in the first port, counts the quantity for the message that the first port receives;

Judge whether the quantity for the message that the first port receives is less than or equal to the report that the second port receives The quantity of text;

It is less than or equal to the number for the message that the second port receives in the quantity for the message that the first port receives When amount, determine that first message is duplicate message.

Optionally, described after the first port receives the first message, the method also includes:

The value of corresponding first counter of the first port is added 1, obtains the value of updated first counter, it is described First counter is used to count the quantity for the message that the first port receives;

The quantity for the message that the value of updated first counter is received as the first port;

Whether the quantity for judging message that the first port receives, which is less than or equal to the second port, receives Message quantity, comprising:

Judge whether the value of updated first counter is less than or equal to the value of the second counter, described second counts Device is used to count the quantity for the message that the second port receives.

Optionally, the method also includes:

When the quantity that the first port receives message is greater than the second port and receives the quantity of message, described in determination First message is non-duplicate message.

Optionally, described after determining that first message is non-duplicate message, the method also includes:

Judge whether purpose IP address entrained by first message is identical as the IP address of the first network equipment;

Judging that purpose IP address entrained by first message is not identical as the IP address of the first network equipment When, forward first message.

Optionally, after the determination first message is duplicate message, the method also includes: abandon described the One message.

On the other hand, the embodiment of the invention also discloses a kind of devices of determining duplicate message, are applied in redundant looped network First network equipment, the first network equipment includes: first port and second port, wherein the first port and institute Second port, which is stated, for receiving the message of second network equipment transmission, described device includes:

Receiving unit counts the message that the first port receives for receiving the first message in the first port Quantity;

First judging unit, for judging whether the quantity of message that the first port receives is less than or equal to described The quantity for the message that Two-port netwerk receives;

The quantity of first determination unit, the message for receiving in the first port is less than or equal to the second port When the quantity of the message received, determine that first message is duplicate message.

Optionally, described device further include:

Updating unit obtains updated first meter for the value of corresponding first counter of the first port to be added 1 The value of number device, first counter are used to count the quantity for the message that the first port receives;

Counting unit, the number for the message that the value of updated first counter is received as the first port Amount;

First judging unit is specifically used for, and judges whether the value of updated first counter is less than or equal to The value of two counters, second counter are used to count the quantity for the message that the second port receives.

Optionally, described device further include:

Second determination unit, the quantity for receiving message in the first port are greater than the second port and receive message Quantity when, determine first message be non-duplicate message.

Optionally, described device further include:

Second judgment unit, for judging purpose IP address entrained by first message and the first network equipment IP address it is whether identical;

Retransmission unit, for judging purpose IP address entrained by first message and the first network equipment When IP address is not identical, first message is forwarded.

Optionally, described device further include:

Discarding unit, for abandoning first message.

The method and device of a kind of determining duplicate message provided in an embodiment of the present invention, which comprises in the first net The first port of network equipment receives the first message;Judge whether the quantity for the message that the first port receives is less than or equal to first The quantity for the message that the second port of the network equipment receives;It is less than or equal to second in the quantity for the message that first port receives When the quantity for the message that port receives, determine that first message is duplicate message, and abandon first message.Using the present invention Embodiment improves the speed of determining duplicate message, reduces the cost of system design complexity and system design, reduces production The product development cycle.Meanwhile when handling message, reduce to the occupancy quantity of processor resource and the power consumption of system.Certainly, It implements any of the products of the present invention or method must be not necessarily required to reach all the above advantage simultaneously.

Detailed description of the invention

In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.

Fig. 1 is the loop topology structural schematic diagram of the industrial network of the prior art;

Fig. 2 is a kind of flow chart of the method for determining duplicate message provided in an embodiment of the present invention;

Fig. 3 is another flow chart of the method for determining duplicate message provided in an embodiment of the present invention;

Fig. 4 is a kind of structural schematic diagram of the device of determining duplicate message provided in an embodiment of the present invention;

Fig. 5 is another structural schematic diagram of the device of determining duplicate message provided in an embodiment of the present invention.

Specific embodiment

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 description, 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, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.

In order to solve problems in the prior art, the embodiment of the invention provides the methods and dress of a kind of determining duplicate message It sets, improves the speed of determining duplicate message.

It should be noted that the embodiment of the present invention can be applied to the HSR (High- for meeting IEC62439-3 agreement Availability Seamless Redundancy, high reliability is seamless redundant looped network) and PRP (Parallel Redundancy Protocol, parallel redundancy network), but not limited to this.

A kind of method of determining duplicate message provided in an embodiment of the present invention is introduced first below.

As shown in Figure 1, the loop topology structural schematic diagram of industrial network, comprising: PRP100 and HSR110, wherein PRP 100 include: DANP (Double attached node implementing PRP, meet second network equipment of PRP agreement) 101, LAN A (Local Area Network A, local area network A) 102, LAN B (Local Area Network B, local area network B) 103, the port A 104, the port B 105, HSR 110 include: redundancy box 111, redundancy box 112, DANH (Double attached Node implementing HSR meets the first network equipment of HSR agreement) 113, first port 114 and second port 115。

In practical application, PRP 100 will need the message a sent to replicate, and obtain two identical messages: message a1 With message a2, the port A 104 of PRP 100 is connected with the first port 114 of HSR 110 by LAN A, the port B of PRP 100 105 are connected with the second port 115 of HSR 110 by LAN B, and PRP 100 is respectively by message a1With message a2From the port A and the end B Mouth is sent, message a1With message a2Redundancy box 111 and redundancy box 112, message a are arrived separately at by LAN A and LAN B1And message a2Reach the first port 114 and second port 115 of DANH 113 by redundancy box 111 and redundancy box 112 respectively again.For example, When first port 114 receives message a first1When, in general, obtaining message a1In source MAC and sequence number, and built The MAC Address and sequence number are searched in vertical table, and judge to whether there is the MAC Address and sequence number in the table, If it is judged that determining that the message is duplicate message for when being, abandoning the message, if it is judged that then being established when being no Corresponding table is for storing the MAC Address and sequence number.It tables look-up since each message will be undergone, build table, processing table Repetitive process, so several clock cycle will be expended, so that the time delay of processing message is longer.

In addition, it should be noted that the first port of first network equipment successively receives the report of second network equipment transmission Text, for example, when second network equipment has sent message a from the port A1Later, and message b is had sent1, on network transmission path Message b1Always in message a1Later, that is, the first port of first network equipment receives second network equipment first and first sends Message a1, can just receive the message b that second network equipment is first sent1

Based on the above issues, as shown in Fig. 2, a kind of method of determining duplicate message provided in an embodiment of the present invention, application First network equipment in redundant looped network, the first network equipment includes: first port and second port, wherein described First port and the second port are used to receive the message of second network equipment transmission, and this method comprises the following steps:

S201 receives the first message in the first port, counts the quantity for the message that the first port receives;

It is to be appreciated that second network equipment before sending message, needs to replicate the message, two phases are obtained Same message (original message and duplicate message), the two messages are sent from the different port of second network equipment respectively, are passed through Different network paths reaches two ports of first network equipment, it is seen then that original message and duplicate message are respectively from the first net Two ports of network equipment receive.In conjunction with Fig. 1, the first message a can be received in first port 1141, connect in second port 115 Receive the first message a2

Specifically, after the first port receives the first message, the method also includes:

The value of corresponding first counter of the first port is added 1, obtains the value of updated first counter, it is described First counter is used to count the quantity for the message that the first port receives;

The quantity for the message that the value of updated first counter is received as the first port;

In general, the corresponding counter of each receiving port, here.First port corresponds to the first counter, whenever first When port receives a message, the value of corresponding first counter of the first port is increased by 1, for example, not having in first port Have before receiving any message, the value of first counter is 0, after first port receives a message, update this first The value of counter, the i.e. value of first counter increase by 1, and the value for obtaining updated first counter is 1, when the first port After receiving a message again, the value of first counter increases by 1, at this point, the value of the first counter is 2, that is, works as reception After one message of the every reception in the port of message, the value of the corresponding counter in the port increases by 1 on the basis of original value, can See, the value of counter indicates the quantity for the message that the counter corresponding ports receive.

Optionally, after the first port receives the first message, first port can be counted using other methods The quantity of the message received, for example, after first port one message of every reception, one number of label in log recording table According to, and in statistical log record sheet total data quantity, the quantity of total data is the message that first port receives Quantity, it should be noted that the method for the quantity for the message that statistics first port receives is not limited to institute in the embodiment of the present invention The method of description.

S202, judges whether the quantity for the message that the first port receives is less than or equal to the second port and receives Message quantity;

It should be noted that the either port in the first port and second port of first network equipment receives message Afterwards, judge whether the quantity for the message that the port for receiving the message has been received is less than or equal to first port or second port The quantity for the message having been received.For example, judging the message that first port receives after first port receives message Whether quantity is less than or equal to the quantity for the message that second port receives, or after second port receives message, judges Whether the quantity for the message that Two-port netwerk receives is less than or equal to the quantity for the message that first port receives.

Specifically, whether the quantity for judging message that the first port receives is less than or equal to the second port The quantity of the message received, comprising:

Judge whether the value of updated first counter is less than or equal to the value of the second counter, described second counts Device is used to count the quantity for the message that the second port receives.

It is understood that each port for receiving message corresponds to respective counter, and here, second port corresponding second Counter, after second port one message of every reception, the value of the corresponding counter of the second port increases by 1, is judging first When whether the quantity for the message that port receives is less than or equal to the quantity for the message that second port receives, that is, judge first Whether the value of counter is less than or equal to the value of the second counter.

S203 is less than or equal to the message that the second port receives in the quantity for the message that the first port receives Quantity when, determine first message be duplicate message.

Specifically, the embodiment of the present invention counts report received by the receiving port of first network equipment using counter The quantity of text, for example, the value of counter corresponding to the receiving port increases by 1 when receiving port often receives a message. Here, the quantity that message that first port receives is indicated with the value of corresponding first counter of first port, uses second port The value of corresponding second counter indicates the quantity for the message that second port receives, so, in first port corresponding first When the value of counter is less than or equal to the value of the corresponding counter of second port, determine that first message is duplicate message.

When the quantity that the first port receives message is greater than the second port and receives the quantity of message, described in determination First message is non-duplicate message.

In the embodiment of the present invention, after the either port of first network equipment receives the first message, if the port connects The number for the message that second network equipment that the another port that the quantity of the message received is greater than first network equipment receives is sent When amount, it is determined that the first message is non-duplicate message, otherwise, it determines the first message is duplicate message.As it can be seen that the present invention is implemented Example, improves the speed of determining duplicate message, reduces to the occupancy quantity of processor resource and the power consumption of system.

For example, the corresponding counter of first port is indicated by CntReceived A, the corresponding counter of second port It is indicated by CntReceived B, after first network device power, is started before receiving the message that second network equipment is sent, The value of the corresponding CntReceived A of the first port of first network equipment is 0, i.e. CntReceived A=0, first network The value of the corresponding CntReceived B of the second port of equipment is 0, i.e. CntReceived B=0 is received in first port After the first message that second network equipment is sent, the value of the corresponding CntReceived A of first port is 1, that is, The value of CntReceived A=1, the corresponding CntReceived B of second port be 0, i.e. CntReceived B=0, at this point, CntReceived A > CntReceived B, it is determined that the first message is non-duplicate message.In practical application, since there are Two network equipments send the port A of message to first network equipment first port the close situation of distance, connect in second port Before receiving any message, first port receives the second message, at this point, the value of the corresponding CntReceived A of first port It is 2, i.e. the value of CntReceived A=2, the corresponding CntReceived B of second port is 0, i.e. CntReceived B=0, As it can be seen that CntReceived A > CntReceived B, it is determined that the second message is non-duplicate message.If first port receives After second message, second port receives third message, then the value of the corresponding CntReceived B of second port is 1, i.e., The value of CntReceived B=1, the corresponding CntReceived A of first port be 2, i.e. CntReceived A=2, at this time CntReceived B < CntReceived A, it is seen then that the value for receiving the counter of the second port of third message is less than first end The value of the counter of mouth, then it is assumed that third message is duplicate message.

In another example first port receives the first message, then the value of the corresponding CntReceived A of first port after powering on It is 1, i.e. the value of CntReceived A=1, the corresponding CntReceived B of second port is 0, i.e. CntReceived B=0, At this point, CntReceived A > CntReceived B, then the first message is non-duplicate message, receives the first report in first port After text, second port receives the second message, then the value of the corresponding CntReceived B of second port is 1, i.e., The value of CntReceived B=1, the corresponding CntReceived A of first port are 1, i.e. CntReceived A=1, it is seen then that CntReceived B=CntReceived A, then it is assumed that received second message of second port is duplicate message.

Specifically, after determining that first message is non-duplicate message, the method also includes:

Judge whether purpose IP address entrained by first message is identical as the IP address of the first network equipment;

Judging that purpose IP address entrained by first message is not identical as the IP address of the first network equipment When, forward first message.

In general, the first message includes purpose IP address, which is first to be reached in the network equipment of message Address obtains purpose IP address entrained by first message, by the destination IP when the first message reaches first network equipment Address is compared with the IP address of first network equipment, when the IP address of the purpose IP address and first network equipment is not identical When, which is forwarded to the purpose network equipment, wherein the IP address of the purpose network equipment and the purpose IP address have There is identical IP address.

Specifically, after the determination first message is duplicate message, the method also includes: abandon described the One message.

In general, after the received message of first port or second port of first network equipment is determined as duplicate message, The duplicate message determined is abandoned.

Below with reference to specific application example, be provided for the embodiments of the invention the method for determining duplicate message a kind of into Row is introduced.

As shown in figure 3, a kind of method of determining duplicate message provided in an embodiment of the present invention, applied in redundant looped network First network equipment, the first network equipment includes: first port and second port, wherein the first port and described Second port is used to receive the message of second network equipment transmission, and this method comprises the following steps:

S301 receives the first message in the first port, counts the quantity for the message that the first port receives;

Intelligible yes first network equipment includes: first port and second port, can be in practical application Single port receives the first message, can also receive the first message in second port.

S302, judges whether the quantity for the message that the first port receives is less than or equal to the second port and receives Message quantity;

When first port receives the first message, then judge whether the quantity for the message that the first port receives is less than Equal to the quantity for the message that the second port receives;If judging the second end when second port receives the first message Whether the quantity for the message that mouth receives is less than or equal to the quantity for the message that the first port receives.

It should be noted that in the size of the quantity for two received messages in port for judging first network equipment, with Subject to the port for receiving message, after the either port of two ports of first network equipment receives message, the port is judged Whether the quantity of the message received is less than or equal to the quantity for the message that another port receives.For example, first network equipment There are two port, port A and port B, when A receives the first message in port, judge that the quantity for the message that port A is received is The quantity of the no message received less than or equal to port B;If B receives the first message in port, judge what port B was received Whether the quantity of message is less than or equal to the quantity for the message that port A is received.As it can be seen that in the port A for judging first network equipment When whether the first message received with the either port in the B of port is duplicate message, the port of first message will be received The quantity for the message having received is compared with the quantity for the message of the port for not receiving the message having received, thus Whether the received message of either port for determining first network equipment is duplicate message.

Optionally, after the first port receives the first message, the method also includes:

The value of corresponding first counter of the first port is added 1, obtains the value of updated first counter, it is described First counter is used to count the quantity for the message that the first port receives;

The quantity for the message that the value of updated first counter is received as the first port;

As it can be seen that the value of the corresponding counter in the port adds 1 after the either port of first network equipment receives message.

Whether the quantity for judging message that the first port receives, which is less than or equal to the second port, receives Message quantity, comprising:

Judge whether the value of updated first counter is less than or equal to the value of the second counter, described second counts Device is used to count the quantity for the message that the second port receives.

In practical application, the corresponding counter in each port of first network equipment, when any of first network equipment After port receives message, the value of the corresponding counter in the port increases by 1, can determine the port according to the value of counter The quantity of received message.

S303 determines that first message is non-duplicate message;

Specifically, the quantity of the message received in the first port is greater than the message that the second port receives When quantity, determine that first message is non-duplicate message, that is, the value of the corresponding counter of first port is greater than second end When the value of the corresponding counter of mouth, determine that the first message is non-duplicate message.

Optionally, after determining that first message is non-duplicate message, the method also includes:

Judge whether purpose IP address entrained by first message is identical as the IP address of the first network equipment;

Judging that purpose IP address entrained by first message is not identical as the IP address of the first network equipment When, forward first message.

S304 determines that first message is duplicate message;

Specifically, the quantity of the message received in the first port is less than or equal to the report that the second port receives When the quantity of text, determine that first message is duplicate message, that is, the value of the corresponding counter of first port is less than or equal to When the value of the corresponding counter of second port, determine that the first message is duplicate message.

After the determination first message is duplicate message, the method also includes: abandon first message.

In the embodiment of the present invention, after the either port of first network equipment receives the first message, if the port connects The number for the message that second network equipment that the another port that the quantity of the message received is greater than first network equipment receives is sent When amount, it is determined that first message is non-duplicate message, and otherwise, which is duplicate message.As it can be seen that the present invention is implemented Example improves the speed of processing message, reduces to the occupancy quantity of processor resource and the power consumption of system.

In addition, the prior art use TCAM determine message that first network equipment receives whether for duplicate message, But the price of the TCAM chip is higher, can improve system design cost, and the embodiment of the present invention does not need TCAM and determines repetition Message reduces system design cost.

As shown in figure 4, a kind of device of determining duplicate message provided in an embodiment of the present invention, applied in redundant looped network First network equipment, the first network equipment includes: first port and second port, wherein the first port and described Second port is used to receive the message of second network equipment transmission, and described device 400 includes:

Receiving unit 410 counts the report that the first port receives for receiving the first message in the first port The quantity of text;

First judging unit 420, for judging whether the quantity of message that the first port receives is less than or equal to institute State the quantity for the message that second port receives;

The quantity of first determination unit 430, the message for receiving in the first port is less than or equal to described second When the quantity for the message that port receives, determine that first message is duplicate message.

In the embodiment of the present invention, after the either port of first network equipment receives the first message, if the port connects The number for the message that second network equipment that the another port that the quantity of the message received is greater than first network equipment receives is sent When amount, it is determined that the first message is non-duplicate message, otherwise, it determines the first message is duplicate message.As it can be seen that the present invention is implemented Example, improves the speed of determining duplicate message, reduces to the occupancy quantity of processor resource and the power consumption of system.

Optionally, described device 400 further include:

Updating unit obtains updated first meter for the value of corresponding first counter of the first port to be added 1 The value of number device, first counter are used to count the quantity for the message that the first port receives;

Counting unit, the number for the message that the value of updated first counter is received as the first port Amount;

First judging unit is specifically used for, and judges whether the value of updated first counter is less than or equal to The value of two counters, second counter are used to count the quantity for the message that the second port receives.

Optionally, described device 400 further include:

Second judgment unit, for judging purpose IP address entrained by first message and the first network equipment IP address it is whether identical;

Retransmission unit, for judging purpose IP address entrained by first message and the first network equipment When IP address is not identical, first message is forwarded.

Optionally, described device further include: discarding unit, for abandoning first message.

In the embodiment of the present invention, after the either port of first network equipment receives the first message, if the port connects The number for the message that second network equipment that the another port that the quantity of the message received is greater than first network equipment receives is sent When amount, it is determined that first message is non-duplicate message, and otherwise, which is duplicate message.As it can be seen that the present invention is implemented Example improves the speed of processing message, reduces to the occupancy quantity of processor resource and the power consumption of system.

Optionally, on the basis of comprising receiving unit 410, the first judging unit 420 and the first determination unit 430, such as Shown in Fig. 5, a kind of device of determining duplicate message provided in an embodiment of the present invention is set applied to the first network in redundant looped network Standby, the first network equipment includes: first port and second port, wherein the first port and the second port are used In the message for receiving the transmission of second network equipment, the device 400 further include:

Second determination unit 440, the quantity for receiving message in the first port are received greater than the second port When the quantity of message, determine that first message is non-duplicate message.

For device embodiment, since it is substantially similar to the method embodiment, related so being described relatively simple Place illustrates referring to the part of embodiment of the method.

It should be noted that, in this document, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.

Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for system reality For applying example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to embodiment of the method Part explanation.

The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of method of determining duplicate message, which is characterized in that applied to the first network equipment in redundant looped network, described One network equipment includes: first port and second port, wherein the first port and the second port are used for received in-order The message that second network equipment in parallel redundancy network is sent, which comprises
The first message is received in the first port, counts the quantity for the message that the first port receives;
Judge whether the quantity for the message that the first port receives is less than or equal to the message that the second port receives Quantity;
When the quantity for the message that the first port receives is less than or equal to the quantity for the message that the second port receives, Determine that first message is duplicate message.
2. the method according to claim 1, wherein it is described the first port receive the first message after, The method also includes:
The value of corresponding first counter of the first port is added 1, obtains the value of updated first counter, described first Counter is used to count the quantity for the message that the first port receives;
The quantity for the message that the value of updated first counter is received as the first port;
Whether the quantity for judging message that the first port receives is less than or equal to the report that the second port receives The quantity of text, comprising:
Judge whether the value of updated first counter is less than or equal to the value of the second counter, second counter is used In the quantity for counting the message that the second port receives.
3. the method according to claim 1, wherein the method also includes:
When the quantity that the first port receives message is greater than the second port and receives the quantity of message, described first is determined Message is non-duplicate message.
4. according to the method described in claim 3, it is characterized in that, it is described determine first message be non-duplicate message it Afterwards, the method also includes:
Judge whether purpose IP address entrained by first message is identical as the IP address of the first network equipment;
When the IP address for judging purpose IP address entrained by first message and the first network equipment is not identical, turn Send out the first message described.
5. the method according to claim 1, wherein the determination first message be duplicate message it Afterwards, the method also includes: abandon first message.
6. a kind of device of determining duplicate message, which is characterized in that applied to the first network equipment in redundant looped network, described One network equipment includes: first port and second port, wherein the first port and the second port are used for received in-order The message that second network equipment is sent, described device include:
Receiving unit counts the number for the message that the first port receives for receiving the first message in the first port Amount;
First judging unit, for judging whether the quantity of message that the first port receives is less than or equal to the second end The quantity for the message that mouth receives;
The quantity of first determination unit, the message for receiving in the first port is received less than or equal to the second port When the quantity of the message arrived, determine that first message is duplicate message.
7. device according to claim 6, which is characterized in that described device further include:
Updating unit obtains updated first counter for the value of corresponding first counter of the first port to be added 1 Value, first counter is used to count the quantity of the message that the first port receives;
Counting unit, the quantity for the message that the value of updated first counter is received as the first port;
First judging unit is specifically used for, and judges whether the value of updated first counter is less than or equal to the second meter The value of number device, second counter are used to count the quantity for the message that the second port receives.
8. device according to claim 6, which is characterized in that described device further include:
Second determination unit, the quantity for receiving message in the first port are greater than the number that the second port receives message When amount, determine that first message is non-duplicate message.
9. device according to claim 8, which is characterized in that described device further include:
Second judgment unit, for judging the IP of purpose IP address entrained by first message Yu the first network equipment Whether address is identical;
Retransmission unit, for judging the IP of purpose IP address entrained by first message and the first network equipment When location is not identical, first message is forwarded.
10. device according to claim 6, which is characterized in that described device further include:
Discarding unit, for abandoning first message.
CN201611197683.XA 2016-12-22 2016-12-22 A kind of method and device of determining duplicate message CN106789425B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611197683.XA CN106789425B (en) 2016-12-22 2016-12-22 A kind of method and device of determining duplicate message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611197683.XA CN106789425B (en) 2016-12-22 2016-12-22 A kind of method and device of determining duplicate message

Publications (2)

Publication Number Publication Date
CN106789425A CN106789425A (en) 2017-05-31
CN106789425B true CN106789425B (en) 2019-08-02

Family

ID=58897711

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611197683.XA CN106789425B (en) 2016-12-22 2016-12-22 A kind of method and device of determining duplicate message

Country Status (1)

Country Link
CN (1) CN106789425B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107332834A (en) * 2017-06-26 2017-11-07 南京南瑞继保电气有限公司 PRP method for connecting network under a kind of Windows systems
CN107257301A (en) * 2017-08-10 2017-10-17 北京东土科技股份有限公司 The detection method and device of duplicate message and failure in a kind of parallel redundancy network

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355419A (en) * 2008-08-22 2009-01-28 成都市华为赛门铁克科技有限公司 Method and apparatus for avoiding network attack
CN101800679A (en) * 2010-03-10 2010-08-11 华为技术有限公司 Message packet loss detection method and system
CN102546409A (en) * 2011-12-28 2012-07-04 杭州华三通信技术有限公司 Method and RB (route bridge) for processing message based on TRILL (Transparent Interconnection of Lots of Links) network
CN103428060A (en) * 2012-05-25 2013-12-04 北京东土科技股份有限公司 Seamless redundancy realization method of loop network
CN104539514A (en) * 2014-12-17 2015-04-22 广州酷狗计算机科技有限公司 Information filtering method and device
US9525629B2 (en) * 2013-12-13 2016-12-20 Tencent Technology (Shenzhen) Company Limited Method and apparatus for transmitting data packets

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2001043354A2 (en) * 1999-12-07 2001-06-14 Broadcom Corporation Mirroring in a stacked network switch configuration

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101355419A (en) * 2008-08-22 2009-01-28 成都市华为赛门铁克科技有限公司 Method and apparatus for avoiding network attack
CN101800679A (en) * 2010-03-10 2010-08-11 华为技术有限公司 Message packet loss detection method and system
CN102546409A (en) * 2011-12-28 2012-07-04 杭州华三通信技术有限公司 Method and RB (route bridge) for processing message based on TRILL (Transparent Interconnection of Lots of Links) network
CN103428060A (en) * 2012-05-25 2013-12-04 北京东土科技股份有限公司 Seamless redundancy realization method of loop network
US9525629B2 (en) * 2013-12-13 2016-12-20 Tencent Technology (Shenzhen) Company Limited Method and apparatus for transmitting data packets
CN104539514A (en) * 2014-12-17 2015-04-22 广州酷狗计算机科技有限公司 Information filtering method and device

Also Published As

Publication number Publication date
CN106789425A (en) 2017-05-31

Similar Documents

Publication Publication Date Title
KR0150275B1 (en) Congestion control method for multicast communication
US7577140B2 (en) Method and apparatus for automatically determining an appropriate transmission method in a network
US7912959B2 (en) Architecture for building a peer to peer messaging platform
CN103858391B (en) Make MPLS paths loopback for connectionless MPLS network in forwarding plane
US6912231B2 (en) Multi-broadcast bandwidth control system
EP1453251B1 (en) Real-time and non-real-time traffic in a Local Area Network
US20110063979A1 (en) Network traffic management
KR20070003983A (en) Method and apparatus for group communication with end-to-end reliability
WO2011012582A2 (en) Multicast traffic management in a network interface
EP2299633A1 (en) Misdirected packet detection apparatus and method
CN102938794A (en) Address resolution protocol (ARP) message forwarding method, exchanger and controller
EP2676411B1 (en) Method and system for classification and management of inter-blade network traffic in a blade server
CN103401726B (en) Network path detection method and device, system
US20070058682A1 (en) Method for optimizing bandwidth utilization in bus systems
Viger et al. Detection, understanding, and prevention of traceroute measurement artifacts
US9270592B1 (en) Hash collision avoidance in network routing
US20030202470A1 (en) Method and apparatus for managing network traffic
US20070223456A1 (en) Switching apparatus
CN106664261B (en) A kind of methods, devices and systems configuring flow entry
US8767747B2 (en) Method for transferring data packets in a communication network and switching device
EP2047642B1 (en) Techniques for distributing routing information using multicasts
US8908704B2 (en) Switch with dual-function management port
WO2011073391A1 (en) Method and apparatus for filtering multicast packets
CN1874288A (en) Method for determining connection topology of home network
US7751319B2 (en) Method and processor for classifying data packet units

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant