WO2014094432A1 - 深度报文检测结果扩散方法及装置 - Google Patents

深度报文检测结果扩散方法及装置 Download PDF

Info

Publication number
WO2014094432A1
WO2014094432A1 PCT/CN2013/080594 CN2013080594W WO2014094432A1 WO 2014094432 A1 WO2014094432 A1 WO 2014094432A1 CN 2013080594 W CN2013080594 W CN 2013080594W WO 2014094432 A1 WO2014094432 A1 WO 2014094432A1
Authority
WO
WIPO (PCT)
Prior art keywords
identification
identification result
network element
response message
data packet
Prior art date
Application number
PCT/CN2013/080594
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
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CA2838215A priority Critical patent/CA2838215C/en
Priority to EP13805726.0A priority patent/EP2768197B1/en
Priority to US14/109,389 priority patent/US9497089B2/en
Publication of WO2014094432A1 publication Critical patent/WO2014094432A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • H04L43/026Capturing of monitoring data using flow identification
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/14Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic
    • H04L63/1408Network architectures or network communication protocols for network security for detecting or protecting against malicious traffic by monitoring network traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Definitions

  • the present invention relates to the field of communications, and in particular, to a method and apparatus for spreading a deep packet detection result. Background technique
  • Deep packet inspection can identify specific Layer 7 protocols and applications of IP network flows. For example: It can identify that the current network stream is edonkey and belongs to P2P. The application of the class. DPI is mainly used to strengthen the refined operation of existing network traffic. Operators can perform protocol software usage analysis, traffic optimization, security management, content charging and other services based on relevant data. To achieve this goal, operators will be on the network. Each network element deploys a DPI function to form an identification function network element, and the DPI function of the identification function network element mainly includes a protocol application identification capability and a packet analysis capability.
  • each network element that performs DPI services in the network is deployed with an identification function module.
  • the data packets in the IP network stream need to be identified in each network element in the network.
  • the network element returns the identification result in the local machine and performs subsequent related service processing based on the identification result, which causes the overall network to perform DPI service.
  • the delay is larger.
  • the technical problem to be solved by the embodiments of the present invention is to provide a method and a device for spreading the deep packet detection result, so as to reduce the delay of executing the DPI service in the entire network.
  • an embodiment of the present invention provides a method for spreading a deep packet detection (DPI) identification result, including: The identification function network element receives the data packet in the network stream;
  • DPI deep packet detection
  • the data packet is an IPv4 packet or an IPv6 packet; when the data packet is an IPv4 packet, the first identification result is inserted
  • the header extension field of the data packet includes: an option field for inserting the first identification result into a header of the data packet; when the data packet is an IPv6 packet, the Inserting a result of the identification into the header extension field of the data message includes: inserting the first identification result into an extension header field of the data message.
  • the header extension field of the data packet further includes a first identification status code
  • the first downstream device indicates whether the data packet carries the first identification result or the second identification result.
  • the identification function network element is performed. After the data packet is identified, after the second identification result is inserted into the header extension field of the data packet, the method further includes:
  • a fourth possible implementation manner of the first aspect is further provided: in the local flow table And a first reverse recognition result carrying flag is set to indicate whether the first recognition result is inserted in a header extension field of the received response message; the first reverse recognition result carries a flag in the identification function Set to true when the network element successfully identifies the data packet;
  • the method further includes:
  • the response message is forwarded by the first downstream device to the identification function network element;
  • a fifth possible implementation of the first aspect is also provided: a second reverse identification result carrying flag is set in the local flow table, and is used to indicate whether the identification function network element inserts a header extension field of a next data packet received after receiving the data packet. Determining a first identification result, where the next data packet belongs to the network flow;
  • the method further includes:
  • the response message is sent by the first downstream device to the identification function network element, the response message carries a response message, and a header extension field of the response message carries a recognition result.
  • Requesting information the response message is generated by the server or the user equipment after receiving the data message, the identification result request information is used to request the first recognition result from the identification function network element; After the second reverse identification result carrying flag is set to be true, the identification result request information carried in the response packet is deleted, and then sent to the second downstream device, where the header of the response packet is sent.
  • the extension field further includes a third identification status code, configured to indicate to the identification function network element that the response message carries the identification result request information;
  • a sixth possible implementation of the first aspect is also provided:
  • the method further includes: after the data packet carrying the second identification result is sent to the first downstream device, the method further includes:
  • the response message is received by the server or user equipment after receiving the data message Generating, and forwarding by the first downstream device to the identification function network element;
  • an identification function network element including:
  • a first receiving unit configured to receive a data packet in the network stream
  • a first identifying unit configured to perform deep packet detection (DPI) identification on the data packet
  • the first processing unit is configured to: when the first identifying unit successfully identifies the data packet, identify the obtained data packet Saving a first identification result to a local flow table of the identification function network element, and inserting the first identification result into a header extension field of the data message; the data is not recognized by the first identification unit And inserting a second identification result into a header extension field of the data packet, where the second identification result is an initial value of a recognition result when the localization flow table is created by the identification function network element;
  • DPI deep packet detection
  • a first sending unit configured to send, to the first downstream device, the data packet that carries the first identification result or the second identification result.
  • the first processing unit is further configured to insert a first identification status code in a header extension field of the data packet, for the first downstream device Instructing the data message to carry the first identification result or the second identification result.
  • a second possible implementation if the data packet is in the network flow received by the identification function network element a first data packet, wherein the first processing unit is further configured to: after inserting the second identification result into a header extension field of the data packet, inserting in a header extension field of the data packet Identify the first package
  • the first downstream device receives the data packet carrying the first packet identifier, sending, to the identification function network element, a response packet carrying the first identification result; the response
  • the packet further includes a server or a user equipment, after receiving the data packet, generating a response message; the first packet identifier is used to identify the first packet in the network flow that enters the identification function network element for identification.
  • the network element further includes:
  • a second receiving unit configured to: after the first sending unit sends the data packet carrying the second identification result and the first packet identifier to the first downstream device, receiving a response message, where the response message is sent
  • the header carries a response message
  • the header extension field of the response packet carries the first identification result, where the response message is generated by the server or the user equipment after receiving the data packet;
  • the method is configured to parse the response packet to save the first identification result to the local flow table, and then delete the first identification result carried by the response message;
  • a second sending unit configured to send, to the second downstream device, the response message processed by the second processing unit.
  • the network element further includes:
  • a first configuration unit configured to configure a first reverse recognition result carrying flag in the local flow table, and when the first identifying unit successfully identifies the data packet, the first reverse recognition result The carrying flag is set to true; the first reverse identification result carrying flag is used to indicate whether the first identification result is inserted in a header extension field of the received response message, where the response message is sent by the server or The user equipment is generated after receiving the data packet, and is forwarded by the first downstream device to the identification function network element; a third receiving unit, configured to: after the first sending unit sends the data packet carrying the first identification result to the first downstream device, receive the response message;
  • a third processing unit configured to: when the third receiving unit receives the response message, determine whether the first reverse recognition result carries a flag is true, and if yes, insert the first recognition result The header extension field of the response packet, and the first reverse identification result carrying flag is set to false; the third sending unit is configured to send, after the inserting the first identification result, the second downstream device The response is 4 ⁇ .
  • the network element further includes:
  • a second configuration unit configured to configure a second reverse identification result carrying flag in the local flow table, and when the fourth receiving unit receives the response message, set the second reverse identification result carrying flag to True; the second reverse identification result carrying flag is used to indicate whether the first recognition result is inserted in a header extension field of a next data message received by the identification function network element;
  • a fourth receiving unit configured to: after the first sending unit sends the data packet carrying the first identification result to the first downstream device, receive a response message, where the response message is sent by the first a downstream device is sent to the identification function network element, the response message carries a response message, and a header extension field of the response message carries identification result request information, and the response message is received by the server or the user equipment.
  • the data packet or other data packet of the network stream is generated, and the identification result request information is used to request the first recognition result from the identification function network element;
  • a fourth processing unit configured to delete the identification result request information carried in the response packet, where the fourth sending unit is configured to send, to the second downstream device, the response message after deleting the identification result request information;
  • a fifth receiving unit configured to receive a next data packet, where the next data packet is a next data packet received by the identification function network element after receiving the data packet, and the The next data message belongs to the network stream;
  • a fifth processing unit configured to determine whether the second reverse recognition result carrying flag is true, and if yes, insert the first identification result into a header extension field of the next data packet;
  • a fifth sending unit configured to send the next data packet carrying the first identification result to the first downstream device.
  • the network element further includes:
  • a sixth receiving unit configured to: after the first sending unit sends the data packet carrying the second identification result to the first downstream device, receive a response message, where the response message is sent by the server or the user The device is generated after receiving the data packet, and is forwarded by the first downstream device to the identification function network element;
  • a second identifying unit configured to identify the response message
  • a sixth processing unit configured to acquire a first recognition result after the second identification unit successfully identifies the response message, save the first recognition result to the local flow table, and set the first identification As a result, the header extension field of the next data packet received by the identification function network element is inserted, and the next data packet belongs to the network flow.
  • the identification function network element performs service identification on the received message and inserts the identification result into the header extension field of the message, so that other network elements can obtain the recognition result without performing packet identification, thereby reducing the overall network. Delay in performing DPI; 2) Since only the function network element is identified to identify the message, the update of the identification database only involves identifying the function network element, which reduces the maintenance cost;
  • the message may be inserted in the message.
  • the corresponding information requests the first identification result to the corresponding network element, and does not need to be identified again, thereby avoiding the phenomenon that the identification may not be completed again.
  • FIG. 1 is a schematic flow chart of a method for spreading a deep packet detection result according to an embodiment of the present invention
  • FIG. 2 is a schematic flow chart of a method for spreading a deep packet detection result according to an embodiment of the present invention
  • FIG. 3 is a schematic flow chart of a method for spreading a deep packet detection result according to an embodiment of the present invention
  • FIG. 4 is a schematic flow chart of a method for spreading a deep packet detection result according to an embodiment of the present invention
  • FIG. 5 is a schematic flow chart of a method for spreading a deep packet detection result according to an embodiment of the present invention
  • FIG. 6 is a schematic flow chart of a method for spreading a deep packet detection result according to an embodiment of the present invention.
  • FIG. 7 is a schematic flow chart of a method for spreading a deep packet detection result according to an embodiment of the present invention.
  • FIG. 8A is a schematic diagram showing the format of an option field of an IPv4 packet header according to an embodiment of the present invention.
  • FIG. 8B is a format diagram showing an extended header field of an IPv6 message header according to an embodiment of the present invention.
  • FIG. 9A is a schematic structural diagram of an identification function network element according to an embodiment of the present invention
  • FIG. 9B is a schematic structural diagram of an identification function network element according to an embodiment of the present invention
  • FIG. 9C is an identification according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of an identification function network element according to an embodiment of the present invention
  • FIG. 11 is a schematic structural diagram of an identification function network element according to an embodiment of the present invention
  • FIG. 13A is a schematic structural diagram of a diffusion network element according to an embodiment of the present invention
  • FIG. 13B is a schematic structural diagram of a first processing unit of a diffusion network element according to an embodiment of the present invention.
  • FIG. 14 is a schematic structural diagram of a diffusion network element and a first processing unit thereof according to an embodiment of the present invention.
  • FIG. 15 is another schematic structural diagram of a first processing unit in the embodiment shown in FIG. 13B;
  • FIG. 16 is a schematic structural diagram of a diffusion network element according to an embodiment of the present invention.
  • FIG. 17 is a schematic structural diagram of a diffusion network element according to an embodiment of the present invention.
  • FIG. 18 is a schematic structural diagram of an identification function network element according to an embodiment of the present invention.
  • FIG. 19 is a schematic structural diagram of a diffusion network element according to an embodiment of the present invention.
  • FIG. 1 is a schematic flowchart of a method for spreading a deep packet detection result according to an embodiment of the present invention.
  • the method includes: 100: The identification function network element receives the data packet in the network stream.
  • 102 Identify the data packet, if the data packet is successfully identified, save the first recognition result that is identified to the local flow table of the identification function network element, and the first recognition result Inserting a header extension field of the data packet; if the data packet is not recognized, inserting a second identification result into a header extension field of the data packet, where the second recognition result is the identification function The initial value of the recognition result when the network element creates the local flow table.
  • the network flow may be an IP network flow, where the data packet includes: an IPv4 packet or an IPv6 packet.
  • the header extension field is an option field of the IPv4 packet header.
  • the header extension field is The extended header field of the IPv6 packet header.
  • the header extension field of the data packet further includes a first identification status code, configured to indicate, to the first downstream device, that the data packet is carried The first recognition result or the second recognition result.
  • step 102 after the identification result information is inserted into the header extension field of the data packet, the IP packet header length, the IP packet length, and the checksum are adjusted (hereinafter referred to as "adapting adjustment”. " ).
  • the present embodiment only a recognition network element identification data packet, and the recognition result information inserted in the data packet header extension field to be forwarded, without any network traffic for identifying network elements are further 1 J, Reduces the latency caused by DPI services in the overall network.
  • the update of the identification database only involves identifying the function network element, which reduces maintenance costs.
  • the data packet is the first one of the IP network flows that enters the identification function network element for identification, the data packet is successfully identified or cannot be successfully identified.
  • an identifier first packet identifier where the identifier of the first one of the IP network flows that enters the identification function network element is identified.
  • the data packet of the following situation may be inserted into the identifier first packet identifier: the first time the function network element receives the data packet belonging to the IP network stream; or, the identification function network element is restarted or failed.
  • the local flow table is no longer saved with the first identification result of the IP network flow, and then the first received data packet belonging to the IP network flow.
  • the data packet including the second identification result and the first packet identifier may be used for the diffusion network element (the diffusion network element may be the first downstream device, or may be the first The downstream device of the downstream device requests the first identification result. For example, if the first identification result is saved in the local flow table of the diffusion network element, if the identification function network element cannot identify the data packet, the packet is sent to the first downstream device.
  • the method further includes the following steps:
  • the header extension field of the response packet further includes a second identifier status code, configured to indicate, to the identifier function network element, that the response packet carries the first identification result.
  • the identification function network element disappears due to restart or failure, the first identification result saved by the identification function network element may not be recognized, or the received data message may not be identified (or the data may not be recognized) In the case of the message, the first recognition result is obtained from the diffusion network element storing the first identification result, so that the identification function network element can acquire the first recognition result.
  • the local flow table is configured with a first reverse identification result carrying flag, configured to indicate whether the identification function network element receives a response message later.
  • the header extension field is inserted into the first identification result, and the response packet is generated by the server or the user equipment after receiving the data packet, and is forwarded by the first downstream device to the identification function network element.
  • the first reverse identification result carrying flag is set to true when the identification function network element successfully identifies the data packet; and the data packet carrying the first identification result is sent to the first downstream device Thereafter, the method further includes the following steps:
  • a receiving the response message; b: determining whether the first reverse recognition result carries a flag is true, and if yes, inserting the first identification result into a header extension field of the response message, The first reverse identification result carrying flag is set to false, and then the response message carrying the first identification result is sent to the second downstream device.
  • the fourth identification status code is also inserted into the header extension field of the response message, and used for The second downstream device instructs the response message to carry the first identification result.
  • the local flow table is configured with a second reverse identification result carrying flag, configured to indicate whether the identification function network element is receiving the data packet.
  • the header extension field of the next received data packet is inserted into the first identification result, the next data packet belongs to the IP network stream; and the first downstream device is sent to carry the first Knowledge After the result of the data packet, the method further includes the following steps:
  • the response packet is sent by the first downstream device to the identification function network element, where the response packet carries a response message and the header extension field of the response packet carries Identifying the result request information, the response message is generated by the server or the user equipment after receiving the data message or the subsequent data packet of the IP network flow, and the identification result request information is used to identify the function network element Requesting the first identification result; b: parsing the response message, and discovering that the header extension field of the response message carries the identification result request information, and then carrying the second reverse recognition result carrying flag If the information is true, the identification result request information carried in the response packet is deleted and sent to the second downstream device, where the header extension field of the response packet further includes a third identification status code, The identification function network element indicates that the response message carries the identification result request information; c: receiving the next data message in the network flow, and determining the second reverse knowledge The result is whether the carrying flag is true, if yes, the second reverse identification result carrying flag is set to false, the first identification result is
  • the method also includes the following steps:
  • the response packet is generated by the server or the user equipment after receiving the data packet, and is forwarded by the first downstream device to the identification function network element; b: responding to the response The message is identified; c: if the response is successfully identified to obtain the first recognition result, the first recognition result is saved to the local flow table, and the first recognition result is inserted Knowledge a header extension field of a next data packet received by the function network element, the next data packet belongs to the IP network stream; d: if the response packet cannot be identified, the next datagram is The text is identified.
  • the local flow table of the identification function network element is configured with a third reverse identification result carrying flag, where the identification function network element determines whether the information is based on the third reverse recognition result.
  • a header extension field of a data message is inserted into the first recognition result.
  • the third reverse identification result carrying flag is set to true; forwarding the response message to the second downstream device, or the first identification is The result is inserted into the header extension field of the response message, and then sent to the second downstream device; receiving the next data packet, determining whether the third reverse identification result carries the flag is true, if Inserting the first identification result into a header extension field of the next data packet, setting the third reverse identification result carrying flag to false, and determining that the device does not need to be discarded according to the service configuration.
  • the next data message of the first identification result is sent to the first downstream device.
  • the fourth identification status code is also inserted into the header extension field of the response message, and used for The second downstream device instructs the response message to carry the first identification result.
  • FIG. 7A and FIG. 7B are schematic flowchart of a method for spreading a deep packet detection result according to an embodiment of the present invention. Referring to FIG. 2, the method includes:
  • the diffusion network element receives the data packet in the network stream.
  • the packet forwarding process is performed, including: sending the data packet to the first downstream device, so that the first downstream device performs a flow table according to the insertion information. Or deleting the insertion information carried in the data packet and sending the information to the first downstream device.
  • the data packet includes: an IPv4 packet or an IPv6 packet.
  • the header extension field is an option field of the IPv4 packet header.
  • the header extension field is The extended header field of the IPv6 packet header.
  • the diffusion network element only needs to parse the header extension field of the data packet sent by the identification function network element to obtain the identification result information and perform the packet forwarding processing, and does not need to identify the data packet, thereby reducing the overall network.
  • the delay caused by the DPI service is only needed to parse the header extension field of the data packet sent by the identification function network element to obtain the identification result information and perform the packet forwarding processing, and does not need to identify the data packet, thereby reducing the overall network. The delay caused by the DPI service.
  • 204 includes the following situations:
  • the insertion information includes a first recognition result, or includes the first recognition result and the first identification status code, saving the first recognition result to the local flow table.
  • the insertion information includes a second recognition result, or includes the second recognition result and the first identification status code, creating or refreshing the local flow table without saving the second recognition result (ie: The second identification result carried by the insertion information is not saved to the local flow table, and the operation does not affect the creation of the local flow table by the diffusion network element.
  • the local flow table is created or refreshed.
  • the first recognition result is a recognition result when the data packet successfully completes the deep packet detection and identification
  • the second identification result is an initial value of the recognition result when the diffusion network element creates the local flow table.
  • the first identification status code is used to indicate to the diffusion network element that the data packet carries the first identification result or the second identification result, where the third identification status code is used to indicate to the second downstream device.
  • the data message carries the identification result request information, and the identification result request information is used to request the first identification result from the second downstream device.
  • the second downstream device is an identification function network element.
  • the insertion information when the insertion information includes the first identification result or the second identification result, the insertion information further includes: identifying a first packet identifier, and identifying the first depth in the IP network flow The message detects the identified data message.
  • the local flow table is configured with a fourth reverse identification result carrying flag, where the diffusion network element carries the label according to the fourth reverse identification result. Determining whether to notify the second downstream device of the first recognition result.
  • the 204 may further include the following steps: determining whether the local flow table saves the first recognition result, and if yes, the The four reverse recognition result carrying flag is set to true.
  • the method can further include the following steps:
  • the identifying the diffusion network element receives the response packet, where the response packet is received by the server or the user equipment. After the data packet is received, generated by the first downstream device, and forwarded by the first downstream device to the diffusion network element; b: determining whether the fourth reverse recognition result carries a flag is true, and if yes, the first The recognition result is inserted into the header extension field of the response packet, and the fourth reverse identification result carrying flag is set to false; c: the response packet carrying the first identification result is sent to the second downstream device And notifying the second downstream device of the first identification result.
  • step b of the implementation when the first identification result is inserted into the header extension field of the response message, the second identification status code is also inserted into the header of the response message. Extending a field to indicate to the second downstream device that the response message carries the first identification result.
  • the diffusion network element may, after receiving the data packet carrying the second identification result and identifying the first packet identifier, save the first recognition result in the local flow table,
  • the first identification result notifies the second downstream device (eg, the identification function network element) to avoid the problem.
  • the local flow table is configured with a recognition result waiting packet count, and is used to calculate that the diffusion network element receives before acquiring the first identification result. The number of data messages.
  • the 204 may further include the following steps: if the local flow table does not save the first identification result, if the insertion information does not include the first recognition result, or the insertion information includes the first Identifying the result but not saving the first identification result to the local flow table, determining whether the recognition result waits for the message count to exceed a preset threshold, and if yes, requesting the second downstream device The first recognition result.
  • the first identification result may be requested by the second downstream device by:
  • the diffusion network element root is used And determining, according to the fifth reverse recognition result carrying flag, whether to request the first identification result from the second downstream device.
  • the recognition result waits for the message count to exceed a preset threshold, the fifth reverse recognition result carrying flag is set to be true. Then, after 206, the method further includes the following steps:
  • a receiving a response packet, where the response packet is generated by the server or the user equipment after receiving the data packet, and is forwarded by the first downstream device to the diffusion network element; b: determining the fifth If the reverse recognition result carrying flag is true, the identification result request information is inserted into a header extension field of the response message, and the fifth reverse recognition result carrying flag is set to false, and the recognition result is waited clearing the count of packets; c: carrying the recognition result transmission request response packet information to the second downstream device, requesting the first device to the identification result to the second downstream, so that the second After receiving the response message carrying the identification result request information, the downstream device inserts in the header extension field of the next data packet when receiving the next data packet belonging to the IP network flow.
  • the first identification result is then sent to the diffusion network element; d: receiving the next data packet and parsing, saving the first identification result to the local flow table to obtain the first Do the results.
  • the diffusion network element does not acquire the first identification result within a preset threshold range (ie, the first identification result is not saved to the local flow table)
  • the recognition result request is initiated.
  • the first recognition result is requested to the second downstream device (eg, an identification function network element). The problem that the diffusion network element cannot obtain the first identification result due to failure, configuration, or the like is avoided.
  • FIG. 3 is a schematic flowchart of a method for spreading a deep packet detection result according to an embodiment of the present invention.
  • Figure 3 the method includes:
  • the diverging network element receives the response packet, where the response packet is sent by the first downstream device to the diffusion network element, where the response packet carries the response information, and the header extension field of the response packet carries The information is inserted, and the response information is generated by the server or the user equipment after receiving the data in the IP network stream.
  • 306 Perform packet forwarding processing, including: sending the response packet to the second downstream device, so that the second downstream device performs flow table management according to the insertion information, or inserts the After the information is deleted, it is sent to the second downstream device.
  • the method includes: if the insertion information includes the first identification result and the fourth identification status code, saving the first identification result to the local In the flow table, the first identification result is a recognition result when the IP network stream successfully completes the deep packet detection and identification, and the fourth identification status code is used to indicate the response message carrying to the diffusion network element. There is the first recognition result.
  • the diffusion network element can obtain the first recognition result by parsing a header extension field of the response message.
  • the insertion information includes the identification result request information, or includes the identification result request information and the third identification status code, refreshing the local flow table
  • the second downstream device forwards the response message; if the insertion information includes the first identification result and the second identification status code, refreshing the local flow table without saving the first recognition result, and then Forwarding the response message to the second downstream device.
  • FIG. 4 is a schematic flowchart of a method for spreading a deep packet detection result according to an embodiment of the present invention. Referring to FIG. 4, the method includes:
  • Step 1 The user initiates a service access, such as an HTTP service access.
  • a service access such as an HTTP service access.
  • Step 2 Identify the function network element 1 Complete the identification of the data packet, save the obtained first identification result to the local flow table, and insert the first identification result into the IP option field of the data message to perform adaptive adjustment.
  • the data packet is the first data packet in the IP network stream to which the identification function is accessed
  • the first packet identifier may be inserted into the IP option field along with the first identification result.
  • the first identification status code may be inserted to indicate to the downstream network element that the data packet carries the first identification result.
  • Step 3 The identification function network element 1 transmits a data message carrying the first identification result to the diffusion network element 2 (identification function network element 1, and any network element of the diffusion network element 2 to the diffusion network element N to send a datagram)
  • the premise of the text is: The service configuration does not cause the data packet to be discarded. For example, if the service of a network element is configured to block or limit the traffic, the network element does not forward the current data packet. The current process ends.
  • This premise is also applicable in other embodiments of the present invention. In order to more clearly describe various embodiments of the present invention, the following defaults to the service configuration without causing data packet discarding.
  • Step 4 The diffusion network element 2 performs packet forwarding processing. Specifically, the network element 2 parses the IP option field of the data packet, saves the first identification result to the local flow table to obtain the first identification result, and then performs step 5.
  • Step 5 The diffusion network element 2 sends the data packet carrying the first identification result to the downstream device. Only the diffusion network element 2 and the diffusion network element N are illustrated in FIG. 3, and those skilled in the art should understand that there may be any number of diffusion network elements between the network element 2 and the network element N, and these network elements perform Operation The operation performed by the network element 2 is the same as that of the network element 2, and is not described here. After the network element N, there may be any number of common network elements. The ordinary network element does not need to identify the data packet, and does not need to acquire and spread the first identification result.
  • Step 6 The diffusion NE performs packet forwarding processing. Specifically, delete the insertion information in the IP option field of the data packet and make an adaptive adjustment, and then perform step 7.
  • the network element N may retain the insertion information carried in the data packet to provide a service identification service for the user.
  • Step 7 Send a data message.
  • the subsequent data message may continue to be identified.
  • the identification function network element completes the identification of the data packet, the subsequent data packet of the IP network stream to which the data packet belongs does not need to be identified, and the first identification result saved in the local flow table can be directly applied for service processing. .
  • FIG. 5 is an embodiment according to the present invention.
  • Step 2 The diffusion network element 1 receives the data packet and performs packet forwarding processing. Specifically, the flow table is created or refreshed (for example, information such as refreshing the access time of the network flow), and then the data packet is sent to the identification function network element 2.
  • Step 3 The identification function network element 2 identifies the received data packet, and is unrecognizable.
  • the second identification result and the identification first packet identifier are inserted into the IP option field of the data packet and adaptively adjusted.
  • the processed data packet is sent to the diffusion network element 3.
  • the second identification knot And the first identification status code is further inserted into the downstream network element to indicate that the data message carries the second identification result when the first packet identifier is inserted into the IP option field of the data packet.
  • Step 4 The diffusion network element 3 performs packet forwarding processing. Specifically, the network element 3 parses the IP option field of the data packet, and finds that only the first packet identifier is identified and the recognition result is an initial value (ie, the second recognition result), then the flow table is refreshed or created without saving the recognition result, and then forwarded. The data packet is sent to the downstream network element.
  • the network element 3 parses the IP option field of the data packet, and finds that only the first packet identifier is identified and the recognition result is an initial value (ie, the second recognition result), then the flow table is refreshed or created without saving the recognition result, and then forwarded.
  • the data packet is sent to the downstream network element.
  • diffusion network element 1 Only the diffusion network element 1, the diffusion network element 3, and the diffusion network element N are illustrated in FIG. 5, and those skilled in the art should understand that between the network element 1 and the network element 2, and between the network element 3 and the network element N, There can also be any number of diffusion network elements.
  • the operation of the network element between the network element 3 and the network element N in the uplink and downlink directions may be the same as that performed by the network element 3, and is not described here.
  • Step 5 The diffusion NE performs packet forwarding processing. Specifically, the IP option field of the data packet is parsed, and it is found that only the first packet identifier is identified, and the recognition result is the initial default value, and the flow table is created or refreshed without saving the recognition result. The insertion information in the IP option field of the data packet is deleted and adaptively adjusted, and then the data message is sent to the peer user or server.
  • Step 6 The flooded network element N receives the response packet sent by the peer user or the server, and performs packet forwarding processing. Specifically, if the IP option field of the response packet is found to contain no insertion information, only the flow table is refreshed, and the response packet is forwarded to the diffusion network element 3.
  • Step 7 Please refer to step 6.
  • Step 8 The identification function network element 2 identifies the response message and successfully identifies the first recognition result, and performs message processing and flow table management. Specifically, the first identification result is saved to the local flow table, and the predefined reverse identification result carrying tag in the local flow table (where the reverse identification result carrying tag may be: the uplink recognition result carrying flag) is set to True, the first identification result is inserted into the IP option field of the response message and the text is adaptively adjusted, and then the response text is sent downstream. Optional, will When the first identification result is inserted into the IP option field of the response message, the fourth identification status code may be inserted to indicate that the downstream diffusion network element indicates that the response message carries the first identification result.
  • the reverse identification result carrying tag may be: the uplink recognition result carrying flag
  • Step 9 The diffusion network element 1 receives the response packet carrying the first identification result, and performs packet forwarding processing. Specifically, the IP option field of the data packet is parsed, and the first identification result is saved to the local flow table. Then, the network element 1 directly forwards the response packet to the user equipment. Alternatively, the network element 1 deletes the insertion information in the response packet and adapts it to the user equipment.
  • Step 10 The flooding network element 1 receives subsequent service packets of the same IP network flow, and performs packet forwarding processing. Specifically, it is determined that the local flow table stores the first identification result of the IP network flow to which the current data packet belongs, and then the flow table is refreshed, and the service processing and the data message are sent according to the first identification result.
  • Step 11 The identification function network element 2 receives the data packet, does not identify it, performs packet processing and flow table management. Specifically, if it is determined that the reverse identification result carrying flag is true, the first identification result is inserted into an IP option field of the data packet and adaptively adjusted, and the reverse identification result carrying flag is set to false, and then sent. The data message processed as described above. Optionally, when the first identification result is inserted into the IP option field of the data packet, the first identification status code may also be inserted.
  • the first identification is implemented by pre-defining the carrying identifier in the local flow table, so that after the response message is successfully identified, the first identification result is inserted into the IP option field of the next data packet received after the first identification result is inserted.
  • the rapid spread of results is implemented by pre-defining the carrying identifier in the local flow table, so that after the response message is successfully identified, the first identification result is inserted into the IP option field of the next data packet received after the first identification result is inserted.
  • Performing packet processing and flow table management includes: saving the obtained first identification result to the local flow table, and setting the predefined reverse recognition result carrying flag in the local flow table to be true, and then optionally, the network element 2 forwards In response to the message, the network element 2 inserts the first identification result into the IP option field of the response message and adjusts the message to the user equipment. The operations performed by other network elements remain unchanged.
  • step 8 the function network element is identified.
  • the identification function network element 2 identifies the received data message in step 11.
  • FIG. 6 is a schematic flow chart of a method for spreading a deep packet detection result according to an embodiment of the present invention. Referring to FIG. 6, the method includes:
  • the identification function network element receives and identifies the data packet in the IP network stream, and if not, performs 601 and subsequent steps, otherwise executes 606 and subsequent steps.
  • the function network element to perform file forwarding processing. Specifically, the second identification result is inserted into the IP option field of the data packet and adaptively adjusted, and then the subsequent service processing (including blocking, traffic limiting, charging, and the like) is performed, and the present invention does not limit this. If the identifier of the received data packet belongs to the following, the IP packet field of the data packet is inserted into the first packet identifier (the identifier is used to identify the first IP network stream to which the received data packet belongs).
  • the data packet that enters the identification function network element for identification : 1. The identification function network element receives the data packet belonging to the IP network flow for the first time; 2. The identification function network element does not cause the local flow table due to restart or failure. The first identification result of the IP network flow is saved, and then the data packet belonging to the IP network flow is received for the first time.
  • the diverging network element downstream of the identification function network element receives the data packet and parses the packet. If the analysis result does not satisfy the first condition, execute 603; if the analysis result satisfies the first condition but does not satisfy the second condition, execute 604; if the analysis result satisfies both the first condition and the second condition, Execute 605.
  • the first condition is: parsing an IP option field of the data packet, determining that it includes the second identification result and identifying the first packet identifier.
  • the second condition is: the first identification result is saved in the local flow table of the diffusion network element that currently parses the data packet.
  • the diffusion network element that does not meet the first condition performs packet forwarding processing.
  • the current spreading network element in each downstream network element receives the data packet, and the data packet includes only the second identification result, and then refreshes or creates the flow table, and then forwards the data packet to the downstream network element, or
  • the insertion information in the data packet is deleted and sent to the downstream network element. For example, if the current diffusion network element in each downstream network element receives the data packet, and the data packet does not include the insertion information, the data packet is forwarded to the downstream. Text.
  • the subsequent processing steps may refer to the embodiment shown in FIG. 5, and the identification function network element identifies the response message. If the identification of the response message is completed, the corresponding steps of the embodiment shown in Figure 5 are performed; if the identification of the response message is not completed, the subsequent received data message is continuously identified, and so on.
  • the diffusion network element that satisfies the first condition and does not satisfy the second condition performs packet forwarding processing. For example, the current current network element in the downstream receives the data packet, and the data packet only includes the second identification result and the first packet identifier. If the current diffusion network element does not have a local flow table, for example, the current network element restarts and causes the local flow. If the table disappears, the flow table is created, and the data packet is forwarded, or the insertion information in the data packet is deleted and sent. If the first identification result is not saved in the local flow table of the current network element, the flow table is refreshed. For example, after refreshing the access time of the current IP network flow, the data packet is forwarded, or the insertion information in the data packet is deleted and sent.
  • the subsequent processing steps are The subsequent processing steps of the above 603 are the same, and are not described herein again.
  • the downstream network element that satisfies the first condition and the second condition performs packet forwarding processing.
  • the current spreading network element considers the insertion information in the data message to be the identification function network element to request the first identification result. Therefore, the current spreading network element deletes the insertion information in the IP option field of the data packet and performs adaptive adjustment, and then sends the processed data packet to the downstream network element (or forwards the data packet carrying the inserted information). And inserting the first identification result into the IP option field of the response message received later.
  • the second identification status code may be inserted, and the indication function network element is configured to indicate that the response message carries the first identifier. result. Specifically, it can be achieved by the following steps:
  • a reverse identification result carrying flag is set in the local flow table of the current spreading network element (where the reverse identification result carries the label: the downlink identification result carries the label); the current spreading network element determines that the received data packet carries If there is a second recognition result and a first packet identifier is identified, and the local flow table stores the first recognition result, the reverse recognition result carrying flag is set to true, and the insertion information in the IP option field of the data message is deleted and adapted.
  • the message is sent; after receiving the response message, it is determined whether the reverse recognition result carries the flag is true, and if so, the first recognition result (or the first recognition result and the second recognition status) Inserting the IP option field of the response message and adjusting the value of the reverse recognition result to be false, and then transmitting the processed response message; the identification function network element receives the response message (The response packet may be forwarded by other spreading NEs. When other flooding NEs receive the response packet, the resolution finds that it carries the first identification result. The second identification status code does not process the response message and forwards it directly to the downstream. The IP option field of the response message is parsed to obtain the first identification result, and the first identification result is saved to the local flow table, and the response message is deleted. Insert the information in the text and make an adaptive adjustment and send it. Obviously, 602, 603, 604, and 605 may be a loop execution process until all the diffusion units downstream of the identification function network element complete the corresponding operations according to the conditions they satisfy.
  • 606 and its subsequent steps include the following:
  • the local flow table of the identification function network element is pre-defined with a reverse identification result carrying flag (where the reverse identification result carrying flag may be: the downlink identification result carries the label), and when the data packet is successfully identified, the data packet is obtained.
  • the first identification result is saved to the local flow table, the first identification result is inserted into the IP option field of the data message, and the adaptive adjustment is performed, the reverse recognition result carrying flag is set to true, and then the processed data is sent. Message.
  • Each downstream network element receives a data packet and performs packet forwarding processing. For example, please refer to steps 3 to 7 in the embodiment shown in FIG.
  • each of the upstream network elements of the identification function network element receives the response packet and forwards it to the identification function network element.
  • the identification function network element For example, please refer to steps 6 to 7 in the embodiment shown in FIG.
  • the identification function network element receives the response message, and determines that the reverse recognition result carrying flag is true, then inserts the first identification result into the IP option field of the response message and performs adaptive adjustment, and the reverse identification is performed.
  • the result carries a flag set to false and then sends a response message.
  • each network element has obtained the first identification result
  • the identification function network element fails or restarts (or identifies the function network element and any downstream network element fails or restarts)
  • the identification function network element receives the uplink direction Data stream, by requesting the first identification result from the downstream diffusion network element Obtain the first recognition result.
  • each network element in the network can forward only the packet and the refresh flow table in the downlink direction, and then the identification function network element performs the next uplink data.
  • the message is processed accordingly (for example: inserting the identification first packet tag and the second recognition result).
  • the identification module may not be able to obtain the corresponding feature, and the identification may not be completed.
  • FIG. 7 is a schematic flowchart of a method for spreading a deep packet detection result according to an embodiment of the present invention, where the method includes:
  • the background of this embodiment is as follows:
  • the identification function network element 1 has completed the identification of the data packet, and the other network elements all have the first recognition result.
  • the diffusion network element 2 has received the data packet exceeding the preset threshold, but the first identification result is still not obtained (for example, the failure of the diffusion network element 2 causes the occurrence of the situation).
  • Step 1 The user sends intermediate data to the identification function network element 1.
  • Step 2 The identification function network element 1 receives the data packet. Since the first identification result of the IP network stream to which the data message belongs has been obtained, the flow table is refreshed and corresponding service processing is performed, and then the data message is forwarded.
  • Step 3 to Step 8 The diffusion network element 2 sends a message including the identification result request information to request the first recognition result from the identification function network element 1, specifically:
  • Step 3 After receiving the data packet, the diffusion network element 2 determines that the recognition result waits for the packet to exceed the preset threshold (that is, the network element 2 has received the data packet exceeding the preset threshold, but the first identification result is still not obtained. ), carrying the predefined reverse recognition result in the local flow table with the tag (the reverse recognition result here)
  • the carrying flag may be: the downlink identification result carrying flag is set to true, and the identification result request information (the identification result request information may include the identification result in the local flow table) is inserted into the IP option field of the data packet and adaptively adjusted. Then send a data message.
  • the third identification status code may be inserted, and used to indicate to the identification function network element that the data message carries the identification result request information, thereby performing the identification function.
  • the network element requests the first recognition result.
  • the diffusion network element parses the extension field every time the data packet is received, if If the data packet does not carry the first identification result, or the data packet carries the first identification result but the diffusion network element fails to save the first identification result to the local flow table, the recognition result in the local flow table is waited The message count is added with a unit value; if the header extension field of the data packet carries the first identification result, and the diffusion network element saves the first identification result to the local flow table, the recognition result waits for the message count to be cleared.
  • the diffusion network element 3 receives the data packet and performs packet forwarding processing. Specifically, the IP option field of the data packet is parsed, and it is determined that the packet carrying the identification result request information is not processed, and only the flow table is refreshed and the service processing is performed. The data message is then forwarded downstream.
  • Step 5 The flooded network element N receives the data packet and forwards the packet. Specifically, it is determined that the data packet carries the identification result request information, only the flow table is refreshed and the service processing is performed, and the identification result request information in the data message is deleted and adaptively adjusted. Then send a data message.
  • Step 6 The flooding network element N receives the response packet, refreshes the flow table, and performs related service processing. Then forward the response 4 ⁇ text.
  • Step 7 Please refer to step 6.
  • Step 8 The network element 2 receives the response message, determines that the recognition result waits for the message count to exceed the threshold, and the reverse recognition result is marked as true, and inserts the identification result request information into the IP option field of the response message and performs adaptability.
  • the adjustment (the recognition result request information may include the recognition result in the local flow table), and at the same time, the reverse recognition result carrying flag is set to false, the recognition result waits for the message count to be cleared, and then the response message is sent.
  • the third identification status code may be inserted, and used to indicate to the identification function network element that the response message carries the identification result request information, thereby identifying The function network element requests the first recognition result.
  • Step 9 to Step 10 The identification function network element deletes the insertion information in the response message carrying the identification result request information, and then sends the insertion information to the downstream, and inserts the first identification result into the IP option field of the received next data message. Forward. specific:
  • Step 9 The identification function network element 1 receives the response message and performs packet forwarding processing. Specifically, the IP option field of the response packet is parsed, and the identification result request information sent by the diffusion network element is determined, and the predefined reverse recognition result in the local flow table is carried by the tag (the reverse recognition result carries the tag here) It can be: The uplink identification result carrying flag is set to true, the insertion information in the response message is deleted and adaptively adjusted, the flow table is refreshed and related business processing is performed, and then the response message is sent.
  • Step 10 Identify the function network element 1 Receive the data packet to forward the packet. Specifically, if it is determined that the reverse recognition result carrying flag is true, the first identification result is inserted into an IP option field of the data packet and adaptively adjusted. The reverse recognition result carrying flag is set to false, the flow table is refreshed and related business processing is performed, and then the data message is sent.
  • Step 11 The diffusion network element 2 receives the data packet and performs packet forwarding processing. Specifically, the IP option field of the data packet is parsed, and the first identification result is saved to the local flow table. Refresh the flow table and perform related business processing, and then send data packets.
  • Step 12 and Step 13 Please refer to step 11. However, in step 13, the diffusion network element N can delete the insertion information in the data packet and make an adaptive adjustment, and then send it to the server/user.
  • the faulty network element may The identification result request information is inserted into the data message in the uplink direction, so that the identification function network element performs a corresponding operation according to the predefined reverse recognition result carrying flag and the first recognition result saved in the local flow table.
  • the faulty diffusion network element fails in the process of forwarding the downlink data, and the faulty network element is the upstream network element of the identification function network element in the downlink direction, the fault occurs.
  • the network element may insert the identification result request information into the response message in the downlink direction, so that the identification function network element performs a corresponding operation according to the predefined reverse recognition result carrying flag and the first identification result saved in the local flow table.
  • the reverse identification result carrying tag may be a tag defined in the local flow table.
  • the reverse direction message indicating the current direction needs to carry the corresponding insertion information.
  • FIG. 8A is a schematic diagram of a format of an option field of an IPv4 packet header according to an embodiment of the present invention
  • FIG. 8B is a schematic diagram of a format of an extended header field of an IPv6 packet header according to an embodiment of the present invention.
  • the IPv4 header provides the extended information carrying capability of the IP header through the OPTION field, and each hop needs to be processed.
  • the OPTION field in this embodiment is defined as follows:
  • Option type is defined as 00011110.
  • the first bit from the high bit indicates whether the option is copied into all IP fragments, and the setting to 0 means no copying, only the first piece carries the identification information.
  • Second, three two A bit 00 indicates that the option belongs to a control class message.
  • the last five digits 11110 are the option number (option number).
  • the IP protocol stack uses this field to determine the option type.
  • the 11110 is used as the previous reserved option number.
  • the option can be used to identify the option as the identification result carrying information. If the option number field of a packet is 11110, the network element that needs to obtain the identification result, for example, the identification function network element or the diffusion network element, parses the Option field of the packet. Other devices that do not support the option can ignore the forwarding and continue forwarding. The message.
  • the length of the Option is the length of the entire option.
  • the identification status code is 4 digits, the first digit of the high digit is the first packet identifier, and the first packet identifying the current IP network stream is identified.
  • the non-identification function network element determines whether the identification function network element needs to be used. Get recognition results from other network elements. For the last 3 digits of the high position, the 000 may be used as the first identification status code or the fourth identification status code for identifying the function network element to diffuse the first recognition result and/or the second identification result to the diffusion network element;
  • the third identification status code, the identification identification result request information is used by the diffusion network element to request the first identification result from the identification function network element; 010 is used as the second identification status code, and is used to identify the option as the first request for the identification function network element. Identify the response to the result; other reservations.
  • the recognition result includes the identified protocol, application, terminal type and other information, and its length is related to the structure of the recognition result returned by the identification function, and can support the multi-identification result carrying.
  • the extended information field can identify the policy information of the current IP network flow, such as discarding or traffic limiting.
  • the definition type, the identification status code, and the identification result are defined so that the identification function network element and the diffusion network element can be processed according to different insertion information.
  • the extension field of this embodiment is inserted into the extended header field of IPv6, and is implemented by using the Hop-by-Hop Options extension header.
  • the protocol stipulates that Hop-by-Hop Options must be in each Each network element needs to be processed.
  • the extended header field is defined as follows:
  • the Next Header (8bits) header records the information of the next extension header.
  • Hdr ext len (8bits) records the length of the Hop-by-Hop Options header.
  • the Option type is defined as 00011110.
  • the first two digits of the high digit indicate that if the NE does not recognize the option, the next option is skipped.
  • the third bit is set to 0.
  • the content of the option is not modified during the forwarding process.
  • 11110 is an option number.
  • the IP protocol stack uses this field to determine the option type. 11110 is used as the previous reserved option number. In this technical solution, it is used to identify the option as the identification result carrying information. If the option number field of a packet is 11110, the device that needs to obtain the identification result, for example, the identification function network element or the diffusion network element, parses the Option field of the packet, and the other device can ignore the packet and continue forwarding the packet.
  • the identification status code For the description of the Option length, the identification status code, the recognition result, and the extended information field, refer to the description in FIG. 7A, and details are not described herein again.
  • the definition of the Option type, the identification status code, and the identification result enable the identification function network element and the diffusion network element to perform corresponding processing according to different insertion information.
  • the identification function network elements or the diffusion network element may choose to delete the message or send it from the message, or Reserved to be sent in the message.
  • This selectivity can be achieved by defining network element attributes, which are equally applicable to the device embodiments provided by the present invention.
  • the identification function network element or the diffusion network element may be defined as an uplink edge node, a downlink edge node, an uplink termination node, or a downlink termination node to determine a range in which the identification result is spread. among them:
  • the upstream edge node is configured to prevent the uplink packet from carrying the insertion information in the solution. After receiving the packet, the device discards the packet and discards the packet after the threshold is exceeded. However, the packet carrying the insertion information is sent up and down.
  • the downstream edge node The downlink packet is prohibited from carrying the insertion information in the solution. After receiving the packet, the packet is discarded. After the threshold is exceeded, the protection is taken to prevent the attack. Message.
  • Uplink termination node It is forbidden to carry the insertion information in the scheme. After receiving the packet, the device directly discards the packet and takes protection measures to prevent the attack after the threshold is exceeded. If the packet is from the upstream direction, the header is forwarded.
  • the extension field carries the insertion information in the scheme, and the insertion information is deleted and then forwarded (for example, the header extension field of the packet carrying the insertion information in the scheme is stripped and forwarded), and the uplink identification result is prohibited from carrying the marker position as Really.
  • Downstream termination node It is forbidden to carry the insertion information in this scheme. After receiving this type of packet, it will discard it directly, and take protective measures to prevent the attack after exceeding a certain threshold. If the header from the downstream direction is received, The extension field carries the insertion information in the scheme, and the insertion information is deleted and then forwarded. The downlink direction identification result is prohibited from carrying the marker position to be true.
  • the identification function network element 1 may be defined as a downlink edge node, and the diffusion network element N may be defined as an uplink edge node, so that the network element N sends the data packet carrying the first identification result to the peer user equipment.
  • the node between the network element 1 and the network element N can perform operations such as parsing and forwarding the received message carrying the insertion information provided by the present invention.
  • network element 1 can be defined as a downlink termination node
  • network element N is defined as an uplink termination node.
  • the network element attributes of the start network element and the end network element of the path may be defined as needed.
  • FIG. 9A is a schematic structural diagram of an identification function network element according to an embodiment of the present invention.
  • the identification function network element 90 includes: The first receiving unit 91 is configured to receive a data packet in the network stream.
  • a first identifying unit 92 configured to perform depth packet detection (DPI) identification on the data packet
  • the first processing unit 93 is configured to: when the first identifying unit successfully identifies the data packet, identify Obtaining the obtained first identification result to the local flow table of the identification function network element, and inserting the first identification result into a header extension field of the data message; the first identification unit cannot identify the The second identification result is inserted into the header extension field of the data packet, and the second identification result is an initial value of the recognition result when the localization flow table is created by the identification function network element;
  • the sending unit 94 is configured to send, to the first downstream device, a data packet that carries the first identification result or the second identification result.
  • the first processing unit 93 is further configured to insert a first identification status code in a header extension field of the data packet, to indicate, to the first downstream device, that the data packet is carried The first recognition result or the second recognition result is described.
  • the network flow may be an IP network flow, and if the data is the first one of the IP network flows that enters the first identification unit for identification, the first The processing unit 93 is further configured to insert a first packet identifier in the header extension field of the data packet, to identify the first packet in the IP network stream that enters the identification function network element for identification.
  • the identification function network element 90 provided in this embodiment can insert the identification result information in the header extension field of the data packet to send the recognition result information to other network element devices, which can reduce the delay of the overall network to perform DPI service.
  • the function network element 90 is identified, and may further include:
  • a sixth receiving unit 95 configured to send, at the first sending unit 94, the first downstream device After the data packet carrying the second identification result is received, the response packet is received by the server or the user equipment after receiving the data packet, and is forwarded by the first downstream device to the The identification function network element 90';
  • a second identifying unit 96 configured to identify the response message
  • the sixth processing unit 97 is configured to save the first recognition result to the local flow table when the second identification unit 96 successfully identifies the response message to obtain the first recognition result, and The first identification result is inserted into the identification function network element 90, the header extension field of the received next data message, and the next data message belongs to the IP network stream.
  • the first identification unit 92 when the first identification unit 92 does not complete the identification, the corresponding response message is identified, and the recognition result is spread by the header extension field of the message.
  • the sixth processing unit 97 may include:
  • a first configuration subunit 971 configured to configure a third reverse identification result carrying flag in the local flow table of the identification function network element 90, so that the identification function network element 90 is configured according to the third reverse identification A result of determining whether the first recognition result is inserted in a header extension field of the next data message, and for using the third object when the second identification unit 96 successfully identifies the response message Set the flag to the recognition result to be true;
  • a second configuration sub-unit 972 configured to: when the seventh receiving unit receives the next data packet, determine that the third reverse recognition result carrying flag is true, insert the first identification result The header extension field of the next data packet sets the third reverse identification result carrying flag to false, and then invokes the seventh sending unit described below.
  • the identification function network element 90 further includes:
  • a sixth sending unit configured to go to the second downstream after the first configuration sub-module 971 completes the configuration
  • the device forwards the response packet, or inserts the first identification result into a header extension field of the response packet, and then sends the result to the second downstream device;
  • a seventh receiving unit configured to receive the next data packet
  • a seventh sending unit configured to determine, according to the service configuration, that the next data packet carrying the first identification result is not discarded, and then send the next data packet to the first downstream device.
  • the functions of the seventh receiving unit and the seventh transmitting unit may also be implemented by the first receiving unit 91 and the first transmitting unit 94, respectively.
  • the identification function network element 90 can identify the response message received later when the current data message cannot be identified, and spread the successfully identified first recognition result to the other device through the header extension field of the message. . Reduces the delay caused by DPI services in the overall network.
  • FIG. 10 is a schematic structural diagram of an identification function network element according to an embodiment of the present invention.
  • the identification function network element 100 may include:
  • the second receiving unit 101 is configured to receive a response message after the first sending unit 94 sends the data packet carrying the second identification result and the first packet identifier to the first downstream device, where The response packet is sent by the first downstream device to the identification function network element 100, where the response message carries a response message, and the header extension field of the response message carries the first identification result.
  • the response message is generated by the server or the user equipment after receiving the data message, and the response message is used to notify the identification function network element of the first identification result.
  • the header extension field of the response packet further carries a second identification status code, and is used to indicate to the identification function network element 100 that the response message carries the first identification result.
  • the second processing unit 102 is configured to parse the response message to save the first identification result to the local flow table, and then delete the first identification result carried by the response message.
  • the second sending unit 103 is configured to send, to the second downstream device, the response that is processed by the second processing unit.
  • the first receiving unit 92 does not complete the identification of the data packet, and the first processing unit 93 does not complete the identification of the data packet.
  • the first processing unit 93 does not complete the identification of the data packet.
  • the second recognition result and the identification first packet tag are inserted into a header extension field of the data message.
  • the network element 100 may identify the first packet identifier and the first The second recognition result inserts a header extension field of the received data message (belonging to the IP network stream) to request the first recognition result from the device that saves the first recognition result, without re-identifying the text, avoiding The IP network flow that completes the interaction between some data may not be able to complete the identification problem.
  • FIG. 11 is a schematic structural diagram of an identification function network element according to an embodiment of the present invention.
  • the identification function network element 110 may include:
  • a first configuration unit 111 configured to configure a first reverse recognition result carrying flag in the local flow table, and when the first identifying unit successfully identifies the data packet, the first reverse identification The result carrying flag is set to true; when the third processing unit 113 completes the message processing, the first reverse recognition result carrying flag is set to false; the first reverse recognition result carrying flag is used to indicate whether Inserting, by the header extension field of the received response message, the first identification result, where the response report
  • the file is generated by the server or the user equipment after receiving the data packet, and is forwarded by the first downstream device to the identification function network element;
  • the third receiving unit 112 is configured to: after the first sending unit 94 sends the data packet carrying the first identification result to the first downstream device, receive the response message;
  • the third processing unit 113 is configured to: when the third receiving unit 112 receives the response message, determine whether the first reverse recognition result carries a flag is true, and if yes: the first The recognition result is inserted into a header extension field of the response message, or the first identification result and the fourth identification status code are inserted into a header extension field of the response message, and the fourth identification status code is used to The second downstream device indicates that the response packet carries the first identification result;
  • a third sending unit 114 configured to send, by the second processing unit, the third processing unit
  • the first identifying unit 92 completes the identification of the data message.
  • FIG. 12 is a schematic structural diagram of an identification function network element according to an embodiment of the present invention.
  • the identification function network element 120 may include:
  • the second configuration unit 121 is configured to configure a second reverse identification result carrying flag in the local flow table, and when the fourth receiving unit receives the response message, carry the second reverse identification result carrying flag True, the second reverse identification result carrying flag is used to indicate whether the identification function network element 120 inserts the first identification result in a header extension field of a next data message received by the identification function network element. And, when the fourth receiving unit 122 receives the response message, the second reverse recognition result carrying flag is set to true, and the fifth processing unit 126 completes the next number in the following According to the processing of the message, the second reverse identification result carrying flag is set to false, and the next data message is received by the identification function network element after receiving the data message. a data message, and the next data message belongs to the network stream;
  • the fourth receiving unit 122 is configured to: after the first sending unit 94 sends the data packet carrying the first identification result to the first downstream device, receive the response packet, and the response packet And being sent by the first downstream device to the identification function network element 120, where the response message carries a response message, and the header extension field of the response message carries the identification result request information, where the response message is sent by the server. Or the user equipment is generated after receiving the data packet or the subsequent data packet of the IP network flow, where the identification result request information is used to request the first recognition result from the identification function network element 120;
  • the fourth processing unit 123 is configured to delete the identification result request information carried in the response packet
  • the fourth sending unit 124 is configured to send, to the second downstream device, the response processed by the fourth processing unit 123;
  • the fifth receiving unit 125 is configured to receive the next data packet, where the next data packet is the next data packet received by the identifying function network element after receiving the data packet, And the next data packet belongs to the network flow;
  • the fifth processing unit 126 is configured to determine whether the second reverse recognition result carrying flag is true, and if yes, insert the first identification result into a header extension field of the next data packet;
  • the sending unit 127 is configured to send, to the first downstream device, when the next data packet carrying the first identification result is not discarded according to the service configuration.
  • the functions of the fifth receiving unit 125 and the fifth sending unit 127 may also pass respectively.
  • the first receiving unit 91 and the first transmitting unit 94 are implemented.
  • FIG. 13A is a schematic structural diagram of a diffusion network element according to an embodiment of the present invention.
  • the diffusion network element 130 includes:
  • the first receiving unit 131 is configured to receive a data packet in an IP network stream.
  • the first parsing unit 132 is configured to parse a header extension field of the data packet to determine insertion information carried by a header extension field of the data packet.
  • the first processing unit 133 is configured to perform local flow table management of the diffusion network element 130 according to the insertion information.
  • the first sending unit 134 configured to determine, according to the service configuration, that the data packet is not to be discarded, performing packet forwarding processing, including: sending the data packet to the first downstream device, so that the first downstream device is configured according to the The information is inserted into the flow table management, or the insertion information carried in the data packet is deleted and sent to the first downstream device.
  • the diffusion network element 130 provided in this embodiment can parse the header extension field of the data packet, and then perform corresponding processing according to the insertion information to acquire or spread the recognition result information.
  • the first processing unit 133 includes: a first processing sub-unit 1331, and/or a second processing sub-unit 1332, and/or a third processing sub-unit 1333.
  • the first processing sub-unit 1331 is configured to save the first recognition result to the local stream when the insertion information includes a first recognition result, or when the first recognition result and the first identification status code are included table.
  • a second processing sub-unit 1332 configured to create or refresh the local flow table without saving the information when the insertion information includes a second recognition result, or when the second identification result and the first identification status code are included The second recognition result.
  • the third processing sub-unit 1333 is configured to create or refresh the local flow table when the insertion information includes the recognition result request information, or the identification result request information and the third identification status code are included.
  • the first recognition result is a recognition result when the data packet successfully completes the deep packet detection and identification
  • the second identification result is an initial recognition result when the diffusion network element 130 creates the local flow table.
  • the first identification status code is used to indicate to the diffusion network element 130 that the data message carries the first identification result or the second identification result, where the third identification status code is used for the second downstream
  • the device indicates that the data packet carries the identification result request information, and the identification result request information is used to request the first identification result from the second downstream device.
  • the insertion information when the insertion information includes the first identification result or the second identification result, the insertion information further includes: identifying a first packet identifier, and identifying the first depth in the IP network flow The message detects the identified data message.
  • the diffusion network element 130 provided in this embodiment does not need to identify the data packet, and only needs to parse the header extension field of the data packet, so as to obtain or spread the recognition result according to the insertion information carried in the data packet, thereby reducing the existing
  • the delay of the network for DPI services reduces maintenance costs.
  • At least one identification function network element 90 (or identification function network element 90) and at least one diffusion network element 130 may constitute a recognition result diffusion system for performing DPI services.
  • the identification function network element 90 performs message identification, and uses the header extension field of the message to spread the recognition result to the diffusion network element 130, thereby reducing the delay of the existing network for performing DPI service, and reducing Maintenance costs.
  • FIG. 14 is a schematic structural diagram of a diffusion network element according to an embodiment of the present invention.
  • the spatial network element 140 includes: a first receiving unit 131, a first parsing unit 132, a first processing unit 133, a first transmitting unit 134, and: a second receiving unit 141, a second processing unit 142, and a second transmitting unit 143. among them,
  • the first processing unit 133 further includes a first configuration subunit 1334, configured to configure a fourth reverse identification result carrying flag in the local flow table, so that the diffusion network element 140 is identified according to the fourth reverse a result carrying a flag determining whether to notify the second downstream device of the first recognition result; and, for containing the second recognition result and identifying a first packet tag in the insertion information, and saving the local flow table
  • the fourth reverse recognition result carrying flag is set to true, and after the second processing unit 142 completes the message processing, the fourth reverse recognition result carrying flag is set as ⁇ ⁇ .
  • the second receiving unit 141 is configured to: after the packet forwarding process is performed by the first sending unit 134, receive a response packet, where the response packet is generated by the server or the user equipment after receiving the data packet, and The first downstream device forwards to the diffusion network element 130.
  • the second processing unit 142 is configured to determine that the fourth reverse recognition result carrying flag is true, and insert the first identification result into a header extension field of the response message.
  • the second processing unit 142 is further configured to: insert the second identification status code into the header of the response message when inserting the first identification result into a header extension field of the response message And an extension field, to indicate to the second downstream device that the response packet carries the first identification result.
  • the second sending unit 143 is configured to send, to the second downstream device, the response packet processed by the second processing unit 142, to notify the second downstream device of the first identification result.
  • the diffusion network element 140 provided in this embodiment can notify the identification function network element of the first identification result when the identification function network element is restarted or failed, thereby preventing the identification function network element from being able to identify the subsequent number. According to the message, the problem of the first recognition result cannot be obtained.
  • FIG. 15 is a schematic structural diagram of the first processing unit in the embodiment shown in FIG. 13B.
  • the first processing unit 150 includes:
  • a first processing sub-unit 1331 a first processing sub-unit 1331, a second processing sub-unit 1332, a third processing sub-unit 1333, a counting sub-unit 1501, and a judging sub-unit 1502, wherein
  • a counting subunit 1501 configured to calculate a recognition result waiting message count, wherein the recognition result waiting message count indicates the number of data messages received by the diffusion network element 130 before acquiring the first identification result;
  • a determining subunit 1502 configured to: if the local flow table does not save the first recognition result, if the insertion information does not include the first recognition result, or the insertion information includes the first Identifying the result but not saving the first identification result to the local flow table, determining whether the recognition result waits for the packet count to exceed a preset threshold, and if so, triggering the diffusion network element 130 to The second downstream device requests the first recognition result.
  • FIG. 16 is a schematic structural diagram of a diffusion network element according to an embodiment of the present invention.
  • the diffusion network element 160 includes: a first receiving unit 131, a first analyzing unit 132, and a first a processing unit 151 and a first transmitting unit 134, and a third receiving unit 161, a third processing unit 162, a third transmitting unit 163, and a fourth receiving unit 164, where
  • the first processing unit 151 includes, in addition to the respective parts of the first processing unit 150, a second configuration subunit, configured to configure a fifth reverse identification result carrying flag in the local flow table, so that the diffusion network element Determining, according to the fifth reverse identification result carrying flag, whether to request the first identification result from the second downstream device; and, configured to: when the recognition result waits for the message count to exceed a preset threshold, The fifth reverse recognition result carrying flag is set to true, in the third processing unit described below After completing the message processing, the fifth reverse recognition result carrying flag is set to false, and the recognition result waits for the message count to be cleared.
  • the third receiving unit 161 is configured to: after the packet forwarding process is performed by the first sending unit 134, receive a response packet, where the response packet is generated by the server or the user equipment after receiving the data packet, and The first downstream device forwards to the diffusion network element 160;
  • the third processing unit 162 is configured to determine that the fifth reverse recognition result carrying flag is true, and insert the identification result request information into a header extension field of the response message;
  • the third sending unit 163 is configured to send, to the second downstream device, the response packet processed by the third processing unit 162, to request the first identification result from the second downstream device, so that the After receiving the response message carrying the identification result request information, the second downstream device, when receiving the next data packet belonging to the IP network flow, is in the header extension field of the next data packet. Inserting the first identification result and then transmitting to the diffusion network element 160;
  • the fourth receiving unit 164 is configured to receive and parse the next data packet, and save the first identification result to the local flow table, so as to obtain the first identification result.
  • the diffusion network element 160 provided in this embodiment can automatically request the first recognition result from the identification function network element if the first recognition result is not obtained when the data packet is received for a predetermined number of times, and the diffusion network element 160 can be avoided.
  • the first recognition result is lost due to a failure or restart or the like.
  • FIG. 17 is a schematic structural diagram of a diffusion network element according to an embodiment of the present invention.
  • the extended network element 170 includes:
  • the receiving unit 171 is configured to receive a response packet, where the response packet is sent by the first downstream device to the diffusion network element 170, where the response packet carries response information and a header extension field of the response packet Carrying insertion information, the response information being received by the server or user equipment in the IP network stream After the data message is generated;
  • the parsing unit 172 is configured to parse a header extension field of the response packet to determine the insertion information carried by a header extension field of the response packet;
  • the processing unit 173 is configured to perform local flow table management of the diffusion network element 170 according to the insertion information.
  • the sending unit 174 is configured to send the response message to the second downstream device, so that the second downstream device performs flow table management according to the insertion information, or deletes the insertion information carried by the response message.
  • the second downstream device sends.
  • the processing unit 173 includes: a processing subunit, configured to: when the insertion information includes the first identification result and the fourth identification status code, Saving the first identification result to the local flow table, where the first identification result is a recognition result when the IP network stream successfully completes the depth text detection and identification, and the fourth identification status code is used for the diffusion
  • the network element 170 indicates that the response message carries the first identification result.
  • the diffusion network element 170 provided in this embodiment can parse the received response message, and save the first identification result carried in the header extension field of the response message to the local flow table to obtain the first identification result.
  • diffusion network element 170 may also have the structure and function of the extended network element shown in FIG. 13 to FIG. 16, which is not described in detail in the present invention.
  • FIG. 18 is a schematic structural diagram of an identification function network element according to an embodiment of the present invention.
  • the identification function network element 180 includes: a receiver 181, a transmitter 182, and a memory 183, and a receiver 181 and a transmitter 182.
  • a processor 184 is connected to the memory 183, respectively. among them,
  • the memory 183 stores various data, programs, and applications for being called by the processor 184 to implement The following features:
  • the processor 184 receives the data message in the IP network stream through the receiver 181;
  • identifying the data packet if the data packet is successfully identified, saving the first recognition result that is obtained to the local flow table of the identification function network element, and inserting the first recognition result into the local a header extension field of the data packet; if the data packet is not recognized, inserting a second identification result into a header extension field of the data packet, where the second identification result is the identification function network element 180 initial value of the recognition result when the local flow table is created;
  • the transmitter 182 transmits a data message carrying the first identification result or the second identification result to the first downstream device.
  • the memory 183 stores the local flow table of the identification function network element 180.
  • the data packet includes: an IPv4 packet or an IPv6 packet.
  • the header extension field is an option field of the IPv4 packet header.
  • the header extension field is an extended header field of the IPv6 packet header.
  • the header extension field of the data packet further includes a first identification status code, configured to indicate, to the first downstream device, that the data packet carries the first identification result or the second identification result .
  • the data packet is the first packet in the IP network stream that enters the identification function network element for identification
  • the header extension field of the data packet is inserted to identify the first packet identifier, and is used to identify the first packet in the IP network stream that enters the identification function network element for identification.
  • the processor 184 is also used to:
  • the receiver 181 Receiving, by the receiver 181, a response message sent by the first downstream device to the identification function network element, where the response message carries a response message and a header extension field of the response message Carrying the first identification result, the response message is generated by the server or the user equipment after receiving the data, and the response is used to notify the identification function of the first recognition result.
  • Network element
  • the response message is parsed to save the first identification result to the local flow table; the first identification result carried in the response message is deleted and sent to the second downstream device.
  • the header extension field of the response packet further includes a second identification status code, and is used to indicate to the identification function network element 180 that the response message carries the first identification result.
  • the local flow table of the identification function network element 180 is configured with a first reverse identification result carrying flag, where the identification function network element 180 is used according to the The first reverse identification result carries a flag to determine whether the first extension result is inserted in a header extension field of the response message received later, and the response message is generated by the server or the user equipment after receiving the data packet. And being forwarded by the first downstream device to the identification function network element 180, where the first reverse identification result carrying flag is set to true when the identification function network element 180 successfully identifies the data message;
  • the processor 184 After transmitting, by the transmitter 182, the data packet carrying the first identification result to the first downstream device, the processor 184 is further configured to:
  • Determining that the first reverse recognition result carrying flag is true inserting the first recognition result into a header extension field of the response message, setting the first reverse recognition result carrying flag to false, and then A response message carrying the first identification result is transmitted by the transmitter 182 to the second downstream device.
  • the fourth identification status code is further inserted into the header extension field of the response message, for The second downstream device indicates that the response packet carries the first identification result.
  • the local flow table of the identification function network element 180 is configured with a second reverse identification result carrying flag, where the identification function network element 180 is used according to the The second reverse identification result carries a flag to determine whether the first identification result is inserted in a header extension field of a next data message received later, the next data message belongs to the IP network stream; 182.
  • the processor 184 is further configured to:
  • the receiver 181 Receiving, by the receiver 181, a response message sent by the first downstream device to the identification function network element, where the response message carries a response message and a header extension field of the response message Carrying the identification result request information, the response message is generated by the server or the user equipment after receiving the data message or the subsequent data message of the IP network flow, and the identification result request information is used for the identification function.
  • the network element 180 requests the first identification result;
  • the identification result request information is deleted, it is sent to the second downstream device by the transmitter 182, where the header extension field of the response message further includes a third identification status code, and is used for the identification function network element. 180 indicating that the response message carries the identification result request information;
  • the first downstream device is described.
  • the processor 184 is further configured to:
  • the response message is generated by the server or the user equipment after receiving the data message, and is forwarded by the first downstream device to the identification function network element 180;
  • the local flow table of the identification function network element 180 is provided with a third reverse identification result carrying flag, and the identification function network element 180 determines whether the location is in accordance with the third reverse recognition result.
  • the header extension field of the next data packet is inserted into the first identification result; the processor 184 inserts the first identification result into the header extension of the next data packet received by the identification function network element by: Field:
  • the processor 184 When the processor 184 successfully identifies the response message, the third reverse identification result carrying flag is set to true;
  • the fourth identification status code is further inserted into the header extension field of the response message, and used to The second downstream device indicates that the response packet carries the first identification result;
  • the receiver 181 Receiving, by the receiver 181, the next data packet, determining that the third reverse recognition result carrying flag is true, inserting the first identification result into a header extension field of the next data packet, The third reverse identification result carrying flag is set to false, and when it is determined according to the service configuration that the next data message carrying the first identification result does not need to be discarded, it is sent to the The first downstream device.
  • FIG. 19 is a schematic structural diagram of an identification function network element according to an embodiment of the present invention.
  • the identification function network element 190 includes: a receiver 191, a transmitter 192, and a memory 193, and a receiver 191 and a transmitter 192.
  • a processor 194 is connected to the memory 193, respectively. among them,
  • the memory 193 stores various data, programs, and applications for being called by the processor 194 to implement the following functions:
  • the processor 194 receives the data message in the IP network stream through the receiver 191;
  • the packet forwarding process is performed when the data packet is not required to be discarded according to the service configuration, including: sending, by the transmitter 192, the data packet to the first downstream device, so that the first downstream device performs the insertion information according to the insertion information. After the flow table is managed, or the insertion information carried in the data packet is deleted, the data packet not carrying the insertion information is sent by the transmitter 192 to the first downstream device. Text.
  • the memory 193 stores a local flow table of the diffusion network element 190.
  • the data packet includes: an IPv4 packet or an IPv6 packet.
  • the header extension field is an option field of the IPv4 packet header.
  • the header extension field is an extension header field of the IPv6 packet header.
  • the processor 194 performs local flow table management of the diffusion network element according to the insertion information, including:
  • the insertion information includes a first recognition result, or includes the first recognition result and the first identification status code, saving the first recognition result to the local flow table;
  • the insertion information includes a second recognition result, or includes the second recognition result and the first identification status code, creating or refreshing the local flow table without saving the second recognition result;
  • the first identification result is a recognition result when the data packet successfully completes the deep packet detection and identification
  • the second identification result is an initial identification result when the diffusion network element 190 creates the local flow table.
  • the first identification status code is used to indicate to the diffusion network element 190 that the data message carries the first identification result or the second identification result
  • the third identification status code is used to go to the second downstream
  • the device indicates that the data packet carries the identification result request information, and the identification result request information is used to request the first identification result from the second downstream device.
  • the insertion information when the insertion information includes the first identification result or the second identification result, the insertion information further includes: identifying a first packet identifier, configured to identify the first one of the IP network flows. Deep packet detection identifies the data packet.
  • processor 194 is further configured to:
  • the response packet is received by the receiver 191, and the response packet is generated by the server or the user equipment after receiving the data packet, and is forwarded by the first downstream device to the diffusion.
  • Network element 190
  • the fourth reverse recognition result carrying flag Determining that the fourth reverse recognition result carrying flag is true, inserting the first identification result into a header extension field of the response message, and setting the fourth reverse recognition result carrying flag to false;
  • the second identification status code is also inserted into the header extension field of the response message to the second downstream The device indicates that the response message carries the first identification result;
  • the processor 194 is further configured to: set a calculation and a recognition result waiting packet count in the local flow table, and use the calculation to obtain the diffusion network element. The number of data messages received before the first recognition result;
  • the local flow table does not save the first recognition result, if the insertion information If the first recognition result is not included, or the insertion information includes the first recognition result but the first recognition result is not saved to the local flow table, determining whether the recognition result waits for the message count Exceeding the preset threshold, if yes, requesting the first identification result from the second downstream device.
  • processor 194 is further configured to:
  • the 190 determines, according to the fifth reverse identification result carrying flag, whether to request the first identification result from the second downstream device, and when determining that the recognition result waits for the message count to exceed a preset threshold, Five reverse recognition result carrying flag is set to true;
  • the processor 194 is further configured to:
  • the response message is generated by the server or the user equipment after receiving the data message, and is forwarded by the first downstream device to the diffusion network element 190;
  • the next data packet is received by the receiver 191 and parsed, and the first identification result is saved to the local flow table to obtain the first recognition result.
  • the processor 194 is further configured to: Receiving a response message by the receiver 191, the response message is sent by the first downstream device to the diffusion network element, the response message carries the response information, and the header extension field of the response message carries the insertion Information, the response information is generated by the server or the user equipment after receiving the data in the IP network stream;
  • the machine 192 sends a response message that does not carry the insertion information to the second downstream device.
  • the processor 194 is further configured to: save the first identification result to the local flow table, where The first identification result is a recognition result when the IP network stream successfully completes the deep packet detection and identification, and the fourth identification status code is used to indicate to the diffusion network element 190 that the response message carries the first Identify the results.
  • the processor is further configured to:
  • the received response message is forwarded to the second downstream device by the transmitter 192.
  • An embodiment of the present invention further provides a recognition result diffusion system, including the FIGS. 9A to 12 Any one of the embodiments is described as a function network element and any one of the diffusion network elements of the embodiment shown in FIGS. 13A to 16.
  • An embodiment of the present invention further provides a recognition result diffusion system, including any one of the identification function network elements in the embodiment shown in FIG. 9A to FIG. 12, and any one of the embodiments shown in FIG. 13A to FIG.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Abstract

本发明实施例公开了一种深度报文检测结果扩散方法,本发明实施例还公开了一种识别功能网元和扩散网元。其中所述方法包括:识别功能网元接收IP网络流中的数据报文;对数据报文进行识别,如果识别成功,则将识别得到的第一识别结果保存至识别功能网元的本地流表,并将第一识别结果插入数据报文的头部扩展字段;如果无法识别,则将第二识别结果插入数据报文的头部扩展字段,第二识别结果为识别功能网元创建本地流表时的识别结果初始值;当根据业务配置确定无需丢弃数据报文时,向第一下游设备发送携带有第一识别结果或第二识别结果的数据报文。采用本发明,无需所有网元均进行DPI业务识别,降低了整体网络执行DPI的时延,降低了维护成本。

Description

深度^ L检测结果扩散方法及装置
技术领域
本发明涉及通信领域, 尤其涉及一种深度报文检测结果扩散方法及装置。 背景技术
深度报文检测 (英文全称为 Deep Packet Inspection, 筒称为 DPI )技术能 够识别出 IP网络流的具体 7层协议、 应用等, 例如: 可以识别出当前网络流 为 edonkey (电驴) , 且属于 P2P类的应用。 DPI主要用于加强现有网络流量 的精细化运营,运营商可以基于相关数据做协议软件使用情况分析、流量优化、 安全管理、 内容计费等业务, 为达到这一目的, 运营商会在网络上各网元部署 DPI功能, 形成识别功能网元, 而识别功能网元的 DPI功能主要包括协议应用 识别能力, 报文解析能力。
现有技术中, 在网络中的每一个做 DPI 业务的网元均部署有识别功能模 块。 IP 网络流中的数据报文需要在网络中的每个网元完成识别, 然后网元在 本机内部返回识别结果并基于识别结果进行后续相关业务处理,这就导致整体 网络执行 DPI业务的时延较大。 发明内容
本发明实施例所要解决的技术问题在于,提供一种深度报文检测结果扩散 方法及装置, 以降低整体网络中执行 DPI业务的时延。
为了解决上述技术问题, 第一方面, 本发明实施例提供了一种深度报文检 测 (DPI )识别结果扩散方法, 包括: 识别功能网元接收网络流中的数据报文;
对所述数据报文进行 DPI识别,如果成功识别所述数据报文,则将识别得 到的第一识别结果保存至所述识别功能网元的本地流表,并将所述第一识别结 果插入所述数据报文的头部扩展字段; 如果无法识别所述数据报文, 则将第二 识别结果插入所述数据报文的头部扩展字段,所述第二识别结果为所述识别功 能网元创建所述本地流表时的识别结果初始值;
向第一下游设备发送携带有所述第一识别结果或所述第二识别结果的所 述数据报文。
在第一方面的第一种可能的实现方式中, 所述数据报文为 IPv4报文或 IPv6报文; 当所述数据报文为 IPv4报文时, 所述将所述第一识别结果插入所 述数据报文的头部扩展字段, 包括: 将所述第一识别结果插入所述数据报文头 部的选项字段; 当所述数据报文为 IPv6报文时, 所述将所述第一识别结果插 入所述数据报文的头部扩展字段, 包括: 将所述第一识别结果插入所述数据报 文的扩展头部字段。
结合第一方面或第一方面的第一种可能的实现方式,在第二种可能的实现 方式中, 所述数据报文的头部扩展字段还包含第一识别状态码, 用于向所述第 一下游设备指示所述数据报文是否携带有所述第一识别结果或第二识别结果。
结合第一方面或第一方面的第一种可能的实现方式,在第三种可能的实现 方式中,当所述数据报文是所述网络流中第一个进入所述识别功能网元进行识 别的数据包时,则在将所述第二识别结果插入所述数据报文的头部扩展字段之 后, 所述方法还包括:
在所述数据报文的头部扩展字段插入识别首包标记,以使所述第一下游设 备在接收到携带有首包标记的所述数据报文后,向所述识别功能网元发送携带 有所述第一识别结果的响应报文;所述响应报文还包含有服务器或用户设备在 接收到所述数据报文后生成响应消息;所述首包标记用于标识所述网络流中第 一个进入所述识别功能网元进行识别的数据包。
接收并解析所述响应报文,得到所述第一识别结果, 并将所述第一识别结 果保存至所述本地流表;
将所述响应报文携带的所述第一识别结果删除后向第二下游设备发送。 结合所述第一方面,或所述第一方面的第一、二或第三种可能的实现方式, 还提供了所述第一方面的第四种可能的实现方式:所述本地流表中设置有第一 反向识别结果携带标记,用于指示是否在接收到的响应报文的头部扩展字段插 入所述第一识别结果;所述第一反向识别结果携带标记在所述识别功能网元成 功识别所述数据报文时置为真;
在向所述第一下游设备发送携带有所述第一识别结果的数据报文之后,所 述方法还包括:
接收所述服务器或用户设备在接收到所述数据报文之后发出的响应报文; 所述响应_¾文由所述第一下游设备转发至所述识别功能网元;
判断所述第一反向识别结果携带标记是否为真,如果是, 则将所述第一识 别结果插入所述响应报文的头部扩展字段,并将所述第一反向识别结果携带标 记置为假, 然后向第二下游设备发送携带有所述第一识别结果的响应报文。 结合所述第一方面,或所述第一方面的第一、二或第三种可能的实现方式, 还提供了所述第一方面的第五种可能的实现方式: 所述本地流表中设置有第二反向识别结果携带标记,用于指示所述识别功 能网元是否在接收到所述数据报文之后接收的下一个数据报文的头部扩展字 段插入所述第一识别结果, 所述下一个数据报文属于所述网络流;
在向所述第一下游设备发送携带有所述第一识别结果的数据报文后,所述 方法还包括:
接收响应报文,所述响应报文由所述第一下游设备发送至所述识别功能网 元,所述响应报文携带有响应消息并且所述响应报文的头部扩展字段携带有识 别结果请求信息,所述响应消息由服务器或用户设备在接收所述数据报文后生 成, 所述识别结果请求信息用于向所述识别功能网元请求所述第一识别结果; 解析所述响应报文,将所述第二反向识别结果携带标记置为真,将所述响 应报文携带的所述识别结果请求信息删除后向第二下游设备发送, 其中, 所述 响应报文的头部扩展字段还包含第三识别状态码,用于向所述识别功能网元指 示所述响应报文携带有所述识别结果请求信息;
接收所述网络流中的下一个数据报文,判断所述第二反向识别结果携带标 记是否为真, 如果是, 则将所述第二反向识别结果携带标记置为假, 并将所述 第一识别结果插入所述下一个数据报文的头部扩展字段,然后将所述下一个数 据报文发送至所述第一下游设备。
结合所述第一方面,或所述第一方面的第一、二或第三种可能的实现方式, 还提供了所述第一方面的第六种可能的实现方式:
如果无法识别所述数据报文,则在向所述第一下游设备发送携带有所述第 二识别结果的数据报文之后, 所述方法还包括:
接收响应报文,所述响应报文由服务器或用户设备在接收所述数据报文后 生成, 并由所述第一下游设备转发至所述识别功能网元;
对所述响应报文进行识别,得到所述第一识别结果,将所述第一识别结果 保存至所述本地流表,并将所述第一识别结果插入所述识别功能网元接收的下 一个数据报文的头部扩展字段, 所述下一个数据报文属于所述网络流。 第二方面, 提供一种识别功能网元, 包括:
第一接收单元, 用于接收网络流中的数据报文;
第一识别单元, 用于对所述数据报文进行深度报文检测 (DPI )识别; 第一处理单元, 用于在所述第一识别单元成功识别所述数据报文时,将识 别得到的第一识别结果保存至所述识别功能网元的本地流表,并将所述第一识 别结果插入所述数据报文的头部扩展字段;在所述第一识别单元无法识别所述 数据报文时,将第二识别结果插入所述数据报文的头部扩展字段, 所述第二识 别结果为所述识别功能网元创建所述本地流表时的识别结果初始值;
第一发送单元,用于向第一下游设备发送携带有所述第一识别结果或所述 第二识别结果的所述数据报文。
在第二方面的第一种可能的实现方式中,所述第一处理单元还用于在所述 数据报文的头部扩展字段插入第一识别状态码,用于向所述第一下游设备指示 所述数据报文携带有所述第一识别结果或第二识别结果。
结合第二方面, 或第二方面的第一种可能的实现方式,在第二种可能的实 现方式中,如果所述数据报文是所述识别功能网元接收到的所述网络流中的第 一个数据包, 则所述第一处理单元还用于,在将所述第二识别结果插入所述数 据报文的头部扩展字段之后,在所述数据报文的头部扩展字段插入识别首包标 记, 以使所述第一下游设备在接收到携带有首包标记的所述数据报文后, 向所 述识别功能网元发送携带有所述第一识别结果的响应报文;所述响应报文还包 含有服务器或用户设备在接收到所述数据报文后生成响应消息;所述首包标记 用于标识所述网络流中第一个进入所述识别功能网元进行识别的数据包。
结合第一方面的第二种可能的实现方式,在第三种可能的实现方式中, 所 述网元还包括:
第二接收单元,用于在所述第一发送单元向所述第一下游设备发送携带有 所述第二识别结果和识别首包标记的数据报文之后,接收响应报文, 所述响应 报文携带有响应消息并且所述响应报文的头部扩展字段携带有所述第一识别 结果, 所述响应消息由服务器或用户设备在接收到所述数据报文后生成; 第二处理单元,用于解析所述响应报文以将所述第一识别结果保存至所述 本地流表, 然后将所述响应报文携带的所述第一识别结果删除;
第二发送单元,用于向第二下游设备发送所述第二处理单元处理后的响应 报文。
结合第二方面, 或第二方面的第一种可能的实现方式,在第四种可能的实 现方式中, 所述网元还包括:
第一配置单元, 用于在所述本地流表中配置第一反向识别结果携带标记, 并在所述第一识别单元成功识别所述数据报文时,将所述第一反向识别结果携 带标记置为真;所述第一反向识别结果携带标记用于指示是否在接收到的响应 报文的头部扩展字段插入所述第一识别结果, 其中, 所述响应报文由服务器或 用户设备在接收所述数据报文后生成,并由所述第一下游设备转发至所述识别 功能网元; 第三接收单元,用于在所述第一发送单元向所述第一下游设备发送携带有 所述第一识别结果的数据报文后, 接收所述响应报文;
第三处理单元, 用于在所述第三接收单元接收到所述响应报文时, 判断所 述第一反向识别结果携带标记是否为真,如果是, 则将所述第一识别结果插入 所述响应报文的头部扩展字段, 并将所述第一反向识别结果携带标记置为假; 第三发送单元,用于向所述第二下游设备发送插入所述第一识别结果后的 所述响应 4艮文。
结合第二方面, 或第二方面的第一种可能的实现方式,在第五种可能的实 现方式中, 所述网元还包括:
第二配置单元, 用于在所述本地流表中配置第二反向识别结果携带标记, 并在第四接收单元接收到响应报文时,将所述第二反向识别结果携带标记置为 真;所述第二反向识别结果携带标记用于指示是否在所述识别功能网元接收的 下一个数据报文的头部扩展字段插入所述第一识别结果;
第四接收单元,用于在所述第一发送单元向所述第一下游设备发送携带有 所述第一识别结果的数据报文后,接收响应报文, 所述响应报文由所述第一下 游设备发送至所述识别功能网元,所述响应报文携带有响应消息并且所述响应 报文的头部扩展字段携带有识别结果请求信息,所述响应消息由服务器或用户 设备在接收所述数据报文或所述网络流的其他数据报文后生成,所述识别结果 请求信息用于向所述识别功能网元请求所述第一识别结果;
第四处理单元, 用于将所述响应报文携带的所述识别结果请求信息删除; 第四发送单元,用于向第二下游设备发送删除识别结果请求信息后的所述 响应 4艮文; 第五接收单元, 用于接收下一个数据报文; 所述下一个数据报文是所述识 别功能网元在接收到所述数据报文之后,接收到的下一个数据报文,且所述下 一个数据报文属于所述网络流;
第五处理单元, 用于判断所述第二反向识别结果携带标记是否为真,如果 是则将所述第一识别结果插入所述下一个数据报文的头部扩展字段;
第五发送单元,用于将携带有所述第一识别结果的所述下一个数据报文发 送至所述第一下游设备。
结合第二方面, 或第二方面的第一种可能的实现方式,在第六种可能的实 现方式中, 所述网元还包括:
第六接收单元,用于在所述第一发送单元向所述第一下游设备发送携带有 所述第二识别结果的数据报文后,接收响应报文, 所述响应报文由服务器或用 户设备在接收所述数据报文后生成,并由所述第一下游设备转发至所述识别功 能网元;
第二识别单元, 用于对所述响应报文进行识别;
第六处理单元,用于在所述第二识别单元成功识别所述响应报文后获取第 一识别结果,将所述第一识别结果保存至所述本地流表, 并将所述第一识别结 果插入所述识别功能网元接收的下一个数据报文的头部扩展字段,所述下一个 数据报文属于所述网络流。
实施本发明实施例, 具有如下有益效果:
1 )识别功能网元对接收到的报文进行业务识别并将识别结果插入报文的 头部扩展字段进行发送, 从而使其他网元无需进行报文识别即可获取识别结 果, 降低了整体网络进行 DPI的时延; 2 ) 由于仅识别功能网元对报文进行识别, 识别数据库的更新只涉及识别 功能网元, 降低了维护成本;
3 ) 当识别功能网元或扩散网元的本地流表保存的第一识别结果消失(例 如, 网元重启或故障造成原来保存的所述第一识别结果消失)时, 可以在报文 中插入相应信息以向相应网元请求第一识别结果, 无需再次进行识别,避免了 再次进行识别可能出现的无法完成识别的现象。
附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作筒单地介绍,显而易见地, 下面描述 中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付 出创造性劳动性的前提下, 还可以根据这些附图获得其他的附图。
图 1 是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图;
图 2是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图;
图 3 是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图;
图 4是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图;
图 5 是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图;
图 6是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图;
图 7是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图;
图 8A是根据本发明一种实施例的 IPv4报文头部的选项字段的格式示意 图;
图 8B是根据本发明一种实施例的 IPv6报文头部的扩展报头字段的格式示 意图;
图 9A是根据本发明一种实施例的识别功能网元的结构示意图; 图 9B是根据本发明一种实施例的识别功能网元的结构示意图; 图 9C是根据本发明一种实施例的识别功能网元的结构示意图; 图 10是根据本发明一种实施例的识别功能网元的结构示意图; 图 11是根据本发明一种实施例的识别功能网元的结构示意图; 图 12是根据本发明一种实施例的识别功能网元的结构示意图; 图 13A是根据本发明一种实施例的扩散网元结构示意图;
图 13B是根据本发明一种实施例的扩散网元的第一处理单元的结构示意 图;
图 14是根据本发明一种实施例的扩散网元及其第一处理单元的结构示意 图;
图 15是图 13B所示实施例中的第一处理单元的另一种结构示意图; 图 16是根据本发明一种实施例的扩散网元的结构示意图;
图 17是根据本发明一种实施例的扩散网元的结构示意图;
图 18是根据本发明一种实施例的识别功能网元的结构示意图; 图 19是根据本发明一种实施例的扩散网元的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是 全部的实施例。基于本发明中的实施例, 本领域普通技术人员在没有作出创造 性劳动前提下所获得的所有其他实施例, 都属于本发明保护的范围。 图 1 是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图, 参照图 1 , 该方法包括: 100: 识别功能网元接收网络流中的数据报文。
102: 对所述数据报文进行识别, 如果成功识别所述数据报文, 则将识别 得到的第一识别结果保存至所述识别功能网元的本地流表,并将所述第一识别 结果插入所述数据报文的头部扩展字段; 如果无法识别所述数据报文, 则将第 二识别结果插入所述数据报文的头部扩展字段,所述第二识别结果为所述识别 功能网元创建所述本地流表时的识别结果初始值。
104: 向第一下游设备发送携带有所述第一识别结果或第二识别结果的数 据报文。
可选的, 在本实施例的一种实现方式中, 所述的网络流具体可以为 IP网 络流, 所述数据报文包括: IPv4报文或 IPv6报文。 当所述数据报文为 IPv4报 文时, 所述头部扩展字段为所述 IPv4报文头部的选项字段, 当所述数据报文 为 IPv6报文时, 所述头部扩展字段为所述 IPv6报文头部的扩展报头字段。
可选的,在本实施例的一种实现方式中, 所述数据报文的头部扩展字段还 包含第一识别状态码,用于向所述第一下游设备指示所述数据报文携带有所述 第一识别结果或第二识别结果。
其中,在 102中,每一次将识别结果信息插入所述数据报文的头部扩展字 段后, 调整 IP报文头长度、 IP报文长度以及校验和(下文筒称为 "做适应性 调整" ) 。
本实施例仅由识别功能网元对数据报文进行识别,并将识别结果信息插入 数据报文的头部扩展字段以进行转发,无需在网络中的所有网元均进行业务识 另1 J , 降低了整体网络中 DPI业务导致的时延。 此外, 由于仅需要识别功能网元 对报文进行识别, 识别数据库的更新只涉及识别功能网元, 降低了维护成本。 可选的, 在本实施例的一种实现方式中, 如果所述数据报文是所述 IP网 络流中第一个进入所述识别功能网元进行识别的数据包,则在成功识别或无法 识别所述数据报文时, 还在所述数据报文的头部扩展字段插入识别首包标记, 用于标识所述 IP网络流中第一个进入所述识别功能网元进行识别的数据包。 示例性的,如下情况的数据报文可以插入所述识别首包标记: 识别功能网元第 一次接收到的属于所述 IP网络流的数据报文; 或, 识别功能网元由于重启或 故障导致本地流表不再保存有对所述 IP网络流的第一识别结果, 之后首次接 收到的属于所述 IP网络流的数据报文。
进一步可选的,包含所述第二识别结果和识别首包标记的数据报文可以用 于向扩散网元(所述扩散网元可以是所述第一下游设备,也可以是所述第一下 游设备的下游设备)请求所述第一识别结果。 例如, 在扩散网元的本地流表中 保存有所述第一识别结果的情况下,如果所述识别功能网元无法识别所述数据 报文,则在向所述第一下游设备发送携带有所述第二识别结果和识别首包标记 的数据报文之后, 所述方法还包括以下步骤:
a: 接收响应^艮文, 所述响应^艮文由所述第一下游设备发送至所述识别功 能网元,所述响应报文携带有响应消息并且所述响应报文的头部扩展字段携带 有所述第一识别结果,所述响应消息由服务器或用户设备在接收到所述数据报 文后生成, 所述响应^¾文用于将所述第一识别结果通知所述识别功能网元; b: 解析所述响应报文以将所述第一识别结果保存至所述本地流表; c: 将所述响 应报文携带的所述第一识别结果删除后向第二下游设备发送。 其中, 可选的, 所述响应报文的头部扩展字段中还包含第二识别状态码,用于向所述识别功能 网元指示所述响应报文携带有所述第一识别结果。 在本实现方式中,如果所述识别功能网元由于重启或故障导致其原本保存 的第一识别结果消失, 可以不对接收到的所述数据报文进行识别(或者, 可以 在无法识别所述数据报文的情况下), 而从保存有所述第一识别结果的扩散网 元获取所述第一识别结果,保证了所述识别功能网元能够获取所述第一识别结 果。
可选的,在本实施例的一种实现方式中, 所述本地流表中设置有第一反向 识别结果携带标记,用于指示所述识别功能网元是否在之后接收到的响应报文 的头部扩展字段插入所述第一识别结果,所述响应报文由服务器或用户设备在 接收所述数据报文后生成, 并由所述第一下游设备转发至所述识别功能网元, 所述第一反向识别结果携带标记在所述识别功能网元成功识别所述数据报文 时置为真;在向所述第一下游设备发送携带有所述第一识别结果的数据报文之 后, 所述方法还包括以下步骤:
a: 接收所述响应报文; b: 判断所述第一反向识别结果携带标记是否为真, 如果是, 则将所述第一识别结果插入所述响应报文的头部扩展字段,将所述第 一反向识别结果携带标记置为假,然后向第二下游设备发送携带有所述第一识 别结果的响应报文。 其中, 可选的, 在将所述第一识别结果插入所述响应报文 的头部扩展字段时, 还将第四识别状态码插入所述响应报文的头部扩展字段, 用于向所述第二下游设备指示所述响应报文携带所述第一识别结果。
可选的,在本实施例的一种实现方式中, 所述本地流表中设置有第二反向 识别结果携带标记,用于指示所述识别功能网元是否在接收到所述数据报文之 后接收的下一个数据报文的头部扩展字段插入所述第一识别结果,所述下一个 数据报文属于所述 IP网络流; 在向所述第一下游设备发送携带有所述第一识 别结果的数据报文后, 所述方法还包括以下步骤:
a: 接收响应报文, 所述响应报文由所述第一下游设备发送至所述识别功 能网元,所述响应报文携带有响应消息并且所述响应报文的头部扩展字段携带 有识别结果请求信息,所述响应消息由服务器或用户设备在接收所述数据报文 或所述 IP网络流的后续数据报文后生成, 所述识别结果请求信息用于向所述 识别功能网元请求所述第一识别结果; b:解析所述响应报文, 发现所述响应报 文的头部扩展字段携带有所述识别结果请求信息,则将所述第二反向识别结果 携带标记置为真,将所述响应报文携带的所述识别结果请求信息删除后向第二 下游设备发送, 其中, 所述响应报文的头部扩展字段还包含第三识别状态码, 用于向所述识别功能网元指示所述响应报文携带有所述识别结果请求信息; c: 接收所述网络流中的下一个数据报文,判断所述第二反向识别结果携带标记是 否为真, 如果是, 则将所述第二反向识别结果携带标记置为假, 将所述第一识 别结果插入所述下一个数据报文的头部扩展字段,然后在根据业务配置确定无 需丢弃携带有所述第一识别结果的所述下一个数据报文时,将其发送至所述第 一下游设备。
可选的, 在本实施例的一种实现方式中, 如果无法识别所述数据报文, 则 在向所述第一下游设备发送携带有所述第二识别结果的数据报文之后,所述方 法还包括以下步骤:
a: 接收响应报文, 所述响应报文由服务器或用户设备在接收所述数据报 文后生成, 并由所述第一下游设备转发至所述识别功能网元; b:对所述响应报 文进行识别; c: 如果成功识别所述响应^艮文从而获取所述第一识别结果, 则 将所述第一识别结果保存至所述本地流表,并将所述第一识别结果插入所述识 别功能网元接收的下一个数据报文的头部扩展字段,所述下一个数据报文属于 所述 IP网络流; d: 如果无法识别所述响应报文, 则对所述下一个数据报文进 行识别。
进一步可选的,所述识别功能网元的本地流表中设置有第三反向识别结果 携带标记,用于所述识别功能网元根据所述第三反向识别结果确定是否在所述 下一个数据报文的头部扩展字段插入所述第一识别结果。此时, 本实现方式中 的步骤 c可以通过以下方式实现:
当所述识别功能网元成功识别所述响应报文时,将所述第三反向识别结果 携带标记置为真; 向第二下游设备转发所述响应报文,或者将所述第一识别结 果插入所述响应报文的头部扩展字段, 然后再向所述第二下游设备发送;接收 所述下一个数据报文,判断所述第三反向识别结果携带标记是否为真,如果是, 则将所述第一识别结果插入所述下一个数据报文的头部扩展字段,将所述第三 反向识别结果携带标记置为假,并在根据业务配置确定无需丢弃携带有所述第 一识别结果的所述下一个数据报文时, 将其发送至所述第一下游设备。 其中, 可选的,在将所述第一识别结果插入所述响应报文的头部扩展字段时,还将第 四识别状态码插入所述响应报文的头部扩展字段,用于向所述第二下游设备指 示所述响应报文携带所述第一识别结果。
对于本实施例中上述各种实现方式中的第一、第二、第三和第四识别状态 码, 示例性的, 请参照图 7A和图 7B中的说明。 本领域技术人员应当理解, 所述第一、第四识别状态码可以是同一个识别状态码在不同场景中的应用。此 夕卜, 本领域技术人员也应当理解, 在上述各个实施例中提及的第一、 第二和第 三反向识别结果标记可以是同一个标记在不同场景中的应用。 图 2是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图, 参照图 2, 该方法包括:
200: 扩散网元接收网络流中的数据报文。
202: 解析所述数据报文的头部扩展字段以确定所述数据报文的头部扩展 字段携带的插入信息。
204: 根据所述插入信息进行所述扩散网元的本地流表管理。
206: 当根据业务配置确定无需丢弃所述数据报文时, 进行报文转发处理, 包括:向第一下游设备发送所述数据报文以便所述第一下游设备根据所述插入 信息进行流表管理,或将所述数据报文携带的所述插入信息删除后向所述第一 下游设备发送。
可选的, 所述数据报文包括: IPv4报文或 IPv6报文。 当所述数据报文为 IPv4报文时, 所述头部扩展字段为所述 IPv4报文头部的选项字段, 当所述数 据报文为 IPv6报文时, 所述头部扩展字段为所述 IPv6报文头部的扩展报头字 段。
本实施例中,扩散网元仅需要解析识别功能网元发送的数据报文的头部扩 展字段以获取识别结果信息和执行报文转发处理, 无需对数据报文进行识别, 降低了整体网络中 DPI业务导致的时延。
可选的, 在本实施例的一种实现方式中, 204包括以下几种情况:
1: 如果所述插入信息包含第一识别结果, 或, 包含所述第一识别结果和 第一识别状态码, 则将所述第一识别结果保存至所述本地流表。
2: 如果所述插入信息包含第二识别结果, 或, 包含所述第二识别结果和 第一识别状态码,则创建或刷新所述本地流表而不保存所述第二识别结果(即: 不将所述插入信息携带的第二识别结果保存至所述本地流表,并且该操作并不 对所述扩散网元创建所述本地流表产生影响) 。
3: 如果所述插入信息包含识别结果请求信息, 或, 包含所述识别结果请 求信息和第三识别状态码, 则创建或刷新所述本地流表。
其中:所述第一识别结果是所述数据报文成功完成深度报文检测识别时的 识别结果,所述第二识别结果是所述扩散网元创建所述本地流表时的识别结果 初始值,所述第一识别状态码用于向所述扩散网元指示所述数据报文携带所述 第一识别结果或第二识别结果,所述第三识别状态码用于向第二下游设备指示 所述数据^艮文携带所述识别结果请求信息,所述识别结果请求信息用于向所述 第二下游设备请求所述第一识别结果。可选的, 所述第二下游设备是识别功能 网元。
进一步可选的, 当所述插入信息包含所述第一识别结果或第二识别结果 时, 所述插入信息还包含: 识别首包标记, 用于标识所述 IP网络流中第一个 进行深度报文检测识别的数据报文。
可选的,在本实施例的一种实现方式中, 所述本地流表中设置有第四反向 识别结果携带标记,用于所述扩散网元根据所述第四反向识别结果携带标记确 定是否将所述第一识别结果通知所述第二下游设备。
当所述插入信息包含所述识别首包标记和第二识别结果时, 204还可以包 括以下步骤: 确定所述本地流表是否保存有所述第一识别结果, 如果是, 则将 所述第四反向识别结果携带标记置为真。在 206之后, 所述方法还可以包括以 下步骤:
a:所述识别扩散网元接收响应报文, 所述响应报文由服务器或用户设备在 接收所述数据报文后生成, 并由所述第一下游设备转发至所述扩散网元; b: 判断所述第四反向识别结果携带标记是否为真,如果是则将所述第一识别结果 插入所述响应报文的头部扩展字段, 将所述第四反向识别结果携带标记置为 假; c:向所述第二下游设备发送携带有所述第一识别结果的响应报文, 以将所 述第一识别结果通知所述第二下游设备。
进一步可选的,在本实现方式的步骤 b中, 当所述第一识别结果插入所述 响应报文的头部扩展字段时,还将第二识别状态码插入所述响应报文的头部扩 展字段, 以向所述第二下游设备指示所述响应报文携带有所述第一识别结果。
在本实现方式中,扩散网元可以在接收携带有所述第二识别结果和识别首 包标记的数据报文后,在本地流表保存有所述第一识别结果的情况下,将所述 第一识别结果通知所述第二下游设备(例如: 识别功能网元) , 避免出现所述 问题。 可选的, 在本实施例的一种实现方式中, 所述本地流表中设置有识别结 果等待报文计数,用于计算所述扩散网元在获取所述第一识别结果之前所接收 到的数据报文的数目。 204还可以包括以下步骤: 在所述本地流表未保存有所 述第一识别结果的情况下,如果所述插入信息不包含所述第一识别结果, 或者 所述插入信息包含所述第一识别结果但却未将所述第一识别结果保存至所述 本地流表, 则判断所述识别结果等待报文计数是否超过预设阈值, 如果是, 则 向所述第二下游设备请求所述第一识别结果。
进一步可选的,可以通过以下方式向所述第二下游设备请求所述第一识别 结果:
在所述本地流表中设置第五反向识别结果携带标记,用于所述扩散网元根 据所述第五反向识别结果携带标记确定是否向所述第二下游设备请求所述第 一识别结果。 在 204中, 如果判断所述识别结果等待报文计数超过预设阈值, 则将所述第五反向识别结果携带标记置为真。 然后, 在 206后, 所述方法还包 括以下步骤:
a: 接收响应报文, 所述响应报文由服务器或用户设备在接收所述数据报 文后生成, 并由所述第一下游设备转发至所述扩散网元; b:判断所述第五反向 识别结果携带标记为真,则将所述识别结果请求信息插入所述响应报文的头部 扩展字段,将所述第五反向识别结果携带标记置为假,将所述识别结果等待报 文计数清零; c:向所述第二下游设备发送携带有所述识别结果请求信息的响应 报文, 以向所述第二下游设备请求所述第一识别结果, 以便所述第二下游设备 在接收到携带有所述识别结果请求信息的响应报文后, 在接收到属于所述 IP 网络流的下一个数据报文时,在所述下一个数据报文的头部扩展字段插入所述 第一识别结果然后再发送至所述扩散网元; d:接收所述下一个数据报文并进行 解析, 将所述第一识别结果保存至所述本地流表从而获取所述第一识别结果。
在本实现方式中,如果扩散网元在预设阈值范围内没有获取所述第一识别 结果(即: 没有将所述第一识别结果保存至本地流表), 则会主动发起识别结 果请求, 以向所述第二下游设备(例如: 识别功能网元)请求所述第一识别结 果。避免了所述扩散网元由于故障、 配置等原因而无法获取所述第一识别结果 的问题。
本领域技术人员应当理解, 上述第四、第五反向识别结果携带标记可以是 同一个标记在不同场景中的应用。
图 3 是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图, 参照图 3, 所述方法包括:
300: 扩散网元接收响应报文, 所述响应报文由第一下游设备发送至所述 扩散网元,所述响应报文携带有响应信息并且所述响应报文的头部扩展字段携 带有插入信息, 所述响应信息由服务器或用户设备在接收 IP网络流中的数据 艮文后生成。
302: 解析所述响应 文的头部扩展字段以确定所述响应 文的头部扩展 字段携带的所述插入信息。
304: 根据所述插入信息进行所述扩散网元的本地流表管理。
306: 进行报文转发处理, 包括: 向第二下游设备发送所述响应报文以便 所述第二下游设备根据所述插入信息进行流表管理,或将所述响应报文携带的 所述插入信息删除后向所述第二下游设备发送。
可选的, 在本实施例的一种实现方式中, 304包括: 如果所述插入信息包 含所述第一识别结果和第四识别状态码,则将所述第一识别结果保存至所述本 地流表中, 所述第一识别结果是所述 IP网络流成功完成深度报文检测识别时 的识别结果,所述第四识别状态码用于向所述扩散网元指示所述响应报文携带 有所述第一识别结果。
在本实现方式中,扩散网元能够通过解析所述响应报文的头部扩展字段从 而获取所述第一识别结果。 可选的, 在本实施例的一种实现方式中, 如果所述 插入信息包含识别结果请求信息,或包含所述识别结果请求信息和第三识别状 态码, 则刷新所述本地流表后向所述第二下游设备转发所述响应报文; 如果所 述插入信息包含所述第一识别结果和第二识别状态码,则刷新所述本地流表而 不保存所述第一识别结果, 然后向所述第二下游设备转发所述响应报文。 下面以 IPv4数据报文为例, 示例性地对本发明实施例进行描述。 图 4是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图, 参照图 4, 该方法包括:
步骤 1:用户发起业务访问, 如 HTTP业务访问。
步骤 2:识别功能网元 1完成对数据报文的识别,将获取的第一识别结果保 存至本地流表并将第一识别结果插入数据报文的 IP选项字段后做适应性调 整。 可选的, 如果所述数据报文是其所属 IP网络流中第一个进入识别功能网 元 1进行识别的数据包, 还可以将识别首包标记随第一识别结果插入 IP选项 字段。 可选的, 再将第一识别结果插入数据报文的 IP选项字段时, 还可以插 入第一识别状态码, 用于向下游网元指示该数据报文携带第一识别结果。
步骤 3:识别功能网元 1发送携带有第一识别结果的数据报文至扩散网元 2 (识别功能网元 1 ,以及扩散网元 2至扩散网元 N中的任一网元发送数据报文 的前提都是: 业务配置未导致数据报文被丢弃。 例如, 如果一个网元的业务配 置为阻断或限流从而导致数据报文被丢弃, 则该网元不转发当前数据报文, 当 前流程结束。该前提在本发明的其他实施例中同样适用, 为了更清楚的描述本 发明各个实施例, 下文均默认为业务配置未导致数据报文丢弃) 。
步骤 4:扩散网元 2进行报文转发处理。具体的, 网元 2解析数据报文的 IP 选项字段,将第一识别结果保存至本地流表从而获取第一识别结果, 然后执行 步骤 5。
步骤 5: 扩散网元 2将携带第一识别结果的数据报文向下游设备发送。 图 3中仅图示了扩散网元 2和扩散网元 N, 本领域技术人员应当理解: 在 网元 2和网元 N之间还可以有任意数目的扩散网元, 这些网元所执行的操作 可以与网元 2执行的操作相同, 此处不赘述。 在网元 N之后还可以有任意数 目普通网元, 所述普通网元无需对数据报文进行识别,也无需获取和扩散第一 识别结果。
步骤 6: 扩散网元 N进行报文转发处理。 具体的, 将数据报文的 IP选项 字段中的插入信息删除并做适应性调整, 然后执行步骤 7。
可选的, 在本实施例的一种实现方式中, 网元 N 可以保留数据报文携带 的插入信息, 以为用户提供业务识别服务。
步骤 7: 发送数据报文。
在本发明的一种实施例中,如果识别功能网元无法识别当前数据报文, 则 可以继续对后续的数据报文进行识别。在识别功能网元完成对数据报文的识别 的情况下, 对于该数据报文所属 IP网络流的后续数据报文无须进行识别, 可 直接应用本地流表中保存的第一识别结果进行业务处理。
当然,识别功能网元可以部署在网络中的任意位置, 并且识别功能网元也 可能无法在一次识别中就获取第一识别结果, 例如, 参照图 5, 图 5是根据本 发明一种实施例的深度 ^艮文检测结果扩散方法的流程示意图, 该方法包括: 步骤 1: 用户发起业务访问。
步骤 2: 扩散网元 1接收到数据报文, 进行报文转发处理。 具体的, 创建 或刷新流表(例如, 刷新网络流的访问时间等信息), 然后将数据报文发送至 识别功能网元 2。
步骤 3: 识别功能网元 2对接收到的数据报文进行识别, 无法识别, 将第 二识别结果和识别首包标记插入数据报文的 IP选项字段并做适应性调整。 然 后, 将经过上述处理后数据报文发送至扩散网元 3。 可选的, 当将第二识别结 果和识别首包标记插入数据报文的 IP选项字段时, 还可以插入第一识别状态 码, 用于向下游网元指示数据报文携带有第二识别结果。
步骤 4: 扩散网元 3进行报文转发处理。 具体的, 网元 3解析数据报文的 IP选项字段, 发现只有识别首包标记且识别结果为初始值(即: 第二识别结 果) , 则刷新或创建流表而不保存识别结果, 然后转发数据报文至下游网元。
图 5中仅图示了扩散网元 1、 扩散网元 3和扩散网元 N, 本领域技术人员 应当理解, 在网元 1和网元 2之间, 以及在网元 3和网元 N之间还可以有任 意数目的扩散网元。 在网元 3和网元 N之间的网元在上行方向和下行方向对 报文所执行的操作可以与网元 3执行的操作相同, 此处不赘述。
步骤 5: 扩散网元 N进行报文转发处理。 具体的, 解析数据报文的 IP选 项字段, 发现只有识别首包标记, 识别结果为初始默认值, 则创建或刷新流表 而不保存识别结果。 将数据报文的 IP选项字段中的插入信息删除并做适应性 调整, 然后将数据报文发送至对端用户或服务器。
步骤 6: 扩散网元 N接收到对端用户或服务器发送的响应报文, 进行报文 转发处理。 具体的, 解析该响应报文的 IP选项字段发现不含有插入信息, 则 只刷新流表, 并转发响应报文至扩散网元 3。
步骤 7: 请参照步骤 6。
步骤 8: 识别功能网元 2对响应报文进行识别并且成功识别从而获取第一 识别结果, 进行报文处理和流表管理。 具体的, 将第一识别结果保存至本地流 表, 并将本地流表中预定义的反向识别结果携带标记 (此处的反向识别结果携 带标记可以是: 上行识别结果携带标记)置为真, 将第一识别结果插入响应报 文的 IP选项字段并 #文适应性调整, 然后向下游发送响应 文。 可选的, 在将 第一识别结果插入响应报文的 IP选项字段时, 还可以插入第四识别状态码, 用于向下游的扩散网元指示响应报文携带有第一识别结果。
步骤 9: 扩散网元 1接收到携带第一识别结果的响应报文, 进行报文转发 处理。 具体的, 解析数据报文的 IP选项字段, 发现其携带有第一识别结果, 则将第一识别结果保存至本地流表。 然后, 可选的, 网元 1直接转发响应报文 至用户设备; 或者, 网元 1将响应报文中的插入信息删除并做适应性调整后发 送至用户设备。
步骤 10: 扩散网元 1接收到同一 IP网络流的后续业务报文, 进行报文转 发处理。 具体的, 判断本地流表保存有对当前数据报文所属 IP网络流的第一 识别结果, 则刷新流表, 根据第一识别结果进行业务处理以及发送数据报文。
步骤 11: 识别功能网元 2接收到数据报文, 不进行识别, 进行报文处理 和流表管理。 具体的, 判断所述反向识别结果携带标记为真, 则将第一识别结 果插入数据报文的 IP选项字段并做适应性调整, 将所述反向识别结果携带标 记置为假, 然后发送经过上述处理的数据报文。 可选的, 在将第一识别结果插 入数据报文的 IP选项字段时, 还可以插入第一识别状态码。
之后, 网元 3和网元 N所执行的操作请参照图 3所示实施例中的网元 2 和网元 N执行的操作, 此处不赘述。
本实施例通过在本地流表预定义反向识别携带标记,以便在成功识别响应 报文后, 将第一识别结果插入之后接收到的下一个数据报文的 IP选项字段, 实现了第一识别结果的快速扩散。
在本发明的另一种实施例中, 参照图 5, 假设网络中没有扩散网元 1 , 识 别功能网元 2直接面向用户。 在这种情况下, 在步骤 8 中, 识别功能网元 2 进行报文处理和流表管理包括: 将获取的第一识别结果保存至本地流表,将本 地流表中预定义的反向识别结果携带标记置为真, 然后可选的, 网元 2转发响 应 4艮文, 或者, 网元 2将第一识别结果插入响应 文的 IP选项字段并 #文适应 性调整后发送响应报文给用户设备。 其他网元所执行的操作保持不变。
在本发明的再一种实施例中, 参照图 5, 如果在步骤 8中, 识别功能网元
2无法识别响应报文, 则识别功能网元 2在步骤 11 中, 对接收到的数据报文 进行识别。
图 6是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意 图, 参照图 6, 该方法包括:
600: 识别功能网元接收到 IP网络流中的数据报文并进行识别, 如果无法 识别则执行 601及其后续步骤, 否则执行 606及其后续步骤。
601 : 识别功能网元进行 文转发处理。 具体的, 将第二识别结果插入数 据报文的 IP选项字段并做适应性调整, 然后进行后续业务处理(包括阻断、 限流、 计费等业务, 本发明对此不做限制)。 其中, 如果识别功能网元接收到 数据报文属于以下情况,则数据报文的 IP选项字段还插入有识别首包标记(该 标记用于标识接收到的数据报文所属 IP网络流中第一个进入识别功能网元进 行识别的数据包): 1、 识别功能网元第一次接收到属于所述 IP网络流的数据 报文; 2、 识别功能网元由于重启或故障导致本地流表不再保存有对所述 IP网 络流的第一识别结果, 之后首次接收到属于所述 IP网络流的数据报文。
602: 识别功能网元下游的各扩散网元接收到数据报文, 进行报文解析。 如果解析结果不满足第一条件, 则执行 603; 如果解析结果满足第一条件却不 满足第二条件, 则执行 604; 如果解析结果同时满足第一条件和第二条件, 则 执行 605。
其中, 第一条件为: 解析数据报文的 IP选项字段, 确定其包含第二识别 结果和识别首包标记。 第二条件为: 当前进行数据报文解析的扩散网元的本地 流表中保存有第一识别结果。
603: 不满足第一条件的扩散网元进行报文转发处理。
例如,各下游网元中的当前扩散网元接收到数据报文, 该数据报文仅包含 第二识别结果, 则刷新或创建流表, 然后向下游网元转发该数据报文, 或者将 该数据报文中的插入信息删除后向下游网元发送; 再例如,各下游网元中的当 前扩散网元接收到数据报文, 该数据报文不包含插入信息, 则向下游转发该数 据报文。
其中, 如果当前扩散网元是面向用户 /服务器的网元, 之后的后续处理步 骤可以参照图 5所示实施例, 由识别功能网元对响应报文进行识别。如果完成 对响应报文的识别则执行图 5所示实施例的相应步骤;如果未完成对响应报文 的识别, 则继续对后续接收的数据报文进行识别, 依此类推。
604: 满足第一条件而不满足第二条件的扩散网元进行报文转发处理。 例 如, 下游的当前扩散网元接收到数据报文, 该数据报文仅包含第二识别结果和 识别首包标记, 如果当前扩散网元没有本地流表(例如: 当前网元重启导致其 本地流表消失), 则创建流表, 然后转发数据报文, 或者将数据报文中的插入 信息删除后发送; 如果当前网元的本地流表中未保存第一识别结果, 则进行流 表刷新(例如, 刷新当前 IP网络流的访问时间 )后转发数据报文, 或者将数 据报文中的插入信息删除后发送。
其中, 如果当前扩散网元是面向服务器 /用户的网元, 之后的处理步骤与 上述 603的后续处理步骤相同, 此处不再赘述。
605: 满足第一条件和第二条件的下游网元进行报文转发处理。 在这种情 况下,当前扩散网元将数据报文中的插入信息认为是识别功能网元向其请求第 一识别结果。 所以, 当前扩散网元将数据报文的 IP选项字段中的插入信息删 除并做适应性调整后向下游网元发送处理后的数据报文(或者, 转发携带有插 入信息的数据报文) , 并将第一识别结果插入之后接收到的响应报文的 IP选 项字段。 可选的, 在将第一识别结果插入之后接收到的响应报文的 IP选项字 段时,还可以插入第二识别状态码, 用于向识别功能网元指示该响应报文携带 有第一识别结果。 具体的, 可以通过以下步骤实现:
在当前扩散网元的本地流表中设置有反向识别结果携带标记(此处的反向 识别结果携带标记可以是: 下行识别结果携带标记); 当前扩散网元确定接收 到的数据报文携带有第二识别结果和识别首包标记,并且本地流表保存有第一 识别结果, 则将反向识别结果携带标记置为真, 删除数据报文的 IP选项字段 中的插入信息并做适应性调整后进行报文发送; 之后, 接收到响应报文时, 判 断反向识别结果携带标记是否为为真, 如果是, 则将所述第一识别结果(或第 一识别结果和第二识别状态码)插入该响应 文的 IP选项字段并 #文适应性调 整, 将所述反向识别结果携带标记置为假, 然后发送上述处理后的响应报文; 识别功能网元接收到上述响应报文(响应报文可能经由其他扩散网元转发。 当 其他扩散网元接收到响应报文时,解析发现其携带第一识别结果和第二识别状 态码, 则不对响应报文进行处理, 直接向下游转发) , 解析该响应报文的 IP 选项字段获取第一识别结果,将第一识别结果保存至本地流表,删除该响应报 文中的插入信息并做适应性调整后发送。 显然, 602、 603、 604和 605可以是一个循环执行过程, 直至识别功能网 元下游的所有扩散单元均根据其满足的条件执行完相应的操作后结束。
606: 识别功能网元进行报文处理和流表管理。
可选的,对于 606及其后续步骤的描述请参照图 4所示实施例中的相应描 述。
可选的, 606及其后续步骤包括以下内容:
a:识别功能网元的本地流表中预定义有反向识别结果携带标记(此处的反 向识别结果携带标记可以是: 下行识别结果携带标记), 当成功识别数据报文 时,将获取的第一识别结果保存至本地流表,将第一识别结果插入数据报文的 IP选项字段并做适应性调整, 将所述反向识别结果携带标记置为真, 然后发 送上述处理后的数据报文。
b:各下游网元接收到数据报文, 进行报文转发处理。 例如, 请参照图 4所 示实施例中的步骤 3至步骤 7。
c:下行方向上, 识别功能网元上游各扩散网元接收响应报文, 转发至识别 功能网元。 例如, 请参照图 4所示实施例中的步骤 6至步骤 7。
d:识别功能网元接收到响应报文, 判断所述反向识别结果携带标记为真, 则将第一识别结果插入响应报文的 IP选项字段并做适应性调整, 将所述反向 识别结果携带标记置为假, 然后发送响应报文。
本实施例可以实现:
在各个网元已经获取第一识别结果的情况下,如果识别功能网元故障或重 启 (或者, 识别功能网元及其下游任一网元故障或重启), 当识别功能网元接收 到上行方向的数据流时,可以通过向其下游的扩散网元请求第一识别结果从而 获取第一识别结果。如果识别功能网元故障或重启,之后接收到下行方向的数 据流, 此时网络中的各个网元可以在下行方向上只转发报文和刷新流表, 然后 由识别功能网元对接下来的上行数据报文进行相应处理(例如: 插入识别首包 标记和第二识别结果)。 而在现有技术中, 当部署识别功能的网元重启时, 对 于已经完成部分数据交互的 IP网络流, 由于识别模块可能无法获取到对应的 特征, 可能出现无法完成识别的情况。
本发明还提供了一种故障网元获取第一识别结果的方法。 参照图 7, 图 7 是根据本发明一种实施例的深度报文检测结果扩散方法的流程示意图,该方法 包括:
本实施例的背景为: 识别功能网元 1已经完成了对数据报文的识别, 其他 各网元均保存有第一识别结果。 在发送上行中间数据流的过程中, 扩散网元 2 已经接收到超过预设阈值的数据报文, 但仍未获取第一识别结果(例如: 扩散 网元 2发生故障导致这种情况发生) 。
步骤 1: 用户发送中间数据至识别功能网元 1。
步骤 2: 识别功能网元 1接收到数据报文, 由于之前已经获取了该数据报 文所属 IP网络流的第一识别结果, 所以刷新流表和进行相应业务处理, 然后 转发数据报文。
步骤 3至步骤 8: 扩散网元 2发送包含识别结果请求信息的报文以便向识 别功能网元 1请求第一识别结果, 具体的:
步骤 3: 扩散网元 2收到数据报文后, 判断识别结果等待报文计数超过预 设阈值(即网元 2已经接收到超过预设阈值的数据报文,但仍未获取第一识别 结果), 将本地流表中预定义的反向识别结果携带标记(此处的反向识别结果 携带标记可以是: 下行识别结果携带标记)置为真, 将识别结果请求信息(该 识别结果请求信息可以包含本地流表中的识别结果)插入数据报文的 IP选项 字段并做适应性调整, 然后发送数据报文。 可选的, 在将识别结果请求信息插 入数据报文的 IP选项字段时, 还可以插入第三识别状态码, 用于向识别功能 网元指示该数据 文携带识别结果请求信息,从而向识别功能网元请求第一识 别结果。
在本实施例的一种实现方式中,在扩散网元的本地流表中未保存所述第一 识别结果的情况下, 扩散网元每次接收到数据报文, 都解析其扩展字段, 如果 该数据报文未携带第一识别结果,或者该数据报文携带有第一识别结果而扩散 网元却未能将第一识别结果保存至本地流表,则将本地流表中的识别结果等待 报文计数加一个单位值; 如果数据报文的头部扩展字段携带第一识别结果,且 扩散网元却将第一识别结果保存至本地流表, 则将识别结果等待报文计数清 步骤 4: 扩散网元 3接收到数据报文进行报文转发处理。 具体的, 解析数 据报文的 IP选项字段,确定其携带的是识别结果请求信息则不进行报文处理, 只刷新流表和进行业务处理。 然后向下游转发数据报文。
步骤 5: 扩散网元 N接收到数据报文进行报文转发处理。 具体的, 确定该 数据报文携带的是识别结果请求信息, 只刷新流表和进行业务处理,将数据报 文中的识别结果请求信息删除并做适应性调整。 然后发送数据报文。
步骤 6: 扩散网元 N接收到响应报文, 刷新流表并进行相关业务处理。 然 后转发响应 4艮文。
步骤 7: 请参照步骤 6。 步骤 8: 网元 2接收到响应报文, 判断识别结果等待报文计数超过阈值, 且所述反向识别结果标记为真, 将识别结果请求信息插入响应报文的 IP选项 字段并进行适应性调整(所述识别结果请求信息可以包括本地流表中的识别结 果), 同时将所述反向识别结果携带标记置为假, 将识别结果等待报文计数清 零, 然后发送响应报文。 可选的, 在将识别结果请求信息插入响应报文的 IP 选项字段时,还可以插入第三识别状态码, 用于向识别功能网元指示该响应报 文携带识别结果请求信息, 从而向识别功能网元请求第一识别结果。
步骤 9至步骤 10: 识别功能网元将携带识别结果请求信息的响应报文中 的插入信息删除后向下游发送,并将第一识别结果插入接收到的下一个数据报 文的 IP选项字段后转发。 具体的:
步骤 9: 识别功能网元 1接收到响应报文进行报文转发处理。 具体的, 解 析该响应报文的 IP选项字段, 判断包含扩散网元发送的识别结果请求信息, 则将本地流表中预定义的反向识别结果携带标记(此处的反向识别结果携带标 记可以是: 上行识别结果携带标记)置为真, 将响应报文中的插入信息删除并 做适应性调整, 刷新流表和进行相关业务处理, 然后发送响应报文。
步骤 10: 识别功能网元 1接收到数据报文进行报文转发处理。 具体的, 判断所述反向识别结果携带标记为真, 则将第一识别结果插入数据报文的 IP 选项字段并做适应性调整。将所述反向识别结果携带标记置为假,刷新流表和 进行相关业务处理, 然后发送数据报文。
步骤 11: 扩散网元 2接收到数据报文进行报文转发处理。 具体的, 解析 数据报文的 IP选项字段, 将第一识别结果保存至本地流表。 刷新流表和进行 相关业务处理, 然后发送数据报文。 步骤 12和步骤 13: 请参照步骤 11。 但是在步骤 13中, 扩散网元 N可以 将数据报文中的插入信息删除并做适应性调整, 然后再发送至服务器 /用户。
在本发明的一种实施例中, 如果扩散网元在转发上行数据的过程中故障, 且该故障网元是上行方向上所述识别功能网元的上游网元,则该故障网元可以 将识别结果请求信息插入上行方向的数据报文中,以便识别功能网元根据预定 义的反向识别结果携带标记和本地流表中保存的第一识别结果执行相应操作。
在本发明的另一种实施例中,如果发生故障的扩散网元在转发下行数据的 过程中故障,且该故障网元是下行方向上所述识别功能网元的上游网元, 则该 故障网元可以将识别结果请求信息插入下行方向的响应报文中, 以便识别功 能网元根据预定义的反向识别结果携带标记和本地流表中保存的第一识别结 果执行相应操作。
需要说明的是,本发明各实施例提供的反向识别结果携带标记的默认值为 假, 对报文转发无影响。 可选的, 反向识别结果携带标记可以是本地流表中定 义的一个标记, 当配置为真时, 用于表示当前方向的反方向报文需要携带相应 的插入信息。
图 8A是根据本发明一种实施例的 IPv4报文头部的选项字段的格式示意 图;图 8B是本发明一种实施例的 IPv6报文头部的扩展报头字段的格式示意图。
参照图 8A, IPv4头部通过选项 ( OPTION )字段提供 IP头部的扩展信息 携带能力,每一跳都需要处理 ΟΡΉΟΝ。本实施例中的 OPTION字段定义有如 下内容:
Option type定义为 00011110。 高位起第一位表示是否将该 option复制进 所有 IP分片, 设置为 0代表不复制, 只需第一片携带识别信息。 第二、 三两 位取 00代表该 option属于控制类消息。 后五位 11110为 option number (选项 号) , IP协议栈通过该字段来确定 option类型, 11110作为之前的保留 option number,在本技术方案中可用作标识该 option为识别结果携带信息。如果一个 报文的 option number字段为 11110,则由需要获取识别结果的网元,例如识别 功能网元或扩散网元解析该报文的 Option字段, 其他不支持该 option的设备 可以忽略后继续转发该报文。
Option长度内容为整个 option的长度。
识别状态码为 4位, 高位起第一位为识别首包标记, 置 1时标识当前 IP 网络流中第一个进行识别的数据包,用于非识别功能网元判断识别功能网元是 否需要从其他网元获取识别结果。 对于高位起的后 3位, 000可作为第一识别 状态码或第四识别状态码,用于识别功能网元向扩散网元扩散第一识别结果和 /或第二识别结果; 001可作为第三识别状态码, 标识识别结果请求信息, 用于 扩散网元向识别功能网元请求第一识别结果; 010可作为第二识别状态码, 用 于标识该 option为对识别功能网元请求第一识别结果的响应; 其他保留。
识别结果包含识别出来的协议、 应用、 终端类型等信息, 其长度与识别功 能返回的识别结果结构有关, 可以支持多识别结果携带。
扩展信息字段, 可以标识当前 IP网络流的策略信息, 如丢弃或限流等。 其中, Option type, 识别状态码和识别结果的定义使得识别功能网元和 扩散网元可以根据不同的插入信息进行相应处理。 能力, 本实施例的扩展字段插入 IPv6 的扩展报头字段, 采用 Hop-by-Hop Options (逐跳选项 )扩展头来实现, 协议规定 Hop-by-Hop Options必须在每 个网元都需要处理, 对于该扩展报头字段定义如下:
Next Header(8bits)头部记录了下一个扩展头的信息。
Hdr ext len ( 8bits )记录了 Hop-by-Hop Options头部的长度。
Option type定义为 00011110, 高位起前两位 00表示如果网元无法识别该 option则跳过继续处理下一个 option; 第三位设置为 0表示在转发过程中不修 改该 option的内容; 后五位 11110为 option number, IP协议栈通过该字段来 确定 option类型, 11110作为之前的保留 option number , 在本技术方案中被用 作标识该 option为识别结果携带信息。 如果一个报文的 option number字段为 11110的, 则由需要获取识别结果的设备, 例如识别功能网元或扩散网元解析 该报文的 Option字段, 其他设备可以忽略后继续转发该报文。
对于 Option长度、 识别状态码、 识别结果和扩展信息字段的描述请参照 图 7A中的描述, 此处不再赘述。 其中, Option type、 识别状态码和识别结果 的定义使得识别功能网元和扩散网元可以根据不同的插入信息进行相应处理。
在本发明提供的各种方法实施例中,如上文所述,对于携带插入信息的报 文,有的识别功能网元或扩散网元可以选择将其从报文中删除后发送, 或者将 其保留在报文中发送。这种选择性可以通过定义网元属性实现, 这种定义同样 适用于本发明提供的装置实施例。例如, 可以将识别功能网元或扩散网元定义 为上行边缘节点、下行边缘节点、上行终结节点或下行终结节点来确定识别结 果扩散的范围。 其中:
上行边缘节点: 禁止上行报文携带本方案中的插入信息,接收到该类型的 报文后直接丢弃, 并在超过一定阈值后采取保护措施以防止攻击。但是会向上 下行发送携带有插入信息的报文。 下行边缘节点: 禁止下行报文携带本方案中的插入信息,接收到该类型的 报文后直接丢弃, 并在超过一定阈值后采取保护措施以防止攻击,但是会向上 下行发送携带有插入信息的报文。
上行终结节点: 禁止下行 "¾文携带本方案中的插入信息,接收到该类型的 报文后直接丢弃, 并在超过一定阈值后采取保护措施以防止攻击。如果来自上 行方向的报文的头部扩展字段携带有本方案中的插入信息,删除插入信息后转 发(例如, 剥离携带本方案中的插入信息的报文的头部扩展字段后转发)。 并 禁止上行方向识别结果携带标记位置为真。
下行终结节点: 禁止上行 "¾文携带本方案中的插入信息,接收到该类型的 报文后直接丢弃, 并在超过一定阈值后采取保护措施以防止攻击。如果来自下 行方向的报文的头部扩展字段携带有本方案中的插入信息,删除插入信息后转 发。 并禁止下行方向识别结果携带标记位置为真。
例如, 在图 3中, 可以将识别功能网元 1定义为下行边缘节点, 将扩散网 元 N定义为上行边缘节点以便网元 N将携带第一识别结果的数据报文发送至 对端用户设备, 而介于网元 1与网元 N之间的节点可以对接收到的携带本发 明提供的插入信息的报文进行解析和转发等操作。 在图 4 中, 可以将网元 1 定义为下行终结节点, 将网元 N定义为上行终结节点。
再例如,在一条网络流所流经的所有网元中,如果选取其中的一段路径执 行 DPI业务,此时,可以根据需要定义该路径的起点网元和终点网元的网元属 性。
图 9A是根据本发明一种实施例的识别功能网元结构示意图, 参照图 9A, 该识别功能网元 90包括: 第一接收单元 91 , 用于接收网络流中的数据报文;
第一识别单元 92, 用于对所述数据报文进行深度报文检测 (DPI )识别; 第一处理单元 93, 用于在所述第一识别单元成功识别所述数据报文时, 将识别得到的第一识别结果保存至所述识别功能网元的本地流表,并将所述第 一识别结果插入所述数据报文的头部扩展字段;在所述第一识别单元无法识别 所述数据报文时,将第二识别结果插入所述数据报文的头部扩展字段, 所述第 二识别结果为所述识别功能网元创建所述本地流表时的识别结果初始值; 第一发送单元 94, 用于向第一下游设备发送携带有所述第一识别结果或 第二识别结果的数据报文。
可选的, 所述第一处理单元 93还用于在所述数据报文的头部扩展字段插 入第一识别状态码,用于向所述第一下游设备指示所述数据报文携带有所述第 一识别结果或第二识别结果。
可选的, 所述网络流具体可以为 IP网络流, 如果所述数据 4艮文是所述 IP 网络流中第一个进入所述第一识别单元进行识别的数据包,则所述第一处理单 元 93还用于在所述数据报文的头部扩展字段插入识别首包标记, 用于标识所 述 IP网络流中第一个进入所述识别功能网元进行识别的数据包。
本实施例提供的识别功能网元 90通过在数据报文的头部扩展字段插入识 别结果信息, 以向其他网元设备发送识别结果信息, 能够降低整体网络进行 DPI业务的时延。
在图 9A所示实施例的一种实现方式中, 参照图 9B, 识别功能网元 90,还 可以包括:
第六接收单元 95, 用于在所述第一发送单元 94向所述第一下游设备发送 携带有所述第二识别结果的数据报文后,接收响应报文,所述响应报文由服务 器或用户设备在接收所述数据报文后生成,并由所述第一下游设备转发至所述 识别功能网元 90';
第二识别单元 96, 用于对所述响应报文进行识别;
第六处理单元 97, 用于在所述第二识别单元 96成功识别所述响应报文从 而获取第一识别结果时,将所述第一识别结果保存至所述本地流表, 并将所述 第一识别结果插入所述识别功能网元 90,接收的下一个数据报文的头部扩展字 段, 所述下一个数据报文属于所述 IP网络流。
本实现方式可以在第一识别单元 92未完成识别的情况下, 对相应的响应 报文进行识别, 并通过报文的头部扩展字段实现识别结果的扩散。
其中, 参照图 9C, 所述第六处理单元 97可以包括:
第一配置子单元 971 , 用于在所述识别功能网元 90,的本地流表中配置第 三反向识别结果携带标记, 以便所述识别功能网元 90,根据所述第三反向识别 结果确定是否在所述下一个数据报文的头部扩展字段插入所述第一识别结果, 以及用于在所述第二识别单元 96成功识别所述响应报文时, 将所述第三反向 识别结果携带标记置为真;
第二配置子单元 972, 用于在下述第七接收单元接收到所述下一个数据报 文时,确定所述第三反向识别结果携带标置为真, 则将所述第一识别结果插入 所述下一个数据报文的头部扩展字段,将所述第三反向识别结果携带标记置为 假, 然后调用下述第七发送单元。
所述识别功能网元 90,还包括:
第六发送单元, 用于在所述第一配置子模块 971完成配置后, 向第二下游 设备转发所述响应报文, 或者,将所述第一识别结果插入所述响应报文的头部 扩展字段, 然后再向所述第二下游设备发送;
第七接收单元, 用于接收所述下一个数据报文;
第七发送单元,用于根据业务配置确定无需丢弃携带有所述第一识别结果 的所述下一个数据报文, 则将其发送至所述第一下游设备。
当然 ,所述第七接收单元和第七发送单元的功能也可以分别通过第一接收 单元 91和第一发送单元 94实现。
识别功能网元 90,能够在无法识别当前数据报文的情况下, 对之后接收的 响应报文进行识别,并将成功识别得到的第一识别结果通过报文的头部扩展字 段向其他设备扩散。 降低了整体网络中进行 DPI业务导致的时延。
图 10是根据本发明一种实施例的识别功能网元结构示意图, 参照图 10, 识别功能网元 100可以包括:
第一接收单元 91 ,第一识别单元 92,第一处理单元 93,第一发送单元 94, 以及:
第二接收单元 101 , 用于在所述第一发送单元 94向所述第一下游设备发 送携带有所述第二识别结果和识别首包标记的数据报文之后, 接收响应报文, 所述响应报文由所述第一下游设备发送至所述识别功能网元 100, 所述响应报 文携带有响应消息并且所述响应报文的头部扩展字段携带有所述第一识别结 果, 所述响应消息由服务器或用户设备在接收到所述数据报文后生成, 所述响 应报文用于将所述第一识别结果通知所述识别功能网元。可选的, 所述响应报 文的头部扩展字段还携带有第二识别状态码,用于向识别功能网元 100指示所 述响应报文携带有所述第一识别结果。 第二处理单元 102, 用于解析所述响应报文以将所述第一识别结果保存至 所述本地流表, 然后将所述响应报文携带的所述第一识别结果删除。
第二发送单元 103, 用于向第二下游设备发送所述第二处理单元处理后的 响应 4艮文。
其中,第一接收单元 91接收到的数据报文为所述 IP网络流中第一个进行 识别的报文; 第一识别单元 92未完成对所述数据报文的识别; 第一处理单元 93将第二识别结果和识别首包标记插入所述数据报文的头部扩展字段。
在其他设备中的至少一个保存有第一识别结果的情况下,如果识别功能网 元 100出现故障或重启导致本地流表中的第一识别结果消失,网元 100可以将 识别首包标记和第二识别结果插入接收到的数据报文(属于所述 IP网络流 ) 的头部扩展字段, 以向保存第一识别结果的设备请求第一识别结果, 而无需再 次对 文进行识别, 避免了对于完成部分数据间交互的 IP网络流, 可能无法 完成识别的问题。
图 11是根据本发明一种实施例的识别功能网元结构示意图, 参照图 11 , 识别功能网元 110可以包括:
第一接收单元 91 ,第一识别单元 92,第一处理单元 93,第一发送单元 94, 以及:
第一配置单元 111 , 用于在所述本地流表中配置第一反向识别结果携带标 记, 并在所述第一识别单元成功识别所述数据报文时,将所述第一反向识别结 果携带标记置为真; 在下述第三处理单元 113完成报文处理时,将所述第一反 向识别结果携带标记置为假;所述第一反向识别结果携带标记用于指示是否在 接收到的响应报文的头部扩展字段插入所述第一识别结果, 其中, 所述响应报 文由服务器或用户设备在接收所述数据报文后生成,并由所述第一下游设备转 发至所述识别功能网元;
第三接收单元 112, 用于在所述第一发送单元 94向所述第一下游设备发 送携带有所述第一识别结果的数据报文后, 接收所述响应报文;
第三处理单元 113,用于在所述第三接收单元 112接收到所述响应报文时, 判断所述第一反向识别结果携带标记是否为真, 如果是, 则: 将所述第一识别 结果插入所述响应报文的头部扩展字段,或将所述第一识别结果和第四识别状 态码插入所述响应报文的头部扩展字段,所述第四识别状态码用于向第二下游 设备指示所述响应报文携带所述第一识别结果;
第三发送单元 114, 用于向所述第二下游设备发送由所述第三处理单元
113处理后的响应报文。
其中, 第一识别单元 92完成了对所述数据报文的识别。
图 12是根据本发明一种实施例的识别功能网元结构示意图, 参照图 11 , 识别功能网元 120可以包括:
第一接收单元 91 ,第一识别单元 92,第一处理单元 93,第一发送单元 94, 以及:
第二配置单元 121 , 用于在所述本地流表中配置第二反向识别结果携带标 记, 并在第四接收单元接收到响应报文时,将所述第二反向识别结果携带标记 置为真;所述第二反向识别结果携带标记用于指示所述识别功能网元 120是否 在所述识别功能网元接收的下一个数据报文的头部扩展字段插入所述第一识 别结果; 以及, 用于在下述第四接收单元 122接收到响应报文时, 将所述第二 反向识别结果携带标记置为真,在下述第五处理单元 126完成对所述下一个数 据报文的处理时,将所述第二反向识别结果携带标记置为假, 所述下一个数据 报文是所述识别功能网元在接收到所述数据报文之后,接收到的下一个数据报 文, 且所述下一个数据报文属于所述网络流;
第四接收单元 122, 用于在所述第一发送单元 94向所述第一下游设备发 送携带有所述第一识别结果的数据报文后,接收所述响应报文, 所述响应报文 由所述第一下游设备发送至所述识别功能网元 120, 所述响应报文携带有响应 消息并且所述响应报文的头部扩展字段携带有识别结果请求信息,所述响应消 息由服务器或用户设备在接收所述数据报文或所述 IP网络流的后续数据报文 后生成,所述识别结果请求信息用于向所述识别功能网元 120请求所述第一识 别结果;
第四处理单元 123, 用于将所述响应报文携带的所述识别结果请求信息删 除;
第四发送单元 124, 用于向第二下游设备发送所述第四处理单元 123处理 后的响应 4艮文;
第五接收单元 125, 用于接收所述下一个数据报文; 所述下一个数据报文 是所述识别功能网元在接收到所述数据报文之后, 接收到的下一个数据报文, 且所述下一个数据报文属于所述网络流;
第五处理单元 126, 用于判断所述第二反向识别结果携带标记是否为真, 如果是, 则将所述第一识别结果插入所述下一个数据报文的头部扩展字段; 第五发送单元 127, 用于当根据业务配置确定无需丢弃携带有所述第一识 别结果的所述下一个数据报文时, 将其发送至所述第一下游设备。
当然,所述第五接收单元 125和第五发送单元 127的功能也可以分别通过 第一接收单元 91和第一发送单元 94实现。
图 13A是根据本发明一种实施例的扩散网元结构示意图, 参照图 13A, 扩散网元 130包括:
第一接收单元 131 , 用于接收 IP网络流中的数据报文;
第一解析单元 132, 用于解析所述数据报文的头部扩展字段以确定所述数 据报文的头部扩展字段携带的插入信息;
第一处理单元 133, 用于根据所述插入信息进行所述扩散网元 130的本地 流表管理;
第一发送单元 134, 用于根据业务配置确定无需丢弃所述数据报文, 则进 行报文转发处理, 包括: 向第一下游设备发送所述数据报文以便所述第一下游 设备根据所述插入信息进行流表管理,或将所述数据报文携带的所述插入信息 删除后向所述第一下游设备发送。
本领域技术人员应该理解,如果业务配置为阻断或限流等导致所述数据报 文被丢弃, 则无法进行报文转发处理。
本实施例所提供的扩散网元 130 能够对数据报文的头部扩展字段进行解 析, 进而根据插入信息进行相应的处理, 以获取或扩散识别结果信息。
在本实施例的一种实现方式中, 参照图 13B,
第一处理单元 133 包括: 第一处理子单元 1331 , 和 /或第二处理子单元 1332, 和 /或第三处理子单元 1333。
第一处理子单元 1331 , 用于在所述插入信息包含第一识别结果, 或, 包 含所述第一识别结果和第一识别状态码时,将所述第一识别结果保存至所述本 地流表。 第二处理子单元 1332, 用于在所述插入信息包含第二识别结果, 或, 包 含所述第二识别结果和第一识别状态码时,创建或刷新所述本地流表而不保存 所述第二识别结果。
第三处理子单元 1333, 用于在所述插入信息包含识别结果请求信息, 或, 包含所述识别结果请求信息和第三识别状态码时, 创建或刷新所述本地流表。
其中:所述第一识别结果是所述数据报文成功完成深度报文检测识别时的 识别结果,所述第二识别结果是所述扩散网元 130创建所述本地流表时的识别 结果初始值,所述第一识别状态码用于向所述扩散网元 130指示所述数据报文 携带所述第一识别结果或第二识别结果,所述第三识别状态码用于向第二下游 设备指示所述数据报文携带所述识别结果请求信息,所述识别结果请求信息用 于向所述第二下游设备请求所述第一识别结果。
进一步可选的, 当所述插入信息包含所述第一识别结果或第二识别结果 时, 所述插入信息还包含: 识别首包标记, 用于标识所述 IP网络流中第一个 进行深度报文检测识别的数据报文。
本实施例提供的扩散网元 130无需对数据报文进行识别,只需要解析数据 报文的头部扩展字段,从而根据数据报文携带的插入信息进行识别结果的获取 或扩散, 降低了现有网络进行 DPI业务的时延, 降低了维护成本。
至少一个识别功能网元 90(或识别功能网元 90,)和至少一个扩散网元 130 可以构成一个识别结果扩散系统, 用于执行 DPI业务。在该系统中, 只由识别 功能网元 90进行报文识别, 并利用报文的头部扩展字段向扩散网元 130进行 识别结果的扩散, 降低了现有网络进行 DPI业务的时延, 降低了维护成本。
图 14是根据本发明一种实施例的扩散网元的结构示意图, 参照图 14, 扩 散网元 140包括: 第一接收单元 131 , 第一解析单元 132, 第一处理单元 133, 第一发送单元 134, 以及: 第二接收单元 141、 第二处理单元 142和第二发送 单元 143。 其中,
所述第一处理单元 133还包括第一配置子单元 1334, 用于在所述本地流 表中配置第四反向识别结果携带标记,以便所述扩散网元 140根据所述第四反 向识别结果携带标记确定是否将所述第一识别结果通知所述第二下游设备;以 及, 用于在所述插入信息包含所述第二识别结果和识别首包标记, 并且所述本 地流表中保存有所述第一识别结果时,将所述第四反向识别结果携带标记置为 真,在下述第二处理单元 142完成报文处理后,将所述第四反向识别结果携带 标记置为^ ί叚。
第二接收单元 141 , 用于在所述第一发送单元 134进行报文转发处理后, 接收响应报文, 所述响应报文由服务器或用户设备在接收所述数据报文后生 成, 并由所述第一下游设备转发至所述扩散网元 130。
第二处理单元 142, 用于判断所述第四反向识别结果携带标记为真, 则将 所述第一识别结果插入所述响应报文的头部扩展字段。
可选的, 所述第二处理单元 142还用于: 在将所述第一识别结果插入所述 响应报文的头部扩展字段时,将第二识别状态码插入所述响应报文的头部扩展 字段, 以向所述第二下游设备指示所述响应报文携带有所述第一识别结果。
第二发送单元 143, 用于向所述第二下游设备发送所述第二处理单元 142 处理后的响应报文, 以将所述第一识别结果通知所述第二下游设备。
本实施例所提供的扩散网元 140 能够在识别功能网元重启或故障的情况 下,将第一识别结果通知识别功能网元,避免了识别功能网元无法识别后续数 据报文导致无法获取第一识别结果的问题。
图 15是图 13B所示实施例中的第一处理单元的一种结构示意图, 参照图 15 , 第一处理单元 150包括:
第一处理子单元 1331、 第二处理子单元 1332、 第三处理子单元 1333、 计 数子单元 1501和判断子单元 1502, 其中,
计数子单元 1501 , 用于计算识别结果等待报文计数, 所述识别结果等待 报文计数表示所述扩散网元 130在获取所述第一识别结果之前所接收到的数 据报文的数目;
判断子单元 1502, 用于在所述本地流表未保存有所述第一识别结果的情 况下,如果所述插入信息不包含所述第一识别结果, 或所述插入信息包含所述 第一识别结果但却未将所述第一识别结果保存至所述本地流表,则判断所述识 别结果等待报文计数是否超过预设阈值, 如果是, 则触发所述扩散网元 130 向所述第二下游设备请求所述第一识别结果。
可选的, 参照图 16, 图 16是根据本发明一种实施例的扩散网元的结构示 意图, 参照图 16, 扩散网元 160包括: 第一接收单元 131、 第一解析单元 132、 第一处理单元 151和第一发送单元 134, 以及第三接收单元 161、 第三处理单 元 162、 第三发送单元 163和第四接收单元 164, 其中,
第一处理单元 151除了包括第一处理单元 150的各个部分外,还包括第二 配置子单元, 用于在所述本地流表中配置第五反向识别结果携带标记, 以便所 述扩散网元 160根据所述第五反向识别结果携带标记确定是否向所述第二下 游设备请求所述第一识别结果; 以及, 用于在所述识别结果等待报文计数超过 预设阈值时将所述第五反向识别结果携带标记置为真, 在下述第三处理单元 162完成报文处理后, 将所述第五反向识别结果携带标记置为假, 将所述识别 结果等待报文计数清零。
第三接收单元 161 , 用于在所述第一发送单元 134进行报文转发处理后, 接收响应报文, 所述响应报文由服务器或用户设备在接收所述数据报文后生 成, 并由所述第一下游设备转发至所述扩散网元 160;
第三处理单元 162, 用于判断所述第五反向识别结果携带标记为真, 则将 识别结果请求信息插入所述响应报文的头部扩展字段;
第三发送单元 163, 用于向所述第二下游设备发送所述第三处理单元 162 处理后的响应报文, 以向所述第二下游设备请求所述第一识别结果, 以便所述 第二下游设备在接收到携带有所述识别结果请求信息的响应报文后,在接收到 属于所述 IP网络流的下一个数据报文时, 在所述下一个数据报文的头部扩展 字段插入所述第一识别结果然后再发送至所述扩散网元 160;
第四接收单元 164, 用于接收所述下一个数据报文并进行解析, 将所述第 一识别结果保存至所述本地流表, 从而获取所述第一识别结果。
本实施例提供的扩散网元 160在接收到预定次数的数据报文时,如果仍未 获取第一识别结果, 可以自动向识别功能网元请求所述第一识别结果, 能够避 免扩散网元 160由于故障或重启等导致丢失所述第一识别结果。
图 17是根据本发明一种实施例的扩散网元的结构示意图, 参照图 17, 扩 散网元 170包括:
接收单元 171 , 用于接收响应报文, 所述响应报文由第一下游设备发送至 所述扩散网元 170, 所述响应报文携带有响应信息并且所述响应报文的头部扩 展字段携带有插入信息, 所述响应信息由服务器或用户设备在接收 IP网络流 中的数据报文后生成;
解析单元 172, 用于解析所述响应报文的头部扩展字段以确定所述响应报 文的头部扩展字段携带的所述插入信息;
处理单元 173, 用于根据所述插入信息进行所述扩散网元 170的本地流表 管理;
发送单元 174, 用于向第二下游设备发送所述响应报文以便所述第二下游 设备根据所述插入信息进行流表管理,或将所述响应报文携带的所述插入信息 删除后向所述第二下游设备发送。
可选的, 在本实施例的一种实现方式中, 所述处理单元 173包括: 处理子 单元, 用于在所述插入信息包含所述第一识别结果和第四识别状态码时,将所 述第一识别结果保存至所述本地流表中, 所述第一识别结果是所述 IP网络流 成功完成深度 文检测识别时的识别结果,所述第四识别状态码用于向所述扩 散网元 170指示所述响应报文携带有所述第一识别结果。
本实施例提供的扩散网元 170能够对接收的响应报文进行解析,并将响应 报文的头部扩展字段携带的第一识别结果保存至本地流表从而获取第一识别 结果。
本领域技术人员应当理解,扩散网元 170也可以具有图 13至图 16所示扩 散网元的结构和功能, 本发明对此不进行详述。
图 18是根据本发明一种实施例的识别功能网元的结构示意图,参照图 18, 识别功能网元 180包括: 接收机 181、 发射机 182和存储器 183, 以及与接收 机 181、 发射机 182和存储器 183分别连接的处理器 184。 其中,
存储器 183存储有各种数据、程序与应用, 以由处理器 184调用从而实现 以下功能:
处理器 184通过接收机 181接收 IP网络流中的数据报文;
对所述数据报文进行识别,如果成功识别所述数据报文, 则将识别得到的 第一识别结果保存至所述识别功能网元的本地流表,并将所述第一识别结果插 入所述数据报文的头部扩展字段; 如果无法识别所述数据报文, 则将第二识别 结果插入所述数据报文的头部扩展字段,所述第二识别结果为所述识别功能网 元 180创建所述本地流表时的识别结果初始值;
当根据业务配置确定无需丢弃所述数据报文时,通过所述发射机 182向第 一下游设备发送携带有所述第一识别结果或第二识别结果的数据报文。
可选的, 存储器 183存储有所述识别功能网元 180的本地流表。
可选的, 所述数据报文包括: IPv4报文或 IPv6报文; 当所述数据报文为 IPv4报文时, 所述头部扩展字段为所述 IPv4报文头部的选项字段, 当所述数 据报文为 IPv6报文时, 所述头部扩展字段为所述 IPv6报文头部的扩展报头字 段。
可选的, 所述数据报文的头部扩展字段还包含第一识别状态码, 用于向所 述第一下游设备指示所述数据报文携带有所述第一识别结果或第二识别结果。
可选的, 如果所述数据报文是所述 IP网络流中第一个进入所述识别功能 网元进行识别的数据包, 则在成功识别或无法识别所述数据报文时,在所述数 据报文的头部扩展字段插入识别首包标记, 用于标识所述 IP网络流中第一个 进入所述识别功能网元进行识别的数据包。
进一步可选的,在通过发射机 182向所述第一下游设备发送携带有所述第 二识别结果和识别首包标记的数据报文之后, 在本实施例的一种实现方式中, 处理器 184还用于:
通过接收机 181接收响应报文,所述响应报文由所述第一下游设备发送至 所述识别功能网元,所述响应报文携带有响应消息并且所述响应报文的头部扩 展字段携带有所述第一识别结果,所述响应消息由服务器或用户设备在接收到 所述数据^艮文后生成,所述响应^¾文用于将所述第一识别结果通知所述识别功 能网元;
解析所述响应报文以将所述第一识别结果保存至所述本地流表; 将所述响应报文携带的所述第一识别结果删除后向第二下游设备发送。 其中, 可选的, 所述响应报文的头部扩展字段中还包含第二识别状态码, 用于向所述识别功能网元 180指示所述响应报文携带有所述第一识别结果。
可选的,在本实施例的一种实现方式中, 所述识别功能网元 180的本地流 表中设置有第一反向识别结果携带标记,用于所述识别功能网元 180根据所述 第一反向识别结果携带标记确定是否在之后接收到的响应报文的头部扩展字 段插入所述第一识别结果,所述响应报文由服务器或用户设备在接收所述数据 报文后生成, 并由所述第一下游设备转发至所述识别功能网元 180, 所述第一 反向识别结果携带标记在所述识别功能网元 180 成功识别所述数据报文时置 为真;
在通过发射机 182 向所述第一下游设备发送携带有所述第一识别结果的 数据报文之后, 处理器 184还用于:
通过接收机 181接收所述响应报文;
判断所述第一反向识别结果携带标记为真,则将所述第一识别结果插入所 述响应报文的头部扩展字段,将所述第一反向识别结果携带标记置为假, 然后 通过发射机 182向第二下游设备发送携带有所述第一识别结果的响应报文。可 选的,在将所述第一识别结果插入所述响应报文的头部扩展字段时,还将第四 识别状态码插入所述响应报文的头部扩展字段,用于向所述第二下游设备指示 所述响应报文携带所述第一识别结果。
可选的,在本实施例的一种实现方式中, 所述识别功能网元 180的本地流 表中设置有第二反向识别结果携带标记,用于所述识别功能网元 180根据所述 第二反向识别结果携带标记确定是否在之后接收的下一个数据报文的头部扩 展字段插入所述第一识别结果, 所述下一个数据报文属于所述 IP网络流; 在通过发射机 182 向所述第一下游设备发送携带有所述第一识别结果的 数据报文后, 所述处理器 184还用于:
通过接收机 181接收响应报文,所述响应报文由所述第一下游设备发送至 所述识别功能网元,所述响应报文携带有响应消息并且所述响应报文的头部扩 展字段携带有识别结果请求信息,所述响应消息由服务器或用户设备在接收所 述数据报文或所述 IP网络流的后续数据报文后生成, 所述识别结果请求信息 用于向所述识别功能网元 180请求所述第一识别结果;
解析所述响应报文,发现所述响应报文的头部扩展字段携带有所述识别结 果请求信息, 则将所述第二反向识别结果携带标记置为真,将所述响应报文携 带的所述识别结果请求信息删除后,通过发射机 182向第二下游设备发送, 其 中, 所述响应报文的头部扩展字段还包含第三识别状态码, 用于向所述识别功 能网元 180指示所述响应报文携带有所述识别结果请求信息;
通过接收机 181接收到所述下一个数据报文,判断所述第二反向识别结果 携带标记为真, 则将所述第二反向识别结果携带标记置为假,将所述第一识别 结果插入所述下一个数据报文的头部扩展字段,然后在根据业务配置确定无需 丢弃携带有所述第一识别结果的所述下一个数据报文时, 将其通过发射机 182 发送至所述第一下游设备。
可选的,在本实施例的一种实现方式中,在处理器 184无法识别所述数据 报文的情况下,在通过发射机 182向所述第一下游设备发送携带有所述第二识 别结果的数据报文之后, 所述处理器 184还用于:
通过接收机 181接收到响应报文,所述响应报文由服务器或用户设备在接 收所述数据报文后生成, 并由所述第一下游设备转发至所述识别功能网元 180;
对所述响应报文进行识别,如果成功识别所述响应报文从而获取所述第一 识别结果, 则将所述第一识别结果保存至所述本地流表, 并将所述第一识别结 果插入所述识别功能网元接收的下一个数据报文的头部扩展字段,所述下一个 数据报文属于所述 IP网络流;
如果无法识别所述响应报文, 则对所述下一个数据报文进行识别。
进一步可选的,所述识别功能网元 180的本地流表中设置有第三反向识别 结果携带标记,用于所述识别功能网元 180根据所述第三反向识别结果确定是 否在所述下一个数据报文的头部扩展字段插入所述第一识别结果; 处理器 184 通过以下方式将所述第一识别结果插入所述识别功能网元接收的下一个数据 报文的头部扩展字段:
当所述处理器 184成功识别所述响应报文时,将所述第三反向识别结果携 带标记置为真;
通过发射机 182向第二下游设备转发所述响应报文,或者将所述第一识别 结果插入所述响应报文的头部扩展字段,然后再通过发射机 182向所述第二下 游设备发送。可选的,在将所述第一识别结果插入所述响应报文的头部扩展字 段时,还将第四识别状态码插入所述响应报文的头部扩展字段, 用于向所述第 二下游设备指示所述响应报文携带所述第一识别结果;
通过接收机 181接收所述下一个数据报文,判断所述第三反向识别结果携 带标记为真, 则将所述第一识别结果插入所述下一个数据报文的头部扩展字 段,将所述第三反向识别结果携带标记置为假, 并在根据业务配置确定无需丢 弃携带有所述第一识别结果的所述下一个数据报文时,通过发射机 182将其发 送至所述第一下游设备。
图 19是根据本发明一种实施例的识别功能网元的结构示意图,参照图 19, 识别功能网元 190包括: 接收机 191、 发射机 192和存储器 193, 以及与接收 机 191、 发射机 192和存储器 193分别连接的处理器 194。 其中,
存储器 193存储有各种数据、程序与应用, 以由处理器 194调用从而实现 以下功能:
处理器 194通过接收机 191接收 IP网络流中的数据报文;
解析所述数据报文的头部扩展字段以确定所述数据报文的头部扩展字段 携带的插入信息;
根据所述插入信息进行报文转发处理;
当根据业务配置确定无需丢弃所述数据报文时,进行报文转发处理,包括: 通过发射机 192 向第一下游设备发送所述数据报文以便所述第一下游设备根 据所述插入信息进行流表管理, 或将所述数据报文携带的所述插入信息删除 后, 通过发射机 192 向所述第一下游设备发送未携带所述插入信息的数据报 文。
可选的, 所述存储器 193存储所述扩散网元 190的本地流表。
可选的, 所述数据报文包括: IPv4报文或 IPv6报文; 当所述数据报文为 IPv4报文时, 所述头部扩展字段为所述 IPv4报文头部的选项字段, 当所述数 据报文为 IPv6报文时, 所述头部扩展字段为所述 IPv6报文头部的扩展 头字 段。
可选的,处理器 194根据所述插入信息进行所述扩散网元的本地流表管理 包括:
如果所述插入信息包含第一识别结果, 或, 包含所述第一识别结果和第一 识别状态码, 则将所述第一识别结果保存至所述本地流表;
如果所述插入信息包含第二识别结果, 或, 包含所述第二识别结果和第一 识别状态码, 则创建或刷新所述本地流表而不保存所述第二识别结果;
如果所述插入信息包含识别结果请求信息, 或, 包含所述识别结果请求信 息和第三识别状态码, 则创建或刷新所述本地流表;
其中,所述第一识别结果是所述数据报文成功完成深度报文检测识别时的 识别结果,所述第二识别结果是所述扩散网元 190创建所述本地流表时的识别 结果初始值,所述第一识别状态码用于向所述扩散网元 190指示所述数据报文 携带所述第一识别结果或第二识别结果,所述第三识别状态码用于向第二下游 设备指示所述数据报文携带所述识别结果请求信息,所述识别结果请求信息用 于向所述第二下游设备请求所述第一识别结果。
其中,可选的,当所述插入信息包含所述第一识别结果或第二识别结果时, 所述插入信息还包含: 识别首包标记, 用于标识所述 IP网络流中第一个进行 深度报文检测识别的数据报文。
进一步可选的, 所述处理器 194还用于:
在所述本地流表中配置第四反向识别结果携带标记,用于所述扩散网元根 据所述第四反向识别结果携带标记确定是否将所述第一识别结果通知所述第 二下游设备;
在所述插入信息包含所述识别首包标记和第二识别结果时,确定所述本地 流表是否保存有所述第一识别结果,如果是, 则将所述第四反向识别结果携带 标记置为真;
在进行报文转发处理后,通过接收机 191接收响应报文,所述响应报文由 服务器或用户设备在接收所述数据报文后生成,并由所述第一下游设备转发至 所述扩散网元 190;
判断所述第四反向识别结果携带标记为真,则将所述第一识别结果插入所 述响应报文的头部扩展字段,将所述第四反向识别结果携带标记置为假; 可选 的, 当将所述第一识别结果插入所述响应报文的头部扩展字段时,还将第二识 别状态码插入所述响应报文的头部扩展字段,以向所述第二下游设备指示所述 响应报文携带有所述第一识别结果;
通过发射机 192 向所述第二下游设备发送携带有所述第一识别结果的响 应报文, 以将所述第一识别结果通知所述第二下游设备。
可选的, 在本实施例的一种实现方式中, 所述处理器 194还用于: 在所述本地流表中设置计算识别结果等待报文计数,用于计算所述扩散网 元在获取所述第一识别结果之前所接收到的数据报文的数目;
在所述本地流表未保存有所述第一识别结果的情况下,如果所述插入信息 不包含所述第一识别结果,或者所述插入信息包含所述第一识别结果但却未将 所述第一识别结果保存至所述本地流表,则判断所述识别结果等待报文计数是 否超过预设阈值, 如果是, 则向所述第二下游设备请求所述第一识别结果。
进一步可选的, 所述处理器 194还用于:
在所述本地流表中配置第五反向识别结果携带标记, 用于所述扩散网元
190根据所述第五反向识别结果携带标记确定是否向所述第二下游设备请求 所述第一识别结果, 并在判断所述识别结果等待报文计数超过预设阈值时,将 所述第五反向识别结果携带标记置为真;
在进行 文转发处理后, 所述处理器 194还用于:
通过接收机 191接收响应报文,所述响应报文由服务器或用户设备在接收 所述数据报文后生成, 并由所述第一下游设备转发至所述扩散网元 190;
判断所述第五反向识别结果携带标记为真,则将所述识别结果请求信息插 入所述响应报文的头部扩展字段, 将所述第五反向识别结果携带标记置为假, 将所述识别结果等待报文计数清零;
通过发射机 192 向所述第二下游设备发送携带有所述识别结果请求信息 的响应报文, 以向所述第二下游设备请求所述第一识别结果, 以便所述第二下 游设备在接收到携带有所述识别结果请求信息的响应报文后,在接收到属于所 述 IP网络流的下一个数据报文时, 在所述下一个数据报文的头部扩展字段插 入所述第一识别结果然后再发送至所述扩散网元 190;
通过接收机 191接收所述下一个数据报文并进行解析,将所述第一识别结 果保存至所述本地流表从而获取所述第一识别结果。
可选的, 在本实施例的一种实现方式中, 处理器 194还用于: 通过接收机 191接收响应报文,所述响应报文由第一下游设备发送至所述 扩散网元,所述响应报文携带有响应信息并且所述响应报文的头部扩展字段携 带有插入信息, 所述响应信息由服务器或用户设备在接收 IP网络流中的数据 4艮文后生成;
解析所述响应报文的头部扩展字段以确定所述响应报文的头部扩展字段 携带的所述插入信息;
根据所述插入信息进行所述扩散网元的本地流表管理;
通过发射机 192 向第二下游设备发送所述响应报文以便所述第二下游设 备根据所述插入信息进行流表管理,或将所述响应报文携带的所述插入信息删 除后,通过发射机 192向所述第二下游设备发送未携带所述插入信息的响应报 文。
进一步可选的 ,如果所述插入信息包含所述第一识别结果和第四识别状态 码, 则处理器 194还用于: 将所述第一识别结果保存至所述本地流表中, 所述 第一识别结果是所述 IP网络流成功完成深度报文检测识别时的识别结果, 所 述第四识别状态码用于向所述扩散网元 190指示所述响应报文携带有所述第 一识别结果。
可选的, 所述处理器还用于:
通过接收机 191接收头部扩展字段携带有识别结果请求信息的响应报文, 或者接收头部扩展字段携带有所述第一识别结果和第二识别状态码的响应报 文;
通过发射机 192向所述第二下游设备转发上述接收到的响应报文。
本发明一种实施例还提供一种识别结果扩散系统, 包括图 9A至图 12所 示实施例中的任意一种识别功能网元和图 13A至图 16所示实施例中的任意一 种扩散网元。
本发明一种实施例还提供一种识别结果扩散系统, 包括图 9A至图 12所 示实施例中的任意一种识别功能网元, 图 13A至图 16所示实施例中的任意一 种扩散网元, 以及图 17所示的扩散网元。
其中,对于所述识别功能网元和扩散网元的详细说明,请参照上文各装置 实施例中的相应说明, 此处不再赞述。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程, 是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算 机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。 其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Random Access Memory, RAM )等。
以上所揭露的仅为本发明一种较佳实施例而已,当然不能以此来限定本发 明之权利范围, 因此依本发明权利要求所作的等同变化,仍属本发明所涵盖的 范围。

Claims

1、 一种深度报文检测(DPI )识别结果扩散方法, 其特征在于, 所述方法 包括:
识别功能网元接收网络流中的数据报文;
对所述数据报文进行 DPI识别,如果成功识别所述数据报文, 则将识别得 到的第一识别结果保存至所述识别功能网元的本地流表,并将所述第一识别结 果插入所述数据报文的头部扩展权字段; 如果无法识别所述数据报文, 则将第二 识别结果插入所述数据报文的头部扩利 _展字段,所述第二识别结果为所述识别功 能网元创建所述本地流表时的识别结果 5 8初要始值;
向第一下游设备发送携带有所述第一识别结果或所述第二识别结果的所
述数据报文。
2、 如权利要求 1所述方法, 其特征在于,
所述数据报文为 IPv4报文或 IPv6报文;
当所述数据报文为 IPv4报文时, 所述将所述第一识别结果插入所述数据 报文的头部扩展字段, 包括: 将所述第一识别结果插入所述数据报文头部的选 项字段; 当所述数据报文为 IPv6报文时, 所述将所述第一识别结果插入所述 数据报文的头部扩展字段, 包括: 将所述第一识别结果插入所述数据报文的扩 展头部字段。
3、 如权利要求 1或 2所述方法, 其特征在于, 所述数据报文的头部扩展 字段还包含第一识别状态码,用于向所述第一下游设备指示所述数据报文是否 携带有所述第一识别结果或第二识别结果。
4、 如权利要求 1或 2所述方法, 其特征在于, 当所述数据报文是所述网 络流中第一个进入所述识别功能网元进行识别的数据包时,则在将所述第二识 别结果插入所述数据报文的头部扩展字段之后, 所述方法还包括:
在所述数据报文的头部扩展字段插入识别首包标记,以使所述第一下游设 备在接收到携带有首包标记的所述数据报文后,向所述识别功能网元发送携带 有所述第一识别结果的响应报文;所述响应报文还包含有服务器或用户设备在 接收到所述数据报文后生成响应消息;所述首包标记用于标识所述网络流中第 一个进入所述识别功能网元进行识别的数据包。
接收并解析所述响应报文,得到所述第一识别结果, 并将所述第一识别结 果保存至所述本地流表;
将所述响应报文携带的所述第一识别结果删除后向第二下游设备发送。
5、 如权利要求 4所述方法, 其特征在于,
所述响应报文的头部扩展字段中还包含第二识别状态码,用于向所述识别 功能网元指示所述响应报文携带有所述第一识别结果。
6、 如权利要求 1至 4中任一项所述方法, 其特征在于,
所述本地流表中设置有第一反向识别结果携带标记,用于指示是否在接收 到的响应报文的头部扩展字段插入所述第一识别结果;所述第一反向识别结果 携带标记在所述识别功能网元成功识别所述数据报文时置为真;
在向所述第一下游设备发送携带有所述第一识别结果的数据报文之后,所 述方法还包括:
接收所述服务器或用户设备在接收到所述数据报文之后发出的响应报文; 所述响应_¾文由所述第一下游设备转发至所述识别功能网元;
判断所述第一反向识别结果携带标记是否为真,如果是, 则将所述第一识 别结果插入所述响应报文的头部扩展字段,并将所述第一反向识别结果携带标 记置为假, 然后向第二下游设备发送携带有所述第一识别结果的响应报文。
7、 如权利要求 1至 4中任一项所述方法, 其特征在于,
所述本地流表中设置有第二反向识别结果携带标记,用于指示所述识别功 能网元是否在接收到所述数据报文之后接收的下一个数据报文的头部扩展字 段插入所述第一识别结果, 所述下一个数据报文属于所述网络流;
在向所述第一下游设备发送携带有所述第一识别结果的数据报文后,所述 方法还包括:
接收响应报文,所述响应报文由所述第一下游设备发送至所述识别功能网 元,所述响应报文携带有响应消息并且所述响应报文的头部扩展字段携带有识 别结果请求信息,所述响应消息由服务器或用户设备在接收所述数据报文后生 成, 所述识别结果请求信息用于向所述识别功能网元请求所述第一识别结果; 解析所述响应报文,将所述第二反向识别结果携带标记置为真,将所述响 应报文携带的所述识别结果请求信息删除后向第二下游设备发送, 其中, 所述 响应报文的头部扩展字段还包含第三识别状态码,用于向所述识别功能网元指 示所述响应报文携带有所述识别结果请求信息;
接收所述网络流中的下一个数据报文,判断所述第二反向识别结果携带标 记是否为真, 如果是, 则将所述第二反向识别结果携带标记置为假, 并将所述 第一识别结果插入所述下一个数据报文的头部扩展字段,然后将所述下一个数 据报文发送至所述第一下游设备。
8、 如权利要求 1至 4中任一项所述方法, 其特征在于, 如果无法识别所 述数据报文,则在向所述第一下游设备发送携带有所述第二识别结果的数据报 文之后, 所述方法还包括:
接收响应报文,所述响应报文由服务器或用户设备在接收所述数据报文后 生成, 并由所述第一下游设备转发至所述识别功能网元;
对所述响应报文进行识别,得到所述第一识别结果,将所述第一识别结果 保存至所述本地流表,并将所述第一识别结果插入所述识别功能网元接收的下 一个数据报文的头部扩展字段, 所述下一个数据报文属于所述网络流。
9、 一种识别功能网元, 其特征在于, 所述网元包括:
第一接收单元, 用于接收网络流中的数据报文;
第一识别单元, 用于对所述数据报文进行深度报文检测 (DPI )识别; 第一处理单元, 用于在所述第一识别单元成功识别所述数据报文时,将识 别得到的第一识别结果保存至所述识别功能网元的本地流表,并将所述第一识 别结果插入所述数据报文的头部扩展字段;在所述第一识别单元无法识别所述 数据报文时,将第二识别结果插入所述数据报文的头部扩展字段, 所述第二识 别结果为所述识别功能网元创建所述本地流表时的识别结果初始值;
第一发送单元,用于向第一下游设备发送携带有所述第一识别结果或所述 第二识别结果的所述数据报文。
10、 如权利要求 9所述网元, 其特征在于, 所述第一处理单元还用于在所 述数据报文的头部扩展字段插入第一识别状态码,用于向所述第一下游设备指 示所述数据报文携带有所述第一识别结果或第二识别结果。
11、 如权利要求 9或 10所述的网元, 其特征在于, 如果所述数据报文是 所述识别功能网元接收到的所述网络流中的第一个数据包,则所述第一处理单 元还用于,在将所述第二识别结果插入所述数据报文的头部扩展字段之后,在 所述数据报文的头部扩展字段插入识别首包标记,以使所述第一下游设备在接 收到携带有首包标记的所述数据报文后,向所述识别功能网元发送携带有所述 第一识别结果的响应报文;所述响应报文还包含有服务器或用户设备在接收到 所述数据报文后生成响应消息;所述首包标记用于标识所述网络流中第一个进 入所述识别功能网元进行识别的数据包。
12、 如权利要求 11所述的网元, 其特征在于, 所述网元还包括: 第二接收单元,用于在所述第一发送单元向所述第一下游设备发送携带有 所述第二识别结果和识别首包标记的数据报文之后,接收响应报文, 所述响应 报文携带有响应消息并且所述响应报文的头部扩展字段携带有所述第一识别 结果, 所述响应消息由服务器或用户设备在接收到所述数据报文后生成; 第二处理单元,用于解析所述响应报文以将所述第一识别结果保存至所述 本地流表, 然后将所述响应报文携带的所述第一识别结果删除;
第二发送单元,用于向第二下游设备发送所述第二处理单元处理后的响应 报文。
13、 如权利要求 9或 10所述的网元, 其特征在于, 所述网元还包括: 第一配置单元, 用于在所述本地流表中配置第一反向识别结果携带标记, 并在所述第一识别单元成功识别所述数据报文时,将所述第一反向识别结果携 带标记置为真;所述第一反向识别结果携带标记用于指示是否在接收到的响应 报文的头部扩展字段插入所述第一识别结果, 其中, 所述响应报文由服务器或 用户设备在接收所述数据报文后生成,并由所述第一下游设备转发至所述识别 功能网元;
第三接收单元,用于在所述第一发送单元向所述第一下游设备发送携带有 所述第一识别结果的数据报文后, 接收所述响应报文;
第三处理单元, 用于在所述第三接收单元接收到所述响应报文时, 判断所 述第一反向识别结果携带标记是否为真,如果是, 则将所述第一识别结果插入 所述响应报文的头部扩展字段, 并将所述第一反向识别结果携带标记置为假; 第三发送单元,用于向所述第二下游设备发送插入所述第一识别结果后的 所述响应 4艮文。
14、 如权利要求 9或 10所述的网元, 其特征在于, 所述网元还包括: 第二配置单元, 用于在所述本地流表中配置第二反向识别结果携带标记, 并在第四接收单元接收到响应报文时,将所述第二反向识别结果携带标记置为 真;所述第二反向识别结果携带标记用于指示是否在所述识别功能网元接收的 下一个数据报文的头部扩展字段插入所述第一识别结果;
第四接收单元,用于在所述第一发送单元向所述第一下游设备发送携带有 所述第一识别结果的数据报文后,接收响应报文, 所述响应报文由所述第一下 游设备发送至所述识别功能网元,所述响应报文携带有响应消息并且所述响应 报文的头部扩展字段携带有识别结果请求信息,所述响应消息由服务器或用户 设备在接收所述数据报文或所述网络流的其他数据报文后生成,所述识别结果 请求信息用于向所述识别功能网元请求所述第一识别结果;
第四处理单元, 用于将所述响应报文携带的所述识别结果请求信息删除; 第四发送单元,用于向第二下游设备发送删除识别结果请求信息后的所述 响应 4艮文;
第五接收单元, 用于接收下一个数据报文; 所述下一个数据报文是所述识 别功能网元在接收到所述数据报文之后,接收到的下一个数据报文,且所述下 一个数据报文属于所述网络流;
第五处理单元, 用于判断所述第二反向识别结果携带标记是否为真,如果 是则将所述第一识别结果插入所述下一个数据报文的头部扩展字段;
第五发送单元,用于将携带有所述第一识别结果的所述下一个数据报文发 送至所述第一下游设备。
15、 如权利要求 9或 1 0所述的网元, 其特征在于, 所述网元还包括: 第六接收单元,用于在所述第一发送单元向所述第一下游设备发送携带有 所述第二识别结果的数据报文后,接收响应报文, 所述响应报文由服务器或用 户设备在接收所述数据报文后生成,并由所述第一下游设备转发至所述识别功 能网元;
第二识别单元, 用于对所述响应报文进行识别;
第六处理单元,用于在所述第二识别单元成功识别所述响应报文后获取第 一识别结果,将所述第一识别结果保存至所述本地流表, 并将所述第一识别结 果插入所述识别功能网元接收的下一个数据报文的头部扩展字段,所述下一个 数据报文属于所述网络流。
PCT/CN2013/080594 2012-12-19 2013-08-01 深度报文检测结果扩散方法及装置 WO2014094432A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CA2838215A CA2838215C (en) 2012-12-19 2013-08-01 Method and device for spreading deep packet inspection result
EP13805726.0A EP2768197B1 (en) 2012-12-19 2013-08-01 Deep packet inspection result dissemination method and device
US14/109,389 US9497089B2 (en) 2012-12-19 2013-12-17 Method and device for spreading deep packet inspection result

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210553157.8 2012-12-19
CN201210553157.8A CN103067199B (zh) 2012-12-19 2012-12-19 深度报文检测结果扩散方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US14/109,389 Continuation US9497089B2 (en) 2012-12-19 2013-12-17 Method and device for spreading deep packet inspection result

Publications (1)

Publication Number Publication Date
WO2014094432A1 true WO2014094432A1 (zh) 2014-06-26

Family

ID=48109669

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/080594 WO2014094432A1 (zh) 2012-12-19 2013-08-01 深度报文检测结果扩散方法及装置

Country Status (4)

Country Link
US (1) US9497089B2 (zh)
CN (1) CN103067199B (zh)
CA (1) CA2838215C (zh)
WO (1) WO2014094432A1 (zh)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103067199B (zh) 2012-12-19 2015-11-25 华为技术有限公司 深度报文检测结果扩散方法及装置
WO2015107067A1 (en) * 2014-01-15 2015-07-23 Telefonaktiebolaget L M Ericsson (Publ) Processing of data files
US20160013976A1 (en) * 2014-07-14 2016-01-14 Futurewei Technologies, Inc. Wireless Through Link Traffic Reduction
EP3166275A4 (en) * 2014-08-11 2017-07-19 Huawei Technologies Co., Ltd. Packet control method, switch and controller
WO2016175873A1 (en) * 2015-04-29 2016-11-03 Hewlett Packard Enterprise Development Lp Client communications in multi-tenant data center networks
CN107580768B (zh) * 2015-07-17 2020-06-26 华为技术有限公司 报文传输的方法、装置和系统
CN106953835B (zh) * 2016-01-06 2020-05-22 中兴通讯股份有限公司 一种检测报文的方法、装置和系统
US11431677B2 (en) * 2018-01-11 2022-08-30 Nicira, Inc. Mechanisms for layer 7 context accumulation for enforcing layer 4, layer 7 and verb-based rules
CN109041262B (zh) * 2018-08-23 2020-06-16 Oppo广东移动通信有限公司 数据传输方法及相关装置
CN109327389B (zh) * 2018-11-13 2021-06-08 南京中孚信息技术有限公司 流量分类标签转发方法、装置和系统
CN110166530B (zh) * 2019-04-17 2023-02-03 平安普惠企业管理有限公司 基于微服务返回值的处理方法、电子装置及计算机设备
CN112350934A (zh) * 2019-08-07 2021-02-09 中国电信股份有限公司 数据传输方法、网络节点和数据传输系统

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101978677A (zh) * 2008-03-21 2011-02-16 阿尔卡特朗讯公司 带内应用认知传播的增强
CN101997826A (zh) * 2009-08-28 2011-03-30 中兴通讯股份有限公司 一种控制网元、转发网元及因特网协议网络的路由方法
US8000244B1 (en) * 2007-08-03 2011-08-16 Hewlett-Packard Development Company, L.P. Shared rate limiters using floating buckets
CN103067199A (zh) * 2012-12-19 2013-04-24 华为技术有限公司 深度报文检测结果扩散方法及装置

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6873618B1 (en) * 1999-03-16 2005-03-29 Nortel Networks Limited Multipoint network routing protocol
US7746953B1 (en) * 2000-09-12 2010-06-29 Alcatel-Lucent Usa Inc. Method and apparatus for asynchronous incremental redundancy transmission in a communication system
US7126952B2 (en) * 2001-09-28 2006-10-24 Intel Corporation Multiprotocol decapsulation/encapsulation control structure and packet protocol conversion method
KR100490729B1 (ko) * 2003-05-20 2005-05-24 한국전자통신연구원 보안 게이트웨이 시스템과 이를 이용한 침입 탐지 방법
ATE492109T1 (de) * 2004-03-26 2011-01-15 Canon Kk Internet protocol tunnelling mit hilfe von vorlagen
US8885644B2 (en) * 2008-02-28 2014-11-11 Alcatel Lucent Compressed IP flow recognition for in-line, integrated mobile DPI
US8165024B2 (en) * 2008-04-03 2012-04-24 Alcatel Lucent Use of DPI to extract and forward application characteristics
CN101605093B (zh) 2009-04-22 2012-05-09 网经科技(苏州)有限公司 利用IP Option实现信息透传的方法
US8837483B2 (en) * 2011-04-11 2014-09-16 Alcatel Lucent Mapping private and public addresses
US20130024553A1 (en) * 2011-07-18 2013-01-24 Cisco Technology, Inc. Location independent dynamic IP address assignment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8000244B1 (en) * 2007-08-03 2011-08-16 Hewlett-Packard Development Company, L.P. Shared rate limiters using floating buckets
CN101978677A (zh) * 2008-03-21 2011-02-16 阿尔卡特朗讯公司 带内应用认知传播的增强
CN101997826A (zh) * 2009-08-28 2011-03-30 中兴通讯股份有限公司 一种控制网元、转发网元及因特网协议网络的路由方法
CN103067199A (zh) * 2012-12-19 2013-04-24 华为技术有限公司 深度报文检测结果扩散方法及装置

Also Published As

Publication number Publication date
CA2838215C (en) 2016-09-27
CN103067199A (zh) 2013-04-24
US9497089B2 (en) 2016-11-15
CA2838215A1 (en) 2014-06-19
US20140173104A1 (en) 2014-06-19
CN103067199B (zh) 2015-11-25

Similar Documents

Publication Publication Date Title
WO2014094432A1 (zh) 深度报文检测结果扩散方法及装置
US10616120B2 (en) Service layer southbound interface and quality of service
KR102259652B1 (ko) 멀티 패스 트랜스포트 제어 프로토콜을 지원하는 통신 네트워크에서 서비스 제공 장치 및 방법
CN108432194B (zh) 一种拥塞处理的方法、主机及系统
US8817792B2 (en) Data forwarding method, data processing method, system and relevant devices
CN113709057A (zh) 网络拥塞的通告方法、代理节点、网络节点及计算机设备
JP2018508151A (ja) 伝送制御プロトコルtcpデータパケットを送信する方法及び装置、並びにシステム
CN110191066B (zh) 一种确定最大传输单元pmtu的方法、设备及系统
US9405638B2 (en) Fault detection method, gateway, user equipment, and communications system
US9948434B2 (en) Method for bit error rate detection, and network device
WO2021233327A1 (zh) 报文处理方法及装置、通告方法及装置、网桥节点、源设备、存储介质及报文处理系统
WO2022206252A1 (zh) 一种网络攻击的处理方法、装置、设备、计算机可读存储介质及计算机程序产品
US9800479B2 (en) Packet processing method, forwarder, packet processing device, and packet processing system
WO2022206251A1 (zh) 拒绝服务攻击的解决方法、装置、设备、介质和计算机程序产品
US10680930B2 (en) Method and apparatus for communication in virtual network
EP2768197B1 (en) Deep packet inspection result dissemination method and device
WO2021073103A1 (zh) 随流信息遥测能力的确认方法和设备
US20200084245A1 (en) Local breakout-based data interception method and device
CN109104367B (zh) 一种建立隧道的方法、网络设备和系统
CN111314347A (zh) 一种非法流量的处理方法、装置、系统和存储介质
WO2015051696A1 (zh) 一种传输oam报文的方法及装置
KR102368831B1 (ko) 통신 네트워크에서의 세션 관리 방법 및 장치
WO2023103504A1 (zh) 链路检测方法、公网节点和存储介质
CN114205405B (zh) 一种bfd报文发送方法、装置、电子设备及存储介质
WO2020073960A1 (zh) 消息通知方法、装置、网元、系统及存储介质

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 2013805726

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2838215

Country of ref document: CA

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

Ref document number: 13805726

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE