WO2020140875A1 - 报文处理方法和装置 - Google Patents

报文处理方法和装置 Download PDF

Info

Publication number
WO2020140875A1
WO2020140875A1 PCT/CN2019/130001 CN2019130001W WO2020140875A1 WO 2020140875 A1 WO2020140875 A1 WO 2020140875A1 CN 2019130001 W CN2019130001 W CN 2019130001W WO 2020140875 A1 WO2020140875 A1 WO 2020140875A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
period
label
packet
normal
Prior art date
Application number
PCT/CN2019/130001
Other languages
English (en)
French (fr)
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
Priority claimed from CN201910005223.XA external-priority patent/CN111404840B/zh
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19906824.8A priority Critical patent/EP3902217B1/en
Publication of WO2020140875A1 publication Critical patent/WO2020140875A1/zh
Priority to US17/366,901 priority patent/US20210336892A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/31Flow control; Congestion control by tagging of packets, e.g. using discard eligibility [DE] bits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/28Flow control; Congestion control in relation to timing considerations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/32Flow control; Congestion control by discarding or delaying data units, e.g. packets or frames
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/56Queue scheduling implementing delay-aware scheduling

Definitions

  • This application relates to the field of communications, and more specifically, to a message processing method and device.
  • Deterministic networks are designed to provide data transmission services that guarantee deterministic latency.
  • each outbound interface of a device that supports deterministic network features is set up with multiple queues responsible for buffering upstream packets that arrive within the corresponding scheduling period, and only one queue is sending packets at any time Status, other queues only receive upstream packets.
  • the upstream packets all carry a "period" field, and the value of this field (marked as X) identifies in which cycle of the upstream device the packet was sent.
  • the queuing delay introduced by the cache queue of the link layer device/interface the delay change caused by the switching of the underlying transmission network path in the Internet protocol plus (IP+) underlying transmission network scenario.
  • IP+ Internet protocol plus
  • the local device will not know how to handle it, or the local device may discard it For some messages, this may affect uncertain upstream messages, resulting in a failure to guarantee service quality.
  • the present application provides a message processing method and device, which can avoid the cascading effect of an abnormal message caused by an abnormal bottom delay on an indefinite target stream.
  • a packet processing method includes: a first device receives a first packet sent by a second device, the first packet carries a first label, and the first label is based on the transmission When the first message is determined by the period of the second device; the first device determines whether the first message is a normal message according to the first label; if it is determined that the first message is Normal packet, the first device determines a second packet according to the first packet, the second packet carries a second label; the first device sends the third packet to the third device in a first period Two packets, the second label is determined according to the first period.
  • a normal message refers to a message that does not affect the reception of messages other than the first message, or a message sent when the delay jitter is within a certain range.
  • the opposite of normal messages is abnormal messages, that is, messages that affect the reception of other messages than the first message are abnormal messages, or messages sent when the delay jitter exceeds a certain range .
  • the first device may obtain the second packet by replacing the first label in the first packet with the second label.
  • the first device may obtain the second packet by adding the second label to the first packet. It should be understood that the second packet at this time carries both the first label and the second label.
  • the first label indicates the period of the first device when sending the first packet; accordingly, the second label indicates the second period.
  • the period value indicated by the first label is the period of the first device when the first packet is sent, and the period value indicated by the second label is the first period.
  • the cycle value indicated by the first cycle or the second label may be determined according to the adjustment value ⁇ corresponding to the second device in the first device.
  • the period value indicated by the second label the period value indicated by the first label+ ⁇ .
  • the normal transmission processing is performed only when the packet is detected as a normal packet, which can avoid abnormal packets caused by the underlying delay exception to the uncertain target flow Chain effect, which is conducive to improving service quality.
  • the determining by the first device whether the first packet is a normal packet according to the first label includes: the first device according to the first label and the first The second period of a device determines whether the first message is a normal message, and the second period is a period for the first device to receive the first message, or is the first message in time The device receives a cycle after the first packet and one cycle before the first cycle.
  • the period value indicated by the first tag is the period of the second device when the first packet is sent; wherein, the first device is based on the first tag and The second period of the first device, determining whether the first message is a normal message, includes: the first device determining whether the period value indicated by the first tag is corresponding to the second period In the first window, the first window corresponding to different periods of the first device is different; if the period value indicated by the first label is in the first window, the first device determines the first A message is a normal message, otherwise, it is determined that the first message is an abnormal message.
  • the period value indicated by the second tag is the first period; wherein, the first device is based on the second period of the first tag and the first device, Determining whether the first message is a normal message includes: the first device determining the second tag according to the first tag; the first device determining whether the period value indicated by the second tag Located in the second window corresponding to the second period, the second window corresponding to different periods of the first device is different; if the period value indicated by the second label is located in the second window, the The first device determines that the first message is a normal message; otherwise, determines that the first message is an abnormal message.
  • the first window is [C1- ⁇ +S, C1+(w-1)*S- ⁇ ], where ⁇ is an adjustment value corresponding to the second device, so The adjustment value is used to determine the second label, C1 is the second period, w ⁇ 3, and w is an integer, and S is an integer other than 0.
  • the second window is [C1+S, C1+(w-1)*S], C1 is the second period, w ⁇ 3, and w is an integer, and S is not An integer of 0.
  • the method further includes: if it is determined that the first packet is an abnormal packet, the first device performs abnormal processing on the first packet, and the abnormal processing includes discarding The first message or the first message is repaired.
  • the packet processing method provided in this application can reduce the retransmission delay caused by discarding by repairing and processing abnormal packets instead of simply discarding them.
  • the second label is determined according to the first label and the adjustment value corresponding to the second device.
  • the method further includes: in a case where the period of the first device changes, the first device updates the adjustment value.
  • the packet processing method of the present application by updating the adjustment value, the value representing the period within a certain range can be recycled, so that the infinite increase of the period of the first device can be avoided, thereby reducing the amount sent from the first device
  • the bits occupied by the tags carried in the packets reduce overhead.
  • the method further includes: the first device receives an update message, and the update message is sent when the cycle of the second device changes; the first device According to the update message, the adjustment value is updated.
  • a packet processing apparatus which is used to execute the method in the first aspect or any possible implementation manner of the first aspect.
  • the apparatus may include a module for performing the method in the first aspect or any possible implementation manner of the first aspect.
  • a message processing apparatus includes a memory and a processor.
  • the memory is used to store instructions.
  • the processor is used to call the instructions stored in the memory to perform the first aspect or any one of the first aspects. Possible methods of implementation.
  • the device further includes a transceiver or a communication interface for performing a signal (eg, message) receiving/transmitting action in the method of the first aspect or any possible implementation manner of the first aspect.
  • a signal eg, message
  • a message processing apparatus including at least one processing element (or chip) for performing or the method of any possible implementation manner of the first aspect.
  • a computer-readable storage medium on which a computer program is stored, which when executed by a computer causes the computer to implement the first aspect or the method in any possible implementation manner of the first aspect.
  • a computer program product containing instructions which when executed by a computer causes the computer to implement the first aspect or a method of any possible implementation manner of the first aspect.
  • FIG. 1 is a schematic structural diagram of a network provided by this application.
  • FIG. 2 is an exemplary flowchart of a message processing method provided by the present application.
  • FIG. 3 is a schematic diagram of updating adjustment values provided by the present application.
  • FIG. 4 is a schematic structural diagram of a message processing device provided by the present application.
  • FIG. 5 is another schematic structural diagram of a message processing device provided by the present application.
  • FIG. 1 is a schematic structural diagram of a network provided by this application.
  • the network includes a node 101, a node 102, and a node 103.
  • the node 101 is connected to the interface 21 of the node 102 through its interface 11, and the interface 22 of the node 102 is connected to the interface 31 of the node 103.
  • Messages can be sent between nodes.
  • node 101 can send a message to node 102 through interface 11.
  • interface 21 of node 102 receives the message sent by node 101, it can send the message to node 103 through interface 22.
  • the node 101 may be an entry edge node
  • the node 102 may be a core node (or called an intermediate node)
  • the node 103 may be an exit edge node.
  • node 101 may be a host device
  • node 102 may be a core node
  • node 103 may be another core node.
  • node 101, node 102, and node 103 may all be core nodes. It should be understood that the locations or functions of the nodes listed above in the network are merely exemplary descriptions, and should not constitute any limitation to this application.
  • Each node shown in FIG. 1 maintains a clock locally, and the clocks of the nodes may be unsynchronized.
  • the following uses node 101 and node 102 as an example for description.
  • Node 101 and node 102 at initialization may be generated customize an initial count value, for example, an initial count value of the node 101 may be referred to as C A, the initial count value of node 102 may be referred to as C B.
  • C A cumulative S, S is not an integer of 0, and a is a constant, S may be a positive number, it may be negative.
  • S may be later -1, the time T, C A becomes C A -1.
  • S 2 may be later, the time T, C A becomes C A +2.
  • C B accumulates S every time T passes.
  • C A and C B may be equal or different, and this application does not limit it.
  • the description of the similar node 101 sending a message in a period X means that the node 101 sends a message in a period corresponding to its count value X.
  • the node 101 may be 5 or 7 in the periodic sending packets, etc., without the other transmission cycles 2, 4 or 6 packets.
  • node 101 When sending a message to node 102, node 101 may carry a label in the message, and the label is determined according to the period when node 101 sends the message.
  • X C A.
  • the label P indicates that the periodic value indicated by the label is P, and P is any possible periodic value.
  • the interface may be for example the interface 22 as shown in FIG. 1.
  • the queue Q X may be the index (or number) of the U queues as or 'S queue, Indicates rounding down,
  • the queue Q X may also be other queues among the U queues mentioned above, which is not limited in this application. It should be noted that in this application, the node 102 can only send one queue in any period, but cannot send multiple queues at the same time, and when sending the queue, the queue cannot receive messages. It should be understood that the so-called sending queue and the messages in the sending queue in this application are the same concept.
  • Y X+ ⁇ X
  • ⁇ X is the adjustment value stored in the node 102 corresponding to the node 101
  • the adjustment value is used to calculate which period in the node 102 any message sent from the node 101 needs to be Be sent.
  • the adjustment value may be calculated according to the length of the optical fiber between the node 102 and the node 101, or may be obtained by sending a test message.
  • y+1-x ⁇ X ⁇ y+Ux or, y+1-x ⁇ X ⁇ y+Ux, and ⁇ X is an integer, and the definition of U is as described above .
  • y+1-x ⁇ X ⁇ y+Ux if the node 101 and node 102 synchronization update cycle, i.e., C A and C B simultaneously updated, y + 1-x ⁇ X ⁇ y + Ux; period if the node 101 and the node 102 is not updated simultaneously, i.e., C A and C B are not updated simultaneously, then y+1-x ⁇ X ⁇ y+Ux.
  • the node 102 Under normal circumstances, that is, when the delay jitter of the bottom layer is within a limited range, the node 102 sends a message according to the above rules.
  • These delay anomalies may cause the packet to advance or delay for a long time to reach the next node, thereby affecting the quality of service.
  • node 102 will not know how to handle it, or node 102 may discard For some messages, this may affect uncertain upstream messages, resulting in a failure to guarantee service quality.
  • this application provides a packet processing method, which provides a packet detection mechanism to perform normal transmission processing when it is determined that the packet is a normal packet, which can avoid the abnormality caused by the abnormality of the underlying delay
  • the cascading effect of the message on the uncertain target flow is beneficial to improve the service quality.
  • the first message may be any message sent by the second device to the first device.
  • the first device may be the node 102 shown in FIG. 1, and the second device may be the node 101 shown in FIG.
  • FIG. 2 is a schematic flowchart of a packet processing method provided by this application. Hereinafter, each step of FIG. 2 will be described in detail.
  • the first device receives the first packet.
  • the first packet carries the first label, and the first label is determined according to the period of the second device when the first packet is sent.
  • the first label may indicate the period of the second device when sending the first message.
  • the period indicated by the first label is the period of the second device when sending the first message.
  • the period value indicated by the first tag may also be a value that is related to but not equal to the period of the second device when the first message is sent.
  • the period value indicated by the first label is the sum of the period of the second device when sending the first message and a preset value.
  • the preset value may be, for example, the following adjustment value ⁇ , but this application does not limited.
  • the present application will be described by taking only the period value indicated by the first tag as the period of the second device when sending the first message.
  • the period value indicated by the first label that is, the period of the second device when sending the first message is recorded as: X1. That is, the second device sends the first message in the period X1.
  • the count value of the second period corresponding to the period X1 is X1.
  • the situation in which the first device receives the first packet and sends the second packet is similar and will not be described in detail.
  • the first device determines whether the first packet is a normal packet according to the first label.
  • the first device may determine whether the first packet is a normal packet according to the period value indicated by the first label, that is, X1.
  • a normal message refers to a message that does not affect the reception of messages other than the first message, or a message sent when the delay jitter is within a certain range.
  • the opposite of normal messages is abnormal messages, that is, messages that affect the reception of other messages than the first message are abnormal messages, or messages sent when the delay jitter exceeds a certain range .
  • the first device may obtain the second packet by replacing the first label in the first packet with the second label.
  • the first device may obtain the second packet by adding the second label to the first packet. It should be understood that the second packet at this time carries both the first label and the second label.
  • the first device may also determine the second message according to other methods, which is not limited in this application.
  • the first device sends a second message to the third device in the first period.
  • the second label in the second message is determined according to the first cycle.
  • the second label may indicate the period of the first device when sending the second message.
  • the period indicated by the second label is the period of the first device when sending the second message, which is indicated by the second label
  • the period value of is the first period.
  • the period value indicated by the second label may be a value related to the first period but not equal.
  • the period value indicated by the second label is the sum of the first period and a preset value, but this application does not limit it.
  • the present application will be described only by taking the period value indicated by the second label as the first period. And, in the following, for ease of understanding and description, the period value indicated by the second label, that is, the second period is denoted as: X2.
  • the first cycle or the cycle value indicated by the second label may be determined according to the adjustment value ⁇ corresponding to the second device in the first device.
  • corresponding to the second device in the first device.
  • X2 X1+ ⁇ .
  • the determination method of ⁇ can refer to the determination method of ⁇ X described above, which will not be repeated here.
  • the first device after receiving the first message, the first device needs to buffer the message in a corresponding queue.
  • the cache operation may be performed after S220, but this application does not limit it.
  • the first device may cache the message after S230 and before S240. If the first device performs a caching operation after S220, if it is determined that the first packet is a normal packet, the first device may cache the first packet to the corresponding queue, and then process the first packet to obtain the first The second message, or the first device may cache the obtained second message to the corresponding queue.
  • the queue for buffering the first packet or the second packet can be used according to the interface (recorded as: the first interface) in the first device for sending the packet of the second device
  • the number of cache queues is determined.
  • the number of cache queues that can be used by the first interface is written as: w, w ⁇ 3, and w is an integer.
  • the queue for buffering the first packet or the second packet may be the index of the w queues is or Of the queue.
  • w is less than or equal to the total number of cache queues corresponding to the first interface.
  • the first device is the node 102 and the second device is the node 101, then 3 ⁇ w ⁇ U.
  • w can be set when the first device is initialized, or can be set at any time before the second device sends a packet, which is not limited in this application.
  • w can be set by the first device autonomously or by the control surface.
  • the normal transmission processing is performed only when the packet is detected as a normal packet, which can avoid abnormal packets caused by the underlying delay exception to the uncertain target flow Chain effect, which is conducive to improving service quality.
  • the method may further include:
  • the first device may discard the first message, or the first device may perform repair processing on the first message.
  • the repair process may be to increase or decrease the delay time in the subsequent forwarding process according to the number of cycles the first message is advanced or delayed to correct the time when the abnormal message is forwarded.
  • the packet processing method provided by the present application can reduce the retransmission delay caused by discarding by repairing and processing abnormal packets instead of simply discarding them.
  • the following describes in detail how the first device determines whether the first packet is a normal packet based on the first label.
  • the first device may determine whether the first packet is a normal packet according to the first label and the second period of the first device.
  • the first device may determine whether the first message is a normal message according to the period value (ie, X1) indicated by the first tag and the second period of the first device.
  • the second period is a period in which the first device receives the first packet, or a period after the period in which the first device receives the first packet in time and before the first period.
  • the second period may be a period in which the first device determines whether the first message is a normal message, where the first device may determine whether the first message is a normal message in the period in which the first message is received, or It can be determined whether the first packet is a normal packet at any cycle before the first cycle.
  • the second cycle is denoted as: C1.
  • the first device may specifically adopt method one or method two to determine whether the first message is a normal message.
  • the first device determines whether the period value indicated by the first label is within the first window corresponding to the second period; if the period value indicated by the first label is within the first window, the first device may determine the first packet It is a normal message, otherwise, it can be determined that the first message is an abnormal message.
  • the first window corresponding to different periods of the first device is different. That is, the first window is updated as the period of the first device is updated.
  • the first window is [C1- ⁇ +S, C1+(w-1)*S- ⁇ ].
  • the first message is a normal message, otherwise the first message is an abnormal message.
  • the first window may also be a window smaller than [C1- ⁇ +S, C1+(w-1)*S- ⁇ ].
  • the first window may be a window slightly larger than [C1- ⁇ +S, C1+(w-1)*S- ⁇ ], depending on the tolerance of the system.
  • the first window corresponding to some periods can also be manually configured, that is, the ratio of the first window corresponding to other periods can be [C1- ⁇ +S, C1+(w-1)*S- ⁇ ] Small or large.
  • C1 is the period when the first device receives the first message.
  • Table 1 shows a case where the first device receives the message sent by the second device.
  • the second column represents the period of the second device when sending the message
  • the first column represents the period of the first device when receiving the message carrying the corresponding label
  • the third column represents the queue that the message carrying the corresponding label should enter.
  • the received message is considered to be an abnormal message.
  • Example 1 and Example 2 describe the meaning of formula (1) from two angles of formula (1).
  • the first device first determines the second label according to the first label, and then determines whether the period value indicated by the second label is within the second window corresponding to the second period. If the period value indicated by the second label is within the second window, the first device may determine that the first message is a normal message; otherwise, determine that the first message is an abnormal message.
  • the second windows corresponding to different periods of the first device are different. That is, the second window is updated as the period of the first device is updated.
  • the second window is [C1+S, C1+(w-1)*S].
  • the second window may also be a smaller window than [C1+S, C1+(w-1)*S].
  • the second window may also be a slightly larger window than [C1+S, C1+(w-1)*S], depending on the tolerance of the system.
  • the second window corresponding to some periods may also be manually configured, that is, the second window corresponding to other periods may be smaller or larger than [C1+S, C1+(w-1)*S] .
  • the method may further include: when the cycle of the first device changes, the first device updates ⁇ .
  • the updated ⁇ is ⁇ ', and As described above, C min is the minimum value of the cycle (ie, count value) of the first device, and C max is the maximum value of the cycle of the first device. C max -C min +
  • k*
  • the first device also updates the adjustment values corresponding to other devices, for example, the adjustment values corresponding to the third device.
  • the packet processing method of the present application by updating the adjustment value, the value representing the period within a certain range can be recycled, so that the infinite increase of the period of the first device can be avoided, thereby reducing the amount sent from the first device
  • the bits occupied by the tags carried in the packets reduce overhead.
  • the first device in the case where the first device jumps in a period, the first device also sends an update message (for example, written as: first update) to each device connected to it (for example, the third device and the first device) Message), the first update message is used by the other device to update the adjustment value corresponding to the first device.
  • the first update message may include C min and C max , and each device updates its adjustment value according to C min and C max .
  • the second device may update its adjustment value corresponding to the first device to ⁇ ′ 1 , where ⁇ 1 is the adjustment value of the second device corresponding to the first device before the update.
  • the third device may update its adjustment value corresponding to the first device to ⁇ ′ 2 , where ⁇ 2 is the adjustment value of the third device corresponding to the first device before the update.
  • the C min and C max of the first device, the second device, and the third device may be the same, but this application does not limit this.
  • the adjustment value of the first device relative to the second device before the update is 6, that is, the adjustment value of the interface 21 is 6, and the adjustment value of the third device is 8, that is, the adjustment value of the interface 22 is 8.
  • the first device updates its adjustment value corresponding to the second device to -9, and updates its adjustment value corresponding to the third device to -7.
  • the first device sends a first update message to the second device and the third device.
  • the second device may update its adjustment value corresponding to the first device to 11, and the third device According to the first update message, the adjustment value corresponding to the first device may be updated to 13.
  • the first device may also stop receiving the reservation request message.
  • the reservation request message is used to reserve resources.
  • the method further includes:
  • the first device receives an update message (for example, denoted as: a second update message), the second update message is sent when the period of the second device jumps; the first device updates the corresponding to the second update message Adjustment value of the second device.
  • an update message for example, denoted as: a second update message
  • first device updating the adjustment value corresponding to the second device according to the second update message is similar to the second device updating the adjustment value corresponding to the first device according to the first update message, and details are not described here.
  • FIG. 4 is a packet processing apparatus 400 according to an embodiment of the present invention.
  • the packet processing apparatus 400 implements some or all functions of the first device through software, hardware, or a combination of the two.
  • the message processing apparatus may be the first device or a chip applied to the first device.
  • the message processing apparatus 400 includes a receiving module 410, a processing module 420, and a sending module 430.
  • the receiving module 410 is configured to receive a first packet sent by a second device, where the first packet carries a first label, and the first label is based on a period of the second device when the first packet is sent definite;
  • the processing module 420 is configured to determine whether the first packet is a normal packet according to the first label
  • the processing module 420 is further configured to, if the first message is a normal message, determine a second message according to the first message, and the second message carries a second label;
  • the sending module 430 is configured to send the second message to the third device in the first period, and the second label is determined according to the first period.
  • processing module 420 is specifically configured to:
  • the second period is a period for the device to receive the first message, or a time A period after the period in which the device receives the first packet and before the first period.
  • the period value indicated by the first label is the period of the second device when the first packet is sent;
  • processing module 420 is specifically used for:
  • the period value indicated by the first label is within the first window, it is determined that the first message is a normal message; otherwise, it is determined that the first message is an abnormal message.
  • the period value indicated by the second label is the first period
  • processing module 420 is specifically used for:
  • the period value indicated by the second label is located in the second window, it is determined that the first message is a normal message; otherwise, it is determined that the first message is an abnormal message.
  • the first window is [C1- ⁇ +S, C1+(w-1)*S- ⁇ ], where ⁇ is an adjustment value corresponding to the second device, so The adjustment value is used to determine the second label, C1 is the second period, w ⁇ 3, and w is an integer, and S is an integer other than 0.
  • the second window is [C1+S, C1+(w-1)*S], C1 is the second period of the device, w ⁇ 3, and w is an integer, S It is an integer other than 0.
  • processing module 420 is also used to:
  • abnormal processing is performed on the first packet, and the abnormal processing includes discarding the first packet or performing repair processing on the first packet.
  • the second label is determined according to the first label and the adjustment value corresponding to the second device.
  • processing module 420 is also used to:
  • the adjustment value is updated.
  • the receiving module 410 is further configured to receive an update message that is sent when the period of the second device is changed;
  • the processing module 420 is further configured to update the adjustment value according to the update message.
  • the sending module in the above embodiments may be a transmitter
  • the receiving module may be a receiver
  • the processing module may be a processor, which will not be repeated here.
  • the present application also provides a packet processing apparatus 500.
  • the packet processing apparatus may correspond to the foregoing packet processing apparatus 400, and may also correspond to the first device in the foregoing method embodiment .
  • the message processing device 500 includes a processor 510 and a transceiver 520.
  • the message processing device 500 further includes a memory 530.
  • the processor 510, the transceiver 520 and the memory 530 communicate with each other through an internal connection path to transfer control and/or data signals.
  • the memory 530 is used to store a computer program, and the processor 510 is used to call from the memory 530 And run the computer program to control the transceiver 520 to send and receive signals.
  • the above processor 510 and the memory 530 may be combined into one processing device.
  • the processor 510 is used to execute the program code stored in the memory 530 to realize the above function.
  • the memory 530 may also be integrated in the processor 510 or independent of the processor 510.
  • the processor 510 When the program instructions stored in the memory 530 are executed by the processor 510, the processor 510 is used to control the transceiver 530 to receive the first message sent by the second device, the first message carrying the first tag, the first
  • the period value indicated by a label is the period of the second device when sending the first packet; determining whether the first packet is a normal packet according to the first label; if the first packet It is a normal message, and a second message is determined according to the first message, and the second message carries a second label; the transceiver 530 is controlled to send the second message to the third device in the first cycle, so The period value indicated by the second label is the first period.
  • the foregoing processor 510 may be used to perform the actions described in the foregoing method embodiments internally implemented by the first device, and the transceiver 520 may be used to perform the reception or transmission of the first network device described in the foregoing method embodiments. action.
  • the transceiver 520 may be used to perform the reception or transmission of the first network device described in the foregoing method embodiments. action.
  • Embodiments of the present application also provide a computer-readable storage medium on which a computer program is stored, which when executed by a computer causes the computer to implement the method provided by the foregoing method embodiments.
  • Embodiments of the present application also provide a computer program product containing instructions, which when executed by a computer causes the computer to implement the method provided by the foregoing method embodiments.
  • processors mentioned in the embodiments of the present application may be a central processing unit (Central Processing Unit, CPU), and may also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), and application-specific integrated circuits ( Application Specific (Integrated Circuit, ASIC), ready-made programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory mentioned in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electronically Erase Programmable Read Only Memory (Electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be a random access memory (Random Access Memory, RAM), which is used as an external cache.
  • RAM static random access memory
  • DRAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Rate SDRAM DDR SDRAM
  • enhanced SDRAM ESDRAM
  • Synchlink DRAM SLDRAM
  • Direct Rambus RAM Direct Rambus RAM
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component
  • the memory storage module
  • the above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination.
  • the above-described embodiments may be fully or partially implemented in the form of computer program products.
  • the computer program product includes one or more computer instructions.
  • the computer program instructions When the computer program instructions are loaded or executed on the computer, the processes or functions according to the embodiments of the present invention are generated in whole or in part.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be from a website site, computer, server or data center Transmit to another website, computer, server or data center by wired (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more collections of available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital universal disc (DVD)), or a semiconductor medium.
  • the semiconductor medium may be a solid state drive.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the unit is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical, or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the present application essentially or part of the contribution to the existing technology or part of the technical solution can be embodied in the form of a software product
  • the computer software product is stored in a storage medium, including Several instructions are used to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

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

Abstract

本申请提供了一种报文处理方法和装置,能够避免因底层时延异常导致的异常报文对不定目标流的连锁影响。该方法包括:第一设备接收第二设备发送的第一报文,第一报文携带第一标签,第一标签是根据发送第一报文时第二设备的周期确定的;第一设备根据第一标签确定第一报文是否为正常报文;若确定第一报文为正常报文,第一设备根据第一报文确定第二报文,第二报文携带第二标签;第一设备在第一周期向第三设备发送第二报文,第二标签是根据第一周期确定的。

Description

报文处理方法和装置
本申请要求于2019年01月03日提交中国专利局、申请号为201910005223.X、申请名称为“报文处理方法和装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,并且更具体地,涉及一种报文处理方法和装置。
背景技术
确定性网络旨在提供能够保证确定性时延数据传输服务。在确定性网络中,支持确定性网络特性的设备的每个出接口都设置了多个队列负责缓存相应调度周期内到达的上游报文,并且,任一时刻只有1个队列处于发送报文的状态,其他队列只接收上游报文。上游报文中均携带一个“周期”字段,该字段值(记为X)标识了该报文是在上游设备的哪个周期被发送出来的。
在实际网络中,存在造成底层时延异常的情况。比如,链路层设备/接口的缓存队列引入的排队时延、在互联网协议加(internet protocol+,IP+)底层传输网络场景中底层传输网络路径切换导致的时延变化等。底层时延异常将可能对确定性网络的业务产生影响。举例来说,假设本地设备用于发送上游设备的报文的出接口设置的队列数为3,正常情况下,队列1、2和3可以分别用于缓存上游设备发送的X=4、X=5和X=6的报文。在发送完X=4的报文后,队列1可以用于缓存X=7的报文。但是,若由于上游设备和本地设备之间的链路时延异常,导致X=4报文和X=7的报文一起到达本地设备,那么本地设备将不知如何处理,或者本地设备可能会丢弃一些报文,这样将有可能对不确定的上游报文造成影响,导致服务质量无法保证。
发明内容
本申请提供一种报文处理方法和装置,能够避免因底层时延异常导致的异常报文对不定目标流的连锁影响。
第一方面,提供了一种报文处理方法,该方法包括:第一设备接收第二设备发送的第一报文,所述第一报文携带第一标签,所述第一标签是根据发送所述第一报文时所述第二设备的周期确定的;所述第一设备根据所述第一标签确定所述第一报文是否为正常报文;若确定所述第一报文为正常报文,所述第一设备根据所述第一报文确定第二报文,所述第二报文携带第二标签;所述第一设备在第一周期向第三设备发送所述第二报文,所述第二标签是根据所述第一周期确定的。
本申请中,正常报文是指,不对除第一报文以外的其他报文的接收产生影响的报文,或者,时延抖动在一定范围内时发送的报文。与正常报文相对的是异常报文,即,对除第 一报文以外的其他报文的接收产生影响的报文为异常报文,或者,时延抖动超过一定范围内时发送的报文。
可选地,第一设备可以通过将第一报文中的第一标签替换为第二标签,得到第二报文。或者,第一设备可以通过将第二标签添加至第一报文,得到第二报文。应理解,此时的第二报文同时携带第一标签和第二标签。
可选地,第一标签指示发送所述第一报文时所述第一设备的周期;相应地,第二标签指示所述第二周期。换句话说,第一标签所指示的周期值为发送所述第一报文时所述第一设备的周期,第二标签所指示的周期值为所述第一周期。
进一步地,第一周期或者第二标签所指示的周期值可以根据第一设备中对应于第二设备的调整值Δ确定。比如,第二标签所指示的周期值=第一标签所指示的周期值+Δ。
根据本申请的报文处理方法,通过提供报文检测机制,在检测到报文为正常报文时,才进行正常的发送处理,能够避免因底层时延异常导致的异常报文对不定目标流的连锁影响,从而有利于提高服务质量。
在一种可能的实现方式中,所述第一设备根据所述第一标签确定所述第一报文是否为正常报文,包括:所述第一设备根据所述第一标签和所述第一设备的第二周期,确定所述第一报文是否为正常报文,所述第二周期为所述第一设备接收所述第一报文的周期,或者为时间上在所述第一设备接收所述第一报文的周期之后,且在所述第一周期之前的一个周期。
在一种可能的实现方式中,所述第一标签所指示的周期值为发送所述第一报文时所述第二设备的周期;其中,所述第一设备根据所述第一标签和所述第一设备的第二周期,确定所述第一报文是否为正常报文,包括:所述第一设备确定所述第一标签所指示的周期值是否位于所述第二周期所对应的第一窗口内,所述第一设备的不同周期所对应的第一窗口不同;若所述第一标签所指示的周期值位于所述第一窗口内,所述第一设备确定所述第一报文为正常报文,否则,确定所述第一报文为异常报文。
在一种可能的实现方式中,所述第二标签所指示的周期值为所述第一周期;其中,所述第一设备根据所述第一标签和所述第一设备的第二周期,确定所述第一报文是否为正常报文,包括:所述第一设备根据所述第一标签确定所述第二标签;所述第一设备确定所述第二标签所指示的周期值是否位于所述第二周期所对应的第二窗口内,所述第一设备的不同周期所对应的第二窗口不同;若所述第二标签所指示的周期值位于所述第二窗口内,所述第一设备确定所述第一报文为正常报文,否则,确定所述第一报文为异常报文。
在一种可能的实现方式中,所述第一窗口为[C1-Δ+S,C1+(w-1)*S-Δ],其中,Δ为对应于所述第二设备的调整值,所述调整值用于确定所述第二标签,C1为所述第二周期,w≥3,且w为整数,S为不为0的整数。
在一种可能的实现方式中,所述第二窗口为[C1+S,C1+(w-1)*S],C1为所述第二周期,w≥3,且w为整数,S为不为0的整数。
在一种可能的实现方式中,所述方法还包括:若确定所述第一报文为异常报文,所述第一设备对所述第一报文进行异常处理,所述异常处理包括丢弃所述第一报文或者所述第一报文进行修复处理。
本申请提供的报文处理方法,通过对异常报文进行修复处理而不是简单的丢弃,能够 降低因丢弃导致的重传时延。
在一种可能的实现方式中,所述第二标签是根据所述第一标签和对应于所述第二设备的调整值确定的。
在一种可能的实现方式中,所述方法还包括:在所述第一设备的周期发生跳变的情况下,所述第一设备更新所述调整值。
根据本申请的报文处理方法,通过更新调整值,可以循环使用一定范围内的代表周期的数值,这样可以避免第一设备的周期的无限增大,从而能够减小从第一设备发送出去的报文携带的标签所占用的比特位,降低开销。
在一种可能的实现方式中,所述方法还包括:所述第一设备接收更新消息,所述更新消息为所述第二设备的周期发生跳变的情况下发送的;所述第一设备根据所述更新消息,更新所述调整值。
第二方面,提供了一种报文处理装置,该装置用于执行上述第一方面或第一方面的任一可能的实现方式中的方法。具体地,所述装置可以包括用于执行第一方面或第一方面的任一可能的实现方式中的方法的模块。
第三方面,提供了一种报文处理装置,该装置包括存储器和处理器,存储器用于存储指令,所述处理器用于调用存储器存储的指令,以执行第一方面或第一方面中任一可能的实现方式的方法。
具体地,该装置还包括收发器或通信接口,用于执行第一方面或第一方面中任一可能的实现方式的方法中的信号(例如,报文)收/发动作。
第四方面,提供了一种报文处理装置,包括用于执行或第一方面中任一可能的实现方式的方法的至少一个处理元件(或芯片)。
第五方面,提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被计算机执行时使得计算机实现第一方面或第一方面的任一可能的实现方式中的方法。
第六方面,提供一种包含指令的计算机程序产品,所述指令被计算机执行时使得计算机实现第一方面或第一方面的任一可能的实现方式的方法。
附图说明
图1是本申请提供的一种网络的结构示意图。
图2是本申请提供的报文处理方法的示例性流程图。
图3是本申请提供的更新调整值的示意图。
图4是本申请提供的报文处理装置的结构示意图。
图5是本申请提供的报文处理装置的另一结构示意图。
具体实施方式
下面将结合附图,对本申请中的技术方案进行描述。
图1是本申请提供的一种网络的结构示意图。参见图1,该网络包括节点101、节点102节点和节点103。节点101通过其接口11连接节点102的接口21,节点102的接口22连接节点103的接口31。节点之间可以发送报文,例如,节点101可以通过接口11向节点102发送报文,节点102的接口21接收到节点101发送的报文后,可以通过接口22 向节点103发送该报文。其中,节点101可以是入口边缘节点,节点102可以是核心节点(或称为中间节点),节点103可以是出口边缘节点。或者,节点101可以是主机设备,节点102可以是一个核心节点,节点103可以是另一核心节点。或者,节点101、节点102和节点103都可以是核心节点。应理解,上述所列举的各节点在网络中的位置或者作用仅是示例性说明,不应对本申请构成任何限定。
图1所示的各节点均在本地维护一个时钟,各节点的时钟可以不同步,以下以节点101和节点102为例进行说明。
节点101和节点102在初始化时,可以自主产生一个初始计数值,例如,节点101的初始计数值可以记作C A,节点102的初始计数值可以记作C B。根据节点101的时钟,每过T时间(例如,10us),C A累加S,S为不为0的整数,且为常数,S可以为正数,也可以为负数。比如,S可以为-1,则T时间过后,C A变为C A-1。再如,S可以为2,则T时间过后,C A变为C A+2。类似地,根据节点102的时钟,每过T时间,C B累加S。C A和C B可以相等,也可以不等,本申请对此不作限定。
需要说明的是,在下文的描述中,类似节点101在周期X发送报文的描述其含义是,节点101在其计数值为X所对应的周期内发送报文。比如,节点101在周期3发送报文的含义是,节点101在C A=3所对应的周期内发送报文,或者说,C A=3时,节点101发送了该报文。应理解,若C A初始值为3,S为2,则节点101只可能在周期3、5或7等发送报文,而不会在周期2、4或6等发送报文。
节点101在向节点102发送报文时,可以在报文中携带一个标签,该标签是根据节点101发送该报文时的周期确定的。例如,该标签可以指示节点101发送该报文时的周期,即该标签所指示的周期值为X,X=C A。另外,该标签也可以是与C A相关的值,比如X=C A+预设值,该预设值例如可以是下文中描述的ΔX或其他可能的值,本申请对此不作限定。为便于理解,下文中在不作特别说明的情况下,均认为X=C A。并且,在不作特别说明的情况下,标签P是指示标签所指示的周期值为P,P为任意可能的周期值。
节点102接收到节点101发送的上述报文后,根据X将该报文缓存至相应地队列Q X,并在节点102的周期Y(即,Y=C B)发送该队列中的报文。其中,队列Q X为节点102中用于发送X=C A的接口所对应的U(U≥3)个队列中的某一队列,该接口例如可以是图1所示的接口22。
在一种实现方式中,队列Q X可以是上述U个队列中索引(或编号)为
Figure PCTCN2019130001-appb-000001
Figure PCTCN2019130001-appb-000002
的队列,
Figure PCTCN2019130001-appb-000003
表示向下取整,||取绝度值,%表示取余。或者,队列Q X还可以是上述U个队列中的其他队列,本申请对此不作限定。应注意,本申请中,节点102在任一周期只能发送一个队列,而不能同时发送多个队列,并且,在发送队列的时候,该队列不能接收报文。应理解,本申请中所谓的发送队列与发送队列中的报文是同一概念。
在一种实现方式中,Y=X+ΔX,ΔX为节点102保存的对应于节点101的调整值,该调整值用于计算从节点101发送的任一报文需要在节点102中的哪个周期被发送。该调整值可以根据节点102和节点101之间的光纤长度等计算,也可以通过发送测试报文获得。例如,节点101在周期x的末尾发送一个测试报文,携带标签x,节点102接收到该测试报文时处于周期y,则ΔX=y+1-x;或者,节点101在周期x的开始发送一个测试报文,携带标签x,节点102接收到该测试报文时处于周期y,则ΔX=y+2-x。
应理解,在一种可能的实现方式中,y+1-x≤ΔX<y+U-x,或者,y+1-x≤ΔX≤y+U-x,且ΔX为整数,U的定义如上文所述。其中,若节点101和节点102的周期同步更新,即C A和C B同时更新,则y+1-x≤ΔX≤y+U-x;若节点101和节点102的周期不同步更新时,即C A和C B不同时更新,则y+1-x≤ΔX<y+U-x。
正常情况下,即底层的时延抖动在有限范围之内时,节点102根据上述规则进行报文的发送。而在实际网络中,确实存在造成底层时延异常的情况。比如,链路层设备/接口的缓存队列引入的排队时延、在IP+底层传输网络场景中底层传输网络路径切换导致的时延变化等。这些时延异常可能会导致报文提前或者延迟较长时间到达下一条节点,从而影响服务质量。
举例来说,假设标签所指示的周期值为X的报文对应的队列索引为
Figure PCTCN2019130001-appb-000004
U=3,那么,正常情况下,节点101发送的X=4、X=5和X=6的报文应该分别进入队列1、2和3。在节点102发送完X=4的报文后,队列1可以用于缓存X=7的报文。但是,若由于节点101和节点102之间的链路时延异常,导致X=4报文和X=7的报文一起到达节点102,那么节点102将不知如何处理,或者节点102可能会丢弃一些报文,这样将有可能对不确定的上游报文造成影响,导致服务质量无法保证。
有鉴于此,本申请提供了一种报文处理方法,该方法通过提供报文检测机制,在确定报文为正常报文时,进行正常的发送处理,能够避免因底层时延异常导致的异常报文对不定目标流的连锁影响,从而有利于提高服务质量。
以下,不失一般性地,以第一设备检测第一报文为例,对本申请的方法进行详细说明。其中,第一报文可以是第二设备发送给第一设备的任一报文。第一设备可以是图1所示的节点102,第二设备可以是图1所示的节点101。
图2是本申请提供的报文处理方法的示意性流程图。以下,对图2的各步骤进行详细说明。
S210,第一设备接收到第一报文。
第一报文携带第一标签,第一标签是根据发送第一报文时第二设备的周期确定的。比如,第一标签可以指示发送第一报文时第二设备的周期,换句话说,第一标签所指示的周期值为发送第一报文时第二设备的周期。另外,第一标签所指示的周期值也可以是与发送第一报文时第二设备的周期相关但不等的值。比如,第一标签所指示的周期值为发送第一报文时第二设备的周期与一个预设值之和,该预设值例如可以是下文中的调整值Δ,但本申请对此不作限定。
下文中,仅以第一标签所指示的周期值为发送第一报文时第二设备的周期为例对本申请进行说明。并且,为了便于理解和描述,将第一标签所指示的周期值,即发送第一报文时第二设备的周期记作:X1。即,第二设备在周期X1发送了第一报文。应理解,参见前文描述可知,周期X1对应的第二周期的计数值为X1。比如,以第二设备为节点101举例来说,若X1=5表示C A=5时,节点101发送了第一报文。下述中第一设备接收第一报文以及发送第二报文的情况类似,将不再赘述。
S220,第一设备根据第一标签确定第一报文是否为正常报文。
比如,第一设备可以根据第一标签所指示的周期值,即X1,确定第一报文是否为正常报文。
正常报文是指,不对除第一报文以外的其他报文的接收产生影响的报文,或者,时延抖动在一定范围内时发送的报文。与正常报文相对的是异常报文,即,对除第一报文以外的其他报文的接收产生影响的报文为异常报文,或者,时延抖动超过一定范围内时发送的报文。
S230,若确定第一报文为正常报文,第一设备根据第一报文确定第二报文。其中,第二报文携带第二标签。
例如,第一设备可以通过将第一报文中的第一标签替换为第二标签,得到第二报文。
再如,第一设备可以通过将第二标签添加至第一报文,得到第二报文。应理解,此时的第二报文同时携带第一标签和第二标签。
应理解,第一设备还可以根据其他的方式确定第二报文,本申请对此不作限定。
S240,第一设备在第一周期向第三设备发送第二报文。
其中,第二报文中的第二标签是根据第一周期确定的。比如,第二标签可以指示发送第二报文时第一设备的周期,换句话说,第二标签所指示的周期值为发送第二报文时第一设备的周期,即第二标签所指示的周期值为第一周期。另外,第二标签所指示的周期值也可以是与第一周期相关但不等的值。比如,第二标签所指示的周期值为第一周期与一个预设值之和,但本申请对此不作限定。
下文中,仅以第二标签所指示的周期值为第一周期为例对本申请进行说明。并且,以下,为了便于理解和描述,将第二标签所指示的周期值,即第二周期记作:X2。
在一种可能的实现方式中,第一周期或者第二标签所指示的周期值可以根据第一设备中对应于第二设备的调整值Δ确定。比如,X2=X1+Δ。Δ的确定方式可以参照上文描述的确定ΔX的方式,这里不再赘述。
根据上文描述可知,第一设备在接收到第一报文后,需要将报文缓存至相应地队列中。该缓存操作可以在S220之后执行,但本申请对此不作限定。比如,第一设备可以在S230之后S240之前缓存报文。若第一设备在S220之后执行缓存操作,若判断第一报文为正常报文,则第一设备可以将第一报文缓存至相应地队列,然后再对第一报文进行处理,得到第二报文,或者,第一设备可以将得到的第二报文缓存至相应地队列。
在一种可能的实现方式中,用于缓存第一报文或者第二报文的队列可以根据第一设备中用于发送第二设备的报文的接口(记作:第一接口)能够使用的缓存队列的数量确定。
本申请中,为了便于理解和描述,将第一接口能够使用的缓存队列的数量记作:w,w≥3,且w为整数。
那么,用于缓存第一报文或者第二报文的队列可以是该w个队列中索引为
Figure PCTCN2019130001-appb-000005
或者
Figure PCTCN2019130001-appb-000006
的队列。应理解,w小于或者等于第一接口对应的缓存队列的总数量,例如,若第一设备为节点102,第二设备为节点101,则3≤w≤U。w可以在第一设备初始化的时候设置,或者可以在第二设备发送报文之前的任一时间设置,本申请对此不作限定。此外,w可以由第一设备自主设置,也可以由控制面设置。
根据本申请的报文处理方法,通过提供报文检测机制,在检测到报文为正常报文时,才进行正常的发送处理,能够避免因底层时延异常导致的异常报文对不定目标流的连锁影响,从而有利于提高服务质量。
可选地,作为本申请一个实施例,该方法还可以包括:
S250,若确定第一报文为异常报文,第一设备对第一报文进行异常处理。
例如,第一设备可以丢弃第一报文,或者,第一设备可以对第一报文进行修复处理。该修复处理可以是根据第一报文提前或者延后的周期数,在后续转发过程中相应的增加或者减少延迟时间以修正异常报文被转发的时间。
本申请提供的报文处理方法,通过对异常报文进行修复处理而不是简单的丢弃,能够降低因丢弃导致的重传时延。
以下,对第一设备如何根据第一标签确定第一报文是否为正常报文进行详细说明。
可选地,作为本申请一个实施例,第一设备可以根据第一标签和第一设备的第二周期,确定第一报文是否为正常报文。
比如,第一设备可以根据第一标签所指示的周期值(即,X1)和第一设备的第二周期,确定第一报文是否为正常报文。
其中,第二周期为第一设备接收第一报文的周期,或者为时间上在第一设备接收第一报文的周期之后,且在第一周期之前的一个周期。比如,第二周期可以是第一设备判断第一报文是否为正常报文的周期,其中,第一设备可以在接收到第一报文的周期判断第一报文是否为正常报文,也可以在第一周期之前的任一周期判断第一报文是否为正常报文。以下,为了便于理解和说明,将第二周期记作:C1。
进一步地,第一设备具体可以采用方式一或方式二,确定第一报文是否为正常报文。
方式一
第一设备确定第一标签所指示的周期值是否位于第二周期所对应的第一窗口内;若第一标签所指示的周期值位于第一窗口内,则第一设备可以确定第一报文为正常报文,否则,可以确定第一报文为异常报文。其中,第一设备的不同周期所对应的第一窗口不同。也就是说,第一窗口随着第一设备的周期的更新而更新。
在一种可能的实现方式中,第一窗口为[C1-Δ+S,C1+(w-1)*S-Δ]。
即,在S为正数的情况下,若下述公式(1)成立,则第一报文为正常报文,否则第一报文为异常报文。
C1-Δ+S≤X1≤C1+(w-1)*S-Δ       (1)
其中,Δ、w、C1的含义如前文所述。
在S为负数的情况下,若下述公式(2)成立,则第一报文为正常报文,否则第一报文为异常报文。
C1+(w-1)*S-Δ≤X1≤C1-Δ+S      (2)
其中,Δ、w、C1的含义如前文所述。
应理解,第一窗口也可以是比[C1-Δ+S,C1+(w-1)*S-Δ]更小的窗口。或者,第一窗口也可以是比[C1-Δ+S,C1+(w-1)*S-Δ]稍大的窗口,这取决于系统的容忍度。此外,对于一些周期所对应的第一窗口也可以是人工配置的,也就是说,可以另一些周期所对应的第一窗口比[C1-Δ+S,C1+(w-1)*S-Δ]小或者大。
下面结合表1对公式(1)进行举例说明。在下述说明中做如下假设:S=1,Δ=6,
X2=X1+Δ,w=5,C1为第一设备接收到第一报文时的周期。
参见表1,表1示出了第一设备接收第二设备发送的报文的情况。其中,第二列表示发送报文时第二设备的周期,第一列表示接收到携带对应标签的报文时第一设备的周期, 第三列表示携带对应标签的报文应该进入的队列。
表1
Figure PCTCN2019130001-appb-000007
示例一:假设C1=12
那么,7≤X1≤10,也就是说,若第一设备在周期12接收到的报文的标签所指示的周期值属于[7,10],则说明这些报文为正常报文,否则为异常报文。
具体来讲,C1=12时,第一设备将发送第一设备在周期6发送的报文,即第一设备将发送Q1,而Q2、Q3、Q4和Q0可以进行接收。从表1中可以看到,Q2、Q3、Q4和Q0对应的第二设备的周期分别是7、8、9、10,并且第一设备在周期12之后的周期才发送Q2、Q3、Q4和Q0,因此若7≤X1≤10,则认为第一报文为正常报文。应理解,虽然第二 设备在周期5发送的报文对应的队列为Q0,但由于第一设备会在第11周期发送第二设备在周期5发送的报文,因此若在C1=12接收到第二设备在周期5发送的报文,认为该报文为异常报文。
示例二:假设X1=8
那么,10≤C1≤13。也就是说,若第一设备在周期12至周期15中的某一周期接收到X1=8的报文,都认为该报文为正常报文,否则认为该报文为异常报文。
具体来讲,第一设备将在周期14发送X1=8的报文,X1=8的报文进入的队列为Q3,若第一设备在周期14之前且对应的Q3为空的某一周期接收到X1=8的报文,则认为该报文为正常报文。参见表1可知,第一设备在周期10至周期13中的任一周期接收到X1=8的报文,都认为X1=8的报文为正常报文。
更具体来讲,从表1中可以看出,正常情况下,X1=8的报文会在周期12或13到达。那么,可以确定,周期12和13接收到的X1=8的报文为正常报文。
由于在周期10至周期13之间的4个周期内,Q3就是为了缓存X1=8的报文,从表1中可以看出,即使X1=8的报文在周期10或11提前到达,也不会影响其他报文的接收和发送,因此在周期10和11收到的X1=8的报文也为正常报文。
但如果在周期10之前的周期接收到X1=8的报文,或者,如果在周期13之后的周期接收到X1=8的报文,则认为接收到的报文为异常报文。具体来讲,对于周期9或周期14,这时第一设备正在发送Q3中缓存中的报文,由于发送的同时不允许接收报文,因此若此时接收到X1=8的报文,则认为是异常报文。对于周期6至周期8,Q3需要缓存第一设备在周期3发送的报文,若此时接收到X1=8的报文,则认为是异常报文。对于周期15、周期16等在时间上更晚的周期,由于第一设备已经在周期14发送了X1=8的报文,此时如果再接收到X1=8的报文,一方面将其缓存至Q3时会影响第一设备在周期17的报文的接收,另一方面将导致延时发送,因此可以认为是异常报文。
容易理解,示例一和示例二是从公式(1)的两个角度描述了公式(1)的含义。
应理解,S为不为1的其他值时,通过第一窗口判断第一报文是否为正常报文的原理与S为1时,通过第一窗口判断第一报文是否为正常报文的原理类似,本文中不再详述。
方式二
第一设备首先根据第一标签确定第二标签,然后确定第二标签所指示的周期值是否位于第二周期所对应的第二窗口内。若第二标签所指示的周期值位于第二窗口内,第一设备可以确定第一报文为正常报文,否则,确定第一报文为异常报文。其中,第一设备的不同周期所对应的第二窗口不同。也就是说,第二窗口随着第一设备的周期的更新而更新。
如上文所述,第二标签所指示的周期值可以根据Δ确定,如,X2=X1+Δ,但本申请并不限定第二标签的具体确定方式。
在一种可能的实现方式中,第二窗口为[C1+S,C1+(w-1)*S]。
即,在S为正数的情况下,若下述公式(3)成立,则第一报文为正常报文,否则第一报文为异常报文。
C1+S≤X2≤C1+(w-1)*S        (3)
其中,Δ、w和C1的含义如前文所述。
即,在S为负数的情况下,若下述公式(4)成立,则第一报文为正常报文,否则第 一报文为异常报文。
C1+(w-1)*S≤X2≤C1+S        (4)
其中,Δ、w和C1的含义如前文所述。
应理解,第二窗口也可以是比[C1+S,C1+(w-1)*S]更小的窗口。或者,第二窗口也可以是比[C1+S,C1+(w-1)*S]稍大的窗口,这取决于系统的容忍度。此外,对于一些周期所对应的第二窗口也可以是人工配置的,也就是说,可以另一些周期所对应的第二窗口比[C1+S,C1+(w-1)*S]小或者大。
下面结合上述表1对公式(3)进行举例说明,这里同样假设:S=1,Δ=6,X2=X1+Δ,w=5,C1为第一设备接收到第一报文时的周期。
示例三:假设C1=12
那么,13≤X2≤16。也就是说,第一设备若在周期12接收到需要在周期13至周期16中的任一周期被发送的报文,则认为该报文为正常报文。
具体来讲,在周期12,第一设备将发送X1=6的报文,X1=6的报文对应的队列为Q1,此时,第一设备可以接收对应队列Q2、Q3、Q4和Q0的报文。从表1中可以看出,
X1=7/8/9/10的报文分别对应Q2、Q3、Q4和Q0,而X1=7/8/9/10的报文对应的需要发送的周期分别是13、14、15和16。因此,第一设备若在周期12接收到需要在周期13至周期16中的任一周期被发送的报文,则认为该报文为正常报文。
应理解,S为不为1的其他值时,通过第二窗口判断第一报文是否为正常报文的原理与S为1时,通过第二窗口判断第一报文是否为正常报文的原理类似,本文中不再详述。
本领域技术人员可以理解,在实际操作中,对公式(1)至公式(4)的任何等价变形都应该落入本申请的保护范围内。
可选地,作为本申请一个实施例,该方法还可以包括:在第一设备的周期发生跳变的情况下,第一设备更新Δ。
具体来讲,第一设备的周期(或者称周期计数/周期值)从其初始周期值(即,初始计数值)开始,每过一个固定的时间长度,周期累加S。若S为正数,在周期达到最大值C max时,若再累加S,则周期跳变为最小值C min,C max>C min。比如,周期最大值为11,若再累加S=1,则周期跳变为1,其中,周期0可被禁止使用。若S为负数,在周期达到最小值C min时,若再累加S,则周期跳变为最大值C max。在周期发生跳变的情况下,第一设备更新Δ。应理解,本申请对C min的取值不作限定。
在一种可能的实现方式中,Δ更新后为Δ',且
Figure PCTCN2019130001-appb-000008
如前所述,C min为第一设备的周期(即,计数值)的最小值,C max为第一设备的周期的最大值。C max-C min+|S|=k*|S|*w,k≥1,且k为整数。
另外,第一设备还更新对应于其他设备的调整值,比如还更新对应于第三设备的调整值。
根据本申请的报文处理方法,通过更新调整值,可以循环使用一定范围内的代表周期的数值,这样可以避免第一设备的周期的无限增大,从而能够减小从第一设备发送出去的报文携带的标签所占用的比特位,降低开销。
可选地,在第一设备在周期发生跳变的情况下,第一设备还向与其相连接的各设备(例 如第三设备和第一设备)发送更新消息(例如,记作:第一更新消息),该第一更新消息用于该其他设备更新对应于第一设备的调整值。第一更新消息可以包括C min和C max,该各设备根据C min和C max更新各自的调整值。
比如,第二设备可以将其对应于第一设备的调整值更新为Δ′ 1,其中
Figure PCTCN2019130001-appb-000009
Δ 1为更新前第二设备对应于第一设备的调整值。类似地,第三设备可以将其对应于第一设备的调整值更新为Δ′ 2,其中
Figure PCTCN2019130001-appb-000010
Δ 2为更新前第三设备对应于第一设备的调整值。
通过使其他设备更新对应于第一设备的调整值,能够保证其他设备正确判断从第一设备接收的报文是否为正常报文。
应理解,本申请中,第一设备、第二设备和第三设备的C min和C max可以相同,但本申请对此不作限定。
以下结合图3对各设备更新调整值进行说明。
假设S=1,更新前第一设备相对于第二设备的调整值为6,即接口21的调整值为6,相对于第三设备的调整值为8,即接口22的调整值为8,C min=1,C max=15,第二设备对应于第一设备的调整值为-4,即接口11的调整值为-4,第三设备对应于第一设备的调整值为-2,即接口31的调整值为-2。那么,在发生越界时,第一设备将其对应于第二设备的调整值更新为-9,将其对应于第三设备的调整值更新为-7。在发生越界时,第一设备向第二设备和第三设备发送第一更新消息,第二设备根据该第一更新消息,可以将其对应于第一设备的调整值更新为11,第三设备根据该第一更新消息,可以将其对应于第一设备的调整值更新为13。
进一步地,在第一设备的周期发生跳变的情况下,第一设备也可以停止接收预留请求消息。该预留请求消息用于预留资源。
此外,作为本申请一个实施例,该方法还包括:
第一设备接收更新消息(例如,记作:第二更新消息),该第二更新消息为第二设备的周期发生跳变的情况下发送的;第一设备根据第二更新消息,更新对应于第二设备的调整值。
应理解,第一设备根据第二更新消息更新对应于第二设备的调整值与第二设备根据第一更新消息更新对应于第一设备的调整值类似,这里不再赘述。
图4为本发明实施例提供的一种报文处理装置400,该报文处理装置400通过软件、硬件或者两者的结合实现上述第一设备的部分或者全部功能。该报文处理装置可以为第一设备,也可以为应用于第一设备的芯片。如图4所示,该报文处理装置400包括接收模块410、处理模块420和发送模块430。
接收模块410,用于接收第二设备发送的第一报文,所述第一报文携带第一标签,所述第一标签是根据发送所述第一报文时所述第二设备的周期确定的;
处理模块420,用于根据所述第一标签确定所述第一报文是否为正常报文;
所述处理模块420还用于,若所述第一报文为正常报文,根据所述第一报文确定第二报文,所述第二报文携带第二标签;
发送模块430,用于在第一周期向第三设备发送所述第二报文,所述第二标签是根据所述第一周期确定的。
在一种可能的实现方式中,所述处理模块420具体用于:
根据所述第一标签和所述装置的第二周期,确定所述第一报文是否为正常报文,所述第二周期为所述装置接收所述第一报文的周期,或者为时间上在所述装置接收所述第一报文的周期之后,且在所述第一周期之前的一个周期。
在一种可能的实现方式中,所述第一标签所指示的周期值为发送所述第一报文时所述第二设备的周期;
其中,所述处理模块420具体用于:
确定所述第一标签所指示的周期值是否位于所述第二周期所对应的第一窗口内,所述装置的不同周期所对应的第一窗口不同;
若所述第一标签所指示的周期值位于所述第一窗口内,确定所述第一报文为正常报文,否则,确定所述第一报文为异常报文。
在一种可能的实现方式中,所述第二标签所指示的周期值为所述第一周期;
其中,所述处理模块420具体用于:
根据所述第一标签确定所述第二标签;
确定所述第二标签所指示的周期值是否位于所述第二周期所对应的第二窗口内,所述装置的不同周期所对应的第二窗口不同;
若所述第二标签所指示的周期值位于所述第二窗口内,确定所述第一报文为正常报文,否则,确定所述第一报文为异常报文。
在一种可能的实现方式中,所述第一窗口为[C1-Δ+S,C1+(w-1)*S-Δ],其中,Δ为对应于所述第二设备的调整值,所述调整值用于确定所述第二标签,C1为所述第二周期,w≥3,且w为整数,S为不为0的整数。
在一种可能的实现方式中,所述第二窗口为[C1+S,C1+(w-1)*S],C1为所述装置的第二周期,w≥3,且w为整数,S为不为0的整数。
在一种可能的实现方式中,所述处理模块420还用于:
若确定所述第一报文为异常报文,对所述第一报文进行异常处理,所述异常处理包括丢弃所述第一报文或者所述第一报文进行修复处理。
在一种可能的实现方式中,所述第二标签是根据所述第一标签和对应于所述第二设备的调整值确定的。
在一种可能的实现方式中,所述处理模块420还用于:
在所述装置的周期发生跳变的情况下,更新所述调整值。
在一种可能的实现方式中,所述接收模块410还用于,接收更新消息,所述更新消息为所述第二设备的周期发生跳变的情况下发送的;
所述处理模块420还用于,根据所述更新消息,更新所述调整值。
上述装置用于执行前述方法实施例,其实现原理和技术效果类似,在此不再赘述。此外,上述实施例中的发送模块可以为发送机,接收模块可以为接收机,处理模块可以为处理器,在此不再赘述。
如图5所示,本申请还提供了一种报文处理装置500,应理解,该报文处理装置可对 应于上述报文处理装置400,还可以对应于上述方法实施例中的第一设备。
参见图5,该报文处理装置500包括处理器510和收发器520。可选地,该报文处理装置500还包括存储器530。其中,处理器510、收发器520和存储器530之间通过内部连接通路互相通信,传递控制和/或数据信号,该存储器530用于存储计算机程序,该处理器510用于从该存储器530中调用并运行该计算机程序,以控制该收发器520收发信号。
上述处理器510和存储器530可以合成一个处理装置,处理器510用于执行存储器530中存储的程序代码来实现上述功能。具体实现时,该存储器530也可以集成在处理器510中,或者独立于处理器510。
当存储器530中存储的程序指令被处理器510执行时,该处理器510用于控制收发器530接收第二设备发送的第一报文,所述第一报文携带第一标签,所述第一标签所指示的周期值为发送所述第一报文时所述第二设备的周期;根据所述第一标签确定所述第一报文是否为正常报文;若所述第一报文为正常报文,根据所述第一报文确定第二报文,所述第二报文携带第二标签;控制收发器530在第一周期向第三设备发送所述第二报文,所述第二标签所指示的周期值为所述第一周期。
应理解,上述处理器510可以用于执行前面方法实施例中描述的由第一设备内部实现的动作,而收发器520可以用于执行前面方法实施例中描述的网第一设备的接收或发送动作。具体请见前面方法实施例中的描述,此处不再赘述。
本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该计算机程序被计算机执行时使得该计算机实现上述方法实施例提供的方法。
本申请实施例还提供一种包含指令的计算机程序产品,该指令被计算机执行时使得该计算机实现上述方法实施例提供的方法。
上述提供的报文处理装置中相关内容的解释及有益效果均可参考上文提供的对应的方法实施例,此处不再赘述。
应理解,本申请实施例中提及的处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
还应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取 存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)集成在处理器中。
上述实施例,可以全部或部分地通过软件、硬件、固件或其他任意组合来实现。当使用软件实现时,上述实施例可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载或执行所述计算机程序指令时,全部或部分地产生按照本发明实施例所述的流程或功能。所述计算机可以为通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集合的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质(例如,软盘、硬盘、磁带)、光介质(例如,数字通用光盘(digital versatile disc,DVD))、或者半导体介质。半导体介质可以是固态硬盘。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
应理解,本申请中的“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。“至少一个”是指一个或一个以上;“A和B中的至少一个”,类似于“A和/或B”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和B中的至少一个,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各 个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (20)

  1. 一种报文处理方法,其特征在于,包括:
    第一设备接收第二设备发送的第一报文,所述第一报文携带第一标签,所述第一标签是根据发送所述第一报文时所述第二设备的周期确定的;
    所述第一设备根据所述第一标签确定所述第一报文是否为正常报文;
    若确定所述第一报文为正常报文,所述第一设备根据所述第一报文确定第二报文,所述第二报文携带第二标签;
    所述第一设备在第一周期向第三设备发送所述第二报文,所述第二标签是根据所述第一周期确定的。
  2. 如权利要求1所述的方法,其特征在于,所述第一设备根据所述第一标签确定所述第一报文是否为正常报文,包括:
    所述第一设备根据所述第一标签和所述第一设备的第二周期,确定所述第一报文是否为正常报文,所述第二周期为所述第一设备接收所述第一报文的周期,或者为时间上在所述第一设备接收所述第一报文的周期之后,且在所述第一周期之前的一个周期。
  3. 如权利要求2所述的方法,其特征在于,所述第一标签所指示的周期值为发送所述第一报文时所述第二设备的周期;
    其中,所述第一设备根据所述第一标签和所述第一设备的第二周期,确定所述第一报文是否为正常报文,包括:
    所述第一设备确定所述第一标签所指示的周期值是否位于所述第二周期所对应的第一窗口内,所述第一设备的不同周期所对应的第一窗口不同;
    若所述第一标签所指示的周期值位于所述第一窗口内,所述第一设备确定所述第一报文为正常报文,否则,确定所述第一报文为异常报文。
  4. 如权利要求2所述的方法,其特征在于,所述第二标签所指示的周期值为所述第一周期;
    其中,所述第一设备根据所述第一标签和所述第一设备的第二周期,确定所述第一报文是否为正常报文,包括:
    所述第一设备根据所述第一标签确定所述第二标签;
    所述第一设备确定所述第二标签所指示的周期值是否位于所述第二周期所对应的第二窗口内,所述第一设备的不同周期所对应的第二窗口不同;
    若所述第二标签所指示的周期值位于所述第二窗口内,所述第一设备确定所述第一报文为正常报文,否则,确定所述第一报文为异常报文。
  5. 如权利要求3所述的方法,其特征在于,所述第一窗口为[C1-Δ+S,C1+(w-1)*S-Δ],其中,Δ为对应于所述第二设备的调整值,所述调整值用于确定所述第二标签,C1为所述第二周期,w≥3,且w为整数,S为不为0的整数。
  6. 如权利要求4所述的方法,其特征在于,所述第二窗口为[C1+S,C1+(w-1)*S],C1为所述第二周期,w≥3,且w为整数,S为不为0的整数。
  7. 如权利要求1至6中任一项所述的方法,其特征在于,所述方法还包括:
    若确定所述第一报文为异常报文,所述第一设备对所述第一报文进行异常处理,所述异常处理包括丢弃所述第一报文或者所述第一报文进行修复处理。
  8. 如权利要求1至7中任一项所述的方法,其特征在于,所述第二标签是根据所述第一标签和对应于所述第二设备的调整值确定的。
  9. 如权利要求8所述的方法,其特征在于,所述方法还包括:
    在所述第一设备的周期发生跳变的情况下,所述第一设备更新所述调整值。
  10. 如权利要求8或9所述的方法,其特征在于,所述方法还包括:
    所述第一设备接收更新消息,所述更新消息为所述第二设备的周期发生跳变的情况下发送的;
    所述第一设备根据所述更新消息,更新所述调整值。
  11. 一种报文处理装置,其特征在于,包括:
    接收模块,用于接收第二设备发送的第一报文,所述第一报文携带第一标签,所述第一标签是根据发送所述第一报文时所述第二设备的周期确定的;
    处理模块,用于根据所述第一标签确定所述第一报文是否为正常报文;
    所述处理模块还用于,若所述第一报文为正常报文,根据所述第一报文确定第二报文,所述第二报文携带第二标签;
    发送模块,用于在第一周期向第三设备发送所述第二报文,所述第二标签是根据所述第一周期确定的。
  12. 如权利要求11所述的装置,其特征在于,所述处理模块具体用于:
    根据所述第一标签和所述装置的第二周期,确定所述第一报文是否为正常报文,所述第二周期为所述装置接收所述第一报文的周期,或者为时间上在所述装置接收所述第一报文的周期之后,且在所述第一周期之前的一个周期。
  13. 如权利要求12所述的装置,其特征在于,所述第一标签所指示的周期值为发送所述第一报文时所述第二设备的周期;
    其中,所述处理模块具体用于:
    确定所述第一标签所指示的周期值是否位于所述第二周期所对应的第一窗口内,所述装置的不同周期所对应的第一窗口不同;
    若所述第一标签所指示的周期值位于所述第一窗口内,确定所述第一报文为正常报文,否则,确定所述第一报文为异常报文。
  14. 如权利要求12所述的装置,其特征在于,所述第二标签所指示的周期值为所述第一周期;
    其中,所述处理模块具体用于:
    根据所述第一标签确定所述第二标签;
    确定所述第二标签所指示的周期值是否位于所述第二周期所对应的第二窗口内,所述装置的不同周期所对应的第二窗口不同;
    若所述第二标签所指示的周期值位于所述第二窗口内,确定所述第一报文为正常报文,否则,确定所述第一报文为异常报文。
  15. 如权利要求13所述的装置,其特征在于,所述第一窗口为[C1-Δ+S,C1+(w-1)*S-Δ],其中,Δ为对应于所述第二设备的调整值,所述调整值用于确定所述第二标签,C1 为所述第二周期,w≥3,且w为整数,S为不为0的整数。
  16. 如权利要求14所述的装置,其特征在于,所述第二窗口为[C1+S,C1+(w-1)*S],C1为所述第二周期,w≥3,且w为整数,S为不为0的整数。
  17. 如权利要求11至16中任一项所述的装置,其特征在于,所述处理模块还用于:
    若确定所述第一报文为异常报文,对所述第一报文进行异常处理,所述异常处理包括丢弃所述第一报文或者所述第一报文进行修复处理。
  18. 如权利要求11至17中任一项所述的装置,其特征在于,所述第二标签是根据所述第一标签和对应于所述第二设备的调整值确定的。
  19. 如权利要求18所述的装置,其特征在于,所述处理模块还用于:
    在所述装置的周期发生跳变的情况下,更新所述调整值。
  20. 如权利要求18或19所述的装置,其特征在于,
    所述接收模块还用于,接收更新消息,所述更新消息为所述第二设备的周期发生跳变的情况下发送的;
    所述处理模块还用于,根据所述更新消息,更新所述调整值。
PCT/CN2019/130001 2019-01-03 2019-12-30 报文处理方法和装置 WO2020140875A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19906824.8A EP3902217B1 (en) 2019-01-03 2019-12-30 Message processing method and apparatus
US17/366,901 US20210336892A1 (en) 2019-01-03 2021-07-02 Packet processing method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910005223.X 2019-01-03
CN201910005223.XA CN111404840B (zh) 2019-01-03 报文处理方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/366,901 Continuation US20210336892A1 (en) 2019-01-03 2021-07-02 Packet processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2020140875A1 true WO2020140875A1 (zh) 2020-07-09

Family

ID=71406649

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/130001 WO2020140875A1 (zh) 2019-01-03 2019-12-30 报文处理方法和装置

Country Status (3)

Country Link
US (1) US20210336892A1 (zh)
EP (1) EP3902217B1 (zh)
WO (1) WO2020140875A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040179523A1 (en) * 2001-07-06 2004-09-16 Kazuhito Maruyama Packet communication method, communication system, communication apparatus, communication program and recording medium containing communication program
CN101621464A (zh) * 2009-05-22 2010-01-06 杭州华三通信技术有限公司 一种报文处理方法和设备
CN102142958A (zh) * 2010-01-29 2011-08-03 冲电气工业株式会社 通信系统及通信装置
CN104092697A (zh) * 2014-07-18 2014-10-08 杭州华三通信技术有限公司 一种基于时间的防重放方法及装置
US20160006844A1 (en) * 2013-02-26 2016-01-07 Joint Stock Company "Infotecs" Method of preventing digital data packet reuse in network data transmission system
CN108011778A (zh) * 2017-11-30 2018-05-08 北京润科通用技术有限公司 一种获取报文传输延迟时间的方法及装置

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7277962B2 (en) * 2000-12-01 2007-10-02 Fujitsu Limited Method and apparatus for packet scheduling using virtual time stamp for high capacity combined input and output queued switching system
EP1433076B1 (en) * 2001-08-30 2017-10-25 Cisco Technology, Inc. Protecting against distributed denial of service attacks
EP2012446A1 (en) * 2007-07-06 2009-01-07 Nokia Corporation Higher layer synchronization between base stations
CN108173780B (zh) * 2017-11-29 2021-06-04 东软集团股份有限公司 数据处理方法、装置、计算机及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040179523A1 (en) * 2001-07-06 2004-09-16 Kazuhito Maruyama Packet communication method, communication system, communication apparatus, communication program and recording medium containing communication program
CN101621464A (zh) * 2009-05-22 2010-01-06 杭州华三通信技术有限公司 一种报文处理方法和设备
CN102142958A (zh) * 2010-01-29 2011-08-03 冲电气工业株式会社 通信系统及通信装置
US20160006844A1 (en) * 2013-02-26 2016-01-07 Joint Stock Company "Infotecs" Method of preventing digital data packet reuse in network data transmission system
CN104092697A (zh) * 2014-07-18 2014-10-08 杭州华三通信技术有限公司 一种基于时间的防重放方法及装置
CN108011778A (zh) * 2017-11-30 2018-05-08 北京润科通用技术有限公司 一种获取报文传输延迟时间的方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3902217A4

Also Published As

Publication number Publication date
CN111404840A (zh) 2020-07-10
EP3902217A4 (en) 2022-01-19
EP3902217B1 (en) 2023-12-20
US20210336892A1 (en) 2021-10-28
EP3902217A1 (en) 2021-10-27

Similar Documents

Publication Publication Date Title
US20220309025A1 (en) Multi-path rdma transmission
US11770722B2 (en) Signalling of deterministic system capabilities depending on absolute transmission time (TSN, DETNET, etc.)
US20210281499A1 (en) Network interface device
JP5048664B2 (ja) パケットの供給を制御する方法および通信システム
US20100082860A1 (en) System and method for updating the status of an asynchronous, idempotent message channel
US9832125B2 (en) Congestion notification system
TWI603205B (zh) 於晶載網路上之流量控制技術
JP6287451B2 (ja) データ受信装置、データ受信装置の制御方法及びデータ送信装置とデータ受信装置とを有するデータ送受信システム
CN113271264B (zh) 一种时间敏感网络的数据流传输方法和装置
US9602237B2 (en) Sideband parity handling
WO2021008562A1 (zh) 流速控制方法和装置
CN114928894A (zh) 一种时间敏感网络确定性调度方法及装置
US9584420B2 (en) Switching between loss-based and delay-based mode for real-time media congestion controllers
TW201528142A (zh) 具多核處理器的內部/外部存取之後援處理器單元
US20090010157A1 (en) Flow control in a variable latency system
WO2022042282A1 (zh) 一种无损流量拥塞自适应方法、系统和网络设备
WO2020140875A1 (zh) 报文处理方法和装置
WO2020192397A1 (zh) 一种发送设备的调整方法和通信装置
US20100136920A1 (en) Method and system for optimizing measurement reporting mechanism in a layered protocol wireless network
US7394813B2 (en) Systems and methods for implementing an acknowledgement mechanism for transmission of a real-time data stream
CN111404840B (zh) 报文处理方法和装置
US20170187605A1 (en) Network Interface Device
WO2021259483A1 (en) A device and method for remote direct memory access
US11915315B1 (en) Method, apparatus and system for time stamping and sequencing data items
WO2022247307A1 (zh) 传输报文的方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19906824

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019906824

Country of ref document: EP

Effective date: 20210719