A message processing method, network device and system

By including matching object information and matching condition information in the message, the first network device determines and matches the network device, solving the problem of network bandwidth waste and realizing more efficient packet processing.

CN112135327BActive Publication Date: 2025-02-21HUAWEI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010831521.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2015-09-23
Publication Date
2025-02-21
Estimated Expiration
2035-09-23

AI Technical Summary

Technical Problem

In the prior art, network devices send messages to other devices in the network through flooding, resulting in wasting network bandwidth resources.

Method used

By including matching object information and matching condition information in the message, the first network device determines the second network device to be matched, and matches its device information with the matching condition information, and decides whether to forward or discard the message.

Benefits of technology

It avoids the purposeless flooding of packets in the network, reduces excessive utilization of network bandwidth, and saves network resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112135327B_ABST
    Figure CN112135327B_ABST
Patent Text Reader

Abstract

The present invention provides a method, network device and system for message processing. The method comprises: a first network device receives a message, the message includes matching object information and matching condition information; the first network device determines a second network device to be matched according to the matching object information, the second network device includes one or more network devices; the first network device matches the device information of the second network device with the matching condition information; the first network device forwards or discards the message according to the matching result of the device information of the second network device matching the matching condition information. The method provided by the present invention can reduce the excessive occupation of network bandwidth and save network resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a message processing method, network equipment and system. Background Art

[0002] With the development of network technology, it is common for network devices to forward messages in a flooding manner. For example, in an Intermediate System to Intermediate System (ISIS) protocol network, each network device needs to create a Link State Packet (LSP) information base, and then the network device floods the LSP information to all neighboring devices. For another example, the Internet Engineering Task Force has currently proposed the concept of self-organizing network technology. In a self-organizing network, the functions of traditional network management can be automatically completed by relying on the interaction between network devices, thereby reducing the overall network operation and maintenance costs. In self-organizing network technology, the concept of purpose (Intent) is mentioned. An Intent message can include one or more network policies. The ideal Intent information distribution mechanism can support the input of Intent information in any network device, and then the network device automatically distributes the Intent information to other network devices. In the existing method, as in the above-mentioned example of self-organizing network technology, when the network device distributes the Intent information, it also distributes the Intent information to other neighboring devices in the network by flooding. However, usually, not every device in the network needs to receive these flooded messages. This method of distributing flooded messages throughout the network will cause a waste of network bandwidth resources. Summary of the invention

[0003] The embodiments of the present invention provide a message processing method, network device and system, which are used to solve the technical problem in the prior art that a network device sends messages to other devices in the network by flooding, resulting in waste of network bandwidth resources.

[0004] In a first aspect, an embodiment of the present invention provides a method for message processing, including:

[0005] The first network device receives a message, wherein the message includes matching object information and matching condition information;

[0006] The first network device determines a second network device to be matched according to the matching object information, where the second network device includes one or more network devices;

[0007] The first network device matches the device information of the second network device with the matching condition information;

[0008] The first network device forwards or discards the message according to a matching result between the device information of the second network device and the matching condition information.

[0009] Optionally, the second network device is a neighbor device of the first network device, and accordingly, the first network device matches the device information of the second network device with the matching condition information, including:

[0010] The first network device matches the device information of the neighbor device of the first network device with the matching condition information.

[0011] Optionally, the second network device is the first network device itself, and accordingly, the first network device matches the device information of the second network device with the matching condition information, including:

[0012] The first network device matches the device information of the first network device itself with the matching condition information.

[0013] Optionally, the first network device forwarding the message according to a matching result between the device information of the second network device and the matching condition information includes:

[0014] When it is determined that there is a neighbor device of the first network device that matches the matching condition information, the first network device forwards the message to the neighbor device of the first network device that matches the matching condition information.

[0015] Optionally, the first network device discarding the message according to a matching result between the device information of the second network device and the matching condition information includes:

[0016] When it is determined that there is no neighbor device of the first network device that matches the matching condition information, the first network device discards the message.

[0017] Optionally, the message further includes action item information, the action item information including that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding manner, and accordingly, the first network device forwards the message according to the matching result of the device information of the second network device matching the matching condition information, including:

[0018] When the first network device determines that there is a neighbor device of the first network device that matches the matching condition information, the first network device forwards the message to the neighbor device of the first network device that matches the matching condition information according to the action item information.

[0019] Optionally, the message further includes action item information, the action item information including that when there is no second network device matching the matching condition information, the first network device processes the message in a discarding manner, and accordingly, the first network device discards the message according to a matching result between the device information of the second network device and the matching condition information, including:

[0020] When the first network device determines that there is no neighbor device of the first network device that matches the matching condition information, the first network device discards the message according to the action item information.

[0021] Optionally, the first network device forwarding the message according to a matching result between the device information of the second network device and the matching condition information includes:

[0022] When it is determined that the device information of the first network device matches the matching condition information, the first network device forwards the message to at least one neighbor device of the first network device.

[0023] Optionally, the first network device discarding the message according to a matching result between the device information of the second network device and the matching condition information includes:

[0024] When it is determined that the device information of the first network device does not match the matching condition information, the first network device discards the message.

[0025] Optionally, the message further includes action item information, the action item information including that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding manner, and accordingly, the first network device forwards the message according to the matching result of the device information of the second network device matching the matching condition information, including:

[0026] When the first network device determines that the device information of the first network device matches the matching condition information, the message is forwarded to at least one neighbor device of the first network device according to the action item information.

[0027] Optionally, the message further includes action item information, the action item information including that when the device information of the second network device does not match the matching condition information, the first network device processes the message in a discarding manner, and accordingly, the first network device discards the message according to the matching result of the device information of the second network device matching the matching condition information, including:

[0028] When the first network device determines that the device information of the first network device does not match the matching condition information, the message is discarded according to the action item information.

[0029] Optionally, the matching condition information includes device role information, and correspondingly, the device information of the second network device includes the device role information of the second network device, and the first network device matching the device information of the second network device with the matching condition information includes:

[0030] The first network device matches the device role information of the second network device with the matching condition information.

[0031] Optionally, the matching condition information includes protocol role information, and correspondingly, the device information of the second network device includes the protocol role information of the second network device, and the first network device matches the device information of the second network device with the matching condition information, including:

[0032] The first network device matches the protocol role information of the second network device with the matching condition information.

[0033] Optionally, the second network device is the first network device, the message further includes Intent information, the Intent information includes network policy information, and the method further includes:

[0034] The first network device executes the network policy corresponding to the network policy information according to the Intent information.

[0035] Optionally, the matching condition information includes two or more types of device information, and the message also includes an indication flag, wherein the indication flag is used to instruct the first network device to select device information to match the device information of the second network device, and the selected device information is one or more of protocol role information, device role information, or device performance information.

[0036] Optionally, the message also includes a first group of matching information and a second group of matching information, the first group of matching information and the second group of matching information respectively include matching object information and matching condition information, and accordingly, the message also includes a matching indication flag, the matching indication flag is used to instruct the first network device to use the first group of matching information or the second group of matching information, or the matching indication information is used to indicate that when the matching condition information in two or more groups of matching group information matches, the processing method corresponding to the matching condition information that matches successfully is selected to process the message.

[0037] In a second aspect, an embodiment of the present invention provides a first network device, including:

[0038] A receiving unit, configured to receive a message, wherein the message includes matching object information and matching condition information;

[0039] A determining unit, configured to determine a second network device to be matched according to the matching object information, where the second network device includes one or more network devices;

[0040] A matching unit, configured to match the device information of the second network device with the matching condition information;

[0041] A processing unit is used to forward or discard the message according to a matching result between the device information of the second network device and the matching condition information.

[0042] Optionally, the second network device is a neighbor device of the first network device, and accordingly, the matching unit matches the device information of the second network device with the matching condition information, including:

[0043] The device information of the neighbor device of the first network device is matched with the matching condition information.

[0044] Optionally, the second network device is the first network device itself, and accordingly, the matching unit matches the device information of the second network device with the matching condition information, including:

[0045] The device information of the first network device itself is matched with the matching condition information.

[0046] Optionally, the processing unit forwarding the message according to a matching result between the device information of the second network device and the matching condition information includes:

[0047] When the matching unit determines that there is a neighbor device of the first network device that matches the matching condition information, the first network device forwards the message to the neighbor device of the first network device that matches the matching condition information.

[0048] Optionally, the message further includes action item information, the action item information including that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding manner, and accordingly, the processing unit forwards the message according to the matching result of the matching unit, including:

[0049] When the matching unit determines that there is a neighbor device of the first network device that matches the matching condition information, the message is forwarded to the neighbor device of the first network device that matches the matching condition information.

[0050] Optionally, the processing unit forwarding the message according to the matching result includes:

[0051] When it is determined that the device information of the first network device matches the matching condition information, the first network device forwards the message to at least one neighbor device of the first network device.

[0052] Optionally, the message also includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding manner. Accordingly, when the matching unit determines that the device information of the first network device matches the matching condition information, the processing unit forwards the message to at least one neighbor device of the first network device according to the action item information.

[0053] Optionally, the matching condition information includes device role information, and correspondingly, the device information of the second network device includes the device role information of the second network device, and the matching unit matches the device information of the second network device with the matching condition information, including:

[0054] The first network device matches the device role information of the second network device with the matching condition information.

[0055] Optionally, the matching condition information includes protocol role information, and correspondingly, the device information of the second network device includes the protocol role information of the second network device, and the matching unit matches the device information of the second network device with the matching condition information, including:

[0056] The first network device matches the protocol role information of the second network device with the matching condition information.

[0057] In a third aspect, an embodiment of the present invention provides a second network device, including:

[0058] An acquisition unit, used to acquire matching object information and matching condition information;

[0059] A processing unit, configured to generate a message, wherein the message includes the matching object information and the matching condition information;

[0060] A sending unit, used to send the message to the first network device to instruct the first network device to process the message according to the matching object information and the matching condition information, the matching object information is used to guide the first network device to determine the second network device to be matched according to the matching object information, the second network device includes one or more network devices, and the matching condition information is used by the first network device to match the device information of the second network device to be matched with the matching condition information.

[0061] Optionally, the matching object information is an identifier pre-agreed between devices, and the identifier is used to identify that the second network device to be matched is a neighbor device of the first network device or the first network device itself.

[0062] Optionally, the matching condition information includes device role information and device protocol information, the device role information is information identifying a location of a device in a network, and the device role information is information identifying a function of a device in the network.

[0063] In a fourth aspect, an embodiment of the present invention provides a network device, comprising: a memory, a processor, and a network interface, wherein the memory, the processor, and the network interface are interconnected via a bus, the memory is used to store a set of program instructions, and the processor is used to call the program instructions stored in the memory to perform the following operations:

[0064] Triggering the network interface to receive a message, wherein the message includes matching object information and matching condition information;

[0065] Determine a second network device to be matched according to the matching object information, where the second network device includes one or more network devices, and match the device information of the second network device with the matching condition information;

[0066] The message is forwarded or discarded according to a matching result between the device information of the second network device and the matching condition information.

[0067] Optionally, the second network device determined by the processor is the first network device itself, and accordingly, the processor matches the device information of the second network device with the matching condition information, including:

[0068] The processor matches the device information of the first network device itself with the matching condition information.

[0069] Optionally, the processor forwarding the message according to the matching result includes:

[0070] When determining that there is a neighbor device of the first network device that matches the matching condition information, the processor forwards the message to the neighbor device of the first network device that matches the matching condition information.

[0071] Optionally, the processor discarding the message according to a matching result between the device information of the second network device and the matching condition information includes:

[0072] When the processor determines that there is no neighbor device of the first network device that matches the matching condition information, the processor discards the message.

[0073] Optionally, the processor forwarding the message according to the matching result includes:

[0074] When determining that the device information of the first network device matches the matching condition information, the processor forwards the message to at least one neighbor device of the first network device.

[0075] Optionally, the processor discarding the message according to the matching result includes:

[0076] When the processor determines that the device information of the first network device does not match the matching condition information, the message is discarded.

[0077] In a fourth aspect, an embodiment of the present invention further provides a system for message processing, the system comprising a first network device and a third network device, wherein:

[0078] The third network device is used to obtain matching object information and matching condition information, generate a message including the matching object information and the matching condition information, and send the message to the first network device, wherein the matching object information is used to guide the first network device to determine a network device corresponding to device information matching the matching condition information;

[0079] The first network device is used to receive the message, determine the second network device corresponding to the matching object information, match the device information of the second network device with the matching condition information, and forward or discard the message according to the matching result of the device information of the second network device and the matching condition information and the action item information.

[0080] Through the technical solution provided by the embodiment of the present invention, after the first network device receives the message sent by other network devices, it only needs to send the message to a specific device by utilizing the matching object information and matching condition information contained in the message, without flooding the message in the entire network. In this way, in the actual network, the matching object information and matching condition information can be customized according to the characteristics of the network, thereby avoiding the purposeless flooding of messages in the network, thereby reducing the excessive occupation of network bandwidth by message forwarding and saving network resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0081] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0082] Figure 1 It is a schematic diagram of an application scenario of a message processing method provided by an embodiment of the present invention;

[0083] Figure 2 It is a flowchart of a message processing method provided by an embodiment of the present invention;

[0084] Figure 3 It is a flowchart of a message processing method provided by an embodiment of the present invention;

[0085] Figure 4 It is a structural diagram of a network device provided by an embodiment of the present invention;

[0086] Figure 5 A schematic diagram of the structure of a network device provided by an embodiment of the present invention;

[0087] Figure 6 A schematic diagram of the structure of a network device provided by an embodiment of the present invention;

[0088] Figure 7 A schematic diagram of the structure of a network device provided by an embodiment of the present invention;

[0089] Figure 8 A schematic diagram of a message processing system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0090] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0091] Figure 1 A schematic diagram of an application scenario of the message processing method provided by an embodiment of the present invention. Figure 1 In the figure, network device A, network device C, network device D, and network device E are respectively neighbor devices of network device B. After network device A obtains the network policy, it generates an Intent message according to the network policy. The network policy can be a network policy for setting the device to enter energy-saving mode, or a network policy for setting the network device to perform deep detection on received messages, etc. The network policy obtained by network device A can be sent by the network management, or it can be directly configured on network device A by the user. Network device A generates a message according to the generated Intent information, and the message contains matching object information and matching condition information. Network device A sends the message to network device B. Network device B determines the network device that needs to match the matching condition information according to the matching object information. The network device that matches the matching condition information can be a neighbor device of network device B, or it can be network device B itself.

[0092] After network device B receives the message, it learns from the matching object information that it needs to match the device information of the neighboring device of network device B with the matching condition information. Network device B matches the stored device information of the neighboring device with the matching condition information. After network device B determines the network device that matches the matching condition information, network device B sends the message to the network device that matches the matching condition information. After network device B determines that there is no network device that matches the matching condition information, it discards the message. For example, Figure 1 In the example, if the device information of network device D and the device information of network device E match the matching condition information, network device B sends the message to network device D and network device E. If the device information of network device C does not match the matching condition information, network device B does not send the message to network device C. If the device information of network device C, network device D, and network device E do not match the matching condition information, network device B discards the message.

[0093] After network device B receives the message, it learns from the matching object information that it needs to match the matching condition information with its own device information, and then network device B matches its own device information with the matching condition information. After network device B determines that its own device information matches the matching condition information, network device B sends the message to the neighboring device of network device B. In this case, as long as the device information of network device B successfully matches the matching condition information, it is considered that the neighboring device of network device B needs to receive the message. For example, Figure 1 In the embodiment, after network device B receives the message, when it is learned through the matching object information that the device information of network device B needs to be matched with the matching condition information, network device B matches the device information of network device B itself with the matching condition information. If network device B confirms that its own device information matches the matching condition information, network device B sends the message to the neighbor of network device B. Network device B sends the message to the neighbor of network device B, which may be sent to all neighbor devices of network device B or to some neighbor devices of network device B, and the embodiment of the present invention does not impose specific restrictions. If network device B confirms that its own device information does not match the matching condition information, network device B discards the message.

[0094] In a specific implementation, after receiving the message, the network device B may execute a corresponding network policy according to the Intent information contained in the message, and the network policy executed by the network device B may be to set the network device B to enter a power-saving mode, or to set the network device B to perform a deep detection on the received message, etc. The network device B executes a corresponding network policy according to the Intent information contained in the message, and may execute the policy before the network device B determines the network device that needs to match the matching condition information, or after the network device B determines the network device that needs to match the matching condition information.

[0095] In a specific implementation, the matching object information can be an identifier pre-agreed between devices or uniformly configured by the network system. After the network device B receives the message, it can be known according to the identifier whether it is necessary to use the device information of the neighboring device of the network device B to match the matching condition information, or to use the device information of the network device B itself to match the matching condition information. For example, network device A and network device B pre-agreed that when the value of the identifier is 1, it indicates that network device B needs to use the device information of the neighboring device of network device B to match the matching condition; when the value of the identifier is 0, it indicates that network device B needs to use the device information of the network device B itself to match the matching condition.

[0096] In a specific implementation, the matching condition information may include: device role information or protocol role information. For example, in an IP-based Radio Access Network (IP RAN) network, the device role can be divided into Cell Site Gateway (CSG), Aggregation Site Gateway (ASG) or Radio Service Gateway (RSG), etc. The protocol role can be divided into Generic Discovery and Negotiation Protocol (GDNP) Counterpart or Multiprotocol Label Switch (MPLS) Label Switching Router (LSR), etc. For example, in Figure 1 In the network shown, network device E is a CSG in an IP RAN network, network device D is an ASG, and network device B receives a message sent by network device A. The matching condition information contained in the message is a device role CSG. The matching object information contained in the message identifies that the device information of the neighbor device of the network device receiving the message needs to be used to match the matching condition information. When network device B determines that the device information of the neighbor device of network device B needs to be matched with the matching condition information, network device B matches the device role information of network device E, network device D, and network device C with the matching condition information respectively. Since only the device role information of network device E is CSG, network device B only sends the message to network device E.

[0097] Through the above implementation, network device B determines the network device to be matched according to the matching object information contained in the received message, and then matches the device information of the network device to be matched with the matching condition information in the message, and forwards or discards the message according to the matching result. Network device B only needs to send the message to a specific device, and does not need to flood the message in the network, thereby avoiding the purposeless flooding of the message in the network, further reducing the excessive occupation of network bandwidth and saving network resources.

[0098] See also Figure 2 , Figure 2 A flow chart of a message processing method provided by an embodiment of the present invention, the method comprising:

[0099] 201. A first network device receives a message, where the message includes matching object information and matching condition information.

[0100] In a specific implementation manner, the matching object information is used by the first network device to determine the second network device to be matched based on the matching object information, and the matching condition information is used by the first network device to match the device information of the second network device to be matched with the matching condition information, and the matching condition information may include device information such as device role information, device protocol information, or device performance information.

[0101] 202. The first network device determines a second network device to be matched according to the matching object information, where the second network device includes one or more network devices.

[0102] In a specific implementation, the first network device can determine the second network device to be matched based on the identification information in the message, and the identification information can be an identifier pre-agreed between devices. For example, when the identifier value is 1, it indicates that the device information of the neighboring device of network device B needs to be used to match the matching condition; when the identifier value is 0, it indicates that the device information of network device B itself needs to be used to match the matching condition.

[0103] 203: The first network device matches the device information of the second network device with the matching condition information.

[0104] 204. The first network device forwards or discards the message according to a matching result between the device information of the second network device and the matching condition information.

[0105] The following is the above Figure 1 The above-mentioned network devices are further described as examples. The first network device can be Figure 1 In the network shown in FIG. 1 , the message is sent from network device A to network device B. In the network shown in FIG.

[0106] In the embodiment of the present invention, after receiving the message, the first network device determines the network device that matches the matching condition information according to the matching object information, thereby determining the sending range when forwarding the message. When the first network device determines that the device information of the neighbor device of the first network device needs to be used to match the matching condition according to the matching object information, the first network device matches the stored device information of the neighbor device with the matching condition, and accordingly, the second network device is the neighbor device of the first network device, and the first network device matches the device information of the second network device with the matching condition information, including:

[0107] The first network device matches the device information of the neighbor device of the first network device with the matching condition information. Accordingly, the first network device forwards the message according to the matching result, including:

[0108] When the first network device determines that there is device information matching the matching condition information in the device information of the neighbor devices of the first network device, the first network device forwards the message to the neighbor device corresponding to the device information matching the matching condition information. The neighbor device of the first network device refers to a network device that establishes a communication connection with the first network device. The neighbor device corresponding to the device information matching the matching condition may be one neighbor device or multiple neighbor devices. When the first network device determines that there is no device information matching the matching condition information in the device information of all neighbor devices of the first network device, the first network device discards the message.

[0109] In a specific implementation manner, the device information of the neighboring device stored in the first network device can be obtained in advance through GDNP, or can be obtained by removing the network management device. The matching object information includes identification information, and the identification information is used to identify that the second network device to be matched is the first network device or the neighboring device of the first network device. The identification information can be an identifier pre-agreed between devices. For example, when the value of the identification information is 1, it indicates that the first network device needs to use the device information of the neighboring device of the first network device to match the matching condition; when the value of the identifier is 0, it indicates that the first network device needs to use the device information of the first network device itself to match the matching condition. The device role information can be information that identifies the location of the device in the network, such as: a provider edge (Provide Edge, PE) device or a user edge (Customer Edge, CE) device in an operator network. The device role information can be information that identifies the function of the device in the network. For example, in an IP RAN-based network, the device role can be divided into CSG, ASG, RSG, etc.

[0110] In a specific implementation, when the first network device determines that the device information of the first network device itself needs to be used to match the matching condition according to the matching object information, the first network device matches its own device information with the matching condition. In this case, the second network device is the first network device, and the first network device matches the device information of the second network device with the matching condition information, including:

[0111] The first network device matches the device information of the first network device itself with the matching condition information. Accordingly, the first network device forwards the message according to the matching result, including:

[0112] When the first network device determines that the device information of the first network device matches the matching condition information, the first network device forwards the message to a neighbor device of the first network device. In a specific implementation, the message may be forwarded to all neighbor devices, or to some or a single neighbor device, which is not specifically limited in the present invention. When the first network device determines that the device information of the first network device does not match the matching condition information, the first network device discards the message.

[0113] In a specific implementation, the first network device pre-configures a processing method for the first network device to process successfully matched messages or pre-agreed on a processing method for successfully matched messages between network devices, and the processing method may be forwarding the successfully matched messages.

[0114] In a specific implementation, when the second network device is a neighbor device of the first network device, the message may further include action item information, the action item information including a processing method of the first network device for the message when there is device information matching the matching condition information in the device information of the second network device, the processing method may be a processing method for forwarding the message, and accordingly, the first network device forwards the message according to the matching result of the device information of the second network device matching the matching condition information, including:

[0115] When the first network device determines that there is a neighbor device of the first network device that matches the matching condition information, the first network device forwards the message to the neighbor device of the first network device that matches the matching condition information according to the action item information.

[0116] The action item information may also include that when there is no second network device that can match the matching condition information, the first network device processes the message in a discarding manner, and accordingly, the first network device discards the message according to the matching result between the device information of the second network device and the matching condition information, including:

[0117] When the first network device determines that there is no neighbor device of the first network device that matches the matching condition information, the first network device discards the message according to the action item information.

[0118] In a specific implementation, when the second network device is the first network device itself, the message further includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding processing manner, and accordingly, the first network device forwards the message according to the matching result of the device information of the second network device matching the matching condition information, including:

[0119] When the first network device determines that the device information of the first network device matches the matching condition information, the message is forwarded to at least one neighbor device of the first network device according to the action item information.

[0120] The action item information may further include that when the device information of the second network device does not match the matching condition information, the first network device processes the message in a discarding manner, and accordingly, the first network device discards the message according to the matching result between the device information of the second network device and the matching condition information, including:

[0121] When the first network device determines that the device information of the first network device does not match the matching condition information, the message is discarded according to the action item information.

[0122] In a specific implementation, the message further includes Intent information, the Intent information includes network policy information, and the method further includes:

[0123] The first network device executes the network policy corresponding to the network policy information according to the Intent information. The network policy executed by the first network device may be to set the first network device to enter energy-saving mode, or to set the first network device to perform deep detection on the received message, etc. The first network device executes the corresponding network policy according to the Intent information contained in the message, and may be executed before the first network device determines the network device that needs to match the matching condition information, or after the first network device determines the network device that needs to match the matching condition information.

[0124] In a specific implementation, the matching condition information includes device role information. After determining that the matching condition information is device role information, the first network device uses the device role information of the second network device to match the matching condition. Accordingly, the device information of the second network device includes the device role information of the second network device, and the first network device matches the device information of the second network device with the matching condition information including:

[0125] The first network device matches the device role information of the second network device with the matching condition information.

[0126] In a specific implementation, the matching condition information includes protocol role information. After the first network device determines that the matching condition information is protocol role information, the protocol role information of the second network device is used to match the matching condition. Accordingly, the device information of the second network device includes the protocol role information of the second network device, and the first network device matches the device information of the second network device with the matching condition information including:

[0127] The first network device matches the protocol role information of the second network device with the matching condition information.

[0128] The protocol role information may be protocol function information identifying the network in which the device is located, such as an LSR in an MPLS network or a Label Edge Router (LER) in an MPLS network.

[0129] In a specific implementation manner, the matching condition information may also be performance information of a network device, such as information such as forwarding capability or capacity capability of the network device.

[0130] In a specific implementation, the matching condition information may include two or more types of device information, for example, it may include both protocol role information and device role information. In this case, the device information of the second network is considered to be a successful match only when it matches two or more types of device information in the matching condition information or certain types of specific device information. Or in another embodiment, the message also includes an indication flag, and the indication flag is used to indicate that the first network device selects device information to match the device information of the second network device, and the selected device information is one or more of protocol role information, device role information, or device performance information. The indication flag can be pre-agreed between devices. For example: when the indication flag takes a value of 1, it indicates that the first network device needs to use the protocol role information in the matching condition to match the protocol role information of the second network device; when the indication flag takes a value of 0, it indicates that the first network device needs to use the device role information in the matching condition to match the device role information of the second network device.

[0131] In a specific implementation, the message may also include multiple groups of matching information, each group of matching information includes matching object information and matching condition information, for example, the message includes a first group of matching information and a second group of matching information, the first group of matching information includes first matching object information and first matching condition information, the second group of matching information includes second matching object information and second matching condition information, and accordingly, the message also includes a matching indication flag, the matching indication flag is used to indicate that the first network device uses the first group of matching information or the second group of matching information. The matching indication flag can be used to indicate that the first network device uses the first group of matching information or the second group of matching information. Alternatively, the matching indication information is used to indicate that when the matching condition information in two or more groups of matching group information matches, the message is processed in a processing manner corresponding to which matching condition information is matched.

[0132] Through the above implementation, the first network device uses the matching object information contained in the message to determine the network device to be matched, and then matches the device information of the network device to be matched with the matching condition information in the message, and forwards or discards the message according to the matching result. The first network device only needs to send the message to a specific device, and does not need to flood the message in the network, thereby avoiding the purposeless flooding of the message in the network, further reducing the excessive occupation of network bandwidth and saving network resources.

[0133] See also Figure 3 , Figure 3 A flow chart of a message processing method provided by an embodiment of the present invention, the method comprising:

[0134] 301, the third network device obtains matching object information and matching condition information;

[0135] 302, the third network device generates a message, where the message includes the matching object information and the matching condition information;

[0136] 303: The third network device sends the message to the first network device to instruct the first network device to process the message according to the matching object information and the matching condition information.

[0137] In a specific implementation manner, the matching object information is used by the first network device to determine the second network device to be matched based on the matching object information, and the matching condition information is used by the first network device to match the device information of the second network device to be matched with the matching condition information, and the matching condition information may include device information such as device role information, device protocol information, or device performance information.

[0138] In a specific implementation, the third network device can determine the corresponding matching object information and matching condition information according to the specific situation of the message to be sent. For example, some messages need to be sent to a certain type of device, and some messages do not need to be sent to a certain type of network device. In this way, the third network device determines the specific matching object information and matching condition information according to the message situation.

[0139] In a specific implementation, the third network device can set the matching object information and matching condition information according to the characteristics of the network. For example, in an MPLS network, if the third network device is an LSR, and the third network device hopes to flood the MPLS message to the LSR in the MPLS network through the first network device, then the identification information contained in the matching object information contained in the MPLS message can be set to 1, indicating that the first network device needs to use the device information of the neighbor device of the first network device to match the matching condition, and the matching condition information is the protocol role LSR. In this way, when the first network device receives the MPLS message, the device information of the neighbor device of the first network device is matched with the matching condition, and the MPLS message is sent to the neighbor device that successfully matches. In this way, when the neighbor device of the first network device is an LSR, the MPLS message can be received. Further, the LSR that receives the MPLS message continues to execute the action executed by the first network device, so that the MPLS message can be flooded purposefully in the MPLS network, avoiding the technical problem of excessive occupation of network bandwidth caused by the purposeless flooding of messages in the network in the prior art.

[0140] In a specific implementation, the first network device may be Figure 1 The network device B in the embodiment, the third network device may be Figure 1 The first network device may also be Figure 2 In the embodiment shown, the first network device, the third network device may be Figure 2 The network device in the illustrated embodiment sends the message to the first network device.

[0141] The specific contents of the matching object information and the matching condition information may refer to any of the aforementioned embodiments and will not be described in detail here.

[0142] In a specific implementation, the message may further include action item information, where the action item information includes a processing method of the message by the first network device, and the processing method may be a forwarding processing method or a discarding processing method.

[0143] In a specific implementation, the message may further include intent information, the intent information includes network policy information, and the first network device is further used to execute a corresponding network policy according to the network policy information. In a specific implementation, the network policy information included in the intent information may be a network device energy saving policy. The first network device executes a corresponding network policy according to the intent information, i.e., sets the first network device to enter an energy saving mode, and the first network device entering the energy saving mode may specifically include: the first network device closes an idle port or reduces a CPU frequency, etc.

[0144] The third network device of the embodiment of the present invention generates a message containing matching object information and matching condition information, and sends the message to the first network device. The first network device can send the message to a specific device based on the matching object information and matching condition information, without having to send the message to all devices in the network, thereby avoiding aimless flooding of messages in the network, further reducing excessive occupancy of network bandwidth, and saving network resources.

[0145] See also Figure 4 The embodiment of the present invention provides a network device 400, which can be Figure 1 The network device B in the Figure 2 The first network device in the embodiment shown may also be Figure 3 The first network device in the illustrated embodiment. It is understandable that the network device 400 may include physical hardware necessary for performing the following processing, such as a storage device, a processing device, such as a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits. The network device 400 includes:

[0146] The receiving unit 401 is used to receive a message, wherein the message includes matching object information and matching condition information;

[0147] A determining unit 402 is configured to determine a second network device to be matched according to the matching object information, where the second network device includes one or more network devices;

[0148] A matching unit 403, configured to match the device information of the second network device determined by the determining unit 402 with the matching condition information;

[0149] The processing unit 404 is used to forward or discard the message according to the matching result between the device information of the second network device and the matching condition information.

[0150] In a specific implementation manner, the matching object information is used by the network device 400 to determine the second network device to be matched according to the matching object information. The matching object information includes identification information, and the identification information is used to identify that the second network device to be matched is the network device 400 or a neighboring device of the network device 400. The matching condition information is used by the network device 400 to match the device information of the second network device to be matched with the matching condition information, and the matching condition information may include device information such as device role information, device protocol information, or device performance information.

[0151] In a specific implementation manner, the determining unit 402 determines, according to the identification information, that the second network device to be matched is the network device 400 itself, or a neighboring device of the network device 400 .

[0152] In a specific implementation, when the determination unit 402 determines that the second network device to be matched is a neighbor device of the network device 400 according to the matching object information, the network device 400 matches the acquired device information of the neighbor device with the matching condition. In this case, the second network device is the neighbor device of the network device 400. The network device 400 may obtain the device information of the neighbor device through GDNP in advance and store the device information of the neighbor device. The network device 400 may also obtain the device information of the neighbor device through other means, such as regularly querying the network management device. Accordingly, the matching unit 403 matches the device information of the second network device with the matching condition information, which may specifically include:

[0153] The matching unit 403 matches the device information of the neighboring devices of the network device 400 with the matching condition information.

[0154] Accordingly, the processing unit 404 forwarding the message according to the matching result of the matching unit 404 may specifically include:

[0155] When the processing unit 404 determines that there is device information matching the matching condition information in the device information of the neighboring devices of the network device 400, the message is forwarded to the neighboring device corresponding to the device information matching the matching condition information. The neighboring device corresponding to the device information matching the matching condition may be one neighboring device or multiple neighboring devices. When the processing unit 404 determines that there is no device information matching the matching condition information in the device information of the neighboring devices of the network device 400, the matching unit 403 discards the message.

[0156] In a specific implementation manner, the network device 400 pre-configures the processing method of the processing unit 404 for the message successfully matched by the matching unit 403 , and the processing method may be forwarding the message successfully matched by the matching unit 403 .

[0157] In a specific implementation, the message may further include action item information, where the action item information includes a processing method of the network device 400 for the message when there is device information matching the matching condition information in the device information of the second network device, and the processing method may be a forwarding processing method. Accordingly, the processing unit 404 forwards the message according to the matching result of the matching unit 403, including:

[0158] When the matching unit 403 determines that there is a neighbor device of the first network device 400 that matches the matching condition information, the processing unit 404 forwards the message to the neighbor device of the first network device 400 that matches the matching condition information according to the action item information.

[0159] The action item information also includes a processing method for the network device 400 to discard the message when the device information of the second network device does not match the matching condition information. Accordingly, the processing unit 404 discards the message according to the matching result of the device information of the second network device matching the matching condition information, including:

[0160] When the matching unit 403 determines that there is no neighbor device of the first network device 400 that matches the matching condition information, the processing unit 404 discards the message.

[0161] In a specific implementation, when the determination unit 402 determines that the second network device to be matched is the network device 400 itself based on the matching object information, the matching unit 404 matches the device information of the network device 400 itself with the matching condition. In this case, the second network device is the network device 400.

[0162] Accordingly, the processing unit 404 matching the device information of the second network device with the matching condition information may specifically include:

[0163] The matching unit 403 matches the device information of the network device 400 itself with the matching condition information.

[0164] Accordingly, the processing unit 404 forwards the message according to the matching result, including:

[0165] When the processing unit 404 determines that the device information of the network device 400 matches the matching condition information, the message is forwarded to a neighboring device of the network device 400 .

[0166] In a specific implementation, when the matching unit 403 determines that the device information of the second network device matches the matching condition information, the network device 400 may forward the message to a neighboring device of the network device 400 according to the action item information.

[0167] When the matching unit 403 determines that the device information of the first network device 400 does not match the matching condition information, the processing unit 404 discards the message.

[0168] The message further includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the first network device 400 processes the message in a forwarding processing manner, and accordingly, the processing unit 404 forwards the message according to the matching result of the matching unit 403, including:

[0169] When the matching unit 403 determines that the device information of the first network device 400 matches the matching condition information, the processing unit 404 forwards the message to at least one neighbor device of the first network device 400 according to the action item information.

[0170] The action item information also includes that when the device information of the second network device does not match the matching condition information, the first network device 400 processes the message in a discarding manner, and accordingly, the processing unit 404 discards the message according to the matching result of the matching unit 403, including:

[0171] When the matching unit 403 determines that the device information of the first network device 400 does not match the matching condition information, the processing unit 404 discards the message according to the action item information.

[0172] In a specific implementation, the message also includes Intent information, and the Intent information includes network policy information. The processing unit 404 is also used to execute the corresponding network policy according to the Intent information. The network policy information included in the Intent information may be a network device energy-saving policy. The processing unit 404 executes the corresponding network policy according to the Intent information, that is, the network device 400 is set to enter the energy-saving mode. The network device 400 entering the energy-saving mode may specifically include: the network device 400 closes the idle port or reduces the CPU frequency. The processing unit 404 may execute the corresponding network policy according to the Intent information after the receiving unit 401 receives the message and before the matching unit 403 performs the matching action. The processing unit 402 may also execute the corresponding network policy according to the Intent information after processing the message according to the matching result of the matching unit 403.

[0173] In a specific implementation, the matching condition information may be device role information. Accordingly, the device information of the second network device includes the device role information of the second network device. The matching unit 403 matches the device information of the second network device with the matching condition information specifically including:

[0174] The matching unit 403 matches the device role information of the second network device with the matching condition information.

[0175] The device role information may be information identifying the location of the device in the network, such as a PE device or a CE device in an operator network, etc. For example, when the device role of the second network device is a PE device in an operator network, and the device role information included in the matching condition information is also a PE device in an operator network, the matching unit 403 may determine that the second network device is a network device that satisfies the matching condition information.

[0176] The device role information may be information identifying the function of the device in the network. For example, in an IP RAN network, the device role may be divided into CSG, ASG, RSG, etc. For example, when the device role information of the second network device is a CSG device in an IP RAN network, and the device role information included in the matching condition information indicates a CSG device in an IP RAN network, the matching unit 403 may determine that the second network device is a network device that satisfies the matching condition information.

[0177] In another specific implementation, the matching condition information may be protocol role information. Accordingly, the device information of the second network device includes the protocol role information of the second network device. The matching unit 403 matches the device information of the second network device with the matching condition information including:

[0178] The matching unit 403 matches the protocol role information of the second network device with the matching condition information.

[0179] The protocol role information may be protocol function information in a specific protocol network in which the identification device is located, such as LSR in an MPLS network or LER in an MPLS network. For example, when the device protocol role of the second network device is LSR, and the protocol role information included in the matching condition information is also LSR, the matching unit 403 may determine that the second network device is a network device that satisfies the matching condition information.

[0180] In a specific implementation manner, the specific contents of the matching object information and the matching condition information may refer to any of the aforementioned embodiments, and will not be described in detail here.

[0181] It can be understood that the above-mentioned determination unit 402, matching unit 403 and processing unit 404 can be implemented by hardware, firmware, software or their combination. In actual applications, the specific implementation method is determined according to product design requirements or manufacturing cost considerations. The present invention should not be limited to a specific implementation method.

[0182] The network device 400 provided in the embodiment of the present invention uses the matching object information contained in the message to determine the network device to be matched, and then matches the device information of the network device to be matched with the matching condition information in the message, and forwards or discards the message according to the matching result. The network device 400 only needs to send the message to a specific device, and does not need to flood the message in the network, thereby avoiding the purposeless flooding of the message in the network, further reducing the excessive occupation of the network bandwidth, and saving network resources.

[0183] See also Figure 5 The embodiment of the present invention provides a network device 500, which can be Figure 1 The network device A in the Figure 2 In the embodiment shown, the network device that sends a message to the first network device may also be Figure 3 The third network device in the illustrated embodiment. The network device 500 includes:

[0184] An acquisition unit 501 is used to acquire matching object information and matching condition information;

[0185] The processing unit 502 is used to generate a message, wherein the message includes the matching object information and the matching condition information;

[0186] The sending unit 503 is used to send the message to the first network device to instruct the first network device to process the message according to the matching object information and the matching condition information, and the matching object information is used to guide the first network device to determine the second network device to be matched according to the matching object information, and the second network device includes one or more network devices.

[0187] The matching condition information is used by the first network device to match the device information of the second network device to be matched with the matching condition information, and the matching condition information may include device information such as device role information, device protocol information or device performance information.

[0188] In a specific implementation, the network device 500 can determine the corresponding matching object information and matching condition information according to the specific situation of the message to be sent. For example, some messages need to be sent to a certain type of device, and some messages do not need to be sent to a certain type of network device. In this way, the network device 500 determines the specific matching object information and matching condition information according to the message situation.

[0189] In a specific implementation, the network device 500 can set the matching object information and matching condition information according to the characteristics of the network. For example, in an MPLS network, if the network device 500 is an LSR, and the network device 500 hopes to flood the MPLS message to the LSR in the MPLS network through the first network device, then the identification information contained in the matching object information contained in the MPLS message can be set to 1, indicating that the first network device needs to use the device information of the neighbor device of the first network device to match the matching condition, and the matching condition information is the protocol role LSR. In this way, when the first network device receives the MPLS message, the device information of the neighbor device of the first network device is matched with the matching condition, and the MPLS message is sent to the neighbor device that successfully matches. In this way, when the neighbor device of the first network device is an LSR, the MPLS message can be received. Further, the LSR that receives the MPLS message continues to execute the action executed by the first network device, so that the MPLS message can be flooded purposefully in the MPLS network, avoiding the technical problem of excessive occupation of network bandwidth caused by the purposeless flooding of messages in the network in the prior art.

[0190] In a specific embodiment, the specific contents of the matching object information and the matching condition information may refer to any of the aforementioned embodiments, which will not be described in detail here.

[0191] In a specific implementation, the message may further include action item information, where the action item information includes a processing method of the message by the first network device, and the processing method may be a forwarding processing method or a discarding processing method.

[0192] In a specific implementation, the message may also include intent information, the intent information includes network policy information, and the first network device is further used to execute a corresponding network policy according to the intent information. In a specific implementation, the network policy information included in the intent information may be a network device energy saving policy. The first network device executes a corresponding network policy according to the intent information, that is, the first network device is set to enter an energy saving mode. The first network device entering the energy saving mode may specifically include: the first network device closes an idle port or reduces the CPU frequency, etc.

[0193] The network device 500 of the embodiment of the present invention generates a message containing matching object information and matching condition information, and sends the message to the first network device. The first network device can send the message to a specific device based on the matching object information and matching condition information, without sending it to all devices in the network, thereby avoiding aimless flooding of messages in the network, further reducing excessive occupancy of network bandwidth, and saving network resources.

[0194] See also Figure 6 The embodiment of the present invention provides a network device 600, which can be Figure 1 The network device B in the Figure 2 The first network device in the embodiment shown may also be Figure 3 The first network device in the illustrated embodiment. The network device 600 includes: a memory 601, a processor 602 and a network interface 603, wherein the memory 601, the processor 602 and the network interface 603 are interconnected via a bus 604. The memory 601 is used to store a set of program instructions, and the processor 602 is used to call the program instructions stored in the memory 601 to perform the following operations:

[0195] Triggering the network interface 603 to receive a message, wherein the message includes matching object information and matching condition information;

[0196] Determine a second network device to be matched according to the matching object information, where the second network device includes one or more network devices, and match the device information of the second network device with the matching condition information;

[0197] The message is forwarded or discarded according to a matching result between the device information of the second network device and the matching condition information.

[0198] In a specific embodiment, the specific contents of the matching object information and the matching condition information may refer to any of the aforementioned embodiments, which will not be described in detail here.

[0199] In a specific embodiment, when the processor 602 determines that the second network device to be matched is a neighbor device of the network device 600 according to the matching object information, the network device 600 matches the acquired device information of the neighbor device with the matching condition. Accordingly, the second network device is the neighbor device of the network device 600, and the processor 602 matches the device information of the second network device with the matching condition information, including:

[0200] The processor 602 matches the device information of the neighbor device of the network device 600 with the matching condition information. Accordingly, the processor 602 forwards the message according to the matching result, including:

[0201] When the processor 602 determines that there is device information matching the matching condition information in the device information of the neighboring devices of the network device 600, the message is forwarded to the neighboring device corresponding to the device information matching the matching condition information. The neighboring device corresponding to the device information matching the matching condition may be one neighboring device or multiple neighboring devices. When the processor 602 determines that there is no device information matching the matching condition information in the device information of the neighboring devices of the network device 600, the processor 602 discards the message.

[0202] The message may further include action item information, where the action item information includes a processing method of the network device 600 for the message when there is device information matching the matching condition information in the device information of the second network device, and the processing method may be a forwarding processing method. Accordingly, the processor 602 forwards the message according to the matching result between the device information of the second network device and the matching condition information, including:

[0203] When the processor 602 determines that there is a neighbor device of the first network device 600 that matches the matching condition information, the processor 602 forwards the message to the neighbor device of the network device 600 that matches the matching condition information according to the action item information.

[0204] The action item information also includes a processing mode in which the network device 600 discards the message when the device information of the second network device does not match the matching condition information. Accordingly, the processor 602 discards the message according to the matching result of the device information of the second network device matching the matching condition information, including:

[0205] When the processor 602 determines that there is no neighbor device of the network device 600 that matches the matching condition information, the processor 602 discards the message.

[0206] In a specific implementation, when the processor 602 determines that the second network device to be matched is the network device 600 according to the matching object information, the network device 600 matches its own device information with the matching condition. Accordingly, the second network device is the network device 600, and the processor 602 matches the device information of the second network device with the matching condition information, including:

[0207] The processor 602 matches the device information of the network device 600 with the matching condition information. Accordingly, the processor 602 forwards the message according to the matching result, including:

[0208] When the processor 602 determines that the device information of the network device 600 matches the matching condition information, the network interface 603 sends the message to all neighboring devices of the network device 600. When the processor 602 determines that the device information of the network device 600 does not match the matching condition information, the processor 602 discards the message.

[0209] The message further includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the network device 600 processes the message in a forwarding processing manner, and accordingly, the processor 602 forwards the message according to the matching result of the device information of the second network device matching the matching condition information, including:

[0210] When the processor 602 determines that the device information of the network device 600 matches the matching condition information, the processor 602 forwards the message to at least one neighbor device of the network device 600 according to the action item information.

[0211] The action item information also includes that when the device information of the second network device does not match the matching condition information, the network device 600 processes the message in a discarding manner, and accordingly, the processor 602 discards the message according to the matching result between the device information of the second network device and the matching condition information, including:

[0212] When the processor 602 determines that the device information of the network device 600 does not match the matching condition information, the processor 602 discards the message according to the action item information.

[0213] In a specific implementation, the message also includes intent information, the intent information includes network policy information, and the processor 602 is further used to execute the corresponding network policy according to the intent information. The network policy information included in the intent information can be a network device energy saving policy. The processor 602 executes the corresponding network policy according to the intent information, that is, sets the network device 600 to enter the energy saving mode.

[0214] The matching condition information may include device role information. Accordingly, the device information of the second network device includes the device role information of the second network device. The processor 602 matches the device information of the second network device with the matching condition information, including:

[0215] The processor 602 matches the device role information of the second network device with the matching condition information.

[0216] In another specific implementation, the matching condition information may be protocol role information. Accordingly, the device information of the second network device includes the protocol role information of the second network device, and the processor 602 matches the device information of the second network device with the matching condition information including:

[0217] The processor 602 matches the protocol role information of the second network device with the matching condition information.

[0218] The specific content of the device role information and the protocol role information may refer to any of the aforementioned embodiments and will not be described in detail here.

[0219] The network device 600 provided in the embodiment of the present invention uses the matching object information contained in the message to determine the network device to be matched, and then matches the device information of the network device to be matched with the matching condition information in the message, and forwards or discards the message according to the matching result. The network device 600 only needs to send the message to a specific device, and does not need to flood the message in the network, thereby avoiding the purposeless flooding of the message in the network, further reducing the excessive occupation of the network bandwidth, and saving network resources.

[0220] See also Figure 7 The embodiment of the present invention provides a network device 700, which can be Figure 1 The network device A in the example can be Figure 2 In the embodiment shown, the network device that sends a message to the first network device may also be Figure 3The third network device in the illustrated embodiment. The network device 700 includes: a memory 701, a processor 702 and a network interface 703, wherein the memory 701, the processor 702 and the network interface 703 are interconnected via a bus 704. The memory 701 is used to store a set of program instructions, and the processor 702 is used to call the program instructions stored in the memory 701 to perform the following operations:

[0221] Obtain matching object information and matching condition information;

[0222] Generate a message, wherein the message includes the matching object information and the matching condition information;

[0223] The message is sent to the first network device to instruct the first network device to process the message according to the matching object information and the matching condition information, wherein the matching object information is used to guide the first network device to determine a second network device to be matched according to the matching object information, and the second network device includes one or more network devices.

[0224] Among them, the matching object information is used by the first network device to determine the second network device to be matched according to the matching object information, and the matching condition information is used by the first network device to match the device information of the second network device to be matched with the matching condition information, and the matching condition information includes device role information or device protocol information.

[0225] In a specific embodiment, the specific contents of the matching object information and the matching condition information may refer to any of the aforementioned embodiments, which will not be described in detail here.

[0226] In a specific implementation, the message may also include intent information, the intent information includes network policy information, and the first network device is further used to execute a corresponding network policy according to the intent information. In a specific implementation, the network policy information included in the intent information may be a network device energy saving policy. The first network device executes a corresponding network policy according to the intent information, that is, the first network device is set to enter an energy saving mode. The first network device entering the energy saving mode may specifically include: the first network device closes an idle port or reduces the CPU frequency, etc.

[0227] The network device 700 of the embodiment of the present invention generates a message containing matching object information and matching condition information, and sends the message to the first network device. The first network device can send the message to a specific device based on the matching object information and matching condition information, without sending it to all devices in the network, thereby avoiding aimless flooding of messages in the network, further reducing excessive occupancy of network bandwidth, and saving network resources.

[0228] See also Figure 8 The embodiment of the present invention provides a message processing system 800, which includes a first network device 801 and a third network device 802, wherein:

[0229] The third network device 802 is used to obtain matching object information and matching condition information, generate a message including the matching object information and the matching condition information, and send the message to the first network device 801, wherein the matching object information is used to guide the first network device 801 to determine a network device corresponding to the device information matching the matching condition information;

[0230] The first network device 801 is used to receive the message, determine the second network device corresponding to the matching object information, match the device information of the second network device with the matching condition information, and forward or discard the message according to the matching result of the device information of the second network device and the matching condition information and the action item information.

[0231] In a specific embodiment, the first network device 801 may be Figure 1 The network device B in the third network device 802 is Figure 1 The first network device 801 can be Figure 2 The first network device in the embodiment shown. The first network device 801 can be Figure 3 In the embodiment shown, the first network device and the third network device 802 may be Figure 3 The third network device in the embodiment shown. The first network device 801 can be Figure 4 The network device 400 in the illustrated embodiment, or the first network device 801 may be Figure 6 The network device 600 in the embodiment shown. The specific contents related to the first network device 801 can refer to any of the above embodiments, which will not be repeated here. The third network device 802 can be Figure 5 The network device 400 in the illustrated embodiment, or the third network device 802 is Figure 7 The network device 700 in the illustrated embodiment. Specific contents related to the third network device 802 can refer to any of the aforementioned embodiments, which will not be described in detail here.

[0232] The third network device 802 in the message processing system 800 of the embodiment of the present invention generates a message containing matching object information and matching condition information, and sends the message to the first network device 801. The first network device 801 uses the matching object information contained in the message to determine the network device to be matched, and then matches the device information of the network device to be matched with the matching condition information in the message, and forwards or discards the message according to the matching result. The first network device 801 only needs to send the message to a specific device, and does not need to flood the message in the network, thereby avoiding the purposeless flooding of the message in the network, further reducing the excessive occupation of network bandwidth, and saving network resources.

[0233] The "first" in the first network device or the first group of matching information mentioned in the embodiment of the present invention is only used as a name identifier and does not represent the first in order. The same rule applies to the "second" or "third".

[0234] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the above program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the above storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various media that can store program codes.

[0235] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A message processing method, characterized in that: include: The first network device receives a message, wherein the message includes matching object information and matching condition information; The first network device determines a second network device to be matched according to the matching object information, where the second network device includes one or more network devices; The first network device matches the device information of the second network device with the matching condition information; The first network device forwards or discards the message according to a matching result between the device information of the second network device and the matching condition information.

2. The method according to claim 1, characterized in that The second network device is a neighbor device of the first network device, and accordingly, the first network device matches the device information of the second network device with the matching condition information, including: The first network device matches the device information of the neighbor device of the first network device with the matching condition information.

3. The method according to claim 1, characterized in that The second network device is the first network device itself. Accordingly, the first network device matches the device information of the second network device with the matching condition information, including: The first network device matches the device information of the first network device itself with the matching condition information.

4. The method according to claim 2, characterized in that: The first network device forwarding the message according to a matching result between the device information of the second network device and the matching condition information includes: When it is determined that there is a neighbor device of the first network device that matches the matching condition information, the first network device forwards the message to the neighbor device of the first network device that matches the matching condition information.

5. The method according to claim 2, characterized in that: The first network device discarding the message according to a matching result between the device information of the second network device and the matching condition information includes: When it is determined that there is no neighbor device of the first network device that matches the matching condition information, the first network device discards the message.

6. The method according to claim 2, characterized in that The message further includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding manner, and accordingly, the first network device forwards the message according to the matching result of the device information of the second network device matching the matching condition information, including: When the first network device determines that there is a neighbor device of the first network device that matches the matching condition information, the first network device forwards the message to the neighbor device of the first network device that matches the matching condition information according to the action item information.

7. The method according to claim 2, characterized in that The message further includes action item information, and the action item information includes that when there is no second network device matching the matching condition information, the first network device processes the message in a discarding manner, and accordingly, the first network device discards the message according to the matching result between the device information of the second network device and the matching condition information, including: When the first network device determines that there is no neighbor device of the first network device that matches the matching condition information, the first network device discards the message according to the action item information.

8. The method according to claim 3, characterized in that The first network device forwarding the message according to a matching result between the device information of the second network device and the matching condition information includes: When it is determined that the device information of the first network device matches the matching condition information, the first network device forwards the message to at least one neighbor device of the first network device.

9. The method according to claim 3, characterized in that: The first network device discarding the message according to a matching result between the device information of the second network device and the matching condition information includes: When it is determined that the device information of the first network device does not match the matching condition information, the first network device discards the message.

10. The method according to claim 3, characterized in that: The message further includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding manner, and accordingly, the first network device forwards the message according to the matching result of the device information of the second network device matching the matching condition information, including: When the first network device determines that the device information of the first network device matches the matching condition information, the message is forwarded to at least one neighbor device of the first network device according to the action item information.

11. The method according to claim 3, characterized in that The message further includes action item information, and the action item information includes that when the device information of the second network device does not match the matching condition information, the first network device processes the message in a discarding manner, and accordingly, the first network device discards the message according to the matching result between the device information of the second network device and the matching condition information, including: When the first network device determines that the device information of the first network device does not match the matching condition information, the message is discarded according to the action item information.

12. The method according to any one of claims 1 to 11, characterized in that: The matching condition information includes device role information. Accordingly, the device information of the second network device includes the device role information of the second network device. The first network device matches the device information of the second network device with the matching condition information, including: The first network device matches the device role information of the second network device with the matching condition information.

13. The method according to any one of claims 1 to 11, characterized in that: The matching condition information includes protocol role information, and accordingly, the device information of the second network device includes the protocol role information of the second network device, and the first network device matches the device information of the second network device with the matching condition information, including: The first network device matches the protocol role information of the second network device with the matching condition information.

14. The method according to any one of claims 1 to 11, characterized in that: The message also includes destination intent information, the intent information includes network policy information, and the method further includes: The first network device executes the network policy corresponding to the network policy information according to the Intent information.

15. The method according to any one of claims 1 to 11, characterized in that: The matching condition information includes two or more types of device information, and the message also includes an indication flag, wherein the indication flag is used to instruct the first network device to select device information to match the device information of the second network device, and the selected device information is one or more of protocol role information, device role information, or device performance information.

16. The method according to any one of claims 1 to 11, characterized in that: The message also includes a first group of matching information and a second group of matching information, wherein the first group of matching information and the second group of matching information respectively include matching object information and matching condition information. Accordingly, the message also includes a matching indication flag, wherein the matching indication flag is used to instruct the first network device to use the first group of matching information or the second group of matching information, or the matching indication flag is used to indicate that when the matching condition information in two or more groups of matching group information matches, a processing method corresponding to the matching condition information that matches successfully is selected to process the message.

17. A first network device, characterized in that: include: A receiving unit, configured to receive a message, wherein the message includes matching object information and matching condition information; A determining unit, configured to determine a second network device to be matched according to the matching object information, where the second network device includes one or more network devices; A matching unit, configured to match the device information of the second network device with the matching condition information; A processing unit is used to forward or discard the message according to a matching result between the device information of the second network device and the matching condition information.

18. The first network device according to claim 17, characterized in that: The second network device to be matched determined by the determination unit is a neighbor device of the first network device, and accordingly, the matching unit matches the device information of the second network device with the matching condition information, including: The device information of the neighbor device of the first network device is matched with the matching condition information.

19. The first network device according to claim 17, characterized in that: The second network device is the first network device itself. Accordingly, the matching unit matches the device information of the second network device with the matching condition information, including: The device information of the first network device itself is matched with the matching condition information.

20. The first network device according to claim 18, characterized in that: The processing unit forwarding the message according to the matching result between the device information of the second network device and the matching condition information includes: When the matching unit determines that there is a neighbor device of the first network device that matches the matching condition information, the processing unit forwards the message to the neighbor device of the first network device that matches the matching condition information.

21. The first network device according to claim 18, characterized in that: The processing unit discards the message according to the matching result between the device information of the second network device and the matching condition information, including: When the matching unit determines that there is no neighbor device of the first network device that matches the matching condition information, the processing unit causes the first network device to discard the message.

22. The first network device according to claim 18, characterized in that: The message further includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding processing manner, and accordingly, the processing unit forwards the message according to the matching result of the matching unit, including: When the matching unit determines that there is a neighbor device of the first network device that matches the matching condition information, the processing unit forwards the message to the neighbor device of the first network device that matches the matching condition information according to the action item information.

23. The first network device according to claim 18, characterized in that: The message further includes action item information, and the action item information includes that when the device information of the second network device does not match the matching condition information, the first network device processes the message in a discarding manner, and accordingly, the processing unit discards the message according to the matching result of the matching unit, including: When the matching unit determines that there is no neighbor device of the first network device matching the matching condition information, the processing unit discards the message according to the action item information.

24. The first network device according to claim 19, characterized in that: The processing unit forwarding the message according to the matching result includes: When the matching unit determines that the device information of the first network device matches the matching condition information, the processing unit forwards the message to at least one neighbor device of the first network device.

25. The first network device according to claim 19, characterized in that: The processing unit discarding the message according to the matching result includes: The processing unit discards the message when the matching unit determines that the device information of the first network device does not match the matching condition information.

26. The first network device according to claim 19, characterized in that: The message further includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding processing manner, and accordingly, the processing unit forwards the message according to the matching result of the matching unit, including: When the matching unit determines that the device information of the first network device matches the matching condition information, the processing unit forwards the message to at least one neighbor device of the first network device according to the action item information.

27. The first network device according to claim 19, characterized in that: The message further includes action item information, and the action item information includes that when the device information of the second network device matches the matching condition information, the first network device processes the message in a forwarding processing manner, and accordingly, the processing unit forwards the message according to the matching result of the matching unit, including: When the matching unit determines that the device information of the first network device matches the matching condition information, the processing unit forwards the message to at least one neighbor device of the first network device according to the action item information.

28. The first network device according to any one of claims 17 to 27, characterized in that: The matching condition information includes device role information, and accordingly, the device information of the second network device includes the device role information of the second network device, and the matching unit matches the device information of the second network device with the matching condition information, including: The first network device matches the device role information of the second network device with the matching condition information.

29. The first network device according to any one of claims 17 to 27, characterized in that: The matching condition information includes protocol role information, and correspondingly, the device information of the second network device includes the protocol role information of the second network device, and the matching unit matches the device information of the second network device with the matching condition information, including: The first network device matches the protocol role information of the second network device with the matching condition information.

30. A network device, characterized in that: include: An acquisition unit, used to acquire matching object information and matching condition information; A processing unit, configured to generate a message, wherein the message includes the matching object information and the matching condition information; A sending unit, used to send the message to the first network device to instruct the first network device to process the message according to the matching object information and the matching condition information, the matching object information is used to guide the first network device to determine the second network device to be matched according to the matching object information, the second network device includes one or more network devices, and the matching condition information is used by the first network device to match the device information of the second network device to be matched with the matching condition information.

31. The network device according to claim 30, characterized in that: The matching object information is an identifier pre-agreed between devices, and the identifier is used to identify that the second network device to be matched is a neighbor device of the first network device or the first network device itself.

32. The network device according to claim 30 or 31, characterized in that: The matching condition information includes device role information and device protocol information. The device role information is information identifying a location of a device in a network, and the device role information is information identifying a function of a device in the network.

33. A first network device, characterized in that: include: A memory, a processor and a network interface, wherein the memory, the processor and the network interface are interconnected via a bus, the memory is used to store a set of program instructions, and the processor is used to call the program instructions stored in the memory to perform the following operations: Triggering the network interface to receive a message, wherein the message includes matching object information and matching condition information; Determine a second network device to be matched according to the matching object information, where the second network device includes one or more network devices, and match the device information of the second network device with the matching condition information; The message is forwarded or discarded according to a matching result between the device information of the second network device and the matching condition information.

34. The first network device according to claim 33, characterized in that: The second network device to be matched determined by the processor is a neighbor device of the first network device, and the processor matches the device information of the second network device with the matching condition information, including: The processor matches the device information of the neighbor device of the first network device with the matching condition information.

35. The first network device according to claim 33, characterized in that: The second network device determined by the processor is the first network device itself, and accordingly, the processor matches the device information of the second network device with the matching condition information, including: The processor matches the device information of the first network device itself with the matching condition information.

36. The first network device according to claim 34, wherein the processor forwards the message according to the matching result, comprising: When determining that there is a neighbor device of the first network device that matches the matching condition information, the processor forwards the message to the neighbor device of the first network device that matches the matching condition information.

37. The first network device according to claim 34, characterized in that: The processor discarding the message according to a matching result between the device information of the second network device and the matching condition information includes: When the processor determines that there is no neighbor device of the first network device that matches the matching condition information, the processor discards the message.

38. The first network device according to claim 35, characterized in that The processor forwarding the message according to the matching result includes: When determining that the device information of the first network device matches the matching condition information, the processor forwards the message to at least one neighbor device of the first network device.

39. The first network device according to claim 35, characterized in that: The processor discarding the message according to the matching result includes: When the processor determines that the device information of the first network device does not match the matching condition information, the message is discarded.

40. A message processing system, characterized in that: The system comprises a first network device as claimed in any one of claims 17 to 29 and a network device as claimed in any one of claims 30 to 32.

Citation Information

Patent Citations

  • Multi-rate opportunistic routing method for wireless mesh network

    CN101945432A

  • Switch system, and monitoring centralized control method

    US20130176888A1