Flow information acquisition method and device, equipment, storage medium and program product

By obtaining statistical information of each node of the vector packet processing framework, determining the flow information of the data packet in the pipeline, the problem of not being able to determine the flow information of the data packet is solved, improving the operational and maintenance of the graph and lowering the operation and maintenance threshold.

CN119583389APending Publication Date: 2025-03-07CHINA TELECOM CLOUD TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411790399.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-07

AI Technical Summary

Technical Problem

During the process of packet processing based on Libgraph, it is impossible to determine the flow information of the data packet in the pipeline.

Method used

By obtaining the context statistical information of each node of the vector packet processing framework, including metadata, the number of transmitted packets and packet information, the flow information of the data packets in the pipeline is determined.

Benefits of technology

It realizes the determination of data packet flow information, facilitates positioning software errors that cause abnormal behavior of data packets, narrows the diagnostic range, and quickly transmits errors to the monitoring system and inspection system, expands the operational and maintenance of graphs, and lowers the operation and maintenance threshold.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119583389A_ABST
    Figure CN119583389A_ABST
Patent Text Reader

Abstract

The invention relates to a circulation information acquisition method and device, equipment, a storage medium and a program product. The method comprises the following steps: for each node of a vector packet processing framework, acquiring statistical information of the node in the context of the node, and determining circulation information of a data packet in the vector packet processing framework in an assembly line according to the statistical information of each node. Wherein the statistical information comprises metadata of the node, the number of data packets transmitted to each next hop node of the node by the node, and data packet information. According to the embodiment of the invention, the statistical information of the nodes comprises the number of the data packets transmitted to the next hop nodes of the nodes and the data packet information, so that the flow information of the data packets between different nodes can be confirmed, software errors causing abnormal behaviors of the data packets can be conveniently positioned, the diagnosis range is narrowed, and the diagnosis efficiency is improved. And software errors can be quickly transmitted to a monitoring system and an inspection system, so that the operability and the maintenance of the graph are expanded, and the operation and maintenance threshold of the graph is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of message processing, and in particular to a method, device, equipment, storage medium and program product for acquiring flow information. Background Art

[0002] The Data Plane Development Kit (DPDK) is a high-performance packet processing tool with broad application prospects in cloud computing, network function virtualization, and software-defined networks. Among them, Libgraph is a vector packet processing framework that can abstract the processing logic of packets into a graph composed of nodes and links, so as to implement various complex packet processing processes through the graph.

[0003] Compared with the traditional scalar packet processing framework, the vector packet processing framework uses a series of functions to process a batch of data packets, while the scalar packet processing framework uses a series of functions to process one data packet. This approach mainly solves the problem of performance degradation caused by high i-cache miss when the traditional pipeline encounters complex situations.

[0004] However, in the process of message processing based on Libgraph, it is impossible to determine the flow information of the data packet in the pipeline. Summary of the invention

[0005] Based on this, it is necessary to provide a flow information acquisition method, device, equipment, storage medium and program product that can determine the flow information of a data packet in a pipeline (Pipeline) in response to the above technical problems.

[0006] In a first aspect, the present application provides a method for acquiring flow information. The method comprises:

[0007] For each node of the vector packet processing framework, obtain the statistical information of the node in the context of the node; the statistical information includes the metadata of the node, the number of data packets transmitted by the node to each next hop node of the node, and the data packet information;

[0008] According to the statistical information of each node, the flow information of the data packet in the pipeline in the vector packet processing framework is determined.

[0009] In one embodiment, the method further comprises:

[0010] For each of the nodes, storing data packet information of the data packet transmitted by the node to the next hop node as extended data;

[0011] The extended data is registered to obtain the registered extended data; the registered extended data is used to enable or disable the function corresponding to the extended data.

[0012] In one embodiment, the method further comprises:

[0013] Get the statistical information of each data packet transmitted by the node;

[0014] According to the next hop node identifier in the statistical information of each transmitted data packet, each transmitted data packet is grouped to obtain each data packet group;

[0015] The statistical information of the packets in each packet group is stored in the context of the node.

[0016] In one embodiment, obtaining statistical information of the node in the context of the node includes:

[0017] According to the number of data packets in the data packet group, statistical information of the data packets in each of the data packet groups is obtained.

[0018] In one embodiment, obtaining statistical information of the data packets in each data packet group according to the number of data packets in the data packet group includes:

[0019] For each data packet group, if there are multiple data packets in the data packet group, obtain statistical information of a first data packet in the multiple data packets, and obtain the number of the multiple data packets and metadata corresponding to data packets in the multiple data packets except the first data packet;

[0020] If the number of data packets in the data packet group is one, statistical information of one data packet is obtained.

[0021] In one embodiment, the flow information of the data packet in the pipeline in the vector packet processing framework is determined according to the statistical information of each node, including:

[0022] A directed graph is drawn according to the statistical information of the node; the directed graph is used to display the flow information of the data packet in the pipeline in the vector packet processing framework.

[0023] In a second aspect, the present application also provides a flow information acquisition device. The device includes:

[0024] For each node of the vector packet processing framework, obtain the statistical information of the node in the context of the node; the statistical information includes the metadata of the node, the number of data packets transmitted by the node to each next hop node of the node, and the data packet information;

[0025] According to the statistical information of each node, the flow information of the data packet in the pipeline in the vector packet processing framework is determined.

[0026] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of any of the above methods when executed by a processor.

[0028] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.

[0029] The above-mentioned flow information acquisition method, device, equipment, storage medium and program product obtain the statistical information of the node in the context of the node for each node of the vector packet processing framework, and determine the flow information of the data packet in the pipeline in the vector packet processing framework according to the statistical information of each node. Among them, the statistical information includes the metadata of the node, the number of data packets that the node has transmitted to each next-hop node of the node and the data packet information. Since in the embodiment of the present application, the statistical information of the node includes the number of data packets that have been transmitted to each next-hop node of the node and the data packet information, the flow information of the data packets between different nodes can be confirmed, which makes it easier to locate the software errors that cause abnormal behavior of the data packets, narrow the scope of diagnosis, and can quickly transmit the software errors to the monitoring system and the inspection system, which expands the operability of the graph and lowers the threshold for the operation and maintenance of the graph. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 is an internal structure diagram of a computer device provided in an embodiment of the present application;

[0031] Figure 2 It is a flow chart of a method for obtaining flow information provided in an embodiment of the present application;

[0032] Figure 3 It is a structural schematic diagram of statistical information of a vector packet processing framework provided in an embodiment of the present application;

[0033] Figure 4 It is a flowchart of a registration extension data acquisition method provided in an embodiment of the present application;

[0034] Figure 5 It is a flowchart of a statistical information storage method provided in an embodiment of the present application;

[0035] Figure 6 It is a structural schematic diagram of a statistical information directed graph provided in an embodiment of the present application;

[0036] Figure 7 It is a flow chart of a data flow statistics method provided in an embodiment of the present application;

[0037] Figure 8 It is a structural block diagram of a flow information acquisition device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0039] The Data Plane Development Kit (DPDK) is a high-performance packet processing tool with broad application prospects in cloud computing, network function virtualization, and software-defined networks. Among them, Libgraph is a vector packet processing framework that can abstract the processing logic of packets into a graph composed of nodes and links, so as to implement various complex packet processing processes through the graph.

[0040] Compared with the traditional scalar packet processing framework, the vector packet processing framework uses a series of functions to process a batch of data packets, while the scalar packet processing framework uses a series of functions to process one data packet. This approach mainly solves the problem of performance degradation caused by high i-cache miss when the traditional pipeline encounters complex situations.

[0041] However, in the process of message processing based on Libgraph, it is impossible to determine the flow information of the data packet in the pipeline.

[0042] The method for obtaining flow information provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Figure 1 is an internal structure diagram of a computer device provided in an embodiment of the present application. The computer device may be a server, and its internal structure diagram may be as follows Figure 1As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for obtaining flow information is implemented.

[0043] Those skilled in the art will understand that Figure 1 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0044] In one embodiment, Figure 2 As shown, Figure 2 is a flow chart of a method for obtaining flow information provided by an embodiment of the present application, which can be applied to Figure 1 The computer device comprises the following steps:

[0045] S201, for each node of the vector packet processing framework, obtain the statistical information of the node in the context of the node.

[0046] The statistical information includes metadata of the node, the number of data packets that the node has transmitted to each next-hop node of the node, and data packet information.

[0047] Exemplarily, the vector packet processing framework may be, for example, a Libgraph framework of a data plane development kit (Data Plane Development Kit, DPDK).

[0048] In one embodiment, on a DPDK-based run-to-complete message processing model, statistical information of each node may be stored in the context (ctx) of each node, and a data structure of the statistical information of each node may be defined.

[0049] Optionally, the statistical information of a node may include three types of data: metadata, basic data, and advanced data. The number of data packets transmitted to each next-hop node of the node may be the basic data, and the data packet information of the data packets transmitted to each next-hop node of the node may be the advanced data.

[0050] For example, when initializing each node, each type of data cache line may be aligned, and the most frequent data may be placed above the structure as compactly as possible.

[0051] It should be noted that due to the small memory range of ctx, it can usually only store a certain number of cache lines. In modern processors, a cache line is usually 64 bytes, that is, the memory range of ctx can be n×64 bytes, which can improve cache efficiency and avoid performance losses caused by cache line invalidation and cache misses.

[0052] In the embodiment of the present application, the metadata of the node includes metadata of the node itself and metadata related to data packets that have been transmitted to each next-hop node of the node.

[0053] In a possible implementation, when processing packets based on the run-to-complete packet processing model of DPDK, if a node is about to transmit a data packet to a next-hop node, the statistical information of the data packet can be obtained, and then according to the next-hop node identifier corresponding to the data packet, the data packet corresponding to the same next-hop node identifier is stored in the context (ctx) of the node. Thus, when data statistics are required, the statistical information of each node can be obtained from the context (ctx) of each node.

[0054] Optionally, the statistical information of each node can be obtained from the context (ctx) of each node by the following method: according to the next-hop node identifier corresponding to each data packet, the data packets corresponding to the same next-hop node identifier are divided into a data packet group, and stored in the context (ctx) of the node accordingly. When data statistics are required, the number of data packets in each data packet group can be determined. If there are multiple data packets in the data packet group, the statistical information of the first data packet in the multiple data packets is obtained, and the number of multiple data packets and the metadata corresponding to the data packets in the multiple data packets except the first data packet are obtained. If the number of data packets in the data packet group is one, the statistical information of the data packet is obtained.

[0055] It should be noted that, since the next hop nodes corresponding to the data packets in the same data packet group are the same, the data packet information related to the next hop nodes is also the same, so the data packet information can be obtained only once to reduce n-1 repeated acquisition operations.

[0056] For example, refer to Figure 3 , Figure 3 Schematic diagram of the structure of statistical information of a vector packet processing framework provided by an embodiment of the present application. Figure 3 As shown, the statistical information of each node can be obtained from the context (ctx) of each node at a regular interval.

[0057] S202: Determine the flow information of the data packet in the pipeline in the vector packet processing framework according to the statistical information of each node.

[0058] Optionally, the acquired statistical information of each node may be processed, and then a directed graph may be drawn according to the statistical information after the data processing, and the directed graph may reflect the flow information of the data packet in the pipeline.

[0059] In an embodiment of the present application, for each node of the vector packet processing framework, the statistical information of the node in the context of the node is obtained, and the flow information of the data packet in the pipeline in the vector packet processing framework is determined based on the statistical information of each node. Among them, the statistical information includes the metadata of the node, the number of data packets that the node has transmitted to each next-hop node of the node, and the data packet information. Since in an embodiment of the present application, the statistical information of the node includes the number of data packets that have been transmitted to each next-hop node of the node and the data packet information, the flow information of the data packets between different nodes can be confirmed, which facilitates the positioning of the software errors that cause abnormal behavior of the data packets, narrows the scope of diagnosis, and can quickly transmit the software errors to the monitoring system and the inspection system, which expands the operability of the graph and lowers the threshold for the operation and maintenance of the graph.

[0060] In one embodiment, the traffic statistics performance of the flow information acquisition method in the embodiment of the present application can be compared with the traffic statistics performance of the traditional DPDK. The traffic statistics performance of the flow information acquisition method in the embodiment of the present application is improved by 65.35% compared with the traditional DPDK method without reducing the forwarding performance.

[0061] Reference Figure 4 , Figure 4 FIG. 1 is a flow chart of a registration extension data acquisition method provided in an embodiment of the present application. Based on the above embodiment, the method further includes the following steps:

[0062] S401 , for each node, storing data packet information of a data packet that has been transmitted by the node to a next hop node as extended data.

[0063] In one embodiment, the extended data (advanced) includes data packet information of each data packet transmitted to the next hop node, and an extended pointer interface for extending other statistical information.

[0064] S402, registering the extended data to obtain registered extended data.

[0065] The registered extended data is used to enable or disable the function corresponding to the extended data.

[0066] Exemplarily, counting methods, objects, output methods, etc. can be registered in the form of registration methods to obtain registration extension data, which can be set to be normally closed and opened as needed.

[0067] In one embodiment, the base data (base) may be set to be normally open.

[0068] In an embodiment of the present application, for each node, the data packet information of the data packet that the node has transmitted to the next hop node is stored as extended data, and the extended data is registered to obtain registered extended data, so that the function corresponding to the extended data can be controlled to be turned on or off during operation, thereby improving the flexibility of data collection.

[0069] Reference Figure 5 , Figure 5 : is a flow chart of a statistical information storage method provided in an embodiment of the present application. Based on the above embodiment, the method further includes the following steps:

[0070] S501, obtaining statistical information of each data packet transmitted by the node.

[0071] In one possible implementation, each node may be initialized to align cache lines of each type of data, and when performing message processing based on the DPDK run-to-complete message processing model, if the node has transmitted the data packet to the next hop node, statistical information of the data packet may be obtained.

[0072] S502: Group the transmitted data packets according to the next hop node identifier in the statistical information of the transmitted data packets to obtain data packet groups.

[0073] Exemplarily, the next hop node identifier may include, for example, an address, a port number, a number, a name, etc. of the next hop node.

[0074] In one embodiment, data packets corresponding to the same next-hop node identifier may be divided into a data packet group and stored in the context (ctx) of the node accordingly.

[0075] Exemplarily, grouping the transmitted data packets to obtain the data packet groups can be implemented in the following manner: assuming that the next hop nodes of node A include node B and node C, node A needs to transmit data packet A and data packet B to node B, and node A needs to transmit data packet C to node C, then after node A has completed transmitting data packet A to node B, the statistical information of data packet A can be obtained, and the statistical information of data packet A can be stored in the first data packet group. After node A has completed transmitting data packet B to node B, the statistical information of data packet B can be obtained. Since the next hop node identifier corresponding to data packet B is the node identifier of node B, and the next hop node identifier corresponding to data packet A is also the node identifier of node B, the statistical information of data packet B can also be stored in the first data packet group. After node A has completed transmitting data packet C to node C, the statistical information of data packet C can be obtained. Since the next hop node identifier corresponding to data packet C is the node identifier of node C, and the next hop node identifier corresponding to data packet B is the node identifier of node B, the statistical information of data packet C can be stored in the second data packet group.

[0076] S503: Store the statistical information of the data packets in each data packet group in the context of the node.

[0077] Exemplarily, the statistical information of data packets A and B may be stored in a first data packet group in the context of the node, and the statistical information of data packet C may be stored in a second data packet group in the context of the node.

[0078] In an embodiment of the present application, statistical information of each data packet transmitted by the node is obtained, and according to the next-hop node identifier in the statistical information of each data packet transmitted, each transmitted data packet is grouped to obtain each data packet group, and the statistical information of the data packets in each data packet group is stored in the context of the node. Therefore, when obtaining the statistical information of the node, the data packet information can be obtained only once for each data packet in the same data packet group, thereby reducing the number of repeated acquisition operations, saving computing resources, and improving the efficiency of data statistics.

[0079] Based on the above embodiment, the above S201 includes the following steps:

[0080] According to the number of data packets in the data packet group, statistical information of the data packets in each data packet group is obtained.

[0081] In one embodiment, when data statistics are required, the number of data packets in each data packet group can be determined. If there are multiple data packets in the data packet group, statistical information of the first data packet in the multiple data packets is obtained, and the number of multiple data packets and metadata corresponding to data packets in the multiple data packets other than the first data packet are obtained. If there is only one data packet in the data packet group, statistical information of the data packet is obtained.

[0082] In an embodiment of the present application, statistical information of the data packets in each data packet group is obtained based on the number of data packets in the data packet group, so that the data packet information can be obtained only once for each data packet in the same data packet group, thereby reducing the number of repeated acquisition operations, saving computing resources, and improving the efficiency of data statistics.

[0083] On the basis of the above embodiment, according to the number of data packets in the data packet group, obtaining the statistical information of the data packets in each data packet group can be achieved in the following manner:

[0084] For each data packet group, if there are multiple data packets in the data packet group, statistical information of the first data packet among the multiple data packets is obtained, and the number of multiple data packets and metadata corresponding to the data packets among the multiple data packets except the first data packet are obtained.

[0085] Optionally, the first data packet may be, for example, the first data packet in the data packet group that is transmitted to the next hop node.

[0086] Exemplarily, assuming that there are two data packets in the first data packet group: data packet A and data packet B, the statistical information of each data packet in the data packet group can be obtained in the following manner: data packet A is the first data packet, the statistical information of data packet A can be obtained, and the number 2 of data packets in the first data packet group and the metadata corresponding to data packet B can be obtained. Since the next hop node of data packet A and data packet B is the same, the data packet information of data packet A and data packet B is the same, so when obtaining the statistical information, the data packet information of the first data packet group can be obtained only once to reduce the number of acquisition operations.

[0087] Optionally, a batch processing function can be defined. When there are multiple data packets in a data packet group, the statistical information of the first data packet among the multiple data packets is obtained by calling the batch processing function, and the number of multiple data packets and the metadata corresponding to the data packets other than the first data packet among the multiple data packets are obtained.

[0088] It should be noted that if there is different information in the data packet information of data packet A and data packet B, it is necessary to obtain the different information of data packet A and data packet B respectively to avoid missing data.

[0089] Alternatively, obtaining statistical information of the data packets in each data packet group according to the number of data packets in the data packet group may also be achieved in the following manner:

[0090] If the number of data packets in the data packet group is one, the statistical information of one data packet is obtained.

[0091] Exemplarily, assuming that there is one data packet in the second data packet group: data packet C, the statistical information of data packet C can be directly obtained from the context of the node.

[0092] Optionally, a data packet processing function may be defined, and when the number of data packets in the data packet group is one, statistical information of one data packet may be obtained by calling the data packet processing function.

[0093] In an embodiment of the present application, for each data packet group, if there are multiple data packets in the data packet group, statistical information of the first data packet among the multiple data packets is obtained, and the number of multiple data packets and metadata corresponding to data packets other than the first data packet among the multiple data packets are obtained; if there is one data packet in the data packet group, statistical information of one data packet is obtained, so that data packet information can be obtained only once for each data packet in the same data packet group, thereby reducing the number of repeated acquisition operations, saving computing resources, and improving the efficiency of data statistics.

[0094] Based on the above embodiment, the above S202 includes the following steps:

[0095] A directed graph is drawn based on the statistical information of the nodes; the directed graph is used to display the flow information of the data packet in the pipeline in the vector packet processing framework.

[0096] In one embodiment, the statistical information of the nodes acquired by Graph0 at 0s may be shown in the following Table 1, for example:

[0097]

[0098] Table 1

[0099] For example, refer to Figure 6 , Figure 6 1 is a schematic diagram of a structure of a directed graph of statistical information provided in an embodiment of the present application. The directed graph drawn according to Table 1 can be as follows: Figure 6 As shown, the flow information of the data packet in the pipeline can be reflected.

[0100] In an embodiment of the present application, a directed graph is drawn based on the statistical information of the node to display the flow information of the data packet in the pipeline in the vector packet processing framework through the directed graph, so that the flow information of the data packet in the pipeline can be intuitively displayed in a graphical manner, which facilitates the analysis and sorting of the flow information.

[0101] Reference Figure 7 , Figure 7 1 is a flow chart of a data flow statistics method provided in an embodiment of the present application. The method comprises the following steps:

[0102] S701, obtaining statistical information of each data packet transmitted by the node.

[0103] S702: Group the transmitted data packets according to the next hop node identifier in the statistical information of the transmitted data packets to obtain data packet groups.

[0104] S703: Store the statistical information of the data packets in each data packet group in the context of the node.

[0105] S704, for each data packet group, if there are multiple data packets in the data packet group, obtain statistical information of the first data packet among the multiple data packets, and obtain the number of multiple data packets and metadata corresponding to the data packets among the multiple data packets except the first data packet.

[0106] S705: If the number of the data packet in the data packet group is one, obtain statistical information of one data packet.

[0107] S706, drawing a directed graph according to the statistical information of the node; the directed graph is used to display the flow information of the data packet in the pipeline in the vector packet processing framework.

[0108] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0109] Based on the same inventive concept, the embodiment of the present application also provides a flow information acquisition device for implementing the flow information acquisition method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more flow information acquisition device embodiments provided below can refer to the limitations of the flow information acquisition method above, and will not be repeated here.

[0110] In one embodiment, Figure 8 As shown, Figure 8 800 is a structural block diagram of a flow information acquisition device provided in an embodiment of the present application. The device 800 includes:

[0111] The first acquisition module 801 is used to acquire the statistical information of the node in the context of each node of the vector packet processing framework; the statistical information includes the metadata of the node, the number of data packets transmitted by the node to each next hop node of the node, and the data packet information.

[0112] The determination module 802 is used to determine the flow information of the data packet in the pipeline in the vector packet processing framework according to the statistical information of each node.

[0113] In one embodiment, the apparatus 800 further includes:

[0114] The first storage module is used to store, for each node, data packet information of a data packet that has been transmitted by the node to a next-hop node as extended data.

[0115] The registration module is used to register the extended data to obtain the registered extended data; the registered extended data is used to enable or disable the function corresponding to the extended data.

[0116] In one embodiment, the apparatus 800 further includes:

[0117] The second acquisition module is used to acquire statistical information of each data packet transmitted by the node.

[0118] The grouping module is used to group the transmitted data packets to obtain data packet groups according to the next hop node identifier in the statistical information of the transmitted data packets.

[0119] The second storage module is used to store the statistical information of the data packets in each data packet group in the context of the node.

[0120] In one embodiment, the first acquisition module 801 includes:

[0121] The acquisition unit is used to acquire statistical information of the data packets in each data packet group according to the number of data packets in the data packet group.

[0122] In one embodiment, the acquiring unit includes:

[0123] A first acquisition subunit is used for acquiring, for each data packet group, if there are multiple data packets in the data packet group, statistical information of a first data packet among the multiple data packets, and acquiring the number of the multiple data packets and metadata corresponding to data packets other than the first data packet among the multiple data packets;

[0124] The second acquisition subunit is used to acquire statistical information of one data packet if the number of the data packet in the data packet group is one.

[0125] In one embodiment, the determining module 802 includes:

[0126] The drawing unit is used to draw a directed graph according to the statistical information of the node; the directed graph is used to display the flow information of the data packet in the pipeline in the vector packet processing framework.

[0127] Each module in the above-mentioned flow information acquisition device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.

[0128] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0129] For each node of the vector packet processing framework, obtain the statistical information of the node in the context of the node; the statistical information includes metadata of the node, the number of data packets that the node has transmitted to each next hop node of the node, and the data packet information;

[0130] According to the statistical information of each node, the flow information of the data packet in the pipeline in the vector packet processing framework is determined.

[0131] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0132] For each node, storing data packet information of the data packet that the node has transmitted to the next hop node as extended data;

[0133] The extended data is registered to obtain the registered extended data; the registered extended data is used to enable or disable the function corresponding to the extended data.

[0134] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0135] Get the statistics of each data packet transmitted by the node;

[0136] According to the next hop node identifier in the statistical information of each transmitted data packet, each transmitted data packet is grouped to obtain each data packet group;

[0137] Stores statistics for packets in each packet group in the node's context.

[0138] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0139] According to the number of data packets in the data packet group, statistical information of the data packets in each data packet group is obtained.

[0140] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0141] For each data packet group, if there are multiple data packets in the data packet group, obtain statistical information of a first data packet among the multiple data packets, and obtain the number of the multiple data packets and metadata corresponding to data packets other than the first data packet among the multiple data packets;

[0142] If the number of data packets in the data packet group is one, the statistical information of one data packet is obtained.

[0143] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0144] A directed graph is drawn based on the statistical information of the nodes; the directed graph is used to display the flow information of the data packet in the pipeline in the vector packet processing framework.

[0145] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0146] For each node of the vector packet processing framework, obtain the statistical information of the node in the context of the node; the statistical information includes metadata of the node, the number of data packets that the node has transmitted to each next hop node of the node, and the data packet information;

[0147] According to the statistical information of each node, the flow information of the data packet in the pipeline in the vector packet processing framework is determined.

[0148] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0149] For each node, storing data packet information of the data packet that the node has transmitted to the next hop node as extended data;

[0150] The extended data is registered to obtain the registered extended data; the registered extended data is used to enable or disable the function corresponding to the extended data.

[0151] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0152] Get the statistics of each data packet transmitted by the node;

[0153] According to the next hop node identifier in the statistical information of each transmitted data packet, each transmitted data packet is grouped to obtain each data packet group;

[0154] Stores statistics for packets in each packet group in the node's context.

[0155] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0156] According to the number of data packets in the data packet group, statistical information of the data packets in each data packet group is obtained.

[0157] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0158] For each data packet group, if there are multiple data packets in the data packet group, obtain statistical information of a first data packet among the multiple data packets, and obtain the number of the multiple data packets and metadata corresponding to data packets other than the first data packet among the multiple data packets;

[0159] If the number of data packets in the data packet group is one, the statistical information of one data packet is obtained.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0161] A directed graph is drawn based on the statistical information of the nodes; the directed graph is used to display the flow information of the data packet in the pipeline in the vector packet processing framework.

[0162] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:

[0163] For each node of the vector packet processing framework, obtain the statistical information of the node in the context of the node; the statistical information includes metadata of the node, the number of data packets that the node has transmitted to each next hop node of the node, and the data packet information;

[0164] According to the statistical information of each node, the flow information of the data packet in the pipeline in the vector packet processing framework is determined.

[0165] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0166] For each node, storing data packet information of the data packet that the node has transmitted to the next hop node as extended data;

[0167] The extended data is registered to obtain the registered extended data; the registered extended data is used to enable or disable the function corresponding to the extended data.

[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0169] Get the statistics of each data packet transmitted by the node;

[0170] According to the next hop node identifier in the statistical information of each transmitted data packet, each transmitted data packet is grouped to obtain each data packet group;

[0171] Stores statistics for packets in each packet group in the node's context.

[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0173] According to the number of data packets in the data packet group, statistical information of the data packets in each data packet group is obtained.

[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0175] For each data packet group, if there are multiple data packets in the data packet group, obtain statistical information of a first data packet among the multiple data packets, and obtain the number of the multiple data packets and metadata corresponding to data packets other than the first data packet among the multiple data packets;

[0176] If the number of data packets in the data packet group is one, the statistical information of one data packet is obtained.

[0177] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0178] A directed graph is drawn based on the statistical information of the nodes; the directed graph is used to display the flow information of the data packet in the pipeline in the vector packet processing framework.

[0179] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0180] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0181] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for acquiring flow information, characterized in that: The method comprises: For each node of the vector packet processing framework, obtaining statistical information of the node in the context of the node; the statistical information includes metadata of the node, the number of data packets transmitted by the node to each next hop node of the node, and data packet information; According to the statistical information of each of the nodes, the flow information of the data packet in the pipeline in the vector packet processing framework is determined.

2. The method according to claim 1, characterized in that: The method further comprises: For each of the nodes, storing data packet information of the data packet transmitted by the node to the next hop node as extended data; The extended data is registered to obtain registered extended data; the registered extended data is used to enable or disable a function corresponding to the extended data.

3. The method according to claim 1, characterized in that The method further comprises: Obtaining statistical information of each data packet transmitted by the node; According to the next hop node identifier in the statistical information of each transmitted data packet, each transmitted data packet is grouped to obtain each data packet group; Statistical information of the data packets in each of the data packet groups is stored in the context of the node.

4. The method according to claim 3, characterized in that The obtaining of statistical information of the node in the context of the node includes: According to the number of data packets in the data packet group, statistical information of the data packets in each of the data packet groups is obtained.

5. The method according to claim 4, characterized in that The acquiring statistical information of the data packets in each of the data packet groups according to the number of the data packets in the data packet groups comprises: For each of the data packet groups, if there are multiple data packets in the data packet group, obtain statistical information of a first data packet among the multiple data packets, and obtain the number of the multiple data packets and metadata corresponding to data packets among the multiple data packets except the first data packet; If the number of data packets in the data packet group is one, statistical information of one data packet is obtained.

6. The method according to any one of claims 1 to 5, characterized in that: Determining the flow information of the data packet in the pipeline in the vector packet processing framework according to the statistical information of each node includes: A directed graph is drawn according to the statistical information of the node; the directed graph is used to display the flow information of the data packet in the pipeline in the vector packet processing framework.

7. A flow information acquisition device, characterized in that: The device comprises: A first acquisition module is used to acquire statistical information of each node in the context of the node for each node of the vector packet processing framework; the statistical information includes metadata of the node, the number of data packets transmitted by the node to each next hop node of the node, and data packet information; The determination module is used to determine the flow information of the data packet in the pipeline in the vector packet processing framework according to the statistical information of each node.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Method and network device for determining communication path

    CN110178410A

  • Data stream forwarding state recording method and network equipment

    CN110430138A

  • Message transmission method and device

    CN115225545A

  • Data processing method and device, network element equipment and readable storage medium

    CN115834722A

  • Internet of Things card violation data flow interception method and device, network equipment and storage medium

    CN116266792A