Routing entry usage state detection method, network device, medium, and product

By adding a flow table entry containing routing identity information, the association between the flow table and the routing entry is established, and the usage status of the routing entry is detected. This solves the problem of detecting the usage status of the routing entry, and improves the packet forwarding efficiency of network devices and the accuracy of operation and maintenance configuration.

WO2026113890A1PCT designated stage Publication Date: 2026-06-04CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD +1

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
CLOUD INTELLIGENCE ASSETS HOLDING (SINGAPORE) PTE LTD
Filing Date
2025-11-07
Publication Date
2026-06-04

AI Technical Summary

Technical Problem

How can we detect the usage status of routing entries so that network operators can refer to their importance and usage when configuring routes?

Method used

A new flow table entry describing route identity information is added to the flow table. The association between the flow table and the route entry is established through this flow table entry. The usage status of the target route entry is determined by the route identity information recorded in the flow table, including attribute information such as the type and quantity of data flows, quantity, and data volume.

Benefits of technology

It enables accurate detection of the usage status of routing entries, assesses the importance of routing entries and the risk of modification, and improves the packet forwarding efficiency of network devices and the accuracy of operation and maintenance configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025133460_04062026_PF_FP_ABST
    Figure CN2025133460_04062026_PF_FP_ABST
Patent Text Reader

Abstract

The embodiments of the present disclosure provide a routing entry usage state detection method, a network device, a medium, and a product, which are applied to the field of network communications. The method comprises: for a target routing entry to be detected, since target packets having identical packet identity information can be forwarded by a target routing entry described by target routing identity information in a target flow table, or forwarded by said target flow table, a forwarding status of the packets by the flow table can be considered a routing entry usage state. Determining a target flow table that records target routing identity information from among candidate flow tables that record routing identity information allows for attribute information of a data flow, to which a target packet forwarded by using the target flow table belongs, to be determined. The attribute information may reflect a packet forwarding status of the target flow table, or may reflect a usage state of a target routing entry, in which case detection of the usage state of the routing entry is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Methods for detecting the usage status of routing entries, network devices, media, and products. Technical Field

[0001] This disclosure relates to the field of network communication technology, and in particular to a method, network device, medium, and product for detecting the usage status of routing entries. Background Technology

[0002] The messages generated by users when using different applications and cloud services can form a data stream, and the messages in the data stream can be transmitted from the source to the destination using routing entries in the routing table. The usage status of the routing entry can be used to measure the importance of the routing entry.

[0003] In practice, network operators often refer to the usage status of routing entries when configuring them. Therefore, how to detect the usage status of routing entries has become an urgent problem to be solved. Summary of the Invention

[0004] In view of this, embodiments of the present disclosure provide a method, network device, medium, and product for detecting the usage status of routing items, so as to realize the detection of the usage status of routing items.

[0005] In a first aspect, embodiments of this disclosure provide a method for detecting the usage status of a routing item, comprising: obtaining a candidate flow table that records routing identity information; determining, in the candidate flow table, whether a target flow table that records target routing identity information exists, wherein the target routing item has the target routing identity information, and the target packet is forwarded by the target flow table or the target routing item; if the target flow table exists, determining the usage status of the target routing item based on the attribute information of the data flow to which the target packet forwarded by the target flow table belongs.

[0006] Secondly, embodiments of this disclosure provide a network device, including: a packet transceiver module and a statistics module; the packet transceiver module is used to acquire a candidate flow table that records routing identity information; the detection module is used to determine, in the candidate flow table, whether a target flow table that records target routing identity information exists, wherein the target routing identity entry has the target routing information, and the target packet is forwarded by the target flow table or the target routing entry; if the target flow table exists, the usage status of the target routing entry is determined according to the attribute information of the data flow to which the target packet forwarded by the target flow table belongs.

[0007] Thirdly, embodiments of this disclosure provide a network device, including a processor and a memory. The memory stores one or more computer instructions, wherein the one or more computer instructions, when executed by the processor, implement the routing item usage status detection method described in the first aspect. The electronic device may also include a communication interface for communicating with other devices or communication networks.

[0008] Fourthly, embodiments of this disclosure provide a non-transitory machine-readable storage medium storing executable code, which, when executed by a processor of an electronic device, enables the processor to at least implement the routing item usage status detection method as described in the first aspect.

[0009] Fifthly, embodiments of this disclosure provide a computer program product, the computer program product including a computer program or instructions, which, when executed by a processor, cause the processor to implement the routing item usage status detection method as described in the first aspect above.

[0010] In practice, flow tables contain matching conditions and processing actions; routing tables contain routing entries, and both flow tables and routing tables can implement packet forwarding. Although flow tables do not directly contain routing entries, since flow tables and routing tables serve the same purpose, packets forwarded using flow tables can be considered packets forwarded using routing entries in routing tables. In other words, flow table entries are equivalent to routing entries in routing tables, and the forwarding status of packets by flow tables can be considered the usage status of routing entries.

[0011] Based on the above description, the routing entry usage status detection method, network device, medium and product provided in the embodiments of this disclosure add a flow table entry describing routing identity information, namely routing identity information, to the flow table. The addition of this flow table entry can establish an association between flow tables and routing entries used for forwarding the same packets.

[0012] For a target routing entry whose usage status needs to be detected, the routing identity information recorded in the flow table is used. If the network device determines a target flow table that is associated with the target routing entry from the candidate flow tables, it can further determine the attribute information of the data flow to which the target packet forwarded by the target flow table belongs. This attribute information can reflect the forwarding status of the packet by the target flow table. Therefore, this attribute information can also reflect the usage status of the target routing entry. At this point, the usage status of the routing entry is detected.

[0013] In the above method, a new flow table entry describing route identity information is added to the flow table. This flow table entry is used to describe the association between the flow table and the route entry. For the target route entry to be detected, the network device can use this new flow table entry to determine the target flow table containing the target route entry, and then perform statistics on the packet forwarding of the target flow table to realize the detection of the usage status of the target route entry. Attached Figure Description

[0014] To more clearly illustrate the technical solutions in the embodiments or related technologies of this disclosure, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0015] Figure 1 is a flowchart of a method for detecting the usage status of a routing item according to an embodiment of this disclosure.

[0016] Figure 2 is a schematic diagram of a data flow data volume statistics process provided in an embodiment of this disclosure.

[0017] Figure 3 is a flowchart of another method for detecting the usage status of routing items provided in an embodiment of this disclosure.

[0018] Figure 4 is a schematic diagram of the structure of a network device provided in an embodiment of this disclosure.

[0019] Figure 5 is a schematic diagram of the structure of another network device provided in an embodiment of this disclosure.

[0020] Figure 6 is a schematic diagram of a routing item usage status detection device provided in an embodiment of this disclosure.

[0021] Figure 7 is a schematic diagram of the structure of another network device provided in an embodiment of this disclosure. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.

[0023] The terminology used in the embodiments of this disclosure is for the purpose of describing particular embodiments only and is not intended to limit the disclosure. The singular forms “a,” “the,” and “the” used in the embodiments of this disclosure and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. “Multiple” generally includes at least two, but does not exclude the inclusion of at least one.

[0024] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0025] Depending on the context, the words “if” or “suppose” as used here can be interpreted as “when” or “in response to determination” or “in response to identification.” Similarly, depending on the context, the phrases “if determination” or “if identification (of the condition or event of the statement)” can be interpreted as “when determination” or “in response to determination” or “when identification (of the condition or event of the statement)” or “in response to identification (of the condition or event of the statement).”

[0026] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0027] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a product or system comprising a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a product or system. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the product or system that includes said element.

[0028] The following detailed description of some embodiments of this disclosure is provided in conjunction with the accompanying drawings. Where there is no conflict between the embodiments, the following embodiments and features can be combined with each other. Furthermore, the timing of the steps in the following method embodiments is merely an example and not a strict limitation.

[0029] Figure 1 is a flowchart of a method for detecting the usage status of routing entries according to an embodiment of this disclosure. This method can be executed by a network device with packet forwarding capabilities; optionally, the network device can be a router, switch, etc. As shown in Figure 1, the method may include the following steps.

[0030] S101, obtain the alternative flow table that records routing identity information.

[0031] In the embodiments provided in this disclosure, the packets forwarded by the network device are streaming data packets, which can be sent using flow tables or routing tables. The number of flow tables can be the same as the number of data streams to which the packets forwarded by the network device belong; that is, there is a one-to-one correspondence between flow tables and data streams. For the established flow tables, they are data plane flow tables used for packet forwarding, not control plane flow tables. Optionally, a data plane flow table can include multiple flow table entries, and flow table entries can include matching conditions, actions, etc. The method of creating flow tables can be found in the description of the relevant embodiments below.

[0032] For an established flow table, a network device can obtain all or part of it as a candidate flow table. In practice, flow tables and routing tables have the same function, both used for packet forwarding. If a device selects any flow table, such as flow table 1, and it and routing entry 1 in routing table 1 are used to forward the same packet, then the packet forwarded using flow table 1 can be considered as the packet forwarded using routing entry 1 in routing table 1. This also means that there is an association between flow table 1 and routing entry 1 in routing table 1.

[0033] In the embodiments provided in this disclosure, the routing identity information of a routing entry in the routing table can be recorded as a flow table entry in the flow table. The addition of this flow table entry can establish the association between the flow table and the routing entry. Optionally, the routing identity information may include the identity identifier (ID) of the routing table to which the routing entry belongs and the identity identifier (ID) of the routing entry in the routing table.

[0034] S102, in the candidate flow table, determine whether there is a target flow table that records the target route identity information, wherein the target route entry has target route identity information, and the target packet is forwarded by the target flow table or the target route entry.

[0035] For any routing entry in the routing table that requires stateful inspection, such as a target routing entry, since the candidate flow tables record routing identity information reflecting the association between flow tables and routing entries, the network device can select the target flow table that records the target routing identity information of the target routing entry from the candidate flow tables. In other words, it can select the target flow table that is associated with the target routing entry. Furthermore, this associated target flow table and the target routing entry can forward the same packet, i.e., the target packet.

[0036] S103. If a target flow table exists, determine the usage status of the target routing entry based on the attribute information of the data flow to which the target packet forwarded by the target flow table belongs.

[0037] Finally, the network device can further determine the attribute information of the data flow to which the target packet belongs, which is forwarded by the target flow table. This attribute information reflects the forwarding status of the target packet by the target flow table. The network device can also use this attribute information to determine the usage status of the target routing entry. Optionally, the attribute information of the data flow to which the target packet belongs may include the type and number of data flows to which the target packet belongs.

[0038] As described in step S101, both the target flow table and the target routing entry can forward target packets. Packets forwarded using the target flow table are equivalent to packets forwarded using the target routing entry. Therefore, the packet forwarding status of the target flow table can be considered the usage status of the target routing entry. Thus, the network device can directly determine the usage status of the target routing entry by the type and quantity of the data flow to which the target packet belongs.

[0039] The types of data streams can be understood in conjunction with the following: As described in the background section, a user generates a corresponding data stream when using an application or cloud service. Furthermore, depending on the type of application and cloud service, the generated data stream can also have different types. For example, data streams generated when a user uses a video application, when using an instant messaging application for an online meeting, or when a user uses cloud gaming can be considered real-time data streams. Data streams generated by user activity can be considered non-real-time data streams.

[0040] Optionally, in practice, since different data flows can be forwarded using the same routing entry, the target packet can belong to at least one data flow, and the data flow type can also be at least one. Referring back to the examples above, it's easy to understand that the more types of data flows there are, the wider the scope of use of the target routing entry, indicating a higher level of importance and value for that target routing entry, and a higher risk of modification. Therefore, the method provided in this embodiment can also be considered a method for evaluating the importance of routing entries.

[0041] In this embodiment, a new flow table entry for route identity information is added to the flow table. This entry reflects the association between flow tables and route entries that forward the same packets. Therefore, for a target route entry whose usage status needs to be detected, the network device can use the route identity information recorded in the flow table to determine whether a target flow table associated with the target route entry exists from the candidate flow tables. If such a target flow table exists, the attribute information of the data flow to which the target packet forwarded by that target flow table belongs can be further determined. This attribute information reflects the forwarding status of packets by the target flow table, and thus also reflects the usage status of the target route entry. This achieves the detection of the route entry's usage status.

[0042] In the above method, a new flow table entry describing route identity information is added to the flow table. This flow table entry is used to describe the association between the flow table and the route entry. For the target route entry to be detected, the network device can use this new flow table entry to determine the target flow table containing the target route entry, and then perform statistics on the packet forwarding of the target flow table to realize the detection of the usage status of the target route entry.

[0043] The embodiment shown in Figure 1 mentions that the attribute information of the data stream to which the target packet belongs may include the number of data stream types. Optionally, after receiving the target packet, the network device can determine the type of data stream to which the target packet belongs based on the packet identity information of the target packet, and further count the number of data stream types. Optionally, the packet identity information may include the packet's 5-tuple information.

[0044] Optionally, since packets belonging to different data flows can be forwarded using the same routing entry in the same routing table, there can be at least one target flow table containing target route identity information. Target packets forwarded using the target flow table can belong to at least one data flow, and this at least one data flow can belong to at least one type.

[0045] In this embodiment, the network device can use the number of data stream types to which the target packet belongs to evaluate the importance of the routing entry.

[0046] In addition, optionally, the attribute information of the data stream to which the target packet belongs may also include the number of data streams to which the target packet belongs. Similar to the process described above, network devices can also determine the data stream to which the target packet belongs based on the packet identity information of the target packet, and further count the number of data streams. Furthermore, similar to the number of data stream types, a higher number of data streams indicates a wider range of application for the target routing entry, a higher level of importance and value for the target routing entry, and a higher risk of modification of the target routing entry.

[0047] In this embodiment, the network device can use the number of data streams to which the target packet belongs to evaluate the importance of the routing entry.

[0048] Optionally, the attribute information of the data flow to which the target packet belongs may also include the data volume of the data flow to which the target packet belongs. Specifically, this data volume may include the number of target packets and / or the total amount of data contained in the target packets. The number of target packets can also be considered as the packet forwarding volume of the target flow table.

[0049] In one scenario, when target packets belong to the same data flow, the target flow table is essentially a single flow table. The number of target packets and the total amount of data contained in each packet can be recorded as separate flow table entries. In this case, the network device can directly retrieve the number of target packets and / or the total amount of data contained in each packet from the target flow table.

[0050] In another scenario, when a target packet belongs to multiple data flows, and the number of target flow tables is the same as the number of data flows to which the target packet belongs, then for packets belonging to the same data flow within the target packet, the number of these packets and the total amount of data contained in these packets can be recorded as separate flow table entries in the corresponding flow table of that data flow. In this case, the network device can obtain the number of packets and the total amount of data for each data flow from the respective flow tables of the multiple data flows to which the target packet belongs, and sum them up to obtain the number of target packets and the total amount of data contained in the target packet. Furthermore, the more packets and the larger the total amount of data contained in the packets, the higher the frequency of use of the target routing entry, the higher its importance and value, and the higher the risk of modifying the target routing entry.

[0051] For the latter case, the summation process of the network devices can also be understood in conjunction with Figure 2. As shown in Figure 2, the target packet may include packet 1 belonging to data flow 1 and packet 2 belonging to data flow 1. The amount of data contained in packet 1 may be 3M, and the amount of data contained in packet 2 may be 5M. Then the network device can count that the total amount of data contained in the target packet is 8M.

[0052] In this embodiment, the network device can use the number of target packets and / or the total amount of data contained in the target packets to assess the importance of routing entries.

[0053] In summary, the flow table now includes a new entry for routing identity information, which describes the association between flow tables and routing entries. Therefore, for a target routing entry to be detected, the network device can determine the target flow table associated with it by utilizing this association recorded in the flow table. Subsequently, the network device can also statistically analyze at least one attribute of the data flow to which the target packet forwarded using that target flow table belongs. This attribute can directly serve as the usage status of the target routing entry. Furthermore, different attribute information can reflect the usage status of the target routing entry from different perspectives, such as usage scope and frequency.

[0054] Furthermore, although the destination flow table and the destination routing table are related, meaning they are both used to forward the same destination packets, they can forward packets under different circumstances.

[0055] Specifically, when no target flow table corresponding to a data flow has been created, packets belonging to that data flow can be forwarded using the target routing entry in the routing table. Once the target flow table corresponding to the data flow has been created and the network device receives a target packet, since the packet identity information is also recorded as a flow table entry, the network device can first compare the packet identity information of the target packet with the packet identity information recorded in the candidate flow tables. Through comparison, if it is determined that a target flow table containing the packet identity information of the target packet exists in the candidate flow tables, the network device can directly use that target flow table to forward the target packet without performing a routing table lookup, thus improving packet forwarding speed.

[0056] Optionally, the timing and method of creating the target flow table can be described in more detail below.

[0057] When a target packet generated by a user application or cloud service is transmitted to a network device, the network device can query the existing candidate flow table. If the candidate flow table does not record the packet identity information of the target packet, it indicates that the data flow to which the target packet belongs may be a new data flow. In this case, the network device can create a target flow table corresponding to the data flow to which the target packet belongs. The packet identity information and the target routing entry can be recorded as flow table entries in this target flow table. It is easy to understand that the network device can create flow tables corresponding to different data flows in the above manner, not limited to the target flow table. Furthermore, while creating the target flow table, the network device can also query the routing table and use the queried target routing entry to forward the target packet.

[0058] In this embodiment, when the network device receives a packet belonging to a new data flow, it creates a packet corresponding to that data flow and forwards the packet by querying the routing table.

[0059] As described in the above embodiments, the usage status of the target routing item detected in each embodiment can reflect the importance of the target routing item. Furthermore, the detected usage status can be visualized so that network operators can refer to the usage status of the routing item when configuring routes. Optionally, the usage status of the routing items obtained in the above embodiments can be directly displayed to network operators for their reference.

[0060] In order to provide a clearer reference for network operators when configuring routes, network devices may optionally execute the embodiment shown in Figure 3 below.

[0061] Figure 3 is a flowchart of another method for detecting the usage status of routing items provided in an embodiment of this disclosure. As shown in Figure 3, after step S103, the method may further include the following steps.

[0062] S201. Based on the usage status of the target routing entry, determine the level of the target routing entry. The level reflects the risk of modifying the routing entry.

[0063] S202 displays the level of the target routing entry.

[0064] After detecting the usage status of a target routing item according to the methods provided in the above embodiments, the network device can further determine the level of the target routing item based on the usage status and display this level. Similar to the usage status, the level of a target routing item can reflect the importance of the target routing item and also the risk of modification of the target routing item. The higher the level, the higher the risk of modification of the target routing item.

[0065] Furthermore, as described in the above embodiments, the usage status of a target routing item can be represented by at least one piece of data, such as the type and number of data flows to which the target packet belongs, the number of data flows to which the target packet belongs, the amount of data in the data flows to which the target packet belongs, etc. However, compared to directly displaying data, the ranking can more clearly and explicitly reflect the importance of the target routing item.

[0066] Regarding the determination of the level of the target routing entry, optionally, when the usage status of the target routing entry includes the number of data flow types to which the target packet belongs, the network device can first determine the numerical range in which the number of types falls, and then determine the level corresponding to that numerical range. This level can then be used as the level of the target routing entry. For example, the numerical range [1,5] corresponds to level 1, the numerical range [6,10] corresponds to level 2, and the numerical range [11,15] corresponds to level 3. Then, when the number of data flow types to which the target packet belongs is 3, the network device can determine the level of the target routing entry as 1.

[0067] Optionally, when the usage status of the target routing entry includes the number of data streams to which the target packet belongs, similarly, the network device can first determine the numerical range in which the number of data streams falls, and then determine the level corresponding to that numerical range. This level can then be used as the level of the target routing entry.

[0068] Optionally, when the usage status of the target routing entry includes the data volume of the target packet, similarly, the network device can first determine the numerical range in which the data volume of the data stream falls, and then determine the level corresponding to that numerical range. This level can then be used as the level of the target routing entry.

[0069] In this embodiment, the network device can display the level of the target routing item to network operators to provide a reference for them when configuring routes. Optionally, the network device can also display the usage status and level of the target routing item to the network operators to provide them with information on the usage status of the target routing item at different granularities.

[0070] In practice, based on the usage status of the target routing item, network operators can also modify the target routing item. In this case, after step S202, the method can also include the following steps: S203, in response to the modification operation of the target routing item, if the level of the target routing item is higher than the preset level, a risk warning message is displayed.

[0071] Network operations and maintenance personnel can also trigger modification operations on this target routing item. In response to the modification operation triggered by the network operations and maintenance personnel, the level of the target routing item is obtained. If the level of the target routing item is higher than the preset level, it indicates that the target routing item is of high importance, meaning it has a wide range of uses, high frequency of use, and high value. It also indicates that modifying the target routing item carries a high risk; that is, modifying it may cause packet forwarding delays, or even prevent users from using cloud services or applications. In this case, the network device can also display a risk warning message to the network operations and maintenance personnel in response to this modification operation, such as "This routing item is [value], please confirm whether to modify it." This risk warning message is used to prompt the network operations and maintenance personnel to carefully confirm whether to modify the target routing item after understanding its usage status and / or level.

[0072] Similarly, optionally, if any data describing the usage status of a target routing item exceeds a preset threshold, the network device can also display a risk warning message.

[0073] In this embodiment, when network operators modify important routing entries, the network device can display corresponding risk warning information to prompt the network operators to confirm the modification operation they triggered.

[0074] The above embodiments describe the process by which network devices detect the importance of routing items from a procedural perspective. The following section can also describe the working process of network devices from the perspective of their internal structure.

[0075] Optionally, the network devices mentioned in the embodiments of this disclosure can be deployed in a cloud network or a physical network. When deployed in a cloud network, the network device can be a virtual network device in the cloud network, such as a virtual router (VR) or a virtual switch (VS). The network device can also be a physical network device in the cloud network, such as a physical router or switch. When deployed in a physical network, the network device can be a physical network device within the physical network.

[0076] Figure 4 is a schematic diagram of the structure of a network device provided in an embodiment of this disclosure. As shown in Figure 4, the network device may include a packet forwarding module and a detection module. Optionally, the above-mentioned modules in the network device can be implemented using threads.

[0077] The packet transceiver module can utilize flow tables or routing tables to forward received packets belonging to a specific data flow. Simultaneously, the packet transceiver module can also retrieve candidate flow tables containing routing identity information.

[0078] The detection module can determine whether a target flow table containing target route identity information exists in the candidate flow table. The target route entry corresponding to the target route identity information is associated with the target flow table; both are used to forward the target packet. Furthermore, if a target flow table exists in the candidate flow table, the detection module can also determine the usage status of the target route entry based on the attribute information of the data flow to which the target packet belongs.

[0079] Optionally, the detection module can statistically determine the attribute information of the data stream to which the target message belongs based on the message identity information of the target message. As described in the above method embodiments, the attribute information may include at least one of the following: the type and number of data streams to which the target message belongs, the number of data streams to which the target message belongs, and the data volume of the data stream to which the target message belongs. The specific statistical process of the detection module can be found in the above-mentioned related embodiments, and will not be repeated here.

[0080] In addition, for any content not described in detail in this embodiment, please refer to the relevant description in the embodiment shown in Figure 1, which will not be repeated here.

[0081] In this embodiment, a new flow table entry for route identity information is added to the flow table. This entry reflects the association between flow tables and routing entries, and flow tables and routing entries with an association are used to forward the same packets. Therefore, for a target routing entry whose usage status needs to be detected, using the route identity information recorded in the flow table, if the network device determines a target flow table with an association with the target routing entry from the candidate flow tables, it can further determine the attribute information of the data flow to which the target packet forwarded by that target flow table belongs. This attribute information reflects the forwarding status of the packet by the target flow table; therefore, this attribute information can also reflect the usage status of the target routing entry, thus achieving the detection of the routing entry's usage status.

[0082] In the above method, a new flow table entry describing route identity information is added to the flow table. This flow table entry is used to describe the association between the flow table and the route entry. For the target route entry to be detected, the network device can use this new flow table entry to determine the target flow table containing the target route entry, and then perform statistics on the packet forwarding of the target flow table to realize the detection of the usage status of the target route entry.

[0083] Optionally, the detection module can further determine the level of the target routing item and display the usage status and / or level of the target routing item to network operations and maintenance personnel.

[0084] Optionally, when network operators trigger a modification operation on a target routing item, if the target routing item's level is higher than a preset level, or if any data describing the target routing item's usage status exceeds a preset threshold, the network device can display a risk warning message to allow network operators to carefully confirm whether routing modifications are necessary. This part can be found in the relevant description in the embodiment shown in Figure 3, and will not be repeated here.

[0085] Figure 5 is a schematic diagram of another network device provided in an embodiment of this disclosure. Based on the network device shown in Figure 4, as shown in Figure 5, the network device further includes a processor and shared memory.

[0086] In this network device, both the packet transceiver module and the detection module can operate using the computing resources provided by the processor core. The shared memory can store the candidate flow table created by the packet transceiver module.

[0087] Optionally, when the message transceiver module receives a target message, it can first obtain the message identity information of the target message and read the already created alternative flow table from shared memory. Then, in one scenario, if the alternative flow table contains a target flow table that records the message identity information of the target message, it indicates that the message transceiver module has previously forwarded other messages belonging to the same data flow as the target message. In this case, the message transceiver module can directly use this target flow table to forward the target message without querying the routing table, thereby improving message forwarding efficiency.

[0088] In another scenario, if none of the candidate flow tables record the packet identity information of the target packet, it indicates that the target packet belongs to a new data flow. In this case, the packet transceiver module can forward this target packet using the target route entry in the routing table. Simultaneously, the packet transceiver module can also create a target flow table corresponding to the data flow to which the target packet belongs, based on the packet identity information and the target route identity information, and write this target flow table into shared memory.

[0089] In this embodiment, the message sending and receiving module and the detection module read and write the flow table in the shared memory, so as to realize message forwarding and detect the usage status of routing entries at the same time.

[0090] The following will describe in detail one or more embodiments of a routing item usage status detection apparatus according to this disclosure. Those skilled in the art will understand that the apparatus can be configured using commercially available hardware components through the steps taught in this solution.

[0091] Figure 6 is a schematic diagram of a routing item usage status detection device provided in an embodiment of this disclosure. It should be noted that the modules in this embodiment can be considered as included in the detection module of the network device shown in Figure 4 or Figure 5. As shown in Figure 6, the device may include the following modules.

[0092] The flow table determination module 11 is used to obtain candidate flow tables that record routing identity information.

[0093] In the candidate flow table, it is determined whether there is a target flow table that records the target route identity information, wherein the target route entry has the target route identity information, and the target packet is forwarded by the target route entry or the target flow table.

[0094] The detection module 12 is used to determine the usage status of the target routing entry based on the attribute information of the data flow to which the target packet belongs when the target flow table is forwarded, if the target flow table exists.

[0095] Optionally, the attribute information of the data stream to which the target message belongs includes the number of data streams to which the target message belongs.

[0096] The detection module 12 is used to determine the attribute information of the data stream to which the target message belongs based on the message identity information of the target message; and to determine the number of data streams to which the target message belongs as the usage status of the target routing entry.

[0097] Optionally, the attribute information of the data stream to which the target packet belongs includes the packet forwarding volume recorded in the target flow table.

[0098] The detection module 12 is used to obtain the packet forwarding volume recorded in the target flow table; and to determine the packet forwarding volume as the usage status of the target routing entry.

[0099] Optionally, the candidate flow table records message identity information.

[0100] The device also includes a forwarding module 13.

[0101] The flow table determination module 11 is used to obtain the message identity information of the target message in response to the receipt of the target message; and to determine whether there exists a target flow table that records the message identity information of the target message in the candidate flow table based on the message identity information recorded in the candidate flow table, wherein the target flow table records the target routing identity information.

[0102] The forwarding module 13 is used to forward the target packet using the target flow table if the target flow table exists in the candidate flow table.

[0103] Optionally, the device further includes a flow table creation module 14.

[0104] The forwarding module 13 is used to forward the target packet using the target routing entry in the routing table if the packet identity information of the target packet is not recorded in the alternative flow table.

[0105] The flow table creation module 14 is used to create the target flow table based on the packet identity information of the target packet and the target route identity information.

[0106] Optionally, the device further includes a display module 15, used to determine the level of the target routing item based on its usage status, the level reflecting the risk of modification of the routing item; and to display the level of the target routing item.

[0107] Optionally, the display module 15 is configured to respond to the modification operation of the target routing item, and if the level of the target routing item is higher than a preset level, display a risk warning message.

[0108] The device shown in Figure 6 can execute the methods of the embodiments shown in Figures 1 to 3. For parts not described in detail in this embodiment, please refer to the relevant descriptions of the embodiments shown in Figures 1 to 3. The execution process and technical effects of this technical solution are described in the embodiments shown in Figures 1 to 3, and will not be repeated here.

[0109] In one possible design, the routing item usage status detection method provided in the above embodiments can be applied to a network device, as shown in FIG7. The network device may include a processor 21 and a memory 22. The memory 22 is used to store programs that support the network device in executing the routing item usage status detection method provided in the embodiments shown in FIG1 to FIG3. The processor 21 is configured to execute the programs stored in the memory 22.

[0110] The program includes one or more computer instructions, wherein when the one or more computer instructions are executed by the processor 21, they can perform the following steps: obtaining a candidate flow table that records routing identity information; determining whether a target flow table that records target routing identity information exists in the candidate flow table, wherein the target routing entry has the target routing identity information, and the target packet is forwarded by the target flow table or the target routing entry; if the target flow table exists, determining the usage status of the target routing entry based on the attribute information of the data flow to which the target packet forwarded by the target flow table belongs.

[0111] Optionally, the processor 21 is also used to perform all or part of the steps in the embodiments shown in Figures 1 to 3 above.

[0112] The network device may also include a communication interface 23 for communicating with other devices or communication networks.

[0113] In addition, this disclosure provides a non-transitory machine-readable storage medium for storing computing unit instructions used by the above-described electronic device, which includes programs for executing the method for detecting the usage status of routing items shown in Figures 1 to 3.

[0114] Additionally, this disclosure provides a computer program product. This computer program product includes a computer program or instructions. When the computer program or instructions are executed by a processor, the processor is able to implement the steps or functions of the routing item usage status detection method shown in Figures 1 to 3.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure.

Claims

1. A method for detecting the usage status of a routing item, comprising: Retrieve the candidate flow table containing routing identity information; In the candidate flow table, it is determined whether there is a target flow table that records the target route identity information, wherein the target route entry has the target route identity information, and the target packet is forwarded by the target flow table or the target route entry; If the target flow table exists, the usage status of the target routing entry is determined based on the attribute information of the data flow to which the target packet belongs, as forwarded by the target flow table.

2. The method according to claim 1, wherein, The attribute information of the data stream to which the target message belongs includes the number of data streams to which the target message belongs; Determining the usage status of the target routing entry based on the attribute information of the data stream to which the target message belongs includes: Based on the message identity information of the target message, determine the number of data streams to which the target message belongs; The number of data streams to which the target message belongs is determined as the usage status of the target routing entry.

3. The method according to claim 1, wherein, The attribute information of the data stream to which the target message belongs includes the message forwarding volume recorded in the target flow table; Determining the usage status of the target routing entry based on the attribute information of the data stream to which the target message belongs includes: Obtain the packet forwarding volume recorded in the target flow table; The packet forwarding volume is used to determine the usage status of the target routing entry.

4. The method according to claim 1, wherein, The candidate flow table records message identity information; The step of determining whether a target flow table containing target route identity information exists in the candidate flow table includes: In response to the receipt of the target message, obtain the message identity information of the target message; Based on the packet identity information recorded in the candidate flow table, determine whether there exists a target flow table that records the packet identity information of the target packet in the candidate flow table, wherein the target flow table records the target route identity information; The method further includes: If the target flow table exists in the candidate flow table, then the target flow table is used to forward the target packet.

5. The method according to claim 4, further comprising: If the packet identity information of the target packet is not recorded in the alternative flow table, the target packet is forwarded using the target route entry in the routing table; The target flow table is created based on the message identity information of the target message and the target route identity information.

6. The method according to claim 1, further comprising: Based on the usage status of the target routing entry, the level of the target routing entry is determined, and the level reflects the risk of modifying the routing entry; Display the level of the target routing entry.

7. The method according to claim 6, further comprising: In response to the modification operation of the target routing entry, if the level of the target routing entry is higher than the preset level, a risk warning message will be displayed.

8. A network device, comprising: Message sending and receiving module and detection module; The message sending and receiving module is used to obtain a candidate flow table that records routing identity information; The detection module is used to determine whether there is a target flow table that records target route identity information in the candidate flow table, wherein the target route identity entry has the target route information, and the target packet is forwarded by the target flow table or the target route entry; If the target flow table exists, the usage status of the target routing entry is determined based on the attribute information of the data flow to which the target packet belongs, as forwarded by the target flow table.

9. The device according to claim 8, further comprising a processor; in, The message sending and receiving module and the detection module are used to run with the computing resources provided by the kernel in the processor.

10. The device according to claim 8, wherein, The attribute information of the data stream to which the target message belongs includes the number of data streams to which the target message belongs; The detection module is used to determine the data stream to which the target message belongs based on the message identity information of the target message; The number of data streams to which the target message belongs is determined as the usage status of the target routing entry.

11. The device according to claim 8, wherein, The attribute information of the data stream to which the target message belongs includes the message forwarding volume recorded in the target flow table; The detection module is used to obtain the packet forwarding volume recorded in the target flow table; The packet forwarding volume is used to determine the usage status of the target routing entry.

12. The device according to claim 8, further comprising: Shared memory; wherein, the message transceiver module is used to obtain the message identity information of the target message in response to the receipt of the target message; The candidate flow table is read from the shared memory, and the candidate flow table records message identity information; Based on the packet identity information recorded in the candidate flow table, determine whether there exists a target flow table that records the packet identity information of the target packet in the candidate flow table, wherein the target flow table records the target route identity information; If the target flow table exists in the candidate flow table, then the target flow table is used to forward the packet to be forwarded.

13. The device according to claim 12, wherein, The device also stores a routing table; The message sending and receiving module is used to forward the target message using the target route entry in the routing table if the message identity information of the target message is not recorded in the alternative flow table. The target flow table is created based on the message identity information of the target message and the target route identity information; Write the target flow table into the shared memory.

14. A network device, comprising: A memory and a processor; wherein the memory stores executable code that, when executed by the processor, causes the processor to perform the following operations: Retrieve the candidate flow table containing routing identity information; In the candidate flow table, it is determined whether there is a target flow table that records the target route identity information, wherein the target route entry has the target route identity information, and the target packet is forwarded by the target flow table or the target route entry; If the target flow table exists, the usage status of the target routing entry is determined based on the attribute information of the data flow to which the target packet belongs, as forwarded by the target flow table.

15. The network device according to claim 14, wherein, The attribute information of the data stream to which the target message belongs includes the number of data streams to which the target message belongs; Determining the usage status of the target routing entry based on the attribute information of the data stream to which the target message belongs includes: Based on the message identity information of the target message, determine the number of data streams to which the target message belongs; The number of data streams to which the target message belongs is determined as the usage status of the target routing entry.

16. The network device according to claim 14, wherein, The attribute information of the data stream to which the target message belongs includes the message forwarding volume recorded in the target flow table; Determining the usage status of the target routing entry based on the attribute information of the data stream to which the target message belongs includes: Obtain the packet forwarding volume recorded in the target flow table; The packet forwarding volume is used to determine the usage status of the target routing entry.

17. The network device according to claim 14, wherein, The candidate flow table records message identity information; The step of determining whether a target flow table containing target route identity information exists in the candidate flow table includes: In response to the receipt of the target message, obtain the message identity information of the target message; Based on the packet identity information recorded in the candidate flow table, determine whether there exists a target flow table that records the packet identity information of the target packet in the candidate flow table, wherein the target flow table records the target route identity information; The operation also includes: If the target flow table exists in the candidate flow table, then the target flow table is used to forward the target packet.

18. The network device according to claim 17, further comprising: If the packet identity information of the target packet is not recorded in the alternative flow table, the target packet is forwarded using the target route entry in the routing table; The target flow table is created based on the message identity information of the target message and the target route identity information.

19. A non-transitory machine-readable storage medium, wherein, The non-transitory machine-readable storage medium stores executable code that, when executed by a processor of an electronic device, causes the processor to perform a method for detecting the usage status of routing entries as described in any one of claims 1 to 7.

20. A computer program product, wherein, The computer program product includes a computer program or instructions that enable the computer program or instructions to perform the steps in the method for detecting the usage status of routing items according to any one of claims 1 to 7.