Message processing method and device

By setting message filtering rules and IFIT detection rules in the head node, filtering messages that do not need to be detected and DOH encapsulate messages that need to be detected, solving the problem of inconsistent detection results in IFIT technology and improving network troubleshooting efficiency and the accuracy of statistical results.

CN119172747AActive Publication Date: 2024-12-20NEW H3C TECH CO LTD
View PDF 11 Cites 0 Cited by

Patent Information

Application Number
CN202411282995.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2024-12-20
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

During the detection process of existing IFIT technology, the coarse-grained traffic detection method leads to inconsistent packet statistics on the Ingress entrance and Egress exit, resulting in packet loss problems and affecting network troubleshooting efficiency.

Method used

Set up message filtering rules and IFIT detection rules in the head node. By matching and processing messages, filter messages that do not require IFIT detection, and DOH encapsulate messages that need to be detected to ensure that only encapsulated messages are performed statistics.

Benefits of technology

Effectively filter out messages that affect the flow detection results, reduce the network troubleshooting workload and improve the accuracy of statistical results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172747A_ABST
    Figure CN119172747A_ABST
Patent Text Reader

Abstract

The invention provides a message processing method and device. The method is applied to a head node in a target network. In the method, when a detection interface bound with an IFIT instance in a head node obtains a first message, a first table item configured on the detection interface is obtained; performing matching processing on the first message and the first table item; when the message filtering rule is successfully matched with the first table item, the first message is forwarded outwards according to an execution action corresponding to the message filtering rule, and the execution action is an action of filtering the IFIT instance; when matching with the first table item fails, the first message and a second table item are subjected to matching processing, the second table item is a table item bound with the IFIT instance, and the second table item comprises a message rule needing IFIT detection; when the first table item is successfully matched with the second table item, packaging a destination option extension head DOH of the first message to obtain a second message, and using the second message for IFIT detection; and when the matching with the second table item fails, forwarding the first message to the outside.
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 message processing method and device. Background Art

[0002] In-situ Flow Information Telemetry (IFIT) is an OAM (Operations, Administration and Maintenance) detection technology that can be used to detect link quality. It determines the transmission quality of service links by statistically analyzing the nodes that service traffic passes through in the network. For example, IFIT technology directly performs message statistics and time calculation on the ingress and egress of the network, and measures the actual packet loss rate, latency and other performance indicators of the network to achieve real-time monitoring and diagnosis of service traffic.

[0003] In the currently provided IFIT technology, detection can be performed based on different feature detection granularities, such as detection granularity based on five-tuples, detection granularity based on MAC, etc. However, the above detection method is a coarse-grained traffic detection method, which will lead to inconsistent statistical results of packets counted on the Ingress entrance and Egress exit on some normal links, resulting in output packet loss. For example, when the ICMP packets of the tracert protocol of non-business traffic are transmitted in nodes in the network, since the tracert protocol uses TTL, some tacert packets are only transmitted within the network. Therefore, when a tacert packet enters the IFIT flow detection, the number of packets counted by the analyzer at the Egress exit will be less than the number of packets at the Ingress entrance, so the analyzer will output packet loss.

[0004] Therefore, how to filter out messages of protocols such as tracert that affect the results of flow detection and reduce network troubleshooting work is one of the technical issues worth considering. Summary of the invention

[0005] In view of this, the present application provides a message processing method and device to filter out messages that affect the flow detection result and reduce network fault troubleshooting work.

[0006] Specifically, the present application is implemented through the following technical solutions:

[0007] According to a first aspect of the present application, a message processing method is provided, which is applied to a head node in a target network, and the method includes:

[0008] When the detection interface bound to the IFIT instance in the head node obtains the first message, obtain a first table item configured on the detection interface, where the first table item includes a message filtering rule;

[0009] Matching the first message with the first table entry;

[0010] When the match with the first table entry is successful, the first message is forwarded externally according to the execution action corresponding to the message filtering rule, and the execution action is an action of filtering the IFIT instance;

[0011] When the match with the first table item fails, the first message is matched with the second table item, where the second table item is the table item bound to the IFIT instance, and the second table item includes a message rule that needs to be detected by IFIT;

[0012] When the match with the second table entry is successful, the first message is encapsulated with a destination option extension header DOH to obtain a second message, and the second message is used for IFIT detection;

[0013] When the match with the second table entry fails, the first message is forwarded externally.

[0014] According to a second aspect of the present application, a message processing device is provided, which is applied to a head node in a target network, and the device includes:

[0015] a first acquisition unit, configured to acquire a first table item configured on the detection interface when the detection interface bound to the IFIT instance in the head node acquires a first message, wherein the first table item includes a message filtering rule;

[0016] A first matching unit, configured to match the first message with the first table entry;

[0017] a forwarding unit, configured to forward the first message externally according to an execution action corresponding to the message filtering rule when the matching result of the first matching unit is a successful match with the first table item, wherein the execution action is an action of filtering an IFIT instance;

[0018] A second matching unit, configured to match the first message with a second table item when the matching result of the first matching unit is a failure to match the first table item, wherein the second table item is an item bound to the IFIT instance, and the second table item includes a message rule that needs to be detected by IFIT;

[0019] an encapsulation unit, configured to encapsulate the first message with a destination option extension header DOH to obtain a second message when the matching result of the second matching unit is a successful match with the second table item, wherein the second message is used for IFIT detection;

[0020] The forwarding unit is further configured to forward the first message externally when the matching result of the second matching unit is that the match with the second table entry fails.

[0021] According to the third aspect of the present application, an electronic device is provided, including a processor and a machine-readable storage medium, the machine-readable storage medium storing a computer program that can be executed by the processor, and the processor is prompted by the computer program to execute the method provided in the first aspect of the embodiment of the present application.

[0022] According to the fourth aspect of the present application, a machine-readable storage medium is provided, which stores a computer program. When called and executed by a processor, the computer program prompts the processor to execute the method provided in the first aspect of the embodiment of the present application.

[0023] Beneficial effects of the embodiments of the present application:

[0024] In the message processing method and device provided by the embodiment of the present application, when the detection interface bound to the IFIT instance in the head node obtains the first message, the first table item configured on the detection interface is obtained, and the first table item includes a message filtering rule; the first message is matched with the first table item; when the match with the first table item is successful, the first message is forwarded externally according to the execution action corresponding to the message filtering rule, and the execution action is the action of filtering the IFIT instance; when the match with the first table item fails, the first message is matched with the second table item, and the second table item is the table item bound to the IFIT instance, and the second table item includes the message rule that needs to be performed IFIT detection; when the match with the second table item is successful, the first message is encapsulated with the destination option extension header DOH to obtain a second message, and the second message is used for IFIT detection; when the match with the second table item fails, the first message is forwarded externally.

[0025] By adopting the aforementioned method, the present application obtains the first table item configured in the detection interface for filtering the messages that do not need IFIT detection. When the detection interface obtains the first message, the first message can be matched with the first table item, and the first message that hits the first table item can be directly forwarded, thereby achieving the purpose of filtering the messages that do not need IFIT detection; in addition, when the first table item is not hit, the second table item corresponding to the IFIT instance bound to the detection interface can be obtained, and DOH encapsulation processing is performed on the first message that hits the second table item, so that when the IFTI detection is performed later, only the second message encapsulated with DOH is detected. In this way, not only the purpose of filtering out the messages that affect the flow detection results is achieved, but also the workload of troubleshooting when a network failure occurs due to the failure of the flow detection result is reduced. That is, the problem of inaccurate statistical results caused by the analyzer counting all messages when performing IFIT detection is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 It is a flowchart of a message processing method provided in an embodiment of the present application;

[0027] Figure 2 This is a schematic diagram of an application scenario of a message processing method provided in an embodiment of the present application;

[0028] Figure 3 It is a structural schematic diagram of a message processing device provided in an embodiment of the present application;

[0029] Figure 4 It is a hardware structure diagram of an electronic device for implementing a message processing method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0030] Here, exemplary embodiments will be described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application.

[0031] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in this article refers to and includes any or all possible combinations of one or more corresponding listed items.

[0032] It should be understood that although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0033] The message processing method provided by this application is described in detail below.

[0034] See also Figure 1 , Figure 1 This is a flowchart of a message processing method provided by the present application. The method can be applied to a head node in a target network. The target network can be any network that requires IFIT detection. The head node can be the first device in the target network device, for example, the first device in which service traffic enters the target network. When the target node implements the method, the following steps can be included:

[0035] Step 101: When a detection interface bound to an IFIT instance in a head node obtains a first message, a first table item configured on the detection interface is obtained, where the first table item includes a message filtering rule.

[0036] In this step, the above-mentioned IFIT instance is an instance for performing IFIT detection. One or more IFIT instances can be configured on each detection interface. When the detection interface is bound to multiple IFIT instances, each IFIT instance can correspond to a different IFIT detection method, so that IFIT detection can be performed on the message that meets the message rules of the IFIT instance according to the detection method corresponding to the IFIT instance.

[0037] In order to solve the problem of inaccurate detection results caused by performing IFIT detection on all messages flowing through the head node, this embodiment proposes that the above-mentioned first table item is set on the detection interface, and the first table item is used to filter some messages that do not need IFIT detection. Specifically, the first table item includes a message filtering rule, and the message that meets the message filtering rule is identified based on the message filtering rule. The message is the message that does not need IFIT detection. Based on this, when the detection interface of the head node receives the first message, the first table item can be obtained.

[0038] It should be noted that the above detection interface is any interface in the head node that needs to perform IFIT detection, and this embodiment does not specifically limit this. In addition, the above first message can be a message of the head node entering the target network, or a message generated by the head node that needs to be sent externally through the target network, or a message generated by the head node that needs to be transmitted within the target network.

[0039] Step 102: Match the first message with the first table entry.

[0040] In this step, after obtaining the first table entry, the head node can match the first message with the message filtering rule in the first table entry. When the match is successful, it indicates that the message feature included in the first message hits the message feature included in the message filtering rule, and then it can be confirmed that the first message does not need to participate in IFIT detection. Based on this, the first message can be forwarded, that is, step 103 is executed. When the match fails, it indicates that the message feature included in the first message does not match the message feature included in the message filtering rule, and then the first message is not a message that needs to be filtered, that is, IFIT flow detection is required, and step 104 is executed at this time.

[0041] Step 103: When the first table entry is matched successfully, the first message is forwarded externally according to the execution action corresponding to the message filtering rule, and the execution action is an action of filtering the IFIT instance.

[0042] In this step, in addition to recording the message filtering rules, the first table entry also includes an execution action to facilitate subsequent processing of the first message. For example, when the execution action is an action to filter the IFIT instance, it can be directly determined that the first message does not need to perform the IFIT detection in the detection method indicated by the above IFIT instance, and then the first message can be forwarded externally.

[0043] Step 104: When the match with the first table item fails, the first message is matched with the second table item, where the second table item is the table item bound to the IFIT instance, and the second table item includes a message rule that needs to be detected by IFIT.

[0044] In this step, when the first message fails to match the first table entry, it indicates that the first message needs to be IFIT detected. Specifically, each IFIT instance corresponds to a detection method, and the IFIT instance also corresponds to a target flow, and different IFIT instances correspond to different target flows. When IFIT detection is required for the business message obtained based on the detection interface, the specific IFIT detection to be performed can be determined based on the table entry corresponding to the IFIT instance, that is, a table entry is generated for each IFIT instance, and the table entry can be generated based on the target flow corresponding to the IFIT instance. Specifically, the target flow can be feature extracted, and then the corresponding message rules can be created based on the features of the target flow, and then the table entry corresponding to the IFIT instance can be constructed based on the created message rules.

[0045] On this basis, when the first message fails to match the first table entry, the table entry corresponding to the IFIT instance bound to the detection interface can be obtained. For the convenience of description, the obtained table entry is recorded as the second table entry. In this way, the head node can match the first message with the second table entry.

[0046] Step 105: When the match with the second table entry is successful, the first message is encapsulated with a destination option extension header to obtain a second message, and the second message is used for IFIT detection.

[0047] In this step, when the detection interface is bound to multiple IFIT instances, since each IFIT instance corresponds to a second table item, when matching, the table item matching can be performed according to the matching order between the IFIT instances. When the second table item of the target IFIT instance is successfully matched, the table item matching of other IFIT instances will no longer be performed, and the first message will be directly encapsulated with the destination option extension header (Destination Option Header, DOH). The DOH header is used to indicate that the second message needs to be subjected to IFIT detection. That is to say, when the analyzer in the network where the head node is located performs IFIT detection, it will only count the messages with the DOH header, and will not count the messages without the DOH header. In this way, since the first message that hits the first table item is directly forwarded, and since the first message is not encapsulated with the DOH header, the analyzer will not count the first message. In this way, the problem of inaccurate statistical results caused by the analyzer counting all messages when performing IFIT detection is solved.

[0048] Specifically, when encapsulating the DOH header for the first message, the flow identifier of the target flow corresponding to the IFIT instance of the IFIT detection to be performed can be encapsulated, so that when the subsequent analyzer performs IFIT detection, it can perform the corresponding IFIT detection based on the flow identifier in the DOH in the second message.

[0049] It should be noted that the matching order between each IFIT instance can be determined according to the priority of each IFIT instance. For example, the table item matching of the IFIT instance with a higher priority is executed first, and for the IFIT instance with a lower priority, the matching of the second table item of the IFIT instance with a lower priority is implemented only when the second table item of the IFIT instance with a high priority fails to match. Thus, the matching order between each IFIT instance is constituted.

[0050] It is worth noting that the multiple IFTI instances bound to the above detection interface correspond to different detection methods. For example, the current existing detection methods may include but are not limited to: a five-tuple-based detection method, a locator-based detection method, a policy-based detection method, an APNID-based detection method, etc. Accordingly, the corresponding target flow and IFIT instance are generated based on different detection methods, and then the second table item corresponding to the IFIT instance is generated based on the target flow.

[0051] It should be noted that different detection methods correspond to different types of second table items. For example, for the detection method based on the five-tuple, the second table item generated is the access control list (Access Control List ACL), while for the detection method based on the locator, the second table item generated is the NQA Identity table item, for the detection method based on the policy, the second table item generated is the SRv6 slice table item (forwarding layer table item), and for the detection method based on the APNID, the second table item generated is the IPv4 Tunnel End table item. In actual applications, the method of generating the table items of each detection method can adopt the currently existing technical means, and this embodiment does not limit this.

[0052] In addition, after generating the second table item corresponding to each IFIT instance, the second table item can be enabled for subsequent IFIT detection. Specifically, the head node may include a control layer, a forwarding layer, and a driver between the control layer and the forwarding layer, wherein the control layer is provided with an upper platform, and the forwarding layer is provided with a network chip, wherein the network chip has a microcode. On this basis, the upper platform generates a unique flow identifier for the target flow of each IFIT instance to identify the target flow corresponding to the IFIT instance. Afterwards, the upper platform obtains the message rule based on the target flow corresponding to the IFIT instance, and the upper platform can send the relevant information of the IFIT instance to the driver, and the relevant information of the IFIT instance can include but is not limited to the flow information of the target flow, the instance information of the IFIT instance, etc., and the instance information of the IFIT instance includes the detection method. After receiving the above-mentioned relevant information, the driver can generate the corresponding second table item according to the detection method and message rule supported by the IFIT instance, and send the second table item to the network chip, so that the network chip can locally record the IFIT instance and the second table item included in the detection interface.

[0053] In addition, the instance information of the above IFIT instance also includes a detection period, so that IFIT detection is performed in the detection mode indicated by the IFIT instance within the corresponding detection period.

[0054] In addition, each detection interface is bound to an IFIT instance in the following manner: the operation and maintenance personnel configure the IFIT service based on the instance Istance view mode to bind the detection interface to the corresponding IFIT instance. Afterwards, the upper-layer platform and the driver cooperate with each other to implement the above-mentioned process of generating and issuing the second table entry of the IFIT instance.

[0055] It should be noted that the traffic characteristics of the target flow configured by the IFIT instance may include quintuple, VPN, DSCP and other characteristics. In addition to the above characteristics, different target flows may also include other characteristics, such as characteristics that support corresponding detection methods, etc.

[0056] Step 106: When the match with the second entry fails, the first message is forwarded externally.

[0057] In this step, when the detection interface is bound to one IFIT instance, if the first message fails to match the second table entry corresponding to the IFIT instance, since the second table entry of each IFIT instance is generated based on the target flow of the IFIT instance, when the first message fails to match, it indicates that the message characteristics of the first message do not match the characteristics of the target flow. In this way, there is no need to perform IFIT flow detection on the first message based on the IFIT instance. Based on this, the head node can directly forward the first message to the outside.

[0058] When the detection interface is bound to multiple IFIT instances, when the first message fails to match the second table entry corresponding to each IFIT instance, the first message may be forwarded externally.

[0059] It should be noted that in addition to implementing the message processing method provided in any embodiment of the present application, the head node itself may also provide other business services. Therefore, if it is necessary to perform related operations of other business services on the first message, it is necessary to perform these related operations first and then forward the first message to the outside.

[0060] In the message processing method provided in the present application, when the detection interface bound to the IFIT instance in the head node obtains the first message, the first table item configured on the detection interface is obtained, and the first table item includes a message filtering rule; the first message is matched with the first table item; when the match with the first table item is successful, the first message is forwarded externally according to the execution action corresponding to the message filtering rule, and the execution action is the action of filtering the IFIT instance; when the match with the first table item fails, the first message is matched with the second table item, and the second table item is the table item bound to the IFIT instance, and the second table item includes the message rule that needs to be performed IFIT detection; when the match with the second table item is successful, the first message is encapsulated with the destination option extension header DOH to obtain a second message, and the second message is used for IFIT detection; when the match with the second table item fails, the first message is forwarded externally.

[0061] By adopting the aforementioned method, the present application obtains the first table item configured in the detection interface for filtering the messages that do not need IFIT detection. When the detection interface obtains the first message, the first message can be matched with the first table item, and the first message that hits the first table item can be directly forwarded, thereby achieving the purpose of filtering the messages that do not need IFIT detection; in addition, when the first table item is not hit, the second table item corresponding to the IFIT instance bound to the detection interface can be obtained, and DOH encapsulation processing is performed on the first message that hits the second table item, so that when the IFTI detection is performed later, only the second message encapsulated with DOH is detected. In this way, not only the purpose of filtering out the messages that affect the flow detection results is achieved, but also the workload of troubleshooting when a network failure occurs due to the failure of the flow detection result is reduced. That is, the problem of inaccurate statistical results caused by the analyzer counting all messages when performing IFIT detection is solved.

[0062] Optionally, in this embodiment, when generating the above-mentioned first table item, this embodiment introduces a modular quality of service configuration (Modular QoS Configuration, MQC) strategy. On this basis, the first table item can be generated based on the above-mentioned MQC policy according to the following process: parsing and processing the MQC policy configured for the detection interface; obtaining the packet filtering rule from the class classifier in the MQC policy, and obtaining the execution action from the behavior behavior in the MQC policy; generating the first table item according to the packet filtering rule and the execution action.

[0063] Specifically, the operation and maintenance personnel can apply the MQC policy on the above detection interface, and take the first table item generated as the MQCACL table item as an example for explanation. In this way, after detecting the application event of the above MQC policy, the head node can parse and process the MQC policy. Since the MQC policy includes a class classifier and a behavior behavior, the class includes the message filtering rules written by the operation and maintenance personnel, and the behavior includes the execution actions written by the operation and maintenance personnel. Based on this, the head node can obtain the above message filtering rules and execution actions from the class and behavior respectively, and then generate the MQC ACL table item based on these two contents. Specifically, the message filtering rules can be used as the keyword key of the above MQC ACL table item, and the execution action can be used as the result of the MQCACL table item to construct the MQC ACL, and the execution action is the action of filtering the IFIT instance.

[0064] It should be noted that the packets that need to be filtered are different, and accordingly, the packet filtering rules are also different. Accordingly, the above-mentioned MQC ACL table items can include filtering rules corresponding to a variety of packets that need to be filtered, which can be configured according to actual conditions. For example, for tracert packets and ping packets, the packet filtering rules can be configured based on the protocol type. The protocols of these two packets are different, and filtering can be performed based on the protocol type; in addition, the tracert packet also includes the lifetime (ttl), which is a proprietary feature of the tracert packet, and the packet filtering rules of the tracert packet can also include the lifetime feature. In addition, it is also necessary to distinguish the packets that need to be filtered from the packets that need to be tested by IFTI, and configure the packet filtering rules based on the distinction.

[0065] Optionally, when matching the first message with the first table item, a solution considering the IFIT instance is also provided, that is, in this embodiment, the first table item also includes the flow identifier of the first target flow in the specified IFIT instance. For the convenience of description, the flow identifier can be recorded as flowID for description. On this basis, step 102 can be performed according to the following process: when the first message matches the message filtering rule, the flow identifier corresponding to the message filtering rule is obtained; the second table item corresponding to the specified IFIT instance corresponding to the flow identifier is obtained; if the second table item includes the flow identifier, it is determined that the match with the first table item is successful.

[0066] Specifically, in order to avoid filtering out messages that require IFIT detection and affecting the IFIT flow detection results, this embodiment proposes to include the flowID of the target flow corresponding to the specified IFTI instance in the first table item. The specific instance of the specified IFIT instance can be configured according to actual conditions, and this embodiment does not limit this.

[0067] On this basis, when the message feature of the first message matches the message filtering rule in the first table item, the flowID is obtained from the first table item. Since different target flows correspond to different flowIDs, and the target flows configured in each IFIT instance are different, the corresponding IFIT instance, that is, the above-mentioned specified IFIT instance, can be found based on the flowID. Then, the second table item corresponding to the specified IFIT instance can be obtained. The keyword of the second table item is the flowID of the target flow corresponding to the IFIT instance. Therefore, it can be determined whether the flowID extracted from the first table item is consistent with the keyword in the second table item. When they are consistent, it once again indicates that the first message does not need to perform the corresponding flow detection of the specified IFIT instance, that is, it indicates that the match with the first table item is successful, and then the first message can be forwarded. If they are inconsistent, it indicates that the match with the first table item fails, and then step 104 is executed.

[0068] Furthermore, when generating a first table entry including a flowID, the step of generating the first table entry according to the message filtering rule and the execution action can be performed according to the following process: when the execution action in the behavior of the MQC policy is an action to filter the target IFIT instance, obtain the flow identifier of the second target flow corresponding to the target IFIT instance; and write the flow identifier of the second target flow into the first table entry.

[0069] Specifically, the target IFIT instance is the specified IFIT instance, and the first table item is the MQC ACL table item. In order to match the first message based on the specified IFIT instance, the action of filtering the specified IFIT instance can be configured in the behavior of the MQC policy. In this way, when the head node parses the MQC policy, in addition to obtaining the message filtering rules and executing the action, it can also obtain the instance identifier of the specified IFIT instance. Then, based on the target flow corresponding to the specified IFIT instance, the flowID of the target flow can be obtained, and then the flowID is written into the MQC ACL table item.

[0070] Furthermore, in this embodiment, the first table item may further include an IFIT field. On this basis, the following process may be performed: the value of the IFIT field is set to indicate that the query times of the first table item is a set number.

[0071] Specifically, in actual applications, when the microcode performs message matching, the first table item may need to be checked a set number of times. Therefore, in order to facilitate the microcode to obtain the number of times to be queried, the value of the IFIT field in the first table item may be set to 1. Optionally, the above-mentioned set number of times may be 3 times. In this way, the microcode may query the first message three times, and the query may be performed with reference to the current query method, which is not limited in this embodiment.

[0072] It should be noted that the second table entry may also include the above IFIT field, so that after the IFIT field is set, it is used to indicate the above set number of times that the second table entry may be queried.

[0073] Optionally, the generation process of the first table entry may be executed by a driver, and Figure 1 The implementation of the process shown may be performed by microcode in a network chip.

[0074] In order to better understand this embodiment, Figure 2 The transmission network (target network) application scenario diagram shown in the figure is used as an example to illustrate. Figure 2 The transmission network in includes a head node, several intermediate nodes, a tail node and an analyzer, and the analyzer is used for IFIT detection. It should be noted that Figure 2 The intermediate nodes included in the transmission network shown may be devices supporting flow detection or devices not supporting flow detection, which may be determined according to actual conditions.

[0075] In order to solve the problem of incorrect flow detection results caused by the analyzer performing IFIT detection on all messages passing through each node in the transmission network, this embodiment proposes to perform relevant configuration on the head node so that the head node can perform corresponding processing on the obtained messages according to the message processing method provided in any of the above embodiments of this application.

[0076] Specifically, the head node does not perform DOH header encapsulation processing on the message that matches the first table item, but directly forwards it to the intermediate node and then reaches the tail node; DOH encapsulation processing is performed on the message that does not match the first table item but matches the second table item corresponding to the IFIT instance. The DOH encapsulation is used to instruct the analyzer to perform IFIT detection processing based on the message encapsulated with the DOH header. In this way, when the analyzer performs IFIT detection on the head node, it will only count the messages encapsulated with the DOH header, and will not count the messages that are not encapsulated with the DOH header. In this way, the messages that affect the flow detection results are filtered out.

[0077] In addition, since the packets encapsulated with the DOH header will also be transmitted from the head node to the intermediate node and the tail node, the analyzer will only count the packets encapsulated with the DOH header when performing IFIT detection on the intermediate node and the tail node. In this way, the packets that affect the flow detection results can be filtered out, thereby ensuring the accuracy of the flow detection results.

[0078] Finally, if the message encapsulated with the DOH header needs to be forwarded externally, the tail node can strip the DOH header from the message after the analyzer completes the statistics of the DOH message on the egress of the tail node to restore the original message, and then perform message forwarding processing, thereby not affecting the forwarding of the message.

[0079] At this point, by applying message filtering rules on the detection interface, it is possible to filter out invalid detection traffic, thereby achieving effective monitoring and management of specific traffic (traffic that requires IFIT detection). Since invalid detection messages are filtered out, when the analyzer identifies a fault during IFIT detection, it reduces the troubleshooting time and provides higher quality services.

[0080] Based on the same inventive concept, the present application also provides a message processing device corresponding to the above message processing method. The implementation of the message processing device can refer to the above description of the message processing method, which will not be discussed here one by one.

[0081] See also Figure 3 , Figure 3 A message processing device provided by an exemplary embodiment of the present application is applied to a head node in a target network, and the device includes:

[0082] A first acquisition unit 301 is configured to acquire a first table item configured on the detection interface when the detection interface bound to the IFIT instance in the head node acquires a first message, wherein the first table item includes a message filtering rule;

[0083] A first matching unit 302, configured to match the first message with the first table entry;

[0084] A forwarding unit 303, configured to forward the first message externally according to an execution action corresponding to the message filtering rule when the matching result of the first matching unit 302 is a successful match with the first table entry, wherein the execution action is an action of filtering an IFIT instance;

[0085] A second matching unit 304 is configured to match the first message with a second table item when the matching result of the first matching unit 302 is a failure to match the first table item, wherein the second table item is an item bound to the IFIT instance, and the second table item includes a message rule that needs to be detected by IFIT;

[0086] An encapsulation unit 305 is configured to encapsulate the first message with a destination option extension header DOH to obtain a second message when the matching result of the second matching unit 304 is a successful match with the second table entry, and the second message is used for IFIT detection;

[0087] The forwarding unit 303 is further configured to forward the first message externally when the matching result of the second matching unit 304 is that the match with the second entry fails.

[0088] Therefore, the present application obtains the first table item configured in the detection interface for filtering the messages that do not need IFIT detection. When the detection interface obtains the first message, the first message can be matched with the first table item, and the first message that hits the first table item can be directly forwarded, thereby achieving the purpose of filtering the messages that do not need IFIT detection; in addition, when the first table item is not hit, the second table item corresponding to the IFIT instance bound to the detection interface can be obtained, and DOH encapsulation processing is performed on the first message that hits the second table item, so that when the IFTI detection is performed subsequently, only the second message encapsulated with DOH is detected. In this way, not only the purpose of filtering out the messages that affect the flow detection results is achieved, but also the workload of troubleshooting when a network failure occurs due to the failure of the flow detection result is reduced. That is, the problem of inaccurate statistical results caused by the analyzer counting all messages when performing IFIT detection is solved.

[0089] Optionally, in this embodiment, the first table entry further includes a flow identifier of a first target flow in a specified IFIT instance;

[0090] On this basis, the above-mentioned first matching unit 302 is specifically used to obtain the flow identifier corresponding to the message filtering rule when the first message matches the message filtering rule; obtain the second table item corresponding to the specified IFIT instance corresponding to the flow identifier; if the second table item includes the flow identifier, it is determined that the match with the first table item is successful.

[0091] Optionally, based on any of the foregoing embodiments, the message processing device provided in this embodiment may further include:

[0092] A parsing unit (not shown in the figure), configured to parse the modular quality of service configuration MQC policy configured by the detection interface;

[0093] A second acquisition unit (not shown in the figure) is used to acquire the message filtering rule from the class classifier in the MQC policy, and acquire the execution action from the behavior behavior in the MQC policy;

[0094] A generating unit (not shown in the figure) is used to generate the first table entry according to the message filtering rule and the execution action.

[0095] Furthermore, in this embodiment, the above-mentioned generation unit is specifically used to obtain the flow identifier of the second target flow corresponding to the target IFIT instance when the execution action in the behavior of the MQC policy is an action to filter the target IFIT instance; and write the flow identifier of the second target flow into the first table entry.

[0096] Furthermore, in this embodiment, the first table item further includes an IFIT field;

[0097] On this basis, the generating unit is further used to set the value of the IFIT field to indicate that the query times of the first table item is a set number of times.

[0098] Based on the same inventive concept, an embodiment of the present application provides an electronic device, which can be a head node in the above-mentioned target network. Figure 4As shown, the electronic device may include a processor 401 and a machine-readable storage medium 402, the machine-readable storage medium 402 stores a computer program that can be executed by the processor 401, and the processor 401 is prompted by the computer program to execute the message processing method provided in any embodiment of the present application. In addition, the electronic device also includes a communication interface 403 and a communication bus 404, wherein the processor 401, the communication interface 403, and the machine-readable storage medium 402 communicate with each other through the communication bus 404.

[0099] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0100] The communication interface is used for communication between the above electronic device and other devices.

[0101] The machine-readable storage medium 402 may be a memory, which may include a random access memory (RAM), a DDR SRAM (Double Data Rate Synchronous Dynamic Random Access Memory), or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the processor.

[0102] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0103] In addition, this embodiment also provides a machine-readable storage medium, which stores a computer program. When called and executed by a processor, the computer program prompts the processor to execute the method provided by any embodiment of the present application.

[0104] As for the electronic device and machine-readable storage medium embodiments, since the method contents involved are basically similar to the aforementioned method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0105] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, 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, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0106] The implementation process of the functions and effects of each unit / module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned method, and will not be repeated here.

[0107] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can refer to the partial description of the method embodiments. The device embodiments described above are merely schematic, wherein the units / modules described as separate components may or may not be physically separated, and the components displayed as units / modules may or may not be physical units / modules, that is, they may be located in one place, or they may be distributed on multiple network units / modules. Some or all of the units / modules may be selected according to actual needs to achieve the purpose of the present application. A person of ordinary skill in the art can understand and implement it without creative work.

[0108] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A message processing method, It is characterized in that Applied to a head node in a target network, the method comprises: When the detection interface bound to the IFIT instance in the head node obtains the first message, obtain a first table item configured on the detection interface, where the first table item includes a message filtering rule; Matching the first message with the first table entry; When the match with the first table entry is successful, the first message is forwarded externally according to the execution action corresponding to the message filtering rule, and the execution action is an action of filtering the IFIT instance; When the match with the first table item fails, the first message is matched with the second table item, where the second table item is the table item bound to the IFIT instance, and the second table item includes a message rule that needs to be detected by IFIT; When the match with the second table entry is successful, the first message is encapsulated with a destination option extension header DOH to obtain a second message, and the second message is used for IFIT detection; When the match with the second table entry fails, the first message is forwarded externally.

2. The method according to claim 1, It is characterized in that The first table entry also includes a flow identifier of a first target flow in the specified IFIT instance; Matching the first message with the first table entry includes: When the first message matches the message filtering rule, obtaining a flow identifier corresponding to the message filtering rule; Obtain a second table entry corresponding to the specified IFIT instance corresponding to the flow identifier; If the second entry includes the flow identifier, it is determined that the second entry matches the first entry successfully.

3. The method according to claim 1, It is characterized in that The method for generating the first table entry is: Parsing and processing the modular quality of service configuration MQC policy configured by the detection interface; Acquire the message filtering rule from the classifier in the MQC policy, and acquire the execution action from the behavior in the MQC policy; The first table entry is generated according to the message filtering rule and the execution action.

4. The method according to claim 3, It is characterized in that Generating the first table entry according to the message filtering rule and the execution action includes: When the execution action in the behavior behavior in the MQC policy is an action of filtering the target IFIT instance, obtaining the flow identifier of the second target flow corresponding to the target IFIT instance; The flow identifier of the second target flow is written into the first table entry.

5. The method according to claim 4, It is characterized in that The first table item further includes an IFIT field; the method further includes: The value of the IFIT field is set to indicate that the query times of the first table entry is a set number of times.

6. A message processing device, It is characterized in that Applied to a head node in a target network, the device comprises: a first acquisition unit, configured to acquire a first table item configured on the detection interface when the detection interface bound to the IFIT instance in the head node acquires a first message, wherein the first table item includes a message filtering rule; A first matching unit, configured to match the first message with the first table entry; a forwarding unit, configured to forward the first message externally according to an execution action corresponding to the message filtering rule when the matching result of the first matching unit is a successful match with the first table item, wherein the execution action is an action of filtering an IFIT instance; A second matching unit, configured to match the first message with a second table item when the matching result of the first matching unit is a failure to match the first table item, wherein the second table item is an item bound to the IFIT instance, and the second table item includes a message rule that needs to be detected by IFIT; an encapsulation unit, configured to encapsulate the first message with a destination option extension header DOH to obtain a second message when the matching result of the second matching unit is a successful match with the second table item, wherein the second message is used for IFIT detection; The forwarding unit is further configured to forward the first message externally when the matching result of the second matching unit is that the match with the second table entry fails.

7. The device according to claim 6, It is characterized in that The first table entry also includes a flow identifier of a first target flow in the specified IFIT instance; The first matching unit is specifically used to obtain the flow identifier corresponding to the message filtering rule when the first message matches the message filtering rule; obtain the second table item corresponding to the specified IFIT instance corresponding to the flow identifier; if the second table item includes the flow identifier, determine that the match with the first table item is successful.

8. The device according to claim 6, It is characterized in that Also includes: A parsing unit, configured to parse the modular quality of service configuration MQC policy configured by the detection interface; A second acquisition unit, configured to acquire the message filtering rule from a classifier in the MQC policy, and acquire the execution action from a behavior in the MQC policy; A generating unit is used to generate the first table entry according to the message filtering rule and the execution action.

9. The device according to claim 8, It is characterized in that The generating unit is specifically configured to obtain the flow identifier of the second target flow corresponding to the target IFIT instance when the execution action in the behavior of the MQC policy is an action of filtering the target IFIT instance; and write the flow identifier of the second target flow into the first table entry.

10. The device according to claim 9, It is characterized in that The first table item also includes an IFIT field; The generating unit is further used to set the value of the IFIT field to indicate that the query times of the first table item is a set number of times.

Citation Information

Patent Citations

  • Multicast service flow detection method and related device

    CN114430386A

  • Stream detection method and electronic equipment

    CN115280745A

  • Stream-following detection method and device

    CN115665006A

  • Stream detection method, apparatus and device, and storage medium

    CN116668343A

  • Transmission detection method, device and system

    CN117081967A