Data stream identification method and device, storage medium and computer program product

By using deep packet inspection technology, the data flow messages of unidentified service types are mirrored and sent to the second device for identification, which solves the problem of message disorder and resources caused by processing the same data flow on different DPI devices. Waste problem is eliminated and more efficient data flow processing and resource utilization are achieved.

CN118827201AActive Publication Date: 2024-10-22CHINA MOBILE COMM LTD RES INST +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202410947370.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-15
Publication Date
2024-10-22
Estimated Expiration
2044-07-15

AI Technical Summary

Technical Problem

In deep packet inspection technology, when the same data flow is processed on different DPI devices, it is easy to cause packet disorder and waste of DPI device resources. The existing technology requires all packets to be sent to one DPI device for identification and control. This leads to an increase in forwarding paths and a waste of resources.

Method used

By performing mirroring processing when the first device receives a data flow message of an unrecognized service type, and sending the mirrored message to the second device for service type identification, the number of message forwarding times is reduced and resource waste is avoided.

Benefits of technology

It effectively reduces the number of forwarding of data stream packets, avoids packet disorder and waste of DPI device resources, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118827201A_ABST
    Figure CN118827201A_ABST
Patent Text Reader

Abstract

The invention provides a data stream identification method and device, a storage medium and a computer program product. The method comprises the steps that a first device receives first service type information of a data stream sent by a second device; under the condition that the first service type information is that the service type is unidentified, performing mirroring processing on a first message of the received data stream to obtain a mirrored message; and sending the mirror image message to a second device for service type identification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data stream identification method, device, storage medium and computer program product. Background Art

[0002] Deep Packet Inspection (DPI) is a deep inspection technology based on data packets, such as performing deep inspection on different network application layer payloads (such as Hypertext Transfer Protocol (HTTP), Domain Name System (DNS), etc.).

[0003] In the related art, if different messages of a data stream appear in different DPI devices, all messages of the data stream are usually sent to one DPI device for identification and control. This method is likely to cause disorder in the message forwarding process of the data stream and waste of DPI device resources. Summary of the invention

[0004] In view of this, the present application hopes to provide a data flow identification method, device, storage medium and computer program product, which can reduce the disorder of data flow messages and the waste of DPI device resources.

[0005] The technical solution of this application is implemented as follows:

[0006] In a first aspect, the present application provides a data flow identification method, which is applied to a first device, and the method includes:

[0007] Receiving first service type information of a data stream sent by a second device;

[0008] When the first service type information indicates that the service type is unrecognized, mirroring the first message of the received data stream to obtain a mirror message;

[0009] The mirrored message is sent to the second device for service type identification.

[0010] In a second aspect, the present application provides a data flow identification method, which is applied to a second device, and the method includes:

[0011] Sending first service type information of a data stream to a first device, wherein the first service type information indicates that the service type is unidentified;

[0012] A mirrored message sent by the first device is received, and a service type of the data flow is identified based on the mirrored message.

[0013] In a third aspect, the present application provides a first device, wherein the first device includes:

[0014] A first receiving unit, configured to receive first service type information of a data stream sent by a second device;

[0015] A processing unit, configured to, when the first service type information indicates that the service type is unrecognized, mirror process the first message of the received data stream to obtain a mirror message;

[0016] The first sending unit is used to send the mirrored message to the second device for service type identification.

[0017] In a fourth aspect, the present application provides a second device, wherein the second device includes:

[0018] A second sending unit, configured to send first service type information of the data stream to the first device, wherein the first service type information is an unidentified service type;

[0019] The identification unit is used to receive the mirror message sent by the first device and identify the service type of the data flow based on the mirror message.

[0020] In a fifth aspect, the present application provides a first device, comprising: a first processor and a first memory; when the first processor executes a running program stored in the first memory, the data flow identification method on the first device side is implemented.

[0021] In a sixth aspect, the present application provides a second device, the second device comprising: a second processor and a second memory; when the second processor executes a running program stored in the second memory, the data flow identification method on the second device side is implemented.

[0022] In a seventh aspect, the present application provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the data flow identification method on the first device side mentioned above, or, when executed by a processor, implements the data flow identification method on the second device side mentioned above.

[0023] In an eighth aspect, the present application provides a computer program product, comprising a computer program, wherein the computer program implements the data flow identification method on the first device side when executed by a processor, or the computer program implements the data flow identification method on the second device side when executed by a processor.

[0024] The present application provides a data stream identification method, device, storage medium and computer program product, the method comprising: a first device receives first business type information of a data stream sent by a second device; when the first business type information is an unidentified business type, a first message of the received data stream is mirrored to obtain a mirror message; the mirror message is sent to the second device for business type identification; the second device sends the first business type information of the data stream to the first device, wherein the first business type information is an unidentified business type; the mirror message sent by the first device is received, and the business type of the data stream is identified based on the mirror message. With the above implementation scheme, the first device sets the first control strategy according to the business type information in the first flow table. If the first message corresponding to the data flow is received on the first device side, the first message is directly mirrored and the mirrored message obtained by the mirroring is sent to the second device, while the first message received on the second device is still subsequently processed by the first device. In this way, the operation of the first device forwarding the first message and the second device forwarding the first message to the first device after processing the first message is reduced, and the number of forwarding times of the message corresponding to the data flow is reduced, thereby reducing message disorder and resource waste of the first device. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A schematic diagram of sending a message during data stream transmission Figure 1 ;

[0026] Figure 2 A schematic diagram of sending a message during data stream transmission Figure 2 ;

[0027] Figure 3 A data flow identification method provided in an embodiment of the present application is shown in FIG. Figure 1 ;

[0028] Figure 4 A schematic diagram of an Internet Protocol version 4 (IPv4) message header provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of an Internet Protocol version 6 (IPv6) message header provided in an embodiment of the present application;

[0030] Figure 6 A schematic diagram of adding an identification field to an IPv4 message header provided in an embodiment of the present application;

[0031] Figure 7 A data flow identification method provided in an embodiment of the present application is shown in FIG. Figure 2 ;

[0032] Figure 8 A schematic diagram of message forwarding before a service type is identified provided in an embodiment of the present application;

[0033] Fig. 9 A schematic diagram of controlling a message after identifying a service type provided in an embodiment of the present application;

[0034] Fig.10 A schematic diagram of the overall flow of a data flow identification method provided in an embodiment of the present application;

[0035] Fig.11 A schematic diagram of the composition structure of a first device provided in an embodiment of the present application Figure 1 ;

[0036] Fig.12 A schematic diagram of the composition structure of a first device provided in an embodiment of the present application Figure 2 ;

[0037] Fig.13 A schematic diagram of the composition structure of a second device provided in an embodiment of the present application Figure 1 ;

[0038] Fig.14 A schematic diagram of the composition structure of a second device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0039] In order to enable a more detailed understanding of the features and technical contents of the embodiments of the present application, the technical solution of the present application is further elaborated in detail below in combination with the drawings and specific embodiments of the specification. The attached drawings are for reference only and are not used to limit the embodiments of the present application.

[0040] Unless otherwise defined, all technical and scientific terms used in the embodiments of the present application have the same meaning as those commonly understood by those skilled in the art to which the present application belongs. The terms used in the embodiments of the present application are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.

[0041] In the following description, reference is made to "some embodiments", which describe a subset of all possible embodiments, but it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments, and may be combined with each other without conflict. It should also be noted that the terms "first / second / third" involved in the embodiments of the present application are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0042] In DPI deep detection technology, the legitimacy of the message is determined by detecting the payload of the message. Usually, DPI technology is implemented through DPI equipment, which detects and analyzes the traffic and message content at key points of the network. It can filter and control the detected traffic according to pre-defined strategies, and can complete the refined identification of the services of the link, business traffic flow analysis, business traffic proportion statistics, business proportion shaping, application layer denial of service attacks, filtering of viruses and Trojans, and control of peer-to-peer (P2P) abuse.

[0043] In the related art, there is a technical problem with DPI, that is, if the messages of the same flow (ie the same five-tuple) appear on different DPI devices, DPI will be unable to identify the flow or will identify it incorrectly.

[0044] like Figure 1 As shown, the packets 2, 4, and 6 in the Internet access represented by the dotted line on the right and the access packets 1, 3, and 5 represented by the solid line on the left belong to the same flow, that is, the five-tuples of packets 1 to 6 are the same. The Broadband Remote Access Server (BRAS) sends packets 2, 4, and 6 to the content to be accessed via the metropolitan core router (CR) 2, DPI2, and backbone CR2; and sends packets 1, 3, and 5 to the content to be accessed via the metropolitan CR1, DPI1, and backbone CR1. However, since different packets of the same flow pass through different DPI devices, the DPI device cannot identify this flow or identifies the flow incorrectly.

[0045] To solve this problem, the relevant technical solution is to send all the messages of the same flow to a DPI device for identification and control. For a five-tuple flow, the DPI that receives the message of the flow first will establish a flow table, and all subsequent messages of the flow will be sent to the DPI for processing.

[0046] like Figure 2As shown in the figure, assuming that the initial packet 1 of a flow appears on DPI1, DPI1 will establish a flow table for the flow and perform DPI identification and control on the packets of the flow. If there are packets in the flow that appear on DPI2, DPI2 will not perform DPI processing on the packets, but forward them to DPI1 for processing, as shown in the figure. Figure 2 As shown by the dotted line on the right side of the figure, DPI2 forwards the message 2 that appears on DPI2 to DPI1. After DPI1 completes the DPI processing, it sends the message that appears on DPI2 back to DPI2 for subsequent forwarding processing.

[0047] With respect to the above technical solution, since the flow route of the user's data stream is changed during the data stream transmission process, the following technical problems will occur:

[0048] (1) Since the messages on DPI2 need to be sent to DPI1 for processing, the forwarding path of these messages artificially increases by two hops, resulting in a detour. This will lead to a poor user experience and is likely to cause message disorder.

[0049] (2) Since the messages on DPI2 need to be sent to DPI1 for processing, and after DPI1 completes the processing, they need to be sent to DPI2 for further forwarding. Therefore, this part of the traffic needs to be processed by both DPI1 and DPI2, which results in a waste of CPU resources of the DPI device.

[0050] To solve the above problems, the present application provides a data flow identification method, such as Figure 3 As shown, applied to a first device, the method may include:

[0051] S301. Receive first service type information of a data stream sent by a second device.

[0052] In the embodiment of the present application, the first device may be DPI2.

[0053] In the embodiment of the present application, the second device may be DPI1.

[0054] In the embodiment of the present application, the first service type information indicates the specific service type corresponding to the data flow.

[0055] In this embodiment of the present application, the first service type information indicates that the service type is not identified.

[0056] It should be noted that the first service type information may be information contained in the flow table of the data flow established by DPI1, that is, DPI2 receives the flow table of the data flow, and the flow table contains the first service type information.

[0057] S302: When the first service type information indicates that the service type is unrecognized, mirror the first message of the received data stream to obtain a mirror message.

[0058] In an embodiment of the present application, if the first service type information received by DPI2 is an unrecognized service type, if any message in the data stream transmission process is received, the message is mirrored to obtain a mirrored message.

[0059] It should be noted that the premise of mirroring the first message is that the service type of the data stream is not identified. If the data stream has a corresponding service type, this process does not need to be performed.

[0060] S303: Send the mirrored message to the second device for service type identification.

[0061] In an embodiment of the present application, DPI2 sends the mirrored message obtained after mirroring to DPI1, and DPI1 further identifies the service type of the data flow based on the message received by DPI1 and the received mirrored message.

[0062] Exemplarily, if DPI1 first receives the corresponding message 1 in the data flow transmission process, DPI2 receives message 2, and the current first service type information is that the service type is not identified, then DPI2 mirrors message 2 to obtain a mirror message of message 2, and DPI2 sends the mirror message to DPI1. DPI1 can identify the service type of the data flow based on the received mirror message and message 1.

[0063] It should be noted that if the service type of the data stream is not identified based on the mirrored message of message 2 and message 1, then when DPI2 receives subsequent messages of the data stream, such as message 4, it can continue to mirror message 4 to obtain the mirrored message corresponding to message 4, and send the mirrored message corresponding to message 4 to DPI1, and DPI1 continues to identify the service type corresponding to the data stream, that is, identify the service type based on message 1, message 3, the mirrored message of message 2, and the mirrored message of message 4. And so on, until the service type of the data stream is identified.

[0064] It can be understood that in a data flow identification method provided in an embodiment of the present application, the first device sets a first control strategy according to the business type information in the first flow table. If a first message corresponding to the data flow is received on the first device side, the first message is directly mirrored and the mirrored message obtained by the mirroring is sent to the second device, while the first message received on the second device is still subsequently processed by the first device. In this way, the operation of the first device forwarding the first message and the second device forwarding the first message to the first device after processing the first message is reduced, and the number of forwarding times of the message corresponding to the data flow is reduced, thereby reducing message disorder and resource waste of the first device.

[0065] In one embodiment of the present application, while receiving the first service type information of the data stream sent by the second device, the first control strategy information of the data stream sent by the second device can also be received; the first control strategy information is updated to obtain the second control strategy information.

[0066] In an embodiment of the present application, the first control strategy information may be included in a flow table corresponding to the data flow, that is, DPI1 sends the flow table corresponding to the data flow to DPI1, and the flow table includes the first service type information and the first control strategy information.

[0067] It should be noted that, in addition to the first service type information and the first control strategy information, the flow table may also include a quintuple corresponding to the data flow.

[0068] In the embodiment of the present application, the first control strategy information may represent: none. Then the flow table may be represented as (quintuple: quintuple 1, first service type information: unidentified, first control strategy information: none).

[0069] In an embodiment of the present application, after DPI2 receives the flow table, since the first business type information is unidentified, it is necessary to modify the first control strategy information, and modify the first control strategy information to the second control strategy information, that is, change "None" to "Mirror to DPI1", and save the modified flow table. The modified flow table is: (quintuple: quintuple 1, first business type information: unidentified, second control strategy information: mirrored to DPI1).

[0070] In an embodiment of the present application, the first message of the received data stream is mirrored to obtain a mirrored message. Based on the second control strategy information, the first message of the received data stream is mirrored to obtain a mirrored message.

[0071] In an embodiment of the present application, when the message (such as message 2) during the data flow transmission reaches DPI2, DPI2 performs a corresponding flow table match based on the five-tuple and executes the second control strategy information, that is, mirroring a copy of message 2 to DPI1 for identification, that is, mirroring message 2 to obtain a mirrored message, and finally sending the mirrored message to DPI1 for identification.

[0072] In the embodiment of the present application, after DPI2 completes the mirroring processing of message 2, it also forwards the message 2 normally on DPI2.

[0073] In an embodiment of the present application, after DPI1 identifies the service type based on the received mirrored message, if the service type is type 1, the second control policy information in the flow table is modified to the third control policy information, wherein the third control policy information is strategy 1 corresponding to type 1, and the third control policy information is sent to DPI2.

[0074] In one embodiment of the present application, the first device receives third control strategy information sent by the second device; when receiving the second message of the data stream, the first device performs message transmission related processing on the second message based on the third control strategy information.

[0075] In an embodiment of the present application, the third control strategy information is a control strategy for a message corresponding to a service type. For example, if the service type is type 1, the third control strategy is strategy 1.

[0076] In an embodiment of the present application, the third control strategy information may include message forwarding processing, message discarding processing, etc.

[0077] In an embodiment of the present application, the third control strategy information may be included in a flow table and sent to the first device, that is, the first device receives the modified flow table sent by the second device, that is, the second control strategy information in the flow table is modified to the third control strategy information.

[0078] In an embodiment of the present application, after the service type of a data flow is identified, if DPI2 receives a subsequent message of the data flow, the received message is processed according to the third control strategy information, such as forwarding or discarding the received message.

[0079] For example, after DPI1 identifies the service type according to the received message 1 and the mirror message corresponding to the message 2, when DPI2 receives the message 4, it processes the message 4 based on the third control strategy information, such as discarding the message 4.

[0080] In an embodiment of the present application, when the first device sends a mirrored message to the second device, in order to facilitate the second device to identify whether it is a message normally forwarded by the first device or a mirrored message, it is necessary to expand the IP message header.

[0081] In an embodiment of the present application, a first message of a received data stream is mirrored to obtain a mirrored message, and then an identification field is added to a message header of the mirrored message.

[0082] The identification field is used to identify the mirror message.

[0083] In the embodiment of the present application, DPI1 needs to identify which messages are normal messages and which messages are mirrored messages from DPI2. Because mirrored messages need to be discarded after being processed by DPI1, and cannot be subsequently forwarded like normal messages. In order to facilitate DPI1 to identify mirrored messages, the IP message header is extended to identify whether the message is a mirrored message.

[0084] In the embodiment of the present application, since the IP header is divided into an IPv4 header and an IPv6 header, it is necessary to extend the IPv4 / IPv6 message header separately to support the identification of the mirror message.

[0085] In the embodiments of the present application, Figure 4 and Figure 5 As shown, Figure 4 Indicates the IPv4 packet header. Figure 5 Indicates the IPv6 packet header. Figure 4 In the IPv4 packet header, there are multiple fields, such as version (which can be expressed as Version in English), header length (which can be expressed as Header Length in English), Differentiated Service Field (which can be expressed as DS Field in English), total length (which can be expressed as Total Length in English), identification (which can be expressed as Identification in English), flags (which can be expressed as Flags in English), fragment offset (which can be expressed as Fragment Offset in English), life time (which can be expressed as Time toLive in English), protocol (which can be expressed as Protocol in English), header checksum (which can be expressed as Header Checksum in English), source IP address (which can be expressed as Source IP Address in English), destination IP address (which can be expressed as Destination IP Address in English), etc. In Figure 5In the IPv6 packet header, there are multiple fields, such as Version, Traffic Class, Flow Lable, Payload Length, Next Header, Hop Limit, Source Address, Destination Address, etc.

[0086] In the embodiment of the present application, the IP message header is extended to identify whether the message is a mirror message. Since the IP header is divided into an IPv4 header and an IPv6 header, they need to be extended separately.

[0087] For IPv4 header: Extend the DSCP / TOS field (RFC2474) of the IPv4 packet header, for example, define the last bit as "M", which indicates whether the packet is a mirrored packet. If this bit is set to 1, it is a mirrored packet, and if it is set to 0, it is a normal packet. Figure 6 As shown in FIG. 1 , the header of the IPv4 header is extended, and M is added to the last bit. In this way, the mirrored message can be identified by the value of M.

[0088] Figure 6 In the figure, DSCP stands for Differentiated Services Codepoint, CU stands for Currently Unused, and M stands for Mirrored Packet.

[0089] For the IPv6 header: Extend the Traffic Class field (RFC2460) of the IPv6 packet header. For example, define the last bit as "M", which indicates whether the packet is a mirrored packet. If this bit is set to 1, it is a mirrored packet. If it is set to 0, it is a normal packet.

[0090] The present application also provides a data flow identification method, such as Figure 7 As shown, applied to the second device, the method may include:

[0091] S701. Send first service type information of a data stream to a first device.

[0092] Among them, the first business type information is that the business type is not identified.

[0093] In the embodiment of the present application, the first device is DPI2, and the second device is DPI1.

[0094] In the embodiment of the present application, DPI1 sends first service type information to DPI2, and the first service type information may be an unidentified service type.

[0095] In an embodiment of the present application, the first service type information may be included in the established flow table for transmission. Specifically, assuming that a message (such as message 1) of a data stream (quintuple 1) first appears on DPI1, DPI1 establishes a flow table for the stream, and the flow table for the stream contains the first service type information: the service type is not identified, and sends the flow table to DPI2. DPI2 can obtain the first service type information from the flow table, and perform mirroring processing on the received message according to the first service type information to obtain a mirrored message.

[0096] S702: Receive a mirrored message sent by the first device, and identify a service type of the data flow based on the mirrored message.

[0097] In the embodiment of the present application, DPI1 receives the mirrored message sent by DPI2, and uses the mirrored message and the message received by itself to identify the service type of the data flow.

[0098] Exemplarily, DPI1 first receives message 1 in the data stream transmission process, and then receives the mirrored message after DPI2 mirrors the received message 2, and uses message 1 and the mirrored message corresponding to message 2 to identify the service type of the data stream.

[0099] It should be noted that when identifying the service type of the data stream, it is not limited to identifying based on the mirrored messages of message 1 and message 2. If identification cannot be made based on the mirrored messages of message 1 and message 2, identification can be continued in combination with subsequent messages.

[0100] It can be understood that in a data flow identification method provided in an embodiment of the present application, the second device receives the mirror message sent by the first device, and identifies the service type through the mirror message, thereby reducing the number of forwarding times of the message corresponding to the data flow, thereby reducing message disorder and resource waste of the second device.

[0101] In one embodiment of the present application, after identifying the service type corresponding to the data flow based on the mirror message, the third control policy information corresponding to the service type is determined based on the correspondence between the preset service type information and the preset control policy information; and the third control policy information is sent to the first device.

[0102] In the embodiment of the present application, after DPI1 identifies the service type of the data flow, it is necessary to determine the corresponding third control strategy according to the service type.

[0103] In the embodiment of the present application, control policies are configured on both DPI1 and DPI2, that is, the correspondence between preset service type information and preset control policies, such as service type: type 1, corresponding control policy: policy 1, service type: type 2, corresponding control policy: policy 2. It can be understood that for messages with service type 1, the control policy to be executed is policy 1.

[0104] In the embodiment of the present application, after the service type is determined, a third control strategy corresponding to the service type is determined from the preset correspondence, and the third control strategy is sent to DPI 2. For example, if the service type of the determined data flow is type 1, the third control strategy determined is strategy 1, and strategy 1 is sent to DPI 2.

[0105] In an embodiment of the present application, the third control strategy information can be included in the flow table for transmission. Specifically, assuming that a message (such as message 1) of a certain flow (quintuple 1) first appears on DPI1, DPI1 establishes a flow table for the flow: (quintuple: quintuple 1, first service type information: service type unidentified, control strategy: none), and sends this flow table to DPI2. After DPI1 receives the mirrored message and performs DPI service identification, if the service type is type 1, after the service identification, it matches and modifies the flow table according to the quintuple: (quintuple: quintuple 1, first service type information: type 1, second control policy information: policy 1), and sends the modified flow table to DPI2 so that after DPI2 receives the flow table, it matches the local flow table. Since the service type has been identified, the "mirror DPI1" corresponding to the second control policy is modified to "policy 1", and the flow table is saved, that is: (quintuple: quintuple 1, first service type information: type 1, third control policy information: policy 1).

[0106] In one embodiment of the present application, because DPI1 needs to discard the mirrored message sent by DPI2, the message header of the mirrored message received by DPI1 carries an identification field that identifies the mirrored message. DPI1 can identify the mirrored message based on the identification field and perform removal processing on the mirrored message.

[0107] In an embodiment of the present application, the message header of the mirrored message received by DPI1 carries an identification field, which can be based on the identification information of the identification field, such as M being 1 to represent a mirrored message, and M being 0 to represent a normal message.

[0108] In the embodiment of the present application, the mirrored message is identified according to the identification information, and after the service type is identified using the mirrored message, the mirrored message DPI1 is discarded.

[0109] In an embodiment of the present application, after determining the third control strategy information corresponding to the service type, when a third message of the data stream is received, message transmission related processing is performed on the third message based on the third control strategy information.

[0110] In the embodiment of the present application, if DPI1 determines that the corresponding third control policy information is policy 1 according to the service type, when DPI1 receives a message after identifying the service type, it executes policy 1 on the subsequently received message. Among them, policy 1 can be forwarding, discarding, etc. of the message.

[0111] In an embodiment of the present application, first control policy information of a data stream is sent to a first device, so that the first device determines second control policy information based on the first control policy information.

[0112] In the embodiment of the present application, in addition to sending the first service type information of the data flow to DPI2, DPI1 also sends the first control strategy information of the data flow to DPI2, wherein the first control strategy information is represented as "None". When the first service type information received by DPI2 is an unrecognized service type, DPI2 modifies the received first control strategy information into the second control strategy information, that is, modifies "None" into "Mirror to DPI1".

[0113] Based on the above embodiments, it can be seen that in the embodiments of the present application, for the messages that appear on DPI2 and need to be sent to DPI1 for processing in the related art, the DPI service identification in the embodiments of the present application is completed on DPI1, but some DPI service controls on DPI2 can be completed on DPI2, which can solve the problem (1) in the above related art. Before service identification, DPI2 needs to mirror a message to DPI1 for identification (usually fewer messages are needed to complete service identification, that is, the first few consecutive messages may be needed for identification). When DPI1 completes the identification, it will no longer mirror, which can solve the problem (2) in the above related art.

[0114] Based on the above embodiment, before the service type is identified, Figure 8 As shown, when DPI2 receives message 2 in the data stream transmission process, it transmits the mirror message corresponding to message 2 to DPI1 for service type identification through mirror processing.

[0115] After identifying the business type, such as Fig. 9 As shown, DPI1 and DPI2 respectively perform related processing such as forwarding or discarding on subsequently received messages according to the corresponding third control strategy.

[0116] Based on the above embodiments, the present application also provides a schematic diagram of the overall process of data flow identification between DPI1 and DPI2, such as Fig.10 As shown, the specific steps include:

[0117] S1. Configure the correspondence between preset control strategy information and preset service type information on both DPI1 and DPI2. For example, service type: type 1, control strategy: strategy 1, that is, for messages with service type 1, the control strategy to be executed is strategy 1.

[0118] S2. If a message (for example, message 1) of a data flow (quintuple 1) first appears on DPI1, DPI1 establishes a flow table for the flow: (quintuple: quintuple 1, first service type information: unidentified service type, first control strategy information: none), and sends the flow table to DPI2.

[0119] After S3 and DPI2 receive the flow table, since the service type is unidentified, the first control strategy information is modified to the second control strategy information, that is, "None" is changed to "Mirror to DPI1", and the flow table is saved, that is: (quintuple: quintuple 1, first service type information: service type unidentified, second control strategy information: mirror to DPI1).

[0120] S4, after the message of the data flow (such as message 2) reaches DPI2, DPI2 matches the flow table according to the five-tuple information and executes the second control strategy information, that is, a copy of message 2 is mirrored to DPI1 for identification, and the message is forwarded normally on DPI2.

[0121] S5. After receiving the mirrored message, DPI1 performs DPI service identification. After service identification, the third control strategy is determined from the preset correspondence, and the flow table is modified according to the five-tuple matching: (five-tuple: five-tuple 1, first service type information: type 1, third control strategy information: strategy 1), and the flow table is sent to DPI2. At the same time, DPI1 performs a discard process on the mirrored message.

[0122] S6. After receiving the flow table, DPI2 matches the local flow table according to the five-tuple. Since the service type is identified, the second control strategy information is modified to the third control strategy information, that is, strategy 1. The flow table is saved, that is, (five-tuple: five-tuple 1, first service type information: type 1, third control strategy information: strategy 1).

[0123] S7 and DPI2 execute control strategy according to strategy 1 for all subsequent messages of the flow (such as 4, 6, 8, etc.).

[0124] It should be noted that in the embodiment of the present application, the service type is identified by the mirrored messages of message 1 and message 2, but there may also be a service type identified according to the mirrored messages of message 1, message 2, message 3, and message 4. Specifically, it is selected according to the actual situation. After the service type is identified, the subsequent messages received on DPI1 and DPI2 perform corresponding operations according to the control strategy corresponding to the service type.

[0125] Based on the above embodiments, the embodiments of the present application can achieve the following technical advantages: avoiding the occurrence of traffic detours and improving user experience; at the same time, it also avoids the occurrence of message disorder and reduces the waste of DPI device hardware resources.

[0126] Based on the above embodiment, in another embodiment of the present application, a first device 1 is provided, such as Fig.11 As shown, the first device 1 includes:

[0127] The first receiving unit 10 is configured to receive first service type information of a data stream sent by a second device.

[0128] The processing unit 11 is configured to, when the first service type information indicates that the service type is unrecognized, perform mirror processing on the first message of the received data stream to obtain a mirror message.

[0129] The first sending unit 12 is used to send the mirrored message to the second device for service type identification.

[0130] In one embodiment, the first receiving unit 10 is further configured to receive first control strategy information of the data stream sent by the second device.

[0131] The processing unit 11 is further configured to update the first control strategy information to obtain second control strategy information.

[0132] The processing unit 11 is further configured to perform mirror processing on the received first message of the data stream based on the second control strategy information to obtain the mirror message.

[0133] In one embodiment, the first receiving unit 10 is further configured to receive third control strategy information sent by the second device.

[0134] The processing unit 11 is further configured to, upon receiving a second message of the data stream, perform message transmission related processing on the second message based on the third control strategy information.

[0135] In one embodiment, the processing unit 11 is further configured to add an identification field to a message header of the mirror message, wherein the identification field is used to identify the mirror message.

[0136] An embodiment of the present application provides a first device, which receives first business type information of a data stream sent by a second device; when the first business type information is an unrecognized business type, the first message of the received data stream is mirrored to obtain a mirrored message; and the mirrored message is sent to the second device for business type identification. It can be seen that the first device proposed in the embodiment of the present application sets a first control strategy according to the business type information in the first flow table. If the first message corresponding to the data stream is received on the first device side, the first message is directly mirrored, and the mirrored message obtained by the mirroring is sent to the second device, while the first message received on the second device is still subsequently processed by the first device. In this way, the operation of the first device forwarding the first message and the second device forwarding the first message to the first device after processing the first message is reduced, and the number of forwarding times of the message corresponding to the data stream is reduced, thereby reducing message disorder and resource waste of the first device.

[0137] Fig.12 This is a schematic diagram of the composition structure of a first device provided in an embodiment of the present application. In practical applications, based on the same disclosed concept of the above embodiments, Fig.12 As shown, the first device of the embodiment of the present application includes a first processor 13, a first memory 14 and a first communication bus 15.

[0138] In the specific implementation process, the first receiving unit 10, the processing unit 11, and the first sending unit 12 can be implemented by a first processor 13 located on the first device, and the first processor 13 can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing image processing device (DSPD), a programmable logic image processing device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a microcontroller, and a microprocessor. It can be understood that for different devices, the electronic device used to implement the above-mentioned processor function can also be other, and the embodiments of the present application do not make specific limitations.

[0139] In the embodiment of the present application, the first communication bus 15 is used to realize the connection communication between the first processor 13 and the first memory 14; when the first processor 13 executes the running program stored in the first memory 14, the following data flow identification method is implemented:

[0140] Receive first service type information of a data stream sent by a second device; when the first service type information indicates that the service type is not identified, mirror the first message of the received data stream to obtain a mirror message; send the mirror message to the second device for service type identification.

[0141] In one embodiment, the above-mentioned first processor 13 is also used to receive first control strategy information of a data stream sent by a second device; update the first control strategy information to obtain second control strategy information; and based on the second control strategy information, mirror process the first message of the received data stream to obtain a mirror message.

[0142] In one embodiment, the first processor 13 is further configured to receive third control strategy information sent by the second device; and when receiving a second message of the data stream, perform message transmission related processing on the second message based on the third control strategy information.

[0143] In one embodiment, the first processor 13 is further configured to add an identification field to a message header of the mirror message, wherein the identification field is used to identify the mirror message.

[0144] Based on the above embodiment, in another embodiment of the present application, a second device 2 is provided, such as Fig.13 As shown, the second device 2 includes:

[0145] The second sending unit 20 is configured to send first service type information of a data stream to the first device, wherein the first service type information is an unidentified service type.

[0146] The identification unit 21 is used to receive the mirror message sent by the first device, and identify the service type of the data flow based on the mirror message.

[0147] In one embodiment, the second device 2 may further include: a determining unit.

[0148] The determination unit is used to determine the third control strategy information corresponding to the service type based on the correspondence between the preset service type information and the preset control strategy information.

[0149] The second sending unit 20 is further configured to send the third control strategy information to the first device.

[0150] In one embodiment, the message header of the mirror message carries an identification field for identifying the mirror message.

[0151] In one embodiment, the identification unit 21 is further configured to identify the mirrored message based on the identification field, and perform removal processing on the mirrored message.

[0152] In one embodiment, the second device 2 may further include: a processing unit.

[0153] A processing unit is used to perform message transmission related processing on the third message based on the third control strategy information when a third message of the data stream is received.

[0154] In one embodiment, the second sending unit 20 is further configured to send first control strategy information of the data stream to the first device, so that the first device can determine second control strategy information based on the first control strategy information.

[0155] An embodiment of the present application provides a second device, which sends first business type information of a data stream to a first device, wherein the first business type information is an unidentified business type; receives a mirror message sent by the first device, and identifies the business type of the data stream based on the mirror message. It can be seen that an embodiment of the present application provides a second device, which receives a mirror message sent by the first device, identifies the business type through the mirror message, reduces the number of forwarding times of the message corresponding to the data stream, and thus can reduce message disorder and resource waste of the second device.

[0156] Fig.14 This is a schematic diagram of the composition structure of a second device 2 provided in an embodiment of the present application. In practical applications, based on the same disclosed concept of the above embodiments, Fig.14 As shown, the second device 2 of the embodiment of the present application includes a second processor 22 , a second memory 23 and a second communication bus 24 .

[0157] In the specific implementation process, the second sending unit 20, the identification unit 21, the determination unit, and the processing unit can be implemented by the second processor 22 located on the second device 2, and the second processor 22 can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It can be understood that for different devices, the electronic device used to implement the above processor function can also be other, and the embodiment of the present application does not make specific limitations.

[0158] In the embodiment of the present application, the second communication bus 24 is used to realize the connection and communication between the second processor 22 and the second memory 23; when the second processor 22 executes the running program stored in the second memory 23, the following data flow identification method is implemented:

[0159] Sending first business type information of a data stream to a first device, wherein the first business type information is an unidentified business type; receiving a mirror message sent by the first device, and identifying the business type of the data stream based on the mirror message. It can be seen that an embodiment of the present application provides a second device.

[0160] In one embodiment, the second processor 22 is further configured to determine third control strategy information corresponding to the service type based on a correspondence between preset service type information and preset control strategy information; and send the third control strategy information to the first device.

[0161] In one embodiment, the message header of the mirror message carries an identification field for identifying the mirror message.

[0162] In one embodiment, the second processor 22 is further configured to identify the mirrored message based on the identification field, and perform removal processing on the mirrored message.

[0163] In one embodiment, the second processor 22 is further configured to, upon receiving a third message of the data stream, perform message transmission related processing on the third message based on the third control strategy information.

[0164] In one embodiment, the second processor 22 is further configured to send first control strategy information of the data stream to the first device, so that the first device can determine second control strategy information based on the first control strategy information.

[0165] Based on the above embodiments, the embodiments of the present application provide a storage medium on which a computer program is stored. The above computer-readable storage medium stores one or more programs. The above one or more programs can be executed by one or more processors and applied to the first device / second device. The computer program implements the data flow identification method as described above.

[0166] Based on the above embodiments, the embodiments of the present application provide a computer program product, including a computer program, which can be executed by one or more processors and applied to a first device / second device. The computer program implements the data flow identification method as described above.

[0167] It should be noted that in the embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0168] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, disk, CD), including a number of instructions for an image display device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the method described in each embodiment of the embodiment of the present application.

[0169] The above is only a specific implementation of the embodiment of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A data flow identification method, characterized in that: Applied to a first device, the method includes: Receiving first service type information of a data stream sent by a second device; When the first service type information indicates that the service type is unrecognized, mirroring the first message of the received data stream to obtain a mirror message; The mirrored message is sent to the second device for service type identification.

2. The method according to claim 1, characterized in that The method further comprises: Receiving first control strategy information of the data stream sent by the second device; Updating the first control strategy information to obtain second control strategy information; The step of mirroring the first message of the received data stream to obtain a mirror message includes: Based on the second control strategy information, the received first message of the data stream is mirrored to obtain the mirrored message.

3. The method according to claim 1, characterized in that After sending the mirrored message to the second device for service type identification, the method further includes: Receiving third control strategy information sent by the second device; When a second message of the data stream is received, message transmission related processing is performed on the second message based on the third control strategy information.

4. The method according to claim 1, characterized in that: After mirroring the first message of the received data stream to obtain the mirrored message, the method further includes: An identification field is added to the message header of the mirror message, wherein the identification field is used to identify the mirror message.

5. A data flow identification method, characterized in that: Applied to the second device, the method includes: Sending first service type information of a data stream to a first device, wherein the first service type information indicates that the service type is unidentified; The mirroring message sent by the first device is received, and the service type of the data flow is identified based on the mirroring message.

6. The method according to claim 5, characterized in that After identifying the service type corresponding to the data flow based on the mirror message, the method further includes: Determining third control strategy information corresponding to the service type based on a correspondence between preset service type information and preset control strategy information; The third control strategy information is sent to the first device.

7. The method according to claim 5, characterized in that The message header of the mirror message carries an identification field for identifying the mirror message, and after identifying the service type corresponding to the data flow based on the mirror message, the method further includes: Based on the identification field, the mirrored message is identified, and removal processing is performed on the mirrored message.

8. The method according to claim 6, characterized in that After determining the third control strategy information corresponding to the service type, the method further includes: When a third message of the data stream is received, message transmission related processing is performed on the third message based on the third control strategy information.

9. The method according to claim 5, characterized in that The method further comprises: First control policy information of the data flow is sent to the first device, so that the first device determines second control policy information based on the first control policy information.

10. A first device, characterized in that: The first device comprises: A first receiving unit, configured to receive first service type information of a data stream sent by a second device; A processing unit, configured to, when the first service type information indicates that the service type is unrecognized, mirror the first message of the received data stream to obtain a mirror message; The first sending unit is used to send the mirrored message to the second device for service type identification.

11. A second device, characterized in that: The second device comprises: A second sending unit, configured to send first service type information of a data stream to a first device, wherein the first service type information is an unidentified service type; An identification unit is used to receive the mirror message sent by the first device and identify the service type of the data flow based on the mirror message.

12. A first device, characterized in that: The first device includes: a first processor and a first memory; when the first processor executes the running program stored in the first memory, the method according to any one of claims 1 to 4 is implemented.

13. A second device, characterized in that: The second device comprises: a second processor and a second memory; when the second processor executes the running program stored in the second memory, the method according to any one of claims 5 to 9 is implemented.

14. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 4 is implemented; or, when the computer program is executed by a processor, the method according to any one of claims 5 to 9 is implemented.

15. A computer program product comprising a computer program, characterized in that The computer program implements the method according to any one of claims 1 to 4 when executed by a processor, or implements the method according to any one of claims 5 to 9 when executed by a processor.

Citation Information

Patent Citations

  • A deep message detection method, network device and system

    CN101056222A

  • Method for identifying service type of session flow and system and equipment thereof

    CN104348638A

  • SDN based system and method for achieving service recognition and traffic scheduling through DPI technology

    CN105897611A

  • Message forwarding method and device, computer readable storage medium, and electronic device

    CN109388499A

  • DPI-based data message deep identification method

    CN109672589A