Network data packet forwarding performance comparison method and device, equipment and medium
By using traffic control tools and packet filtering tools to compare network packet forwarding performance in different business scenarios, we solved the failure problems caused by mismatch of network packet processing technologies, implemented the selection and deployment of adaptive network packet processing technologies, and ensured business stability.
Patent Information
- Application Number
- CN202510830567.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-19
- Publication Date
- 2025-09-05
AI Technical Summary
In the existing technology, the forwarding performance of network data packet processing technology is not matched or performs poorly, resulting in frequent network failures and affecting the normal operation of services.
By constructing different business scenarios, using traffic control tools and packet filtering tools to set rule chains and mount policy logic on the forwarding path of network packets, the first and second forwarding performance data are obtained and compared respectively to determine the applicable network packet forwarding components.
Quantify the forwarding performance of different network packet technologies in different business scenarios to ensure selection and deployment adaptation, avoid network failures, and ensure stable business operations.
Smart Images

Figure CN120602369A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud transmission technology, and can be specifically applied to financial network scenarios, and in particular to a method, apparatus, device and medium for comparing network data packet forwarding performance. Background Art
[0002] As computer networks evolve from simple local area networks (LANs) to complex wide area networks (WANs) and the internet, the number of connected devices and data traffic within them has increased significantly. As a widely used operating system for servers and network devices, Linux requires robust network packet processing capabilities to adapt to network environments of varying sizes and complexities. This is particularly true in financial scenarios that require processing massive amounts of transaction data. Network packet processing technology can efficiently forward internal transaction data, monitor compliance within financial networks, and enhance data security.
[0003] In the related art, the network traffic control tool or packet filtering mechanism of the Linux firewall can be used to forward and process network packets. The Linux firewall tool is a user space tool used to configure the firewall rules of the Linux kernel. The firewall rules can be loaded into the kernel space through the network traffic control tool, and the kernel processes the packets as they pass through. The packet filtering mechanism injects customized program code into the packet processing node in the kernel, and processes the packets quickly according to pre-set logic. However, in an actual network environment, the forwarding performance of network packets directly affects the overall efficiency and stability of the system. If a network packet processing technology with mismatched forwarding performance or poor performance is used, it may cause frequent network failures and affect the normal operation of the business. Summary of the Invention
[0004] The present invention provides a method, apparatus, computer equipment and medium for comparing network data packet forwarding performance, so as to solve the technical problem that in the process of selecting network data packet processing technology in related technologies, if a network data packet processing technology with mismatched forwarding performance or poor performance is used, it may cause frequent network failures and affect the normal operation of business.
[0005] In a first aspect, a method for comparing network data packet forwarding performance is provided, comprising:
[0006] Pre-construct different business scenarios for network packet forwarding;
[0007] Simulating the issuance of control policies in the different business scenarios, using a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet to control the forwarding of the network data packet, and obtaining first forwarding performance data; and
[0008] Simulating the issuance of control policies in the different business scenarios, using a data packet filtering tool to inject program-mounted policy logic into a forwarding path of a network data packet to control the forwarding of the network data packet, and obtaining second forwarding performance data;
[0009] The first forwarding performance data and the second forwarding performance data are compared to obtain network data packet forwarding components suitable for different business scenarios.
[0010] In a second aspect, a device for comparing network data packet forwarding performance is provided, comprising:
[0011] Construction module, used to pre-construct different business scenarios for network data packet forwarding;
[0012] a control module, configured to simulate issuing control policies in the different service scenarios, and use a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet to control forwarding of the network data packet and obtain first forwarding performance data;
[0013] The control module is further configured to simulate the issuance of control policies in the different business scenarios, and use a data packet filtering tool to inject program-mounted policy logic into a forwarding path of a network data packet to control the forwarding of the network data packet and obtain second forwarding performance data;
[0014] A comparison module is used to compare the first forwarding performance data with the second forwarding performance data to obtain a network data packet forwarding component suitable for different business scenarios.
[0015] In a third aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned method for comparing network data packet forwarding performance when executing the computer program.
[0016] In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned method for comparing network data packet forwarding performance are implemented.
[0017] In the scheme implemented by the above-mentioned network data packet forwarding performance comparison method, device, computer equipment and storage medium, different business scenarios for network data packet forwarding can be pre-constructed by the server; the control strategy is simulated in different business scenarios, and a predefined rule chain is set on the forwarding path of the network data packet using a traffic control tool to control the forwarding of the network data packet to obtain first forwarding performance data; and the control strategy is simulated in different business scenarios, and a program-mounted policy logic is injected into the forwarding path of the network data packet using a packet filtering tool to control the forwarding of the network data packet to obtain second forwarding performance data; the first forwarding performance data and the second forwarding performance data are compared to obtain network data packet forwarding components applicable to different business scenarios, so that the client can select a suitable network data packet forwarding component to issue a control strategy according to the business scenario. In the present invention, by comparing the performance forwarding data obtained using different network packet processing technologies in different network packet forwarding business scenarios, the forwarding performance of different network packet technologies can be quantified to clarify the forwarding performance of different network packet technologies in different business scenarios, thereby determining the network packet processing technology that is more suitable for different business scenarios, providing technical support for diversified network functions for the selection and deployment of application environments, avoiding frequent network failures, and ensuring normal business operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 This is a schematic diagram of an application environment of a method for comparing network data packet forwarding performance in one embodiment of the present invention;
[0020] Figure 2 1 is a flow chart of a method for comparing network data packet forwarding performance according to an embodiment of the present invention;
[0021] Figure 3 is a flow chart of a method for comparing network data packet forwarding performance in another embodiment of the present invention;
[0022] Figure 4 is a flow chart of a method for comparing network data packet forwarding performance in another embodiment of the present invention;
[0023] Figure 5 yes Figure 1 A schematic flow chart of a specific implementation of step S30;
[0024] Figure 6 It is a structural diagram of a device for comparing network data packet forwarding performance according to an embodiment of the present invention;
[0025] Figure 7 is a structural diagram of a computer device in one embodiment of the present invention;
[0026] Figure 8 FIG. 2 is another structural diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0028] The network data packet forwarding performance comparison method provided by the embodiment of the present invention can be applied in the following situations: Figure 1 In an application environment, the server pre-constructs different business scenarios for network packet forwarding; simulates the issuance of control strategies in different business scenarios, uses a flow control tool to set a predefined rule chain on the forwarding path of the network packet to control the forwarding of the network packet, and obtains first forwarding performance data; and simulates the issuance of control strategies in different business scenarios, uses a packet filtering tool to inject program-mounted policy logic on the forwarding path of the network packet to control the forwarding of the network packet, and obtains second forwarding performance data; compares the first forwarding performance data and the second forwarding performance data to obtain network packet forwarding components applicable to different business scenarios, so that the client selects a suitable network packet forwarding component to issue the control strategy according to the business scenario. In the present invention, by comparing the performance forwarding data obtained by using different network packet processing technologies in different business scenarios for network packet forwarding, the forwarding performance of different network packet technologies can be quantified to clarify the forwarding performance of different network packet technologies in different business scenarios, thereby determining the network packet processing technology that is more suitable for different business scenarios, providing technical support for diversified network functions for the selection and deployment of application environments, avoiding frequent network failures, and ensuring normal business operation. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and portable wearable devices. The server can be implemented as an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0029] See also Figure 2 As shown, Figure 2 A flowchart of a method for comparing network data packet forwarding performance provided by an embodiment of the present invention includes the following steps:
[0030] S10: Pre-construct different business scenarios for network data packet forwarding.
[0031] The network packet forwarding performance comparison method provided by the present invention can be applied to the scenario of network equipment selection. This forwarding performance can help technical decision makers verify the feasibility of the solution, locate system bottlenecks, and promote the sustainability of network architecture through quantitative indicators. Considering that different network application scenarios have different requirements for network packet forwarding performance, for example, financial transaction networks require low latency and high throughput to ensure real-time transactions, and the internal network of the data center needs to support large-scale concurrent forwarding and multi-path load balancing. Specifically, the performance indicators can be quantified into indicator thresholds, such as forwarding rate, throughput, forwarding delay, packet loss rate, and number of concurrent connections. Then, different packet processing tools are used to simulate the actual business traffic of real network application scenarios to obtain the network packet forwarding performance of different packet processing tools in different network application scenarios. Finally, the network packet forwarding performance of different packet processing tools in different network application scenarios is compared, and the indicator weights are set according to the business priority to calculate the evaluation score of the packet processing tools for different network application scenarios. In this way, in actual business scenarios, the packet processing tool that is more suitable for the current network application scenario can be selected based on the comparison results of network packet forwarding performance, ensuring that the network equipment is accurately matched to the business scenario.
[0032] In this embodiment, network packet forwarding is a core component of network communications. This process is equivalent to network devices (such as routers, switches, and firewalls) transmitting data from a source port or interface to a destination port or interface based on the packet's destination address, protocol type, and other information. Specifically, by parsing identifiers such as the IP address and MAC address in the packet header and combining them with the device's internal routing tables, forwarding rules, or policies, this enables directional data transmission between different network nodes. This is a fundamental mechanism for ensuring network connectivity and data transmission efficiency.
[0033] To construct different business scenarios for network packet forwarding, we must combine actual network requirements and design a simulation environment based on business requirements, network topology, packet flow characteristics, and performance metrics to simulate the network packet forwarding logic of real business scenarios. These different business scenarios may include, but are not limited to, finance, internet services, and healthcare.
[0034] Taking the financial sector as an example, a business scenario involving high-frequency trading data packet forwarding can be constructed. Since high-frequency trading requires order processing to be completed in a short period of time, business requirements include ultra-low latency, ultra-high throughput, zero packet loss, and data consistency. The network topology includes core nodes with multiple servers, switches, and trading gateways. Packet traffic characteristics can be configured to have traffic modes such as bursty traffic, sustained high traffic, and responsive traffic based on different packet types. Performance indicators may include forwarding delay, throughput, packet loss rate, and jitter.
[0035] S20: simulating the issuance of control policies in the different business scenarios, using a traffic control tool to set a predefined rule chain on the forwarding path of the network data packet to control the forwarding of the network data packet, and obtaining first forwarding performance data.
[0036] In this embodiment, the traffic control tool is a network security policy configuration tool running in user space on a Linux system. It implements firewall functionality based on the kernel framework and defines rule chains to filter network packets, perform network address translation, and perform connection tracking. Specifically, after rules are written in user space, they are loaded into kernel space, where the kernel processes network packets according to the rules as they flow through each rule chain. Specifically, the kernel's IP forwarding function is first enabled to enable the system to forward received network packets to other network interfaces. Forwarding rules are then configured to allow specific traffic forwarding, that is, to forward qualified network packets from the source network to the destination network. For example, this allows intranet users to access the extranet. Stateful forwarding can also be used, utilizing a link tracking mechanism to automatically allow response packets to established connections, reducing the complexity of manually configuring rules. Furthermore, network addresses are translated. When an intranet device accesses the extranet, the source IP address of the network packet is modified to the public IP address of the egress network card, enabling the extranet device to respond correctly. When an extranet user accesses an intranet service, the destination IP address of the network packet is converted to the IP address of the intranet server, implementing port mapping. Finally, the network data packets are matched one by one according to the forwarding rule sequence. Once a match is successful, the corresponding action is performed, including acceptance, rejection or discard. Commonly used matching conditions here include source / destination IP, port number, protocol type and connection status.
[0037] S30: simulating the issuance of control policies in the different business scenarios, and using a data packet filtering tool to inject program-mounted policy logic into the forwarding path of the network data packet to control the forwarding of the network data packet and obtain second forwarding performance data.
[0038] In this embodiment, the packet filtering tool is an extended Berkeley packet filter, allowing developers to securely and dynamically extend kernel functionality without modifying kernel source code or loading kernel modules. By running sandboxed programs within the kernel environment, fine-grained control and efficient processing of system behavior are achieved. Specifically, the packet filter program can be mounted to a pre-set hook point in the kernel. When a network packet flows through, the packet filter program automatically triggers execution, parses key fields from the network packet, such as source / destination IP, port, and protocol type, to serve as the basis for forwarding decisions. The packet filter program's built-in comparison operations compare the parsed key fields with preset rules. The preset rules are stored in the packet filter program's mapping, which can be a routing table mapping, a blacklist mapping, or other mappings. Finally, forwarding operations are executed based on the comparison results. For direct forwarding, the network packet can be re-routed to a designated interface using the packet filter program's built-in functions. For replication and diversion, network packets can be replicated and sent to multiple destinations simultaneously for traffic mirroring or load balancing. For drop and reject, network packets that do not meet the rules can be directly discarded or rejected, thereby blocking illegal traffic.
[0039] It can be understood that the above steps S20 and S30 are the process of using different network packet processing tools to control the forwarding of network packets after simulating the issuance of control policies in different business scenarios. That is to say, these two steps are two steps executed in parallel and do not have a sequence. That is, after simulating the issuance of control policies in different business scenarios, the traffic control tool can be used to set a predefined rule chain on the forwarding path of the network packet to control the forwarding of the network packet and obtain the first forwarding performance data; at the same time, the packet filtering tool is used to inject the program-mounted policy logic into the forwarding path of the network packet to control the forwarding of the network packet and obtain the second forwarding performance data.
[0040] In a specific implementation scenario, labels are metadata identifiers attached to network objects. Through label matching, network packet forwarding based on IP / port can be upgraded to network packet forwarding based on service attributes. Figure 3 As shown, in step S10, different business scenarios of network data packet forwarding are pre-constructed, including the following steps:
[0041] S11: Allocate a label to the network entity in advance, and construct a first service scenario for network data packet forwarding according to a matching rule of the label.
[0042] Tags are metadata identifiers added to network packets, used to precisely locate specific traffic. These tags can be service type tags, assigned based on the functionality of microservices. For example, there might be tags for product services, payment services, and order processing services. Tags can also be security level tags, assigned based on the security importance of a service. For example, services like payment are assigned high-level tags, while services like product display are assigned low-level tags. Specific tag matching rules are equivalent to forwarding rules for network packets and can be preset based on business needs or dynamically generated based on device attributes.
[0043] The tag-matching-based network packet forwarding process involves the authentication system automatically assigning a corresponding tag when a user or device accesses the network. Network devices then match the packet's source and destination tags to pre-set forwarding rules. For example, if a user device accesses the official website server and the source and destination tags match, the traffic is allowed through. However, if the user device accesses the finance department server and the tags don't match, the traffic is denied. It should be noted that tag matching rules are updated simultaneously with changes to user departments or device permissions.
[0044] Correspondingly, in step S20, simulating the issuance of a control policy in the first business scenario, using a traffic control tool to set a predefined rule chain on the forwarding path of the network data packet to control the forwarding of the network data packet, and obtaining first forwarding performance data; and
[0045] Step S30: simulate the control policy in the first business scenario, use the data packet filtering tool to inject the program-mounted policy logic into the forwarding path of the network data packet to control the forwarding of the network data packet and obtain the second forwarding performance data.
[0046] In the above step S20, in the first business scenario, a traffic control tool can be used to convert the label information assigned by the network entity into a label matching rule and add it to a predefined rule chain; the predefined rule chain is written into the kernel rule table so that the network data packet forwarding is controlled according to the predefined rule chain when the network data packet flows through the kernel network stack, and the first forwarding performance data is obtained.
[0047] Specifically, in the first business scenario, when using traffic control tools to control network packet forwarding, network packet forwarding can be controlled by matching labels with predefined metadata. This forwarding control process typically requires the use of container orchestration tools or specific extension modules to attach labels to network entities. These labels are essentially user-defined metadata and can be associated with network entities in the following ways: First, container runtime association: When the container is started, the orchestration tool assigns labels to network entities. These labels are mapped to specific attributes of the network stack, for example, by the orchestration tool assigning the label "app=web" to a physical machine or container. Second, kernel module association: Some extension modules allow direct labeling of network packets or extract label information from dimensions such as processes and network interfaces. Accordingly, during the network packet forwarding control process, label information can be converted into label matching rules and mapped to predefined rule chains in the traffic control tool. When a packet flows through the predefined rule chains, the traffic control tool, through the kernel module, checks the label associated with the network entity corresponding to the network packet. If a label condition is matched, the preset action is executed.
[0048] In the above step S30, in the first business scenario, a packet filtering tool can be used to map the label information assigned by the network entity into a label matching rule and inject it into the policy logic mounted by the program; the policy logic mounted by the program is loaded into the kernel specified hook point, so that when the network data packet flows through the kernel specified hook point, the network data packet forwarding is controlled according to the policy logic mounted by the program, and the second forwarding performance data is obtained.
[0049] Specifically in the first business scenario, when using a packet filtering tool to control the forwarding of network packets, a label can be added to the physical machine through the container orchestration tool, so that the packet filtering program can obtain the label information assigned by the network entity from the container runtime. The packet filtering program then extracts the source / destination entity identifier from the metadata of the network packet, queries the corresponding label, and controls the forwarding behavior of the network packet according to preset rules. For example, if the source label contains the first label and the target label contains the second label, the network packet is allowed to be forwarded. If the source label contains the first label but the target label does not contain the second label, the packet is rejected.
[0050] In a specific implementation scenario, classless inter-domain routing can identify continuous IP segments by combining IP addresses with prefix lengths, and can extend the forwarding of network packets for a single IP address to forwarding network packets for network segments. Figure 4 As shown, in step S10, different business scenarios of network data packet forwarding are pre-constructed, including the following steps:
[0051] S12: Allocate flow-controlled classless inter-domain routing to the network entity in advance, and construct a second service scenario for network data packet forwarding according to the classless inter-domain routing.
[0052] Classless inter-domain routing (CIDR) defines network segments in the form of IP address / mask length, matching contiguous IP address ranges. CIDR uses variable-length network prefixes to define the network range of IP addresses, enabling efficient address allocation and route optimization. For example, CIDR can be divided into multiple IP address segments based on city, with each segment corresponding to a city node. When a non-local user accesses a Beijing node, route matching allows network packets to be directly forwarded to the Beijing node's IP address, eliminating the need for individual matching.
[0053] Correspondingly, in step S20, simulating the issuance of a control policy in the second business scenario, using a traffic control tool to set a predefined rule chain on the forwarding path of the network data packet to control the forwarding of the network data packet, and obtaining first forwarding performance data; and
[0054] Step S30: simulate the issuance of a control policy in the second business scenario, use a data packet filtering tool to inject the program-mounted policy logic into the forwarding path of the network data packet to control the forwarding of the network data packet and obtain the second forwarding performance data.
[0055] In the above step S20, in the second business scenario, a traffic control tool can be used to convert the classless inter-domain routing allocated by the network entity into an IP address range recognizable by the kernel and add it to the predefined rule chain; the predefined rule chain is written into the kernel rule table so that the network data packet forwarding is controlled according to the predefined rule chain when the network data packet flows through the kernel network stack, and the first forwarding performance data is obtained.
[0056] Specifically in the second business scenario, when using traffic tools to control the forwarding of network data packets, the network data packets can be forwarded by matching the preset routing address segments. The forwarding control process usually reads the tag field of the set network data packet according to the data packet filter program (or passes the label list through mapping). If the tag field of the set network data packet is equal to the metadata identifier added to the network data table, the set network data packet forwarding is executed; the routing header of the set network data packet can also be parsed through the data packet filter program, and the source routing address and the destination routing address are respectively matched with the preset routing address segments for bit operations to determine whether the routing address segments are consistent. If they are consistent, the set network data packet forwarding is executed.
[0057] In the above step S30, in the second business scenario, a packet filtering tool can be used to convert the classless inter-domain routing assigned by the network entity into an IP address range recognizable by the kernel and inject the policy logic mounted by the program; the policy logic mounted by the program is loaded into the kernel specified hook point, so that when the network data packet flows through the kernel specified hook point, the network data packet forwarding is controlled according to the policy logic mounted by the program, and the second forwarding performance data is obtained.
[0058] Specifically in the second business scenario, when using a packet filtering tool to control the forwarding of network packets, the target network to be forwarded can be specified through classless inter-domain routing, and the network packets of which IP address segments need to be processed can be clarified. The packet filter then captures the network packets through kernel hooks, parses the source IP and destination IP of the network packets, and compares them with the preset rules. If the preset rule is to forward network packets with a destination address belonging to 192.168.2.0 / 24, only network packets of this network segment will be matched. After a successful match, the packet filter directs the network packets to the specified network interface or forwarding path by calling a kernel function. For example, network packets belonging to 10.1.0.0 / 24 are forwarded to virtual network interface A to achieve traffic scheduling across networks or containers.
[0059] S40: Compare the first forwarding performance data with the second forwarding performance data to obtain network data packet forwarding components applicable to different business scenarios.
[0060] In this embodiment, the forwarding performance data obtained by controlling the forwarding of network data packets using different data packet processing tools can be measured by at least one indicator dimension such as forwarding rate, throughput, and forwarding delay. Correspondingly, the first forwarding performance data and the second forwarding performance data can also be measured by at least one of the above indicator dimensions. Specifically, Figure 5 As shown, in step S40, that is, comparing the first forwarding performance data and the second forwarding performance data to obtain network data packet forwarding components applicable to different business scenarios, the following steps are included:
[0061] S41: Predetermine at least one indicator dimension of a network data packet forwarding application.
[0062] S42: Visually compare the first forwarding performance data and the second forwarding performance data in at least one indicator dimension to obtain network data packet forwarding components applicable to different business scenarios.
[0063] In this embodiment, the visual comparison process can be a horizontal comparison, that is, the difference in forwarding performance under the same scenario. For example, in a small traffic concurrency scenario, attention is paid to indicators such as latency and connection establishment rate. Visual comparison can find that when using flow control tools to frequently create short connections, resource consumption overhead may cause latency fluctuations. Using packet filtering tools can reduce overhead through lightweight connection tracking, making latency more stable. For example, in a large traffic throughput scenario, attention is paid to indicators such as throughput and CPU utilization. Visual comparison can find that when using flow control tools to set traffic, packet loss may occur due to the quietness of a single CPU core. Using packet filtering tools in conjunction with multi-core offloading and just-in-time compilation, throughput can reach line speed.
[0064] In this embodiment, the visual comparison process can also be a longitudinal comparison, that is, changes in forwarding performance within the same scenario. For example, by increasing the number of rules and recording changes in metrics such as throughput and latency, it can be found that the performance of flow control tools decreases linearly with the number of rules, while the performance of packet filtering tools decreases more gradually due to their efficient data structure. For another example, by recording packet loss rates and recovery times during burst traffic, it can be found that the use of flow control tools may result in significant packet loss during bursts due to their interrupt handling mechanisms, while the use of packet filtering tools can directly filter invalid packets at the network card hardware layer, resulting in a lower packet loss rate.
[0065] It is understandable that if the business scenario is a high-concurrency, low-latency, large-scale regular network scenario, such as cloud server firewalls and container networks, packet filtering tools can be used as the network packet forwarding component. If the business scenario is a simple regular network scenario with small to medium traffic, such as a stand-alone firewall and home network, flow control tools can be used as the network packet forwarding component.
[0066] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0067] In one embodiment, a network data packet forwarding performance comparison device is provided, and the network data packet forwarding performance comparison device corresponds to the network data packet forwarding performance comparison method in the above embodiment. Figure 6 As shown, the network data packet forwarding performance comparison device includes a construction module 101, a control module 102 and a comparison module 103. The functional modules are described in detail as follows:
[0068] Construction module 101, used to pre-construct different business scenarios for network data packet forwarding;
[0069] A control module 102 is configured to simulate issuing control policies in the different service scenarios, use a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet, and control the forwarding of the network data packet to obtain first forwarding performance data; and
[0070] The control module 102 is further configured to simulate the issuance of control policies in the different service scenarios, and use a packet filtering tool to inject program-mounted policy logic into the forwarding path of the network packet to control the forwarding of the network packet and obtain second forwarding performance data;
[0071] The comparison module 103 is used to compare the first forwarding performance data with the second forwarding performance data to obtain network data packet forwarding components applicable to different business scenarios.
[0072] In one embodiment, the construction module 101 is specifically configured to:
[0073] Pre-assigning a label to a network entity and constructing a first business scenario for network data packet forwarding according to a matching rule of the label, wherein the label is a metadata identifier added to the network data packet and is used to accurately locate specific traffic;
[0074] Correspondingly, the control module 102 is specifically used to simulate the issuance of a control policy in the first business scenario, use a traffic control tool to set a predefined rule chain on the forwarding path of the network data packet to control the forwarding of the network data packet, and obtain first forwarding performance data; and simulate the issuance of a control policy in the first business scenario, use a packet filtering tool to inject a program-mounted policy logic on the forwarding path of the network data packet to control the forwarding of the network data packet, and obtain second forwarding performance data.
[0075] In one embodiment, the control module 102 is further configured to:
[0076] In the first service scenario, a traffic control tool is used to convert label information allocated by a network entity into a label matching rule and add it to a predefined rule chain;
[0077] The predefined rule chain is written into the kernel rule table, so that when the network data packet flows through the kernel network stack, the network data packet forwarding is controlled according to the predefined rule chain to obtain first forwarding performance data.
[0078] In one embodiment, the control module 102 is further configured to:
[0079] In the first business scenario, a packet filtering tool is used to map the label information assigned by the network entity into the policy logic mounted by the label matching rule injection program;
[0080] The policy logic mounted by the program is loaded into the kernel specified hook point, so that when the network data packet flows through the kernel specified hook point, the network data packet forwarding is controlled according to the policy logic mounted by the program, and the second forwarding performance data is obtained.
[0081] In one embodiment, the construction module 101 is specifically configured to:
[0082] pre-allocating a flow-controlled classless inter-domain route for a network entity, and constructing a second service scenario for network data packet forwarding based on the classless inter-domain route, wherein the classless inter-domain route defines a network segment in the form of an IP address / mask length and is used to match a continuous IP address range;
[0083] Correspondingly, the control module 102 is specifically used to simulate the issuance of a control policy in the second business scenario, use a traffic control tool to set a predefined rule chain on the forwarding path of the network data packet to control the forwarding of the network data packet, and obtain first forwarding performance data; and simulate the issuance of a control policy in the second business scenario, use a packet filtering tool to inject program-mounted policy logic on the forwarding path of the network data packet to control the forwarding of the network data packet, and obtain second forwarding performance data.
[0084] In one embodiment, the control module 102 is further configured to:
[0085] In the second service scenario, a traffic control tool is used to convert the classless inter-domain routes allocated by the network entity into an IP address range recognizable by the kernel and add the address to a predefined rule chain;
[0086] Writing the predefined rule chain into a kernel rule table so that when a network data packet flows through a kernel network stack, forwarding of the network data packet is controlled according to the predefined rule chain, thereby obtaining first forwarding performance data;
[0087] The control module 102 is further configured to:
[0088] In the second business scenario, a packet filtering tool is used to convert the classless inter-domain routing assigned by the network entity into an IP address range recognizable by the kernel and injected into the policy logic mounted by the program;
[0089] The policy logic mounted by the program is loaded into the kernel specified hook point, so that when the network data packet flows through the kernel specified hook point, the network data packet forwarding is controlled according to the policy logic mounted by the program, and the second forwarding performance data is obtained.
[0090] In one embodiment, the comparison module 103 is specifically configured to:
[0091] Predetermining at least one indicator dimension of a network packet forwarding application;
[0092] The first forwarding performance data and the second forwarding performance data are visually compared in at least one indicator dimension to obtain network data packet forwarding components suitable for different business scenarios.
[0093] The present invention provides a network data packet forwarding performance comparison device. By comparing the performance forwarding data obtained by using different network data packet processing technologies in different network data packet forwarding business scenarios, the forwarding performance of different network data packet technologies can be quantified to clarify the forwarding performance of different network data packet technologies in different business scenarios, thereby determining the network data packet processing technology that is more suitable for different business scenarios, providing technical support for diversified network functions for the selection and deployment of application environments, avoiding frequent network failures, and ensuring normal business operation.
[0094] For the specific definition of the network data packet forwarding performance comparison device, please refer to the definition of the intelligent question-answering method above, which will not be repeated here. The various modules in the above-mentioned network data packet forwarding performance comparison device can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0095] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or 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 computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a server-side method for comparing network data packet forwarding performance.
[0096] In one embodiment, a computer device is provided. The computer device may be a client, and its internal structure diagram may be as follows: Figure 8As shown. The computer device includes a processor, memory, network interface, display screen and input device connected via a system bus. 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 and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of a method for comparing network data packet forwarding performance.
[0097] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are performed:
[0098] Pre-construct different business scenarios for network packet forwarding;
[0099] Simulating the issuance of control policies in the different business scenarios, using a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet to control the forwarding of the network data packet, and obtaining first forwarding performance data; and
[0100] Simulating the issuance of control policies in the different business scenarios, using a data packet filtering tool to inject program-mounted policy logic into a forwarding path of a network data packet to control the forwarding of the network data packet, and obtaining second forwarding performance data;
[0101] The first forwarding performance data and the second forwarding performance data are compared to obtain network data packet forwarding components suitable for different business scenarios.
[0102] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:
[0103] Pre-construct different business scenarios for network packet forwarding;
[0104] Simulating the issuance of control policies in the different business scenarios, using a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet to control the forwarding of the network data packet, and obtaining first forwarding performance data; and
[0105] Simulating the issuance of control policies in the different business scenarios, using a data packet filtering tool to inject program-mounted policy logic into a forwarding path of a network data packet to control the forwarding of the network data packet, and obtaining second forwarding performance data;
[0106] The first forwarding performance data and the second forwarding performance data are compared to obtain network data packet forwarding components suitable for different business scenarios.
[0107] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can be found in the relevant descriptions of the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0108] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. 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 memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0109] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0110] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. A method for comparing network data packet forwarding performance, characterized in that: include: Pre-construct different business scenarios for network packet forwarding; Simulating the issuance of control policies in the different business scenarios, using a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet to control the forwarding of the network data packet, and obtaining first forwarding performance data; as well as Simulating the issuance of control policies in the different business scenarios, using a data packet filtering tool to inject program-mounted policy logic into a forwarding path of a network data packet to control the forwarding of the network data packet, and obtaining second forwarding performance data; The first forwarding performance data and the second forwarding performance data are compared to obtain network data packet forwarding components suitable for different business scenarios.
2. The method for comparing network data packet forwarding performance according to claim 1, wherein: The different business scenarios of pre-constructing network data packet forwarding include: Pre-assigning a label to a network entity and constructing a first business scenario for network data packet forwarding according to a matching rule of the label, wherein the label is a metadata identifier added to the network data packet and is used to accurately locate specific traffic; Accordingly, in the first business scenario, a control policy is simulated and a traffic control tool is used to set a predefined rule chain on the forwarding path of the network data packet to control the forwarding of the network data packet and obtain first forwarding performance data; and In the first business scenario, the control policy is simulated and the policy logic mounted by the program is injected into the forwarding path of the network data packet using the data packet filtering tool to control the forwarding of the network data packet and obtain the second forwarding performance data.
3. The method for comparing network data packet forwarding performance according to claim 2, wherein: The simulating the issuing of a control policy in the first service scenario, using a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet to control forwarding of the network data packet, and obtaining first forwarding performance data includes: In the first service scenario, a traffic control tool is used to convert label information allocated by a network entity into a label matching rule and add it to a predefined rule chain; The predefined rule chain is written into the kernel rule table, so that when the network data packet flows through the kernel network stack, the network data packet forwarding is controlled according to the predefined rule chain to obtain first forwarding performance data.
4. The method for comparing network data packet forwarding performance according to claim 2, wherein: The simulation of issuing a control policy in the first business scenario and injecting program-mounted policy logic into a forwarding path of a network data packet using a data packet filtering tool to control network data packet forwarding to obtain second forwarding performance data includes: In the first business scenario, a packet filtering tool is used to map the label information assigned by the network entity into the policy logic mounted by the label matching rule injection program; The policy logic mounted by the program is loaded into the kernel specified hook point, so that when the network data packet flows through the kernel specified hook point, the network data packet forwarding is controlled according to the policy logic mounted by the program, and the second forwarding performance data is obtained.
5. The method for comparing network data packet forwarding performance according to claim 1, wherein: The different business scenarios of pre-constructing network data packet forwarding include: pre-allocating a flow-controlled classless inter-domain route for a network entity, and constructing a second service scenario for network data packet forwarding based on the classless inter-domain route, wherein the classless inter-domain route defines a network segment in the form of an IP address / mask length and is used to match a continuous IP address range; Accordingly, in the second business scenario, a control policy is simulated and a traffic control tool is used to set a predefined rule chain on the forwarding path of the network data packet to control the forwarding of the network data packet and obtain the first forwarding performance data; and In the second business scenario, the control policy is simulated and the policy logic mounted by the program is injected into the forwarding path of the network data packet using the data packet filtering tool to control the forwarding of the network data packet and obtain the second forwarding performance data.
6. The method for comparing network data packet forwarding performance according to claim 5, wherein: The simulating the issuing of a control policy in the second service scenario, using a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet to control forwarding of the network data packet, and obtaining first forwarding performance data includes: In the second service scenario, a traffic control tool is used to convert the classless inter-domain routes allocated by the network entity into an IP address range recognizable by the kernel and add the address to a predefined rule chain; Writing the predefined rule chain into a kernel rule table so that when a network data packet flows through a kernel network stack, forwarding of the network data packet is controlled according to the predefined rule chain, thereby obtaining first forwarding performance data; The simulation of issuing a control policy in the second business scenario, using a data packet filtering tool to inject program-mounted policy logic into a forwarding path of a network data packet to control network data packet forwarding, and obtaining second forwarding performance data includes: In the second business scenario, a packet filtering tool is used to convert the classless inter-domain routing assigned by the network entity into an IP address range recognizable by the kernel and injected into the policy logic mounted by the program; The policy logic mounted by the program is loaded into the kernel specified hook point, so that when the network data packet flows through the kernel specified hook point, the network data packet forwarding is controlled according to the policy logic mounted by the program, and the second forwarding performance data is obtained.
7. The method for comparing network data packet forwarding performance according to any one of claims 1 to 6, wherein: The comparing the first forwarding performance data with the second forwarding performance data to obtain network data packet forwarding components applicable to different business scenarios includes: Predetermining at least one indicator dimension of a network packet forwarding application; The first forwarding performance data and the second forwarding performance data are visually compared in at least one indicator dimension to obtain network data packet forwarding components suitable for different business scenarios.
8. A device for comparing network data packet forwarding performance, characterized in that: include: The construction module is used to pre-construct different business scenarios for network data packet forwarding; a control module configured to simulate issuing control policies in the different business scenarios, use a traffic control tool to set a predefined rule chain on a forwarding path of a network data packet to control forwarding of the network data packet, and obtain first forwarding performance data; and simulate issuing control policies in the different business scenarios, use a packet filtering tool to inject program-mounted policy logic on the forwarding path of the network data packet to control forwarding of the network data packet, and obtain second forwarding performance data; A comparison module is used to compare the first forwarding performance data with the second forwarding performance data to obtain a network data packet forwarding component suitable for different business scenarios.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the steps of the method for comparing network data packet forwarding performance as described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for comparing network data packet forwarding performance as claimed in any one of claims 1 to 7 are implemented.